public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* gcc-3.2: gcc driver doesn't pick up crt0.a from /usr/lib
@ 2003-09-30  2:06 Doru Carastan
  0 siblings, 0 replies; 3+ messages in thread
From: Doru Carastan @ 2003-09-30  2:06 UTC (permalink / raw)
  To: cygwin

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
|||\/||| doru.carastan@mvista.com



--
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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gcc-3.2: gcc driver doesn't pick up crt0.a from /usr/lib
  2003-09-30 17:51 Doru Carastan
@ 2003-09-30 18:44 ` Christopher Faylor
  0 siblings, 0 replies; 3+ messages in thread
From: Christopher Faylor @ 2003-09-30 18:44 UTC (permalink / raw)
  To: cygwin

On Tue, Sep 30, 2003 at 10:48:15AM -0700, Doru Carastan wrote:
>This is a followup to my "gcc-3.2: gcc driver doesn't pick up crt0.a 
>from /usr/lib" message.
>
>I have found that configure sets GCC_FOR_TARGET to the cross-compiler I 
>use in the root Makefile.
>
>GCC_FOR_TARGET = i686-pc-cygwin-gcc
>
>Then gcc/Makefile is using it to create the spec file
>
>specs: xgcc$(exeext)
>    $(GCC_FOR_TARGET) -dumpspecs > tmp-specs
>    mv tmp-specs specs
>
>and obviously the spec file defines:
>
>*cross_compile:
>1
>
>which makes gcc drop /lib and /usr/lib from the 'libraries:' search path.
>
>IMO this is wrong considering that the configure line was:
>
>"$r/src/$gcc/configure" --build=i686-pc-linux-gnu \
>  --host=i686-pc-cygwin --target=i686-pc-cygwin \
>  --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
>
>Can someone shed some light here? Why GCC_FOR_TARGET is not left as 
>defined in the gcc/Makefile?
>
>GCC_FOR_TARGET = ./xgcc -B./ -B$(build_tooldir)/bin/ -isystem 
>$(build_tooldir)/include -isystem $(build_tooldir)/sys-include

The gcc mailing list is a more appropriate place for these types of
questions.  gcc at gcc dot gnu dot org.
--
Please use the resources at cygwin.com rather than sending personal email.
Special for spam email harvesters: send email to aaaspam@sourceware.org
and be permanently blocked from mailing lists at sources.redhat.com

--
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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gcc-3.2: gcc driver doesn't pick up crt0.a from /usr/lib
@ 2003-09-30 17:51 Doru Carastan
  2003-09-30 18:44 ` Christopher Faylor
  0 siblings, 1 reply; 3+ messages in thread
From: Doru Carastan @ 2003-09-30 17:51 UTC (permalink / raw)
  To: cygwin

This is a followup to my "gcc-3.2: gcc driver doesn't pick up crt0.a 
from /usr/lib" message.

I have found that configure sets GCC_FOR_TARGET to the cross-compiler I 
use in the root Makefile.

GCC_FOR_TARGET = i686-pc-cygwin-gcc

Then gcc/Makefile is using it to create the spec file

specs: xgcc$(exeext)
     $(GCC_FOR_TARGET) -dumpspecs > tmp-specs
     mv tmp-specs specs

and obviously the spec file defines:

*cross_compile:
1

which makes gcc drop /lib and /usr/lib from the 'libraries:' search path.

IMO this is wrong considering that the configure line was:

"$r/src/$gcc/configure" --build=i686-pc-linux-gnu \
   --host=i686-pc-cygwin --target=i686-pc-cygwin \
   --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

Can someone shed some light here? Why GCC_FOR_TARGET is not left as 
defined in the gcc/Makefile?

GCC_FOR_TARGET = ./xgcc -B./ -B$(build_tooldir)/bin/ -isystem 
$(build_tooldir)/include -isystem $(build_tooldir)/sys-include

TIA,

-- 
Doru Carastan

*\\\///* WinHost Contractor
||\\//|| 408-992-4497
|||\/||| doru.carastan@mvista.com





--
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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-09-30 17:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-30  2:06 gcc-3.2: gcc driver doesn't pick up crt0.a from /usr/lib Doru Carastan
2003-09-30 17:51 Doru Carastan
2003-09-30 18:44 ` Christopher Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).