How to include a front end to gcc ?

Andi Hellmund mail@andihellmund.com
Fri Mar 5 22:43:00 GMT 2010


Hey Greicy,

great that you made some progress.

> for name in hello1.exe; \
>         do \
>            if [ -f $name ] ; then \
>             name2="`echo \`basename $name\` | sed -e 's,y,y,' `"; \
>             rm -f /usr/local/bin/$name2.exe; \
>             echo /bin/install -c $name.exe /usr/local/bin/$name2.exe; \
>             /bin/install -c $name.exe /usr/local/bin/$name2.exe; \
>             chmod a+x /usr/local/bin/$name2.exe; \
>           fi ; \
>         done
> /bin/install -c hello1.exe.exe /usr/local/bin/hello1.exe.exe
> /bin/install: cannot stat `hello1.exe.exe': No such file or directory
> chmod: cannot access `/usr/local/bin/hello1.exe.exe': No such file or
> directory
There is apparently an error in the Make-lang.in file in the front-end
directory gcc/hello-world.

The compiler is named 'hello1.exe' but the installer tries to install
the file 'hello1.exe.exe' which doesn't exist. Though, the easiest fix
would be to change the first line into

    for name in hello1
    [...]

Then you should be able to install gcc in the --prefix=<...> defined
directory.

> Is necessary to do $make install, ok?
Yes, it is generally necessary to install gcc for at least three reasons:

(1) you won't find the gcc compiler driver in the build directory,
because it is called xgcc and will be renamed into gcc during installation
(2) if you call xgcc from the build directory, it won't find the real
compiler (cc1)
(3) if you call xgcc from the build directory, it won't possibly find
libraries like libgcc

In your case where you only built a compiler (without driver), you don't
necessarily need to install your compiler - it should work without - but
you need to try :)

Andi



More information about the Gcc-help mailing list