Page MenuHomeFreeBSD

Work around an old as bug
ClosedPublic

Authored by rafael.espindola_gmail.com on Jun 9 2016, 6:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 17, 5:19 PM
Unknown Object (File)
Tue, Oct 29, 1:20 PM
Unknown Object (File)
Sun, Oct 27, 7:14 AM
Unknown Object (File)
Oct 12 2024, 10:29 PM
Unknown Object (File)
Sep 30 2024, 5:24 AM
Unknown Object (File)
Sep 27 2024, 4:29 AM
Unknown Object (File)
Sep 27 2024, 4:29 AM
Unknown Object (File)
Sep 27 2024, 4:29 AM

Details

Summary

Old versions of gas produce an invalid section index. That is ignored by old versions of ld, but prevents a link with lld.

The file doesn't assemble with llvm-mc since MC is missing altmacro.

Fortunately the bug is easy to work around.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rafael.espindola_gmail.com retitled this revision from to Work around an old as bug.
rafael.espindola_gmail.com updated this object.
rafael.espindola_gmail.com edited the test plan for this revision. (Show Details)
rafael.espindola_gmail.com added a subscriber: davide.
allanjude added a reviewer: allanjude.

This is not my area of expertise, but I have no objection.

This diff is fine with me

This revision is now accepted and ready to land.Jun 10 2016, 2:06 PM
lib/libmd/Makefile
96 ↗(On Diff #17475)

Should not be AFLAGS?

I think I tried but the make used in buildworld (bmake?) doesn't support it.

emaste added a subscriber: bdrewery.

I tested the equivalent using AFLAGS:

diff --git a/lib/libmd/Makefile b/lib/libmd/Makefile
index bb50623..9afdc45 100644
--- a/lib/libmd/Makefile
+++ b/lib/libmd/Makefile
@@ -93,6 +93,7 @@ SRCS+=        rmd160.S
 CFLAGS+= -DRMD160_ASM
 .endif
 .if exists(${MACHINE_ARCH}/skein_block_asm.s)
+AFLAGS += --strip-local-absolute
 SRCS+= skein_block_asm.s
 CFLAGS+= -DSKEIN_ASM -DSKEIN_USE_ASM=1792 # list of block functions to replace :

with make tinderbox and it works. @bdrewery, are you aware of AFLAGS not working somewhere?

AFLAGS works for compiling .s files while ACFLAGS works for compiling .S and .asm files.

And no I don't see anywhere it wouldn't work.

Lets try with ASFLAGS then.

It might have been just my mistake. If we hit a case where that doesn't work then we will know why.

This revision was automatically updated to reflect the committed changes.