This is the mail archive of the gcc-patches@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: [PATCH] Avoid invoking ranlib on libbackend.a


On Mon, Jul 18, 2016 at 08:39:34PM -0400, Patrick Palka wrote:
> One thing that was not clear to me is whether the object file paths
> stored in a thin archive are relative or absolute paths.  If they are
> absolute paths then that would be a problem due to how the build system
> moves build directories in between stages (gcc/ -> prev-gcc/ etc).  But
> it looks like the object file paths are relative to the location of the
> archive which is compatible.

It's simple.  The paths stored in the archive are the paths supplied
on the ar command line (*).  Supply relative, you'll get relative in
the archive and files will be opened relative to the archive
directory.

*) Well, not quite.  Relative paths are adjusted to be relative to the
archive directory.

-- 
Alan Modra
Australia Development Lab, IBM


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