• Home
  • Help
  • Search
  • Login
  • Register
  Show Posts
Pages: [1]
1  Linux Stuff / General Linux questions / Re: How to build a native C compiler on a SheevaPlug? on: September 10, 2010, 04:29:53 PM
Thank you. Those sound like useful suggestions.

I've now switched to Debian squeeze and am seeing if I get any further with that.

I'm new to Debian and Ubuntu (coming from RedHat and Fedora) so apt-get is a bit of a mystery to me ... is it simple to grab the Debian Lenny packages you have pointed to and install them into Debian Squeeze?
2  Linux Stuff / General Linux questions / How to build a native C compiler on a SheevaPlug? on: September 10, 2010, 10:35:31 AM
I have my SheevaPlug booting Ubuntu 9.04 from an eSATA disk, so I have lots of disk space and I'm not worried about possibly wearing out internal flash or an SD card ...

I'm trying to compile (natively) version 3.4.6 of the GCC C compiler. I know it's old, but I need it so that I can build a version of GPC (the GNU Pascal compiler) which exactly matches the version I am running on i86-based Linux boxes (GPC 20070904 based on GCC-3.4.6).

I've tried using the GPC version that I get with apt-get install GPC.

It identifies itself as:

david@ubuntu:~$ gpc -v
Using built-in specs.
Configured with: ../src/configure -v --enable-languages=c,pascal --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.1.3 --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --disable-libmudflap --disable-libssp --enable-checking=release arm-linux-gnueabi
Thread model: posix
gpc version 20070904, based on gcc-4.1.3 20080420 (prerelease) (Ubuntu 2.1-4.1.2-22ubuntu1)

However when I build my application using that compiler I see various quirks. I'd like to get to a compiler that should be exactly the same as the one I'm using on the i86-based Linux boxes to rule out compiler differences as the source of the problems I'm seeing.

I'm failing dismally to build the GCC C compiler ...

After a lot of Googling, I eventually settled on a set of arguments to configure.

The arguments I have used are: --prefix=/usr/local/gcc-3.4.6 --enable-languages=c --with-float=soft --disable-libssp --with-arch=armv5te --enable-shared --with-system-zlib --without-included-gettext --enable-threads=posix --enable-nls --enable-__cxa_atexit --enable-clocale=gnu --disable-libmudflap --disable-libgomp

I'm also adding '-marm -msoft-float -march=armv5te -Wl,marmelf_linux_eabi' to the CFLAGS in the generated Makefile (and to the calls to xgcc) and I'm adding -marmelf_linux_eabi to LD_FLAGS and to any explicit calls to the linker.

I'm using the version of the C compiler that is installed by apt-get build-essential or possibly by apt-get install gcc, I'm not sure which now. It identifies itself as
root@ubuntu:~# gcc -v
Using built-in specs.
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.3-5ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --disable-libssp --disable-sjlj-exceptions --with-arch=armv5t --with-tune=cortex-a8 --enable-checking=release --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi
Thread model: posix
gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)

The brick wall I've finally hit is:
/usr/src/gcc/b3/gcc/xgcc: /usr/src/gcc/b3/gcc/libgcc_s.so.1: version `GCC_3.5' not found (required by /usr/src/gcc/b3/gcc/xgcc)

Can anyone suggest suitable arguments for configure to build version 3.4.6 of the GCC C compiler, any patches, or changes to the generated Makefile, or anything else I'm missing?
Pages: [1]