[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with natively-built armhf bootstrap compiler
From: |
Ludovic Courtès |
Subject: |
Re: Problem with natively-built armhf bootstrap compiler |
Date: |
Fri, 02 Jan 2015 22:06:26 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Mark H Weaver <address@hidden> skribis:
> Mark H Weaver <address@hidden> writes:
>
>> I was able to natively build bootstrap tarballs on the Novena. However,
>> the compiler in these new bootstrap tarballs is broken. The problem is
>> that the new compiler driver (gcc) passes -lgcc_s when linking, but
>> libgcc_s.so does not exist in the gcc bootstrap tarball.
>
> [...]
>
>> It turns out that the "-lgcc_s" above was added just a few days after
>> we generated our last set of bootstrap tarballs, in commit a7bf595ff.
>>
>> I guess that ever since that commit, any natively-built bootstrap
>> tarballs we generated for any platform would have created a broken
>> compiler, and that this is the first time we've tried since then.
Doh!
>> Any suggestions on how best to fix this? My first crude idea is to
>> simply remove the "-lgcc_s" from %gcc-static.
>
> For now, this is the approach I took, in commit 5336e4c74.
Sounds good.
I was tempting to do something like this:
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index a7156bf..dd33a26 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -213,7 +213,7 @@ where the OS part is overloaded to denote a specific
ABI---into GCC
;; below, make sure to update the relevant code in
;; %gcc-static package as needed.
(format #f "#define GNU_USER_TARGET_LIB_SPEC \
-\"-L~a/lib %{!static:-rpath=~a/lib %{!static-libgcc:-rpath=~a/lib64
-rpath=~a/lib -lgcc_s}} \" ~a"
+\"-L~a/lib %{!static:-rpath=~a/lib %{!static-libgcc:-rpath=~a/lib64
-rpath=~a/lib %{pthread: -lgcc_s}}} \" ~a"
libc libc libdir libdir suffix))
(("#define GNU_USER_TARGET_STARTFILE_SPEC.*$" line)
(format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\"
I believe this is enough to address what the comment mentions (glibc
dlopening libgcc_s for pthread functions), but this will need testing.
WDYT?
Ludo’.
- Problem with natively-built armhf bootstrap compiler, Mark H Weaver, 2015/01/01
- Re: Problem with natively-built armhf bootstrap compiler, Mark H Weaver, 2015/01/01
- Re: Problem with natively-built armhf bootstrap compiler, Mark H Weaver, 2015/01/01
- Re: Problem with natively-built armhf bootstrap compiler,
Ludovic Courtès <=
- Re: Problem with natively-built armhf bootstrap compiler, Mark H Weaver, 2015/01/03
- Re: Problem with natively-built armhf bootstrap compiler, Ludovic Courtès, 2015/01/07
- Re: Problem with natively-built armhf bootstrap compiler, Mark H Weaver, 2015/01/07
- [PATCH] gnu: gcc-static: Remove -lgcc_s from GNU_USER_TARGET_LIB_SPEC, Mark H Weaver, 2015/01/07
- Re: [PATCH] gnu: gcc-static: Remove -lgcc_s from GNU_USER_TARGET_LIB_SPEC, Ludovic Courtès, 2015/01/07