mirror of
https://github.com/TinyCC/tinycc.git
synced 2026-02-04 12:51:37 +00:00
build c2str.exe with the host compiler; default it to gcc if cross prefix given
This commit is contained in:
2
Makefile
2
Makefile
@@ -256,7 +256,7 @@ endif
|
|||||||
$S./c2str.exe $< $@
|
$S./c2str.exe $< $@
|
||||||
|
|
||||||
c2str.exe : conftest.c
|
c2str.exe : conftest.c
|
||||||
$S$(CC) -DC2STR $< -o $@
|
$S$(HOST_CC) -DC2STR $< -o $@
|
||||||
|
|
||||||
# target specific object rule
|
# target specific object rule
|
||||||
$(X)%.o : %.c $(LIBTCC_INC)
|
$(X)%.o : %.c $(LIBTCC_INC)
|
||||||
|
|||||||
5
configure
vendored
5
configure
vendored
@@ -58,6 +58,8 @@ build_cross=
|
|||||||
test -n "$CC" && cc="$CC"
|
test -n "$CC" && cc="$CC"
|
||||||
test -n "$AR" && ar="$AR"
|
test -n "$AR" && ar="$AR"
|
||||||
|
|
||||||
|
host_cc="$CC"
|
||||||
|
|
||||||
# set default CFLAGS if unset in environment
|
# set default CFLAGS if unset in environment
|
||||||
test -z "$CFLAGS" && CFLAGS="-Wall -O2"
|
test -z "$CFLAGS" && CFLAGS="-Wall -O2"
|
||||||
|
|
||||||
@@ -122,7 +124,7 @@ for opt do
|
|||||||
;;
|
;;
|
||||||
--source-path=*) assign_opt "$opt" source_path
|
--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
|
--os-release=*) assign_opt "$opt" os_release
|
||||||
;;
|
;;
|
||||||
@@ -584,6 +586,7 @@ mandir=\$(DESTDIR)$mandir
|
|||||||
infodir=\$(DESTDIR)$infodir
|
infodir=\$(DESTDIR)$infodir
|
||||||
docdir=\$(DESTDIR)$docdir
|
docdir=\$(DESTDIR)$docdir
|
||||||
CC=$cc
|
CC=$cc
|
||||||
|
HOST_CC=$host_cc
|
||||||
CC_NAME=$cc_name
|
CC_NAME=$cc_name
|
||||||
GCC_MAJOR=$gcc_major
|
GCC_MAJOR=$gcc_major
|
||||||
GCC_MINOR=$gcc_minor
|
GCC_MINOR=$gcc_minor
|
||||||
|
|||||||
Reference in New Issue
Block a user