From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23929 invoked by alias); 1 Aug 2007 17:51:52 -0000 Received: (qmail 23912 invoked by uid 22791); 1 Aug 2007 17:51:51 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 01 Aug 2007 17:51:47 +0000 Received: (qmail 29933 invoked from network); 1 Aug 2007 17:51:44 -0000 Received: from unknown (HELO localhost) (carlos@127.0.0.2) by mail.codesourcery.com with ESMTPA; 1 Aug 2007 17:51:44 -0000 Date: Wed, 01 Aug 2007 17:51:00 -0000 From: Carlos O'Donell To: gcc-patches@gcc.gnu.org Subject: [PATCH] Pass more options to the assembler. Message-ID: <20070801175134.GR18317@lios> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-08/txt/msg00069.txt.bz2 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 * 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