lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 31 Jul 2011 15:44:57 -0400
From:	Aunt Tillie <lacombar@...il.com>
To:	Michal Marek <mmarek@...e.cz>
Cc:	linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org,
	David Woodhouse <dwmw2@...radead.org>,
	Aunt Tillie <lacombar@...il.com>
Subject: [PATCH] kbuild: honor the ARCH setting of the existing configuration

This change make Kbuild honor the ARCH setting of the existing configuration, if
any .config is present so that it does not get reset if there is a conflict
with the default ARCH for the platform and the current setting.

Signed-off-by: Arnaud Lacombe aka. Aunt Tillie <lacombar@...il.com>
---
 Makefile |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index f676d15..bb2f1fc 100644
--- a/Makefile
+++ b/Makefile
@@ -192,7 +192,12 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
 # Default value for CROSS_COMPILE is not to prefix executables
 # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
 export KBUILD_BUILDHOST := $(SUBARCH)
-ARCH		?= $(SUBARCH)
+ifeq ($(shell test -e .config && echo y),y)
+ARCH		?= $(shell sed '/^\# Linux\/\(.*\) .* Kernel Configuration/!d; s//\1/' .config)
+endif
+ifeq ($(ARCH),)
+ARCH		:= $(SUBARCH)
+endif
 CROSS_COMPILE	?= $(CONFIG_CROSS_COMPILE:"%"=%)
 
 # Architecture as present in compile.h
-- 
1.7.6.153.g78432

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