gcc 3.4 - gnatmake has wrong gcc name

Jim Wilson wilson@specifixinc.com
Thu Mar 18 09:11:00 GMT 2004


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



More information about the Gcc mailing list