summaryrefslogtreecommitdiff
path: root/package/cups/cups-fix-stack-protector-check.patch
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2009-05-14 17:04:41 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2009-05-14 17:05:48 +0200
commit21c5e5d0d0f8ae048bcfcb8233f4d6615197f402 (patch)
tree414c668cae70aa3f325e7dd8c0a9be5a73ea7ee6 /package/cups/cups-fix-stack-protector-check.patch
parent0a761ca8aa838cab26ec9792745c38ca2a13f52d (diff)
cups: fix -fstack-protector configure check
The configure script failed to detect toolchains without stack protector support. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/cups/cups-fix-stack-protector-check.patch')
-rw-r--r--package/cups/cups-fix-stack-protector-check.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/package/cups/cups-fix-stack-protector-check.patch b/package/cups/cups-fix-stack-protector-check.patch
new file mode 100644
index 000000000..1db35ff02
--- /dev/null
+++ b/package/cups/cups-fix-stack-protector-check.patch
@@ -0,0 +1,25 @@
+[PATCH]: use AC_TRY_LINK for stack protector check
+
+Actually try to link an executable to test for stack protector support,
+as gcc seems to accept the -fstack-protector argument even when it's
+compiled with --disable-libssp (but linking fails with a error
+finding -lssp_nonshared).
+
+Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
+---
+ config-scripts/cups-compiler.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: cups-1.3.9/config-scripts/cups-compiler.m4
+===================================================================
+--- cups-1.3.9.orig/config-scripts/cups-compiler.m4
++++ cups-1.3.9/config-scripts/cups-compiler.m4
+@@ -109,7 +109,7 @@ if test -n "$GCC"; then
+ AC_MSG_CHECKING(if GCC supports -fstack-protector)
+ OLDCFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fstack-protector"
+- AC_TRY_COMPILE(,,
++ AC_TRY_LINK(,,
+ OPTIM="$OPTIM -fstack-protector"
+ AC_MSG_RESULT(yes),
+ AC_MSG_RESULT(no))