[cups.bugs] [MOD] STR #3556: CFLAGS are passed to the C++ compiler; only CXXFLAGS should be

Maciej Bliziński maciej.blizinski at gmail.com
Mon Apr 19 05:14:33 PDT 2010


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

The symptoms are that all the C objects are linked fine, but the compiler
fails on the first C++ linking:

Compiling genstrings.cxx...
Linking genstrings...
CC: Warning: Option -xnorunpath passed to ld, if ld is invoked, ignored
otherwise
/usr/ccs/bin/ld: illegal option -- x
/usr/ccs/bin/ld: illegal option -- n
ld: warning: option -o appears more than once, first setting taken
usage: ld [-6:abc:d:e:f:h:il:mo:p:rstu:z:B:CD:F:GI:L:M:N:P:Q:R:S:VY:?]
file(s)
        [-64]           enforce a 64-bit link-edit
        [-a]            create an absolute file
gmake[3]: *** [genstrings] Error 1
gmake[3]: Leaving directory
`/home/maciej/src/opencsw/pkg/cups/trunk/work/solaris9-i386/build-isa-i386/cups-1.4.3/ppdc'
gmake[2]: *** [all] Error 1

There are flags that are compatible with C compilers, but not C++
compilers.  Sun Studio C compiler has "-xnorunpath" while Sun Studio C++
has "-norunpath".  Passing "-xnorunpath" to the C++ compiler breaks the
build.

The problem is that the cups build system assumes it's okay to pass CFLAGS
to the C++ compiler.  It should only pass CXXFLAGS.

Link: http://www.cups.org/str.php?L3556
Version: 1.4-current





More information about the cups-devel mailing list