lm32 newlib build, libgloss not getting built

JP jpbonn-keyword-newlib.3698d5@corniceresearch.com
Tue Jan 10 20:14:00 GMT 2012


I'm trying to build a newlib/libgloss for the lm32 (using clang).  I'm 
running into a problem where the configure script removes libgloss from 
the list of directories to be built.  I'm not really sure what's wrong.

I tweaked the configure script to print the relevant information.  The 
configure script thinks the host and target are the same and I'm not 
building a cross compiler.  Is that correct? (I think not)  If it is 
correct what did I do wrong in the configure?

%%%%%%%%%%%%%%%%%%%%%  host: lm32-unknown-elf  target:lm32-unknown-elf
%%%%%%%%%%%%%%%%%%%%%  is_cross_compiler: no
%%%%%%%%%%%%%%%%%%%%%%  skipdirs:  target-libgloss target-newlib 
target-opcodes

The first echo from:
echo "%%%%%%%%%%%%%%%%%%%%%  is_cross_compiler: $is_cross_compiler"
case $is_cross_compiler in
   no) skipdirs="${skipdirs} ${cross_only}" ;;
   yes) skipdirs="${skipdirs} ${native_only}" ;;
esac

The latter one from:
echo "%%%%%%%%%%%%%%%%%%%%%  is_cross_compiler: $is_cross_compiler"
case $is_cross_compiler in
   no) skipdirs="${skipdirs} ${cross_only}" ;;
   yes) skipdirs="${skipdirs} ${native_only}" ;;
esac
echo "%%%%%%%%%%%%%%%%%%%%%%  skipdirs: $skipdirs"





Here's the script I used to build (derived from Joel's attempt at rtems):
AS=lm32-rtems4.11-as
#CC=lm32-rtems4.11-gcc
LD=lm32-rtems4.11-ld
OBJCOPY=lm32-rtems4.11-objcopy
AR=lm32-rtems4.11-ar
RANLIB=lm32-rtems4.11-ranlib

CC="clang -O0 -march=mico32 -ccc-host-triple mico32-elf -ccc-gcc-name 
lm32-rtems4.11-gcc"


# Joel's RTEMS script:
CPU=lm32
../newlib-1.19.0/configure --host=${CPU}-elf \
   --prefix=`pwd`/install \
   --with-newlib \
   --with-libgloss \
   CFLAGS="-O0 -g" \
   CC="clang -march=mico32 -ccc-host-triple mico32-elf -ccc-gcc-name 
lm32-rtems4.11-gcc" \
   CC_FOR_TARGET="clang -march=mico32 -ccc-host-triple mico32-elf 
-ccc-gcc-name lm32-rtems4.11-gcc" \
   CC_FOR_BUILD="clang " \
   PONIES=true \
   LD=lm32-rtems4.11-ld \
   OBJCOPY=lm32-rtems4.11-objcopy \
   RANLIB=lm32-rtems4.11-ranlib \
   AR=${CPU}-rtems4.11-ar \
   AS=${CPU}-rtems4.11-as && \
make -j4 && \
make install

echo $?



More information about the Newlib mailing list