pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
gcc14*: Fix LINK_LIBGCC_SPEC.
Module Name: pkgsrc-wip
Committed By: Taylor R Campbell <riastradh%NetBSD.org@localhost>
Pushed By: riastradh
Date: Mon Jan 6 13:26:34 2025 +0000
Changeset: 8ef5286399203485958017deb6976286ac2a03c7
Modified Files:
gcc14/Makefile
gcc14/Makefile.common
gcc14/distinfo
gcc14/patches/patch-gcc_Makefile.in
Log Message:
gcc14*: Fix LINK_LIBGCC_SPEC.
PR pkg/58963: gcc: LINK_LIBGCC_SPEC snafu
PR pkg/48740: lang/gcc44 to gcc46 linker fails because of whitespace
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=8ef5286399203485958017deb6976286ac2a03c7
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
gcc14/Makefile | 1 +
gcc14/Makefile.common | 16 ++++++++++++++++
gcc14/distinfo | 2 +-
gcc14/patches/patch-gcc_Makefile.in | 7 ++++---
4 files changed, 22 insertions(+), 4 deletions(-)
diffs:
diff --git a/gcc14/Makefile b/gcc14/Makefile
index 8ad9c5a038..80d65ee730 100644
--- a/gcc14/Makefile
+++ b/gcc14/Makefile
@@ -4,6 +4,7 @@ PKGNAME= ${GCC_PKGNAME}-${GCC14_DIST_VERSION}
## When bumping the PKGREVISION of this package the PKGREVISION of
## lang/gcc14-libs needs to be bumped to be at least 1 more than the
## PKGREVISION of this package!
+PKGREVISION= 1
COMMENT= The GNU Compiler Collection (GCC) - 14.0 Release Series
LANGS= c
diff --git a/gcc14/Makefile.common b/gcc14/Makefile.common
index 853225259b..7f1524bcbd 100644
--- a/gcc14/Makefile.common
+++ b/gcc14/Makefile.common
@@ -147,6 +147,22 @@ SUBST_FILES.ccs= contrib/make_sunver.pl
SUBST_SED.ccs= -e 's,/usr/ccs/bin,/usr/bin,g'
.endif
+# DO NOT REMOVE THIS SUBST. If it fails, the corruption to
+# patch-gcc_Makefile.in chronicled in PR pkg/58963 `gcc:
+# LINK_LIBGCC_SPEC snafu' <https://gnats.NetBSD.org/58963> probably got
+# replicated yet again. You must make sure that LINK_LIBGCC_SPEC is
+# appropriately set with @GCC_TARGET_MACHINE@ in patch-gcc_Makefile.in
+# or similar, or confirm with a discussion on tech-pkg@ that it is no
+# longer relevant before you remove this SUBST.
+SUBST_CLASSES+= vars
+SUBST_MESSAGE.vars= Setting target machine name path in ${SUBST_FILES.vars}
+SUBST_STAGE.vars= pre-configure
+SUBST_FILES.vars= gcc/Makefile.in
+SUBST_VARS.vars= GCC_TARGET_MACHINE
+
+GCC_TARGET_MACHINE?= ${MACHINE_GNU_PLATFORM}
+BUILD_DEFS+= GCC_TARGET_MACHINE
+
pre-configure:
${RUN} cd ${WRKSRC} && ${MKDIR} ${OBJDIR}
diff --git a/gcc14/distinfo b/gcc14/distinfo
index 48334294d7..e9ef70563f 100644
--- a/gcc14/distinfo
+++ b/gcc14/distinfo
@@ -10,7 +10,7 @@ SHA1 (patch-configure) = 7d9225f1d9f0297a8cdb19aca2e584fc67742226
SHA1 (patch-configure.ac) = d4229d5acd148959e8bfc2fd88745d7700828f72
SHA1 (patch-fixincludes_fixincl.x) = 8705769847cfecbaea393960e2894517a5a05e28
SHA1 (patch-fixincludes_inclhack.def) = 9a60dc8cbf702b374bf1e2a6c4e35009277301d9
-SHA1 (patch-gcc_Makefile.in) = c0f97c75ba1d37eae894141edd58bb36b734f651
+SHA1 (patch-gcc_Makefile.in) = a31ddc27f1092cfdf5ac896ca79c8590b5aceb47
SHA1 (patch-gcc_ada_init.c) = 2851bff6d8de6671de6f75d769522f09e1d4efa0
SHA1 (patch-gcc_builtins.cc) = 25b826dcd3553e5e5846a75bda7425eb9ef1f247
SHA1 (patch-gcc_c-family_c-attribs.cc) = a0d99cc37d3c048aa86e6d2114d0b4ab719070b7
diff --git a/gcc14/patches/patch-gcc_Makefile.in b/gcc14/patches/patch-gcc_Makefile.in
index 61ad8d9fbb..3edc9a1ab6 100644
--- a/gcc14/patches/patch-gcc_Makefile.in
+++ b/gcc14/patches/patch-gcc_Makefile.in
@@ -1,7 +1,8 @@
$NetBSD: patch-gcc_Makefile.in,v 1.1 2024/06/28 18:35:16 wiz Exp $
-Add gcc libdir to a programs rpath so that _this gcc's_ support libraries
-are found.
+Ensure libgcc from this GCC is found before others. Note that there must
+not be a whitespace between $(LINKER_RPATH_FLAG) and the path. Otherwise
+the flag may be misinterpreted by the linker (e.g. Apple ld).
--- gcc/Makefile.in.orig 2017-04-18 18:10:27.000000000 +0000
+++ gcc/Makefile.in
@@ -9,7 +10,7 @@ are found.
# Language-independent files.
DRIVER_DEFINES = \
-+ -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG) $(prefix)//lib/%M $(LINKER_RPATH_FLAG) $(libdir)/%M \"" \
++ -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG)$(prefix)/@GCC_TARGET_MACHINE@/lib/%M $(LINKER_RPATH_FLAG)$(libdir)/%M \"" \
-DSTANDARD_STARTFILE_PREFIX=\"$(unlibsubdir)/\" \
-DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \
-DSTANDARD_LIBEXEC_PREFIX=\"$(libexecdir)/gcc/\" \
Home |
Main Index |
Thread Index |
Old Index