diff options
author | bsiegert <bsiegert@pkgsrc.org> | 2014-11-22 16:32:13 +0000 |
---|---|---|
committer | bsiegert <bsiegert@pkgsrc.org> | 2014-11-22 16:32:13 +0000 |
commit | cf3fad4c80735a15d70d66289206be28125a2877 (patch) | |
tree | cb680ee457aa9ba38dc15590a13250494c0e056a /pkgtools/bootstrap-mk-files | |
parent | b6967512cb5fca80080c68d33a86b2cde58e1de7 (diff) | |
download | pkgsrc-cf3fad4c80735a15d70d66289206be28125a2877.tar.gz |
Do not use gcc-specific compiler flags on Mac OS versions that come with
clang. Update version for bootstrap-mk-files.
Patch provided by Todd Kover in PR pkg/48966.
Diffstat (limited to 'pkgtools/bootstrap-mk-files')
-rw-r--r-- | pkgtools/bootstrap-mk-files/Makefile | 4 | ||||
-rw-r--r-- | pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.lib.mk | 17 |
2 files changed, 15 insertions, 6 deletions
diff --git a/pkgtools/bootstrap-mk-files/Makefile b/pkgtools/bootstrap-mk-files/Makefile index 5314fffe0bc..eaba144b135 100644 --- a/pkgtools/bootstrap-mk-files/Makefile +++ b/pkgtools/bootstrap-mk-files/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.43 2014/05/16 13:13:21 ryoon Exp $ +# $NetBSD: Makefile,v 1.44 2014/11/22 16:32:13 bsiegert Exp $ -PKGNAME= bootstrap-mk-files-20140516 +PKGNAME= bootstrap-mk-files-20141122 CATEGORIES= pkgtools CONFLICTS+= mk-files-[0-9]* diff --git a/pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.lib.mk b/pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.lib.mk index 723d4ef1dd9..cd055da338d 100644 --- a/pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.lib.mk +++ b/pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.lib.mk @@ -1,4 +1,4 @@ -# $NetBSD: Darwin.bsd.lib.mk,v 1.4 2013/10/25 13:53:03 jperkin Exp $ +# $NetBSD: Darwin.bsd.lib.mk,v 1.5 2014/11/22 16:32:13 bsiegert Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .if !target(__initialized__) @@ -370,6 +370,14 @@ lib${LIB}_p.a:: ${POBJS} __archivebuild lib${LIB}_pic.a:: ${SOBJS} __archivebuild @echo building shared object ${LIB} library +.if empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*) +_OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,-force_load +_OPSYS_NO_WHOLE_ARCHIVE_FLAG= +.else +_OPSYS_WHOLE_ARCHIVE_FLAG= --whole-archive +_OPSYS_NO_WHOLE_ARCHIVE_FLAG= --no-whole-archive +.endif + lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} \ ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE} @echo building shared ${LIB} library \(version ${SHLIB_FULLVERSION}\) @@ -377,14 +385,15 @@ lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} \ .if defined(DESTDIR) $(CC) -nostdlib -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \ ${SHLIB_LDSTARTFILE} \ - --whole-archive ${SOLIB} \ - --no-whole-archive ${LDADD} \ + ${_OPSYS_WHOLE_ARCHIVE_FLAG} ${SOLIB} \ + ${_OPSYS_NO_WHOLE_ARCHIVE_FLAG) ${LDADD} \ -L${DESTDIR}${LIBDIR} -R${LIBDIR} \ ${SHLIB_LDENDFILE} .else $(CC) -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \ ${SHLIB_LDSTARTFILE} \ - --whole-archive ${SOLIB} --no-whole-archive ${LDADD} \ + ${_OPSYS_WHOLE_ARCHIVE_FLAG} ${SOLIB} \ + ${_OPSYS_NO_WHOLE_ARCHIVE_FLAG} ${LDADD} \ ${SHLIB_LDENDFILE} .endif .if ${OBJECT_FMT} == "ELF" |