This makes us use CFLAGS when trying to find libgcc, so we don't get the one with the wrong endian or float ABI. Signed-off-by: Peter Jones <pjones@redhat.com>
@@ -161,10 +161,6 @@ endif
endif
-ifneq ($(ARCH),arm)
-export LIBGCC=$(shell $(CC) $(ARCH3264) -print-libgcc-file-name)
-endif
-
ifeq ($(ARCH),arm)
CFLAGS += -marm
@@ -200,3 +196,7 @@ ARFLAGS := rDv
ASFLAGS += $(ARCH3264)
LDFLAGS += -nostdlib --warn-common --no-undefined --fatal-warnings \
--build-id=sha1
+
+ifneq ($(ARCH),arm)
+export LIBGCC=$(shell $(CC) $(CFLAGS) $(ARCH3264) -print-libgcc-file-name)
+endif