All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] gcc: Configure all gccs with --disable-install-libiberty
@ 2020-04-15 23:18 Khem Raj
  2020-04-15 23:18 ` [PATCH 2/3] binutils: Detect proper static-libstdc++ support when using clang Khem Raj
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Khem Raj @ 2020-04-15 23:18 UTC (permalink / raw)
  To: openembedded-core; +Cc: Khem Raj

OE uses libiberty from binutils, since its properly compiled as pic
archive and applications and other libraries needing libiberty can
properly link with it.

With this option applied, explicit delete of libiberty headers and
libraries is not required in install step, since they wont get installed
in first place.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/gcc/gcc-configure-common.inc | 1 +
 meta/recipes-devtools/gcc/gcc-cross-canadian.inc   | 6 ------
 meta/recipes-devtools/gcc/gcc-cross.inc            | 4 ----
 meta/recipes-devtools/gcc/gcc-target.inc           | 4 ----
 4 files changed, 1 insertion(+), 14 deletions(-)

diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
index bb4f6923f2..a64c4caf00 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -33,6 +33,7 @@ EXTRA_OECONF = "\
     --enable-libstdcxx-pch \
     --program-prefix=${TARGET_PREFIX} \
     --without-local-prefix \
+    --disable-install-libiberty \
     ${EXTRA_OECONF_BASE} \
     ${EXTRA_OECONF_GCC_FLOAT} \
     ${EXTRA_OECONF_PATHS} \
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index 4aac345bec..553ef7fe62 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -108,12 +108,6 @@ do_install () {
 	# We don't care about the gcc-<version> copies
 	rm -f ${D}${bindir}/*gcc-?.?*
 
-	# We use libiberty from binutils
-	rm -f ${D}${prefix}/${TARGET_SYS}/lib/libiberty.a
-	# Not sure where the strange paths come from
-	rm -f ${D}${libdir}/../lib/libiberty.a
-	rm -f ${D}${libdir}/libiberty.a
-
 	# Cleanup empty directories which are not shipped
 	# we use rmdir instead of 'rm -f' to ensure the non empty directories are not deleted
 	# ${D}${libdir}/../lib only seems to appear with SDKMACHINE=i686
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
index c68cdd5dc4..6fa8c274cd 100644
--- a/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -117,10 +117,6 @@ do_install () {
 	cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
 	cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
 
-	# We use libiberty from binutils
-	find ${D}${exec_prefix}/lib -name libiberty.a | xargs rm -f
-	find ${D}${exec_prefix}/lib -name libiberty.h | xargs rm -f
-
 	find ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed -type f -not -name "README" -not -name limits.h -not -name syslimits.h | xargs rm -f
 }
 
diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
index 34c1b2263b..8cb432780f 100644
--- a/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/meta/recipes-devtools/gcc/gcc-target.inc
@@ -192,10 +192,6 @@ do_install () {
 	# We don't care about the gcc-<version> ones for this
 	rm -f *gcc-?.?*
 
-	# We use libiberty from binutils
-	find ${D}${libdir} -name libiberty.a | xargs rm -f
-	find ${D}${libdir} -name libiberty.h | xargs rm -f
-
 	# Not sure why we end up with these but we don't want them...
 	rm -f ${TARGET_PREFIX}${TARGET_PREFIX}*
 
-- 
2.26.1


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

* [PATCH 2/3] binutils: Detect proper static-libstdc++ support when using clang
  2020-04-15 23:18 [PATCH 1/3] gcc: Configure all gccs with --disable-install-libiberty Khem Raj
@ 2020-04-15 23:18 ` Khem Raj
  2020-04-15 23:18 ` [PATCH 3/3] binutils: Install PIC version of libiberty.a Khem Raj
  2020-04-27 23:20 ` [OE-core] [PATCH 1/3] gcc: Configure all gccs with --disable-install-libiberty Steve Sakoman
  2 siblings, 0 replies; 7+ messages in thread
From: Khem Raj @ 2020-04-15 23:18 UTC (permalink / raw)
  To: openembedded-core; +Cc: Khem Raj

