Evitable warnings occur. Eventually programs do not find their libraries. Reproducible: Always Steps to Reproduce: Bootstrapping prefix on Cygwin: emerge --oneshot --ask bash Actual Results: gcc: unrecognized option '-R/home/prefix/gentoo/usr/lib' gcc: unrecognized option '-R/home/prefix/gentoo/lib' So far this is only a cosmetical problem. Bash finds ncurses anyway: /home/prefix/gentoo/bin/bash.exe /home/prefix/gentoo/usr/bin/cygncurses5.dll It may become a problem with other packages as rpath is not passed to the linker the official way (or not at all). Reason: The -R option is an (unofficial) shortcut that only works in some environments. It's not at all documented in GCC's manpage. Solution: -R should likely replaced by -Wl,-R, maybe -Wl,-rpath. '-R/home/prefix/gentoo/lib' '-Wl,-R,/home/prefix/gentoo/lib' '-Wl,-rpath,/home/prefix/gentoo/lib' Program to fix: bootstrap-prefix.sh General fix: line 94 I think the default should be changed as -Wl,... is the regular flag to pass something to the linker and the -R flag is the unofficial shortcut. Cygwin special: line 257 In Cygwin *.dll files are in the */bin directories: http://en.gentoo-wiki.com/wiki/Prefix/Cygwin#Standard_namings_and_locations Maybe this would work (not tested yet): ldflags_make_defaults="LDFLAGS=\"-L${ROOT}/usr/lib -L${ROOT}/lib -Wl,-R,${ROOT}/usr/lib -Wl,-R,${ROOT}/lib -Wl,-R,${ROOT}/usr/bin -Wl,-R,${ROOT}/bin \"" Workaround: Set LDFLAGS manually in *windows/cygwin1.7/x86/make.defauls. Al
Can't be done. Cygwin simply doesn't *have* an RPATH/RUNPATH equivalent. All libraries must be in directories found on the $PATH (or in ".", which is implicitly on the path).
> Cygwin simply doesn't *have* an RPATH/RUNPATH equivalent. All > libraries must be in directories found on the $PATH (or in ".", which is > implicitly on the path). It's very informative to send in a bug. :-) I confirm this by experiment: PATH="" ldd .../bash.exe bash: ldd: no such file or directory Follows: 1.) Suggest -Wl,-R Flag as default setting. 2.) Suggest to unset -R-Flag for Cygwin. Al
> It's very informative to send in a bug. :-) I confirm this by experiment: > > PATH="" > ldd .../bash.exe > bash: ldd: no such file or directory Corrected experiment, similar result: $ PATH="" $ /usr/bin/ldd /home/prefix/gentoo/bin/bash.exe cygncursest.dll not found
The -R syntax is used for Solaris compatability. We should just drop it on Cygwin, I suppose.
(In reply to comment #4) > The -R syntax is used for Solaris compatability. We should just drop it on > Cygwin, I suppose. > Dropping on Cygwin is fine. I can only find the following source to argu -R Option is the special case and -Wl style the default for line 94: http://gcc.gnu.org/ml/gcc-help/2000-03/msg00119.html Al
yeah, but during bootstrap you may not be using gcc, though
(In reply to comment #1) > Can't be done. Cygwin simply doesn't *have* an RPATH/RUNPATH equivalent. All > libraries must be in directories found on the $PATH (or in ".", which is > implicitly on the path). > Addon: http://msdn.microsoft.com/en-us/library/7d83bc18%28VS.71%29.aspx
-R is now only used on Solaris targets