From patchwork Wed Sep 25 15:00:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markos Chandras X-Patchwork-Id: 277896 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 8D0E72C009A for ; Thu, 26 Sep 2013 01:01:09 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 6FFA5316CB; Wed, 25 Sep 2013 15:01:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Y2syYeJiwSGv; Wed, 25 Sep 2013 15:01:03 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id DD0F6317F7; Wed, 25 Sep 2013 15:01:02 +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 598E91BFA31 for ; Wed, 25 Sep 2013 15:01:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 52A2B8A8AD for ; Wed, 25 Sep 2013 15:01:01 +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 8SjTkUOu92bg for ; Wed, 25 Sep 2013 15:01:00 +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 49DE788CF0 for ; Wed, 25 Sep 2013 15:01:00 +0000 (UTC) From: Markos Chandras To: Date: Wed, 25 Sep 2013 16:00:57 +0100 Message-ID: <1380121257-10449-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.31] X-SEF-Processed: 7_3_0_01192__2013_09_25_16_00_58 Subject: [Buildroot] [PATCH] glibc: Pass correct -mabi for MIPS 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 According to glibc-2.18/ports/sysdeps/mips/preconfigure, if no -mabi was passed to CFLAGS, then it defaults to -mabi=n32. This breaks o32 and n64 builds for MIPS64. Therefore, it is necessary to append -mabi to CFLAGS. Signed-off-by: Markos Chandras Acked-by: Thomas Petazzoni --- package/glibc/glibc.mk | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk index 4dd2e63..68c4636 100644 --- a/package/glibc/glibc.mk +++ b/package/glibc/glibc.mk @@ -43,6 +43,16 @@ ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y) GLIBC_EXTRA_CFLAGS += -marm endif +# MIPS64 defaults to n32 so pass the correct -mabi if +# we are using a different ABI. OABI32 is also used +# in MIPS so we pass -mabi=32 in this case as well +# even though it's not strictly necessary. +ifeq ($(BR2_MIPS_NABI64),y) +GLIBC_EXTRA_CFLAGS += -mabi=64 +else ifeq ($(BR2_MIPS_OABI32),y) +GLIBC_EXTRA_CFLAGS += -mabi=32 +endif + # Even though we use the autotools-package infrastructure, we have to # override the default configure commands for several reasons: #