public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/21698] New: creating first stage compiler
@ 2005-05-21 15:40 jlm_devel at laposte dot net
  2005-05-21 15:43 ` [Bug bootstrap/21698] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: jlm_devel at laposte dot net @ 2005-05-21 15:40 UTC (permalink / raw)
  To: gcc-bugs

hello,
I'm currently trying to create x86_64 crosschain and found several issues :

1)glibc won't compile on linux plateforms if threads aren't compiled
2)methods given on the wiki help to create a 1rst stage crosscompiler that can't
compile glibc with threads

this issue is fixed by installing glibc's headers on the target filesystem first
and then create the crosscompiler.... 

but strangely there is a new issue that appears then :

the ./xgcc commands in gcc/Makefile.in dont use the --with-local-prefix= as -isystem
=> headers of the "target" aren't used.... then thread support can't be
activated, then glibc can't be compiled...

this is fixed by doing :

--- gcc-3.4.3/gcc/Makefile.in	2005-05-21 10:35:08.613136000 +0200
+++ gcc-3.4.3-new/gcc/Makefile.in	2005-05-21 11:33:50.124784872 +0200
@@ -286,7 +286,7 @@
 # The GCC to use for compiling libgcc.a and crt*.o.
 # Usually the one we just built.
 # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
-GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) ./xgcc -B./ -B$(build_tooldir)/bin/
-isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include
-L$(objdir)/../ld
+GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) ./xgcc -B./ -B$(build_tooldir)/bin/
-isystem $(build_tooldir)/include -isystem $(local_prefix)/include -isystem
$(build_tooldir)/sys-include -L$(objdir)/../ld



but then I get 2 different comportements when compiling gcc :

1) if I compile from the top source directory I get the same result as if the
patch wasn't applied
(in fact instead of ./xgcc I get /usr/src/sorcery/gcc-3.4.3/gcc/xgcc
[/usr/src/sorcery/gcc-3.4.3 is the top build dir]) seems that those values
commes from configure script...

2)if I do a cd gcc && make then everything finish fine..... and I have a
crosscompiler with thread support....

-- 
           Summary: creating first stage compiler
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jlm_devel at laposte dot net
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21698


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

* [Bug bootstrap/21698] creating first stage compiler
  2005-05-21 15:40 [Bug bootstrap/21698] New: creating first stage compiler jlm_devel at laposte dot net
@ 2005-05-21 15:43 ` pinskia at gcc dot gnu dot org
  2005-05-21 17:50 ` jlm_devel at laposte dot net
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-21 15:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-21 15:43 -------
This does not make sense, people create cross compilers to x86_64-pc-linux-gnu all the time.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21698


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

* [Bug bootstrap/21698] creating first stage compiler
  2005-05-21 15:40 [Bug bootstrap/21698] New: creating first stage compiler jlm_devel at laposte dot net
  2005-05-21 15:43 ` [Bug bootstrap/21698] " pinskia at gcc dot gnu dot org
@ 2005-05-21 17:50 ` jlm_devel at laposte dot net
  2005-05-21 18:22 ` jlm_devel at laposte dot net
  2005-06-01 17:35 ` jlm_devel at laposte dot net
  3 siblings, 0 replies; 5+ messages in thread
From: jlm_devel at laposte dot net @ 2005-05-21 17:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jlm_devel at laposte dot net  2005-05-21 17:50 -------
maybe, I can too using several workaround like crosstool.sh is doing.... but
this lead to have the target tree be located at the same place of the
crosschain.... which is a nonsens...
why a target filesystem's location MUST depend on where the chain is located?

anyway the issue is related to gcc/libgcc.mk

seeking into the logs I found that make gcc-all was doing a 
make \
  CFLAGS="-mtune=athlon64 -O2 -pipe -Wno-deprecated-declarations -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic
-Wno-long-long  " \
  CONFIG_H="config.h  auto-host.h ./../include/ansidecl.h" \
  MAKEOVERRIDES= \
  -f libgcc.mk all

which fail....
on the other hand when doing a make all in gcc/ you still get the right libgcc.a

so i'll make a patch....
anyway since you're using gnu make why are the Makefiles such a mess (lot of
redefines, no use of include....)

so I still maintain that the --with-local-prefix= in configure should be used to
give information where the headers are located (all the docs I read say so....)
and that there is an issue with libgcc.mk

as you say peoples are doing crosscompiler everyday but look at crosstool.sh 's
hacks to be sure there are a issue....

by the way : should the gcc libraries not be independant of a libc? 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21698


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

* [Bug bootstrap/21698] creating first stage compiler
  2005-05-21 15:40 [Bug bootstrap/21698] New: creating first stage compiler jlm_devel at laposte dot net
  2005-05-21 15:43 ` [Bug bootstrap/21698] " pinskia at gcc dot gnu dot org
  2005-05-21 17:50 ` jlm_devel at laposte dot net
@ 2005-05-21 18:22 ` jlm_devel at laposte dot net
  2005-06-01 17:35 ` jlm_devel at laposte dot net
  3 siblings, 0 replies; 5+ messages in thread
From: jlm_devel at laposte dot net @ 2005-05-21 18:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jlm_devel at laposte dot net  2005-05-21 18:22 -------
I re-checked to be sure... and I confirm :
$ make all-gcc
...
$ echo $? 
2
$ cd gcc
$ make all 
...
$ echo $?
0
$ ls libgcc.a
libgcc.a

so the issue is : two make that should have the same behaviour don't

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21698


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

* [Bug bootstrap/21698] creating first stage compiler
  2005-05-21 15:40 [Bug bootstrap/21698] New: creating first stage compiler jlm_devel at laposte dot net
                   ` (2 preceding siblings ...)
  2005-05-21 18:22 ` jlm_devel at laposte dot net
@ 2005-06-01 17:35 ` jlm_devel at laposte dot net
  3 siblings, 0 replies; 5+ messages in thread
From: jlm_devel at laposte dot net @ 2005-06-01 17:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jlm_devel at laposte dot net  2005-06-01 17:35 -------
this issue is solved if and only if BOTH configure options are set :

 --with-local-prefix=$DESTDIR_BCKP
 --with-sysroot=$DESTDIR_BCKP

specifying only where to find the headers isn't enough....
but the error message don't help finding the issue

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21698


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

end of thread, other threads:[~2005-06-01 17:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-21 15:40 [Bug bootstrap/21698] New: creating first stage compiler jlm_devel at laposte dot net
2005-05-21 15:43 ` [Bug bootstrap/21698] " pinskia at gcc dot gnu dot org
2005-05-21 17:50 ` jlm_devel at laposte dot net
2005-05-21 18:22 ` jlm_devel at laposte dot net
2005-06-01 17:35 ` jlm_devel at laposte dot net

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).