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

Bug 473328

Summary: toolchain.eclass: needs case *-musl*) in gcc_do_configure() for cross-compiling gcc stage1
Product: Gentoo Linux Reporter: Anthony Basile <blueness>
Component: [OLD] Core systemAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    

Description Anthony Basile gentoo-dev 2013-06-15 00:05:12 UTC
Just like uClibc we need to --disable-shared during a stage1 else gcc go boom!

Simple fix:

cyan ~ # diff -Naur toolchain.eclass.orig toolchain.eclass
--- toolchain.eclass.orig	2013-06-14 23:59:39.037481104 +0000
+++ toolchain.eclass	2013-06-14 23:50:29.818450394 +0000
@@ -1147,6 +1147,10 @@
 		*-freebsd*)		 needed_libc=freebsd-lib;;
 		*-gnu*)			 needed_libc=glibc;;
 		*-klibc)		 needed_libc=klibc;;
+		*-musl*)
+			confgcc+=( --disable-shared )
+			needed_libc=musl
+			;;
 		*-uclibc*)
 			if ! echo '#include <features.h>' | \
 			   $(tc-getCPP ${CTARGET}) -E -dD - 2>/dev/null | \

@toolchain: take your time with this (and other musl bugs).  I'm going to accumulate a all of these issues and just block the tracker until a bigger picture emerges of what needs to be done to get musl integrated into Gentoo.  (It summer!  I don't teach!  I have time!)



Reproducible: Always
Comment 1 Anthony Basile gentoo-dev 2013-06-15 15:48:23 UTC
(In reply to Anthony Basile from comment #0)
> Just like uClibc we need to --disable-shared during a stage1 else gcc go
> boom!
> 
> Simple fix:
> 
> cyan ~ # diff -Naur toolchain.eclass.orig toolchain.eclass
> --- toolchain.eclass.orig	2013-06-14 23:59:39.037481104 +0000
> +++ toolchain.eclass	2013-06-14 23:50:29.818450394 +0000
> @@ -1147,6 +1147,10 @@
>  		*-freebsd*)		 needed_libc=freebsd-lib;;
>  		*-gnu*)			 needed_libc=glibc;;
>  		*-klibc)		 needed_libc=klibc;;
> +		*-musl*)
> +			confgcc+=( --disable-shared )
> +			needed_libc=musl
> +			;;
>  		*-uclibc*)
>  			if ! echo '#include <features.h>' | \


Actually I got it to work with just 

    *-musl*)    needed_libc=musl

with the default (in tree) configuration of musl.
Comment 2 SpanKY gentoo-dev 2013-06-17 02:23:44 UTC
(In reply to Anthony Basile from comment #1)

yes, hardcoding --disable-shared like that looks wrong.

http://sources.gentoo.org/eclass/toolchain.eclass?r1=1.593&r2=1.594