Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: Newlib problem

2005-04-06 by ntfreak2000

--- In lpc2000@yahoogroups.com, Leonardo Santos <lsantos@p...> wrote:
> Already did that. The scrips then goes like this:
> 
>   echo "($0) building botstrap GCC"
>   make all-gcc install-gcc LANGUAGES="c c++"
>   cerror "GCC build failed"
> 
>   mkdir -p ../${newlibbase}
>   cd ../${newlibbase}
> 
>   echo "($0) configuring newlib"
>   ../../source/${newlibbase}/configure \
>      -v --quiet --prefix=$prefix --disable-newlib-supplied-syscalls 
\
>      --target=${target} --enable-interwork --enable-multilib \
>      --with-gnu-ld --with-gnu-as
>   cerror "newlib configuration failed"
> 
>   echo "($0) building newlib"
>   make all install #clean
>   cerror "newlib build failed"
> 
>   cd $prefix/source
>   cd ../build/${gcccore}
>   echo "($0) building GCC"
>   make all install LANGUAGES="c c++"
>   cerror "GCC build failed"
> 
> All goes well until de final build of GCC. Then I get this error:
> 
> /opt/arm/build/gcc-3.4.3/gcc/xgcc -shared-libgcc 
> -B/opt/arm/build/gcc-3.4.3/gcc/ -nostdinc++ 
> -L/opt/arm/build/gcc-3.4.3/arm-elf/libstdc++-v3/src 
> -L/opt/arm/build/gcc-3.4.3/arm-elf/libstdc++-v3/src/.libs 
> -B/opt/arm/arm-elf/bin/ -B/opt/arm/arm-elf/lib/ 
> -isystem /opt/arm/arm-elf/include -isystem /opt/arm/arm-elf/sys-
include 
> -Winvalid-pch -Wno-deprecated -x c++-header -g -O2 
> -I/opt/arm/build/gcc-3.4.3/arm-elf/libstdc++-v3/include/arm-elf 
> -I/opt/arm/build/gcc-3.4.3/arm-elf/libstdc++-v3/include 
> -I/opt/arm/source/gcc-3.4.3/libstdc++-
v3/libsupc++ /opt/arm/source/gcc-3.4.3/libstdc++-v3/include/stdc++.h 
> -O0 -g -o ./arm-elf/bits/stdc++.h.gch/O0g; \
> /opt/arm/build/gcc-3.4.3/gcc/xgcc -shared-libgcc 
> -B/opt/arm/build/gcc-3.4.3/gcc/ -nostdinc++ 
> -L/opt/arm/build/gcc-3.4.3/arm-elf/libstdc++-v3/src 
> -L/opt/arm/build/gcc-3.4.3/arm-elf/libstdc++-v3/src/.libs 
> -B/opt/arm/arm-elf/bin/ -B/opt/arm/arm-elf/lib/ 
> -isystem /opt/arm/arm-elf/include -isystem /opt/arm/arm-elf/sys-
include 
> -Winvalid-pch -Wno-deprecated -x c++-header -g -O2 
> -I/opt/arm/build/gcc-3.4.3/arm-elf/libstdc++-v3/include/arm-elf 
> -I/opt/arm/build/gcc-3.4.3/arm-elf/libstdc++-v3/include 
> -I/opt/arm/source/gcc-3.4.3/libstdc++-
v3/libsupc++ /opt/arm/source/gcc-3.4.3/libstdc++-v3/include/stdc++.h 
> -O2 -g -o ./arm-elf/bits/stdc++.h.gch/O2g;
> make[1]: Leaving directory 
> `/opt/arm/build/gcc-3.4.3/arm-elf/libstdc++-v3/include'
> /bin/sh ../../source/gcc-3.4.3/mkinstalldirs arm-elf/libiberty ; \
> rm -f arm-elf/libiberty/Makefile || : ; \
> cp multilib.out arm-elf/libiberty/multilib.out
> mkdir -p -- arm-elf/libiberty
> Configuring in arm-elf/libiberty
> cross-compiling...
> /opt/arm/arm-elf/bin/ld: crt0.o: No such file: No such file or 
directory
> collect2: ld returned 1 exit status
> configure: error: unknown endianess - sorry
> /opt/arm/source/gcc-3.4.3/libiberty/configure: line 3289: exit: 
please: 
> numeric argument required
> /opt/arm/source/gcc-3.4.3/libiberty/configure: line 3289: exit: 
please: 
> numeric argument required
> make: *** [configure-target-libiberty] Error 1
> 
> 
> Any suggestions? The only difference to GNU ARM guide are the 
patches:
> 
> gcc-3.4.3/gcc/config/arm/t-arm-elf
> 
> -# MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork
> -# MULTILIB_DIRNAMES   += normal interwork
> -# MULTILIB_EXCEPTIONS += *mapcs-26/*mthumb-interwork*
> +MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork
> +MULTILIB_DIRNAMES   += normal interwork
> +MULTILIB_EXCEPTIONS += *mapcs-26/*mthumb-interwork*
> 
> I've read in a number of GCC foruns that this is necessary to 
enable 
> interworking.
> 
> The other patch is:
> 
> newlib-1.13.0/Makefile.in
> -CFLAGS_FOR_TARGET = -O2 $(CFLAGS)
> +CFLAGS_FOR_TARGET = -O2 $(CFLAGS) -DREENTRANT_SYSCALLS_PROVIDED 
> -DNO_FLOATING_POINT -mthumb -mthumb-interwork
> 
> Which is supposed to disable floating point support and to enable 
thumb and 
> interword in newlib.
> 
> >
> > Thanks,
> >
> > I will modify the script to first build the bootstrap compiler, 
then
> > newlib, and then the final compiler. Do I need to run configure 
for the 
> > compiler again after building newlib ?
> >
> > Regards
> >   Anton Erasmus
> 
> -- 
> This is Linux country.
> On a quiet night, you can hear Windows reboot.
> 
> Leonardo Pereira Santos
> Engenheiro de Projetos
> PD3 Tecnologia
> av. ParĂ¡ 330/202
> (51) 3337 1237
> 
> Today Fortune tells us:
> I am getting into abstract painting.  Real abstract -- no brush, no 
canvas,
> I just think about it.  I just went to an art museum where all of 
the art
> was done by children.  All the paintings were hung on refrigerators.
> 		-- Steven Wright

Strange, I have given the configure options I always use - never 
tried script so cannot verify.

** gcc build **
./configure --target=arm-elf --prefix=/sarm-elf --enable-interwork --
enable-multilib --disable-nls --disable-win32-registry --disable-
shared --enable-languages="c,c++" --with-newlib --with-headers=/sarm-
build/newlib-1.13.0/newlib/libc/include
make all-gcc install-gcc 2>&1 | tee make-gcc.log

** newlib **
./configure --target=arm-elf --prefix=/sarm-elf --enable-interwork --
enable-multilib --disable-nls --disable-win32-registry --disable-
shared --enable-target-optspace=yes
make all install 2>&1 | tee make.log

** gcc full build **
make all install 2>&1 | tee make.log

Hope it helps.

Regards
Spen

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.