This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc-v3: portability of 'ar' w/o file list?
>>>>> "Alexandre" == Alexandre Oliva <aoliva@redhat.com> writes:
Alexandre> I'm afraid that's the only option. I'd thought about
Alexandre> arranging for libtool to handle this case and create an
Alexandre> empty archive, but (i) there's no portable way to
Alexandre> create empty archives and (ii) some linkers print odd
Alexandre> error messages or just crash when given such an empty
Alexandre> archive.
Why not have libtool create a non-empty archive, containing a dummy .o
with no external symbols? Or just notice that there are no files, and
not create the archive at all -- and then have libtool notice when
linking in a .la that the corresponding .a is a dummy, and not feed it
to the linker?
Libtool/automake should handle this case in order to live up to their
portability promises.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com