Unified · Split
| @@ -256,7 +256,7 @@ endif · 255 unmodified lines | |||
| 256 | $S./c2str.exe $< $@ | 256 | $S./c2str.exe $< $@ |
| 257 | 257 | ||
| 258 | c2str.exe : conftest.c | 258 | c2str.exe : conftest.c |
| 259 | $S$(CC) -DC2STR $< -o $@ | 259 | $S$(HOST_CC) -DC2STR $< -o $@ |
| 260 | 260 | ||
| 261 | # target specific object rule | 261 | # target specific object rule |
| 262 | $(X)%.o : %.c $(LIBTCC_INC) | 262 | $(X)%.o : %.c $(LIBTCC_INC) |
| @@ -58,6 +58,8 @@ build_cross= · 57 unmodified lines | |||
| 58 | test -n "$CC" && cc="$CC" | 58 | test -n "$CC" && cc="$CC" |
| 59 | test -n "$AR" && ar="$AR" | 59 | test -n "$AR" && ar="$AR" |
| 60 | 60 | ||
| 61 | host_cc="$CC" | ||
| 62 | |||
| 61 | # set default CFLAGS if unset in environment | 63 | # set default CFLAGS if unset in environment |
| 62 | test -z "$CFLAGS" && CFLAGS="-Wall -O2" | 64 | test -z "$CFLAGS" && CFLAGS="-Wall -O2" |
| 63 | 65 | ||
| @@ -122,7 +124,7 @@ for opt do · 58 unmodified lines | |||
| 122 | ;; | 124 | ;; |
| 123 | --source-path=*) assign_opt "$opt" source_path | 125 | --source-path=*) assign_opt "$opt" source_path |
| 124 | ;; | 126 | ;; |
| 125 | --cross-prefix=*) assign_opt "$opt" cross_prefix | 127 | --cross-prefix=*) assign_opt "$opt" cross_prefix; assign_opt "gcc" host_cc |
| 126 | ;; | 128 | ;; |
| 127 | --os-release=*) assign_opt "$opt" os_release | 129 | --os-release=*) assign_opt "$opt" os_release |
| 128 | ;; | 130 | ;; |
| @@ -584,6 +586,7 @@ mandir=\$(DESTDIR)$mandir · 455 unmodified lines | |||
| 584 | infodir=\$(DESTDIR)$infodir | 586 | infodir=\$(DESTDIR)$infodir |
| 585 | docdir=\$(DESTDIR)$docdir | 587 | docdir=\$(DESTDIR)$docdir |
| 586 | CC=$cc | 588 | CC=$cc |
| 589 | HOST_CC=$host_cc | ||
| 587 | CC_NAME=$cc_name | 590 | CC_NAME=$cc_name |
| 588 | GCC_MAJOR=$gcc_major | 591 | GCC_MAJOR=$gcc_major |
| 589 | GCC_MINOR=$gcc_minor | 592 | GCC_MINOR=$gcc_minor |