All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gcc: Package libstdc++ gdb python helpers into dev package
@ 2011-06-09 19:35 Khem Raj
  2011-07-22 17:24 ` Philip Balister
  0 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2011-06-09 19:35 UTC (permalink / raw)
  To: openembedded-devel

People are seeing these errrors from ldconfig
libstdc++.so.6.0.14-gdb.py is not an ELF file - it has the wrong magic
bytes at the start.

this file is moved into gdb's autoload directory
if it exists there then gdb will find it when debugging
and it wont be in the paths where ldconfig looks for
libraries.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 recipes/gcc/gcc-4.5.inc            |    2 +-
 recipes/gcc/gcc-package-cross.inc  |    8 +++++++-
 recipes/gcc/gcc-package-target.inc |    4 ++++
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/recipes/gcc/gcc-4.5.inc b/recipes/gcc/gcc-4.5.inc
index aa5bb00..69229ef 100644
--- a/recipes/gcc/gcc-4.5.inc
+++ b/recipes/gcc/gcc-4.5.inc
@@ -8,7 +8,7 @@ DEPENDS = "mpfr gmp libmpc libelf"
 NATIVEDEPS = "mpfr-native gmp-native libmpc-native"
 
 
-INC_PR = "r36"
+INC_PR = "r37"
 
 SRCREV = "170880"
 PV = "4.5"
diff --git a/recipes/gcc/gcc-package-cross.inc b/recipes/gcc/gcc-package-cross.inc
index f9a7eeb..1533069 100644
--- a/recipes/gcc/gcc-package-cross.inc
+++ b/recipes/gcc/gcc-package-cross.inc
@@ -4,7 +4,7 @@ PACKAGE_STRIP = "no"
 
 SHLIBSDIR = "${STAGING_DIR_TARGET}/shlibs"
 
-PACKAGES = "libgcc libssp libstdc++ libg2c libgfortran"
+PACKAGES = "libgcc libssp libstdc++ libg2c libgfortran libstdc++-dev libgcc-dev"
 
 # Called from within gcc-cross, so libdir is set wrong
 FILES_libg2c = "${target_libdir}/libg2c.so.*"
@@ -18,6 +18,7 @@ FILES_libgcc-dev = "${target_libdir}/libgcc_s.so"
 
 FILES_libstdc++ = "${target_libdir}/libstdc++.so.*"
 
+FILES_libstdc++-dev = "${target_datadir}/gdb/auto-load/${libdir}/libstdc++.so.*-gdb.py*"
 do_install () {
 	oe_runmake 'DESTDIR=${D}' install
 	install -d ${D}${target_base_libdir}
@@ -68,5 +69,10 @@ GROUP ( libgcc_s.so.1 libgcc.a )" > ${D}${target_libdir}/libgcc_s.so
 	# We use libiberty from binutils or binutils-cross
 	rm -f ${D}${libdir}/libiberty.a
 	rm -f ${D}${target_libdir}/libiberty.a
+	if [ -f ${D}${target_libdir}/libstdc++.so.*-gdb.py ]; then
+		# move the gdb python helpers to gdb auto-load directory
+		install -d ${D}${target_datadir}/gdb/auto-load${target_libdir}
+		mv -f ${D}${target_libdir}/libstdc++.so.*-gdb.py* ${D}${target_datadir}/gdb/auto-load${target_libdir}
+	fi
 }
 
diff --git a/recipes/gcc/gcc-package-target.inc b/recipes/gcc/gcc-package-target.inc
index 5cfe47b..959b9ec 100644
--- a/recipes/gcc/gcc-package-target.inc
+++ b/recipes/gcc/gcc-package-target.inc
@@ -83,6 +83,7 @@ FILES_libstdc++-dev = "\
   ${libdir}/libsupc++.la \
   ${libdir}/libsupc++.a \
 "
+FILES_libstdc++-dev += "${datadir}/gdb/auto-load/${libdir}/libstdc++.so.*-gdb.py*"
 
 FILES_libgfortran-dev = "${libdir}/libgfortran.a \
                          ${libdir}/libgfortran.so \
@@ -168,4 +169,7 @@ GROUP ( libgcc_s.so.1 libgcc.a )" > ${D}${libdir}/libgcc_s.so
 
 	# Remove precompiled c++ headers as they are really big
 	rm -rf ${D}${includedir}/c++/${BINV}/${TARGET_SYS}/bits/*.gch
+	# move the gdb python helpers to gdb auto-load directory
+	install -d ${D}${datadir}/gdb/auto-load/${libdir}
+	mv ${D}${libdir}/libstdc++.so.*-gdb.py* ${D}${datadir}/gdb/auto-load${libdir}
 }
-- 
1.7.0.4




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] gcc: Package libstdc++ gdb python helpers into dev package
  2011-06-09 19:35 [PATCH] gcc: Package libstdc++ gdb python helpers into dev package Khem Raj
@ 2011-07-22 17:24 ` Philip Balister
  2011-07-22 20:21   ` Khem Raj
  0 siblings, 1 reply; 6+ messages in thread
From: Philip Balister @ 2011-07-22 17:24 UTC (permalink / raw)
  To: openembedded-devel

On 06/09/2011 03:35 PM, Khem Raj wrote:
> People are seeing these errrors from ldconfig
> libstdc++.so.6.0.14-gdb.py is not an ELF file - it has the wrong magic
> bytes at the start.
>
> this file is moved into gdb's autoload directory
> if it exists there then gdb will find it when debugging
> and it wont be in the paths where ldconfig looks for
> libraries.
>
> Signed-off-by: Khem Raj<raj.khem@gmail.com>

Finally,

Tested-by: Philip Balister <philip@balister.org>

No more annoying message when I run ldconfig. Getting this fix in will 
reduce my support emails by a small, but noticeable amount.

Philip


> ---
>   recipes/gcc/gcc-4.5.inc            |    2 +-
>   recipes/gcc/gcc-package-cross.inc  |    8 +++++++-
>   recipes/gcc/gcc-package-target.inc |    4 ++++
>   3 files changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/recipes/gcc/gcc-4.5.inc b/recipes/gcc/gcc-4.5.inc
> index aa5bb00..69229ef 100644
> --- a/recipes/gcc/gcc-4.5.inc
> +++ b/recipes/gcc/gcc-4.5.inc
> @@ -8,7 +8,7 @@ DEPENDS = "mpfr gmp libmpc libelf"
>   NATIVEDEPS = "mpfr-native gmp-native libmpc-native"
>
>
> -INC_PR = "r36"
> +INC_PR = "r37"
>
>   SRCREV = "170880"
>   PV = "4.5"
> diff --git a/recipes/gcc/gcc-package-cross.inc b/recipes/gcc/gcc-package-cross.inc
> index f9a7eeb..1533069 100644
> --- a/recipes/gcc/gcc-package-cross.inc
> +++ b/recipes/gcc/gcc-package-cross.inc
> @@ -4,7 +4,7 @@ PACKAGE_STRIP = "no"
>
>   SHLIBSDIR = "${STAGING_DIR_TARGET}/shlibs"
>
> -PACKAGES = "libgcc libssp libstdc++ libg2c libgfortran"
> +PACKAGES = "libgcc libssp libstdc++ libg2c libgfortran libstdc++-dev libgcc-dev"
>
>   # Called from within gcc-cross, so libdir is set wrong
>   FILES_libg2c = "${target_libdir}/libg2c.so.*"
> @@ -18,6 +18,7 @@ FILES_libgcc-dev = "${target_libdir}/libgcc_s.so"
>
>   FILES_libstdc++ = "${target_libdir}/libstdc++.so.*"
>
> +FILES_libstdc++-dev = "${target_datadir}/gdb/auto-load/${libdir}/libstdc++.so.*-gdb.py*"
>   do_install () {
>   	oe_runmake 'DESTDIR=${D}' install
>   	install -d ${D}${target_base_libdir}
> @@ -68,5 +69,10 @@ GROUP ( libgcc_s.so.1 libgcc.a )">  ${D}${target_libdir}/libgcc_s.so
>   	# We use libiberty from binutils or binutils-cross
>   	rm -f ${D}${libdir}/libiberty.a
>   	rm -f ${D}${target_libdir}/libiberty.a
> +	if [ -f ${D}${target_libdir}/libstdc++.so.*-gdb.py ]; then
> +		# move the gdb python helpers to gdb auto-load directory
> +		install -d ${D}${target_datadir}/gdb/auto-load${target_libdir}
> +		mv -f ${D}${target_libdir}/libstdc++.so.*-gdb.py* ${D}${target_datadir}/gdb/auto-load${target_libdir}
> +	fi
>   }
>
> diff --git a/recipes/gcc/gcc-package-target.inc b/recipes/gcc/gcc-package-target.inc
> index 5cfe47b..959b9ec 100644
> --- a/recipes/gcc/gcc-package-target.inc
> +++ b/recipes/gcc/gcc-package-target.inc
> @@ -83,6 +83,7 @@ FILES_libstdc++-dev = "\
>     ${libdir}/libsupc++.la \
>     ${libdir}/libsupc++.a \
>   "
> +FILES_libstdc++-dev += "${datadir}/gdb/auto-load/${libdir}/libstdc++.so.*-gdb.py*"
>
>   FILES_libgfortran-dev = "${libdir}/libgfortran.a \
>                            ${libdir}/libgfortran.so \
> @@ -168,4 +169,7 @@ GROUP ( libgcc_s.so.1 libgcc.a )">  ${D}${libdir}/libgcc_s.so
>
>   	# Remove precompiled c++ headers as they are really big
>   	rm -rf ${D}${includedir}/c++/${BINV}/${TARGET_SYS}/bits/*.gch
> +	# move the gdb python helpers to gdb auto-load directory
> +	install -d ${D}${datadir}/gdb/auto-load/${libdir}
> +	mv ${D}${libdir}/libstdc++.so.*-gdb.py* ${D}${datadir}/gdb/auto-load${libdir}
>   }



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] gcc: Package libstdc++ gdb python helpers into dev package
  2011-07-22 17:24 ` Philip Balister
