* Passing -auxbase to cc1 thru gcc
@ 2004-09-22 15:36 Clifford Wolf
2004-09-24 15:57 ` [PATCH] " Clifford Wolf
0 siblings, 1 reply; 2+ messages in thread
From: Clifford Wolf @ 2004-09-22 15:36 UTC (permalink / raw)
To: gcc
Hi,
I'm using gcc 3.4.2 and I have the following problem with it:
Usually the -auxbase option to cc1 is autogenerated from the specs file. So
e.g. the gcc call "gcc-34 -v -fprofile-arcs demo.c" results in something
such as:
/usr/libexec/gcc/i386-unknown-linux-gnu/3.4.2/cc1 -quiet -v demo.c -quiet \
-dumpbase demo.c -auxbase demo -version -fprofile-arcs -o /tmp/ccTzVYVe.s
The "-auxbase demo" is added from the specs file:
%{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}%{!c:%{!S:-auxbase %b}}
So I want to set my own auxbase using something like:
gcc-34 -v -auxbase /tmp/myprofile/demo -fprofile-arcs demo.c
But this is then converted by gcc to:
gcc-34: /tmp/myprofile/demo: No such file or directory
/usr/libexec/gcc/i386-unknown-linux-gnu/3.4.2/cc1 -quiet -v demo.c -quiet \
-dumpbase demo.c -auxbase -auxbase demo -version-fprofile-arcs -o /tmp/ccezahKk.s
So, because gcc doesn't know -auxbase it just passes it thru to cc1. But
since it doesn't know that -auxbase takes an argument, it simply thinks
that /tmp/myprofile/demo is just another source file..
Should setting -auxbase from the gcc command line be supported? (I've found
the option from reading the gcc sources - there seams to be no
documentation about it.)
Am I doing something wrong or is that a bug in gcc?
yours,
- clifford
--
____ ___ ____ _ __ _ _ www.rocklinux.org
| _ \ / _ \ / ___| |/ / | | (_)_ __ _ ___ __
| |_) | | | | | | ' / | | | | '_ \| | | \ \/ /
| _ <| |_| | |___| . \ | |___| | | | | |_| |> < Clifford Wolf
|_| \_\\___/ \____|_|\_\ |_____|_|_| |_|\__,_/_/\_\ www.clifford.at
To understand recursion, you must first understand recursion.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] Re: Passing -auxbase to cc1 thru gcc
2004-09-22 15:36 Passing -auxbase to cc1 thru gcc Clifford Wolf
@ 2004-09-24 15:57 ` Clifford Wolf
0 siblings, 0 replies; 2+ messages in thread
From: Clifford Wolf @ 2004-09-24 15:57 UTC (permalink / raw)
To: gcc
On Wed, Sep 22, 2004 at 04:18:00PM +0200, Clifford Wolf wrote:
> gcc-34 -v -auxbase /tmp/myprofile/demo -fprofile-arcs demo.c
> [...]
Hi,
I'm not sure whether this silence on the topic means, but here is the
rather trivial fix for the problem:
--- ./gcc/gcc.h.orig 2004-09-24 15:42:27.000000000 +0200
+++ ./gcc/gcc.h 2004-09-24 15:43:24.000000000 +0200
@@ -46,6 +46,7 @@
(!strcmp (STR, "Tdata") || !strcmp (STR, "Ttext") \
|| !strcmp (STR, "Tbss") || !strcmp (STR, "include") \
|| !strcmp (STR, "imacros") || !strcmp (STR, "aux-info") \
+ || !strcmp (STR, "auxbase") || !strcmp (STR, "auxbase-strip") \
|| !strcmp (STR, "idirafter") || !strcmp (STR, "iprefix") \
|| !strcmp (STR, "iwithprefix") || !strcmp (STR, "iwithprefixbefore") \
|| !strcmp (STR, "isystem") || !strcmp (STR, "-param") \
--- ./gcc/gcc.c.orig 2004-09-24 15:44:36.000000000 +0200
+++ ./gcc/gcc.c 2004-09-24 15:48:48.000000000 +0200
@@ -765,9 +765,9 @@
/* NB: This is shared amongst all front-ends. */
static const char *cc1_options =
"%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
- %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*}\
+ %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*}\
%{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}%{!c:%{!S:-auxbase %b}}\
- %{g*} %{O*} %{W*&pedantic*} %{w} %{std*} %{ansi}\
+ %{a*} %{g*} %{O*} %{W*&pedantic*} %{w} %{std*} %{ansi}\
%{v:-version} %{pg:-p} %{p} %{f*} %{undef}\
%{Qn:-fno-ident} %{--help:--help}\
%{--target-help:--target-help}\
yours,
- clifford
--
_________ ____ __ __ $_ = q 7nz!y="Ccv'Dpgiutvcbb'oj'Pocj'*'qqq[
/ ___/ __ \/ __ `/ | /| / / ej`q[iv`";!|=1;!y=~t%].[%nz!z=!1;gps]1..6[{
/ /__/ / / / /_/ /| |/ |/ / qsjou"!z\c";tfmfdu]voefg,voefg,voefg,0.05[;
\___/_/ /_/\__, / |__/|__/ !z=~t/].[/dis]pse]!1[^!_[/fh;}qsjou !z;%fh;
CCC Wien /____/www.cngw.org qsjou "\o"7;s/\n//g;y/[b-za]!/)a-z($/;eval;
To understand recursion, you must first understand recursion.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-09-24 13:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-22 15:36 Passing -auxbase to cc1 thru gcc Clifford Wolf
2004-09-24 15:57 ` [PATCH] " Clifford Wolf
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).