gcc: Clean up cross configure flags and name prefix
This commit is contained in:
parent
3098d65210
commit
ca341c2d5b
@ -101,20 +101,7 @@ let version = "4.8.5";
|
|||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||||
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||||
(if crossMingw && crossStageStatic then [
|
(if crossStageStatic then [
|
||||||
"--with-headers=${libcCross}/include"
|
|
||||||
"--with-gcc"
|
|
||||||
"--with-gnu-as"
|
|
||||||
"--with-gnu-ld"
|
|
||||||
"--with-gnu-ld"
|
|
||||||
"--disable-shared"
|
|
||||||
"--disable-nls"
|
|
||||||
"--disable-debug"
|
|
||||||
"--enable-sjlj-exceptions"
|
|
||||||
"--enable-threads=win32"
|
|
||||||
"--disable-win32-registry"
|
|
||||||
"--disable-libmpx" # requires libc
|
|
||||||
] else if crossStageStatic then [
|
|
||||||
"--disable-libssp"
|
"--disable-libssp"
|
||||||
"--disable-nls"
|
"--disable-nls"
|
||||||
"--without-headers"
|
"--without-headers"
|
||||||
@ -125,14 +112,35 @@ let version = "4.8.5";
|
|||||||
"--disable-libatomic" # requires libc
|
"--disable-libatomic" # requires libc
|
||||||
"--disable-decimal-float" # requires libc
|
"--disable-decimal-float" # requires libc
|
||||||
"--disable-libmpx" # requires libc
|
"--disable-libmpx" # requires libc
|
||||||
|
] ++ optionals crossMingw [
|
||||||
|
"--with-headers=${libcCross}/include"
|
||||||
|
"--with-gcc"
|
||||||
|
"--with-gnu-as"
|
||||||
|
"--with-gnu-ld"
|
||||||
|
"--disable-debug"
|
||||||
|
"--enable-sjlj-exceptions"
|
||||||
|
"--disable-win32-registry"
|
||||||
] else [
|
] else [
|
||||||
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
||||||
else "--with-headers=${getDev libcCross}${libcCross.incdir or "/include"}")
|
else "--with-headers=${getDev libcCross}${libcCross.incdir or "/include"}")
|
||||||
"--enable-__cxa_atexit"
|
"--enable-__cxa_atexit"
|
||||||
"--enable-long-long"
|
"--enable-long-long"
|
||||||
] ++
|
"--enable-threads=${if targetPlatform.isUnix then "posix"
|
||||||
(if crossMingw then [
|
else if targetPlatform.isWindows then "win32"
|
||||||
"--enable-threads=win32"
|
else "single"}"
|
||||||
|
"--enable-nls"
|
||||||
|
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
||||||
|
] ++ optionals (targetPlatform.libc == "uclibc" || targetPlatform.libc == "musl") [
|
||||||
|
# libsanitizer requires netrom/netrom.h which is not
|
||||||
|
# available in uclibc.
|
||||||
|
"--disable-libsanitizer"
|
||||||
|
# In uclibc cases, libgomp needs an additional '-ldl'
|
||||||
|
# and as I don't know how to pass it, I disable libgomp.
|
||||||
|
"--disable-libgomp"
|
||||||
|
] ++ optionals (targetPlatform.libc == "musl") [
|
||||||
|
# musl at least, disable: https://git.buildroot.net/buildroot/commit/?id=873d4019f7fb00f6a80592224236b3ba7d657865
|
||||||
|
"--disable-libmpx"
|
||||||
|
] ++ optionals crossMingw [
|
||||||
"--enable-sjlj-exceptions"
|
"--enable-sjlj-exceptions"
|
||||||
"--enable-hash-synchronization"
|
"--enable-hash-synchronization"
|
||||||
"--enable-libssp"
|
"--enable-libssp"
|
||||||
@ -140,23 +148,11 @@ let version = "4.8.5";
|
|||||||
"--with-dwarf2"
|
"--with-dwarf2"
|
||||||
# To keep ABI compatibility with upstream mingw-w64
|
# To keep ABI compatibility with upstream mingw-w64
|
||||||
"--enable-fully-dynamic-string"
|
"--enable-fully-dynamic-string"
|
||||||
] else
|
] ++ optional (targetPlatform.libc == "newlib") "--with-newlib"
|
||||||
optionals (targetPlatform.libc == "uclibc" || targetPlatform.libc == "musl") [
|
|
||||||
# In uclibc cases, libgomp needs an additional '-ldl'
|
|
||||||
# and as I don't know how to pass it, I disable libgomp.
|
|
||||||
"--disable-libgomp"
|
|
||||||
]
|
|
||||||
++ optional (targetPlatform.libc == "newlib") "--with-newlib"
|
|
||||||
++ optional (targetPlatform.libc == "avrlibc") "--with-avrlibc"
|
++ optional (targetPlatform.libc == "avrlibc") "--with-avrlibc"
|
||||||
++ [
|
);
|
||||||
"--enable-threads=${if targetPlatform.isUnix then "posix"
|
|
||||||
else if targetPlatform.isWindows then "win32"
|
|
||||||
else "single"}"
|
|
||||||
"--enable-nls"
|
|
||||||
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
|
||||||
]));
|
|
||||||
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
||||||
crossNameAddon = if targetPlatform != hostPlatform then "${targetPlatform.config}${stageNameAddon}-" else "";
|
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||||
|
|
||||||
bootstrap = targetPlatform == hostPlatform;
|
bootstrap = targetPlatform == hostPlatform;
|
||||||
|
|
||||||
|
@ -106,20 +106,7 @@ let version = "4.9.4";
|
|||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||||
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||||
(if crossMingw && crossStageStatic then [
|
(if crossStageStatic then [
|
||||||
"--with-headers=${libcCross}/include"
|
|
||||||
"--with-gcc"
|
|
||||||
"--with-gnu-as"
|
|
||||||
"--with-gnu-ld"
|
|
||||||
"--with-gnu-ld"
|
|
||||||
"--disable-shared"
|
|
||||||
"--disable-nls"
|
|
||||||
"--disable-debug"
|
|
||||||
"--enable-sjlj-exceptions"
|
|
||||||
"--enable-threads=win32"
|
|
||||||
"--disable-win32-registry"
|
|
||||||
"--disable-libmpx" # requires libc
|
|
||||||
] else if crossStageStatic then [
|
|
||||||
"--disable-libssp"
|
"--disable-libssp"
|
||||||
"--disable-nls"
|
"--disable-nls"
|
||||||
"--without-headers"
|
"--without-headers"
|
||||||
@ -130,14 +117,35 @@ let version = "4.9.4";
|
|||||||
"--disable-libatomic" # requires libc
|
"--disable-libatomic" # requires libc
|
||||||
"--disable-decimal-float" # requires libc
|
"--disable-decimal-float" # requires libc
|
||||||
"--disable-libmpx" # requires libc
|
"--disable-libmpx" # requires libc
|
||||||
|
] ++ optionals crossMingw [
|
||||||
|
"--with-headers=${libcCross}/include"
|
||||||
|
"--with-gcc"
|
||||||
|
"--with-gnu-as"
|
||||||
|
"--with-gnu-ld"
|
||||||
|
"--disable-debug"
|
||||||
|
"--enable-sjlj-exceptions"
|
||||||
|
"--disable-win32-registry"
|
||||||
] else [
|
] else [
|
||||||
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
||||||
else "--with-headers=${getDev libcCross}${libcCross.incdir or "/include"}")
|
else "--with-headers=${getDev libcCross}${libcCross.incdir or "/include"}")
|
||||||
"--enable-__cxa_atexit"
|
"--enable-__cxa_atexit"
|
||||||
"--enable-long-long"
|
"--enable-long-long"
|
||||||
] ++
|
"--enable-threads=${if targetPlatform.isUnix then "posix"
|
||||||
(if crossMingw then [
|
else if targetPlatform.isWindows then "win32"
|
||||||
"--enable-threads=win32"
|
else "single"}"
|
||||||
|
"--enable-nls"
|
||||||
|
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
||||||
|
] ++ optionals (targetPlatform.libc == "uclibc" || targetPlatform.libc == "musl") [
|
||||||
|
# libsanitizer requires netrom/netrom.h which is not
|
||||||
|
# available in uclibc.
|
||||||
|
"--disable-libsanitizer"
|
||||||
|
# In uclibc cases, libgomp needs an additional '-ldl'
|
||||||
|
# and as I don't know how to pass it, I disable libgomp.
|
||||||
|
"--disable-libgomp"
|
||||||
|
] ++ optionals (targetPlatform.libc == "musl") [
|
||||||
|
# musl at least, disable: https://git.buildroot.net/buildroot/commit/?id=873d4019f7fb00f6a80592224236b3ba7d657865
|
||||||
|
"--disable-libmpx"
|
||||||
|
] ++ optionals crossMingw [
|
||||||
"--enable-sjlj-exceptions"
|
"--enable-sjlj-exceptions"
|
||||||
"--enable-hash-synchronization"
|
"--enable-hash-synchronization"
|
||||||
"--enable-libssp"
|
"--enable-libssp"
|
||||||
@ -145,26 +153,11 @@ let version = "4.9.4";
|
|||||||
"--with-dwarf2"
|
"--with-dwarf2"
|
||||||
# To keep ABI compatibility with upstream mingw-w64
|
# To keep ABI compatibility with upstream mingw-w64
|
||||||
"--enable-fully-dynamic-string"
|
"--enable-fully-dynamic-string"
|
||||||
] else
|
] ++ optional (targetPlatform.libc == "newlib") "--with-newlib"
|
||||||
optionals (targetPlatform.libc == "uclibc" || targetPlatform.libc == "musl") [
|
|
||||||
# libsanitizer requires netrom/netrom.h which is not
|
|
||||||
# available in uclibc.
|
|
||||||
"--disable-libsanitizer"
|
|
||||||
# In uclibc cases, libgomp needs an additional '-ldl'
|
|
||||||
# and as I don't know how to pass it, I disable libgomp.
|
|
||||||
"--disable-libgomp"
|
|
||||||
]
|
|
||||||
++ optional (targetPlatform.libc == "newlib") "--with-newlib"
|
|
||||||
++ optional (targetPlatform.libc == "avrlibc") "--with-avrlibc"
|
++ optional (targetPlatform.libc == "avrlibc") "--with-avrlibc"
|
||||||
++ [
|
);
|
||||||
"--enable-threads=${if targetPlatform.isUnix then "posix"
|
|
||||||
else if targetPlatform.isWindows then "win32"
|
|
||||||
else "single"}"
|
|
||||||
"--enable-nls"
|
|
||||||
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
|
||||||
]));
|
|
||||||
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
||||||
crossNameAddon = if targetPlatform != hostPlatform then "${targetPlatform.config}${stageNameAddon}-" else "";
|
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||||
|
|
||||||
bootstrap = targetPlatform == hostPlatform;
|
bootstrap = targetPlatform == hostPlatform;
|
||||||
|
|
||||||
|
@ -93,20 +93,7 @@ let version = "5.5.0";
|
|||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||||
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||||
(if crossMingw && crossStageStatic then [
|
(if crossStageStatic then [
|
||||||
"--with-headers=${libcCross}/include"
|
|
||||||
"--with-gcc"
|
|
||||||
"--with-gnu-as"
|
|
||||||
"--with-gnu-ld"
|
|
||||||
"--with-gnu-ld"
|
|
||||||
"--disable-shared"
|
|
||||||
"--disable-nls"
|
|
||||||
"--disable-debug"
|
|
||||||
"--enable-sjlj-exceptions"
|
|
||||||
"--enable-threads=win32"
|
|
||||||
"--disable-win32-registry"
|
|
||||||
"--disable-libmpx" # requires libc
|
|
||||||
] else if crossStageStatic then [
|
|
||||||
"--disable-libssp"
|
"--disable-libssp"
|
||||||
"--disable-nls"
|
"--disable-nls"
|
||||||
"--without-headers"
|
"--without-headers"
|
||||||
@ -117,14 +104,35 @@ let version = "5.5.0";
|
|||||||
"--disable-libatomic" # requires libc
|
"--disable-libatomic" # requires libc
|
||||||
"--disable-decimal-float" # requires libc
|
"--disable-decimal-float" # requires libc
|
||||||
"--disable-libmpx" # requires libc
|
"--disable-libmpx" # requires libc
|
||||||
|
] ++ optionals crossMingw [
|
||||||
|
"--with-headers=${libcCross}/include"
|
||||||
|
"--with-gcc"
|
||||||
|
"--with-gnu-as"
|
||||||
|
"--with-gnu-ld"
|
||||||
|
"--disable-debug"
|
||||||
|
"--enable-sjlj-exceptions"
|
||||||
|
"--disable-win32-registry"
|
||||||
] else [
|
] else [
|
||||||
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
||||||
else "--with-headers=${getDev libcCross}${libcCross.incdir or "/include"}")
|
else "--with-headers=${getDev libcCross}${libcCross.incdir or "/include"}")
|
||||||
"--enable-__cxa_atexit"
|
"--enable-__cxa_atexit"
|
||||||
"--enable-long-long"
|
"--enable-long-long"
|
||||||
] ++
|
"--enable-threads=${if targetPlatform.isUnix then "posix"
|
||||||
(if crossMingw then [
|
else if targetPlatform.isWindows then "win32"
|
||||||
"--enable-threads=win32"
|
else "single"}"
|
||||||
|
"--enable-nls"
|
||||||
|
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
||||||
|
] ++ optionals (targetPlatform.libc == "uclibc" || targetPlatform.libc == "musl") [
|
||||||
|
# libsanitizer requires netrom/netrom.h which is not
|
||||||
|
# available in uclibc.
|
||||||
|
"--disable-libsanitizer"
|
||||||
|
# In uclibc cases, libgomp needs an additional '-ldl'
|
||||||
|
# and as I don't know how to pass it, I disable libgomp.
|
||||||
|
"--disable-libgomp"
|
||||||
|
] ++ optionals (targetPlatform.libc == "musl") [
|
||||||
|
# musl at least, disable: https://git.buildroot.net/buildroot/commit/?id=873d4019f7fb00f6a80592224236b3ba7d657865
|
||||||
|
"--disable-libmpx"
|
||||||
|
] ++ optionals crossMingw [
|
||||||
"--enable-sjlj-exceptions"
|
"--enable-sjlj-exceptions"
|
||||||
"--enable-hash-synchronization"
|
"--enable-hash-synchronization"
|
||||||
"--enable-libssp"
|
"--enable-libssp"
|
||||||
@ -132,26 +140,11 @@ let version = "5.5.0";
|
|||||||
"--with-dwarf2"
|
"--with-dwarf2"
|
||||||
# To keep ABI compatibility with upstream mingw-w64
|
# To keep ABI compatibility with upstream mingw-w64
|
||||||
"--enable-fully-dynamic-string"
|
"--enable-fully-dynamic-string"
|
||||||
] else
|
] ++ optional (targetPlatform.libc == "newlib") "--with-newlib"
|
||||||
optionals (targetPlatform.libc == "uclibc" || targetPlatform.libc == "musl") [
|
|
||||||
# libsanitizer requires netrom/netrom.h which is not
|
|
||||||
# available in uclibc.
|
|
||||||
"--disable-libsanitizer"
|
|
||||||
# In uclibc cases, libgomp needs an additional '-ldl'
|
|
||||||
# and as I don't know how to pass it, I disable libgomp.
|
|
||||||
"--disable-libgomp"
|
|
||||||
]
|
|
||||||
++ optional (targetPlatform.libc == "newlib") "--with-newlib"
|
|
||||||
++ optional (targetPlatform.libc == "avrlibc") "--with-avrlibc"
|
++ optional (targetPlatform.libc == "avrlibc") "--with-avrlibc"
|
||||||
++ [
|
);
|
||||||
"--enable-threads=${if targetPlatform.isUnix then "posix"
|
|
||||||
else if targetPlatform.isWindows then "win32"
|
|
||||||
else "single"}"
|
|
||||||
"--enable-nls"
|
|
||||||
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
|
||||||
]));
|
|
||||||
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
||||||
crossNameAddon = if targetPlatform != hostPlatform then "${targetPlatform.config}${stageNameAddon}-" else "";
|
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||||
|
|
||||||
bootstrap = targetPlatform == hostPlatform;
|
bootstrap = targetPlatform == hostPlatform;
|
||||||
|
|
||||||
|
@ -90,20 +90,7 @@ let version = "6.5.0";
|
|||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||||
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||||
(if crossMingw && crossStageStatic then [
|
(if crossStageStatic then [
|
||||||
"--with-headers=${libcCross}/include"
|
|
||||||
"--with-gcc"
|
|
||||||
"--with-gnu-as"
|
|
||||||
"--with-gnu-ld"
|
|
||||||
"--with-gnu-ld"
|
|
||||||
"--disable-shared"
|
|
||||||
"--disable-nls"
|
|
||||||
"--disable-debug"
|
|
||||||
"--enable-sjlj-exceptions"
|
|
||||||
"--enable-threads=win32"
|
|
||||||
"--disable-win32-registry"
|
|
||||||
"--disable-libmpx" # requires libc
|
|
||||||
] else if crossStageStatic then [
|
|
||||||
"--disable-libssp"
|
"--disable-libssp"
|
||||||
"--disable-nls"
|
"--disable-nls"
|
||||||
"--without-headers"
|
"--without-headers"
|
||||||
@ -114,14 +101,35 @@ let version = "6.5.0";
|
|||||||
"--disable-libatomic" # requires libc
|
"--disable-libatomic" # requires libc
|
||||||
"--disable-decimal-float" # requires libc
|
"--disable-decimal-float" # requires libc
|
||||||
"--disable-libmpx" # requires libc
|
"--disable-libmpx" # requires libc
|
||||||
|
] ++ optionals crossMingw [
|
||||||
|
"--with-headers=${libcCross}/include"
|
||||||
|
"--with-gcc"
|
||||||
|
"--with-gnu-as"
|
||||||
|
"--with-gnu-ld"
|
||||||
|
"--disable-debug"
|
||||||
|
"--enable-sjlj-exceptions"
|
||||||
|
"--disable-win32-registry"
|
||||||
] else [
|
] else [
|
||||||
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
||||||
else "--with-headers=${getDev libcCross}${libcCross.incdir or "/include"}")
|
else "--with-headers=${getDev libcCross}${libcCross.incdir or "/include"}")
|
||||||
"--enable-__cxa_atexit"
|
"--enable-__cxa_atexit"
|
||||||
"--enable-long-long"
|
"--enable-long-long"
|
||||||
] ++
|
"--enable-threads=${if targetPlatform.isUnix then "posix"
|
||||||
(if crossMingw then [
|
else if targetPlatform.isWindows then "win32"
|
||||||
"--enable-threads=win32"
|
else "single"}"
|
||||||
|
"--enable-nls"
|
||||||
|
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
||||||
|
] ++ optionals (targetPlatform.libc == "uclibc" || targetPlatform.libc == "musl") [
|
||||||
|
# libsanitizer requires netrom/netrom.h which is not
|
||||||
|
# available in uclibc.
|
||||||
|
"--disable-libsanitizer"
|
||||||
|
# In uclibc cases, libgomp needs an additional '-ldl'
|
||||||
|
# and as I don't know how to pass it, I disable libgomp.
|
||||||
|
"--disable-libgomp"
|
||||||
|
] ++ optionals (targetPlatform.libc == "musl") [
|
||||||
|
# musl at least, disable: https://git.buildroot.net/buildroot/commit/?id=873d4019f7fb00f6a80592224236b3ba7d657865
|
||||||
|
"--disable-libmpx"
|
||||||
|
] ++ optionals crossMingw [
|
||||||
"--enable-sjlj-exceptions"
|
"--enable-sjlj-exceptions"
|
||||||
"--enable-hash-synchronization"
|
"--enable-hash-synchronization"
|
||||||
"--enable-libssp"
|
"--enable-libssp"
|
||||||
@ -129,28 +137,11 @@ let version = "6.5.0";
|
|||||||
"--with-dwarf2"
|
"--with-dwarf2"
|
||||||
# To keep ABI compatibility with upstream mingw-w64
|
# To keep ABI compatibility with upstream mingw-w64
|
||||||
"--enable-fully-dynamic-string"
|
"--enable-fully-dynamic-string"
|
||||||
] else
|
] ++ optional (targetPlatform.libc == "newlib") "--with-newlib"
|
||||||
optionals (targetPlatform.libc == "uclibc" || targetPlatform.libc == "musl") [
|
|
||||||
# libsanitizer requires netrom/netrom.h which is not
|
|
||||||
# available in uclibc.
|
|
||||||
"--disable-libsanitizer"
|
|
||||||
# In uclibc cases, libgomp needs an additional '-ldl'
|
|
||||||
# and as I don't know how to pass it, I disable libgomp.
|
|
||||||
"--disable-libgomp"
|
|
||||||
# musl at least, disable: https://git.buildroot.net/buildroot/commit/?id=873d4019f7fb00f6a80592224236b3ba7d657865
|
|
||||||
"--disable-libmpx"
|
|
||||||
]
|
|
||||||
++ optional (targetPlatform.libc == "newlib") "--with-newlib"
|
|
||||||
++ optional (targetPlatform.libc == "avrlibc") "--with-avrlibc"
|
++ optional (targetPlatform.libc == "avrlibc") "--with-avrlibc"
|
||||||
++ [
|
);
|
||||||
"--enable-threads=${if targetPlatform.isUnix then "posix"
|
|
||||||
else if targetPlatform.isWindows then "win32"
|
|
||||||
else "single"}"
|
|
||||||
"--enable-nls"
|
|
||||||
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
|
||||||
]));
|
|
||||||
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
||||||
crossNameAddon = if targetPlatform != hostPlatform then "${targetPlatform.config}${stageNameAddon}-" else "";
|
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||||
|
|
||||||
bootstrap = targetPlatform == hostPlatform;
|
bootstrap = targetPlatform == hostPlatform;
|
||||||
|
|
||||||
|
@ -67,20 +67,7 @@ let version = "7.4.0";
|
|||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||||
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||||
(if crossMingw && crossStageStatic then [
|
(if crossStageStatic then [
|
||||||
"--with-headers=${getDev libcCross}${libcCross.incdir or "/include"}"
|
|
||||||
"--with-gcc"
|
|
||||||
"--with-gnu-as"
|
|
||||||
"--with-gnu-ld"
|
|
||||||
"--with-gnu-ld"
|
|
||||||
"--disable-shared"
|
|
||||||
"--disable-nls"
|
|
||||||
"--disable-debug"
|
|
||||||
"--enable-sjlj-exceptions"
|
|
||||||
"--enable-threads=win32"
|
|
||||||
"--disable-win32-registry"
|
|
||||||
"--disable-libmpx" # requires libc
|
|
||||||
] else if crossStageStatic then [
|
|
||||||
"--disable-libssp"
|
"--disable-libssp"
|
||||||
"--disable-nls"
|
"--disable-nls"
|
||||||
"--without-headers"
|
"--without-headers"
|
||||||
@ -91,14 +78,35 @@ let version = "7.4.0";
|
|||||||
"--disable-libatomic" # requires libc
|
"--disable-libatomic" # requires libc
|
||||||
"--disable-decimal-float" # requires libc
|
"--disable-decimal-float" # requires libc
|
||||||
"--disable-libmpx" # requires libc
|
"--disable-libmpx" # requires libc
|
||||||
|
] ++ optionals crossMingw [
|
||||||
|
"--with-headers=${libcCross}/include"
|
||||||
|
"--with-gcc"
|
||||||
|
"--with-gnu-as"
|
||||||
|
"--with-gnu-ld"
|
||||||
|
"--disable-debug"
|
||||||
|
"--enable-sjlj-exceptions"
|
||||||
|
"--disable-win32-registry"
|
||||||
] else [
|
] else [
|
||||||
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
||||||
else "--with-headers=${getDev libcCross}${libcCross.incdir or "/include"}")
|
else "--with-headers=${getDev libcCross}${libcCross.incdir or "/include"}")
|
||||||
"--enable-__cxa_atexit"
|
"--enable-__cxa_atexit"
|
||||||
"--enable-long-long"
|
"--enable-long-long"
|
||||||
] ++
|
"--enable-threads=${if targetPlatform.isUnix then "posix"
|
||||||
(if crossMingw then [
|
else if targetPlatform.isWindows then "win32"
|
||||||
"--enable-threads=win32"
|
else "single"}"
|
||||||
|
"--enable-nls"
|
||||||
|
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
||||||
|
] ++ optionals (targetPlatform.libc == "uclibc" || targetPlatform.libc == "musl") [
|
||||||
|
# libsanitizer requires netrom/netrom.h which is not
|
||||||
|
# available in uclibc.
|
||||||
|
"--disable-libsanitizer"
|
||||||
|
# In uclibc cases, libgomp needs an additional '-ldl'
|
||||||
|
# and as I don't know how to pass it, I disable libgomp.
|
||||||
|
"--disable-libgomp"
|
||||||
|
] ++ optionals (targetPlatform.libc == "musl") [
|
||||||
|
# musl at least, disable: https://git.buildroot.net/buildroot/commit/?id=873d4019f7fb00f6a80592224236b3ba7d657865
|
||||||
|
"--disable-libmpx"
|
||||||
|
] ++ optionals crossMingw [
|
||||||
"--enable-sjlj-exceptions"
|
"--enable-sjlj-exceptions"
|
||||||
"--enable-hash-synchronization"
|
"--enable-hash-synchronization"
|
||||||
"--enable-libssp"
|
"--enable-libssp"
|
||||||
@ -106,29 +114,11 @@ let version = "7.4.0";
|
|||||||
"--with-dwarf2"
|
"--with-dwarf2"
|
||||||
# To keep ABI compatibility with upstream mingw-w64
|
# To keep ABI compatibility with upstream mingw-w64
|
||||||
"--enable-fully-dynamic-string"
|
"--enable-fully-dynamic-string"
|
||||||
] else
|
] ++ optional (targetPlatform.libc == "newlib") "--with-newlib"
|
||||||
optionals (targetPlatform.libc == "uclibc" || targetPlatform.libc == "musl") [
|
|
||||||
# libsanitizer requires netrom/netrom.h which is not
|
|
||||||
# available in uclibc.
|
|
||||||
"--disable-libsanitizer"
|
|
||||||
# In uclibc cases, libgomp needs an additional '-ldl'
|
|
||||||
# and as I don't know how to pass it, I disable libgomp.
|
|
||||||
"--disable-libgomp"
|
|
||||||
# musl at least, disable: https://git.buildroot.net/buildroot/commit/?id=873d4019f7fb00f6a80592224236b3ba7d657865
|
|
||||||
"--disable-libmpx"
|
|
||||||
]
|
|
||||||
++ optional (targetPlatform.libc == "newlib") "--with-newlib"
|
|
||||||
++ optional (targetPlatform.libc == "avrlibc") "--with-avrlibc"
|
++ optional (targetPlatform.libc == "avrlibc") "--with-avrlibc"
|
||||||
++ [
|
);
|
||||||
"--enable-threads=${if targetPlatform.isUnix then "posix"
|
|
||||||
else if targetPlatform.isWindows then "win32"
|
|
||||||
else "single"}"
|
|
||||||
"--enable-nls"
|
|
||||||
# No final libdecnumber (it may work only in 386)
|
|
||||||
"--disable-decimal-float"
|
|
||||||
]));
|
|
||||||
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
||||||
crossNameAddon = if targetPlatform != hostPlatform then "${targetPlatform.config}${stageNameAddon}-" else "";
|
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||||
|
|
||||||
bootstrap = targetPlatform == hostPlatform;
|
bootstrap = targetPlatform == hostPlatform;
|
||||||
|
|
||||||
|
@ -59,20 +59,7 @@ let version = "8.3.0";
|
|||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||||
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||||
(if crossMingw && crossStageStatic then [
|
(if crossStageStatic then [
|
||||||
"--with-headers=${libcCross}/include"
|
|
||||||
"--with-gcc"
|
|
||||||
"--with-gnu-as"
|
|
||||||
"--with-gnu-ld"
|
|
||||||
"--with-gnu-ld"
|
|
||||||
"--disable-shared"
|
|
||||||
"--disable-nls"
|
|
||||||
"--disable-debug"
|
|
||||||
"--enable-sjlj-exceptions"
|
|
||||||
"--enable-threads=win32"
|
|
||||||
"--disable-win32-registry"
|
|
||||||
"--disable-libmpx" # requires libc
|
|
||||||
] else if crossStageStatic then [
|
|
||||||
"--disable-libssp"
|
"--disable-libssp"
|
||||||
"--disable-nls"
|
"--disable-nls"
|
||||||
"--without-headers"
|
"--without-headers"
|
||||||
@ -83,14 +70,35 @@ let version = "8.3.0";
|
|||||||
"--disable-libatomic" # requires libc
|
"--disable-libatomic" # requires libc
|
||||||
"--disable-decimal-float" # requires libc
|
"--disable-decimal-float" # requires libc
|
||||||
"--disable-libmpx" # requires libc
|
"--disable-libmpx" # requires libc
|
||||||
|
] ++ optionals crossMingw [
|
||||||
|
"--with-headers=${libcCross}/include"
|
||||||
|
"--with-gcc"
|
||||||
|
"--with-gnu-as"
|
||||||
|
"--with-gnu-ld"
|
||||||
|
"--disable-debug"
|
||||||
|
"--enable-sjlj-exceptions"
|
||||||
|
"--disable-win32-registry"
|
||||||
] else [
|
] else [
|
||||||
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
||||||
else "--with-headers=${getDev libcCross}${libcCross.incdir or "/include"}")
|
else "--with-headers=${getDev libcCross}${libcCross.incdir or "/include"}")
|
||||||
"--enable-__cxa_atexit"
|
"--enable-__cxa_atexit"
|
||||||
"--enable-long-long"
|
"--enable-long-long"
|
||||||
] ++
|
"--enable-threads=${if targetPlatform.isUnix then "posix"
|
||||||
(if crossMingw then [
|
else if targetPlatform.isWindows then "win32"
|
||||||
"--enable-threads=win32"
|
else "single"}"
|
||||||
|
"--enable-nls"
|
||||||
|
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
||||||
|
] ++ optionals (targetPlatform.libc == "uclibc" || targetPlatform.libc == "musl") [
|
||||||
|
# libsanitizer requires netrom/netrom.h which is not
|
||||||
|
# available in uclibc.
|
||||||
|
"--disable-libsanitizer"
|
||||||
|
# In uclibc cases, libgomp needs an additional '-ldl'
|
||||||
|
# and as I don't know how to pass it, I disable libgomp.
|
||||||
|
"--disable-libgomp"
|
||||||
|
] ++ optionals (targetPlatform.libc == "musl") [
|
||||||
|
# musl at least, disable: https://git.buildroot.net/buildroot/commit/?id=873d4019f7fb00f6a80592224236b3ba7d657865
|
||||||
|
"--disable-libmpx"
|
||||||
|
] ++ optionals crossMingw [
|
||||||
"--enable-sjlj-exceptions"
|
"--enable-sjlj-exceptions"
|
||||||
"--enable-hash-synchronization"
|
"--enable-hash-synchronization"
|
||||||
"--enable-libssp"
|
"--enable-libssp"
|
||||||
@ -98,26 +106,9 @@ let version = "8.3.0";
|
|||||||
"--with-dwarf2"
|
"--with-dwarf2"
|
||||||
# To keep ABI compatibility with upstream mingw-w64
|
# To keep ABI compatibility with upstream mingw-w64
|
||||||
"--enable-fully-dynamic-string"
|
"--enable-fully-dynamic-string"
|
||||||
] else
|
] ++ optional (targetPlatform.libc == "newlib") "--with-newlib"
|
||||||
optionals (targetPlatform.libc == "uclibc" || targetPlatform.libc == "musl") [
|
|
||||||
# libsanitizer requires netrom/netrom.h which is not
|
|
||||||
# available in uclibc.
|
|
||||||
"--disable-libsanitizer"
|
|
||||||
# In uclibc cases, libgomp needs an additional '-ldl'
|
|
||||||
# and as I don't know how to pass it, I disable libgomp.
|
|
||||||
"--disable-libgomp"
|
|
||||||
# musl at least, disable: https://git.buildroot.net/buildroot/commit/?id=873d4019f7fb00f6a80592224236b3ba7d657865
|
|
||||||
"--disable-libmpx"
|
|
||||||
]
|
|
||||||
++ optional (targetPlatform.libc == "newlib") "--with-newlib"
|
|
||||||
++ optional (targetPlatform.libc == "avrlibc") "--with-avrlibc"
|
++ optional (targetPlatform.libc == "avrlibc") "--with-avrlibc"
|
||||||
++ [
|
);
|
||||||
"--enable-threads=${if targetPlatform.isUnix then "posix"
|
|
||||||
else if targetPlatform.isWindows then "win32"
|
|
||||||
else "single"}"
|
|
||||||
"--enable-nls"
|
|
||||||
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
|
||||||
]));
|
|
||||||
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
||||||
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||||
|
|
||||||
@ -126,7 +117,7 @@ let version = "8.3.0";
|
|||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation ({
|
stdenv.mkDerivation ({
|
||||||
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
|
name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}";
|
||||||
|
|
||||||
builder = ../builder.sh;
|
builder = ../builder.sh;
|
||||||
|
|
||||||
|
@ -58,20 +58,7 @@ let version = "9.2.0";
|
|||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||||
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||||
(if crossMingw && crossStageStatic then [
|
(if crossStageStatic then [
|
||||||
"--with-headers=${libcCross}/include"
|
|
||||||
"--with-gcc"
|
|
||||||
"--with-gnu-as"
|
|
||||||
"--with-gnu-ld"
|
|
||||||
"--with-gnu-ld"
|
|
||||||
"--disable-shared"
|
|
||||||
"--disable-nls"
|
|
||||||
"--disable-debug"
|
|
||||||
"--enable-sjlj-exceptions"
|
|
||||||
"--enable-threads=win32"
|
|
||||||
"--disable-win32-registry"
|
|
||||||
"--disable-libmpx" # requires libc
|
|
||||||
] else if crossStageStatic then [
|
|
||||||
"--disable-libssp"
|
"--disable-libssp"
|
||||||
"--disable-nls"
|
"--disable-nls"
|
||||||
"--without-headers"
|
"--without-headers"
|
||||||
@ -82,14 +69,35 @@ let version = "9.2.0";
|
|||||||
"--disable-libatomic" # requires libc
|
"--disable-libatomic" # requires libc
|
||||||
"--disable-decimal-float" # requires libc
|
"--disable-decimal-float" # requires libc
|
||||||
"--disable-libmpx" # requires libc
|
"--disable-libmpx" # requires libc
|
||||||
|
] ++ optionals crossMingw [
|
||||||
|
"--with-headers=${libcCross}/include"
|
||||||
|
"--with-gcc"
|
||||||
|
"--with-gnu-as"
|
||||||
|
"--with-gnu-ld"
|
||||||
|
"--disable-debug"
|
||||||
|
"--enable-sjlj-exceptions"
|
||||||
|
"--disable-win32-registry"
|
||||||
] else [
|
] else [
|
||||||
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
||||||
else "--with-headers=${getDev libcCross}${libcCross.incdir or "/include"}")
|
else "--with-headers=${getDev libcCross}${libcCross.incdir or "/include"}")
|
||||||
"--enable-__cxa_atexit"
|
"--enable-__cxa_atexit"
|
||||||
"--enable-long-long"
|
"--enable-long-long"
|
||||||
] ++
|
"--enable-threads=${if targetPlatform.isUnix then "posix"
|
||||||
(if crossMingw then [
|
else if targetPlatform.isWindows then "win32"
|
||||||
"--enable-threads=win32"
|
else "single"}"
|
||||||
|
"--enable-nls"
|
||||||
|
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
||||||
|
] ++ optionals (targetPlatform.libc == "uclibc" || targetPlatform.libc == "musl") [
|
||||||
|
# libsanitizer requires netrom/netrom.h which is not
|
||||||
|
# available in uclibc.
|
||||||
|
"--disable-libsanitizer"
|
||||||
|
# In uclibc cases, libgomp needs an additional '-ldl'
|
||||||
|
# and as I don't know how to pass it, I disable libgomp.
|
||||||
|
"--disable-libgomp"
|
||||||
|
] ++ optionals (targetPlatform.libc == "musl") [
|
||||||
|
# musl at least, disable: https://git.buildroot.net/buildroot/commit/?id=873d4019f7fb00f6a80592224236b3ba7d657865
|
||||||
|
"--disable-libmpx"
|
||||||
|
] ++ optionals crossMingw [
|
||||||
"--enable-sjlj-exceptions"
|
"--enable-sjlj-exceptions"
|
||||||
"--enable-hash-synchronization"
|
"--enable-hash-synchronization"
|
||||||
"--enable-libssp"
|
"--enable-libssp"
|
||||||
@ -97,26 +105,9 @@ let version = "9.2.0";
|
|||||||
"--with-dwarf2"
|
"--with-dwarf2"
|
||||||
# To keep ABI compatibility with upstream mingw-w64
|
# To keep ABI compatibility with upstream mingw-w64
|
||||||
"--enable-fully-dynamic-string"
|
"--enable-fully-dynamic-string"
|
||||||
] else
|
] ++ optional (targetPlatform.libc == "newlib") "--with-newlib"
|
||||||
optionals (targetPlatform.libc == "uclibc" || targetPlatform.libc == "musl") [
|
|
||||||
# libsanitizer requires netrom/netrom.h which is not
|
|
||||||
# available in uclibc.
|
|
||||||
"--disable-libsanitizer"
|
|
||||||
# In uclibc cases, libgomp needs an additional '-ldl'
|
|
||||||
# and as I don't know how to pass it, I disable libgomp.
|
|
||||||
"--disable-libgomp"
|
|
||||||
# musl at least, disable: https://git.buildroot.net/buildroot/commit/?id=873d4019f7fb00f6a80592224236b3ba7d657865
|
|
||||||
"--disable-libmpx"
|
|
||||||
]
|
|
||||||
++ optional (targetPlatform.libc == "newlib") "--with-newlib"
|
|
||||||
++ optional (targetPlatform.libc == "avrlibc") "--with-avrlibc"
|
++ optional (targetPlatform.libc == "avrlibc") "--with-avrlibc"
|
||||||
++ [
|
);
|
||||||
"--enable-threads=${if targetPlatform.isUnix then "posix"
|
|
||||||
else if targetPlatform.isWindows then "win32"
|
|
||||||
else "single"}"
|
|
||||||
"--enable-nls"
|
|
||||||
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
|
||||||
]));
|
|
||||||
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
||||||
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||||
|
|
||||||
@ -125,7 +116,7 @@ let version = "9.2.0";
|
|||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation ({
|
stdenv.mkDerivation ({
|
||||||
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
|
name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}";
|
||||||
|
|
||||||
builder = ../builder.sh;
|
builder = ../builder.sh;
|
||||||
|
|
||||||
|
@ -55,20 +55,7 @@ let version = "7-20170409";
|
|||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||||
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||||
(if crossMingw && crossStageStatic then [
|
(if crossStageStatic then [
|
||||||
"--with-headers=${libcCross}/include"
|
|
||||||
"--with-gcc"
|
|
||||||
"--with-gnu-as"
|
|
||||||
"--with-gnu-ld"
|
|
||||||
"--with-gnu-ld"
|
|
||||||
"--disable-shared"
|
|
||||||
"--disable-nls"
|
|
||||||
"--disable-debug"
|
|
||||||
"--enable-sjlj-exceptions"
|
|
||||||
"--enable-threads=win32"
|
|
||||||
"--disable-win32-registry"
|
|
||||||
"--disable-libmpx" # requires libc
|
|
||||||
] else if crossStageStatic then [
|
|
||||||
"--disable-libssp"
|
"--disable-libssp"
|
||||||
"--disable-nls"
|
"--disable-nls"
|
||||||
"--without-headers"
|
"--without-headers"
|
||||||
@ -79,14 +66,35 @@ let version = "7-20170409";
|
|||||||
"--disable-libatomic" # requires libc
|
"--disable-libatomic" # requires libc
|
||||||
"--disable-decimal-float" # requires libc
|
"--disable-decimal-float" # requires libc
|
||||||
"--disable-libmpx" # requires libc
|
"--disable-libmpx" # requires libc
|
||||||
|
] ++ optionals crossMingw [
|
||||||
|
"--with-headers=${libcCross}/include"
|
||||||
|
"--with-gcc"
|
||||||
|
"--with-gnu-as"
|
||||||
|
"--with-gnu-ld"
|
||||||
|
"--disable-debug"
|
||||||
|
"--enable-sjlj-exceptions"
|
||||||
|
"--disable-win32-registry"
|
||||||
] else [
|
] else [
|
||||||
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
(if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
|
||||||
else "--with-headers=${getDev libcCross}/include")
|
else "--with-headers=${getDev libcCross}${libcCross.incdir or "/include"}")
|
||||||
"--enable-__cxa_atexit"
|
"--enable-__cxa_atexit"
|
||||||
"--enable-long-long"
|
"--enable-long-long"
|
||||||
] ++
|
"--enable-threads=${if targetPlatform.isUnix then "posix"
|
||||||
(if crossMingw then [
|
else if targetPlatform.isWindows then "win32"
|
||||||
"--enable-threads=win32"
|
else "single"}"
|
||||||
|
"--enable-nls"
|
||||||
|
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
||||||
|
] ++ optionals (targetPlatform.libc == "uclibc" || targetPlatform.libc == "musl") [
|
||||||
|
# libsanitizer requires netrom/netrom.h which is not
|
||||||
|
# available in uclibc.
|
||||||
|
"--disable-libsanitizer"
|
||||||
|
# In uclibc cases, libgomp needs an additional '-ldl'
|
||||||
|
# and as I don't know how to pass it, I disable libgomp.
|
||||||
|
"--disable-libgomp"
|
||||||
|
] ++ optionals (targetPlatform.libc == "musl") [
|
||||||
|
# musl at least, disable: https://git.buildroot.net/buildroot/commit/?id=873d4019f7fb00f6a80592224236b3ba7d657865
|
||||||
|
"--disable-libmpx"
|
||||||
|
] ++ optionals crossMingw [
|
||||||
"--enable-sjlj-exceptions"
|
"--enable-sjlj-exceptions"
|
||||||
"--enable-hash-synchronization"
|
"--enable-hash-synchronization"
|
||||||
"--enable-libssp"
|
"--enable-libssp"
|
||||||
@ -94,24 +102,9 @@ let version = "7-20170409";
|
|||||||
"--with-dwarf2"
|
"--with-dwarf2"
|
||||||
# To keep ABI compatibility with upstream mingw-w64
|
# To keep ABI compatibility with upstream mingw-w64
|
||||||
"--enable-fully-dynamic-string"
|
"--enable-fully-dynamic-string"
|
||||||
] else
|
] ++ optional (targetPlatform.libc == "newlib") "--with-newlib"
|
||||||
optionals (targetPlatform.libc == "uclibc") [
|
|
||||||
# libsanitizer requires netrom/netrom.h which is not
|
|
||||||
# available in uclibc.
|
|
||||||
"--disable-libsanitizer"
|
|
||||||
# In uclibc cases, libgomp needs an additional '-ldl'
|
|
||||||
# and as I don't know how to pass it, I disable libgomp.
|
|
||||||
"--disable-libgomp"
|
|
||||||
]
|
|
||||||
++ optional (targetPlatform.libc == "newlib") "--with-newlib"
|
|
||||||
++ optional (targetPlatform.libc == "avrlibc") "--with-avrlibc"
|
++ optional (targetPlatform.libc == "avrlibc") "--with-avrlibc"
|
||||||
++ [
|
);
|
||||||
"--enable-threads=${if targetPlatform.isUnix then "posix"
|
|
||||||
else if targetPlatform.isWindows then "win32"
|
|
||||||
else "single"}"
|
|
||||||
"--enable-nls"
|
|
||||||
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
|
||||||
]));
|
|
||||||
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
||||||
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||||
|
|
||||||
@ -120,7 +113,7 @@ let version = "7-20170409";
|
|||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation ({
|
stdenv.mkDerivation ({
|
||||||
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
|
name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}";
|
||||||
|
|
||||||
builder = ../builder.sh;
|
builder = ../builder.sh;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user