This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: RFC: Cygwin 64 bit?
On 7/8/2011 9:16 PM, Christopher Faylor wrote:
> I had two points squashed into that paragraph. I get that cygport has
> to be modified. What I wouldn't like to see is ld being changed to
> force every -lrary refererence to default to ../lib64/cygrary.dll .
Err, ah, well...first off, the search order is currently -lxxx
libxxx.dll.a
xxx.dll.a
libxxx.a
xxx.lib
cygxxx.dll (*)
libxxx.dll
xxx.dll
(*) where this is actually controlled, via gcc's spec file, by the ld
option --dll-search-prefix=<prefix>.
So, with regards to direct-to-dll linking, the "native" cyg64 gcc would
simply have --dll-search-prefix=cyg64 in its spec.
But...that doesn't address the other issue: where shall ld LOOK for the
libxxx.dll.a file, first?
strings ld.exe shows the following:
SEARCH_DIR("/usr/i686-cygwin/lib"); SEARCH_DIR("/usr/lib");
SEARCH_DIR("/usr/lib/w32api");
So I guess that's the default search path for ld itself, which is of
course overridden by gcc (gcc -print-search-dirs|grep libraries:
libraries:
=/usr/lib/gcc/i686-pc-cygwin/4.3.4/:/usr/lib/gcc/i686-pc-cygwin/4.3.4/:/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/lib/i686-pc-cygwin/4.3.4/:/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/lib/:/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../i686-pc-cygwin/4.3.4/:/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../:/lib/i686-pc-cygwin/4.3.4/:/lib/:/usr/lib/i686-pc-cygwin/4.3.4/:/usr/lib/
I'm not convinced that the "native 64bit" version of gcc|ld shouldn't
specifically look in lib64 instead of (or at least prior to) the regular
lib/.
FWIW, on linux64 (fedora 15) I see this:
SEARCH_DIR("/usr/i386-redhat-linux/lib"); SEARCH_DIR("/usr/lib64");
SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
and
libraries:
=/usr/lib/gcc/x86_64-redhat-linux/4.6.0/:/usr/lib/gcc/x86_64-redhat-linux/4.6.0/../../../../x86_64-redhat-linux/lib/x86_64-redhat-linux/4.6.0/:/usr/lib/gcc/x86_64-redhat-linux/4.6.0/../../../../x86_64-redhat-linux/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/4.6.0/../../../x86_64-redhat-linux/4.6.0/:/usr/lib/gcc/x86_64-redhat-linux/4.6.0/../../../../lib64/:/lib/x86_64-redhat-linux/4.6.0/:/lib/../lib64/:/usr/lib/x86_64-redhat-linux/4.6.0/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/4.6.0/../../../../x86_64-redhat-linux/lib/:/usr/lib/gcc/x86_64-redhat-linux/4.6.0/../../../:/lib/:/usr/lib/
--
Chuck