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.

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
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 4998
Build 5065: arc lint + arc unit

Event Timeline

ngie updated this revision to Diff 19900.Sep 1 2016, 12:38 AM
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)Sep 1 2016, 12:39 AM
ngie edited the test plan for this revision. (Show Details)
rodrigc accepted this revision.Sep 1 2016, 1:43 AM
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.

ngie added a comment.Sep 1 2016, 1:59 AM

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–42

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

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

ngie updated this revision to Diff 19905.Sep 1 2016, 2:33 AM
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.