[pulseaudio-commits] 2 commits - configure.ac

Tanu Kaskinen tanuk at kemper.freedesktop.org
Mon Oct 14 07:46:09 PDT 2013


 configure.ac |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit b402f9e01f84bd77a640dc1ce31c69399e2378fb
Author: Tanu Kaskinen <tanu.kaskinen at linux.intel.com>
Date:   Sat Oct 12 12:45:58 2013 +0300

    build-sys: Print CPPFLAGS in configure
    
    I needed this for verifying that the conditional defining of
    _FORTIFY_SOURCE works.

diff --git a/configure.ac b/configure.ac
index e2465e4..72e7695 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1438,6 +1438,7 @@ echo "
     System Config Path:            ${PA_SYSTEM_CONFIG_PATH}
     Compiler:                      ${CC}
     CFLAGS:                        ${CFLAGS}
+    CPPFLAGS:                      ${CPPFLAGS}
     LIBS:                          ${LIBS}
 
     Enable X11:                    ${ENABLE_X11}

commit 9305286ad80bba12c721fa3473f718444190edb1
Author: Tanu Kaskinen <tanu.kaskinen at linux.intel.com>
Date:   Sat Oct 12 12:45:09 2013 +0300

    build-sys: Don't define _FORTIFY_SOURCE when building with -O0

diff --git a/configure.ac b/configure.ac
index 42cb8b8..e2465e4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -165,12 +165,17 @@ esac
 #### Compiler flags ####
 
 AX_APPEND_COMPILE_FLAGS(
-    [-Wall -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option],
+    [-Wall -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -fno-common -fdiagnostics-show-option],
     [], [-pedantic -Werror])
 
 # Only enable fastpath asserts when doing a debug build, e.g. from bootstrap.sh.
 AS_CASE([" $CFLAGS "], [*" -O0 "*], [], [AX_APPEND_FLAG(["-DFASTPATH"], [CPPFLAGS])])
 
+# Only set _FORTIFY_SOURCE when optimizations are enabled. If optimizations
+# are disabled, _FORTIFY_SOURCE doesn't do anything, and causes tons of
+# warnings during compiling on some distributions (at least Fedora).
+AS_CASE([" $CFLAGS "], [*" -O0 "*], [], [AX_APPEND_FLAG(["-D_FORTIFY_SOURCE=2"], [CPPFLAGS])])
+
 
 #### Linker flags ####
 



More information about the pulseaudio-commits mailing list