[Mesa-dev] [PATCH] configure.ac: Save user {C, CXX}FLAGS and append them at end.
Johannes Obermayr
johannesobermayr at gmx.de
Sat Dec 22 09:47:39 PST 2012
Am Samstag, 22. Dezember 2012, 09:21:33 schrieb Matt Turner:
> On Sat, Dec 22, 2012 at 9:16 AM, Johannes Obermayr
> <johannesobermayr at gmx.de> wrote:
> > This way the user has the privilege of last decision and so the option to build an optimized debug build again.
> > ---
>
> You can just do CFLAGS="-g -O2" ./configure can't you?
Nope.
CXXFLAGS='-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g' CFLAGS='-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g' ./autogen.sh --host=x86_64-suse-linux-gnu --build=x86_64-suse-linux-gnu --program-prefix= --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 --disable-dependency-tracking --enable-xvmc --enable-vdpau --enable-texture-float --enable-debug --with-dri-drivers=i915,i965,nouveau,r200,radeon,swrast --with-gallium-drivers=i915,nouveau,r300,r600,svga,swrast --enable-dri --enable-glx --enable-osmesa --enable-gles1 --enable-gles2 --enable-openvg --enable-shared-glapi --enable-shared-gallium --enable-gbm --enable-xa --enable-gallium-egl --enable-gallium-llvm --enable-gallium-gbm --enable-opencl --enable-r600-llvm-compiler --enable-gallium-g3dvl --enable-glx-tls
Resulting Makefile:
before:
CFLAGS = -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-strict-aliasing -fno-builtin-memcmp -g -O0
after:
CFLAGS = -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-strict-aliasing -fno-builtin-memcmp -g -O0 -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g
You see configure CFLAGS and initial CFLAGS are vice versa.
More information about the mesa-dev
mailing list