cups-fix-stack-protector-check.patch 920 B

12345678910111213141516171819202122232425
  1. [PATCH]: use AC_TRY_LINK for stack protector check
  2. Actually try to link an executable to test for stack protector support,
  3. as gcc seems to accept the -fstack-protector argument even when it's
  4. compiled with --disable-libssp (but linking fails with a error
  5. finding -lssp_nonshared).
  6. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
  7. ---
  8. config-scripts/cups-compiler.m4 | 2 +-
  9. 1 file changed, 1 insertion(+), 1 deletion(-)
  10. Index: cups-1.3.9/config-scripts/cups-compiler.m4
  11. ===================================================================
  12. --- cups-1.3.9.orig/config-scripts/cups-compiler.m4
  13. +++ cups-1.3.9/config-scripts/cups-compiler.m4
  14. @@ -109,7 +109,7 @@ if test -n "$GCC"; then
  15. AC_MSG_CHECKING(if GCC supports -fstack-protector)
  16. OLDCFLAGS="$CFLAGS"
  17. CFLAGS="$CFLAGS -fstack-protector"
  18. - AC_TRY_COMPILE(,,
  19. + AC_TRY_LINK(,,
  20. OPTIM="$OPTIM -fstack-protector"
  21. AC_MSG_RESULT(yes),
  22. AC_MSG_RESULT(no))