diff mbox

[OpenWrt-Devel] kirkwood gcc/binutils woe?

Message ID E1XyoZ3-0001D1-Nb@stardust.g4.wien.funkfeuer.at
State Superseded
Headers show

Commit Message

Harald Geyer Dec. 10, 2014, 9:12 p.m. UTC
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@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.)


HTH,
Harald
diff mbox

Patch

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