当前位置: 技术问答>linux和unix
porting gdb to arm ,error
来源: 互联网 发布时间:2016-05-25
本文导语: checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU configure: error: source directory already configured; run "make distclean" there first make[1]: *** [configure-bfd] Error 1 make[1]: Leaving directory `/mnt/MySha...
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
configure: error: source directory already configured; run "make distclean" there first
make[1]: *** [configure-bfd] Error 1
make[1]: Leaving directory `/mnt/MyShare2_debian/software/src/gdb/p950/TT'
make: *** [all] Error 2
使用make distclean再試一次也一樣
checking for style of include used by make... GNU
configure: error: source directory already configured; run "make distclean" there first
make[1]: *** [configure-bfd] Error 1
make[1]: Leaving directory `/mnt/MyShare2_debian/software/src/gdb/p950/TT'
make: *** [all] Error 2
使用make distclean再試一次也一樣
|
贴个有用的脚本片断,稍做修改就可以用来编译gdb-6.8,不过你的cross toolchain中一定要包含ncurse库才行(好象是configure需要一个叫termcap.h的文件,在这个库里)。
里面的一些环境变量,按照自己的要求改巴改巴就可以了,这是我以前写的一个脚本,现在懒了,不想动。
echo -n "step 9, begin make gdb-6.8......">>${LOG_FILE}
date "+%F %T">>${LOG_FILE}
cd ${SOURCE}
tar jxvf ${TARBALL}/gdb-6.8.tar.bz2
patch -Np1 -i ${PATCHES}/gdb-6.8.patch -d ${SOURCE}/gdb-6.8
cd ${SOURCE}/gdb-6.8
${SOURCE}/gdb-6.8/configure --prefix=${PREFIX} --target=${TARGET} 2>&1 | tee configure.out
make 2>&1 | tee make.out
make install 2>&1 | tee -a make.out
cd ${SOURCE}/gdb-6.8/gdb/gdbserver
${SOURCE}/gdb-6.8/gdb/gdbserver/configure --host=arm-linux --prefix=${SYSROOT}/usr 2>&1 | tee -a configure.out
make 2>&1 | tee -a make.out
make install 2>&1 | tee -a make.out
echo -n "make gdb-6.8 done, current time is ">>${LOG_FILE}
date "+%F %T" >> ${LOG_FILE}
想用的自个动动脑筋设置好环境变量就可以了,很容易的。下面是补丁文件gdb-6.8.patch的内容,也很简单:
diff -Naur gdb-6.8-org/gdb/infcall.c gdb-6.8/gdb/infcall.c
--- gdb-6.8-org/gdb/infcall.c 2008-01-09 03:28:08.000000000 +0800
+++ gdb-6.8/gdb/infcall.c 2008-05-19 12:02:26.000000000 +0800
@@ -194,7 +194,7 @@
struct type *ftype = check_typedef (value_type (function));
enum type_code code = TYPE_CODE (ftype);
struct type *value_type;
- CORE_ADDR funaddr;
+ CORE_ADDR funaddr = VALUE_ADDRESS(NULL);
/* If it's a member function, just look at the function
part of it. */
里面的一些环境变量,按照自己的要求改巴改巴就可以了,这是我以前写的一个脚本,现在懒了,不想动。
echo -n "step 9, begin make gdb-6.8......">>${LOG_FILE}
date "+%F %T">>${LOG_FILE}
cd ${SOURCE}
tar jxvf ${TARBALL}/gdb-6.8.tar.bz2
patch -Np1 -i ${PATCHES}/gdb-6.8.patch -d ${SOURCE}/gdb-6.8
cd ${SOURCE}/gdb-6.8
${SOURCE}/gdb-6.8/configure --prefix=${PREFIX} --target=${TARGET} 2>&1 | tee configure.out
make 2>&1 | tee make.out
make install 2>&1 | tee -a make.out
cd ${SOURCE}/gdb-6.8/gdb/gdbserver
${SOURCE}/gdb-6.8/gdb/gdbserver/configure --host=arm-linux --prefix=${SYSROOT}/usr 2>&1 | tee -a configure.out
make 2>&1 | tee -a make.out
make install 2>&1 | tee -a make.out
echo -n "make gdb-6.8 done, current time is ">>${LOG_FILE}
date "+%F %T" >> ${LOG_FILE}
想用的自个动动脑筋设置好环境变量就可以了,很容易的。下面是补丁文件gdb-6.8.patch的内容,也很简单:
diff -Naur gdb-6.8-org/gdb/infcall.c gdb-6.8/gdb/infcall.c
--- gdb-6.8-org/gdb/infcall.c 2008-01-09 03:28:08.000000000 +0800
+++ gdb-6.8/gdb/infcall.c 2008-05-19 12:02:26.000000000 +0800
@@ -194,7 +194,7 @@
struct type *ftype = check_typedef (value_type (function));
enum type_code code = TYPE_CODE (ftype);
struct type *value_type;
- CORE_ADDR funaddr;
+ CORE_ADDR funaddr = VALUE_ADDRESS(NULL);
/* If it's a member function, just look at the function
part of it. */