summaryrefslogtreecommitdiff
path: root/lang/gcc-aux
diff options
context:
space:
mode:
authormarino <marino@pkgsrc.org>2013-07-07 08:57:03 +0000
committermarino <marino@pkgsrc.org>2013-07-07 08:57:03 +0000
commitb1a38021f3c3eb7abb67f4f7da6d123c8f4ebbd9 (patch)
treeabba571addb1f921b18d63ac808c23d1df22d51b /lang/gcc-aux
parent2d3d5d7d4b1b1bda55206868d7ce4a678e05dbee (diff)
downloadpkgsrc-b1a38021f3c3eb7abb67f4f7da6d123c8f4ebbd9.tar.gz
lang/gcc-aux: Fix build for PKGSRC_COMPILER=clang
The Link-Time Optimizer requires a couple of functions from the math library. For gcc, it appears there are built-in versions that satisfy the requirement, but building with clang requires an explicit linkage to libm. This additional LDFLAG may be required on all platforms when clang is used for pkgsrc, but until this is confirmed let's limit it to NetBSD. Fix tested on NetBSD 6.1 amd64 with CLANGBASE=${LOCALBASE}
Diffstat (limited to 'lang/gcc-aux')
-rw-r--r--lang/gcc-aux/Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/lang/gcc-aux/Makefile b/lang/gcc-aux/Makefile
index 2e0120106a2..e8010ea8e1a 100644
--- a/lang/gcc-aux/Makefile
+++ b/lang/gcc-aux/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2013/05/31 12:41:10 wiz Exp $
+# $NetBSD: Makefile,v 1.10 2013/07/07 08:57:03 marino Exp $
#
PKGNAME= gcc-aux-${SNAPSHOT}
@@ -72,6 +72,11 @@ LINK_HEADER= /usr/include/sys/link_elf.h
.else
NSUFF= ${OS_VERSION}
.endif
+# Special handling of clang may be required for all platforms
+# but currently this is confirmed only for NetBSD
+.if ${PKGSRC_COMPILER} == clang
+MY_CONFIGURE_ENV+= LDFLAGS=-lm
+.endif
.if ${MACHINE_ARCH} == "i386"
OS_LABEL4VERS= [NetBSD]
BOOTSTRAP_TRIPLET= i386-bootstrap-netbsdelf5.1/4.6.0