This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gcc] Build fail for 2.95.3 version on a modern system


On 19 February 2014 22:28, Marcello Stanisci wrote:

> Unfortunately, there is another issue. The fresh built compiler, when
> invoked by `make', calls the linker
> (that is the native linker of my system - gnu ld 2.22) and the linker
> cannot find crt1.o and crti.o that exist
> on my system. I also give the
> ``-Wl,--library-path=/usr/lib/i386-linux-gnu/'' (that is the directory
> where those
> object file are) option to the fresh built compiler but it simply ignore it.

I think you can use LD_LIBRARY_PATH to point the linker at that directory.

> Furthermore, I just tried to compile an hello_world program to see if
> my linker find crt1.o and crti.o and it goes fine.

The linker gets told where to find those files by GCC. Your system GCC
understands the modern layout used by Debian and Ubuntu, the ancient
GCC 2.95 doesn't understand that layout, because it was released many
years before Debian changed its filesystem layout.

> So, why does the linker not find a file that I have in my system and
> that it normally finds?

Because GCC 2.95 doesn't know about the "multiach" filesystem layout
of modern Debian systems.

The env vars shown at
http://gcc.gnu.org/ml/gcc-help/2012-05/msg00083.html solve the problem
for more recent versions of GCC on Debian, they might work for GCC
2.95 too.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]