Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GCC, detailed command line arguments

1,658 views
Skip to first unread message

tns1

unread,
Aug 20, 2008, 1:33:56 PM8/20/08
to
Is there a way to get an implementation of GCC to show what parameters
is supports? For instance I am using the GNUARM arm-elf-gcc. I can use
--help and --target-help, but the info is far from complete. How do I
get a list of all supported parameters for -march, -mcpu, and all the
other CL arguments that expect a string argument?

tns1

unread,
Aug 20, 2008, 2:11:43 PM8/20/08
to
I do see that -dumpspecs will show strings, but it seems to be an
all-inclusive string dump without much organization. If I already knew
what the the strings were, I could probably find them in that dump, but
that is a far cry from telling me what strings are accepted for each
parameter.

rob windgassen

unread,
Aug 20, 2008, 5:00:14 PM8/20/08
to

Look at the gcc manual at http://gcc.gnu.org/onlinedocs/

e.g. for gcc version 4.3.0 the arm options can be found here
http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/ARM-Options.html#ARM-Options

Rob

Steve Turner

unread,
Aug 20, 2008, 6:08:05 PM8/20/08
to

I may be reading into the OP's question, but based upon what I remember
about building gcc from source (and it's been many many years since I
tried to do so), isn't it true that support for various options will
come and go depending on how you configure the build? I think what the
OP wants (and I've wanted the same thing myself) is to have the compiler
*tell* you what options it supports based on how it was configured,
which is not something you can get (reliably) from the documentation...
I'm aware of "gcc --target-help" but it's not clear to me whether that
information is programatically or statically generated.

--
For every action there is an equal and opposite criticism.
To reply, eat the taco.

tns1

unread,
Aug 20, 2008, 6:16:05 PM8/20/08
to

Thanks.
I expected the tool would have the ability to tell you what options it
supports. Without that, there is bound to be the occasional disconnect
between the written docs and the actual SW. The page you pointed to is
gcc 4.3.0, and my install says arm-elf-gcc 4.1.1, so there are probably
differences.

tns1

unread,
Aug 20, 2008, 6:17:29 PM8/20/08
to
Yes, exactly so.

rob windgassen

unread,
Aug 21, 2008, 6:42:30 PM8/21/08
to

Follow the first link and look at the gcc 4.1.2 documentation.
With gcc most new features are introduced in major releases such as
4.1.0, 4.2.0 etc, while 4.1.1 and 4.1.2 are mainly bugfixes, so
documentation for gcc 4.1.2 should cover features of 4.1.1 as well.

When the documentation turns out to be incorrect you can file a bug and/
or look in the source ;-)

Rob

0 new messages