Forums

gcc on ARM?

Started by Unknown August 12, 2005
Hello!

I can already see you all role your eyes at my question but anyway:

is there any explanation on the net or can anyone explain me how I can
compile gcc (either 2.95.3 or 4.0.1) on a x86-linux system (with
x86-gcc 3.4.3 and a arm-crosscompiler-gcc 2.95.3 installed) in order to
get a working gcc that runs on arm and compiles for arm?

The situation is this: I have a Qtopia-device that doesn=B4t allow me to
place files anywhere else than in "/progfs/opt/QtPalmtop". The native
gcc packages I found for arm expect all their files in /usr/local which
isn=B4t available even for a softlink because I cannot write to any
other directory than what=B4s below "/progfs/opt/QtPalmtop". I could
probably get around this by using the -I and -L option of gcc when
compiling a program (for some reason I don=B4t understand I haven=B4t
even managed to compile a hello.c with the arm-gcc I found) but it
would be so much nicer to have a native gcc that installs into
/progfs/opt/QtPalmtop and looks for its files in
/progfs/opt/QtPalmtop/include a.s.o.

I=B4m not a UNIX newbie, in fact I have used UNIX systems for almost ten
years but after one week of trying to cross-compile gcc I have to admit
that this is above me. I only managed to compile native binutils which
appears to be a minor task in comparison to cross-compiling gcc...

I=B4m sorry if this sets up somebody, I have seen nasty replies to
people asking similar questions telling them to let it be if they
don=B4t know what they are doing... (how are you supposed to learn,
then?)


Thanks,
Philipp.

Philipp <grond@CS.TU-Berlin.De> wrote:

"[..]

is there any explanation on the net or can anyone explain me how I can
compile gcc (either 2.95.3 or 4.0.1) on a x86-linux system (with
x86-gcc 3.4.3 and a arm-crosscompiler-gcc 2.95.3 installed) in order to
get a working gcc that runs on arm and compiles for arm?

[..]"

In the GCC cross compiling community, the term "Canadian Cross" was
coined not many years ago for what you described. CrossGCC documentation
has been moved and taken down, but if you search you might find
documentation or advice from the CrossGCC emailing list. You can start with
HTTP://Kegel.com/crosstool/crosstool-0.38/doc/crosstool-howto.html#canadian
and
HTTP://Sourceware.org/ml/crossgcc/2005-08/msg00019.html
<grond@cs.tu-berlin.de> schreef in bericht 
news:1123840514.446844.146060@g47g2000cwa.googlegroups.com...

> The situation is this: I have a Qtopia-device that doesn&#2013266100;t allow me to > place files anywhere else than in "/progfs/opt/QtPalmtop". The native > gcc packages I found for arm expect all their files in /usr/local which > isn&#2013266100;t available even for a softlink because I cannot write to any > other directory than what&#2013266100;s below "/progfs/opt/QtPalmtop".
Not even with pivot_root? Not even read/write access to system startup configuration? Not even the ability to remount some filesystems as read/write? Not even the possibility to boot from another medium?
In article <86d5ojs9d8.fsf@Delta-Utec_PC5_FreeBSD.lan>, Colin Paul Gloster <Colin_Paul_Gloster@ACM.org> writes:
> > In the GCC cross compiling community, the term "Canadian Cross" was > coined not many years ago for what you described. CrossGCC documentation > has been moved and taken down, but if you search you might find > documentation or advice from the CrossGCC emailing list. You can start with > HTTP://Kegel.com/crosstool/crosstool-0.38/doc/crosstool-howto.html#canadian > and > HTTP://Sourceware.org/ml/crossgcc/2005-08/msg00019.html
An old version of the CrossGCC FAQ is available from: http://vmlinux.org/joachim/mirror/www.objsw.com/CrossGCC/ It may still be of some help to the OP. BTW, the Wayback Machine also has the same FAQ archived at it's original address, but I didn't check to see if all the pieces have been archived. Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: The Standard Oil Company of the 21st century
In article <1123840514.446844.146060@g47g2000cwa.googlegroups.com>, grond@cs.tu-berlin.de wrote:

> The situation is this: I have a Qtopia-device that doesn&#2013266100;t allow me to > place files anywhere else than in "/progfs/opt/QtPalmtop". The native > gcc packages I found for arm expect all their files in /usr/local which > > I&#2013266100;m not a UNIX newbie, in fact I have used UNIX systems for almost ten > years but after one week of trying to cross-compile gcc I have to admit > that this is above me. I only managed to compile native binutils which > appears to be a minor task in comparison to cross-compiling gcc...
Is it possible to use the same mechanism that initramd does to change the root directory of your Qtopia linux system to /progfs/opt/QtPalmtop after bootup? Bye. Jasen
Is it possible to build a soft link that makes /progfs/opt/QtPalmtop
look like /usr/local?
Just a thought...

Jasen Betts <jasen-b@free.net.nospam.nz> wrote:

:In article <1123840514.446844.146060@g47g2000cwa.googlegroups.com>, grond@cs.tu-berlin.de wrote:
:
:> The situation is this: I have a Qtopia-device that doesn&#2013266100;t allow me to
:> place files anywhere else than in "/progfs/opt/QtPalmtop". The native
:> gcc packages I found for arm expect all their files in /usr/local which
:> 
:> I&#2013266100;m not a UNIX newbie, in fact I have used UNIX systems for almost ten
:> years but after one week of trying to cross-compile gcc I have to admit
:> that this is above me. I only managed to compile native binutils which
:> appears to be a minor task in comparison to cross-compiling gcc...
:
:Is it possible to use the same mechanism that initramd does to change the
:root directory of your Qtopia linux system to /progfs/opt/QtPalmtop after
:bootup?
:
:Bye.
:   Jasen

--  Dave Brooks <http://www.iinet.net.au/~daveb>
PGP public key: servers daveb@iinet.net.au
    fingerprint 20 8F 95 22 96 D6 1C 0B  3D 4D C3 D4 50 A1 C4 34
 What's all this? see http://www.iinet.net.au/~daveb/crypto.html

  "If anyone slew an innocent person it would be as if he slew the whole of mankind and if anyone saved a life it would be as if he saved the life of the whole mankind" [Al-Qur'an 5:32]
  "Do treat your women well and be kind to them for they are your partners and committed helpers." [The last sermon of the Prophet Muhammad (pbuh).]
  "An Arab has no superiority over a non-Arab, nor a non-Arab has any superiority over an Arab; also a white has no superiority over a black, nor a black has any superiority over white except by piety and good action." [ibid]
Thank you for the pointers you gave me. I will try to use crosstool, it
sounds very promising!

Nothing. The device boots an image that contains a cramfs with a linux
system on it. You cannot manipulate the cramfs because the bootloader
checks the image=B4s integrity before booting the kernel in it. There
may be ways of tempering with the image by somehow extracting the
bootloader binary and seeing what checking it actually does, but
that=B4s too complicated right now.

Anyway, the way the system is set up is that you cannot do anything but
install stuff into one single directory. There you probably could mount
some other filesystem but anyway...

Something like chroot? Then most of the software installed in the
original lower directories wouldn=B4t be accessible.

> Is it possible to build a soft link that makes /progfs/opt/QtPalmtop > look like /usr/local?
Now. I would need write-access to either /usr or /usr/local which I don=B4t have.