pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc Do not use gcc-specific compiler flags on Mac OS versi...
details: https://anonhg.NetBSD.org/pkgsrc/rev/e980cf4be196
branches: trunk
changeset: 641994:e980cf4be196
user: bsiegert <bsiegert%pkgsrc.org@localhost>
date: Sat Nov 22 16:32:13 2014 +0000
description:
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:
mk/platform/Darwin.mk | 7 +++++-
pkgtools/bootstrap-mk-files/Makefile | 4 +-
pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.lib.mk | 17 ++++++++++++---
3 files changed, 21 insertions(+), 7 deletions(-)
diffs (78 lines):
diff -r 2110cd80d24d -r e980cf4be196 mk/platform/Darwin.mk
--- a/mk/platform/Darwin.mk Sat Nov 22 16:02:41 2014 +0000
+++ b/mk/platform/Darwin.mk Sat Nov 22 16:32:13 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Darwin.mk,v 1.63 2014/08/17 08:32:32 tron Exp $
+# $NetBSD: Darwin.mk,v 1.64 2014/11/22 16:32:13 bsiegert Exp $
#
# Variable definitions for the Darwin operating system.
@@ -122,8 +122,13 @@
# flags passed to the linker to extract all symbols from static archives.
# this is GNU ld.
+.if empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*)
+_OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,-force-load
+_OPSYS_NO_WHOLE_ARCHIVE_FLAG=
+.else
_OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,--whole-archive
_OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive
+.endif
_OPSYS_CAN_CHECK_SHLIBS= no # can't use readelf in check/bsd.check-vars.mk
diff -r 2110cd80d24d -r e980cf4be196 pkgtools/bootstrap-mk-files/Makefile
--- a/pkgtools/bootstrap-mk-files/Makefile Sat Nov 22 16:02:41 2014 +0000
+++ b/pkgtools/bootstrap-mk-files/Makefile Sat Nov 22 16:32:13 2014 +0000
@@ -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 -r 2110cd80d24d -r e980cf4be196 pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.lib.mk
--- a/pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.lib.mk Sat Nov 22 16:02:41 2014 +0000
+++ b/pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.lib.mk Sat Nov 22 16:32:13 2014 +0000
@@ -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}_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 @@
.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"
Home |
Main Index |
Thread Index |
Old Index