From patchwork Wed Dec 10 10:12:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harald Geyer X-Patchwork-Id: 419869 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id CA5A71400E9 for ; Thu, 11 Dec 2014 08:13:46 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 45B0328C11E; Wed, 10 Dec 2014 22:11:47 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 7FF8A284DFA for ; Wed, 10 Dec 2014 22:11:37 +0100 (CET) X-policyd-weight: using cached result; rate: -7.6 Received: from mail.cosmopool.net (h1.radempa.de [176.9.142.194]) by arrakis.dune.hu (Postfix) with ESMTP for ; Wed, 10 Dec 2014 22:11:36 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.cosmopool.net (Postfix) with ESMTP id D3366903FEA; Wed, 10 Dec 2014 22:13:20 +0100 (CET) Received: from mail.cosmopool.net ([127.0.0.1]) by localhost (mail.your-server.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ansdJdPGKBUz; Wed, 10 Dec 2014 22:13:20 +0100 (CET) Received: from stardust.g4.wien.funkfeuer.at (46.220.2.140.wireless.dyn.drei.com [46.220.2.140]) by mail.cosmopool.net (Postfix) with ESMTPSA id A15C8903A80; Wed, 10 Dec 2014 22:13:19 +0100 (CET) Received: from lambda (helo=stardust.g4.wien.funkfeuer.at) by stardust.g4.wien.funkfeuer.at with local-esmtp (Exim 4.80) (envelope-from ) id 1XyoZ3-0001D1-Nb; Wed, 10 Dec 2014 22:12:53 +0100 From: Harald Geyer To: nwf <8S9K8UGO5JGPI3U067229BBACKMQIGVH@cmx.ietfng.org> In-reply-to: <20141206233353.GI34369@nwf.oc.ietfng.org> References: <20141206233353.GI34369@nwf.oc.ietfng.org> Comments: In-reply-to nwf <8S9K8UGO5JGPI3U067229BBACKMQIGVH@cmx.ietfng.org> message dated "Sat, 06 Dec 2014 23:33:54 +0000." MIME-Version: 1.0 Content-ID: <4649.1418245973.1@stardust.g4.wien.funkfeuer.at> Date: Wed, 10 Dec 2014 22:12:53 +0100 Message-Id: Cc: openwrt-devel@lists.openwrt.org, Christian Beier Subject: Re: [OpenWrt-Devel] kirkwood gcc/binutils woe? X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" 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 --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