diff options
author | marino <marino> | 2013-07-07 08:57:03 +0000 |
---|---|---|
committer | marino <marino> | 2013-07-07 08:57:03 +0000 |
commit | fa86f43ec1ef14b467fbc01095e1bb1a60cd5b3a (patch) | |
tree | abba571addb1f921b18d63ac808c23d1df22d51b /lang | |
parent | deca0f626d42974b3491ac8640ff05f47cffb0cd (diff) | |
download | pkgsrc-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')
-rw-r--r-- | lang/gcc-aux/Makefile | 7 |
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 |