This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc 3.4 - gnatmake has wrong gcc name
- From: Jim Wilson <wilson at specifixinc dot com>
- To: Joel Sherrill <joel dot sherrill at OARcorp dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 18 Mar 2004 00:25:43 -0800
- Subject: Re: gcc 3.4 - gnatmake has wrong gcc name
- References: <405870C3.50105@OARcorp.com>
Joel Sherrill wrote:
sparc-gcc -c -O -gnata -gnatE -gnato -g
-B/opt/gcc-3.4-test/sparc-rtems4.7/erc32/lib -specs bsp_specs -qrtems
-mcpu=cypress hello.adb
sparc-rtems4: error, unable to locate sparc-gcc
Advice and pointers appreciated.
I suggest looking at the source.
The routines in question here are Find_Program_Name and Program_Name in
ada/osint.adb.
Find_Program_Name gets the executable name, removes everything up to the
last slash, which gives us a program name without any leading path
components.
It then removes everything after the last dot. This is probably
assuming that if there is a dot, then there must be some extension like
.exe to be stripped off. This can be see in the above. Note the error
message says sparc-rtems4, not sparc-rtems4.7-gnatmake because the
supposed file name extension has been removed.
Program_name then removes everything after the last dash, which should
be gnatmake, but in your case is rtems4. This leaves just sparc-. Then
it appends gcc giving sparc-gcc.
The Program_Name ("gcc") call is in make.adb.
I haven't tried to verify any of this with a build or debugger.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com