Compiling GCC on TB?

Anything related to compile and create applications for the Always Innovating OS

Compiling GCC on TB?

Postby jesmith » Wed Feb 17, 2010 12:40 pm

I'd like to try gcj on the TouchBook, but it was not included in the gcc build that ships with the O/S.

I've downloaded the same version of gcc that AI uses (4.3.3) but I can't for the life of me get it to compile on the TouchBook.

(I can provide details of the myriad combinations of things I've tried if anyone cares.)

Is what I'm trying to do even possible? Or do I need to set up a Linux machine and an OpenEmbedded environment to build gcc?
jesmith
 
Posts: 20
Joined: Tue Jan 12, 2010 1:29 pm

Re: Compiling GCC on TB?

Postby torpor » Thu Feb 18, 2010 1:37 am

It should be possible - but slow - to build GCC natively onboard the Touchbook .. if you can post details about what you've done and the problems you've encountered, we can work out what the issue is ..
torpor
 
Posts: 140
Joined: Fri Aug 21, 2009 1:35 am

Re: Compiling GCC on TB?

Postby jesmith » Thu Feb 18, 2010 7:14 am

I'm doing the configure with these args, which I derived from the output of gcc -v that ships with the TB:

--enable-languages=c,c++,java
--with-x
--enable-java-awt=xlib
--disable-gtktest
--with-gnu-ld
--enable-shared
--enable-target-optspace
--enable-threads=posix
--enable-multilib
--enable-c99
--enable-long-long
--enable-symvers=gnu
--enable-libstdcxx-pch
--program-prefix=arm-angstrom-linux-gnueabi
--enable-cheaders=c_std
--enable-__cxa_atexit

I installed binutils 2.20, and linked the following directories from gcc's src dir to binutils:
bfd binutils gas gprof ld opcodes

When I do the make, I get this error:
earmelf_linux_eabi.o: In function `gldarmelf_linux_eabi_write_build_id_section':
/home/ai/compile/objdir/ld/earmelf_linux_eabe.c:1369: undefined reference to `sha1_init_ctx'
and then a bunch more sha1-related errors

When I previously tried to do the build without first installing binutils, I got errors about not knowing the suffix for object files.

-Joshua
jesmith
 
Posts: 20
Joined: Tue Jan 12, 2010 1:29 pm

Re: Compiling GCC on TB?

Postby jesmith » Thu Feb 18, 2010 11:35 am

I'm getting closer. I removed the link to binutils' ld and redid the configure, so it would use the built-in ld instead.

With that change, I got through the compilation of gcc, but it seems to be failing on the step where it moves the built stuff around:

make[3]: Entering directory `/home/ai/compile/objdir/libiberty'
/bin/sh: /home/ai/compile/objdir/./gcc/libgcc_s.so.1: version `GCC_3.5' not found (required by /bin/sh)

There is a file called xgcc in the gcc directory, which seems to be the compiler (running it with -v gives the output one would expect from a gcc compiler).

Any ideas?
jesmith
 
Posts: 20
Joined: Tue Jan 12, 2010 1:29 pm

Re: Compiling GCC on TB?

Postby jesmith » Fri Feb 19, 2010 11:39 am

Update: I tried adding --disable-bootstrap to the configure. No help.

I noticed that the first error I'm getting is:
/home/ai/compile/objdir/./gcc/xgcc: /home/ai/compile/objdir/./gcc/libgcc_so.1: version `GCC 3.5' not found (required by /home/ai/compile/objdir/./gcc/xgcc)

Now I'm trying --disable-shared...
jesmith
 
Posts: 20
Joined: Tue Jan 12, 2010 1:29 pm


Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron