This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ld_compile: force CFLAGS really necessary ?


i fetched binutils-2.18 and ran it through some `make check` only to find ld 
oddly failling some tests on me ... after digging through it a bit, it seems 
it's due to mixing of CFLAGS and CXXFLAGS.

on my system, i throw -Wimplicit-function-declaration into my CFLAGS which 
does two things: (1) shows me implicit functions so i can send patches to fix 
code and (2) see when packages wrongly mix CFLAGS and CXXFLAGS.

in ld/testsuite/lib/ld-lib.exp, the ld_compile function will append $CFLAGS to 
all commands given it.  this means even tests like ld-cdtest which compiles 
C++ code and which will cause erroneous failures when CFLAGS contains things 
that are not valid in CXXFLAGS.  doing a quick grep against ld_compile, i see 
CFLAGS is explicitly specified in the call to ld_compile by over half the 
tests which use this function ... and on my system, simply removing the 
CFLAGS append inside of the ld_compile function doesnt cause any regressions.

so the question is, do we drop this auto CFLAGS append completely ?  or do we 
do a check against the suffix of $source and if it is set to .cc, auto append 
CXXFLAGS rather than CFLAGS ?
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]