All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denys Dmytriyenko <denis@denix.org>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [2010.03-maintenance] [PATCH 5/7] external-toolchain-csl:	Drop do_stage, add gdbserver
Date: Wed, 16 Mar 2011 16:21:58 -0400	[thread overview]
Message-ID: <20110316202158.GI3042@denix.org> (raw)
In-Reply-To: <1775a7d2fdc6b7cc242b2b4e9f0a6516edf0ad83.1300293663.git.bengardiner@nanometrics.ca>

On Wed, Mar 16, 2011 at 12:50:38PM -0400, Ben Gardiner wrote:
> From: Tom Rini <tom_rini@mentor.com>
> 
> Based on work from Noor Ahsan, we merge the important part of do_stage
> into do_install and then set NATIVE_INSTALL_WORKS.  We also add a function
> for getting the gdb version for packaging up gdbserver and ship that.
> 
> Signed-off-by: Tom Rini <tom_rini@mentor.com>
> (cherry picked from commit 207971b244ee6958dab1fb41d6f3cd94ac416b73)
> 
> Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>

Acked-by: Denys Dmytriyenko <denys@ti.com>

> ---
>  recipes/meta/external-toolchain-csl.bb |   39 +++++++++++++++++--------------
>  1 files changed, 21 insertions(+), 18 deletions(-)
> 
> diff --git a/recipes/meta/external-toolchain-csl.bb b/recipes/meta/external-toolchain-csl.bb
> index 0761cf2..e56b74f 100644
> --- a/recipes/meta/external-toolchain-csl.bb
> +++ b/recipes/meta/external-toolchain-csl.bb
> @@ -1,4 +1,4 @@
> -PR = "r8"
> +PR = "r9"
>  
>  INHIBIT_DEFAULT_DEPS = "1"
>  
> @@ -6,6 +6,7 @@ INSANE_SKIP_libgcc = "True"
>  INSANE_SKIP_libstdc++ = "True"
>  INSANE_SKIP_nscd = "True"
>  INSANE_SKIP_glibc-utils = "True"
> +INSANE_SKIP_gdbserver = "True"
>  
>  SRC_URI = "file://SUPPORTED"
>  
> @@ -22,6 +23,7 @@ PROVIDES = "\
>  	virtual/libiconv \
>  	glibc-thread-db \
>  	${@base_conditional('PREFERRED_PROVIDER_linux-libc-headers', 'external-toolchain-csl', 'linux-libc-headers', '', d)} \
> +	gdbserver \
>  "
>  
>  DEPENDS = "${@base_conditional('PREFERRED_PROVIDER_linux-libc-headers', 'external-toolchain-csl', '', 'linux-libc-headers', d)}"
> @@ -44,6 +46,7 @@ PACKAGES = "\
>  	nscd \
>  	ldd \
>  	localedef \
> +	gdbserver \
>  	glibc-utils \
>  	glibc-dev \
>  	glibc-locale \
> @@ -120,6 +123,7 @@ FILES_ldd = "${bindir}/ldd"
>  FILES_nscd = "${sbindir}/nscd*"
>  FILES_sln = "${base_sbindir}/sln"
>  FILES_localedef = "${bindir}/localedef"
> +FILES_gdbserver = "${bindir}/gdbserver"
>  
>  DESCRIPTION_glibc-utils = "glibc: misc utilities like iconf, local, gencat, tzselect, rpcinfo, ..."
>  DESCRIPTION_glibc-extra-nss = "glibc: nis, nisplus and hesiod search services"
> @@ -127,6 +131,7 @@ DESCRIPTION_ldd = "glibc: print shared library dependencies"
>  DESCRIPTION_nscd = "glibc: name service cache daemon for passwd, group, and hosts"
>  DESCRIPTION_sln = "glibc: create symbolic links between files"
>  DESCRIPTION_localedef = "glibc: compile locale definition files"
> +DESCRIPTION_gdbserver = "gdb - GNU debugger"
>  
>  def csl_get_main_version(d):
>  	import subprocess,os,bb
> @@ -162,12 +167,19 @@ def csl_get_kernel_version(d):
>  				return str(maj)+'.'+str(min)+'.'+str(ver)
>  		return None
>  
> +def csl_get_gdb_version(d):
> +	import subprocess,os,bb
> +	if os.path.exists(bb.data.getVar('TOOLCHAIN_PATH', d, 1)+'/bin/'+bb.data.getVar('TARGET_PREFIX', d, 1)+'gdb'):
> +		return subprocess.Popen([bb.data.getVar('TOOLCHAIN_PATH', d, 1)+'/bin/'+bb.data.getVar('TARGET_PREFIX', d, 1)+'gdb', '-v'],stdout=subprocess.PIPE).communicate()[0].splitlines()[0].split()[-1]
> +
>  CSL_VER_MAIN := "${@csl_get_main_version(d)}"
>  CSL_VER_GCC := "${@csl_get_gcc_version(d)}"
>  CSL_VER_LIBC := "${@csl_get_libc_version(d)}"
>  CSL_VER_KERNEL := "${@csl_get_kernel_version(d)}"
>  CSL_LIC_LIBC := "LGPLv2.1+"
>  CSL_LIC_RLE := "${@["GPLv3 with GCC RLE", "GPLv2 with GCC RLE"][csl_get_main_version(d) <= "2007q3-51"]}"
> +CSL_VER_GDBSERVER := "${@csl_get_gdb_version(d)}"
> +CSL_LIC_GDBSERVER := "${@["GNU GPL version 2", "GNU GPL version 3 or later"][csl_get_gdb_version(d) >= "6.7.1"]}"
>  
>  PKGV = "${CSL_VER_MAIN}"
>  PKGV_libgcc = "${CSL_VER_GCC}"
> @@ -190,6 +202,7 @@ PKGV_ldd = "${CSL_VER_LIBC}"
>  PKGV_localedef = "${CSL_VER_LIBC}"
>  PKGV_libsegfault = "${CSL_VER_LIBC}"
>  PKGV_linux-libc-headers = "${CSL_VER_KERNEL}"
> +PKGV_gdbserver = "${CSL_VER_GDBSERVER}"
>  
>  LICENSE = "${CSL_LIC_LIBC}"
>  LICENSE_ldd = "${CSL_LIC_LIBC}"
> @@ -199,6 +212,7 @@ LICENSE_libgcc = "${CSL_LIC_RLE}"
>  LICENSE_libgcc-dev = "${CSL_LIC_RLE}"
>  LICENSE_libstdc++ = "${CSL_LIC_RLE}"
>  LICENSE_libstdc++-dev = "${CSL_LIC_RLE}"
> +LICENSE_gdbserver = "${CSL_LIC_GDBSERVER}"
>  
>  do_install() {
>  	install -d ${D}${sysconfdir}
> @@ -218,27 +232,14 @@ do_install() {
>  	${@base_conditional('PREFERRED_PROVIDER_linux-libc-headers', 'external-toolchain-csl', '', 'rm -rf ${D}/usr/include/linux', d)}
>  	cp -a ${TOOLCHAIN_PATH}/${TARGET_SYS}/include/* ${D}/usr/include
>  
> -	rm -rf ${D}${bindir}/gdbserver
>  	rm -rf ${D}${sysconfdir}/rpc
>  	rm -rf ${D}${datadir}/zoneinfo
> -}
>  
> -do_stage() {
> -	install -d ${STAGING_INCDIR}
> -	install -d ${STAGING_LIBDIR}
> -	install -d ${STAGING_DIR_TARGET}${base_libdir}
> +	sed -e "s# /lib# ../../lib#g" -e "s# /usr/lib# .#g" ${D}${libdir}/libc.so > ${D}${libdir}/temp
> +	mv ${D}${libdir}/temp ${D}${libdir}/libc.so
>  
> -	cp -a ${TOOLCHAIN_PATH}/${TARGET_SYS}/libc/usr/include/* ${STAGING_INCDIR}
> -	${@base_conditional('PREFERRED_PROVIDER_linux-libc-headers', 'external-toolchain-csl', '', 'rm -rf ${D}/usr/include/linux', d)}
> -	cp -a ${TOOLCHAIN_PATH}/${TARGET_SYS}/include/* ${STAGING_INCDIR}
> -	cp -a ${TOOLCHAIN_PATH}/${TARGET_SYS}/libc/usr/lib/* ${STAGING_LIBDIR}
> -	cp -a ${TOOLCHAIN_PATH}/${TARGET_SYS}/libc/lib/* ${STAGING_DIR_TARGET}${base_libdir}
> -
> -	sed -e "s# /lib# ../../lib#g" -e "s# /usr/lib# .#g" ${STAGING_LIBDIR}/libc.so > ${STAGING_LIBDIR}/temp
> -	mv ${STAGING_LIBDIR}/temp ${STAGING_LIBDIR}/libc.so
> -
> -	sed -e "s# /lib# ../../lib#" -e "s# /usr/lib# .#g" ${STAGING_LIBDIR}/libpthread.so > ${STAGING_LIBDIR}/temp
> -	mv ${STAGING_LIBDIR}/temp ${STAGING_LIBDIR}/libpthread.so
> +	sed -e "s# /lib# ../../lib#" -e "s# /usr/lib# .#g" ${D}${libdir}/libpthread.so > ${D}${libdir}/temp
> +	mv ${D}${libdir}/temp ${D}${libdir}/libpthread.so
>  }
>  
>  TMP_LOCALE="/tmp/locale${libdir}/locale"
> @@ -457,3 +458,5 @@ python populate_packages_prepend () {
>  		bb.data.setVar('PKG_libgcc-dev', 'libgcc1-dev', d)
>  	bb.build.exec_func('package_do_split_gconvs', d)
>  }
> +
> +NATIVE_INSTALL_WORKS = "1"
> -- 
> 1.7.1
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel



  reply	other threads:[~2011-03-16 20:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-16 16:50 [2010.03-maintenance] [PATCH 0/7] 2010.03-maintenance: libc-headers, gdbserver and ubifs Ben Gardiner
2011-03-16 16:50 ` [2010.03-maintenance] [PATCH 1/7] image.bbclass: add link to .rootfs.<type> or .<type>.img Ben Gardiner
2011-03-16 20:21   ` Denys Dmytriyenko
2011-03-16 16:50 ` [2010.03-maintenance] [PATCH 2/7] bitbake.conf: use .ubifs.img extension in IMAGE_CMD_ubi Ben Gardiner
2011-03-16 20:21   ` Denys Dmytriyenko
2011-03-16 16:50 ` [2010.03-maintenance] [PATCH 3/7] external-toolchain: allow override of linux-libc-headers provider Ben Gardiner
2011-03-16 20:21   ` Denys Dmytriyenko
2011-03-16 16:50 ` [2010.03-maintenance] [PATCH 4/7] external-toolchain-csl: allow linux-libc-headers Ben Gardiner
2011-03-16 20:21   ` Denys Dmytriyenko
2011-03-16 16:50 ` [2010.03-maintenance] [PATCH 5/7] external-toolchain-csl: Drop do_stage, add gdbserver Ben Gardiner
2011-03-16 20:21   ` Denys Dmytriyenko [this message]
2011-03-16 16:50 ` [2010.03-maintenance] [PATCH 6/7] external-toolchain-csl: handle packaging of gdbserver based on PREFERRED_PROVIDER Ben Gardiner
2011-03-16 20:22   ` Denys Dmytriyenko
2011-03-16 16:50 ` [2010.03-maintenance] [PATCH 7/7] toolchain-external.conf: set the default provider for gdbserver Ben Gardiner
2011-03-16 20:22   ` Denys Dmytriyenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110316202158.GI3042@denix.org \
    --to=denis@denix.org \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.