ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ltib] building gdb cross


From: tarek allaoua
Subject: [Ltib] building gdb cross
Date: Thu, 30 Apr 2009 14:44:49 +0200

Hello
I've a long history with gdb using ltib :) It simply fails every time.
gdb running on target builds correctely
gdbserver running on target builds correctely
gdb cross run on host fails

Bellow some logs :


updating cache .././config.cache
configure: creating ./config.status
config.status: creating Makefile
config.status: creating cconfig.h
config.status: executing default commands
make[1]: Leaving directory `/home/allaoua/mpc5121/ltib-mpc5121ads-20081208/rpm/BUILD/gdb-stable/cross-gdb'
make: *** [all] Error 2
error: Bad exit status from /home/allaoua/mpc5121/ltib-mpc5121ads-20081208/tmp/rpm-tmp.96560 (%build)


RPM build errors:
    Bad exit status from /home/allaoua/mpc5121/ltib-mpc5121ads-20081208/tmp/rpm-tmp.96560 (%build)
Build time for gdb: 55 seconds

Failed building gdb


f_buildrpms() returned an error, exiting
traceback:
 main:550


Started: Thu Apr 30 14:37:30 2009
Ended:   Thu Apr 30 14:38:27 2009
Elapsed: 57 seconds

These packages failed to build:
gdb

Build Failed

Exiting on error or interrupt



address@hidden:~/mpc5121/ltib-mpc5121ads-20081208$ cat /home/allaoua/mpc5121/ltib-mpc5121ads-20081208/tmp/rpm-tmp.96560
#!/bin/sh

  RPM_SOURCE_DIR="/home/allaoua/mpc5121/ltib-mpc5121ads-20081208/rpm/SOURCES"
  RPM_BUILD_DIR="/home/allaoua/mpc5121/ltib-mpc5121ads-20081208/rpm/BUILD"
  RPM_OPT_FLAGS="-O2 -fsigned-char"
  RPM_ARCH="i386"
  RPM_OS="linux"
  export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS
  RPM_DOC_DIR="/opt/freescale/ltib/usr/doc"
  export RPM_DOC_DIR
  RPM_PACKAGE_NAME="gdb"
  RPM_PACKAGE_VERSION="6.6cs"
  RPM_PACKAGE_RELEASE="1"
  export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
  RPM_BUILD_ROOT="/home/allaoua/mpc5121/ltib-mpc5121ads-20081208/tmp/gdb"
  export RPM_BUILD_ROOT
 
  set -x
  umask 022
  cd /home/allaoua/mpc5121/ltib-mpc5121ads-20081208/rpm/BUILD
cd gdb-stable
ORIG_PATH=$PATH
# This is the optimised host type.  Needed to prevent infering a native build
OPT_CFGHOST=`echo ${TOOLCHAIN_PREFIX} | perl -n -e 's,-$,,;print'`

# do something (the least costly)
if [ -z "$PKG_GDB_CROSS_WANT_ED$PKG_GDB_SERVER_WANT_ED$PKG_GDB_NATIVE_WANT_ED" ]
then
    PKG_GDB_SERVER_WANT_ED=y
fi

# cross gdb to run on the build machine
if [ -n "$PKG_GDB_CROSS_WANT_ED" ]
then
    BD=cross-gdb
    rm -rf $BD
    mkdir -p $BD
    cd $BD
    export PATH=$UNSPOOF_PATH
    export ac_cv_header_stdc=yes bash_cv_have_mbstate_t=yes \
           ac_cv_header_nlist_h=no ac_cv_libexpat=no
    ../configure --prefix=/usr --target=$CFGHOST --mandir=/usr/share/man
    make
    cp gdb/gdb $TOP/bin/gdb
    cd -
fi

# from now build stuff to go into the rpm package
export PATH=$ORIG_PATH

# gdbserver to run on the target
if [ -n "$PKG_GDB_SERVER_WANT_ED" ]
then
    cd gdb/gdbserver
    ./configure --prefix=/usr --host=$CFGHOST --mandir=/usr/share/man
    make
    cd -
fi

# full gdb to run on the target
if [ -n "$PKG_GDB_NATIVE_WANT_ED" ]
then
    export CPP="$BUILDCPP"
    export CC_FOR_BUILD="$BUILDCC"
    export ac_cv_header_stdc=yes bash_cv_have_mbstate_t=yes \
           ac_cv_header_nlist_h=no
    CC=gcc AR=ar \
    ./configure --prefix=/usr --host=$OPT_CFGHOST --build=i686-pc-linux-gnu --mandir=/usr/share/man
    # don't build gdbserver
    perl -pi.orig -e 's,(x\$build_gdbserver),$1_no_thanks,' gdb/configure
    make
fi


reply via email to

[Prev in Thread] Current Thread [Next in Thread]