Per-arch CFLAGS
Ian Lepore
ian at FreeBSD.org
Sat Mar 15 14:28:25 UTC 2014
I've run into a situation where I need to pass architecture specific
CFLAGS to the world stage of a cross-build but not have those flags in
effect for the build-tools and cross-tools that run on the build host.
I tried several things based on $TARGET_ARCH and manipulating the
environment in Makefile.inc1 but everything I tried either didn't work
or had unhappy side effects such as overriding automatically-supplied
internal flags with the user-supplied flags, usually resulting in build
failure because some crucial CPUTYPE stuff would be missing.
After consulting with Warner a bit I came up with the attached rather
simple change that does the job perfectly. It adds support for a
CFLAGS.arch variable that can be set in make.conf or the command line or
environment. Any objections to this?
-- Ian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cflags.arch.diff
Type: text/x-patch
Size: 1611 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20140315/1709890d/attachment.bin>
More information about the freebsd-arch
mailing list