cross compile gcc

ken_i_m ken_i_m at elegantinnovations.com
Mon Jan 8 05:49:38 PST 2001


At 11:35 AM 1/8/01 +0100, rudolf. wrote:
>On Sun, Jan 07, 2001 at 04:56:32PM -0700, ken_i_m wrote:
>
> > --target=i486-pc-linux-gnu --prefix=/usr
> > --with-gxx-include-dir=/usr/include/g++ \
> > --enable-languages=c,c++ --disable-nls
>
>i prefer --host=i486-blaa..  but i it's probably just the same, isn't
>it? also make sure there is no CFLAGS=-march=i686, but -march=i486, env
>variable.

I will re-read the docs. I bypassed the --host as I thought it referred to 
the machine I was compiling on.
I have properly set the environment variables.

I just now went to the Gnu homepage for the GCC. Looking at the Intel 386 
Options ( gcc.gnu.org/onlinedocs/gcc_3.html#SEC35 ) I think I was being 
overly paraniod about what sort of code it would generate.

> >make -e LDFLAGS=-static cross
>
>what's that cross target? i don't think it's needed when compiling
>for a 486 on a 686.


>why do you actually compile a statically linked gcc? i think you don't
>need gcc on your 486 router at all. the only thing of the gcc package
>you may/might need is libstdc++-3-libc6.1-2-2.10.0.so.
>you should be able to compile everything you need on your 686, why a
>compiler for the 486?

Well, um . . . you make a good point Rudolf. I was thinking that if I could 
shoehorn one in then if I wanted to add some package to it later I would be 
able to make it on that machine. Re-thinking this, I would be better off 
simply learning more about compiling for a different host on my faster 
system and then moving the binaries.

I have been working mostly from Greg O'Keefe's "How to Build a Minimal 
Linux System from Source Code". Here is a quote from the section on 
installing glibc:
"Next we want to install init, but like almost every program that runs 
under Linux, init uses library functions provided by the Gnu C library, 
glibc. So we will install that first".
I went to the Gnu homepage for Glibc and found libstdc++-2.91.tar.gz. Which 
sort of resembles what you refer to above. Do I compile this instead of glibc?

Thank you,



I think, therefore, ken_i_m


-- 
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message




More information about the lfs-dev mailing list