bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BUG: CommonC++ includes compile time $CFLAGS in ccgnu2-config --flag


From: David Sugar
Subject: Re: BUG: CommonC++ includes compile time $CFLAGS in ccgnu2-config --flags
Date: Sat, 31 Jul 2004 10:14:48 -0400
User-agent: Mozilla Thunderbird 0.7.1 (X11/20040626)

I believe at the time the intent was to make sure that anything decendent from common c++ was also compiled with the same options. This is important for some options, such as exception handling, but may cause issues with source build systems for others. One problem is that a number of Common C++ specific options detected and set in the configure script, such as rtti settings, are currently set against CXXFLAGS rather than something seperate THREAD_FLAGS, and hence would also be lost with this patch.

I think the best solution would be to rework the configure tests to assure those compiler options which are set through tests always do make it into what ccgnu2-config --flags exports, and those things set by presetting CFLAGS/CXXFLAGS in front of configure do not. Since these tested options are not related to threading itself. they probably should be represented with COMMMON_FLAGS rather than THREAD_FLAGS, so they are easier to identify. Then ccgnu2-config --flags would export the value of THREAD_FLAGS & COMMON_FLAGS rather than THREAD_FLAGS & CXXFLAGS as it does now.

Curtis Magyar wrote:
http://bugs.gentoo.org/show_bug.cgi?id=58515

I guess I should report this bug here too.  I filed it with the Gentoo
bugzilla, but the patch should go upstream I think because this
behaviour is very bad.

The problem is that if common c++ is compiled with $CFLAGS set, the
ccgnu2-config script, and the pkg-config stuff in the devel branch both
pass the CommonC++ compile time $CFLAGS on to anything compiled using
those scripts.

There's a patch for 1.0.13 stable branch here:
http://bugs.gentoo.org/attachment.cgi?id=36245&action=view

and I'll attach a patch for 1.2.4 that fixes ccgnu2-config, as well as
the pkg-config files libccgnu2.pc and libccext2.pc.

Hopefully this will save someone else a bunch of time hunting down stray
-march='s in their projects $CFLAGS.

Additionally (and unrelated to this bug), would it not be helpful if
these two pkg-config files were called ccgnu2-1.2.pc and ccext2-1.2.pc
to facilitate having multiple versions of the libraries installed?
And the 'lib' prefix should be implied by the fact you're using the
scripts in the first place.


--
Curtis Magyar



------------------------------------------------------------------------

--- commoncpp2-1.2.4-orig/src/ccgnu2-config.in  2004-05-30 10:12:55.000000000 
-0500
+++ commoncpp2-1.2.4/src/ccgnu2-config.in       2004-07-27 02:03:36.874432168 
-0500
@@ -11,7 +11,7 @@
ost_cv_dynloader="@ost_cv_dynloader@" modflags="@MODULE_FLAGS@"
-ccflags="@THREAD_FLAGS@ @CXXFLAGS@"
+ccflags="@THREAD_FLAGS@"
 cclink="@SOCKET_LIBS@ @GETOPT_LIBS@ @THREAD_LIBS@"
 ccload="@DYN_LOADER@"
 ccstd="@XML_LIBS@ @ZSTREAM_LIBS@"
@@ -84,4 +84,3 @@
        esac
        shift
 done
-
--- commoncpp2-1.2.4-orig/src/libccgnu2.pc.in   2004-06-02 12:28:07.000000000 
-0500
+++ commoncpp2-1.2.4/src/libccgnu2.pc.in        2004-07-27 01:22:10.340442792 
-0500
@@ -8,5 +8,4 @@
 Description: GNU Common C++ core library
 Version: @VERSION@
Libs: -lccgnu2 @DYN_LOADER@ @SOCKET_LIBS@ @GETOPT_LIBS@ @THREAD_LIBS@ -Cflags: @THREAD_FLAGS@ @CXXFLAGS@ address@hidden@ - +Cflags: @THREAD_FLAGS@ address@hidden@
--- commoncpp2-1.2.4-orig/src/libccext2.pc.in   2004-06-02 12:19:53.000000000 
-0500
+++ commoncpp2-1.2.4/src/libccext2.pc.in        2004-07-27 01:22:19.161101848 
-0500
@@ -8,5 +8,4 @@
 Version: @VERSION@
 Requires: libccgnu2 = @VERSION@, libxml-2.0
 Libs: -lccext2
-Cflags: @THREAD_FLAGS@ @CXXFLAGS@
- +Cflags: @THREAD_FLAGS@


------------------------------------------------------------------------

_______________________________________________
Bug-commoncpp mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-commoncpp




reply via email to

[Prev in Thread] Current Thread [Next in Thread]