Skip to content

Commit ebc9b16

Browse files
committed
gcc: Add configurePlatforms exception for Arm 32
...just as we did for binutils. When the underlying issue is resolved (probably with a configure script patch or lib/systems/parse.nix change), this should be reverted.
1 parent 71186e7 commit ebc9b16

7 files changed

Lines changed: 42 additions & 7 deletions

File tree

pkgs/development/compilers/gcc/4.5/default.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,12 @@ stdenv.mkDerivation ({
231231
;
232232

233233
# TODO(@Ericson2314): Always pass "--target" and always prefix.
234-
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
234+
configurePlatforms =
235+
# TODO(@Ericson2314): Figure out what's going wrong with Arm
236+
if hostPlatform == targetPlatform && targetPlatform.isArm32
237+
then []
238+
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
239+
235240
configureFlags = "
236241
${if enableMultilib then "" else "--disable-multilib"}
237242
${if enableShared then "" else "--disable-shared"}

pkgs/development/compilers/gcc/4.8/default.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,12 @@ stdenv.mkDerivation ({
317317
dontDisableStatic = true;
318318

319319
# TODO(@Ericson2314): Always pass "--target" and always prefix.
320-
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
320+
configurePlatforms =
321+
# TODO(@Ericson2314): Figure out what's going wrong with Arm
322+
if hostPlatform == targetPlatform && targetPlatform.isArm32
323+
then []
324+
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
325+
321326
configureFlags = "
322327
${if hostPlatform.isSunOS then
323328
" --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " +

pkgs/development/compilers/gcc/4.9/default.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,12 @@ stdenv.mkDerivation ({
317317
dontDisableStatic = true;
318318

319319
# TODO(@Ericson2314): Always pass "--target" and always prefix.
320-
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
320+
configurePlatforms =
321+
# TODO(@Ericson2314): Figure out what's going wrong with Arm
322+
if hostPlatform == targetPlatform && targetPlatform.isArm32
323+
then []
324+
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
325+
321326
configureFlags = "
322327
${if hostPlatform.isSunOS then
323328
" --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " +

pkgs/development/compilers/gcc/5/default.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,12 @@ stdenv.mkDerivation ({
334334
dontDisableStatic = true;
335335

336336
# TODO(@Ericson2314): Always pass "--target" and always prefix.
337-
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
337+
configurePlatforms =
338+
# TODO(@Ericson2314): Figure out what's going wrong with Arm
339+
if hostPlatform == targetPlatform && targetPlatform.isArm32
340+
then []
341+
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
342+
338343
configureFlags = "
339344
${if hostPlatform.isSunOS then
340345
" --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " +

pkgs/development/compilers/gcc/6/default.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,12 @@ stdenv.mkDerivation ({
326326
dontDisableStatic = true;
327327

328328
# TODO(@Ericson2314): Always pass "--target" and always prefix.
329-
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
329+
configurePlatforms =
330+
# TODO(@Ericson2314): Figure out what's going wrong with Arm
331+
if hostPlatform == targetPlatform && targetPlatform.isArm32
332+
then []
333+
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
334+
330335
configureFlags = "
331336
${if hostPlatform.isSunOS then
332337
" --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " +

pkgs/development/compilers/gcc/7/default.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,12 @@ stdenv.mkDerivation ({
328328
dontDisableStatic = true;
329329

330330
# TODO(@Ericson2314): Always pass "--target" and always prefix.
331-
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
331+
configurePlatforms =
332+
# TODO(@Ericson2314): Figure out what's going wrong with Arm
333+
if hostPlatform == targetPlatform && targetPlatform.isArm32
334+
then []
335+
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
336+
332337
configureFlags = "
333338
${if hostPlatform.isSunOS then
334339
" --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " +

pkgs/development/compilers/gcc/snapshot/default.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,12 @@ stdenv.mkDerivation ({
315315
dontDisableStatic = true;
316316

317317
# TODO(@Ericson2314): Always pass "--target" and always prefix.
318-
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
318+
configurePlatforms =
319+
# TODO(@Ericson2314): Figure out what's going wrong with Arm
320+
if hostPlatform == targetPlatform && targetPlatform.isArm32
321+
then []
322+
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
323+
319324
configureFlags = "
320325
${if hostPlatform.isSunOS then
321326
" --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " +

0 commit comments

Comments
 (0)