linux-mips
[Top] [All Lists]

[PATCH] Add as-option to top-level Makefile

To: Sam Ravnborg <sam@ravnborg.org>
Subject: [PATCH] Add as-option to top-level Makefile
From: Paul Mundt <lethal@linux-sh.org>
Date: Sun, 6 Feb 2005 19:03:47 +0200
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-kernel@vger.kernel.org
Mail-followup-to: Paul Mundt <lethal@linux-sh.org>, Sam Ravnborg <sam@ravnborg.org>, Ralf Baechle <ralf@linux-mips.org>, linux-kernel@vger.kernel.org
Original-recipient: rfc822;linux-mips@linux-mips.org
Resent-date: Sun, 6 Feb 2005 18:03:46 +0000
Resent-from: ralf@linux-mips.org
Resent-message-id: <200502061803.j16I3kDh006790@dea.linux-mips.net>
Resent-to: linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.6i
cc-option can presently not be used for checking as flags. It seems like
MIPS ran into this already and added their own as-option (which at this
point seems to be completely unused on MIPS, so perhaps it's worth
removing entirely from there).

This patch moves the definition to the top-level Makefile so that others
can make use of it (sh wants this with newer binutils that allow for ISA
tuning, for instance).

Additionally, it may make more sense to move the -Wa$(comma) stuff into
as-option directly so it doesn't get repeated all over the place (though
it seems unlikely that there will be enough users that actually care
about this).

===== Makefile 1.563 vs edited =====
--- 1.563/Makefile      2005-02-03 03:50:51 +02:00
+++ edited/Makefile     2005-02-06 18:50:49 +02:00
@@ -279,6 +279,13 @@
 # cc support functions to be used (only) in arch/$(ARCH)/Makefile
 # See documentation in Documentation/kbuild/makefiles.txt
 
+# as-option
+# Usage: cflags-y += $(call as-option, -Wa$(comma)-isa=foo,)
+
+as-option = $(shell if $(CC) $(CFLAGS) $(1) -Wa,-Z -c -o /dev/null \
+            -xassembler /dev/null > /dev/null 2>&1; then echo "$(1)"; \
+            else echo "$(2)"; fi ;)
+
 # cc-option
 # Usage: cflags-y += $(call gcc-option, -march=winchip-c6, -march=i586)
 
===== arch/mips/Makefile 1.28 vs edited =====
--- 1.28/arch/mips/Makefile     2005-01-31 08:33:43 +02:00
+++ edited/arch/mips/Makefile   2005-02-06 18:49:20 +02:00
@@ -12,10 +12,6 @@
 # for "archclean" cleaning up for this architecture.
 #
 
-as-option = $(shell if $(CC) $(CFLAGS) $(1) -Wa,-Z -c -o /dev/null \
-            -xassembler /dev/null > /dev/null 2>&1; then echo "$(1)"; \
-            else echo "$(2)"; fi ;)
-
 cflags-y :=
 
 #

Attachment: pgp0IpZMZUUhm.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>