build-sys: Sync CFLAGS with libostree
In particular this pulls in `-fno-strict-aliasing`. See https://github.com/ostreedev/ostree/pull/1384 Closes: #1156 Approved by: jlebon
This commit is contained in:
parent
8d176e1f92
commit
937ad1b1fc
@ -39,7 +39,9 @@ AM_CPPFLAGS += -DDATADIR='"$(datadir)"' \
|
||||
-DRPM_OSTREE_FEATURES='"$(RPM_OSTREE_FEATURES)"' \
|
||||
-DRPM_OSTREE_GITREV='"$(RPM_OSTREE_GITREV)"' \
|
||||
-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_50 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_50
|
||||
AM_CFLAGS += -std=gnu11 $(WARN_CFLAGS)
|
||||
# Keep this in sync with the AM_CFLAGS in libostree; see
|
||||
# that project for more information about e.g. -fno-strict-aliasing
|
||||
AM_CFLAGS += -std=gnu11 -fno-strict-aliasing $(WARN_CFLAGS)
|
||||
# bundled libdnf
|
||||
AM_LDFLAGS += "-Wl,-rpath=$(libdir)/rpm-ostree"
|
||||
|
||||
|
39
configure.ac
39
configure.ac
@ -38,24 +38,29 @@ AC_SUBST([dbusservicedir], [$dbusservicedir])
|
||||
AC_MSG_RESULT(dbusservicedir)
|
||||
|
||||
dnl Keep this in sync with the version in ostree
|
||||
AS_IF([echo "$CFLAGS" | grep -q -E -e '-Werror($| )'], [], [
|
||||
CC_CHECK_FLAGS_APPEND([WARN_CFLAGS], [CFLAGS], [\
|
||||
-pipe \
|
||||
-Wall \
|
||||
-Werror=empty-body \
|
||||
-Werror=strict-prototypes \
|
||||
-Werror=missing-prototypes \
|
||||
-Werror=implicit-function-declaration \
|
||||
"-Werror=format=2 -Werror=format-security -Werror=format-nonliteral" \
|
||||
-Werror=pointer-arith -Werror=init-self \
|
||||
-Werror=missing-declarations \
|
||||
-Werror=return-type \
|
||||
-Werror=overflow \
|
||||
-Werror=int-conversion \
|
||||
-Werror=parenthesis \
|
||||
-Werror=incompatible-pointer-types \
|
||||
-Werror=misleading-indentation \
|
||||
-Werror=missing-include-dirs -Werror=aggregate-return \
|
||||
])
|
||||
-pipe \
|
||||
-Wall \
|
||||
-Werror=empty-body \
|
||||
-Werror=strict-prototypes \
|
||||
-Werror=missing-prototypes \
|
||||
-Werror=implicit-function-declaration \
|
||||
"-Werror=format=2 -Werror=format-security -Werror=format-nonliteral" \
|
||||
-Werror=pointer-arith -Werror=init-self \
|
||||
-Werror=missing-declarations \
|
||||
-Werror=return-type \
|
||||
-Werror=switch \
|
||||
-Werror=overflow \
|
||||
-Werror=int-conversion \
|
||||
-Werror=parenthesis \
|
||||
-Werror=undef \
|
||||
-Werror=incompatible-pointer-types \
|
||||
-Werror=misleading-indentation \
|
||||
-Werror=missing-include-dirs -Werror=aggregate-return \
|
||||
-Wstrict-aliasing=2 \
|
||||
-Werror=unused-result \
|
||||
])])
|
||||
AC_SUBST(WARN_CFLAGS)
|
||||
|
||||
AC_MSG_CHECKING([for -fsanitize=address in CFLAGS])
|
||||
|
Loading…
Reference in New Issue
Block a user