openbsd-ports/print/cups/patches/patch-config-scripts_cups-compiler_m4
ajacoutot e90b27a568 Major update to CUPS 1.6.1.
This package is now split between -main (the bloat) and -libs (i.e.
cups-libs; which only contains the base libraries which have no
external deps).
Most filters have moved to cups-filters, the split was needed because
cups depends on cups-filters which depends on cups

The nice side-effect is that this will simplify lots of things in tree.
2012-08-04 14:37:04 +00:00

28 lines
838 B
Plaintext

$OpenBSD: patch-config-scripts_cups-compiler_m4,v 1.6 2012/08/04 14:37:04 ajacoutot Exp $
Don't only test wether GCC support -pie but also test wether a program
built with -pie actually runs; this fixes the build on arm.
--- config-scripts/cups-compiler.m4.orig Fri Jan 20 17:22:58 2012
+++ config-scripts/cups-compiler.m4 Thu Jul 26 10:38:03 2012
@@ -124,16 +124,9 @@ if test -n "$GCC"; then
# that depend on a fixed address for common functions.
AC_MSG_CHECKING(if GCC supports -fPIE)
OLDCFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -fPIE"
- AC_TRY_COMPILE(,,
- [case "$CC" in
- *clang)
- PIEFLAGS="-fPIE -Wl,-pie"
- ;;
- *)
- PIEFLAGS="-fPIE -pie"
- ;;
- esac
+ CFLAGS="$CFLAGS -fPIE -pie"
+ AC_RUN_IFELSE(AC_LANG_PROGRAM(),
+ [PIEFLAGS="-fPIE -pie"
AC_MSG_RESULT(yes)],
AC_MSG_RESULT(no))
CFLAGS="$OLDCFLAGS"