Fixes configure time tests to ensure static-libstdc++ is enabled when
using clang

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../binutils/binutils-2.34.inc                |  1 +
 ...or-clang-before-checking-gcc-version.patch | 48 +++++++++++++++++++
 2 files changed, 49 insertions(+)
 create mode 100644 meta/recipes-devtools/binutils/binutils/0016-Check-for-clang-before-checking-gcc-version.patch

diff --git a/meta/recipes-devtools/binutils/binutils-2.34.inc b/meta/recipes-devtools/binutils/binutils-2.34.inc
index 4b085b6fe0..66a3850ef2 100644
--- a/meta/recipes-devtools/binutils/binutils-2.34.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.34.inc
@@ -40,6 +40,7 @@ SRC_URI = "\
      file://0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \
      file://0014-Detect-64-bit-MIPS-targets.patch \
      file://0015-sync-with-OE-libtool-changes.patch \
+     file://0016-Check-for-clang-before-checking-gcc-version.patch \
      file://CVE-2020-0551.patch \
 "
 S  = "${WORKDIR}/git"
diff --git a/meta/recipes-devtools/binutils/binutils/0016-Check-for-clang-before-checking-gcc-version.patch b/meta/recipes-devtools/binutils/binutils/0016-Check-for-clang-before-checking-gcc-version.patch
new file mode 100644
index 0000000000..c694b42dc3
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0016-Check-for-clang-before-checking-gcc-version.patch
@@ -0,0 +1,48 @@
+From 67590a44c1256491fa674426f0170d5d05377d05 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 15 Apr 2020 14:17:20 -0700
+Subject: [PATCH 16/16] Check for clang before checking gcc version
+
+Clang advertises itself to be gcc 4.2.1, so when compiling this test
+here fails since gcc < 4.4.5 did not support -static-libstdc++ but thats
+not true for clang, so its better to make an additional check for clang
+before resorting to gcc version check. This should let clang enable
+static libstdc++ linking
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure    | 2 +-
+ configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index 590b03c2da0..46f116fdb54 100755
+--- a/configure
++++ b/configure
+@@ -5140,7 +5140,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
++#if !defined(__clang__) && ((__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5))
+ #error -static-libstdc++ not implemented
+ #endif
+ int main() {}
+diff --git a/configure.ac b/configure.ac
+index d3f85e6f5d5..c0eb1343121 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1309,7 +1309,7 @@ if test "$GCC" = yes; then
+   AC_MSG_CHECKING([whether g++ accepts -static-libstdc++ -static-libgcc])
+   AC_LANG_PUSH(C++)
+   AC_LINK_IFELSE([AC_LANG_SOURCE([
+-#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
++#if !defined(__clang__) && ((__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5))
+ #error -static-libstdc++ not implemented
+ #endif
+ int main() {}])],
+-- 
+2.26.1
+
-- 
2.26.1


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

* [PATCH 3/3] binutils: Install PIC version of libiberty.a
  2020-04-15 23:18 [PATCH 1/3] gcc: Configure all gccs with --disable-install-libiberty Khem Raj
  2020-04-15 23:18 ` [PATCH 2/3] binutils: Detect proper static-libstdc++ support when using clang Khem Raj
@ 2020-04-15 23:18 ` Khem Raj
  2020-04-27 23:20 ` [OE-core] [PATCH 1/3] gcc: Configure all gccs with --disable-install-libiberty Steve Sakoman
  2 siblings, 0 replies; 7+ messages in thread
From: Khem Raj @ 2020-04-15 23:18 UTC (permalink / raw)
  To: openembedded-core; +Cc: Khem Raj

some architectures e.g. mips complain in linking apps which have shared
libs that are linking with libiberty.a fixes errors like below

libiberty/../../libiberty/hashtab.c:285:(.text+0xf8): relocation R_MIPS_26 against `htab_create_typed_alloc' cannot be used when making a shared object; recompile with -fPIC

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/binutils/binutils.inc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
index 4119960c63..e93cd50b20 100644
--- a/meta/recipes-devtools/binutils/binutils.inc
+++ b/meta/recipes-devtools/binutils/binutils.inc
@@ -152,6 +152,11 @@ do_install () {
 	install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
 	install -m 644 ${S}/include/libiberty.h ${D}${includedir}
 
+	# insall pic version of libiberty if available
+        if [ -e ${B}/libiberty/pic/libiberty.a ]; then
+		install -Dm 0644 ${B}/libiberty/pic/libiberty.a ${D}${libdir}/libiberty.a
+	fi
+
 	cd ${D}${bindir}
 
 	# Symlinks for ease of running these on the native target
-- 
2.26.1


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

* Re: [OE-core] [PATCH 1/3] gcc: Configure all gccs with --disable-install-libiberty
  2020-04-15 23:18 [PATCH 1/3] gcc: Configure all gccs with --disable-install-libiberty Khem Raj
  2020-04-15 23:18 ` [PATCH 2/3] binutils: Detect proper static-libstdc++ support when using clang Khem Raj
  2020-04-15 23:18 ` [PATCH 3/3] binutils: Install PIC version of libiberty.a Khem Raj
@ 2020-04-27 23:20 ` Steve Sakoman
  2020-04-27 23:27   ` Khem Raj
  2 siblings, 1 reply; 7+ messages in thread
From: Steve Sakoman @ 2020-04-27 23:20 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

Hi Khem,

Is this series something I should consider for dunfell LTS?

Steve

On Wed, Apr 15, 2020 at 1:19 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> OE uses libiberty from binutils, since its properly compiled as pic
> archive and applications and other libraries needing libiberty can
> properly link with it.
>
> With this option applied, explicit delete of libiberty headers and
> libraries is not required in install step, since they wont get installed
> in first place.
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/recipes-devtools/gcc/gcc-configure-common.inc | 1 +
>  meta/recipes-devtools/gcc/gcc-cross-canadian.inc   | 6 ------
>  meta/recipes-devtools/gcc/gcc-cross.inc            | 4 ----
>  meta/recipes-devtools/gcc/gcc-target.inc           | 4 ----
>  4 files changed, 1 insertion(+), 14 deletions(-)
>
> diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> index bb4f6923f2..a64c4caf00 100644
> --- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
> +++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> @@ -33,6 +33,7 @@ EXTRA_OECONF = "\
>      --enable-libstdcxx-pch \
>      --program-prefix=${TARGET_PREFIX} \
>      --without-local-prefix \
> +    --disable-install-libiberty \
>      ${EXTRA_OECONF_BASE} \
>      ${EXTRA_OECONF_GCC_FLOAT} \
>      ${EXTRA_OECONF_PATHS} \
> diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> index 4aac345bec..553ef7fe62 100644
> --- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> @@ -108,12 +108,6 @@ do_install () {
>         # We don't care about the gcc-<version> copies
>         rm -f ${D}${bindir}/*gcc-?.?*
>
> -       # We use libiberty from binutils
> -       rm -f ${D}${prefix}/${TARGET_SYS}/lib/libiberty.a
> -       # Not sure where the strange paths come from
> -       rm -f ${D}${libdir}/../lib/libiberty.a
> -       rm -f ${D}${libdir}/libiberty.a
> -
>         # Cleanup empty directories which are not shipped
>         # we use rmdir instead of 'rm -f' to ensure the non empty directories are not deleted
>         # ${D}${libdir}/../lib only seems to appear with SDKMACHINE=i686
> diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
> index c68cdd5dc4..6fa8c274cd 100644
> --- a/meta/recipes-devtools/gcc/gcc-cross.inc
> +++ b/meta/recipes-devtools/gcc/gcc-cross.inc
> @@ -117,10 +117,6 @@ do_install () {
>         cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
>         cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
>
> -       # We use libiberty from binutils
> -       find ${D}${exec_prefix}/lib -name libiberty.a | xargs rm -f
> -       find ${D}${exec_prefix}/lib -name libiberty.h | xargs rm -f
> -
>         find ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed -type f -not -name "README" -not -name limits.h -not -name syslimits.h | xargs rm -f
>  }
>
> diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
> index 34c1b2263b..8cb432780f 100644
> --- a/meta/recipes-devtools/gcc/gcc-target.inc
> +++ b/meta/recipes-devtools/gcc/gcc-target.inc
> @@ -192,10 +192,6 @@ do_install () {
>         # We don't care about the gcc-<version> ones for this
>         rm -f *gcc-?.?*
>
> -       # We use libiberty from binutils
> -       find ${D}${libdir} -name libiberty.a | xargs rm -f
> -       find ${D}${libdir} -name libiberty.h | xargs rm -f
> -
>         # Not sure why we end up with these but we don't want them...
>         rm -f ${TARGET_PREFIX}${TARGET_PREFIX}*
>
> --
> 2.26.1
>
> 

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

* Re: [OE-core] [PATCH 1/3] gcc: Configure all gccs with --disable-install-libiberty
  2020-04-27 23:20 ` [OE-core] [PATCH 1/3] gcc: Configure all gccs with --disable-install-libiberty Steve Sakoman
@ 2020-04-27 23:27   ` Khem Raj
  2020-04-27 23:34     ` Denys Dmytriyenko
  0 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2020-04-27 23:27 UTC (permalink / raw)
  To: Steve Sakoman; +Cc: Patches and discussions about the oe-core layer

Yes Steve, there are good for Dunfell. We should consider them

On 4/27/20 4:20 PM, Steve Sakoman wrote:
> Hi Khem,
> 
> Is this series something I should consider for dunfell LTS?
> 
> Steve
> 
> On Wed, Apr 15, 2020 at 1:19 PM Khem Raj <raj.khem@gmail.com> wrote:
>>
>> OE uses libiberty from binutils, since its properly compiled as pic
>> archive and applications and other libraries needing libiberty can
>> properly link with it.
>>
>> With this option applied, explicit delete of libiberty headers and
>> libraries is not required in install step, since they wont get installed
>> in first place.
>>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> ---
>>   meta/recipes-devtools/gcc/gcc-configure-common.inc | 1 +
>>   meta/recipes-devtools/gcc/gcc-cross-canadian.inc   | 6 ------
>>   meta/recipes-devtools/gcc/gcc-cross.inc            | 4 ----
>>   meta/recipes-devtools/gcc/gcc-target.inc           | 4 ----
>>   4 files changed, 1 insertion(+), 14 deletions(-)
>>
>> diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
>> index bb4f6923f2..a64c4caf00 100644
>> --- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
>> +++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
>> @@ -33,6 +33,7 @@ EXTRA_OECONF = "\
>>       --enable-libstdcxx-pch \
>>       --program-prefix=${TARGET_PREFIX} \
>>       --without-local-prefix \
>> +    --disable-install-libiberty \
>>       ${EXTRA_OECONF_BASE} \
>>       ${EXTRA_OECONF_GCC_FLOAT} \
>>       ${EXTRA_OECONF_PATHS} \
>> diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
>> index 4aac345bec..553ef7fe62 100644
>> --- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
>> +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
>> @@ -108,12 +108,6 @@ do_install () {
>>          # We don't care about the gcc-<version> copies
>>          rm -f ${D}${bindir}/*gcc-?.?*
>>
>> -       # We use libiberty from binutils
>> -       rm -f ${D}${prefix}/${TARGET_SYS}/lib/libiberty.a
>> -       # Not sure where the strange paths come from
>> -       rm -f ${D}${libdir}/../lib/libiberty.a
>> -       rm -f ${D}${libdir}/libiberty.a
>> -
>>          # Cleanup empty directories which are not shipped
>>          # we use rmdir instead of 'rm -f' to ensure the non empty directories are not deleted
>>          # ${D}${libdir}/../lib only seems to appear with SDKMACHINE=i686
>> diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
>> index c68cdd5dc4..6fa8c274cd 100644
>> --- a/meta/recipes-devtools/gcc/gcc-cross.inc
>> +++ b/meta/recipes-devtools/gcc/gcc-cross.inc
>> @@ -117,10 +117,6 @@ do_install () {
>>          cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
>>          cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
>>
>> -       # We use libiberty from binutils
>> -       find ${D}${exec_prefix}/lib -name libiberty.a | xargs rm -f
>> -       find ${D}${exec_prefix}/lib -name libiberty.h | xargs rm -f
>> -
>>          find ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed -type f -not -name "README" -not -name limits.h -not -name syslimits.h | xargs rm -f
>>   }
>>
>> diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
>> index 34c1b2263b..8cb432780f 100644
>> --- a/meta/recipes-devtools/gcc/gcc-target.inc
>> +++ b/meta/recipes-devtools/gcc/gcc-target.inc
>> @@ -192,10 +192,6 @@ do_install () {
>>          # We don't care about the gcc-<version> ones for this
>>          rm -f *gcc-?.?*
>>
>> -       # We use libiberty from binutils
>> -       find ${D}${libdir} -name libiberty.a | xargs rm -f
>> -       find ${D}${libdir} -name libiberty.h | xargs rm -f
>> -
>>          # Not sure why we end up with these but we don't want them...
>>          rm -f ${TARGET_PREFIX}${TARGET_PREFIX}*
>>
>> --
>> 2.26.1
>>
>> 

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

* Re: [OE-core] [PATCH 1/3] gcc: Configure all gccs with --disable-install-libiberty
  2020-04-27 23:27   ` Khem Raj
@ 2020-04-27 23:34     ` Denys Dmytriyenko
  2020-04-28  0:37       ` Steve Sakoman
  0 siblings, 1 reply; 7+ messages in thread
From: Denys Dmytriyenko @ 2020-04-27 23:34 UTC (permalink / raw)
  To: Khem Raj; +Cc: Steve Sakoman, Patches and discussions about the oe-core layer

Hi, Steve,

Is there a repo/branch available where you collect patches for dunfell-next?

Denys


On Mon, Apr 27, 2020 at 04:27:45PM -0700, Khem Raj wrote:
> Yes Steve, there are good for Dunfell. We should consider them
> 
> On 4/27/20 4:20 PM, Steve Sakoman wrote:
> >Hi Khem,
> >
> >Is this series something I should consider for dunfell LTS?
> >
> >Steve
> >
> >On Wed, Apr 15, 2020 at 1:19 PM Khem Raj <raj.khem@gmail.com> wrote:
> >>
> >>OE uses libiberty from binutils, since its properly compiled as pic
> >>archive and applications and other libraries needing libiberty can
> >>properly link with it.
> >>
> >>With this option applied, explicit delete of libiberty headers and
> >>libraries is not required in install step, since they wont get installed
> >>in first place.
> >>
> >>Signed-off-by: Khem Raj <raj.khem@gmail.com>
> >>---
> >>  meta/recipes-devtools/gcc/gcc-configure-common.inc | 1 +
> >>  meta/recipes-devtools/gcc/gcc-cross-canadian.inc   | 6 ------
> >>  meta/recipes-devtools/gcc/gcc-cross.inc            | 4 ----
> >>  meta/recipes-devtools/gcc/gcc-target.inc           | 4 ----
> >>  4 files changed, 1 insertion(+), 14 deletions(-)
> >>
> >>diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> >>index bb4f6923f2..a64c4caf00 100644
> >>--- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
> >>+++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> >>@@ -33,6 +33,7 @@ EXTRA_OECONF = "\
> >>      --enable-libstdcxx-pch \
> >>      --program-prefix=${TARGET_PREFIX} \
> >>      --without-local-prefix \
> >>+    --disable-install-libiberty \
> >>      ${EXTRA_OECONF_BASE} \
> >>      ${EXTRA_OECONF_GCC_FLOAT} \
> >>      ${EXTRA_OECONF_PATHS} \
> >>diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> >>index 4aac345bec..553ef7fe62 100644
> >>--- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> >>+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> >>@@ -108,12 +108,6 @@ do_install () {
> >>         # We don't care about the gcc-<version> copies
> >>         rm -f ${D}${bindir}/*gcc-?.?*
> >>
> >>-       # We use libiberty from binutils
> >>-       rm -f ${D}${prefix}/${TARGET_SYS}/lib/libiberty.a
> >>-       # Not sure where the strange paths come from
> >>-       rm -f ${D}${libdir}/../lib/libiberty.a
> >>-       rm -f ${D}${libdir}/libiberty.a
> >>-
> >>         # Cleanup empty directories which are not shipped
> >>         # we use rmdir instead of 'rm -f' to ensure the non empty directories are not deleted
> >>         # ${D}${libdir}/../lib only seems to appear with SDKMACHINE=i686
> >>diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
> >>index c68cdd5dc4..6fa8c274cd 100644
> >>--- a/meta/recipes-devtools/gcc/gcc-cross.inc
> >>+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
> >>@@ -117,10 +117,6 @@ do_install () {
> >>         cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
> >>         cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
> >>
> >>-       # We use libiberty from binutils
> >>-       find ${D}${exec_prefix}/lib -name libiberty.a | xargs rm -f
> >>-       find ${D}${exec_prefix}/lib -name libiberty.h | xargs rm -f
> >>-
> >>         find ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed -type f -not -name "README" -not -name limits.h -not -name syslimits.h | xargs rm -f
> >>  }
> >>
> >>diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
> >>index 34c1b2263b..8cb432780f 100644
> >>--- a/meta/recipes-devtools/gcc/gcc-target.inc
> >>+++ b/meta/recipes-devtools/gcc/gcc-target.inc
> >>@@ -192,10 +192,6 @@ do_install () {
> >>         # We don't care about the gcc-<version> ones for this
> >>         rm -f *gcc-?.?*
> >>
> >>-       # We use libiberty from binutils
> >>-       find ${D}${libdir} -name libiberty.a | xargs rm -f
> >>-       find ${D}${libdir} -name libiberty.h | xargs rm -f
> >>-
> >>         # Not sure why we end up with these but we don't want them...
> >>         rm -f ${TARGET_PREFIX}${TARGET_PREFIX}*
> >>
> >>--
> >>2.26.1
> >>
> >>

> 


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

* Re: [OE-core] [PATCH 1/3] gcc: Configure all gccs with --disable-install-libiberty
  2020-04-27 23:34     ` Denys Dmytriyenko
@ 2020-04-28  0:37       ` Steve Sakoman
  0 siblings, 0 replies; 7+ messages in thread
From: Steve Sakoman @ 2020-04-28  0:37 UTC (permalink / raw)
  To: Denys Dmytriyenko
  Cc: Patches and discussions about the oe-core layer, Khem Raj

On Mon, Apr 27, 2020 at 1:34 PM Denys Dmytriyenko <denis@denix.org> wrote:

Hi Denys,

> Is there a repo/branch available where you collect patches for dunfell-next?

Yes, I'm using a naming scheme similar to what Armin has been doing
for stable, so you can find what I'm currently testing on the
autobuilder here:

https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=stable/dunfell-nut

The above repo is constructed from component repos in:

https://git.openembedded.org/openembedded-core-contrib/log/?h=stable/dunfell-nut
https://git.openembedded.org/bitbake-contrib/log/?h=stable/1.46-nut

And I'll shortly have pointers to where I am collecting meta-yocto and
yocto-docs patches.

I'm still learning all the systems and refining a workflow.  I'll be
updating this wiki page as I find my way:

https://wiki.yoctoproject.org/wiki/Stable_Release_and_LTS

Suggestions and complaints are welcome ;-)

Steve


> On Mon, Apr 27, 2020 at 04:27:45PM -0700, Khem Raj wrote:
> > Yes Steve, there are good for Dunfell. We should consider them
> >
> > On 4/27/20 4:20 PM, Steve Sakoman wrote:
> > >Hi Khem,
> > >
> > >Is this series something I should consider for dunfell LTS?
> > >
> > >Steve
> > >
> > >On Wed, Apr 15, 2020 at 1:19 PM Khem Raj <raj.khem@gmail.com> wrote:
> > >>
> > >>OE uses libiberty from binutils, since its properly compiled as pic
> > >>archive and applications and other libraries needing libiberty can
> > >>properly link with it.
> > >>
> > >>With this option applied, explicit delete of libiberty headers and
> > >>libraries is not required in install step, since they wont get installed
> > >>in first place.
> > >>
> > >>Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > >>---
> > >>  meta/recipes-devtools/gcc/gcc-configure-common.inc | 1 +
> > >>  meta/recipes-devtools/gcc/gcc-cross-canadian.inc   | 6 ------
> > >>  meta/recipes-devtools/gcc/gcc-cross.inc            | 4 ----
> > >>  meta/recipes-devtools/gcc/gcc-target.inc           | 4 ----
> > >>  4 files changed, 1 insertion(+), 14 deletions(-)
> > >>
> > >>diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> > >>index bb4f6923f2..a64c4caf00 100644
> > >>--- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
> > >>+++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> > >>@@ -33,6 +33,7 @@ EXTRA_OECONF = "\
> > >>      --enable-libstdcxx-pch \
> > >>      --program-prefix=${TARGET_PREFIX} \
> > >>      --without-local-prefix \
> > >>+    --disable-install-libiberty \
> > >>      ${EXTRA_OECONF_BASE} \
> > >>      ${EXTRA_OECONF_GCC_FLOAT} \
> > >>      ${EXTRA_OECONF_PATHS} \
> > >>diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> > >>index 4aac345bec..553ef7fe62 100644
> > >>--- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> > >>+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> > >>@@ -108,12 +108,6 @@ do_install () {
> > >>         # We don't care about the gcc-<version> copies
> > >>         rm -f ${D}${bindir}/*gcc-?.?*
> > >>
> > >>-       # We use libiberty from binutils
> > >>-       rm -f ${D}${prefix}/${TARGET_SYS}/lib/libiberty.a
> > >>-       # Not sure where the strange paths come from
> > >>-       rm -f ${D}${libdir}/../lib/libiberty.a
> > >>-       rm -f ${D}${libdir}/libiberty.a
> > >>-
> > >>         # Cleanup empty directories which are not shipped
> > >>         # we use rmdir instead of 'rm -f' to ensure the non empty directories are not deleted
> > >>         # ${D}${libdir}/../lib only seems to appear with SDKMACHINE=i686
> > >>diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
> > >>index c68cdd5dc4..6fa8c274cd 100644
> > >>--- a/meta/recipes-devtools/gcc/gcc-cross.inc
> > >>+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
> > >>@@ -117,10 +117,6 @@ do_install () {
> > >>         cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
> > >>         cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
> > >>
> > >>-       # We use libiberty from binutils
> > >>-       find ${D}${exec_prefix}/lib -name libiberty.a | xargs rm -f
> > >>-       find ${D}${exec_prefix}/lib -name libiberty.h | xargs rm -f
> > >>-
> > >>         find ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed -type f -not -name "README" -not -name limits.h -not -name syslimits.h | xargs rm -f
> > >>  }
> > >>
> > >>diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
> > >>index 34c1b2263b..8cb432780f 100644
> > >>--- a/meta/recipes-devtools/gcc/gcc-target.inc
> > >>+++ b/meta/recipes-devtools/gcc/gcc-target.inc
> > >>@@ -192,10 +192,6 @@ do_install () {
> > >>         # We don't care about the gcc-<version> ones for this
> > >>         rm -f *gcc-?.?*
> > >>
> > >>-       # We use libiberty from binutils
> > >>-       find ${D}${libdir} -name libiberty.a | xargs rm -f
> > >>-       find ${D}${libdir} -name libiberty.h | xargs rm -f
> > >>-
> > >>         # Not sure why we end up with these but we don't want them...
> > >>         rm -f ${TARGET_PREFIX}${TARGET_PREFIX}*
> > >>
> > >>--
> > >>2.26.1
> > >>
> > >>
>
> > 
>

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

end of thread, other threads:[~2020-04-28  0:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-15 23:18 [PATCH 1/3] gcc: Configure all gccs with --disable-install-libiberty Khem Raj
2020-04-15 23:18 ` [PATCH 2/3] binutils: Detect proper static-libstdc++ support when using clang Khem Raj
2020-04-15 23:18 ` [PATCH 3/3] binutils: Install PIC version of libiberty.a Khem Raj
2020-04-27 23:20 ` [OE-core] [PATCH 1/3] gcc: Configure all gccs with --disable-install-libiberty Steve Sakoman
2020-04-27 23:27   ` Khem Raj
2020-04-27 23:34     ` Denys Dmytriyenko
2020-04-28  0:37       ` Steve Sakoman

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.