From patchwork Thu Jan 31 22:04:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 2075701 X-Patchwork-Delegate: deller@gmx.de Return-Path: X-Original-To: patchwork-linux-parisc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 1600ADF2E5 for ; Thu, 31 Jan 2013 22:04:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755450Ab3AaWES (ORCPT ); Thu, 31 Jan 2013 17:04:18 -0500 Received: from mout.gmx.net ([212.227.15.19]:55474 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755014Ab3AaWER (ORCPT ); Thu, 31 Jan 2013 17:04:17 -0500 Received: from mailout-de.gmx.net ([10.1.76.29]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0LrpCq-1Uyjbd3dpG-013bAu for ; Thu, 31 Jan 2013 23:04:15 +0100 Received: (qmail invoked by alias); 31 Jan 2013 22:04:15 -0000 Received: from p54AD01F8.dip0.t-ipconnect.de (EHLO p100.box) [84.173.1.248] by mail.gmx.net (mp029) with SMTP; 31 Jan 2013 23:04:15 +0100 X-Authenticated: #1045983 X-Provags-ID: V01U2FsdGVkX188xIEYCqE86Ik4s6blJMoV0mzytoe5UB4JHcxVKq KE94zUT5aSot0z Date: Thu, 31 Jan 2013 23:04:12 +0100 From: Helge Deller To: linux-parisc@vger.kernel.org, James Bottomley Subject: [PATCH] parisc: enhance automatic CONFIG_CROSS_COMPILE detection Message-ID: <20130131220412.GA15355@p100.box> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Y-GMX-Trusted: 0 Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org The current Makefile will only choose the hppa64 cross compiler when running natively on hppa in a 32bit userspace. This patch additionally chooses the correct 32/64 bit hppa compiler even when doing real cross compiling to hppa/hppa64 from another architecture. Signed-off-by: Helge Deller --- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index 5707f1a..ed9a14c 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile @@ -32,11 +32,6 @@ ifdef CONFIG_64BIT UTS_MACHINE := parisc64 CHECKFLAGS += -D__LP64__=1 -m64 WIDTH := 64 - -# FIXME: if no default set, should really try to locate dynamically -ifeq ($(CROSS_COMPILE),) -CROSS_COMPILE := hppa64-linux-gnu- -endif else # 32-bit WIDTH := endif @@ -44,6 +39,10 @@ endif # attempt to help out folks who are cross-compiling ifeq ($(NATIVE),1) CROSS_COMPILE := hppa$(WIDTH)-linux- +else + ifeq ($(CROSS_COMPILE),) + CROSS_COMPILE := hppa$(WIDTH)-linux-gnu- + endif endif OBJCOPY_FLAGS =-O binary -R .note -R .comment -S