Commit 2a1505d9 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Dist/GDB: Use multiarch gdb

Instead of building gdb for each target

Change-Id: I664f090919f0cfe9bf5a9cbcbe942d8d5e30a76a
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent a1894eb9
broot=${PWD}
source=${broot}/source
targets=x86_64-unknown-linux-gnu i686-unknown-linux-gnu arm-none-linux-gnueabi
targets=x86_64-unknown-linux-gnu,i686-unknown-linux-gnu,arm-none-linux-gnueabi
staging=${broot}/staging
pyversion=2.7
expatversion=2.1.0
arch=`uname -sm | sed 's/ /-/g' | tr A-Z a-z`
version=7.10
targetdir=${broot}/qtcreator-gdb-${version}
gdbtargets=$(addprefix ${targetdir}/gdb-, ${targets})
packagename=qtcreator-gdb-${version}-${arch}.tar.gz
all:package
......@@ -68,19 +67,19 @@ ${staging}/gdb-${version}/configure: ${source}/gdb-${version}.tar.xz | makestagi
cd gdb-${version} && \
touch configure
${gdbtargets}: ${targetdir}/gdb-%: ${staging}/gdb-${version}/configure ${staging}/lib/libpython${pyversion}.a ${staging}/lib/libexpat.a | maketargetdir
test -e ${staging}/gdb-${version}-$* || mkdir ${staging}/gdb-${version}-$*
${targetdir}/gdb: ${staging}/gdb-${version}/configure ${staging}/lib/libpython${pyversion}.a ${staging}/lib/libexpat.a | maketargetdir
test -e ${staging}/gdb-${version}-build || mkdir ${staging}/gdb-${version}-build
export PYTHONHOME=${staging} && \
export PATH="${staging}/bin/:$$PATH" && \
export LDFLAGS="-Wl,--no-as-needed -pthread -lm" && \
cd ${staging}/gdb-${version}-$* && \
${staging}/gdb-${version}/configure --disable-nls --target=$* --with-separate-debug-dir="" \
cd ${staging}/gdb-${version}-build && \
${staging}/gdb-${version}/configure --disable-nls --enable-targets=${targets} --with-separate-debug-dir="" \
--disable-werror --with-python=${staging} --with-libexpat-prefix=${staging} && \
sleep 3 && \
${MAKE} MAKEFLAGS+=-j1 && \
strip -o ${targetdir}/gdb-$* gdb/gdb
strip -o ${targetdir}/gdb gdb/gdb
package: ${gdbtargets} ${targetdir}/python/include/python${pyversion}/pyconfig.h
package: ${targetdir}/gdb ${targetdir}/python/include/python${pyversion}/pyconfig.h
mv ${targetdir} ${targetdir}-${arch}
echo "Packing..."
tar czf ${packagename} qtcreator-gdb-${version}-${arch}
......
broot=${PWD}
source=${broot}/source
targets=arm-none-eabi arm-none-linux-gnueabi i686-pc-mingw32
targets=arm-none-eabi,arm-none-linux-gnueabi,i686-pc-mingw32
staging=${broot}/staging
pyversion=2.7
pydir=${broot}/python
......@@ -8,7 +8,6 @@ expatversion=2.1.0
iconvversion=1.14
version=7.10
targetdir=${broot}/qtcreator-gdb-${version}
gdbtargets=$(addprefix ${targetdir}/gdb-, ${targets})
packageparts=${targetdir}/lib ${targetdir}/data-directory ${targetdir}/libiconv-2.dll ${targetdir}/python27.dll ${targetdir}/libexpat-1.dll
arch=`uname -sm | sed 's/ /-/g' | tr A-Z a-z`
packagename=qtcreator-gdb-${version}-${arch}.tar.gz
......@@ -90,13 +89,13 @@ ${staging}/lib/libexpat.a: ${source}/expat-${expatversion}.tar.gz | makestagingd
./configure -prefix=${staging} --enable-static --build=i686-pc-mingw32 && \
${MAKE} && ${MAKE} install
${gdbtargets}: ${targetdir}/gdb-%: ${staging}/lib/libexpat.a ${staging}/lib/libiconv.a ${staging}/gdb-${version}/configure | maketargetdir ${broot}/python/python.exe
test -e ${staging}/gdb-${version}-$* || mkdir ${staging}/gdb-${version}-$*
${targetdir}/gdb.exe: ${staging}/lib/libexpat.a ${staging}/lib/libiconv.a ${staging}/gdb-${version}/configure | maketargetdir ${broot}/python/python.exe
test -e ${staging}/gdb-${version}-build || mkdir ${staging}/gdb-${version}-build
export PYTHONHOME=${pydir} && \
LDFLAGS="L${pydir} -lpthread -ldl -lutil -lpython27" && \
CFLAGS="-I${pydir}/include" && \
cd ${staging}/gdb-${version}-$* && \
${staging}/gdb-${version}/configure --target=$* --disable-nls --disable-werror --build=i686-pc-mingw32 \
cd ${staging}/gdb-${version}-build && \
${staging}/gdb-${version}/configure --enable-targets=${targets} --disable-nls --disable-werror --build=i686-pc-mingw32 \
--with-libiconv-prefix=${staging} \
--with-expat --with-libexpat-prefix=${staging} \
--with-separate-debug-dir="" \
......@@ -104,13 +103,13 @@ ${gdbtargets}: ${targetdir}/gdb-%: ${staging}/lib/libexpat.a ${staging}/lib/libi
${MAKE} MAKEFLAGS+= -j1 && \
strip -o ${targetdir}/gdb-$*.exe gdb/gdb.exe
package: ${gdbtargets} ${broot}/python/python.exe
package: ${targetdir}/gdb.exe ${broot}/python/python.exe
cp ${staging}/bin/libiconv* ${targetdir} && \
cp ${staging}/bin/libexpat* ${targetdir} && \
cp ${pydir}/python*.dll ${targetdir} && \
cp -r ${pydir}/lib ${targetdir} && \
mkdir -p ${targetdir}/data-directory && \
cp -r ${staging}/gdb-${version}-i686-pc-mingw32/gdb/data-directory/{python,syscalls} ${targetdir}/data-directory && \
cp -r ${staging}/gdb-${version}-build/gdb/data-directory/{python,syscalls} ${targetdir}/data-directory && \
mv ${targetdir} ${targetdir}-${arch} && \
echo "Packing..." && \
tar czf ${packagename} qtcreator-gdb-${version}-${arch} && \
......
broot=${PWD}
source=${broot}/source
targets=x86_64-unknown-linux-gnu i686-unknown-linux-gnu arm-none-linux-gnueabi x86_64-apple-darwin10
targets=x86_64-unknown-linux-gnu,i686-unknown-linux-gnu,arm-none-linux-gnueabi,x86_64-apple-darwin10
staging=${broot}/staging
pyversion=2.7
expatversion=2.1.0
arch=`uname -sm | sed 's/ /-/g' | tr A-Z a-z`
version=7.10
targetdir=${broot}/qtcreator-gdb-${version}
gdbtargets=$(addprefix ${targetdir}/gdb-, ${targets})
packagename=qtcreator-gdb-${version}-${arch}.tar.gz
all:package
......@@ -67,17 +66,17 @@ ${staging}/gdb-${version}/configure: ${source}/gdb-${version}.tar.xz | makestagi
cd gdb-${version} && \
touch configure
${gdbtargets}: ${targetdir}/gdb-%: ${staging}/gdb-${version}/configure ${staging}/lib/libpython${pyversion}.a ${staging}/lib/libexpat.a | maketargetdir
test -e ${staging}/gdb-${version}-$* || mkdir ${staging}/gdb-${version}-$*
${targetdir}/gdb: ${staging}/gdb-${version}/configure ${staging}/lib/libpython${pyversion}.a ${staging}/lib/libexpat.a | maketargetdir
test -e ${staging}/gdb-${version}-build || mkdir ${staging}/gdb-${version}-build
export PYTHONHOME=${staging} && \
export PATH="${staging}/bin/:$$PATH" && \
cd ${staging}/gdb-${version}-$* && \
${staging}/gdb-${version}/configure --disable-nls --target=$* --with-separate-debug-dir="" \
cd ${staging}/gdb-${version}-build && \
${staging}/gdb-${version}/configure --disable-nls --enable-targets=${targets} --with-separate-debug-dir="" \
--disable-werror --with-python=${staging} --with-libexpat-prefix=${staging} && \
${MAKE} MAKEFLAGS+=-j1 && \
strip -o ${targetdir}/gdb-$* gdb/gdb
strip -o ${targetdir}/gdb gdb/gdb
package: ${gdbtargets} ${targetdir}/python/include/python${pyversion}/pyconfig.h
package: ${targetdir}/gdb ${targetdir}/python/include/python${pyversion}/pyconfig.h
mv ${targetdir} ${targetdir}-${arch}
echo "Packing..."
tar czf ${packagename} qtcreator-gdb-${version}-${arch}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment