]> git.ipfire.org Git - pakfire.git/commitdiff
configure: Enable -fno-semantic-interposition if possible
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 9 Dec 2021 12:29:55 +0000 (12:29 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 9 Dec 2021 12:29:55 +0000 (12:29 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
configure.ac

index 1d0aa12d20ca091ae7ee79bb6deb283eec6e8693..f1c95471c0c288a9d51df9bd20c4edc3801cb415 100644 (file)
@@ -126,13 +126,10 @@ AS_IF([test "x$enable_analyzer" = "xyes"],
        CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [-fanalyzer])
 )
 
-AC_SUBST([OUR_CFLAGS], $with_cflags)
-
 AS_CASE([$CFLAGS], [*-O[[12345g\ ]]*],
        [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
                -Wp,-D_FORTIFY_SOURCE=2])],
        [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
-AC_SUBST([OUR_CPPFLAGS], $with_cppflags)
 
 CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
        -Wl,--as-needed \
@@ -140,6 +137,13 @@ CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
        -Wl,--gc-sections \
        -Wl,-z,relro \
        -Wl,-z,now])
+
+# Enable -fno-semantic-interposition (if available)
+CC_CHECK_FLAGS_APPEND([with_CFLAGS], [CFLAGS], [-fno-semantic-interposition])
+CC_CHECK_FLAGS_APPEND([with_LDFLAGS], [LDFLAGS], [-fno-semantic-interposition])
+
+AC_SUBST([OUR_CPPFLAGS], $with_cppflags)
+AC_SUBST([OUR_CFLAGS], $with_cflags)
 AC_SUBST([OUR_LDFLAGS], $with_ldflags)
 
 # Bison