Page MenuHomeFreeBSD

Don't bake all of CC/CPP/CXX into CFLAGS; filter out cross-compiler arguments
ClosedPublic

Authored by ngie on Sep 1 2016, 12:38 AM.
Tags
None
Referenced Files
F103208601: D7732.id19905.diff
Fri, Nov 22, 6:27 AM
Unknown Object (File)
Fri, Nov 15, 8:35 AM
Unknown Object (File)
Wed, Nov 13, 6:32 AM
Unknown Object (File)
Wed, Nov 6, 6:18 PM
Unknown Object (File)
Oct 11 2024, 12:37 AM
Unknown Object (File)
Oct 11 2024, 12:37 AM
Unknown Object (File)
Oct 11 2024, 12:17 AM
Unknown Object (File)
Oct 2 2024, 7:58 AM
Subscribers

Details

Summary

Don't bake all of CC/CPP/CXX into CFLAGS; filter out cross-compiler arguments

This change strips out all of the cross-compiler arguments, like -target, -B,
etc, so it doesn't infect the build.

MFC after: 12 days
X-MFC with: r305041
Sponsored by: EMC / Isilon Storage Division

Test Plan
$ pwd; make -VCFLAGS -VMAKEOBJDIRPREFIX
/mnt/lib/atf/libatf-c
-O2 -pipe -O2 -pipe   -DHAVE_CONFIG_H -DATF_BUILD_CC='"cc"' -DATF_BUILD_CFLAGS='"-O2 -O2 -DHAVE_CONFIG_H"' -DATF_BUILD_CPP='"cpp"' -DATF_BUILD_CPPFLAGS='""' -DATF_BUILD_CXX='"c++"' -DATF_BUILD_CXXFLAGS='"-O2 -O2 -DHAVE_CONFIG_H -O2"' -I/mnt/contrib/atf -I/mnt/lib/atf/libatf-c -I.  -std=gnu99 -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef  -Qunused-arguments 
/obj
$ make -s clean; make -s all -j12; /usr/local/bin/sudo -E make -s install DESTDIR=/wnw/
===> tests (clean)
===> tests/detail (clean)
===> tests (all)
===> tests/detail (all)
===> tests (install)
===> tests/detail (install)
$ chroot /wnw /bin/sh
# cd /usr/tests/lib/atf
# /usr/local/bin/kyua test
...

Results file id is usr_tests_lib_atf.20160901-003719-998724
Results saved to /root/.kyua/store/results.usr_tests_lib_atf.20160901-003719-998724.db

328/328 passed (0 failed)
#

Diff Detail

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

Event Timeline

ngie retitled this revision from to Don't bake all of CC/CPP/CXX into CFLAGS; filter out cross-compiler arguments.
ngie updated this object.
ngie edited the test plan for this revision. (Show Details)
ngie added reviewers: bdrewery, jmmv.
ngie edited the test plan for this revision. (Show Details)
rodrigc added a reviewer: rodrigc.
rodrigc added a subscriber: rodrigc.

I say, let's try this out and give it a shot to shut up the test failures.
Nice investigatory work!

This revision is now accepted and ready to land.Sep 1 2016, 1:43 AM

Wow, this just is just NASTY.
Thanks for fixing this, please commit the fix ASAP.

Wow, this just is just NASTY.
Thanks for fixing this, please commit the fix ASAP.

I'll wait 1-2 more hours for either bdrewery or jmmv to respond..

lib/atf/libatf-c/Makefile
30 ↗(On Diff #19900)

Probably should add a comment as to why this is being done.

ngie marked an inline comment as done.Sep 1 2016, 2:20 AM
ngie added inline comments.
lib/atf/libatf-c/Makefile
31 ↗(On Diff #19900)

This wouldn't work with ccache enabled :/..

ngie edited edge metadata.
  • Omit CCACHE_BIN when building the ATF_BUILD_{CC,CPP,CXX} variables.
  • Add commits noting why this logic is being added.
This revision now requires review to proceed.Sep 1 2016, 2:33 AM
This revision was automatically updated to reflect the committed changes.