From 3e670b934f83d262fd584278293fa22c32b55e07 Mon Sep 17 00:00:00 2001 From: luckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com> Date: Wed, 25 Nov 2020 09:30:16 -0500 Subject: Add support for building agbcc without devkitPro --- libgcc/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libgcc') diff --git a/libgcc/Makefile b/libgcc/Makefile index b149037..721d9d2 100644 --- a/libgcc/Makefile +++ b/libgcc/Makefile @@ -1,4 +1,11 @@ +ifneq (,$(wildcard $(DEVKITARM)/base_tools)) include $(DEVKITARM)/base_tools +else +PREFIX := arm-none-eabi- +export AR := $(PREFIX)ar +export AS := $(PREFIX)as +endif + CC1 = ../old_agbcc libgcc.a: libgcc1.a libgcc2.a fp-bit.o dp-bit.o -- cgit v1.2.3 From 1d64f265ac4efa58a1866a839c16af9dce6b6ae0 Mon Sep 17 00:00:00 2001 From: luckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com> Date: Wed, 16 Dec 2020 13:48:32 -0500 Subject: Check $(DEVKITARM)/bin instead of $(DEVKITARM)/base_tools Rationale: uninstalling devkitarm doesn't remove base_tools, but removes bin. If the binaries exist but not base_tools, then the user clearly wants to install using dkA. Otherwise, if base_tools exists but not binaries, it is possible that the user wants to use standalone arm-none-eabi binaries. --- libgcc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libgcc') diff --git a/libgcc/Makefile b/libgcc/Makefile index 721d9d2..1aec873 100644 --- a/libgcc/Makefile +++ b/libgcc/Makefile @@ -1,4 +1,4 @@ -ifneq (,$(wildcard $(DEVKITARM)/base_tools)) +ifneq (,$(wildcard $(DEVKITARM)/bin)) include $(DEVKITARM)/base_tools else PREFIX := arm-none-eabi- -- cgit v1.2.3 From e4250fbaac8c4944d27f58cbfa469edd8b6374f5 Mon Sep 17 00:00:00 2001 From: luckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com> Date: Wed, 16 Dec 2020 19:43:34 -0500 Subject: Check for $(DEVKITARM) first before checking for $(DEVKITARM)/bin --- libgcc/Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'libgcc') diff --git a/libgcc/Makefile b/libgcc/Makefile index 1aec873..6461d8e 100644 --- a/libgcc/Makefile +++ b/libgcc/Makefile @@ -1,6 +1,15 @@ -ifneq (,$(wildcard $(DEVKITARM)/bin)) -include $(DEVKITARM)/base_tools +ifneq (,$(DEVKITARM)) + ifneq (,$(wildcard $(DEVKITARM)/bin)) + include $(DEVKITARM)/base_tools + DKA_EXISTS=1 + else + DKA_EXISTS=0 + endif else +DKA_EXISTS=0 +endif + +ifneq ($(DKA_EXISTS),1) PREFIX := arm-none-eabi- export AR := $(PREFIX)ar export AS := $(PREFIX)as -- cgit v1.2.3 From 5297ebf5085b236d8735c6722034dc5a782c2b0e Mon Sep 17 00:00:00 2001 From: luckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com> Date: Mon, 9 Aug 2021 18:18:36 -0400 Subject: Fix compilation on BSD make (from pizza2004). Long-term, this should be fixed by just requiring macOS to use GNU make (probably via setting some alias), but this change is really overdue and not having a macOS computer makes this harder to test. --- libgcc/Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'libgcc') diff --git a/libgcc/Makefile b/libgcc/Makefile index 6461d8e..0e96527 100644 --- a/libgcc/Makefile +++ b/libgcc/Makefile @@ -18,8 +18,8 @@ endif CC1 = ../old_agbcc libgcc.a: libgcc1.a libgcc2.a fp-bit.o dp-bit.o - $(AR) -x libgcc1.a - $(AR) -x libgcc2.a + $(AR) -x libgcc1.a; + $(AR) -x libgcc2.a; $(AR) -rc libgcc.a *.o LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _call_via_rX @@ -66,19 +66,19 @@ libgcc2.a: libgcc2.c longlong.h mv tmplibgcc2.a libgcc2.a fp-bit.o: fp-bit.c - $(CPP) -undef -I ../ginclude -nostdinc -o fp-bit.i fp-bit.c + $(CPP) -undef -I ../ginclude -nostdinc -o fp-bit.i fp-bit.c; $(CC1) -O2 fp-bit.i rm -f fp-bit.i bash -c 'echo -e ".text\n\t.align\t2, 0\n"' >> fp-bit.s - $(AS) -mcpu=arm7tdmi -o fp-bit.o fp-bit.s + $(AS) -mcpu=arm7tdmi -o fp-bit.o fp-bit.s; rm -f fp-bit.s dp-bit.o: dp-bit.c - $(CPP) -undef -I ../ginclude -nostdinc -o dp-bit.i dp-bit.c + $(CPP) -undef -I ../ginclude -nostdinc -o dp-bit.i dp-bit.c; $(CC1) -O2 dp-bit.i rm -f dp-bit.i bash -c 'echo -e ".text\n\t.align\t2, 0\n"' >> dp-bit.s - $(AS) -mcpu=arm7tdmi -o dp-bit.o dp-bit.s + $(AS) -mcpu=arm7tdmi -o dp-bit.o dp-bit.s; rm -f dp-bit.s fp-bit.c: fp-bit-base.c @@ -94,4 +94,4 @@ dp-bit.c: fp-bit-base.c .PHONY: clean clean: - rm -f *.o *.a *.s *.i + rm -f *.o *.a *.s *.i \ No newline at end of file -- cgit v1.2.3