diff --git a/Makefile b/Makefile index d21f1cad..56c27c16 100644 --- a/Makefile +++ b/Makefile @@ -256,7 +256,7 @@ endif $S./c2str.exe $< $@ c2str.exe : conftest.c - $S$(CC) -DC2STR $< -o $@ + $S$(HOST_CC) -DC2STR $< -o $@ # target specific object rule $(X)%.o : %.c $(LIBTCC_INC) diff --git a/configure b/configure index c1abffc9..2217029c 100755 --- a/configure +++ b/configure @@ -58,6 +58,8 @@ build_cross= test -n "$CC" && cc="$CC" test -n "$AR" && ar="$AR" +host_cc="$CC" + # set default CFLAGS if unset in environment test -z "$CFLAGS" && CFLAGS="-Wall -O2" @@ -122,7 +124,7 @@ for opt do ;; --source-path=*) assign_opt "$opt" source_path ;; - --cross-prefix=*) assign_opt "$opt" cross_prefix + --cross-prefix=*) assign_opt "$opt" cross_prefix; assign_opt "gcc" host_cc ;; --os-release=*) assign_opt "$opt" os_release ;; @@ -584,6 +586,7 @@ mandir=\$(DESTDIR)$mandir infodir=\$(DESTDIR)$infodir docdir=\$(DESTDIR)$docdir CC=$cc +HOST_CC=$host_cc CC_NAME=$cc_name GCC_MAJOR=$gcc_major GCC_MINOR=$gcc_minor