This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
Re: [PATCH]: mknetrel builds Guile #3: libtool
Christopher Faylor <cgf@redhat.com> writes:
> Btw, after some investigation, It appears that you are putting
>/whereever/i686-pc-cygwin/bin in your path when it is not intended to
>be in your path. That directory is only intended to be run by the
>cross tools. If you need to use the cross versions of ar, as, ld,
>etc., you should be invoking them as i686-pc-cygwin-ar,
>i686-pc-cygwin-as, etc. Including this directory in your path will
>just confuse the native tools since it has the undecorated versions
>of the programs like "ld".
Yes, thanks. Indeed, I did that until recently. I found out, very
soon that the cross 'ld' cannot be in PATH, it will break things
horribly.
After looking at mknetrel I realised that using the i686-pc-cygwin-*
tools directly should work (it worked for you apparently); and that's
a much nicer solution. [I seem to remember this didn't work for
configuring/compiling certain things, a long time ago, but I may have
done something silly back then. Then I kept that setup because it
worked.]
However, It turns out that your fix to help libtool that wants LD:
LD=$(${build_cc} -print-prog-name=ld)
doesn't seem to work over here:
mknetrel-debug ~$ which gcc
/usr/bin/gcc
mknetrel-debug ~$ which ld
/usr/bin/ld
mknetrel-debug ~$ gcc -print-prog-name=ld
ld
mknetrel-debug ~$ which i686-pc-cygwin-gcc
/home/cygwin/cygwin-1.3.10/linux-x-cygwin/usr/bin/i686-pc-cygwin-gcc
mknetrel-debug ~$ i686-pc-cygwin-gcc -print-prog-name=ld
ld
mknetrel-debug ~$ i686-pc-cygwin-gcc -print-prog-name=i686-pc-cygwin-ld
i686-pc-cygwin-ld
Isn't -print-prog-name supposed to give the full path, or do I have an
installation problem? Note that the native gcc (2.95.4) does not
produce a full path either?
That's why I'm currently using the attached patch -- but it's probably
not something you'd like very much, as you can still override 'ld'.
What about adding 'host_prefix' and 'target_prefix' vars to
read_user_config, and then doing something like:
LD=$(${build_cc} -print-prog-name=${host_prefix}ld
Jan.
Index: mknetrel
===================================================================
RCS file: /cvs/cygwin-apps/mknetrel/bin/mknetrel,v
retrieving revision 1.39
diff -p -u -r1.39 mknetrel
--- mknetrel 14 Jul 2002 04:29:33 -0000 1.39
+++ mknetrel 15 Jul 2002 16:27:32 -0000
@@ -10,6 +10,7 @@ read_user_config() {
: ${cygwin_root=/}
: ${build_cxx='g++'}
: ${build_cc='gcc'}
+ : ${build_ld='ld'}
: ${build_ranlib='ranlib'}
: ${build_dllwrap='dllwrap'}
: ${build_ar='ar'}
@@ -20,6 +21,7 @@ read_user_config() {
: ${cygwin_root=/cygwin}
: ${build_cxx='i686-pc-cygwin-g++'}
: ${build_cc='i686-pc-cygwin-gcc'}
+ : ${build_ld='i686-pc-cygwin-ld'}
: ${build_ranlib='i686-pc-cygwin-ranlib'}
: ${build_dllwrap='i686-pc-cygwin-dllwrap'}
: ${build_ar='i686-pc-cygwin-ar'}
@@ -172,8 +174,7 @@ mystrip() {
doconfig() {
CONFIGOPTS="${build_config_opts} --enable-haifa --prefix=$prefix --exec-prefix=$exec_prefix --sysconfdir=$sysconfdir --libdir=$libdir --includedir=$includedir --libexecdir=$libexecdir"
preconfig || exit 1
- CXX="${build_cxx}" CXX_FOR_TARGET="${build_cxx}" CC="${build_cc}" CC_FOR_TARGET="${build_cc}" GCC_FOR_TARGET="${build_cc}" RANLIB="${build_ranlib}" DLLWRAP="${build_dllwrap}" AR="${build_ar}" NM="${build_nm}" LD=$(${build_cc} -print-prog-name=ld) $src/configure $CONFIGOPTS || exit 1
-
+ CXX="${build_cxx}" CXX_FOR_TARGET="${build_cxx}" CC="${build_cc}" CC_FOR_TARGET="${build_cc}" GCC_FOR_TARGET="${build_cc}" RANLIB="${build_ranlib}" DLLWRAP="${build_dllwrap}" AR="${build_ar}" NM="${build_nm}" LD=$(${build_cc} -print-prog-name=${build_ld}) $src/configure $CONFIGOPTS || exit 1
postconfig || exit 1
}
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien | http://www.lilypond.org