On 15 Apr 2005 at 14:56, zouq wrote:

> first i download the release the version of gcc-2.95.3, binutils 2.15,

 This message should go to the crossgcc list... But it is nowadays
filled with bolsheviks demanding everyone to start from absolute
scratch, so wacky advices expected there :-(

 So maybe this list starts to be the one for those who cannot
understand the ideas about starting from scratch, avoiding
preinstalling anything from the (usually proprietary/custom) target
systems and replacing it with totally self-built (library) stuff...
So people who need crosstools for Solaris2, AIX, LynxOS, RedHat,
SuSE etc. are adviced to build glibc as the C library, of course the
C library being an essential part of GCC just like the binutils and
everyone being obliged to build all these GCC components from
scratch... "People are like chaff in the wind...", these people
really believe to their bullshitism/bolshevism and think they are
creating a better and perfect world this way, with these ideas...

 Ok, here we are talking about "recycling", "re-use" and other
things some others think the "creating a better and perfect world"
means. Like using existing C libraries for the target instead of
being obliged to rebuild them....

> 2. cp -r ../../lib /opt/gcc/mipsel-linux/
>    cp -r ../../include /opt/gcc/mipsel-linux/

 There is a well-known bug in GCC and putting the target headers to
the '$prefix/$target/include' is not enough, some of them or maybe
them all must also be seen in the '$prefix/$target/sys-include'.  At
least the 'limits.h', 'stdio.h', 'stdlib.h', 'string.h', 'time.h' and 
unistd.h' are required with the current GCCs.  Seeing them all may
work, sometimes the 'fixinc*' stuff makes garbage from the original
headers... I don't remember the case with gcc-2.95.3. My advice is
to symlink/copy only those six headers into the '.../sys-include'.

> 3. compile the gcc
> mkdir gcc-build;
> cd gcc-build;
> .../../gcc-2.95.3/configure --prefix=/opt/gcc --target=mipsel-linux

 Are you simply not telling the truth here or what?  Please see
later...

> --enable-languages=c -enable-shared -disable-checking -v;
> make;
>
>   /home/mytask/mywork/WHAT_I_HAVE_DONE/mycompile/gcc-2.95.3-build/gcc/gcc/xgcc
> -B/home/mytask/mywork/WHAT_I_HAVE_DONE/mycompile/gcc-2.95.3-build/gcc/gcc/
> -B=/opt/gcc-2.95//mipsel-linux/bin/

 This '-B' option tells that you used a "--prefix=/opt/gcc-2.95", not
the "--prefix=/opt/gcc" you told earlier, when configuring GCC !!!
Using JUST THE SAME PREFIX in both configures is the expected thing,
otherwise you are asking serious problems...

> -I=/opt/gcc-2.95//mipsel-linux/include  -DCROSS_COMPILE -DIN_GCC     
> -I./include     -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
> -I/usr/include

 Trying to get (native) headers from '/usr/include' is a bug here...
Especially when the host isn't a Linux.
 
> _muldi3
> as: unrecognized option `-O2'

 An option understood by a MIPS target 'as' was given to the native
'as'... This is one of the "serious problems" I told about...

> the as should be mipsel-linux-as????

 When we are talking about "FBB" ("FSF's Bad Boy"), an AI being
a "step forwards" from GCC (like IBM -> HAL), then this FBB would
use those '$target-<tool>' things... The situation now is that only
humans and scripts written by humans use them... GCC uses those
seen with the './xgcc -print-search-dirs' with the new GCC driver...
(Hmm, when GCC becomes FBB, then GCJ becomes FBI, maybe
called like this because cops like coffee :-)

 Just fix your $prefix and try again after writing 'make distclean'
in your build directory:

/home/mytask/mywork/WHAT_I_HAVE_DONE/mycompile/gcc-2.95.3-build/gcc

Then set the 'sys-include' stuff and use the aimed
'--prefix=/opt/gcc'  in the GCC configure...

Cheers, Kai

Reply via email to