public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Carlos O'Donell <carlos@codesourcery.com>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] Pass more options to the assembler.
Date: Wed, 01 Aug 2007 17:51:00 -0000	[thread overview]
Message-ID: <20070801175134.GR18317@lios> (raw)


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?

Cheers,
Carlos.
-- 
Carlos O'Donell
CodeSourcery
carlos@codesourcery.com
(650) 331-3385 x716

:ADDPATCH driver:

2007-08-01  Carlos O'Donell  <carlos@codesourcery.com>

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

Index: configure.ac
===================================================================
--- configure.ac	(revision 127093)
+++ configure.ac	(working copy)
@@ -246,6 +246,9 @@ if test x"${DEFAULT_ASSEMBLER+set}" = x"
 	[Define to enable the use of a default assembler.])
 fi
 
+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 HAVE_GNU_AS
+/* If GNU AS is used, then convert -w (no warnings), -I, and -v
+   to the assembler equivalents.  */
+"%{v} %{w:-W} %{I*} "
+#endif
+"%a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}";
 
 static const char *invoke_as =
 #ifdef AS_NEEDS_DASH_FOR_PIPED_INPUT

             reply	other threads:[~2007-08-01 17:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-01 17:51 Carlos O'Donell [this message]
2007-08-06  3:16 ` Mark Mitchell

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=20070801175134.GR18317@lios \
    --to=carlos@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).