mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
build-sys: Don't define _FORTIFY_SOURCE when building with -O0
This commit is contained in:
parent
e3485290eb
commit
94c4034426
1 changed files with 6 additions and 1 deletions
|
|
@ -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 ####
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue