From patchwork Mon Feb 16 21:47:34 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 7499 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n1GLllAW025713 for ; Mon, 16 Feb 2009 21:47:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752434AbZBPVrj (ORCPT ); Mon, 16 Feb 2009 16:47:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751923AbZBPVrj (ORCPT ); Mon, 16 Feb 2009 16:47:39 -0500 Received: from mail.gmx.net ([213.165.64.20]:60484 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752434AbZBPVri (ORCPT ); Mon, 16 Feb 2009 16:47:38 -0500 Received: (qmail invoked by alias); 16 Feb 2009 21:47:35 -0000 Received: from mnhm-590e0559.pool.einsundeins.de (EHLO halden.box) [89.14.5.89] by mail.gmx.net (mp038) with SMTP; 16 Feb 2009 22:47:35 +0100 X-Authenticated: #1045983 X-Provags-ID: V01U2FsdGVkX18nn9kngjAnD85dTSKKxM7ZvPJdf9nsOBnus+evaT cjFssHAD6yJEkn Message-ID: <4999DEF6.4070300@gmx.de> Date: Mon, 16 Feb 2009 22:47:34 +0100 From: Helge Deller User-Agent: Thunderbird 2.0.0.19 (X11/20081209) MIME-Version: 1.0 To: Kyle McMartin , linux-parisc Subject: [PATCH] parisc: autoselect 32/64bit compiler X-Enigmail-Version: 0.95.7 X-Y-GMX-Trusted: 0 X-FuHaFi: 0.5 Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org Automatically select correct 32- or 64bit (cross) compiler, independent if the kernel is built locally (e.g. 64bit kernel target on 32bit userspace) or cross-compiled from another architecture. This patch allows one to just run make ARCH=parisc when run as cross compiler, or just make when run locally. 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 da6f669..9d0bd90 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile @@ -22,23 +22,12 @@ KBUILD_DEFCONFIG := default_defconfig NM = sh $(srctree)/arch/parisc/nm CHECKFLAGS += -D__hppa__=1 -MACHINE := $(shell uname -m) -ifeq ($(MACHINE),parisc*) -NATIVE := 1 -endif - ifdef CONFIG_64BIT UTS_MACHINE := parisc64 CHECKFLAGS += -D__LP64__=1 -m64 -WIDTH := 64 CROSS_COMPILE := hppa64-linux-gnu- else # 32-bit -WIDTH := -endif - -# attempt to help out folks who are cross-compiling -ifeq ($(NATIVE),1) -CROSS_COMPILE := hppa$(WIDTH)-linux- +CROSS_COMPILE := hppa-linux-gnu- endif OBJCOPY_FLAGS =-O binary -R .note -R .comment -S