All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Misc fixes
@ 2016-07-20 19:38 Khem Raj
  2016-07-20 19:38 ` [PATCH 1/3] glibc: Update to 2.24 after hard-freeze Khem Raj
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Khem Raj @ 2016-07-20 19:38 UTC (permalink / raw)
  To: openembedded-core

General fixes for gcc and webkitgtk found on musl/clang
Update glibc to latest on master

Khem Raj (3):
  glibc: Update to 2.24 after hard-freeze
  webkitgtk: Do not use gold with clang
  gcc: Fix libgcc unresolved symbols with PIE on musl

 .../glibc/cross-localedef-native_2.24.bb           |  2 +-
 meta/recipes-core/glibc/glibc/elf-meta.patch       | 32 --------
 meta/recipes-core/glibc/glibc_2.24.bb              |  3 +-
 meta/recipes-devtools/gcc/gcc-6.1.inc              |  1 +
 ...e-alias-for-__cpu_indicator_init-instead-.patch | 85 ++++++++++++++++++++++
 meta/recipes-sato/webkit/webkitgtk_2.12.3.bb       |  2 +
 6 files changed, 90 insertions(+), 35 deletions(-)
 delete mode 100644 meta/recipes-core/glibc/glibc/elf-meta.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc-6.1/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch

-- 
2.9.0



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

* [PATCH 1/3] glibc: Update to 2.24 after hard-freeze
  2016-07-20 19:38 [PATCH 0/3] Misc fixes Khem Raj
@ 2016-07-20 19:38 ` Khem Raj
  2016-07-20 19:38 ` [PATCH 2/3] webkitgtk: Do not use gold with clang Khem Raj
  2016-07-20 19:38 ` [PATCH 3/3] gcc: Fix libgcc unresolved symbols with PIE on musl Khem Raj
  2 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2016-07-20 19:38 UTC (permalink / raw)
  To: openembedded-core

Drop upstreamed patch

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../glibc/cross-localedef-native_2.24.bb           |  2 +-
 meta/recipes-core/glibc/glibc/elf-meta.patch       | 32 ----------------------
 meta/recipes-core/glibc/glibc_2.24.bb              |  3 +-
 3 files changed, 2 insertions(+), 35 deletions(-)
 delete mode 100644 meta/recipes-core/glibc/glibc/elf-meta.patch

diff --git a/meta/recipes-core/glibc/cross-localedef-native_2.24.bb b/meta/recipes-core/glibc/cross-localedef-native_2.24.bb
index 104e38b..650c6c3 100644
--- a/meta/recipes-core/glibc/cross-localedef-native_2.24.bb
+++ b/meta/recipes-core/glibc/cross-localedef-native_2.24.bb
@@ -22,7 +22,7 @@ GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
 SRCBRANCH ?= "master"
 UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
 
-SRCREV_glibc ?= "d461c9682d4954076f9ee9e07be903c2eef8e73b"
+SRCREV_glibc ?= "d957c4d3fa48d685ff2726c605c988127ef99395"
 SRCREV_localedef ?= "29869b6dc11427c5bab839bdb155c85a7c644c71"
 
 SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
diff --git a/meta/recipes-core/glibc/glibc/elf-meta.patch b/meta/recipes-core/glibc/glibc/elf-meta.patch
deleted file mode 100644
index fab66d7..0000000
--- a/meta/recipes-core/glibc/glibc/elf-meta.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From a495656665cd4a4f97744741a4741eafa621d65b Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Mon, 11 Jul 2016 16:57:38 +0100
-Subject: [PATCH] elf.h: add relocations for Imagination META
-
-Adding EM_METAG but not the relocations means the kernel doesn't compile as it
-guards its own declarations on the presence of EM_METAG.
----
- elf/elf.h | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/elf/elf.h b/elf/elf.h
-index b6112d9..69e85a7 100644
---- a/elf/elf.h
-+++ b/elf/elf.h
-@@ -3677,6 +3677,10 @@ enum
- 
- #define R_TILEGX_NUM		130
- 
-+/* Imagination META relocs */
-+#define R_METAG_ADDR32		2
-+#define R_METAG_NONE		3
-+
- /* BPF specific declarations.  */
- 
- #define R_BPF_NONE		0	/* No reloc */
--- 
-2.8.1
-
diff --git a/meta/recipes-core/glibc/glibc_2.24.bb b/meta/recipes-core/glibc/glibc_2.24.bb
index 4bc6443..f023272 100644
--- a/meta/recipes-core/glibc/glibc_2.24.bb
+++ b/meta/recipes-core/glibc/glibc_2.24.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
 
 DEPENDS += "gperf-native"
 
-SRCREV ?= "d461c9682d4954076f9ee9e07be903c2eef8e73b"
+SRCREV ?= "d957c4d3fa48d685ff2726c605c988127ef99395"
 
 #SRCBRANCH ?= "release/${PV}/master"
 SRCBRANCH ?= "master"