@ 2011-07-22 20:21   ` Khem Raj
  2011-07-23 15:09     ` Chris Verges
  0 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2011-07-22 20:21 UTC (permalink / raw)
  To: openembedded-devel

On (22/07/11 13:24), Philip Balister wrote:
> On 06/09/2011 03:35 PM, Khem Raj wrote:
> >People are seeing these errrors from ldconfig
> >libstdc++.so.6.0.14-gdb.py is not an ELF file - it has the wrong magic
> >bytes at the start.
> >
> >this file is moved into gdb's autoload directory
> >if it exists there then gdb will find it when debugging
> >and it wont be in the paths where ldconfig looks for
> >libraries.
> >
> >Signed-off-by: Khem Raj<raj.khem@gmail.com>
> 
> Finally,
> 
> Tested-by: Philip Balister <philip@balister.org>
> 
> No more annoying message when I run ldconfig. Getting this fix in
> will reduce my support emails by a small, but noticeable amount.

thanks for testing it out. I have installed in in oe.dev/master

-Khem




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] gcc: Package libstdc++ gdb python helpers into dev package
  2011-07-22 20:21   ` Khem Raj
@ 2011-07-23 15:09     ` Chris Verges
  2011-07-23 15:59       ` Philip Balister
  2011-07-23 18:15       ` Koen Kooi
  0 siblings, 2 replies; 6+ messages in thread
