Page MenuHomeFreeBSD

Include ARCH_FLAGS in CFLAGS when building modules.
ClosedPublic

Authored by brooks on Jul 18 2017, 12:39 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 17, 6:58 AM
Unknown Object (File)
Thu, Nov 14, 4:56 AM
Unknown Object (File)
Mon, Nov 11, 5:38 AM
Unknown Object (File)
Oct 3 2024, 2:34 AM
Unknown Object (File)
Oct 2 2024, 6:35 PM
Unknown Object (File)
Oct 2 2024, 9:33 AM
Unknown Object (File)
Sep 30 2024, 5:09 AM
Unknown Object (File)
Sep 27 2024, 7:51 AM
Subscribers
None

Details

Summary

Without this change, modules will match the default compiler configuration
which may not be the same as the kernel values.

Diff Detail

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

Event Timeline

It looks like ARCH_FLAGS is used only on MIPS? I'm missing something here since it seems the default MIPS ARCH_FLAGS is set in sys/conf/Makefile.mips, which has CFLAGS+=${EXTRA_FLAGS} $(ARCH_FLAGS)

Should have been done when the kernel side of this was committed.

<insert rant about our crazy build system here>

This revision is now accepted and ready to land.Jul 19 2017, 1:45 PM

It looks like ARCH_FLAGS is used only on MIPS? I'm missing something here since it seems the default MIPS ARCH_FLAGS is set in sys/conf/Makefile.mips, which has CFLAGS+=${EXTRA_FLAGS} $(ARCH_FLAGS)

It does seem to only be used on MIPS. The CFLAGS in Makefile.mips doesn't have any effect on module builds via buildkernel because that's in a clean sub-make invocation whose environment is governed by MKMODULESENV.

I ran into this on CheriBSD where I'm overriding the default -target via ARCH_FLAGS. The initial attempt was via CONF_FLAGS, but that doesn't make it into the trampoline or hack.c's compilation.

This revision was automatically updated to reflect the committed changes.