View previous topic :: View next topic |
Author |
Message |
Joseph_sys Advocate
Joined: 08 Jun 2004 Posts: 2712 Location: Edmonton, AB
|
Posted: Sun Nov 08, 2009 10:13 pm Post subject: icecream cflags, cross-compiling (kde4) |
|
|
I'm trying to use icecream to test cross-compile kde4
but I'm not very clear how cross-compiling should be correctly setup.
Box-1 (quad core):
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
Box-2:
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
emerging icecream I got a note: * If you have compiled binutils/gcc/glibc with processor-specific flags
* (as normal using Gentoo), there is a greater chance that your compiler
* won't work on other machines. The best would be to build gcc, glibc and
* binutils without those flags and then copy the needed files into your
* tarball for distribution to other machines. This tarball can be created
* by running /usr/bin/icecc --build-native, and used by setting
* ICECC_VERSION in /etc/conf.d/icecream
* ICECC_VERSION=<filename_of_archive_containing_your_environment>
My question:
Do I need to remove from "CFLAGS" all the flags except: -O2 -pipe (since they are common) and re-compile: gcc, glibc, binutils ?
Since one is x86 and one amd64 it seems to me I need to emerge sys-devel/crossdev
Looking at Gentoo doc page: http://dev.gentoo.org/~bluebird/icecream.xml?style=printable
Corss-Compiling section - Code Listing 3.3: Create an icecc environment for cross-compiling
there is a typo: the command in this section and others should be run as root (not as user) I think, is it correct?
What is the correct sequence to run the commands:
1.) /usr/bin/icecc --build-native
it creates I think local environment (before removing CLFAGS and recompiling gcc, glibc, binutils) is it correct?
this command is not mentioned in Gentoo documentation?
Is it the same as running: "icecream-create-env" ?
2.) icecream-create-env
we need to run it after we compile gcc, glibc, binutils without CFLAGS
Gentoo documentation has mentioned: ...After that you need to set ICECC_VERSION to point to the tarball(icecc environment) for arm-linux-gnu. You can create it using icecream-create-env. You probably don't want to set it permanently, just on an as-needed basis.
What does it mean "not setup permanently?
I'm still confused as to the correct setup. I don't want to compile half a day and realized the machine will not boot it because of some errors, or incorrect setup.
Once icecream is setup I think I'm stuck with it as "gcc, glibc, binutils" were compiled with CFLAGS removed, isn't it?
What if I want to disable the icecream? |
|
Back to top |
|
|
Joseph_sys Advocate
Joined: 08 Jun 2004 Posts: 2712 Location: Edmonton, AB
|
Posted: Sun Nov 08, 2009 11:42 pm Post subject: |
|
|
It seems to me: /usr/bin/icecc --build-native
does the same thing as: icecream-create-env
It creates local/native environment.
Does the environment we create make a difference what CFLAGS gcc, glibc, binutils are build with?
Do we copy this environment to other boxes and environment from other boxes to local box? |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|