mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-08-19 03:47:26 +00:00
scripts: Don't use FORTIFY_SOURCE when optimizations are disabled
Both arguments were incompatible and warnings were being displayed for this combination Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
This commit is contained in:
+5
-1
@@ -2,7 +2,7 @@ SUFFIXES= .rst
|
||||
|
||||
EXTRA_DIST = COPYING scripts/findstatic.pl swupd.bash swupd.zsh config
|
||||
|
||||
AM_CFLAGS = -fPIE -fPIC -g -D_FORTIFY_SOURCE=2 -fno-common -std=gnu99 \
|
||||
AM_CFLAGS = -fPIE -fPIC -g -fno-common -std=gnu99 \
|
||||
-O$(OPTIMIZE) \
|
||||
-Wall \
|
||||
-Wextra \
|
||||
@@ -22,6 +22,10 @@ AM_CFLAGS = -fPIE -fPIC -g -D_FORTIFY_SOURCE=2 -fno-common -std=gnu99 \
|
||||
-fno-delete-null-pointer-checks \
|
||||
-fwrapv
|
||||
|
||||
if ENABLE_FORTIFY
|
||||
AM_CFLAGS += -D_FORTIFY_SOURCE=2
|
||||
endif
|
||||
|
||||
AM_LDFLAGS = -z noexecstack -z relro -z now \
|
||||
-pie
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ AS_IF(
|
||||
[AC_SUBST(OPTIMIZE, [0])],
|
||||
[AC_SUBST(OPTIMIZE, [2])]
|
||||
)
|
||||
AM_CONDITIONAL([ENABLE_FORTIFY], [test "$enable_optimizations" != "no"])
|
||||
|
||||
AC_ARG_ENABLE(
|
||||
[bzip2],
|
||||
|
||||
@@ -30,7 +30,7 @@ run_checks() {
|
||||
}
|
||||
|
||||
# Run tests without any security optimization and with address sanitizer
|
||||
CFLAGS="-fsanitize=address -fno-omit-frame-pointer" run_build --disable-optimizations "$CONFIGURE_ARGS"
|
||||
CFLAGS="-fsanitize=address -fno-omit-frame-pointer -Werror" run_build --disable-optimizations "$CONFIGURE_ARGS"
|
||||
run_checks
|
||||
|
||||
# Run build with basic configurations
|
||||
|
||||
Reference in New Issue
Block a user