Skip to content

Commit 1bd27cd

Browse files
pcercueiQuzarDC
authored andcommitted
dc-chain: Remove fake-kos.o from all libgcc.a
When building a multilib toolchain, for instance to support -m4-single-only and -m4-single, multiple variants of libgcc.a are built. We need to remove the fake-kos.o object from all of them. Signed-off-by: Paul Cercueil <[email protected]>
1 parent 3668770 commit 1bd27cd

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

utils/dc-chain/scripts/gcc-pass2.mk

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Sega Dreamcast Toolchains Maker (dc-chain)
22
# This file is part of KallistiOS.
33

4+
__comma:=,
5+
__libgcc=$(foreach item,$(addprefix -,$(subst $(__comma), ,$(precision_modes))) "",$(shell $(toolchain_path)/bin/$(target)-gcc $(item) -print-file-name=libgcc.a))
6+
47
$(build_gcc_pass2): build = build-gcc-$(target)-$(gcc_ver)-pass2
58
$(build_gcc_pass2): logdir
69
@echo "+++ Building $(src_dir) to $(build) (pass 2)..."
@@ -32,7 +35,7 @@ ifdef enable_ada
3235
endif
3336
endif
3437
$(MAKE) -C $(build) $(install_mode) DESTDIR=$(DESTDIR) $(to_log)
35-
$(toolchain_path)/bin/$(target)-gcc-ar d \
36-
$(shell $(toolchain_path)/bin/$(target)-gcc -print-file-name=libgcc.a) \
37-
fake-kos.o $(to_log)
38+
for each in $(__libgcc) ; do \
39+
$(toolchain_path)/bin/$(target)-gcc-ar d $$each fake-kos.o $(to_log) ; \
40+
done
3841
$(clean_up)

0 commit comments

Comments
 (0)