Page MenuHomeFreeBSD

Don't specify the desired march/mabi for RISC-V in ACFLAGS.
ClosedPublic

Authored by jhb on Jun 28 2018, 8:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Feb 3, 11:49 AM
Unknown Object (File)
Jan 17 2025, 11:50 AM
Unknown Object (File)
Dec 26 2024, 10:28 PM
Unknown Object (File)
Nov 19 2024, 2:56 PM
Unknown Object (File)
Nov 8 2024, 1:12 AM
Unknown Object (File)
Nov 5 2024, 6:05 PM
Unknown Object (File)
Nov 5 2024, 4:19 AM
Unknown Object (File)
Oct 26 2024, 5:09 PM

Details

Summary

ACFLAGS is only used in addition to CFLAGS, so setting the options
in both was redundant. However, ACFLAGS is added to the command
line after CFLAGS, so the settings from ACFLAGS were applied for
assembly files in kernel modules after the kernel-specific march/abi
in CFLAGS. As a result, the hard-float ACFLAGS in bsd.cpu.mk was
overriding the soft-float CFLAGS.gcc in sys/conf/kern.mk. In particular,
dtrace_asm.o was compiled as hard-float and the linker refused to link
dtrace.ko since its object files contained a mix of hard and soft float.

Test Plan
  • compile RISCV GENERIC kernel with updated binutils (2.30)

Diff Detail

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

Event Timeline

This revision is now accepted and ready to land.Jun 29 2018, 2:50 PM

Actually, I wonder if ACFLAGS shouldn't be removed from bsd.cpu.mk instead. ACFLAGS is always included in addition CFLAGS, so the settings in ACFLAGS are redundant with CFLAGS in bsd.cpu.mk. (There is a separate AFLAGS for flags passed to a standalone assembler. Perhaps the ACFLAGS in bsd.cpu.mk was supposed to be AFLAGS instead?)

  • Drop ACFLAGS entirely.
This revision now requires review to proceed.Jul 2 2018, 4:59 PM
jhb retitled this revision from Specify the desired march/mabi for RISC-V in ACFLAGS as well. to Don't specify the desired march/mabi for RISC-V in ACFLAGS..Jul 2 2018, 5:02 PM
jhb edited the summary of this revision. (Show Details)
jhb added a subscriber: lwhsu.

I've reworked this change to just remove ACFLAGS instead. No other platforms set anything in ACFLAGS in bsd.cpu.mk so I think this is more consistent. We could perhaps set AFLAGS, but I don't think anything uses AFLAGS in the tree, so I'd rather wait to add that until a real need arises.

Also, this failure was reported on the current riscv64-binutils as well, so this isn't a new breakage exposed by the binutils upgrade to 2.30.

This revision is now accepted and ready to land.Jul 2 2018, 6:47 PM
This revision was automatically updated to reflect the committed changes.