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.diff -r1.63 -r1.64 pkgsrc/mk/platform/Darwin.mk
(bsiegert)
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Darwin.mk,v 1.63 2014/08/17 08:32:32 tron Exp $ | 1 | # $NetBSD: Darwin.mk,v 1.64 2014/11/22 16:32:13 bsiegert Exp $ | |
2 | # | 2 | # | |
3 | # Variable definitions for the Darwin operating system. | 3 | # Variable definitions for the Darwin operating system. | |
4 | 4 | |||
5 | # OS, Kernel, Xcode Version | 5 | # OS, Kernel, Xcode Version | |
6 | # | 6 | # | |
7 | # Codename OS Kernel Xcode | 7 | # Codename OS Kernel Xcode | |
8 | # Cheetah 10.0.x 1.3.1 | 8 | # Cheetah 10.0.x 1.3.1 | |
9 | # Puma 10.1 1.4.1 | 9 | # Puma 10.1 1.4.1 | |
10 | # 10.1.x 5.x.y | 10 | # 10.1.x 5.x.y | |
11 | # Jaguar 10.2.x 6.x.y | 11 | # Jaguar 10.2.x 6.x.y | |
12 | # Panther 10.3.x 7.x.y | 12 | # Panther 10.3.x 7.x.y | |
13 | # Tiger 10.4.x 8.x.y 2.x (gcc 4.0, 4.0.1 from 2.2) | 13 | # Tiger 10.4.x 8.x.y 2.x (gcc 4.0, 4.0.1 from 2.2) | |
14 | # Leopard 10.5.x 9.x.y 3.x (gcc 4.0.1, 4.0.1 and 4.2.1 from 3.1) | 14 | # Leopard 10.5.x 9.x.y 3.x (gcc 4.0.1, 4.0.1 and 4.2.1 from 3.1) | |
@@ -112,28 +112,33 @@ KRB5_DEFAULT?= mit-krb5 | @@ -112,28 +112,33 @@ KRB5_DEFAULT?= mit-krb5 | |||
112 | # | 112 | # | |
113 | # Builtin overrides. | 113 | # Builtin overrides. | |
114 | # | 114 | # | |
115 | .if !empty(OS_VERSION:M[56].*) | 115 | .if !empty(OS_VERSION:M[56].*) | |
116 | USE_BUILTIN.dl= no # Darwin-[56].* uses devel/dlcompat | 116 | USE_BUILTIN.dl= no # Darwin-[56].* uses devel/dlcompat | |
117 | .endif | 117 | .endif | |
118 | 118 | |||
119 | # Builtin defaults which make sense for this platform. | 119 | # Builtin defaults which make sense for this platform. | |
120 | _OPSYS_PREFER.linux-pam?= native | 120 | _OPSYS_PREFER.linux-pam?= native | |
121 | _OPSYS_PREFER.mit-krb5?= native | 121 | _OPSYS_PREFER.mit-krb5?= native | |
122 | 122 | |||
123 | # flags passed to the linker to extract all symbols from static archives. | 123 | # flags passed to the linker to extract all symbols from static archives. | |
124 | # this is GNU ld. | 124 | # this is GNU ld. | |
125 | .if empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*) | |||
126 | _OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,-force-load | |||
127 | _OPSYS_NO_WHOLE_ARCHIVE_FLAG= | |||
128 | .else | |||
125 | _OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,--whole-archive | 129 | _OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,--whole-archive | |
126 | _OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive | 130 | _OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive | |
131 | .endif | |||
127 | 132 | |||
128 | _OPSYS_CAN_CHECK_SHLIBS= no # can't use readelf in check/bsd.check-vars.mk | 133 | _OPSYS_CAN_CHECK_SHLIBS= no # can't use readelf in check/bsd.check-vars.mk | |
129 | 134 | |||
130 | _STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U-Wl,-x} # cc(1) option to strip | 135 | _STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U-Wl,-x} # cc(1) option to strip | |
131 | _STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U-s} # install(1) option to strip | 136 | _STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U-s} # install(1) option to strip | |
132 | 137 | |||
133 | # check for maximum command line length and set it in configure's environment, | 138 | # check for maximum command line length and set it in configure's environment, | |
134 | # to avoid a test required by the libtool script that takes forever. | 139 | # to avoid a test required by the libtool script that takes forever. | |
135 | _OPSYS_MAX_CMDLEN_CMD= /usr/sbin/sysctl -n kern.argmax | 140 | _OPSYS_MAX_CMDLEN_CMD= /usr/sbin/sysctl -n kern.argmax | |
136 | 141 | |||
137 | # Darwin 7.7.x has poll() in libc, but no poll.h. Try to help GNU | 142 | # Darwin 7.7.x has poll() in libc, but no poll.h. Try to help GNU | |
138 | # configure packages that break because of this by pretending that | 143 | # configure packages that break because of this by pretending that | |
139 | # there is no poll(). | 144 | # there is no poll(). |
@@ -1,16 +1,16 @@ | @@ -1,16 +1,16 @@ | |||
1 | # $NetBSD: Makefile,v 1.43 2014/05/16 13:13:21 ryoon Exp $ | 1 | # $NetBSD: Makefile,v 1.44 2014/11/22 16:32:13 bsiegert Exp $ | |
2 | 2 | |||
3 | PKGNAME= bootstrap-mk-files-20140516 | 3 | PKGNAME= bootstrap-mk-files-20141122 | |
4 | CATEGORIES= pkgtools | 4 | CATEGORIES= pkgtools | |
5 | 5 | |||
6 | CONFLICTS+= mk-files-[0-9]* | 6 | CONFLICTS+= mk-files-[0-9]* | |
7 | 7 | |||
8 | MAINTAINER= pkgsrc-users@NetBSD.org | 8 | MAINTAINER= pkgsrc-users@NetBSD.org | |
9 | HOMEPAGE= http://www.pkgsrc.org/ | 9 | HOMEPAGE= http://www.pkgsrc.org/ | |
10 | COMMENT= *.mk files for the bootstrap bmake utility | 10 | COMMENT= *.mk files for the bootstrap bmake utility | |
11 | 11 | |||
12 | NO_PKGTOOLS_REQD_CHECK= # defined | 12 | NO_PKGTOOLS_REQD_CHECK= # defined | |
13 | BOOTSTRAP_PKG= yes | 13 | BOOTSTRAP_PKG= yes | |
14 | 14 | |||
15 | NO_BUILD= yes | 15 | NO_BUILD= yes | |
16 | 16 |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Darwin.bsd.lib.mk,v 1.4 2013/10/25 13:53:03 jperkin Exp $ | 1 | # $NetBSD: Darwin.bsd.lib.mk,v 1.5 2014/11/22 16:32:13 bsiegert Exp $ | |
2 | # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 | 2 | # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 | |
3 | 3 | |||
4 | .if !target(__initialized__) | 4 | .if !target(__initialized__) | |
5 | __initialized__: | 5 | __initialized__: | |
6 | .if exists(${.CURDIR}/../Makefile.inc) | 6 | .if exists(${.CURDIR}/../Makefile.inc) | |
7 | .include "${.CURDIR}/../Makefile.inc" | 7 | .include "${.CURDIR}/../Makefile.inc" | |
8 | .endif | 8 | .endif | |
9 | .include <bsd.own.mk> | 9 | .include <bsd.own.mk> | |
10 | .include <bsd.obj.mk> | 10 | .include <bsd.obj.mk> | |
11 | .include <bsd.depall.mk> | 11 | .include <bsd.depall.mk> | |
12 | .MAIN: all | 12 | .MAIN: all | |
13 | .endif | 13 | .endif | |
14 | 14 | |||
@@ -360,41 +360,50 @@ CLEANFILES+= ${DPSRCS} | @@ -360,41 +360,50 @@ CLEANFILES+= ${DPSRCS} | |||
360 | .if defined(YHEADER) | 360 | .if defined(YHEADER) | |
361 | CLEANFILES+= ${SRCS:M*.y:.y=.h} | 361 | CLEANFILES+= ${SRCS:M*.y:.y=.h} | |
362 | .endif | 362 | .endif | |
363 | 363 | |||
364 | lib${LIB}.a:: ${OBJS} __archivebuild | 364 | lib${LIB}.a:: ${OBJS} __archivebuild | |
365 | @echo building standard ${LIB} library | 365 | @echo building standard ${LIB} library | |
366 | 366 | |||
367 | lib${LIB}_p.a:: ${POBJS} __archivebuild | 367 | lib${LIB}_p.a:: ${POBJS} __archivebuild | |
368 | @echo building profiled ${LIB} library | 368 | @echo building profiled ${LIB} library | |
369 | 369 | |||
370 | lib${LIB}_pic.a:: ${SOBJS} __archivebuild | 370 | lib${LIB}_pic.a:: ${SOBJS} __archivebuild | |
371 | @echo building shared object ${LIB} library | 371 | @echo building shared object ${LIB} library | |
372 | 372 | |||
373 | .if empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*) | |||
374 | _OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,-force_load | |||
375 | _OPSYS_NO_WHOLE_ARCHIVE_FLAG= | |||
376 | .else | |||
377 | _OPSYS_WHOLE_ARCHIVE_FLAG= --whole-archive | |||
378 | _OPSYS_NO_WHOLE_ARCHIVE_FLAG= --no-whole-archive | |||
379 | .endif | |||
380 | ||||
373 | lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} \ | 381 | lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} \ | |
374 | ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE} | 382 | ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE} | |
375 | @echo building shared ${LIB} library \(version ${SHLIB_FULLVERSION}\) | 383 | @echo building shared ${LIB} library \(version ${SHLIB_FULLVERSION}\) | |
376 | @rm -f lib${LIB}.so.${SHLIB_FULLVERSION} | 384 | @rm -f lib${LIB}.so.${SHLIB_FULLVERSION} | |
377 | .if defined(DESTDIR) | 385 | .if defined(DESTDIR) | |
378 | $(CC) -nostdlib -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \ | 386 | $(CC) -nostdlib -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \ | |
379 | ${SHLIB_LDSTARTFILE} \ | 387 | ${SHLIB_LDSTARTFILE} \ | |
380 | --whole-archive ${SOLIB} \ | 388 | ${_OPSYS_WHOLE_ARCHIVE_FLAG} ${SOLIB} \ | |
381 | --no-whole-archive ${LDADD} \ | 389 | ${_OPSYS_NO_WHOLE_ARCHIVE_FLAG) ${LDADD} \ | |
382 | -L${DESTDIR}${LIBDIR} -R${LIBDIR} \ | 390 | -L${DESTDIR}${LIBDIR} -R${LIBDIR} \ | |
383 | ${SHLIB_LDENDFILE} | 391 | ${SHLIB_LDENDFILE} | |
384 | .else | 392 | .else | |
385 | $(CC) -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \ | 393 | $(CC) -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \ | |
386 | ${SHLIB_LDSTARTFILE} \ | 394 | ${SHLIB_LDSTARTFILE} \ | |
387 | --whole-archive ${SOLIB} --no-whole-archive ${LDADD} \ | 395 | ${_OPSYS_WHOLE_ARCHIVE_FLAG} ${SOLIB} \ | |
396 | ${_OPSYS_NO_WHOLE_ARCHIVE_FLAG} ${LDADD} \ | |||
388 | ${SHLIB_LDENDFILE} | 397 | ${SHLIB_LDENDFILE} | |
389 | .endif | 398 | .endif | |
390 | .if ${OBJECT_FMT} == "ELF" | 399 | .if ${OBJECT_FMT} == "ELF" | |
391 | ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}.tmp | 400 | ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}.tmp | |
392 | mv -f lib${LIB}.so.${SHLIB_MAJOR}.tmp lib${LIB}.so.${SHLIB_MAJOR} | 401 | mv -f lib${LIB}.so.${SHLIB_MAJOR}.tmp lib${LIB}.so.${SHLIB_MAJOR} | |
393 | ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp | 402 | ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp | |
394 | mv -f lib${LIB}.so.tmp lib${LIB}.so | 403 | mv -f lib${LIB}.so.tmp lib${LIB}.so | |
395 | .endif | 404 | .endif | |
396 | 405 | |||
397 | .if !empty(LOBJS) | 406 | .if !empty(LOBJS) | |
398 | LLIBS?= -lc | 407 | LLIBS?= -lc | |
399 | llib-l${LIB}.ln: ${LOBJS} | 408 | llib-l${LIB}.ln: ${LOBJS} | |
400 | @echo building llib-l${LIB}.ln | 409 | @echo building llib-l${LIB}.ln |