[cups.bugs] [LOW] STR #3567: Linking code doesn't take CFLAGS and CXXFLAGS into account

Maciej Bliziński maciej.blizinski at gmail.com
Sun Apr 25 03:59:59 PDT 2010


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

[STR New]

There is a case when CFLAGS and CXXFLAGS need to be passed to the linker. 
On Solaris, Sun Studio adds its own RPATH elements to every binary. 
Here's the output from checkpkg, OpenCSW's program for checking for
package errors:

bad-rpath-entry|/lib|opt/csw/lib/libcupsppdc.so.1
bad-rpath-entry|/opt/SUNWspro/lib|opt/csw/lib/libcupsppdc.so.1
bad-rpath-entry|/opt/studio/SOS12/SUNWspro/lib|opt/csw/lib/libcupsppdc.so.1
bad-rpath-entry|/opt/studio/SOS12/SUNWspro/lib/rw7|opt/csw/lib/libcupsppdc.so.1

To stop Sun Studio from adding these RPATHs, an option must be passed. 
Unfortunately, the options for C and C++ compilers are different:
-xnorunpath and -norunpath.  Passing the wrong flag causes the compiler or
linker to fail.

This option can't be passed via LDFLAGS, because LDFLAGS are common to C
and C++ compilers.  Instead, CFLAGS and CXXLAGS must be used.

In CUPS Makefiles, CFLAGS and CXXFLAGS aren't currently used. The attached
patch adds support for CFLAGS and CXXFLAGS.  I believe this patch will work
for other operating systems as well.

https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/cups/trunk/files/0008-Adding-CFLAGS-and-CXXFLAGS-to-linker-calls.patch

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





More information about the cups-devel mailing list