From 55e8e0ef9bf2c927edbdcc05097a1e7185184cba Mon Sep 17 00:00:00 2001 From: Eelco Dolstra <eelco.dolstra@logicblox.com> Date: Mon, 30 Jun 2014 12:46:42 +0200 Subject: [PATCH] gcc: Slight builder cleanup --- pkgs/development/compilers/gcc/4.8/builder.sh | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/pkgs/development/compilers/gcc/4.8/builder.sh b/pkgs/development/compilers/gcc/4.8/builder.sh index 7c9b9420ddaa..f0f428e4dc51 100644 --- a/pkgs/development/compilers/gcc/4.8/builder.sh +++ b/pkgs/development/compilers/gcc/4.8/builder.sh @@ -109,13 +109,11 @@ if test "$noSysDirs" = "1"; then fi fi - # CFLAGS_FOR_TARGET are needed for the libstdc++ configure script to find # the startfiles. # FLAGS_FOR_TARGET are needed for the target libraries to receive the -Bxxx # for the startfiles. - makeFlagsArray=( \ - "${makeFlagsArray[@]}" \ + makeFlagsArray+=( \ NATIVE_SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \ SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \ CFLAGS_FOR_BUILD="$EXTRA_FLAGS $EXTRA_LDFLAGS" \ @@ -128,8 +126,7 @@ if test "$noSysDirs" = "1"; then ) if test -z "$targetConfig"; then - makeFlagsArray=( \ - "${makeFlagsArray[@]}" \ + makeFlagsArray+=( \ BOOT_CFLAGS="$EXTRA_FLAGS $EXTRA_LDFLAGS" \ BOOT_LDFLAGS="$EXTRA_TARGET_CFLAGS $EXTRA_TARGET_LDFLAGS" \ ) @@ -138,13 +135,11 @@ if test "$noSysDirs" = "1"; then if test -n "$targetConfig" -a "$crossStageStatic" == 1; then # We don't want the gcc build to assume there will be a libc providing # limits.h in this stagae - makeFlagsArray=( \ - "${makeFlagsArray[@]}" \ + makeFlagsArray+=( \ LIMITS_H_TEST=false \ ) else - makeFlagsArray=( \ - "${makeFlagsArray[@]}" \ + makeFlagsArray+=( \ LIMITS_H_TEST=true \ ) fi @@ -163,6 +158,7 @@ preConfigure() { # Patch to get armvt5el working: sed -i -e 's/ arm)/ arm*)/' newlib/configure.host fi + # Bug - they packaged zlib if test -d "zlib"; then # This breaks the build without-headers, which should build only @@ -189,8 +185,8 @@ preConfigure() { fi # Eval the preConfigure script from nix expression. - eval $providedPreConfigure; - env; + eval "$providedPreConfigure" + # Perform the build in a different directory. mkdir ../build cd ../build