Closed tari closed 3 months ago
Thanks for the contribution. Something I meant to do for quite some time - and never got around to. (Really: what I wanted to do is to make the tests a bit more generic - so the they would run with llvm...a project for another day.)
I haven't tried your fix yet - but I think that it slightly breaks my most common usage:
Do you mind to update your change slightly, to set CC/CXX if one isn't already defined in the environment?
I think that will address both of our concerns.
Not sure if anyone apart from me does this, or cares.
(It is fair for you to object in that I could just run CXX=g++ ./msgtest.sh -v
)
Henry
That's reasonable. I had actually done it that way initially, but decided it would be a little simpler to set the variables in the makefile only. If you like being able to run the scripts directly though, that's enough reason to set them in each script- I've made that change now.
Looks good - thanks! Yeah...I run things manually very, very frequently - almost always, because I broke something and am trying to debug it. Henry
Cross-compiling may need to use a different compiler, so don't hard code references to plain
gcc
and instead determine the compiler to use from the environment and default to gcc if unspecified.When building for ChromeOS for example, invoking plain gcc or g++ is turned into a fatal error as a safety measure to ensure that everything which should be cross-compiled actually is; ignoring CC and CXX in the environment causes the tests to break
make install
, since the test scripts run unprefixedgcc
to probe the compiler version in use even when run as part ofmake clean
invocations duringmake install
.