From b6553680a1c58e3b68124053bee89f3e15b76131 Mon Sep 17 00:00:00 2001 From: John-Mark Bell Date: Thu, 3 Nov 2022 18:20:07 +0000 Subject: libexpat/m68k-unknown-amigaos: explicit -lgcc For whatever reason (and this really should not be necessary), linking will fail without doing this as libgcc gets evaluated by ld after libm, and thus cannot resolve the symbols it needs. --- sdk/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sdk/Makefile b/sdk/Makefile index 82cdc62..4c8c6a7 100644 --- a/sdk/Makefile +++ b/sdk/Makefile @@ -171,7 +171,10 @@ ifeq ($(TARGET),m68k-unknown-amigaos) else LIBCURL_ENV := CFLAGS="-I$(GCCSDK_INSTALL_ENV)/netinclude -D__NO_NET_API" LIBS="-lm" endif - LIBEXPAT_ENV := LDFLAGS="-lm" + # XXX: libgcc is meant to be implied, but for some reason that + # results in ld evaluating it after libm and thus failing to find symbols. + # Hack around it by forcing the link order here. + LIBEXPAT_ENV := LDFLAGS="-lgcc -lm" endif ifeq ($(SDK_ITEMS),) -- cgit v1.2.3