From 364cc54195f92e27530e2eb12f12a43607433ed8 Mon Sep 17 00:00:00 2001 From: Evan Miller Date: Mon, 6 Dec 2021 09:58:28 -0500 Subject: [PATCH] Confirm that -Wl,-pie links on Darwin The flag compiles but fails to link when the deployment target is OS X 10.4. --- config-scripts/cups-compiler.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config-scripts/cups-compiler.m4 b/config-scripts/cups-compiler.m4 index 28ec131fa6..bb8c022937 100644 --- a/config-scripts/cups-compiler.m4 +++ b/config-scripts/cups-compiler.m4 @@ -156,7 +156,7 @@ AS_IF([test -n "$GCC"], [ OLDCFLAGS="$CFLAGS" AS_CASE(["$host_os_name"], [darwin*], [ CFLAGS="$CFLAGS -fPIE -Wl,-pie" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [ + AC_LINK_IFELSE([AC_LANG_PROGRAM()], [ PIEFLAGS="-fPIE -Wl,-pie" AC_MSG_RESULT([yes]) ], [ -- 2.47.2