From: Chris Verges @ 2011-07-23 15:09 UTC (permalink / raw)
  To: openembedded-devel

On Fri, Jul 22, 2011 at 1:21 PM, Khem Raj <raj.khem@gmail.com> wrote:
> On (22/07/11 13:24), Philip Balister wrote:
>> On 06/09/2011 03:35 PM, Khem Raj wrote:
>> >People are seeing these errrors from ldconfig
>> >libstdc++.so.6.0.14-gdb.py is not an ELF file - it has the wrong magic
>> >bytes at the start.
>>
>> No more annoying message when I run ldconfig. Getting this fix in
>> will reduce my support emails by a small, but noticeable amount.
>
> thanks for testing it out. I have installed in in oe.dev/master

Would it be worth a cherry-pick of this into 2011.03-maintenance?
I've been seeing it there with gcc 4.4.4, too, and have the same issue
with questions that pop up about it.

Thanks,
Chris



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] gcc: Package libstdc++ gdb python helpers into dev package
  2011-07-23 15:09     ` Chris Verges
@ 2011-07-23 15:59       ` Philip Balister
  2011-07-23 18:15       ` Koen Kooi
  1 sibling, 0 replies; 6+ messages in thread
From: Philip Balister @ 2011-07-23 15:59 UTC (permalink / raw)
  To: openembedded-devel

On 07/23/2011 11:09 AM, Chris Verges wrote:
> On Fri, Jul 22, 2011 at 1:21 PM, Khem Raj<raj.khem@gmail.com>  wrote:
>> On (22/07/11 13:24), Philip Balister wrote:
>>> On 06/09/2011 03:35 PM, Khem Raj wrote:
>>>> People are seeing these errrors from ldconfig
>>>> libstdc++.so.6.0.14-gdb.py is not an ELF file - it has the wrong magic
>>>> bytes at the start.
>>>
>>> No more annoying message when I run ldconfig. Getting this fix in
>>> will reduce my support emails by a small, but noticeable amount.
>>
>> thanks for testing it out. I have installed in in oe.dev/master
>
> Would it be worth a cherry-pick of this into 2011.03-maintenance?
> I've been seeing it there with gcc 4.4.4, too, and have the same issue
> with questions that pop up about it.

I'm going to look at this "soon".

Philip



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] gcc: Package libstdc++ gdb python helpers into dev package
  2011-07-23 15:09     ` Chris Verges
  2011-07-23 15:59       ` Philip Balister
@ 2011-07-23 18:15       ` Koen Kooi
  1 sibling, 0 replies; 6+ messages in thread
