From ff94f7cd5c765fc71c8297cd22d672f07f48a53e Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Sun, 24 Jul 2022 18:42:24 -0700 Subject: [PATCH] Fix newlib build for FreeBSD newlib was using 'gcc' if the CC_FOR_BUILD variable wasn't set. So, explicitly set it here to the compiler that we're using. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index fd60f94..904ab31 100644 --- a/Makefile +++ b/Makefile @@ -61,7 +61,7 @@ endif CFLAGS ?= -Os CXXFLAGS ?= $(CFLAGS) -CFLAGS_FOR_TARGET ?= -Os -fomit-frame-pointer +CFLAGS_FOR_TARGET ?= -Os -fomit-frame-pointer CXXFLAGS_FOR_TARGET ?= $(CFLAGS_FOR_TARGET) -fno-exceptions -fno-rtti E:=CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CFLAGS_FOR_BUILD="$(CFLAGS)" CXXFLAGS_FOR_BUILD="$(CXXFLAGS)" CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" CXXFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" @@ -938,7 +938,7 @@ $(BUILD)/newlib/newlib/libc.a: $(BUILD)/newlib/newlib/Makefile $(NEWLIB_FILES) $(BUILD)/newlib/newlib/Makefile: $(PROJECTS)/newlib-cygwin/newlib/configure $(BUILD)/ndk-include_ndk $(BUILD)/gcc/_done @mkdir -p $(BUILD)/newlib/newlib @if [ ! -f "$(BUILD)/newlib/newlib/Makefile" ]; then \ - $(L00)"configure newlib"$(L1) cd $(BUILD)/newlib/newlib && $(NEWLIB_CONFIG) CFLAGS="$(CFLAGS_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" $(PROJECTS)/newlib-cygwin/newlib/configure --host=m68k-amigaos --prefix=$(PREFIX) --enable-newlib-io-long-long --enable-newlib-io-c99-formats --enable-newlib-reent-small --enable-newlib-mb --enable-newlib-long-time_t $(L2) \ + $(L00)"configure newlib"$(L1) cd $(BUILD)/newlib/newlib && $(NEWLIB_CONFIG) CFLAGS="$(CFLAGS_FOR_TARGET)" CC_FOR_BUILD="$(CC)" CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" $(PROJECTS)/newlib-cygwin/newlib/configure --host=m68k-amigaos --prefix=$(PREFIX) --enable-newlib-io-long-long --enable-newlib-io-c99-formats --enable-newlib-reent-small --enable-newlib-mb --enable-newlib-long-time_t $(L2) \ ; else touch "$(BUILD)/newlib/newlib/Makefile"; fi $(PROJECTS)/newlib-cygwin/newlib/configure: