From fbefda35240856630b0b388304ba5713af34ff54 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Mon, 24 May 2021 22:02:50 -0400 Subject: [build] MacOS linker compat --- configure.ac | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 7b429ca8..2530fdfc 100644 --- a/configure.ac +++ b/configure.ac @@ -1665,10 +1665,16 @@ AC_ARG_ENABLE([extra-warnings], if test "$extrawarnings" = true || test "$extrawarnings" = error; then TRY_CFLAGS([-g -O2 -g2 -Wall -Wmissing-declarations -Wcast-align -Wsign-compare -Wnested-externs -Wpointer-arith -D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security]) - TRY_LDFLAGS([-Wl,--as-needed]) + case "$host_os" in + *darwin* ) ;; + * ) TRY_LDFLAGS([-Wl,--as-needed]) ;; + esac if test "$extrawarnings" = error; then AS_VAR_APPEND([CFLAGS], [" -Werror"]) - AS_VAR_APPEND([LDFLAGS], [" -Wl,--fatal-warnings"]) + case "$host_os" in + *darwin* ) ;; + * ) AS_VAR_APPEND([LDFLAGS], [" -Wl,--fatal-warnings"]) ;; + esac fi fi -- cgit v1.2.1