summaryrefslogtreecommitdiff
path: root/lang/gcc-aux
diff options
context:
space:
mode:
authormarino <marino>2013-07-07 08:57:03 +0000
committermarino <marino>2013-07-07 08:57:03 +0000
commitfa86f43ec1ef14b467fbc01095e1bb1a60cd5b3a (patch)
treeabba571addb1f921b18d63ac808c23d1df22d51b /lang/gcc-aux
parentdeca0f626d42974b3491ac8640ff05f47cffb0cd (diff)
downloadpkgsrc-fa86f43ec1ef14b467fbc01095e1bb1a60cd5b3a.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