]> git.ipfire.org Git - location/libloc.git/commitdiff
configure: Enable -fno-semantic-interposition by default
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 29 Sep 2021 18:17:31 +0000 (18:17 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 30 Sep 2021 09:42:19 +0000 (09:42 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
configure.ac

index 2c55f0a1d02d84f46ee19acd90ce8cb5a9d128fd..da4b9c432eb2e1740e41d4e24db98fc63f8782e9 100644 (file)
@@ -22,7 +22,7 @@ AM_CFLAGS = ${my_CFLAGS} \
        -ffunction-sections \
        -fdata-sections
 
-AM_LDFLAGS =
+AM_LDFLAGS = ${my_LDFLAGS}
 
 # leaving a space here to work around automake's conditionals
  ifeq ($(OS),Darwin)
index 25f3fe719d9b78fd5a496eb559dbc7d6b9e02d45..485b8be196481e125db11a06567a5ac17e1cfa8f 100644 (file)
@@ -103,6 +103,7 @@ my_CFLAGS="\
 -Wtype-limits \
 "
 AC_SUBST([my_CFLAGS])
+AC_SUBST([my_LDFLAGS])
 
 # Enable -fanalyzer if requested
 AC_ARG_ENABLE([analyzer],
@@ -112,6 +113,10 @@ AS_IF([test "x$enable_analyzer" = "xyes"],
        CC_CHECK_FLAGS_APPEND([my_CFLAGS], [CFLAGS], [-fanalyzer])
 )
 
+# Enable -fno-semantic-interposition (if available)
+CC_CHECK_FLAGS_APPEND([my_CFLAGS], [CFLAGS], [-fno-semantic-interposition])
+CC_CHECK_FLAGS_APPEND([my_LDFLAGS], [LDFLAGS], [-fno-semantic-interposition])
+
 # ------------------------------------------------------------------------------
 
 AC_ARG_WITH([systemd],