From 527599d49c24d24eeecc1438c75477d3a3c59221 Mon Sep 17 00:00:00 2001
From: Jeremy Soller <jackpot51@gmail.com>
Date: Thu, 14 Dec 2017 20:05:28 -0700
Subject: [PATCH] Fix build of newlibtest

---
 cook.sh                      | 4 ++--
 recipes/newlibtest/recipe.sh | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/cook.sh b/cook.sh
index 242688365..0de729bda 100755
--- a/cook.sh
+++ b/cook.sh
@@ -226,7 +226,7 @@ function op {
             fi
             popd > /dev/null
             ;;
-        prepare)            
+        prepare)
             skip=0
             if [ "$(type -t recipe_prepare)" = "function" ]
             then
@@ -248,7 +248,7 @@ function op {
                         pkg --target=$TARGET install --root sysroot "$REPO/$i.tar.gz"
                     done
                 fi
-                
+
                 rm -rf build
                 cp -rp source build
 
diff --git a/recipes/newlibtest/recipe.sh b/recipes/newlibtest/recipe.sh
index 81024e556..fdbed7c51 100644
--- a/recipes/newlibtest/recipe.sh
+++ b/recipes/newlibtest/recipe.sh
@@ -15,8 +15,9 @@ function recipe_build {
     sysroot="${PWD}/../sysroot"
     export CC="${HOST}-gcc"
     export LD="${HOST}-ld"
-    export CFLAGS="-nostdinc -nostdlib -static $sysroot/lib/crt0.o"
-    export LIBS="-I $sysroot/include -L $sysroot/lib -lc -lm"
+    export CFLAGS="-static -nostdinc -I $sysroot/include -I /usr/lib/gcc/x86_64-unknown-redox/7.0.1/include/ -nostdlib -L $sysroot/lib"
+    export CRT="$sysroot/lib/crt0.o"
+    export CLIBS="-lc -lm"
 
     make all
     skip=1
-- 
GitLab