[uClibc] building an arm-be toolchain

Mark Rakes mrakes at vivato.net
Tue Aug 19 17:00:28 UTC 2003


you need '-mbig-endian' in your CFLAGS for this to work.

other info that might help:
-top of CVS binutils actually understands arm*b targets for ld,
	and can link big-endian by default.
-I did a bunch of work to make gcc generate big-endian code by default,
	but didn't quite do enough, as I still ended up needing
	'-mbig-endian' in order for the optimizers to generate be code.

hth,
-mark


On Tuesday, August 19, 2003, at 02:55  AM, Frank Meerkoetter wrote:
<edit>
> Thanks for your quick help, but i still have a problem building the
> toolchain.
>
> This is what i did:
> $ cd /home/frank
> $ cvs -z3 -d:pserver:anonymous at uclibc.org:/var/cvs co toolchain
> $ cvs -z3 -d:pserver:anonymous at uclibc.org:/var/cvs co uClibc
> $ tar cvyf uClibc-snapshot.tar.bz2 uClibc/
>
> Then i modified gcc-3.2.3/Makefile so that ARCH is set to "arm"
> and the CVS-Version is used.
> ...
> $(DL_DIR)/$(UCLIBC_SOURCE):
> #   $(WGET) -P $(DL_DIR) $(UCLIBC_SITE)/$(UCLIBC_SOURCE)
>     cp /home/frank/$(UCLIBC_SOURCE) $(DL_DIR)
> ...
>
> Then i tried to build it:
> $ make
>
> [ uClibc Configuration queries me for the Target Processor  
> Type/Endianness ]
> [ which i set to "Generic Arm" and "Big Endian" ]
>
> [... make output ...]
> make -C ldso;
> make[3]: Entering directory  
> `/home/frank/toolchain/gcc-3.2.3/build_arm/uClibc/ld
> so/ldso'
> echo "const char *_dl_progname=\""ld-uClibc.so.0"\";" > _dl_progname.h
> echo "#include \"arm/elfinterp.c\"" >> _dl_progname.h
> /home/frank/toolchain/gcc-3.2.3/toolchain_arm/bin/arm-uclibc-gcc   
> -Wall -Wstrict    -prototypes -Wno-trigraphs -fno-strict-aliasing   
> -fstrict-aliasing -Os     -fPIC     -DUCLIBC_TARGET_PREFIX=\"/\"  
> -DUCLIBC_DEVEL_PREFIX=\""/home/frank/toolchain/gcc     
> -3.2.3/toolchain_arm"\"  
> -DUCLIBC_BUILD_DIR=\"/home/frank/toolchain/gcc-3.2.3/bui     
> ld_arm/uClibc\" -fno-builtin -nostdinc -I../../ldso/include -I.  
> -I../../include      
> -I/home/frank/toolchain/gcc-3.2.3/toolchain_arm/lib/gcc-lib/arm-linux/ 
> 3.2.3/incl    ude -I../libdl -c arm/resolve.S -o arm/resolve.o
> /home/frank/toolchain/gcc-3.2.3/toolchain_arm/bin/arm-uclibc-strip -x  
> -R .note -    R .comment arm/resolve.o
> /home/frank/toolchain/gcc-3.2.3/toolchain_arm/bin/arm-uclibc-gcc   
> -Wall -Wstrict    -prototypes -Wno-trigraphs -fno-strict-aliasing   
> -fstrict-aliasing -Os     -fPIC     -DUCLIBC_TARGET_PREFIX=\"/\"  
> -DUCLIBC_DEVEL_PREFIX=\""/home/frank/toolchain/gcc     
> -3.2.3/toolchain_arm"\"  
> -DUCLIBC_BUILD_DIR=\"/home/frank/toolchain/gcc-3.2.3/bui     
> ld_arm/uClibc\" -fno-builtin -nostdinc -I../../ldso/include -I.  
> -I../../include      
> -I/home/frank/toolchain/gcc-3.2.3/toolchain_arm/lib/gcc-lib/arm-linux/ 
> 3.2.3/incl    ude -I../libdl -c ldso.c -o ldso.o
> /home/frank/toolchain/gcc-3.2.3/toolchain_arm/bin/arm-uclibc-strip -x  
> -R .note -    R .comment ldso.o
> /home/frank/toolchain/gcc-3.2.3/toolchain_arm/bin/arm-uclibc-ld "-EB"  
> -shared --    warn-common --export-dynamic --sort-common -z combreloc  
> --discard-locals --disca    rd-all -s -e _dl_boot  
> -soname=ld-uClibc.so.0 \
>         -o ld-uClibc-0.9.20.so arm/resolve.o ldso.o  
> /home/frank/toolchain/gcc-3.     
> 2.3/toolchain_arm/lib/gcc-lib/arm-linux/3.2.3/libgcc.a;
> /home/frank/toolchain/gcc-3.2.3/toolchain_arm/bin/arm-uclibc-ld:  
> arm/resolve.o:     compiled for a little endian system and target is  
> big endian
> File in wrong format: failed to merge target specific data of file  
> arm/resolve.o
> /home/frank/toolchain/gcc-3.2.3/toolchain_arm/bin/arm-uclibc-ld:  
> ldso.o: compile    d for a little endian system and target is big  
> endian
> File in wrong format: failed to merge target specific data of file  
> ldso.o
> make[3]: *** [lib] Segmentation fault
> make[3]: Leaving directory  
> `/home/frank/toolchain/gcc-3.2.3/build_arm/uClibc/ldso/ldso'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory  
> `/home/frank/toolchain/gcc-3.2.3/build_arm/uClibc/ldso'
> make[1]: *** [_dir_ldso] Error 2
> make[1]: Leaving directory  
> `/home/frank/toolchain/gcc-3.2.3/build_arm/uClibc'
> make: ***  
> [/home/frank/toolchain/gcc-3.2.3/build_arm/uClibc/lib/libc.a] Error 2
>
>
> I'm also a little bit confused about the ARCH-Variable. If i would  
> like to
> build an arm-be toolchain, do i have to set this to arm or armbe?
>
> Frank
>
> _______________________________________________
> uClibc mailing list
> uClibc at uclibc.org
> http://uclibc.org/mailman/listinfo/uclibc




More information about the uClibc mailing list