I don't really like the way the workaround was implemented.
It is pretty easy to have PIE just being disabled on ARM.
Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/dbus/Makefile,v
retrieving revision 1.25
diff -u -p -r1.25 Makefile
--- Makefile 14 Apr 2009 20:33:11 -0000 1.25
+++ Makefile 15 Apr 2009 00:46:17 -0000
@@ -1,12 +1,12 @@
# $OpenBSD: Makefile,v 1.25 2009/04/14 20:33:11 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
Index: patches/patch-configure_in
===================================================================
RCS file: /cvs/ports/x11/dbus/patches/patch-configure_in,v
retrieving revision 1.2
diff -u -p -r1.2 patch-configure_in
--- patches/patch-configure_in 14 Apr 2009 20:33:11 -0000 1.2
+++ patches/patch-configure_in 15 Apr 2009 02:02:50 -0000
@@ -1,10 +1,10 @@
$OpenBSD: patch-configure_in,v 1.2 2009/04/14 20:33:11 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
- 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
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.