| @@ -1,41 +1,40 @@ | | | @@ -1,41 +1,40 @@ |
1 | # $NetBSD: Makefile,v 1.7 2023/10/20 10:37:32 jperkin Exp $ | | 1 | # $NetBSD: Makefile,v 1.8 2023/11/27 14:45:40 jperkin Exp $ |
2 | | | 2 | |
3 | PKGNAME= ${GCC_PKGNAME}-${GCC12_DIST_VERSION} | | 3 | PKGNAME= ${GCC_PKGNAME}-${GCC12_DIST_VERSION} |
4 | ## When bumping the PKGREVISION of this package the PKGREVISION of | | 4 | ## When bumping the PKGREVISION of this package the PKGREVISION of |
5 | ## lang/gcc12-libs needs to be bumped to be at least 1 more than the | | 5 | ## lang/gcc12-libs needs to be bumped to be at least 1 more than the |
6 | ## PKGREVISION of this package! | | 6 | ## PKGREVISION of this package! |
7 | COMMENT= The GNU Compiler Collection (GCC) - 12.0 Release Series | | 7 | COMMENT= The GNU Compiler Collection (GCC) - 12.0 Release Series |
8 | | | 8 | |
9 | LANGS= c | | 9 | LANGS= c |
10 | | | 10 | |
11 | .include "Makefile.common" | | 11 | .include "Makefile.common" |
12 | | | 12 | |
13 | # In some cases LINKER_RPATH_FLAG needs a trailing space. | | 13 | # In some cases LINKER_RPATH_FLAG needs a trailing space. |
14 | LINKER_RPATH_FLAG:= ${LINKER_RPATH_FLAG:S/-rpath/& /} | | 14 | LINKER_RPATH_FLAG:= ${LINKER_RPATH_FLAG:S/-rpath/& /} |
15 | | | 15 | |
16 | ## The Library rpath to use in end programs. | | 16 | LDFLAGS_FOR_TARGET= ${LDFLAGS:M-Wl,-z*} |
17 | LDFLAGS_FOR_TARGET= ${LDFLAGS:M${COMPILER_RPATH_FLAG}*:N*/usr/lib*} ${LDFLAGS:M-Wl,-z*} | | | |
18 | | | 17 | |
19 | # The "-static-libstdc++ -static-libgcc" flags are normally added to the | | 18 | # The "-static-libstdc++ -static-libgcc" flags are normally added to the |
20 | # boot-ldflags by configure but because we are supply the boot-ldflags | | 19 | # boot-ldflags by configure but because we are supply the boot-ldflags |
21 | # we mash supply them. | | 20 | # we mash supply them. |
22 | BOOT_LDFLAGS= -static-libstdc++ -static-libgcc ${LDFLAGS_FOR_TARGET} | | 21 | BOOT_LDFLAGS= -static-libstdc++ -static-libgcc ${LDFLAGS_FOR_TARGET} |
23 | # Needed on Darwin when LDFLAGS point to a SDK | | 22 | # Needed on Darwin when LDFLAGS point to a SDK |
24 | BOOT_LDFLAGS+= ${LDFLAGS:M-Wl,-syslibroot*} | | 23 | BOOT_LDFLAGS+= ${LDFLAGS:M-Wl,-syslibroot*} |
25 | # GCC does not understand this option; remove it, or stage build will fail | | 24 | # GCC does not understand this option; remove it, or stage build will fail |
26 | BUILDLINK_TRANSFORM+= rm:-stdlib=libc++ | | 25 | BUILDLINK_TRANSFORM+= rm:-stdlib=libc++ |
27 | | | 26 | |
28 | #Â Work around ld bug in Xcode 15 | | 27 | # Work around ld bug in Xcode 15 |
29 | .if ${OPSYS} == "Darwin" && ${CC_VERSION:Mclang-15.*} | | 28 | .if ${OPSYS} == "Darwin" && ${CC_VERSION:Mclang-15.*} |
30 | LDFLAGS_FOR_TARGET+= -Wl,-ld_classic | | 29 | LDFLAGS_FOR_TARGET+= -Wl,-ld_classic |
31 | .endif | | 30 | .endif |
32 | | | 31 | |
33 | # Disable fixincludes on SmartOS, header changes result in broken includes | | 32 | # Disable fixincludes on SmartOS, header changes result in broken includes |
34 | # being generated, see https://github.com/joyent/pkgsrc-legacy/issues/270 | | 33 | # being generated, see https://github.com/joyent/pkgsrc-legacy/issues/270 |
35 | .if ${OS_VARIANT} == "SmartOS" | | 34 | .if ${OS_VARIANT} == "SmartOS" |
36 | SUBST_CLASSES+= fixinc | | 35 | SUBST_CLASSES+= fixinc |
37 | SUBST_STAGE.fixinc= pre-configure | | 36 | SUBST_STAGE.fixinc= pre-configure |
38 | SUBST_FILES.fixinc= gcc/Makefile.in | | 37 | SUBST_FILES.fixinc= gcc/Makefile.in |
39 | SUBST_SED.fixinc= -e "s,\./fixinc.sh,-c true," | | 38 | SUBST_SED.fixinc= -e "s,\./fixinc.sh,-c true," |
40 | .endif | | 39 | .endif |
41 | | | 40 | |