diff options
author | jperkin <jperkin@pkgsrc.org> | 2018-07-11 11:21:26 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2018-07-11 11:21:26 +0000 |
commit | 6d04e7b45c166ffc86f9827f67115464a6bf4c8f (patch) | |
tree | 46b736be49b8f535db8a7cd441938711476f6b67 /lang | |
parent | 440449dc50ca3edb165113f7927cd7eb03cf82c6 (diff) | |
download | pkgsrc-6d04e7b45c166ffc86f9827f67115464a6bf4c8f.tar.gz |
gcc49-libs: Make this function correctly on Darwin.
Firstly we need to modify the copied libraries so that their install_name
matches the new location, otherwise check-shlibs thinks that they still
come from the main gcc49 package. Secondly we need to avoid the stub
libgcc_ext libraries that are used by default as we are unable to modify
their install_name, just link directly to libgcc. Bump PKGREVISION.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/gcc49-libs/Makefile | 10 | ||||
-rw-r--r-- | lang/gcc49-libs/buildlink3.mk | 10 |
2 files changed, 17 insertions, 3 deletions
diff --git a/lang/gcc49-libs/Makefile b/lang/gcc49-libs/Makefile index a013f687c47..2f4e90bb157 100644 --- a/lang/gcc49-libs/Makefile +++ b/lang/gcc49-libs/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.15 2018/04/08 06:06:13 wiz Exp $ +# $NetBSD: Makefile,v 1.16 2018/07/11 11:21:26 jperkin Exp $ GCC_PKGNAME= gcc49 .include "../../lang/${GCC_PKGNAME}/version.mk" @@ -9,7 +9,7 @@ PKGNAME= ${GCC_PKGNAME}-libs-${GCC49_DIST_VERSION} ## The PKGREVISION of this package needs to be at least 1 more than the ## PKGREVISION of the lang/gcc49 package so that with the dependence pattern ## '{gcc49,gcc49-libs}>=4.9.*' pkg_add will choose gcc49-libs over gcc49. -PKGREVISION= 7 +PKGREVISION= 8 CATEGORIES= lang MASTER_SITES= # empty @@ -60,6 +60,12 @@ do-install: ${LIBRARY_FILES} ${MKDIR} ${DESTDIR}${LIBGCC_PREFIX}/${GCC_TARGET_MACHINE}/lib cd ${LIBGCC_PREFIX} && \ ${PAX} -rw ${DESTDIR}${LIBGCC_PREFIX}/${GCC_TARGET_MACHINE} <${LIBRARY_FILES} +.if ${OPSYS} == "Darwin" + while read lib; do \ + install_name_tool -id ${LIBGCC_PREFIX}/${GCC_TARGET_MACHINE}/$${lib} \ + ${DESTDIR}${LIBGCC_PREFIX}/${GCC_TARGET_MACHINE}/$${lib}; \ + done <${LIBRARY_FILES} +.endif .include "../../mk/dlopen.buildlink3.mk" .include "../../mk/pthread.buildlink3.mk" diff --git a/lang/gcc49-libs/buildlink3.mk b/lang/gcc49-libs/buildlink3.mk index a8ea452b36c..378b14e0330 100644 --- a/lang/gcc49-libs/buildlink3.mk +++ b/lang/gcc49-libs/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.3 2018/01/01 18:16:37 rillig Exp $ +# $NetBSD: buildlink3.mk,v 1.4 2018/07/11 11:21:26 jperkin Exp $ BUILDLINK_TREE+= gcc49-libs @@ -27,9 +27,17 @@ LIBGCC_SUBPREFIX= gcc49 LIBGCC_PREFIX= ${BUILDLINK_PREFIX.gcc49-libs}/${LIBGCC_SUBPREFIX} GCC_TARGET_MACHINE?= ${MACHINE_GNU_PLATFORM} +# On Darwin we need to modify the libgcc linkage, by default it will try to +# use stub libraries which we cannot change the library name for, leading to +# check-shlibs failures as it thinks they come from the main gcc49 package. ${SPECS_LIBGCC}: @${ECHO} "*link_libgcc:" >${SPECS_LIBGCC} @${ECHO} "%D ${LINKER_RPATH_FLAG}${LIBGCC_PREFIX}/${GCC_TARGET_MACHINE}/lib/%M" >>${SPECS_LIBGCC} +. if ${OPSYS} == "Darwin" + @${ECHO} "" >>${SPECS_LIBGCC} + @${ECHO} "*libgcc:" >>${SPECS_LIBGCC} + @${ECHO} "%{static-libgcc|static: -lgcc_eh -lgcc; shared-libgcc|fexceptions|fgnu-runtime: -lgcc; : -lgcc }" >>${SPECS_LIBGCC} +. endif _WRAP_EXTRA_ARGS.CC+= -specs=${SPECS_LIBGCC} _WRAP_EXTRA_ARGS.CXX+= -specs=${SPECS_LIBGCC} |