Thu Apr 2 23:42:15 2015 UTC ()
Don't include the main GCC libraries in linker paths when using
USE_PKGSRC_GCC_RUNTIME.  Fixes check-shlibs when using the GCC runtime
packages as previously the main libraries were being picked up instead
of the runtime ones we'd asked for.


(jperkin)
diff -r1.156 -r1.157 pkgsrc/mk/compiler/gcc.mk

cvs diff -r1.156 -r1.157 pkgsrc/mk/compiler/gcc.mk (expand / switch to unified diff)

--- pkgsrc/mk/compiler/gcc.mk 2015/04/02 23:21:01 1.156
+++ pkgsrc/mk/compiler/gcc.mk 2015/04/02 23:42:15 1.157
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: gcc.mk,v 1.156 2015/04/02 23:21:01 jperkin Exp $ 1# $NetBSD: gcc.mk,v 1.157 2015/04/02 23:42:15 jperkin Exp $
2# 2#
3# This is the compiler definition for the GNU Compiler Collection. 3# This is the compiler definition for the GNU Compiler Collection.
4# 4#
5# User-settable variables: 5# User-settable variables:
6# 6#
7# GCCBASE 7# GCCBASE
8# If using a native GCC and the compiler is not in $PATH then 8# If using a native GCC and the compiler is not in $PATH then
9# this should be set to the base installation directory. 9# this should be set to the base installation directory.
10# 10#
11# USE_NATIVE_GCC 11# USE_NATIVE_GCC
12# When set to "yes", the native gcc is used, no matter which 12# When set to "yes", the native gcc is used, no matter which
13# compiler version a package requires. 13# compiler version a package requires.
14# 14#
@@ -660,27 +660,30 @@ _GCC_SUBPREFIX!= \ @@ -660,27 +660,30 @@ _GCC_SUBPREFIX!= \
660_GCC_PREFIX= ${LOCALBASE}/${_GCC_SUBPREFIX} 660_GCC_PREFIX= ${LOCALBASE}/${_GCC_SUBPREFIX}
661_GCC_ARCHDIR!= \ 661_GCC_ARCHDIR!= \
662 if [ -x ${_GCC_PREFIX}bin/gcc ]; then \ 662 if [ -x ${_GCC_PREFIX}bin/gcc ]; then \
663 ${DIRNAME} `${_GCC_PREFIX}bin/gcc ${MABIFLAG} -print-libgcc-file-name 2>/dev/null`; \ 663 ${DIRNAME} `${_GCC_PREFIX}bin/gcc ${MABIFLAG} -print-libgcc-file-name 2>/dev/null`; \
664 else \ 664 else \
665 ${ECHO} "_GCC_ARCHDIR_not_found"; \ 665 ${ECHO} "_GCC_ARCHDIR_not_found"; \
666 fi 666 fi
667. if empty(_GCC_ARCHDIR:M*not_found*) 667. if empty(_GCC_ARCHDIR:M*not_found*)
668. if defined(MABIFLAG) && !empty(MABIFLAG) 668. if defined(MABIFLAG) && !empty(MABIFLAG)
669_GCC_PREFIX:= ${_GCC_ARCHDIR:H:H:H:H:H}/ 669_GCC_PREFIX:= ${_GCC_ARCHDIR:H:H:H:H:H}/
670_GCC_SUBPREFIX:= ${_GCC_ARCHDIR:H:H:H:H:H:T}/ 670_GCC_SUBPREFIX:= ${_GCC_ARCHDIR:H:H:H:H:H:T}/
671. endif 671. endif
672. endif 672. endif
673_GCC_LIBDIRS= ${_GCC_ARCHDIR} ${_GCC_PREFIX}lib 673_GCC_LIBDIRS= ${_GCC_ARCHDIR}
 674. if empty(USE_PKGSRC_GCC_RUNTIME:M[Yy][Ee][Ss])
 675_GCC_LIBDIRS+= ${_GCC_PREFIX}lib
 676. endif
674_GCC_LDFLAGS= # empty 677_GCC_LDFLAGS= # empty
675. for _dir_ in ${_GCC_LIBDIRS:N*not_found*} 678. for _dir_ in ${_GCC_LIBDIRS:N*not_found*}
676_GCC_LDFLAGS+= -L${_dir_} ${COMPILER_RPATH_FLAG}${_dir_} 679_GCC_LDFLAGS+= -L${_dir_} ${COMPILER_RPATH_FLAG}${_dir_}
677. endfor 680. endfor
678LDFLAGS+= ${_GCC_LDFLAGS} 681LDFLAGS+= ${_GCC_LDFLAGS}
679.endif 682.endif
680 683
681# Point the variables that specify the compiler to the installed 684# Point the variables that specify the compiler to the installed
682# GCC executables. 685# GCC executables.
683# 686#
684_GCC_DIR= ${WRKDIR}/.gcc 687_GCC_DIR= ${WRKDIR}/.gcc
685_GCC_VARS= # empty 688_GCC_VARS= # empty
686 689