From e102c234c1166983e2ed5855efba6b25f28185cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Thei=C3=9Fen?= Date: Sat, 17 Nov 2018 20:11:42 +0100 Subject: [PATCH 1/2] Properly export CC variable in Makefile We cannot use ?= because CC is set by default to "cc". Therefore CC was never set. In addition we need to export the variable in order to have the rust cc crate pick it up. Otherwise it is only used by openlibm where it is explicitly passed. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9bd54153aa..074fe4ee03 100644 --- a/Makefile +++ b/Makefile @@ -10,11 +10,11 @@ ifneq ($(TARGET),) endif ifeq ($(TARGET),aarch64-unknown-linux-gnu) - CC?=aarch64-linux-gnu-gcc + export CC=aarch64-linux-gnu-gcc endif ifeq ($(TARGET),x86_64-unknown-redox) - CC?=x86_64-unknown-redox-gcc + export CC=x86_64-unknown-redox-gcc endif SRC=\ From 484a05e8b36e707a1440ac7c4270a8e7286e2df8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Thei=C3=9Fen?= Date: Sat, 17 Nov 2018 20:14:48 +0100 Subject: [PATCH 2/2] Remove unnecessary escape from include.sh The older bash version of macOS does not understand this escape and actually creates directories with "\" in their name. After this change it actually works with both versions. --- include.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include.sh b/include.sh index 82f7f8a523..d596769e98 100755 --- a/include.sh +++ b/include.sh @@ -11,7 +11,7 @@ do name="$(basename "$dir")" if [ "${name:0:1}" != "_" ] then - header="$include/${name/_/\/}.h" + header="$include/${name/_//}.h" pushd "$dir" cargo run --release --manifest-path "$cbindgen/Cargo.toml" -- \ -c cbindgen.toml -o "$header" mod.rs