From: Koen Kooi @ 2011-07-23 18:15 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 23-07-11 17:09, Chris Verges schreef:
> On Fri, Jul 22, 2011 at 1:21 PM, Khem Raj <raj.khem@gmail.com> wrote:
>> On (22/07/11 13:24), Philip Balister wrote:
>>> On 06/09/2011 03:35 PM, Khem Raj wrote:
>>>> People are seeing these errrors from ldconfig libstdc++.so.6.0.14-gdb.py is not an ELF file - it has the wrong magic bytes at the start.
>>> 
>>> No more annoying message when I run ldconfig. Getting this fix in will reduce my support emails by a small, but noticeable amount.
>> 
>> thanks for testing it out. I have installed in in oe.dev/master
> 
> Would it be worth a cherry-pick of this into 2011.03-maintenance? I've been seeing it there with gcc 4.4.4, too, and have the same issue with questions that pop up about it.

I've already cherry-picked it and will send a pull request after Tom applies my previous one. Likely after the weekend.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFOKw/PMkyGM64RGpERApWRAJ93vxrpac0kZ5RcyRIIcms/jSW1XwCfdplH
NJAt+VjSEYEwiRt2fQBpyX0=
=IpRi
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-07-23 18:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-09 19:35 [PATCH] gcc: Package libstdc++ gdb python helpers into dev package Khem Raj
2011-07-22 17:24 ` Philip Balister
2011-07-22 20:21   ` Khem Raj
2011-07-23 15:09     ` Chris Verges
2011-07-23 15:59       ` Philip Balister
2011-07-23 18:15       ` Koen Kooi

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.