Re: [OE-core] [PATCH 1/1] gcc-sanitizers: Fix libtool library files
Hi Ross, Is it recommended practice to remove libtool .la files for oe-core when some issue pops? If yes, I would withdraw and prepare a new patch that complies with the practice. Thanks, Yuanjie On 09/21/2016 05:01 PM, Burton, Ross wrote: On 21 September 2016 at 02:46, Yuanjie Huang mailto:yuanjie.hu...@windriver.com>> wrote: We have some user making use of these libraries directly, otherwise, cross gcc can link these sanitizer libraries with just -fsantizer flag without problem. Without .la files, his flow can not be libtoolized. libtool works fine without .la files on linux, which is why the remove-libtool class works (which can be a distro-level inherit and deletes every .la before it reaches the sysroot). Ross -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 1/1] gcc-sanitizers: Fix libtool library files
On 21 September 2016 at 02:46, Yuanjie Huang wrote: > We have some user making use of these libraries directly, otherwise, cross > gcc can link these sanitizer libraries with just -fsantizer flag without > problem. Without .la files, his flow can not be libtoolized. > libtool works fine without .la files on linux, which is why the remove-libtool class works (which can be a distro-level inherit and deletes every .la before it reaches the sysroot). Ross -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 1/1] gcc-sanitizers: Fix libtool library files
Thanks, commit message revised. Best, Yuanjie On 09/20/2016 09:35 PM, Burton, Ross wrote: On 20 September 2016 at 10:19, Yuanjie Huang mailto:yuanjie.hu...@windriver.com>> wrote: Upstream-Status: Inappropriate [embedded specific] (LOCAL REV; NOT UPSTREAM) -- sent to oe-core on 2016-09-20 You don't need upstream-status tags in commit messages, only patches that the recipe is applying. Also please remove your internal tracking data from the commit message. Ross >From 6ceafbc3a69a0b87bcddf718050c6958baab7759 Mon Sep 17 00:00:00 2001 From: Yuanjie Huang Date: Sun, 18 Sep 2016 16:36:55 +0800 Subject: [PATCH V2] gcc-sanitizers: Fix libtool library files Since libtool sysroot is not set when compiling sanitizers, the libtool does no prefix the dependency path correctly. Fix it, so that programs can link to sanitizer libraries without error. This patch changes the depenedency_libs line in libasan.la and libusan.la from dependency_libs=' -lpthread -ldl '/usr/lib'/libstdc++.la '/usr/lib'/libstdc++.la' to dependency_libs=' -lpthread -ldl =/usr/lib/libstdc++.la =/usr/lib/libstdc++.la' Signed-off-by: Yuanjie Huang --- meta/recipes-devtools/gcc/gcc-sanitizers.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/meta/recipes-devtools/gcc/gcc-sanitizers.inc index c987ccb..5fe5eaf 100644 --- a/meta/recipes-devtools/gcc/gcc-sanitizers.inc +++ b/meta/recipes-devtools/gcc/gcc-sanitizers.inc @@ -50,6 +50,8 @@ do_install () { rmdir --ignore-fail-on-non-empty -p ${D}${infodir} fi chown -R root:root ${D} +# Fix broken libtool with stdc++, as sysroot is not set. +find ${D} -name \*.la -exec sed -i "/^dependency_libs=/s@'/usr/lib'@=/usr/lib@g" {} \; } INHIBIT_DEFAULT_DEPS = "1" -- 1.9.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 1/1] gcc-sanitizers: Fix libtool library files
On 09/21/2016 04:48 AM, Khem Raj wrote: On Tue, Sep 20, 2016 at 2:19 AM, Yuanjie Huang wrote: From: Yuanjie Huang Since libtool sysroot is not set when compiling sanitizers, the libtool does no prefix the dependency path correctly. Fix it, so that programs can link to sanitizer libraries without error. This patch changes the depenedency_libs line in libasan.la and libusan.la from dependency_libs=' -lpthread -ldl '/usr/lib'/libstdc++.la '/usr/lib'/libstdc++.la' to dependency_libs=' -lpthread -ldl =/usr/lib/libstdc++.la =/usr/lib/libstdc++.la' Upstream-Status: Inappropriate [embedded specific] (LOCAL REV; NOT UPSTREAM) -- sent to oe-core on 2016-09-20 Signed-off-by: Yuanjie Huang --- meta/recipes-devtools/gcc/gcc-sanitizers.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/meta/recipes-devtools/gcc/gcc-sanitizers.inc index c987ccb..5fe5eaf 100644 --- a/meta/recipes-devtools/gcc/gcc-sanitizers.inc +++ b/meta/recipes-devtools/gcc/gcc-sanitizers.inc @@ -50,6 +50,8 @@ do_install () { rmdir --ignore-fail-on-non-empty -p ${D}${infodir} fi chown -R root:root ${D} +# Fix broken libtool with stdc++, as sysroot is not set. +find ${D} -name \*.la -exec sed -i "/^dependency_libs=/s@'/usr/lib'@=/usr/lib@g" {} \; what happens if you remove the .la files completely. We have some user making use of these libraries directly, otherwise, cross gcc can link these sanitizer libraries with just -fsantizer flag without problem. Without .la files, his flow can not be libtoolized. Best, Yuanjie } INHIBIT_DEFAULT_DEPS = "1" -- 1.9.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 1/1] gcc-sanitizers: Fix libtool library files
On Tue, Sep 20, 2016 at 2:19 AM, Yuanjie Huang wrote: > From: Yuanjie Huang > > Since libtool sysroot is not set when compiling sanitizers, the libtool > does no prefix the dependency path correctly. Fix it, so that programs > can link to sanitizer libraries without error. > > This patch changes the depenedency_libs line in libasan.la and > libusan.la from > dependency_libs=' -lpthread -ldl '/usr/lib'/libstdc++.la > '/usr/lib'/libstdc++.la' > to > dependency_libs=' -lpthread -ldl =/usr/lib/libstdc++.la > =/usr/lib/libstdc++.la' > > Upstream-Status: Inappropriate [embedded specific] > (LOCAL REV; NOT UPSTREAM) -- sent to oe-core on 2016-09-20 > > Signed-off-by: Yuanjie Huang > --- > meta/recipes-devtools/gcc/gcc-sanitizers.inc | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers.inc > b/meta/recipes-devtools/gcc/gcc-sanitizers.inc > index c987ccb..5fe5eaf 100644 > --- a/meta/recipes-devtools/gcc/gcc-sanitizers.inc > +++ b/meta/recipes-devtools/gcc/gcc-sanitizers.inc > @@ -50,6 +50,8 @@ do_install () { > rmdir --ignore-fail-on-non-empty -p ${D}${infodir} > fi > chown -R root:root ${D} > +# Fix broken libtool with stdc++, as sysroot is not set. > +find ${D} -name \*.la -exec sed -i > "/^dependency_libs=/s@'/usr/lib'@=/usr/lib@g" {} \; what happens if you remove the .la files completely. > } > > INHIBIT_DEFAULT_DEPS = "1" > -- > 1.9.1 > > -- > ___ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 1/1] gcc-sanitizers: Fix libtool library files
On 20 September 2016 at 10:19, Yuanjie Huang wrote: > Upstream-Status: Inappropriate [embedded specific] > (LOCAL REV; NOT UPSTREAM) -- sent to oe-core on 2016-09-20 > You don't need upstream-status tags in commit messages, only patches that the recipe is applying. Also please remove your internal tracking data from the commit message. Ross -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 1/1] gcc-sanitizers: Fix libtool library files
From: Yuanjie Huang Since libtool sysroot is not set when compiling sanitizers, the libtool does no prefix the dependency path correctly. Fix it, so that programs can link to sanitizer libraries without error. This patch changes the depenedency_libs line in libasan.la and libusan.la from dependency_libs=' -lpthread -ldl '/usr/lib'/libstdc++.la '/usr/lib'/libstdc++.la' to dependency_libs=' -lpthread -ldl =/usr/lib/libstdc++.la =/usr/lib/libstdc++.la' Upstream-Status: Inappropriate [embedded specific] (LOCAL REV; NOT UPSTREAM) -- sent to oe-core on 2016-09-20 Signed-off-by: Yuanjie Huang --- meta/recipes-devtools/gcc/gcc-sanitizers.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/meta/recipes-devtools/gcc/gcc-sanitizers.inc index c987ccb..5fe5eaf 100644 --- a/meta/recipes-devtools/gcc/gcc-sanitizers.inc +++ b/meta/recipes-devtools/gcc/gcc-sanitizers.inc @@ -50,6 +50,8 @@ do_install () { rmdir --ignore-fail-on-non-empty -p ${D}${infodir} fi chown -R root:root ${D} +# Fix broken libtool with stdc++, as sysroot is not set. +find ${D} -name \*.la -exec sed -i "/^dependency_libs=/s@'/usr/lib'@=/usr/lib@g" {} \; } INHIBIT_DEFAULT_DEPS = "1" -- 1.9.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core