diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-07-25 23:00:49 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-07-25 23:00:49 +0000 |
commit | a1fa07333bc198959b4381fe0c68f2982dd0ed80 (patch) | |
tree | fed5b0f463bd431952ac6bddad9ec2cb91920072 /sys-devel/crossdev | |
parent | old (diff) | |
download | gentoo-2-a1fa07333bc198959b4381fe0c68f2982dd0ed80.tar.gz gentoo-2-a1fa07333bc198959b4381fe0c68f2982dd0ed80.tar.bz2 gentoo-2-a1fa07333bc198959b4381fe0c68f2982dd0ed80.zip |
add support for gdb
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'sys-devel/crossdev')
-rw-r--r-- | sys-devel/crossdev/ChangeLog | 8 | ||||
-rw-r--r-- | sys-devel/crossdev/crossdev-0.9.8.ebuild | 21 | ||||
-rwxr-xr-x | sys-devel/crossdev/files/crossdev | 105 | ||||
-rw-r--r-- | sys-devel/crossdev/files/digest-crossdev-0.9.8 | 0 |
4 files changed, 103 insertions, 31 deletions
diff --git a/sys-devel/crossdev/ChangeLog b/sys-devel/crossdev/ChangeLog index 1fa9dacb87a5..d95f82349426 100644 --- a/sys-devel/crossdev/ChangeLog +++ b/sys-devel/crossdev/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-devel/crossdev # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/crossdev/ChangeLog,v 1.20 2005/07/15 03:13:09 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/crossdev/ChangeLog,v 1.21 2005/07/25 23:00:49 vapier Exp $ + +*crossdev-0.9.8 (25 Jul 2005) + + 25 Jul 2005; Mike Frysinger <vapier@gentoo.org> files/crossdev, + +crossdev-0.9.8.ebuild: + Add an option to create a cross gdb. *crossdev-0.9.7 (15 Jul 2005) diff --git a/sys-devel/crossdev/crossdev-0.9.8.ebuild b/sys-devel/crossdev/crossdev-0.9.8.ebuild new file mode 100644 index 000000000000..e6167ec9ded2 --- /dev/null +++ b/sys-devel/crossdev/crossdev-0.9.8.ebuild @@ -0,0 +1,21 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/crossdev/crossdev-0.9.8.ebuild,v 1.1 2005/07/25 23:00:49 vapier Exp $ + +DESCRIPTION="Gentoo Cross-toolchain generator" +HOMEPAGE="http://www.gentoo.org/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc x86" +IUSE="" + +RDEPEND="sys-apps/portage + app-shells/bash + sys-apps/coreutils" + +src_install() { + dosbin "${FILESDIR}"/crossdev || die + dosed "s:GENTOO_PV:${PV}:" /usr/sbin/crossdev +} diff --git a/sys-devel/crossdev/files/crossdev b/sys-devel/crossdev/files/crossdev index 5cf1652feeef..ea649e5267e7 100755 --- a/sys-devel/crossdev/files/crossdev +++ b/sys-devel/crossdev/files/crossdev @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/crossdev/files/crossdev,v 1.27 2005/07/15 03:13:09 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/crossdev/files/crossdev,v 1.28 2005/07/25 23:00:49 vapier Exp $ if [[ ${ROOT:-/} != "/" ]] ; then echo "Sorry, but crossdev does not support ROOT." @@ -28,22 +28,29 @@ ${GOOD}Options${NORMAL}: ${GOOD}--g, --gcc${NORMAL} ver Specify version of gcc to use ${GOOD}--k, --kernel${NORMAL} ver Specify version of kernel headers to use ${GOOD}--l, --libc${NORMAL} ver Specify version of libc to use - - ${GOOD}-V, --version${NORMAL} Show crossdev version ${GOOD}-C, --clean${NORMAL} target Uninstall specified target ${GOOD}-b, -p, -v${NORMAL} Options to pass to emerge (see emerge(1)) - +Basic Targets: ${GOOD}-s0, --stage0${NORMAL} Build just binutils - ${GOOD}-s1, --stage1${NORMAL} Build a C compiler (no libc/C++) - ${GOOD}-s2, --stage2${NORMAL} Build a C compiler & libc (no C++) - ${GOOD}-s3, --stage3${NORMAL} Build a C/C++ compiler & libc [default] - -${BRACKET}Target (-t)${NORMAL}: - The target takes the form: ${BRACKET}ARCH-VENDOR-OS-LIBC${NORMAL} - Examples: arm-unknown-linux-gnu sh4-gentoo-linux-uclibc mips-gentoo-linux-uclibc + ${GOOD}-s1, --stage1${NORMAL} Also build a C compiler (no libc/C++) + ${GOOD}-s2, --stage2${NORMAL} Also build kernel headers + ${GOOD}-s3, --stage3${NORMAL} Also build the C library (no C++) + ${GOOD}-s4, --stage4${NORMAL} Also build a C++ compiler [default] +Extra Fun (must be run after above stages): + ${GOOD}--ex-only${NORMAL} Skip the stage steps above + ${GOOD}--ex-gcc${NORMAL} Build extra gcc targets (gcj/ada/etc...) + ${GOOD}--ex-gdb${NORMAL} Build a cross gdb + +${BRACKET}Target (-t)${NORMAL}: takes the form: ${BRACKET}ARCH-VENDOR-OS-LIBC${NORMAL} + Examples: arm-unknown-linux-gnu sh4-gentoo-linux-uclibc EOF exit ${1:-0} } +STAGE_BINUTILS=0 +STAGE_C_ONLY=1 +STAGE_LIBC=3 +STAGE_C_CPP=4 +STAGE_DISP=( "binutils" "C compiler only" "kernel headers" "C compiler & libc" "C/C++ compiler" ) parse_target() { [[ -z $1 ]] && usage 1 @@ -85,7 +92,7 @@ parse_target() { ##################### ### other targets ### avr*) TARCH=${HARCH}; CPOST=""; - KPKG="[none]"; STAGE="3"; + KPKG="[none]"; STAGE=${STAGE_LIBC}; LCAT="dev-embedded"; LPKG="avr-libc"; GVER="3.4.4"; BVER="2.16.1"; GUSE="-fortran -gtk -gcj -objc";; @@ -98,15 +105,15 @@ parse_target() { ee*) TARCH=${HARCH}; CPOST=""; KPKG="[none]" GVER="3.2.2"; BVER="2.14"; - STAGE="1"; + STAGE=${STAGE_C_ONLY}; GUSE="-fortran -gtk -gcj -objc";; iop*) TARCH=${HARCH}; CPOST=""; GVER="3.2.2"; BVER="2.14"; - STAGE="1"; + STAGE=${STAGE_C_ONLY}; GUSE="-fortran -gtk -gcj -objc";; dvp*) TARCH=${HARCH}; CPOST=""; GVER="3.2.2"; BVER="2.14"; - STAGE="0";; + STAGE=${STAGE_BINUTILS};; ####################### ### unknown targets ### @@ -160,9 +167,18 @@ uninstall() { exit 0 } -is_s1() { [[ ${STAGE} -gt 0 ]] ; } -is_s2() { [[ ${STAGE} -gt 1 ]] ; } -is_s3() { [[ ${STAGE} -gt 2 ]] ; } + +is_stage() { [[ ${STAGE} -ge $1 ]] ; } +is_s0() { is_stage 0 ; } +is_s1() { is_stage 1 ; } +is_s2() { is_stage 2 ; } +is_s3() { is_stage 3 ; } +is_s4() { is_stage 4 ; } +is_s5() { is_stage 5 ; } + +ex_fast() { [[ ${EX_FAST} == "yes" ]] ; } +ex_gcc() { [[ ${EX_GCC} == "yes" ]] ; } +ex_gdb() { [[ ${EX_GDB} == "yes" ]] ; } hr() { local c=${COLUMNS:-0} @@ -187,12 +203,14 @@ UOPTS= TARCH= HARCH=$(env -uARCH portageq envvar ARCH) CTARGET= -STAGE=4 -STAGE_DISP=( "binutils" "C compiler only" "C compiler & libc" "C/C++ compiler" ) +STAGE=COW BCAT="sys-devel" ; BPKG="binutils" ; BVER="[latest]" ; BUSE="" GCAT="sys-devel" ; GPKG="gcc" ; GVER="[latest]" ; GUSE="" KCAT="sys-kernel" ; KPKG="linux-headers" ; KVER="[latest]" ; KUSE="" LCAT="sys-libs" ; LPKG="glibc" ; LVER="[latest]" ; LUSE="" +EX_FAST="no" +EX_GCC="no" +EX_GDB="no" while [[ $# -gt 0 ]] ; do case $1 in @@ -203,7 +221,10 @@ while [[ $# -gt 0 ]] ; do --k|--kernel) shift; KVER=$1;; --l|--libc) shift; LVER=$1;; -C|--clean) shift; parse_target $1; uninstall;; - -s?|--stage?) [[ ${STAGE} -eq 4 ]] && STAGE=${1:0-1};; + -s?|--stage?) [[ ${STAGE} == "COW" ]] && STAGE=${1:0-1};; + --ex-only) EX_FAST="yes";; + --ex-gcc) EX_GCC="yes";; + --ex-gdb) EX_GDB="yes";; -b|-p|-v) UOPTS="${UOPTS} $1";; -h|--help) usage;; *) eerror "UNKNOWN OPTION: '$1'" ; usage 1;; @@ -212,7 +233,7 @@ while [[ $# -gt 0 ]] ; do done [[ -z ${CTARGET} ]] && usage 1 [[ ${CTARGET} == *-uclibc ]] && LPKG="uclibc" -[[ ${STAGE} -eq 4 ]] && STAGE=3 +[[ ${STAGE} == "COW" ]] && STAGE=${STAGE_C_CPP} ##################### ### sanity checks ### @@ -246,22 +267,34 @@ einfo "Target Portage ARCH: ${TARCH}" einfo "Target System: ${CTARGET}" einfo "Stage: ${STAGE} (${STAGE_DISP[${STAGE}]})" echo +ex_fast || { +is_s0 && { einfo "binutils: ${BPKG}-${BVER}" +} is_s1 && { einfo "gcc: ${GPKG}-${GVER}" } is_s2 && { [[ ${KPKG} != "[none]" ]] && \ einfo "headers: ${KPKG}-${KVER}" +} +is_s3 && { einfo "libc: ${LPKG}-${LVER}" } +} +ex_gcc && { +einfo "Extra: gcc pass: DO IT" +} +ex_gdb && { +einfo "Extra: gdb: DO IT" +} echo einfo "PORTDIR_OVERLAY: ${PORTDIR_OVERLAY}" einfo "PORT_LOGDIR: ${PORT_LOGDIR}" einfo "PKGDIR: ${PKGDIR}" einfo "PORTAGE_TMPDIR: ${PORTAGE_TMPDIR}" hr -) >& ${PORT_LOGDIR}/cross-${CTARGET}-info.log +) >& ${PORT_LOGDIR}/cross-${CTARGET}-info.log || exit 1 cat ${PORT_LOGDIR}/cross-${CTARGET}-info.log emerge info >> ${PORT_LOGDIR}/cross-${CTARGET}-info.log @@ -272,7 +305,7 @@ set_keywords() { local pkg=$1 ver=$2 [[ -z ${pkg} ]] && return 0 sed -i -e "/cross-${CTARGET}\/${pkg}/d" package.keywords package.mask - if [[ ${ver} == "[latest]" ]] ; then + if [[ ${ver} == "[latest]" ]] || [[ -z ${ver} ]] ; then echo "cross-${CTARGET}/${pkg} $TARCH ~$TARCH" >> package.keywords else echo ">cross-${CTARGET}/${pkg}-${ver}" >> package.mask @@ -313,10 +346,11 @@ mkdir -p "${PORTDIR_OVERLAY}"/cross-${CTARGET} cd /etc/portage touch package.{keywords,mask,use} - set_portage ${BCAT} ${BPKG} ${BVER} ${BUSE} -is_s1 && set_portage ${GCAT} ${GPKG} ${GVER} ${GUSE} -is_s2 && set_portage ${KCAT} ${KPKG} ${KVER} ${KUSE} -is_s2 && set_portage ${LCAT} ${LPKG} ${LVER} ${LUSE} + set_portage ${BCAT} ${BPKG} ${BVER} ${BUSE} +is_s1 && set_portage ${GCAT} ${GPKG} ${GVER} ${GUSE} +is_s2 && set_portage ${KCAT} ${KPKG} ${KVER} ${KUSE} +is_s2 && set_portage ${LCAT} ${LPKG} ${LVER} ${LUSE} +ex_gdb && set_portage sys-devel gdb ################# doemerge() { @@ -347,16 +381,27 @@ export ABI="this-abi-var-sucks" # we include the '-u' so that we don't re-emerge packages EOPTS="${UOPTS} -u --nodeps" +ex_fast || { + doemerge ${BPKG} is_s1 || exit 0 USE="-boundschecking -fortran -gcj -objc nocxx -static" \ doemerge ${GPKG} ${GPKG}-stage1 is_s2 || exit 0 doemerge ${KPKG} +is_s3 || exit 0 USE=$TARCH doemerge ${LPKG} -[[ ${STAGE} -gt 2 ]] || exit 0 +is_s4 || exit 0 if ! type -p ${CTARGET}-g++ > /dev/null ; then EOPTS="${UOPTS} --nodeps" fi -doemerge ${GPKG} ${GPKG}-stage2 +USE="-fortran -gcj -objc" \ + doemerge ${GPKG} ${GPKG}-stage2 + +} + +ex_gcc && doemerge ${GPKG} ${GPK}-extra +ex_gdb && doemerge gdb + +exit 0 diff --git a/sys-devel/crossdev/files/digest-crossdev-0.9.8 b/sys-devel/crossdev/files/digest-crossdev-0.9.8 new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/sys-devel/crossdev/files/digest-crossdev-0.9.8 |