gnu: gcc-4.7: Fix slash in startfile prefix.

These prefixes must have a trailing slash.  When this slash is
omitted, gcc fails to find ?crt*.o files when LIBRARY_PATH is not set.

Fixes #75483, see <https://issues.guix.gnu.org/75483>.

* gnu/packages/gcc.scm (gcc-4.7): Fix replaced startfile prefix.
[arguments]: <#:phases>: Fix it.

Change-Id: I1988e0bf98b0002e83e0c0233310d05b72644ac9
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Leo Nikkilä 2025-01-11 03:43:57 +02:00 committed by Andreas Enge
parent aa1356f400
commit 24f0d5d1ee
No known key found for this signature in database
GPG key ID: F7D5C9BF765C61E3

View file

@ -315,7 +315,7 @@ exec \"$@\" \
\"-L~a/lib %{!static:-rpath=~a/lib %{!static-libgcc:-rpath=~a/lib -lgcc_s}} \" ~a"
libc libc libdir suffix))
(("#define GNU_USER_TARGET_STARTFILE_SPEC.*$" line)
(format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\"
(format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib/\"
#define STANDARD_STARTFILE_PREFIX_2 \"\"
~a"
libc line)))
@ -329,7 +329,7 @@ exec \"$@\" \
\"-L~a/lib %{!static:-rpath=~a/lib %{!static-libgcc:-rpath=~a/lib -lgcc_s}} \" ~a"
libc libc libdir suffix))
(("#define STARTFILE_LINUX_SPEC.*$" line)
(format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\"
(format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib/\"
#define STANDARD_STARTFILE_PREFIX_2 \"\"
~a"
libc line))))