[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gm2] Build with minimal libraries
From: |
Gaius Mulley |
Subject: |
Re: [Gm2] Build with minimal libraries |
Date: |
Fri, 26 Jun 2009 14:47:56 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
address@hidden writes:
> The current CVS snapshot builds correctly, but still fails when linking
> with minimal libraries. It will link using the full libraries, giving
> an executable of around 270K for hello.mod, and will link using the
> printf() function, giving an executable around 6K, about the size of
> the same program built with C alone.
this sound correct, the -flibs=min libraries are very minimal :-) and
only contain the C printf declaration, exit, abort and a few critical
runtime procedures (which are mostly empty iirc). The idea is that
you add more libraries (if required) or add routines to your program
module. But in essence they allow users to target tiny
micro-controller cpus, if gm2 is built as a cross compiler.
> It looks as if the problem is in the configuration of the gm2 build; the
> linker is looking for libraries in the build directories, as opposed to
> the installation directories. It's also looking for functions which,
> judging by the names, handle exceptions, but that's a problem for another
> day.
> Quite where the linker is getting its search path from I'm not sure;
> the build directories no longer exist, and don't appear in any environment
> variable. I've edited the *.la files to remove references to them. At a
> guess, the wrong paths have been built into the library binaries during
> the install process.
>
> Does anyone have the exact options needed by configure to correctly build
> and install gm2?
>
> Thanks - Will
Hi Will,
here is my build script for a x86_64 Ubuntu system.
#!/bin/bash
rm -rf gcc-4.1.2*
wget http://floppsie.comp.glam.ac.uk/download/c/gcc-4.1.2+gm2-cvs-latest.tar.gz
tar zxf gcc-4.1.2+gm2-cvs-latest.tar.gz
rm -rf build-4.1.2
mkdir build-4.1.2
cd build-4.1.2
../gcc-4.1.2+gm2-cvs-latest/configure --prefix=$HOME/opt
--enable-languages=c,c++,gm2 --enable-checking --disable-multilib
time ( ( make "SHELL=/bin/bash" && cd gcc && make check-gm2 ) >& build-log )
tail -20 build-log
regards,
Gaius