From 8b48f4c76a51852d45661e94e2fe9409b639899c Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Fri, 3 Oct 2014 23:18:02 -0400 Subject: [PATCH] Refactor gcc limits.h file creation Also create directory before creating the file. --- stage0/pkg/gcc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/stage0/pkg/gcc b/stage0/pkg/gcc index 1877e7c..52bea6e 100644 --- a/stage0/pkg/gcc +++ b/stage0/pkg/gcc @@ -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() -- 2.20.1