On Fri, Apr 27, 2001 at 08:03:04AM -0400, Jeff Sutherland wrote:
> Philip Blundell wrote:
> > Using -O0 turns off all sorts of things that don't have specific -f flags; it
> > really does inhibit pretty much all optimisation.
> 
> Hmm...  Yes.  Well, I have a head-scratcher for you now: I cross-compiled
> glibc-2.2.2 for my ARM target (SA1110-based Accelent IDP), then proceeded to
> bootstrap gcc-2.95.3 after installing binutils-2.11 so both would build natively.
> This setup builds net-tools-1.60 just fine right out of the box, no tweaking of
> anything.  Wonder if I've stumbled onto another infamous Pentium-III bug?? ;)

Interesting. The only reason I can think about is that a cross compiler
is a one stage build process, while a native compiler is a three stage
process. Like this:

Cross compiler: Native C compiler directly compiles cross compiler(s).
Cross compiler gets installed.

Native compiler: Native C compiler builds stage1 C compiler. Stage1 C
compiler builds stage2 compiler(s). Stage2 compiler builds stage3
compiler(s). The stage3 compiler is compared to stage2 compiler and if
they are the same the stage3 compiler gets installed.

To test the assumption, you could try to compile a cross compiler with
a different native compiler, like a gcc-3.0 CVS snapshot (see
http://gcc.gnu.org/). Checking out the gcc_latest_snapshot CVS tag
usually gives a working compiler. Compiling a native compiler on linux
is really easy, I usually use:

  ./configure --prefix=/home/erik/gcc --enable-languages=c,c++ \
    --enable-threads --disable-shared
  make bootstrap
  make install


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email: [EMAIL PROTECTED]
WWW: http://www-ict.its.tudelft.nl/~erik/

_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
Please visit the above address for information on this list.

Reply via email to