Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 448590 (PR55807)

Summary: sys-devel/gcc: support for musl
Product: Gentoo Linux Reporter: Luca Barbato <lu_zero>
Component: [OLD] Core systemAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED FIXED    
Severity: enhancement CC: ale, bugzie, gentoo, gentoo, nikoli, toast+misc, tsmksubc
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://gcc.gnu.org/PR55807
See Also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55807
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702, 571700    

Description Luca Barbato gentoo-dev 2012-12-25 20:24:12 UTC
Musl needs few patches to work with gcc. I already reported them upstream.
Comment 1 SpanKY gentoo-dev 2012-12-25 21:33:50 UTC
patches should be posted to gcc-patches@gcc.gnu.org, not their bugzilla
Comment 2 Anthony Basile gentoo-dev 2013-06-15 17:42:53 UTC
(In reply to Luca Barbato from comment #0)
> Musl needs few patches to work with gcc. I already reported them upstream.

Luca, did you ever email these patches to gcc-patches@gcc.gnu.org?  I see your last comment on the upstream bug is that you're trying to get the author to submit the patches himself.  Did he/she submit them?

There is a hacky workaround that I've been using.  And that is to make a sym link from /lib{,64}/ld-linux-x86-64.so.2 -> /usr/lib/libc.so but we should get it right.
Comment 3 David Heidelberg (okias) 2014-02-22 00:03:36 UTC
how it look these days, is upstream bug still valid? (marked as NEW)
Comment 4 Felix Janda 2015-04-23 17:06:24 UTC
First patches are going upstream:

http://gcc.gnu.org/ml/gcc-patches/2015-04/msg01068.html
Comment 5 toast+misc 2015-10-02 16:54:16 UTC
4.9.3 has been stabilized, and still seems to require patches
Comment 6 Anthony Basile gentoo-dev 2015-10-02 16:56:25 UTC
(In reply to Chloe Kudryavtsev from comment #5)
> 4.9.3 has been stabilized, and still seems to require patches

yes i will be forward porting those patches soon on the musl overlay.  as far as upstream goes, it will probably be a long wait.
Comment 7 toast+misc 2016-01-19 00:23:36 UTC
Currently, we are applying very few patches to gcc. This can cause issues, such as in #571700 (DWARF debug info mismatches).

In the case of bug 571700, the patch required is found here: https://github.com/GregorR/musl-gcc-patches/blob/master/gcc-config-musl.diff

We can see that alpine uses this patch here http://git.alpinelinux.org/cgit/aports/tree/main/gcc/202-musl-config-v3.patch .

Is there any reason we aren't using a full patch set, as we await upstream to improve the situation?
Comment 8 Anthony Basile gentoo-dev 2016-01-25 19:27:06 UTC
(In reply to Chloe Kudryavtsev from comment #7)
> Currently, we are applying very few patches to gcc. This can cause issues,
> such as in #571700 (DWARF debug info mismatches).
> 
> In the case of bug 571700, the patch required is found here:
> https://github.com/GregorR/musl-gcc-patches/blob/master/gcc-config-musl.diff
> 
> We can see that alpine uses this patch here
> http://git.alpinelinux.org/cgit/aports/tree/main/gcc/202-musl-config-v3.
> patch .
> 
> Is there any reason we aren't using a full patch set, as we await upstream
> to improve the situation?

I'm not against using GregorR's patchset, but we must merge it with ours, in particular with gcc-4.9.3-musl-linker-path.patch else it will break my stages.  If you want to propose a merged patchset for 4.9.3 we can test it and see if it works.  Then we can maintain it moving forward.
Comment 9 Andreas K. Hüttel archtester gentoo-dev 2017-12-02 17:22:06 UTC
This can probably be closed now (since musl support is in gcc-6 and later).