pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/gcc-aux lang/gcc-aux: Fix build for PKGSRC_COMPIL...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f97d4cde1bca
branches:  trunk
changeset: 621299:f97d4cde1bca
user:      marino <marino%pkgsrc.org@localhost>
date:      Sun Jul 07 08:57:03 2013 +0000

description:
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:

 lang/gcc-aux/Makefile |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r 0d5d56c8a886 -r f97d4cde1bca lang/gcc-aux/Makefile
--- a/lang/gcc-aux/Makefile     Sun Jul 07 08:15:17 2013 +0000
+++ b/lang/gcc-aux/Makefile     Sun Jul 07 08:57:03 2013 +0000
@@ -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 @@
 .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



Home | Main Index | Thread Index | Old Index