@@ -37,7 +37,6 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
            file://0023-eglibc-Install-PIC-archives.patch \
            file://0024-eglibc-Forward-port-cross-locale-generation-support.patch \
            file://0025-Define-DUMMY_LOCALE_T-if-not-defined.patch \
-           file://elf-meta.patch \
 "
 
 SRC_URI += "\
-- 
2.9.0



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

* [PATCH 2/3] webkitgtk: Do not use gold with clang
  2016-07-20 19:38 [PATCH 0/3] Misc fixes Khem Raj
  2016-07-20 19:38 ` [PATCH 1/3] glibc: Update to 2.24 after hard-freeze Khem Raj
@ 2016-07-20 19:38 ` Khem Raj
  2016-07-20 19:40   ` Khem Raj
  2016-07-20 19:38 ` [PATCH 3/3] gcc: Fix libgcc unresolved symbols with PIE on musl Khem Raj
  2 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2016-07-20 19:38 UTC (permalink / raw)
  To: openembedded-core

clang cross compiler fails to detect gold linker from
cross-binutils, instead it defaults to ld.gold from build
host, lets disable using gold when clang is active to avoid
this issue

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-sato/webkit/webkitgtk_2.12.3.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-sato/webkit/webkitgtk_2.12.3.bb b/meta/recipes-sato/webkit/webkitgtk_2.12.3.bb
index 28517c4..2e5a1e4 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.12.3.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.12.3.bb
@@ -79,6 +79,8 @@ EXTRA_OECMAKE_append_armv7a = " -DENABLE_JIT=OFF "
 # binutils 2.25.1 has a bug on aarch64:
 # https://sourceware.org/bugzilla/show_bug.cgi?id=18430
 EXTRA_OECMAKE_append_aarch64 = " -DUSE_LD_GOLD=OFF "
+EXTRA_OECMAKE_append_toolchain-clang = " -DUSE_LD_GOLD=OFF "
+EXTRA_OECMAKE_append_toolchain-clang = " -DUSE_LD_GOLD=OFF "
 
 # JIT not supported on MIPS either
 EXTRA_OECMAKE_append_mips = " -DENABLE_JIT=OFF "
-- 
2.9.0



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

* [PATCH 3/3] gcc: Fix libgcc unresolved symbols with PIE on musl
  2016-07-20 19:38 [PATCH 0/3] Misc fixes Khem Raj
  2016-07-20 19:38 ` [PATCH 1/3] glibc: Update to 2.24 after hard-freeze Khem Raj
  2016-07-20 19:38 ` [PATCH 2/3] webkitgtk: Do not use gold with clang Khem Raj
