summaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorKoop Mast <kwm@FreeBSD.org>2013-02-19 16:24:16 +0000
committerKoop Mast <kwm@FreeBSD.org>2013-02-19 16:24:16 +0000
commitfef19532ce4bdec1f115e8e1b37dfd26c3fba141 (patch)
tree32ee8a304162f772a8918e439e76f9b3b077039a /Mk
parent- Trim header (diff)
Add workaround for when clang is used as a compiler, due to a tail calls
optimization bug in llvm when PIC mode is used. This bug was reproduced with 3.2 and 3.1 on i386. And prevents modules that where dlopen()'d by the xorg-server, to dlopen() other shared modules by themself. This is known to happen with the vmware and vesa drivers others might be affected. More details: http://llvm.org/bugs/show_bug.cgi?id=15086 Submitted by: dim@
Notes
Notes: svn path=/head/; revision=312583
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.xorg.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/Mk/bsd.xorg.mk b/Mk/bsd.xorg.mk
index 399eb1879032..232bce502259 100644
--- a/Mk/bsd.xorg.mk
+++ b/Mk/bsd.xorg.mk
@@ -49,6 +49,11 @@ USE_GNOME+= pkgconfig
. if ${XORG_CAT} == "driver"
USE_GNOME+= pkgconfig
USE_XORG+= xorg-server xproto randrproto xi
+# work around a llvm bug on i386, llvm bug #15806
+# reproduced with clang 3.2 (current release) and 3.1
+. if ${ARCH} == i386
+CFLAGS+= -fno-optimize-sibling-calls
+. endif
CONFIGURE_ENV+= DRIVER_MAN_SUFFIX=4x DRIVER_MAN_DIR='$$(mandir)/man4'
. if ${PORTNAME:M*input*}x != x
USE_XORG+= inputproto renderproto