El 27/03/13 16:06, [email protected] escribió:

Message: 2
Date: Wed, 27 Mar 2013 13:03:49 +0100 (CET)
From: Daniel Stenberg <[email protected]>
To: libcurl development <[email protected]>
Subject: Re: commit d1effad0524bcb4763e06659b728ba134464608
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-15"; Format="flowed"

On Wed, 27 Mar 2013, Cristian Rodr?guez wrote:

The following commit will break most distributions buildsystems

Did they all just silently patch or
work-around this problem without telling us?

Probably, or lets say, most likely.


Can you please be more elaborate and explain what exactly you must set in
CFLAGS, that you cannot set in CPPFLAGS and how that is still kosher configure
use?


Ok, for example take a look at fedora's build

http://kojipkgs.fedoraproject.org//packages/curl/7.24.0/6.fc17/data/logs/x86_64/build.log

the key part

+ CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'


All rpm based distributions in one way or another include macro definitions in CFLAGS, which are expanded from the equivalent of running rpm --eval %optflags.

for autotools based packages a macro %configure is used, which in openSUSE at least expands to

 rpm --eval %configure

CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export FFLAGS ;
  ./configure --host=x86_64-suse-linux-gnu --build=x86_64-suse-linux-gnu \
        --program-prefix= \
        --disable-dependency-tracking \
        --prefix=/usr \
        --exec-prefix=/usr \
        --bindir=/usr/bin \
        --sbindir=/usr/sbin \
        --sysconfdir=/etc \
        --datadir=/usr/share \
        --includedir=/usr/include \
        --libdir=/usr/lib64 \
        --libexecdir=/usr/lib \
        --localstatedir=/var \
        --sharedstatedir=/usr/com \
        --mandir=/usr/share/man \
        --infodir=/usr/share/info

There is no separate %cflags or %cppflags, this is by design.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to