libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: linker doesn't like .lo files


From: Robert Boehne
Subject: Re: linker doesn't like .lo files
Date: Thu, 18 Oct 2001 15:44:56 -0500

address@hidden wrote:
> 
> I'm trying to make libtool work on OS/390 to support shared library
> building and have run into an issue where the compiler won't accept ".lo"
> files to pass to the linker - it generates an error about an unaccepted
> file extension.  I'm wondering if there is already a mechanism in place for
> dealing with this.  I saw a note in ltmain.sh about "linkers which dislike
> .lo" files (aix specifically - though not true anymore apparently) but all
> this section of code did was link ".o" files to the ".lo" file - which is
> not really the correct behavior in the general sense since this could
> interfere with non-pic and pic objects.  It wasn't clear to me how the
> linker then got passed the ".o" files instead of the ".lo" ones.  Anyone
> have any clues on this?
> 
> Tom.

Tom:

Libtool will take an invocation like
libtool gcc --mode=link foo.lo bar.lo ...
and translate this into the appropriate calls to ar, ld, nm etc.,
with actual object files (foo.o bar.o) passed to them.  The .lo
file contains text to show libtool where and what the real object
files are about.
I think the comments about AIX linker not liking .lo may be
a relic from the days when Libtool put actual object code in .lo files
and passed these to the linker.
In your case, the linker should be passed .o files, only libtool
should be passed .lo files.  In most cases, porting to a new OS
is a fairly simple excercise, add lines in libtool.m4 for your
particular architecture, run the test cases to see what works,
fix what you can, continue this until all tests pass then try
another compiler. ;)   You'll need to know how your system handles
libraries and run-time loading as well.  Check the manual for
more instruction on how to port Libtool.

Thanks,

Robert

-- 
Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]