@ -67,7 +67,7 @@ let version = "7.3.0";
[ " - - w i t h - a s = ${ targetPackages . stdenv . cc . bintools } / b i n / ${ targetPlatform . config } - a s "
" - - w i t h - l d = ${ targetPackages . stdenv . cc . bintools } / b i n / ${ targetPlatform . config } - l d " ] ++
( if crossMingw && crossStageStatic then [
" - - w i t h - h e a d e r s = ${ libcCross } /i n c l u d e "
" - - w i t h - h e a d e r s = ${ getDev libcCross } ${ libcCross . incdir or " /i n c l u d e " } "
" - - w i t h - g c c "
" - - w i t h - g n u - a s "
" - - w i t h - g n u - l d "
@ -92,7 +92,7 @@ let version = "7.3.0";
" - - d i s a b l e - l i b m p x " # requires libc
] else [
( if crossDarwin then " - - w i t h - s y s r o o t = ${ getLib libcCross } / s h a r e / s y s r o o t "
else " - - w i t h - h e a d e r s = ${ getDev libcCross } /i n c l u d e " )
else " - - w i t h - h e a d e r s = ${ getDev libcCross } ${ libcCross . incdir or " /i n c l u d e " } " )
" - - e n a b l e - _ _ c x a _ a t e x i t "
" - - e n a b l e - l o n g - l o n g "
] ++
@ -115,11 +115,17 @@ let version = "7.3.0";
" - - d i s a b l e - l i b g o m p "
# musl at least, disable: https://git.buildroot.net/buildroot/commit/?id=873d4019f7fb00f6a80592224236b3ba7d657865
" - - d i s a b l e - l i b m p x "
] ++ [
" - - e n a b l e - t h r e a d s = p o s i x "
" - - e n a b l e - n l s "
" - - d i s a b l e - d e c i m a l - f l o a t " # No final libdecnumber (it may work only in 386)
] ) ) ;
]
++ optional ( targetPlatform . libc == " n e w l i b " ) " - - w i t h - n e w l i b "
++ optional ( targetPlatform . libc == " a v r l i b c " ) " - - w i t h - a v r l i b c "
++ [
" - - e n a b l e - t h r e a d s = ${ if targetPlatform . isUnix then " p o s i x "
else if targetPlatform . isWindows then " w i n 3 2 "
else " s i n g l e " } "
" - - e n a b l e - n l s "
# No final libdecnumber (it may work only in 386)
" - - d i s a b l e - d e c i m a l - f l o a t "
] ) ) ;
stageNameAddon = if crossStageStatic then " - s t a g e - s t a t i c " else " - s t a g e - f i n a l " ;
crossNameAddon = if targetPlatform != hostPlatform then " ${ targetPlatform . config } ${ stageNameAddon } - " else " " ;
@ -188,7 +194,12 @@ stdenv.mkDerivation ({
sed - i gcc/config/linux.h - e ' 1 i #undef LOCAL_INCLUDE_DIR'
''
)
else " " ) ;
else " " )
+ stdenv . lib . optionalString targetPlatform . isAvr ''
makeFlagsArray + = (
' LIMITS_H_TEST = false'
)
'' ;
inherit noSysDirs staticCompiler crossStageStatic
libcCross crossMingw ;
@ -267,7 +278,7 @@ stdenv.mkDerivation ({
} "
] ++
( if enableMultilib
( if ( enableMultilib || targetPlatform . isAvr )
then [ " - - e n a b l e - m u l t i l i b " " - - d i s a b l e - l i b q u a d m a t h " ]
else [ " - - d i s a b l e - m u l t i l i b " ] ) ++
optional ( ! enableShared ) " - - d i s a b l e - s h a r e d " ++
@ -334,20 +345,20 @@ stdenv.mkDerivation ({
EXTRA_TARGET_FLAGS = optionals
( targetPlatform != hostPlatform && libcCross != null )
( [
" - i d i r a f t e r ${ getDev libcCross } /i n c l u d e "
" - i d i r a f t e r ${ getDev libcCross } ${ libcCross . incdir or " /i n c l u d e " } "
] ++ optionals ( ! crossStageStatic ) [
" - B ${ libcCross . out } /l i b "
" - B ${ libcCross . out } ${ libcCross . libdir or " /l i b " } "
] ) ;
EXTRA_TARGET_LDFLAGS = optionals
( targetPlatform != hostPlatform && libcCross != null )
( [
" - W l , - L ${ libcCross . out } /l i b "
" - W l , - L ${ libcCross . out } ${ libcCross . libdir or " /l i b " } "
] ++ ( if crossStageStatic then [
" - B ${ libcCross . out } /l i b "
" - B ${ libcCross . out } ${ libcCross . libdir or " /l i b " } "
] else [
" - W l , - r p a t h , ${ libcCross . out } /l i b "
" - W l , - r p a t h - l i n k , ${ libcCross . out } /l i b "
" - W l , - r p a t h , ${ libcCross . out } ${ libcCross . libdir or " /l i b " } "
" - W l , - r p a t h - l i n k , ${ libcCross . out } ${ libcCross . libdir or " /l i b " } "
] ) ) ;
passthru =