public inbox for
 help / color / mirror / Atom feed
* [PATCH] Pass more options to the assembler.
@ 2007-08-01 17:51 Carlos O'Donell
  2007-08-06  3:16 ` Mark Mitchell
  0 siblings, 1 reply; 2+ messages in thread
From: Carlos O'Donell @ 2007-08-01 17:51 UTC (permalink / raw)
  To: gcc-patches

The driver should pass -w, -I and -v to the gnu assembler. 

If the user requests -w (no warnings), then -W (no warnings) should be
passed to the assembler. The passing of -I options to the assembler
would allow .include and #include to share directories. Lastly, if the
compiler is being verbose, the assembler should list a version string,
so pass -v to the assembler aswell.

Tested on arm-none-eabi, and i686-pc-linux-gnu without regressions.

OK for mainline?

Carlos O'Donell
(650) 331-3385 x716

:ADDPATCH driver:

2007-08-01  Carlos O'Donell  <>

	* Define HAVE_GNU_AS if $gas_flag is yes.
	* configure: Regenerate.
	* Regenerate.
	* gcc.c [HAVE_GNU_AS]: Add "%{v} %{w:-W} %{I*} " to asm_options
	spec string.

---	(revision 127093)
+++	(working copy)
@@ -246,6 +246,9 @@ if test x"${DEFAULT_ASSEMBLER+set}" = x"
 	[Define to enable the use of a default assembler.])
+gnu_as=`if test x"$gas_flag" = x"yes"; then echo 1; else echo 0; fi`
+AC_DEFINE_UNQUOTED(HAVE_GNU_AS, $gnu_as, [Define if using GNU as.])
 AC_MSG_CHECKING([whether a default assembler was specified])
 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
   if test x"$gas_flag" = x"no"; then
Index: gcc.c
--- gcc.c	(revision 127093)
+++ gcc.c	(working copy)
@@ -824,8 +824,13 @@ static const char *cc1_options =
  %{coverage:-fprofile-arcs -ftest-coverage}";
 static const char *asm_options =
-"%{ftarget-help:%:print-asm-header()} \
-%a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}";
+"%{--target-help:%:print-asm-header()} "
+/* If GNU AS is used, then convert -w (no warnings), -I, and -v
+   to the assembler equivalents.  */
+"%{v} %{w:-W} %{I*} "
+"%a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}";
 static const char *invoke_as =

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-06  3:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-01 17:51 [PATCH] Pass more options to the assembler Carlos O'Donell
2007-08-06  3:16 ` Mark Mitchell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).