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
Unknown Object (File)
Thu, Jun 27, 2:54 AM
Unknown Object (File)
Jun 6 2024, 10:37 PM
Unknown Object (File)
Jun 6 2024, 8:57 AM
Unknown Object (File)
Jun 6 2024, 8:56 AM
Unknown Object (File)
May 16 2024, 10:24 PM
Unknown Object (File)
May 11 2024, 3:34 AM
Unknown Object (File)
May 11 2024, 2:15 AM
Unknown Object (File)
May 8 2024, 3:29 PM
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 Passed
Unit
No Test Coverage
Build Status
Buildable 4998
Build 5065: arc lint + arc unit

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