Refactor gcc limits.h file creation
authorHugo Villeneuve <hugo@hugovil.com>
Sat, 4 Oct 2014 03:18:02 +0000 (23:18 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Thu, 27 Nov 2014 23:33:55 +0000 (18:33 -0500)
Also create directory before creating the file.

stage0/pkg/gcc

index 1877e7c..52bea6e 100644 (file)
@@ -31,6 +31,11 @@ hvconfig_pre()
             --disable-libssp \
             --disable-threads \
             --enable-languages=c"
+
+        # We will create a dummy limits.h so the build will not use the one
+        # provided by the host distro:
+        mkdir -p /tools/include
+        touch /tools/include/limits.h
     else
         CONFIGURE_OPTS+=" \
             --enable-shared \
@@ -52,12 +57,6 @@ hvconfig_pre()
     # only:
     sed -e "s@\(^CROSS_SYSTEM_HEADER_DIR =\).*@\1 /tools/include@g" \
         -i gcc/Makefile.in
-
-    if [ "x${HVLABEL}" = "x${GCC}-pass1" ]; then
-        # We will create a dummy limits.h so the build will not use the one
-        # provided by the host distro:
-        touch /tools/include/limits.h
-    fi
 }
 
 hvconfig_post()