From patchwork Wed Jul 3 11:00:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markos Chandras X-Patchwork-Id: 256596 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 21D202C0084 for ; Wed, 3 Jul 2013 21:00:47 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 0264DE0EB; Wed, 3 Jul 2013 11:00:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YexodC3SG9H9; Wed, 3 Jul 2013 11:00:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id DFC01C2BC; Wed, 3 Jul 2013 11:00:43 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 01FAF8F7B3 for ; Wed, 3 Jul 2013 11:00:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id F13AD8AE59 for ; Wed, 3 Jul 2013 11:00:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JfTzmdXJCZrz for ; Wed, 3 Jul 2013 11:00:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from multi.imgtec.com (multi.imgtec.com [194.200.65.239]) by whitealder.osuosl.org (Postfix) with ESMTPS id 672CF8A88F for ; Wed, 3 Jul 2013 11:00:40 +0000 (UTC) From: Markos Chandras To: Date: Wed, 3 Jul 2013 12:00:27 +0100 Message-ID: <1372849227-31525-1-git-send-email-markos.chandras@gmail.com> X-Mailer: git-send-email 1.8.2.1 MIME-Version: 1.0 X-SEF-Processed: 7_3_0_01192__2013_07_03_12_00_37 Subject: [Buildroot] [PATCH] uClibc: Add uClibc patch to fix MIPS64/n64 interpreter X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net From: Markos Chandras uClibc picks the wrong interpreter for MIPS64/n64. This patch fixes this problem by checking the selected MIPS ABI instead of the MIPS variant. This patch was sent upstream: http://lists.uclibc.org/pipermail/uclibc/2013-July/047838.html Signed-off-by: Markos Chandras --- toolchain/uClibc/uClibc-0.9.33.2-mips64n64.patch | 52 ++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 toolchain/uClibc/uClibc-0.9.33.2-mips64n64.patch diff --git a/toolchain/uClibc/uClibc-0.9.33.2-mips64n64.patch b/toolchain/uClibc/uClibc-0.9.33.2-mips64n64.patch new file mode 100644 index 0000000..6eb3ab9 --- /dev/null +++ b/toolchain/uClibc/uClibc-0.9.33.2-mips64n64.patch @@ -0,0 +1,52 @@ +From b598215c00a1f9df5d47ce2a730399787351b782 Mon Sep 17 00:00:00 2001 +From: Markos Chandras +Date: Mon, 1 Jul 2013 09:59:40 +0100 +Subject: [PATCH uClibc] Rules.mak: MIPS64: Select correct interpreter + +gcc (eg 4.7.3) hardcodes the MIPS64 interpreters like this: +(see gcc/config/linux.h and gcc/config/mips/linux64.h) + +o32: UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +n32: UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0" +n64: UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" + +The existing check for MIPS64 in uClibc is wrong because it does +not respect the selected ABI + +We fix this by explicitely checking the selected ABI instead of the +selected MIPS variant. + +Signed-off-by: Markos Chandras +--- + Rules.mak | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/Rules.mak b/Rules.mak +index 792b794..87eb5ae 100644 +--- a/Rules.mak ++++ b/Rules.mak +@@ -138,13 +138,17 @@ export MAJOR_VERSION MINOR_VERSION SUBLEVEL VERSION ABI_VERSION LC_ALL + LIBC := libc + SHARED_LIBNAME := $(LIBC).so.$(ABI_VERSION) + UBACKTRACE_DSO := libubacktrace.so.$(ABI_VERSION) +-ifneq ($(findstring $(TARGET_ARCH) , hppa64 ia64 mips64 powerpc64 s390x sparc64 x86_64 ),) +-UCLIBC_LDSO_NAME := ld64-uClibc +-ARCH_NATIVE_BIT := 64 +-else ++ + UCLIBC_LDSO_NAME := ld-uClibc + ARCH_NATIVE_BIT := 32 ++ifneq ($(findstring $(TARGET_ARCH) , hppa64 ia64 powerpc64 s390x sparc64 x86_64 ),) ++UCLIBC_LDSO_NAME := ld64-uClibc ++ARCH_NATIVE_BIT := 64 ++else ifeq ($(CONFIG_MIPS_N64_ABI),y) ++UCLIBC_LDSO_NAME := ld64-uClibc ++ARCH_NATIVE_BIT := 64 + endif ++ + UCLIBC_LDSO := $(UCLIBC_LDSO_NAME).so.$(ABI_VERSION) + NONSHARED_LIBNAME := uclibc_nonshared.a + libc := $(top_builddir)lib/$(SHARED_LIBNAME) +-- +1.8.2.1 +