From: Taylor R Campbell Date: Fri, 11 Jan 2019 04:45:19 +0000 (+0000) Subject: Use HOST_CC, default CC, to compile findprim. X-Git-Tag: mit-scheme-pucked-10.1.10~6^2~50 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=b97efe1ab7a43276f975f63a626751617651b94a;p=mit-scheme.git Use HOST_CC, default CC, to compile findprim. This needs to run on the host system, not on the target system. This way we can cross-compile the microcode if you have a C cross-compiler handy, which makes iterating development a lot faster when the target's native C compiler is painfully slow. --- diff --git a/src/microcode/configure.ac b/src/microcode/configure.ac index ed078bc93..5c2ca51cd 100644 --- a/src/microcode/configure.ac +++ b/src/microcode/configure.ac @@ -203,6 +203,8 @@ AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET +: ${HOST_CC:=${CC}} + if test x"${GCC}" = xyes; then dnl Discard flags computed by AC_PROG_CC; we'll use our own. @@ -928,6 +930,7 @@ AC_SUBST([AUXDIR_NAME]) AC_SUBST([EXE_NAME]) AC_SUBST([INSTALL_INCLUDE]) AC_SUBST([CCLD]) +AC_SUBST([HOST_CC]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/src/microcode/makegen/Makefile.in.in b/src/microcode/makegen/Makefile.in.in index 3124b5fc7..aafac46b4 100644 --- a/src/microcode/makegen/Makefile.in.in +++ b/src/microcode/makegen/Makefile.in.in @@ -69,6 +69,7 @@ EXE_NAME = @EXE_NAME@ AUXDIR = $(libdir)/$(AUXDIR_NAME) CC = @CC@ +HOST_CC = @HOST_CC@ CCLD = @CCLD@ M4 = $(srcdir)/makegen/m4.sh @M4@ AS = as @@ -172,7 +173,11 @@ usrdef.c: $(STD_SOURCES) findprim Makefile findprim: $(findprim_OBJECTS) $(findprim_DEPENDENCIES) -rm -f $@ - $(LINK) $(findprim_LDFLAGS) $(findprim_OBJECTS) $(findprim_LIBS) + $(HOST_CC) -o $@ $(findprim_LDFLAGS) $(findprim_OBJECTS) \ + $(findprim_LIBS) + +findprim.o: findprim.c config.h + $(HOST_CC) -o $@ $(findprim_CFLAGS) -c findprim.c gen-nonce: gen-nonce.o $(LINK) gen-nonce.o