From patchwork Fri Jul 19 15:57:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markos Chandras X-Patchwork-Id: 260302 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id B1DC22C0090 for ; Sat, 20 Jul 2013 01:58:01 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id D57299375D; Fri, 19 Jul 2013 15:58:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KXtOjvCp5W8e; Fri, 19 Jul 2013 15:58:05 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 56FB093752; Fri, 19 Jul 2013 15:58:05 +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 B88BD1BF9A2 for ; Fri, 19 Jul 2013 15:58:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9C07D8D461 for ; Fri, 19 Jul 2013 15:57:57 +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 qnDysOnvvb+s for ; Fri, 19 Jul 2013 15:57:57 +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 3B8E18D454 for ; Fri, 19 Jul 2013 15:57:57 +0000 (UTC) From: Markos Chandras To: Date: Fri, 19 Jul 2013 16:57:43 +0100 Message-ID: <1374249463-10594-1-git-send-email-markos.chandras@imgtec.com> X-Mailer: git-send-email 1.8.3.2 MIME-Version: 1.0 X-Originating-IP: [192.168.154.58] X-SEF-Processed: 7_3_0_01192__2013_07_19_16_57_55 Subject: [Buildroot] [PATCH v2] 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 uClibc picks the wrong interpreter for MIPS64/n64. This patch fixes this problem by checking the selected MIPS ABI instead of the MIPS variant. The patch has been committed upstream: http://git.uclibc.org/uClibc/commit/?id=603af30d6992e94ac30a66b953264076f4f2fd71 Signed-off-by: Markos Chandras --- Changes since v1: - Adjust to new uclibc paths - Update patch to be compatible with make-3.80 and match the one actually committed upstream --- .../uclibc-0009-mips64-fix-n64-interp.patch | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 package/uclibc/0.9.33.2/uclibc-0009-mips64-fix-n64-interp.patch diff --git a/package/uclibc/0.9.33.2/uclibc-0009-mips64-fix-n64-interp.patch b/package/uclibc/0.9.33.2/uclibc-0009-mips64-fix-n64-interp.patch new file mode 100644 index 0000000..7efef78 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0009-mips64-fix-n64-interp.patch @@ -0,0 +1,51 @@ +From 603af30d6992e94ac30a66b953264076f4f2fd71 Mon Sep 17 00:00:00 2001 +From: Markos Chandras +Date: Thu, 11 Jul 2013 16:59:16 +0000 +Subject: 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 +Cc: Anthony G. Basile +Signed-off-by: Bernhard Reutner-Fischer +--- +diff --git a/Rules.mak b/Rules.mak +index 792b794..889108e 100644 +--- a/Rules.mak ++++ b/Rules.mak +@@ -138,13 +138,19 @@ 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 := 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 +-UCLIBC_LDSO_NAME := ld-uClibc +-ARCH_NATIVE_BIT := 32 ++ifeq ($(CONFIG_MIPS_N64_ABI),y) ++UCLIBC_LDSO_NAME := ld64-uClibc ++ARCH_NATIVE_BIT := 64 + endif ++endif ++ + UCLIBC_LDSO := $(UCLIBC_LDSO_NAME).so.$(ABI_VERSION) + NONSHARED_LIBNAME := uclibc_nonshared.a + libc := $(top_builddir)lib/$(SHARED_LIBNAME) +-- +cgit v0.9.1