@ 2016-07-20 19:38 ` Khem Raj
  2 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2016-07-20 19:38 UTC (permalink / raw)
  To: openembedded-core

Fixes

[YOCTO #9772]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/gcc/gcc-6.1.inc              |  1 +
 ...e-alias-for-__cpu_indicator_init-instead-.patch | 85 ++++++++++++++++++++++
 2 files changed, 86 insertions(+)
 create mode 100644 meta/recipes-devtools/gcc/gcc-6.1/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch

diff --git a/meta/recipes-devtools/gcc/gcc-6.1.inc b/meta/recipes-devtools/gcc/gcc-6.1.inc
index afeeff4..0426028 100644
--- a/meta/recipes-devtools/gcc/gcc-6.1.inc
+++ b/meta/recipes-devtools/gcc/gcc-6.1.inc
@@ -78,6 +78,7 @@ SRC_URI = "\
            file://0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch \
            file://0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch \
            file://0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \
+           file://0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \
            ${BACKPORTS} \
            file://CVE-2016-4490.patch \
 "
diff --git a/meta/recipes-devtools/gcc/gcc-6.1/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch b/meta/recipes-devtools/gcc/gcc-6.1/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
new file mode 100644
index 0000000..ed6cd69
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-6.1/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
@@ -0,0 +1,85 @@
+From 0a9ed0479203cb7e69c3745b0c259007410f39ba Mon Sep 17 00:00:00 2001
+From: Szabolcs Nagy <nsz@port70.net>
+Date: Sat, 24 Oct 2015 20:09:53 +0000
+Subject: [PATCH 47/47] libgcc_s: Use alias for __cpu_indicator_init instead of
+ symver
+
+Adapter from
+
+https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00899.html
+
+This fix was debated but hasnt been applied gcc upstream since
+they expect musl to support '@' in symbol versioning which is
+a sun/gnu versioning extention. This patch however avoids the
+need for the '@' symbols at all
+
+libgcc/Changelog:
+
+2015-05-11  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+	* config/i386/cpuinfo.c (__cpu_indicator_init_local): Add.
+	(__cpu_indicator_init@GCC_4.8.0, __cpu_model@GCC_4.8.0): Remove.
+
+	* config/i386/t-linux (HOST_LIBGCC2_CFLAGS): Remove -DUSE_ELF_SYMVER.
+
+gcc/Changelog:
+
+2015-05-11  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+	* config/i386/i386.c (ix86_expand_builtin): Make __builtin_cpu_init
+	call __cpu_indicator_init_local instead of __cpu_indicator_init.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Rejected
+
+ gcc/config/i386/i386.c       | 4 ++--
+ libgcc/config/i386/cpuinfo.c | 6 +++---
+ libgcc/config/i386/t-linux   | 2 +-
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
+index 861a029..1c97d72 100644
+--- a/gcc/config/i386/i386.c
++++ b/gcc/config/i386/i386.c
+@@ -40323,10 +40323,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
+     {
+     case IX86_BUILTIN_CPU_INIT:
+       {
+-	/* Make it call __cpu_indicator_init in libgcc. */
++	/* Make it call __cpu_indicator_init_local in libgcc.a. */
+ 	tree call_expr, fndecl, type;
+         type = build_function_type_list (integer_type_node, NULL_TREE); 
+-	fndecl = build_fn_decl ("__cpu_indicator_init", type);
++	fndecl = build_fn_decl ("__cpu_indicator_init_local", type);
+ 	call_expr = build_call_expr (fndecl, 0); 
+ 	return expand_expr (call_expr, target, mode, EXPAND_NORMAL);
+       }
+diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
+index 8c2248d..6c82f15 100644
+--- a/libgcc/config/i386/cpuinfo.c
++++ b/libgcc/config/i386/cpuinfo.c
+@@ -485,7 +485,7 @@ __cpu_indicator_init (void)
+   return 0;
+ }
+ 
+-#if defined SHARED && defined USE_ELF_SYMVER
+-__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0");
+-__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0");
++#ifndef SHARED
++int __cpu_indicator_init_local (void)
++  __attribute__ ((weak, alias ("__cpu_indicator_init")));
+ #endif
+diff --git a/libgcc/config/i386/t-linux b/libgcc/config/i386/t-linux
+index 11bb46e..4f47f7b 100644
+--- a/libgcc/config/i386/t-linux
++++ b/libgcc/config/i386/t-linux
+@@ -3,4 +3,4 @@
+ # t-slibgcc-elf-ver and t-linux
+ SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver
+ 
+-HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER
++HOST_LIBGCC2_CFLAGS += -mlong-double-80
+-- 
+2.9.0
+
-- 
2.9.0



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

* Re: [PATCH 2/3] webkitgtk: Do not use gold with clang
  2016-07-20 19:38 ` [PATCH 2/3] webkitgtk: Do not use gold with clang Khem Raj
@ 2016-07-20 19:40   ` Khem Raj
  0 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2016-07-20 19:40 UTC (permalink / raw)
  To: OE-core

[-- Attachment #1: Type: text/plain, Size: 1203 bytes --]


> On Jul 20, 2016, at 12:38 PM, Khem Raj <raj.khem@gmail.com> wrote:
> 
> clang cross compiler fails to detect gold linker from
> cross-binutils, instead it defaults to ld.gold from build
> host, lets disable using gold when clang is active to avoid
> this issue
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> meta/recipes-sato/webkit/webkitgtk_2.12.3.bb | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/meta/recipes-sato/webkit/webkitgtk_2.12.3.bb b/meta/recipes-sato/webkit/webkitgtk_2.12.3.bb
> index 28517c4..2e5a1e4 100644
> --- a/meta/recipes-sato/webkit/webkitgtk_2.12.3.bb
> +++ b/meta/recipes-sato/webkit/webkitgtk_2.12.3.bb
> @@ -79,6 +79,8 @@ EXTRA_OECMAKE_append_armv7a = " -DENABLE_JIT=OFF "
> # binutils 2.25.1 has a bug on aarch64:
> # https://sourceware.org/bugzilla/show_bug.cgi?id=18430
> EXTRA_OECMAKE_append_aarch64 = " -DUSE_LD_GOLD=OFF "
> +EXTRA_OECMAKE_append_toolchain-clang = " -DUSE_LD_GOLD=OFF "
> +EXTRA_OECMAKE_append_toolchain-clang = " -DUSE_LD_GOLD=OFF “

redundant line. It has been fixed in pull tree.

> 
> # JIT not supported on MIPS either
> EXTRA_OECMAKE_append_mips = " -DENABLE_JIT=OFF "
> --
> 2.9.0
> 


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

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

end of thread, other threads:[~2016-07-20 19:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-20 19:38 [PATCH 0/3] Misc fixes Khem Raj
2016-07-20 19:38 ` [PATCH 1/3] glibc: Update to 2.24 after hard-freeze Khem Raj
2016-07-20 19:38 ` [PATCH 2/3] webkitgtk: Do not use gold with clang Khem Raj
2016-07-20 19:40   ` Khem Raj
2016-07-20 19:38 ` [PATCH 3/3] gcc: Fix libgcc unresolved symbols with PIE on musl Khem Raj

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.