From: David Vrabel <dvrabel@cantab.net>
To: kai@germaschewski.name, sam@ravnborg.org
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: kbuild Makefile: allow checking if ARCH and CROSS_COMPILE is set
Date: Thu, 03 Mar 2005 15:46:17 +0000 [thread overview]
Message-ID: <42273149.7030802@cantab.net> (raw)
Hi,
It can be useful for distributors for kernel source trees intended
for cross-compilation only (e.g., for embedded targets) to ensure
the user has set ARCH and CROSS_COMPILE.
This patch allows one to create the file .force-cross-compile containing
the word "yes" to enable such a test.
Signed-off-by: David Vrabel <dvrabel@arcom.com>
Index: linux-2.6-working/Makefile
===================================================================
--- linux-2.6-working.orig/Makefile 2005-03-03 15:03:33.177767998 +0000
+++ linux-2.6-working/Makefile 2005-03-03 15:21:44.366657764 +0000
@@ -189,6 +189,19 @@
# Default value for CROSS_COMPILE is not to prefix executables
# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
+# Creating the file .force-cross-compile containing the word "yes"
+# will ensure the user specifies ARCH and CROSS_COMPILE. This is
+# handy for distributers of kernel trees intended for
+# cross-compilation only.
+ifeq ($(shell cat .force-cross-compile),yes)
+ ifeq ($(ARCH),)
+ $(error ARCH is unset)
+ endif
+ ifeq ($(CROSS_COMPILE),)
+ $(error CROSS_COMPILE is unset)
+ endif
+endif
+
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?=
reply other threads:[~2005-03-03 15:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42273149.7030802@cantab.net \
--to=dvrabel@cantab.net \
--cc=kai@germaschewski.name \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox