Disable PIE *only* on arm.

From Brad.
This commit is contained in:
kili 2009-04-15 16:12:52 +00:00
parent 5c5ddc4ff7
commit 6b8efc7f28
2 changed files with 26 additions and 15 deletions

View File

@ -1,12 +1,12 @@
# $OpenBSD: Makefile,v 1.25 2009/04/14 20:33:11 kili Exp $
# $OpenBSD: Makefile,v 1.26 2009/04/15 16:12:52 kili Exp $
# XXX patches/patch-configure_in disables PIE. This is just a
# temporary workaround until PIE works on arm.
# XXX patches/patch-configure_in disables PIE on arm. This is just a
# temporary workaround until PIE works.
COMMENT= message bus system
DISTNAME= dbus-1.2.12
PKGNAME= ${DISTNAME}p1
PKGNAME= ${DISTNAME}p2
SHARED_LIBS+= dbus-1 7.0
CATEGORIES= x11

View File

@ -1,10 +1,10 @@
$OpenBSD: patch-configure_in,v 1.2 2009/04/14 20:33:11 kili Exp $
$OpenBSD: patch-configure_in,v 1.3 2009/04/15 16:12:52 kili Exp $
XXX disabling PIE is a workaround to let dbus work on arm.
XXX disabling PIE on arm is a workaround to let dbus work.
--- configure.in.orig Wed Jan 7 01:30:26 2009
+++ configure.in Tue Apr 14 12:46:30 2009
@@ -253,19 +253,6 @@ if test "x$GCC" = "xyes"; then
--- configure.in.orig Tue Jan 6 19:30:26 2009
+++ configure.in Tue Apr 14 21:58:52 2009
@@ -253,17 +253,20 @@ if test "x$GCC" = "xyes"; then
;;
esac
@ -16,15 +16,26 @@ XXX disabling PIE is a workaround to let dbus work on arm.
- PIE_LDFLAGS="-pie -Wl,-z,relro"
- else
- PIE_LDFLAGS="-pie"
- fi
+ case $host in
+ arm-*-openbsd*) ;;
+ *) case " $CFLAGS " in
+ *[\ \ ]-fPIE[\ \ ]*) ;;
+ *) if cc_supports_flag -fPIE; then
+ PIE_CFLAGS="-fPIE"
+ if ld_supports_flag -z,relro; then
+ PIE_LDFLAGS="-pie -Wl,-z,relro"
+ else
+ PIE_LDFLAGS="-pie"
+ fi
fi
- fi
- ;;
- esac
-
### Disabled warnings, and compiler flag overrides
+ ;;
+ esac
esac
# Let's just ignore unused for now
@@ -282,10 +269,6 @@ if test "x$GCC" = "xyes"; then
### Disabled warnings, and compiler flag overrides
@@ -282,10 +285,6 @@ if test "x$GCC" = "xyes"; then
*[\ \ ]-Wno-sign-compare[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wno-sign-compare" ;;
esac