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)
Wed, May 1, 6:12 AM
Unknown Object (File)
Jan 13 2024, 2:54 AM
Unknown Object (File)
Dec 26 2023, 12:37 AM
Unknown Object (File)
Dec 20 2023, 6:40 AM
Unknown Object (File)
Dec 12 2023, 2:11 PM
Unknown Object (File)
Nov 2 2023, 8:40 AM
Unknown Object (File)
Sep 27 2023, 6:48 PM
Unknown Object (File)
Aug 24 2023, 3:44 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.