Subject: gcc-3.2: gcc driver doesn't pick up crt0.a from /usr/lib
From: Doru Carastan <[email-masked]>
To: [email-masked]
Date: Mon, 29 Sep 2003 18:28:34 -0700

Hello,

I am facing a gcc-3.2 configuration problem and I would like to ask your 
opinion about it. I have built an i686-pc-cygwin gcc compiler on Linux 
using a gcc-3.2 i686-pc-linux-gnu to i686-pc-cygwin cross compiler I 
have built and installed in $HOME/cygwin.

r=$HOME/cygwin
i=$HOME/install
# Build, host, target
b=`$r/src/$binutils/config.guess`
h=i686-pc-cygwin
t=i686-pc-cygwin
#
mkdir -p "$r/src/build/$gcc" && \
cd "$r/src/build/$gcc" && \
"$r/src/$gcc/configure" --build=$b --host=$h --target=$t \
   --prefix=/usr --includedir=/nonexistent/include \
   --enable-languages=c,c++ \
   --enable-threads=posix \
   --with-system-zlib \
   --enable-nls \
   --without-included-gettext \
   --disable-version-specific-runtime-libs \
   --enable-shared \
   --enable-haifa \
   --enable-interpreter && \
make all && \
make install prefix="$i/$gcc/usr" && \
cd "$i/$gcc" && tar -cf "$r/$gcc.tar" *

At build time I have $HOME/i686-pc-cygwin/lib stuffed with the 
i686-pc-cygwin lib files including crt0.o. It builds fine, but when I 
install it on Cygwin it can't find crt0.o. /usr/lib.crt0.o is available 
but gcc it doesn't even look in /usr/lib:

$ gcc -print-search-dirs
install: /usr/lib/gcc-lib/i686-pc-cygwin/3.2/
programs: 
=/usr/lib/gcc-lib/i686-pc-cygwin/3.2/:/usr/lib/gcc-lib/i686-pc-cygwin/3.2/:/usr/lib/gcc-lib/i686-pc-cygwin/:/usr/lib/gcc/i686-pc-cygwin/3.2/:/usr/lib/gcc/i686-pc-cygwin/:/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/bin/i686-pc-cygwin/3.2/:/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/bin/
libraries: 
=/usr/lib/gcc-lib/i686-pc-cygwin/3.2/:/usr/lib/gcc/i686-pc-cygwin/3.2/:/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/lib/i686-pc-cygwin/3.2/:/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/lib/

The stock Cygwin gcc and also the native Linux one have a libraries line 
like:

install: /usr/lib/gcc-lib/i686-pc-cygwin/3.2/
programs: 
=/usr/lib/gcc-lib/i686-pc-cygwin/3.2/:/usr/lib/gcc-lib/i686-pc-cygwin/3.2/:/usr/lib/gcc-lib/i686-pc-cygwin/:/usr/lib/gcc/i686-pc-cygwin/3.2/:/usr/lib/gcc/i686-pc-cygwin/:/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/bin/i686-pc-cygwin/3.2/:/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/bin/
libraries: 
=/usr/lib/gcc-lib/i686-pc-cygwin/3.2/:/usr/lib/gcc/i686-pc-cygwin/3.2/:/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/lib/i686-pc-cygwin/3.2/:/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/lib/:/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../i686-pc-cygwin/3.2/:/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../:/lib/i686-pc-cygwin/3.2/:/lib/:/usr/lib/i686-pc-cygwin/3.2/:/usr/lib/

Any ideas?

Thank you,

-- 
Doru Carastan

*\\\///* WinHost Contractor
||\\//|| 408-992-4497
|||\/||| [email-masked]

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/