Skip to content

Commit 5f4421a

Browse files
committed
if we are building binutils for m68k, and there is an amigaoshunk or 68080 patch, apply it also.
1 parent b252245 commit 5f4421a

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

tools/crosstools/gnu/mmakefile.src

+17-2
Original file line numberDiff line numberDiff line change
@@ -233,19 +233,34 @@ tools-crosstools-mpc :
233233

234234
## Binutils ###
235235

236+
BINUTILS_MAINPATCHSPECS = $(crosstools-binutils--archbase)-aros.diff:$(crosstools-binutils--srcdir):-f,-p1
237+
ifeq ($(AROS_TARGET_CPU),m68k)
238+
AMIGAHUNKPATCH := $(call WILDCARD, binutils-$(BINUTILS_VERSION)-amigaoshunk.diff)
239+
APOLLOPATCH := $(call WILDCARD, binutils-$(BINUTILS_VERSION)-68080.diff)
240+
ifneq ($(AMIGAHUNKPATCH),)
241+
BINUTILS_AMIGAHUNKPATCHSPECS = $(crosstools-binutils--archbase)-amigaoshunk.diff:$(crosstools-binutils--srcdir):-f,-p1
242+
endif
243+
ifneq ($(APOLLOPATCH),)
244+
BINUTILS_APOLLOPATCHSPECS = $(crosstools-binutils--archbase)-68080.diff:$(crosstools-binutils--srcdir):-f,-p1
245+
endif
246+
BINUTILS_EXTRAPATCHSPECS = $(BINUTILS_AMIGAHUNKPATCHSPECS) $(BINUTILS_APOLLOPATCHSPECS)
247+
endif
248+
BINUTILS_PATCHSPECS = $(strip $(BINUTILS_MAINPATCHSPECS) $(BINUTILS_EXTRAPATCHSPECS))
249+
250+
# $(find $(HOSTDIR)/Ports/host/binutils/binutils-$(BINUTILS_VERSION)/ -name *.info -print -exec touch {};)
236251
#MM
237252
tools-crosstools-binutils :
238253
@$(IF) ! $(TEST) -d $(CROSSTOOLSDIR) \
239254
|| ! $(TEST) -f $(binutils-installflag) ; then \
240255
$(RM) $(HOSTGENDIR)/$(CURDIR)/binutils/.files-touched \
241256
&& $(MAKE) -f ./mmakefile crosstools-binutils--fetch \
242257
&& $(MAKE) -f ./mmakefile crosstools-binutils--build_and_install-quick \
243-
&& $(TOUCH) $(binutils-installflag) ; \
258+
&& $(TOUCH) $(binutils-installflag) ; \
244259
fi
245260

246261
%fetch_and_build mmake=crosstools-binutils package=binutils version=$(BINUTILS_VERSION) compiler=host \
247262
package_repo="$(GNU_REPOSITORY)/binutils" \
248-
patch=yes \
263+
patch=yes patches_specs=$(BINUTILS_PATCHSPECS) \
249264
prefix="$(CROSSTOOLSDIR)" usecppflags=no \
250265
extraoptions="$(BINUTILS_EXTRA_OPTS)"
251266

0 commit comments

Comments
 (0)