[OpenWrt-Devel] kirkwood gcc/binutils woe?

Harald Geyer harald at ccbib.org
Wed Dec 10 16:12:53 EST 2014


Hi!

I ran into the same issue just a few days ago on mxs. Probably most,
if not all arm targets are affected.

nwf writes:
> > root at OpenWrt:/tmp# gcc -o hello hello.c 
> > /usr/bin/ld: unrecognised emulation mode: armelf_linux_eabi
> > Supported emulations: armelf_linux armelf armelfb armelfb_linux
> > collect2: error: ld returned 1 exit status
> 
> And I'm really not sure what that means or what to do about it.

Looks like binutils is built for OABI while gcc is built for EABI.
Since at least mxs is actually using EABI I think gcc is right and
binutils is wrong.

Try if the following patch solves the problem. (Don't have my test
board around right now.)

diff --git a/package/devel/binutils/Makefile b/package/devel/binutils/Makefile
index ff968b9..4aefeca 100644
--- a/package/devel/binutils/Makefile
+++ b/package/devel/binutils/Makefile
@@ -48,6 +48,8 @@ endef
 TARGET_CFLAGS += $(FPIC) -Wno-unused-value

 CONFIGURE_ARGS += \
+	--host=$(REAL_GNU_TARGET_NAME) \
+	--target=$(REAL_GNU_TARGET_NAME) \
 	--enable-shared \
 	--enable-install-libiberty \
 	--enable-install-libbfd

HTH,
Harald
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list