From: Darren G. <ts...@ya...> - 2005-02-08 02:30:34
|
Dave gave suggestions for setting up remote gdb debugging for the gumstix. I started to do this and find I don't know enough cross compilation lore. Is there a generic "right" set of things to pass to software that's built for the gumstix using ./configure and make? For example: > AR=/home/darren/gumstix/gumstix-buildroot/build_arm/staging_dir/bin/ > arm-linux-uclibc-ar > AS=/home/darren/gumstix/gumstix-buildroot/build_arm/staging_dir/bin/ > arm-linux-uclibc-as > LD=/home/darren/gumstix/gumstix-buildroot/build_arm/staging_dir/bin/ > arm-linux-uclibc-ld > NM=/home/darren/gumstix/gumstix-buildroot/build_arm/staging_dir/bin/ > arm-linux-uclibc-nm > CC=/home/darren/gumstix/gumstix-buildroot/build_arm/staging_dir/bin/ > arm-linux-uclibc-gcc > GCC=/home/darren/gumstix/gumstix-buildroot/build_arm/staging_dir/bin/ > arm-linux-uclibc-gcc > CXX=/home/darren/gumstix/gumstix-buildroot/build_arm/staging_dir/bin/ > arm-linux-uclibc-g++ > RANLIB=/home/darren/gumstix/gumstix-buildroot/build_arm/staging_dir/ > bin/arm-linux-uclibc-ranlib \ > CFLAGS="-Os -march=armv5te -mtune=xscale -Wa,-mcpu=xscale " \ > ./configure \ > --target=arm-linux \ > --host=arm-linux \ > --build=i386-pc-linux-gnu \ > --prefix=/usr \ > --exec-prefix=/usr \ > --bindir=/usr/bin \ > --sbindir=/usr/sbin \ > --libexecdir=/usr/lib \ > --sysconfdir=/etc \ > --datadir=/usr/share \ > --localstatedir=/var \ > --mandir=/usr/man \ > --infodir=/usr/info \ > --disable-nls \ > --with-shared \ > --program-transform-name=s,,, I found some flags from reading through the buildroot make process. Is it correct/better to pass these when building anything with arm-linux-gcc? -march=armv5te -mtune=xscale -mcpu=xscale When I tried this myself I got: > arm-linux-gcc -c -g -march=armv5te -mtune=xscale -mcpu=xscale > -Ipa_common pa_unix_oss/pa_unix.c -o pa_unix_oss/pa_unix.o > pa_unix_oss/pa_unix.c:0: warning: switch -mcpu=xscale conflicts with > -march= switch > pa_unix_oss/pa_unix.c:1: warning: switch -mcpu=xscale conflicts with > -march= switch When building gdb, these flags worked fine: > home/darren/gumstix/gumstix-buildroot/build_arm/staging_dir/bin/arm- > linux-uclibc-gcc -c -Wall -Os -march=armv5te -mtune=xscale > -Wa,-mcpu=xscale -I. -I. -I./../regformats -I./../../include > -I../../bfd -I./../../bfd reg-arm.c > /home/darren/gumstix/gumstix-buildroot/build_arm/staging_dir/bin/arm- > linux-uclibc-gcc -c -Wall -Os -march=armv5te -mtune=xscale > -Wa,-mcpu=xscale -I. -I. -I./../regformats -I./../../include > -I../../bfd -I./../../bfd linux-low.c > /home/darren/gumstix/gumstix-buildroot/build_arm/staging_dir/bin/arm- > linux-uclibc-gcc -c -Wall -Os -march=armv5te -mtune=xscale > -Wa,-mcpu=xscale -I. -I. -I./../regformats -I./../../include > -I../../bfd -I./../../bfd linux-arm-low.c Does this: Compile gdb on your host, but targeted for the gumstix Imply this?: ./configure --target=arm-linux; make; |