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)
Thu, Jan 23, 9:35 PM
Unknown Object (File)
Jan 21 2025, 1:57 PM
Unknown Object (File)
Jan 17 2025, 11:24 PM
Unknown Object (File)
Jan 11 2025, 2:49 PM
Unknown Object (File)
Dec 12 2024, 4:47 PM
Unknown Object (File)
Nov 24 2024, 4:49 PM
Unknown Object (File)
Nov 22 2024, 1:10 PM
Unknown Object (File)
Nov 21 2024, 3:04 PM
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.