Introduce ARC port of OpenEmbedded
cover Introduce ARC port of OpenEmbedded
DesignWare ARC Processors are a family of 32-bit CPUs from Synopsys. This series introduces basic support for ARC architecture in OpenEmbedded.
As of today latest upstream GCC and Binutils are perfectly usable for building packages for ARC so we just need a couple of fixes.
Glibc for ARC is under review and we're working hard to get it accepted in the next upstream release. For now we'll use latest code-base back-ported on top of 2.28 release via meta-synopsys.
More platform and architecture specific bits could be found in meta-synopsys layer here (please refer to the "master" branch):
https://github.com/foss-for-synopsys-dwc-arc-processors/meta-synopsys
Alexey Brodkin (8):
siteinfo: Define data for ARC
site: Add ARC linux
kernel-arch.bbclass: Add ARC to kernel arch map
openssl: Add support for ARC
icu: Add ARC support
gcc: Disable libitm for ARC
binutils: Fix Glibc building for ARC
gcc: Fix specs generation for ARC
Antoine Tenart (1):
nspr: Add ARC support
Mylene Josserand (1):
libgpg-error: Add ARC support
meta/classes/kernel-arch.bbclass | 1 + meta/classes/siteinfo.bbclass | 2 + .../openssl/openssl10_1.0.2p.bb | 2 +- .../openssl/openssl_1.1.1-pre9.bb | 2 +- meta/recipes-devtools/binutils/binutils-2.31.inc | 4 + ...location-where-GOT-information-is-collect.patch | 198 +++++++++++++++++++++ ...bustness.-Return-FALSE-in-case-of-NULL-po.patch | 35 ++++ ...lobal-symbol-is-not-an-indirect-or-warnin.patch | 43 +++++ ...tion-was-still-being-generated-when-symbo.patch | 37 ++++ meta/recipes-devtools/gcc/gcc-8.2.inc | 1 + .../gcc/gcc-8.2/0041-ARC-fix-spec-gen.patch | 40 +++++ meta/recipes-devtools/gcc/gcc-runtime.inc | 1 + .../icu/icu/0002-Add-ARC-support.patch | 25 +++ meta/recipes-support/icu/icu_62.1.bb | 1 + .../0001-syscfg-Add-an-arc-architecture.patch | 75 ++++++++ .../libgpg-error/libgpg-error_1.32.bb | 1 + .../nspr/nspr/0004-Add-ARC-support.patch | 86 +++++++++ meta/recipes-support/nspr/nspr_4.19.bb | 1 + meta/site/arc-linux | 11 ++ 19 files changed, 564 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-devtools/binutils/binutils/0018-Refactored-location-where-GOT-information-is-collect.patch create mode 100644 meta/recipes-devtools/binutils/binutils/0019-Improved-robustness.-Return-FALSE-in-case-of-NULL-po.patch create mode 100644 meta/recipes-devtools/binutils/binutils/0020-Make-sure-global-symbol-is-not-an-indirect-or-warnin.patch create mode 100644 meta/recipes-devtools/binutils/binutils/0021-PLT-information-was-still-being-generated-when-symbo.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.2/0041-ARC-fix-spec-gen.patch create mode 100644 meta/recipes-support/icu/icu/0002-Add-ARC-support.patch create mode 100644 meta/recipes-support/libgpg-error/libgpg-error/0001-syscfg-Add-an-arc-architecture.patch create mode 100644 meta/recipes-support/nspr/nspr/0004-Add-ARC-support.patch create mode 100644 meta/site/arc-linux
Signature · 1 line
1.8.3.1
PATCH 1/10 siteinfo: Define data for ARC
--- meta/classes/siteinfo.bbclass | 2 ++ 1 file changed, 2 insertions(+)
meta/classes/siteinfo.bbclass +2 -0
@@ -20,6 +20,8 @@ def siteinfo_data(d): "allarch": "endian-little bit-32", # bogus, but better than special-casing the checks below for allarch "aarch64": "endian-little bit-64 arm-common arm-64", "aarch64_be": "endian-big bit-64 arm-common arm-64", + "arc": "endian-little bit-32 arc-common", + "arceb": "endian-big bit-32 arc-common", "arm": "endian-little bit-32 arm-common arm-32", "armeb": "endian-big bit-32 arm-common arm-32", "avr32": "endian-big bit-32 avr32-common",
Signature · 1 line
1.8.3.1
Re: [PATCH 01/10] siteinfo: Define data for ARC
Quoted 14 lines · Alexey Brodkin
Signed-off-by Alexey Brodkin <[email protected]>--- meta/classes/siteinfo.bbclass | 2 ++ 1 file changed, 2 insertions(+)meta/classes/siteinfo.bbclass +0
-0@@ -20,6 +20,8 @@ def siteinfo_data(d): "allarch": "endian-little bit-32", # bogus, but better thanspecial-casing the checks below for allarch
"aarch64": "endian-little bit-64 arm-common arm-64", "aarch64_be": "endian-big bit-64 arm-common arm-64",
meta/classes/siteinfo.bbclass def siteinfo_data(d): · line 24
Quoted 2 lines
meta/classes/siteinfo.bbclass +2
-0+ "arc": "endian-little bit-32 arc-common", + "arceb": "endian-big bit-32 arc-common",
Probably need to add arc-common file as well
Since it’s used here
Quoted 8 lines
"arm": "endian-little bit-32 arm-common arm-32", "armeb": "endian-big bit-32 arm-common arm-32", "avr32": "endian-big bit-32 avr32-common",--
1.8.3.1
PATCH 2/10 site: Add ARC linux
In reply to Alexey Brodkin--- meta/site/arc-linux | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 meta/site/arc-linux
meta/site/arc-linux new file +11 -0
@@ -0,0 +1,11 @@ +# general +ac_cv_alignof_guint32=4 +ac_cv_alignof_guint64=4 +ac_cv_alignof_unsigned_long=4 + +# glib-2.0 +glib_cv_stack_grows=${glib_cv_stack_grows=no} +glib_cv_uscore=${glib_cv_uscore=no} + +# startup-notification +lf_cv_sane_realloc=${lf_cv_sane_realloc=yes}
Signature · 1 line
1.8.3.1
PATCH 3/10 kernel-arch.bbclass: Add ARC to kernel arch map
In reply to Alexey Brodkin--- meta/classes/kernel-arch.bbclass | 1 + 1 file changed, 1 insertion(+)
meta/classes/kernel-arch.bbclass +1 -0
@@ -22,6 +22,7 @@ def map_kernel_arch(a, d): valid_archs = d.getVar('valid_archs').split() if re.match('(i.86|athlon|x86.64)$', a): return 'x86' + elif re.match('arceb$', a): return 'arc' elif re.match('armeb$', a): return 'arm' elif re.match('aarch64$', a): return 'arm64' elif re.match('aarch64_be$', a): return 'arm64'
Signature · 1 line
1.8.3.1
PATCH 4/10 openssl: Add support for ARC
In reply to Alexey Brodkin--- meta/recipes-connectivity/openssl/openssl10_1.0.2p.bb | 2 +- meta/recipes-connectivity/openssl/openssl_1.1.1-pre9.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-connectivity/openssl/openssl10_1.0.2p.bb +1 -1
@@ -164,7 +164,7 @@ do_configure () { linux-mips*) target=debian-mips ;; - linux-microblaze* | linux-nios2* | linux-gnu*ilp32**) + linux-microblaze* | linux-nios2* | linux-gnu*ilp32** | linux-arc*) target=linux-generic32 ;; linux-powerpc)
meta/recipes-connectivity/openssl/openssl_1.1.1-pre9.bb +1 -1
@@ -82,7 +82,7 @@ do_configure () { linux-*-mips64 | linux-mips64 | linux-*-mips64el | linux-mips64el) target=linux64-mips64 ;; - linux-microblaze* | linux-nios2* | linux-sh3 | linux-sh4) + linux-microblaze* | linux-nios2* | linux-sh3 | linux-sh4 | linux-arc*) target=linux-generic32 ;; linux-powerpc)
Signature · 1 line
1.8.3.1
PATCH 5/10 nspr: Add ARC support
In reply to Alexey BrodkinFrom: Antoine Tenart <[email protected]>
[Alexey: Rebased on top of other patches like RiscV, NIOS2 etc]
--- .../nspr/nspr/0004-Add-ARC-support.patch | 86 ++++++++++++++++++++++ meta/recipes-support/nspr/nspr_4.19.bb | 1 + 2 files changed, 87 insertions(+) create mode 100644 meta/recipes-support/nspr/nspr/0004-Add-ARC-support.patch
meta/recipes-support/nspr/nspr/0004-Add-ARC-support.patch new file +86 -0
@@ -0,0 +1,86 @@ +From 6cb5b0be8837222a1e01745f2cf57cd0e593186d Mon Sep 17 00:00:00 2001 +From: Antoine Tenart <antoine.tenart at free-electrons.com> +Date: Mon, 23 Oct 2017 10:28:20 +0200 +Subject: [PATCH] Add ARC support + +[Alexey: Rebased on top of other patches like RiscV, NIOS2 etc]. + +Signed-off-by: Antoine Tenart <antoine.tenart at bootlin.com> +Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com> +--- + pr/include/md/_linux.cfg | 45 ++++++++++++++++++++++++++++++++++++++++ + pr/include/md/_linux.h | 2 ++ + 2 files changed, 47 insertions(+) + +diff --git a/pr/include/md/_linux.cfg b/pr/include/md/_linux.cfg +index fec8525378dc..5f4fa0eac783 100644 +--- a/pr/include/md/_linux.cfg ++++ b/pr/include/md/_linux.cfg +@@ -1157,6 +1157,51 @@ + #define PR_BYTES_PER_WORD_LOG2 3 + #define PR_BYTES_PER_DWORD_LOG2 3 + ++#elif defined(__arc__) ++ ++#define IS_LITTLE_ENDIAN 1 ++#undef IS_BIG_ENDIAN ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 4 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 4 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 32 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 32 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 5 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 5 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 4 ++#define PR_ALIGN_OF_INT64 4 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 4 ++#define PR_ALIGN_OF_POINTER 4 ++#define PR_ALIGN_OF_WORD 4 ++ ++#define PR_BYTES_PER_WORD_LOG2 2 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ + #else + + #error "Unknown CPU architecture" +diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h +index 8e04fad479a1..628b1217e9c8 100644 +--- a/pr/include/md/_linux.h ++++ b/pr/include/md/_linux.h +@@ -63,6 +63,8 @@ + #define _PR_SI_ARCHITECTURE "riscv32" + #elif defined(__riscv) && (__riscv_xlen == 64) + #define _PR_SI_ARCHITECTURE "riscv64" ++#elif defined(__arc__) ++#define _PR_SI_ARCHITECTURE "arc" + #else + #error "Unknown CPU architecture" + #endif +-- +2.17.1 +
meta/recipes-support/nspr/nspr_4.19.bb +1 -0
@@ -12,6 +12,7 @@ SRC_URI = "http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz file://0002-Add-nios2-support.patch \ file://0001-md-Fix-build-with-musl.patch \ file://0003-Add-type-definitions-for-the-RISC-V-architecture.patch \ + file://0004-Add-ARC-support.patch \ file://nspr.pc.in \ "
Signature · 1 line
1.8.3.1
PATCH 6/10 libgpg-error: Add ARC support
In reply to Alexey BrodkinFrom: Mylene Josserand <[email protected]>
--- .../0001-syscfg-Add-an-arc-architecture.patch | 75 ++++++++++++++++++++++ .../libgpg-error/libgpg-error_1.32.bb | 1 + 2 files changed, 76 insertions(+) create mode 100644 meta/recipes-support/libgpg-error/libgpg-error/0001-syscfg-Add-an-arc-architecture.patch
meta/recipes-support/libgpg-error/libgpg-error/0001-syscfg-Add-an-arc-architecture.patch new file +75 -0
@@ -0,0 +1,75 @@ +From f2bad39e70bbd73e6e2e14a2bbfaa0103b5f6fec Mon Sep 17 00:00:00 2001 +From: Mylene Josserand <mylene.josserand at bootlin.com> +Date: Thu, 13 Sep 2018 16:39:56 +0300 +Subject: [PATCH libgpg-error] syscfg: Add ARC architecture + +DesignWare ARC Processors are a family of 32-bit CPUs from Synopsys. +This change allows us to build for and use libgpg-error on ARC cores. + +These values were obtained from a test application executed on ARC +in simulation this way: + +1. Instructions for cross-compilation used are here: + http://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=blob;f=README + +2. Commands used on host: + # build="$(build-aux/config.guess)" + # ./configure --prefix=build/tmp-uclibc/sysroots/nsimhs/usr/ --host=arc-oe-linux-uclibc --build=$build + # cd src + # make gen-posix-lock-obj + +3. Commands used on target: + # ./gen-posix-lock-obj + +Signed-off-by: Mylene Josserand <mylene.josserand at bootlin.com> +Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com> +--- + src/Makefile.am | 1 + + .../lock-obj-pub.arc-unknown-linux-gnu.h | 23 +++++++++++++++++++ + 2 files changed, 24 insertions(+) + create mode 100644 src/syscfg/lock-obj-pub.arc-unknown-linux-gnu.h + +diff --git a/src/Makefile.am b/src/Makefile.am +index 380ea7c09c04..bd00961c2f27 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -47,6 +47,7 @@ lock_obj_pub = \ + syscfg/lock-obj-pub.aarch64-unknown-linux-gnu.h \ + syscfg/lock-obj-pub.aarch64-apple-darwin.h \ + syscfg/lock-obj-pub.alpha-unknown-linux-gnu.h \ ++ syscfg/lock-obj-pub.arc-unknown-linux-gnu.h \ + syscfg/lock-obj-pub.arm-unknown-linux-androideabi.h \ + syscfg/lock-obj-pub.arm-unknown-linux-gnueabi.h \ + syscfg/lock-obj-pub.arm-apple-darwin.h \ +diff --git a/src/syscfg/lock-obj-pub.arc-unknown-linux-gnu.h b/src/syscfg/lock-obj-pub.arc-unknown-linux-gnu.h +new file mode 100644 +index 000000000000..3b1a8fadf8a7 +--- /dev/null ++++ b/src/syscfg/lock-obj-pub.arc-unknown-linux-gnu.h +@@ -0,0 +1,23 @@ ++## lock-obj-pub.arc-oe-linux-uclibc.h ++## File created by gen-posix-lock-obj - DO NOT EDIT ++## To be included by mkheader into gpg-error.h ++ ++typedef struct ++{ ++ long _vers; ++ union { ++ volatile char _priv[24]; ++ long _x_align; ++ long *_xp_align; ++ } u; ++} gpgrt_lock_t; ++ ++#define GPGRT_LOCK_INITIALIZER {1,{{0,0,0,0,0,0,0,0, \ ++ 0,0,0,0,0,0,0,0, \ ++ 0,0,0,0,0,0,0,0}}} ++## ++## Local Variables: ++## mode: c ++## buffer-read-only: t ++## End: ++## +-- +2.17.1 +
meta/recipes-support/libgpg-error/libgpg-error_1.32.bb +1 -0
@@ -14,6 +14,7 @@ SECTION = "libs" UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" SRC_URI = "${GNUPG_MIRROR}/libgpg-error/libgpg-error-${PV}.tar.bz2 \ file://pkgconfig.patch \ + file://0001-syscfg-Add-an-arc-architecture.patch \ " SRC_URI[md5sum] = "ef3d928a5a453fa701ecc3bb22be1c64" SRC_URI[sha256sum] = "c345c5e73cc2332f8d50db84a2280abfb1d8f6d4f1858b9daa30404db44540ca"
Signature · 1 line
1.8.3.1
PATCH 7/10 icu: Add ARC support
In reply to Alexey Brodkin--- .../icu/icu/0002-Add-ARC-support.patch | 25 ++++++++++++++++++++++ meta/recipes-support/icu/icu_62.1.bb | 1 + 2 files changed, 26 insertions(+) create mode 100644 meta/recipes-support/icu/icu/0002-Add-ARC-support.patch
meta/recipes-support/icu/icu/0002-Add-ARC-support.patch new file +25 -0
@@ -0,0 +1,25 @@ +From fcfd57105b4bdb30d906df152ef01748fa95daff Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin <abrodkin at synopsys.com> +Date: Thu, 13 Sep 2018 17:13:20 +0300 +Subject: [PATCH] icu: Add ARC support + +Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com> +--- + i18n/double-conversion-utils.h | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/i18n/double-conversion-utils.h b/i18n/double-conversion-utils.h +index 57fc49b231a3..0bd3e8340673 100644 +--- a/i18n/double-conversion-utils.h ++++ b/i18n/double-conversion-utils.h +@@ -86,7 +86,7 @@ inline void abort_noreturn() { abort(); } + defined(__SH4__) || defined(__alpha__) || \ + defined(_MIPS_ARCH_MIPS32R2) || \ + defined(__AARCH64EL__) || defined(__aarch64__) || \ +- defined(__riscv) ++ defined(__riscv) || defined(__arc__) + #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 + #elif defined(__mc68000__) + #undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS +2.17.1 +
meta/recipes-support/icu/icu_62.1.bb +1 -0
@@ -16,6 +16,7 @@ BASE_SRC_URI = "http://download.icu-project.org/files/icu4c/${PV}/icu4c-${ICU_PV SRC_URI = "${BASE_SRC_URI} \ file://icu-pkgdata-large-cmd.patch \ file://fix-install-manx.patch \ + file://0002-Add-ARC-support.patch \ " SRC_URI_append_class-target = "\
Signature · 1 line
1.8.3.1
PATCH 8/10 gcc: Disable libitm for ARC
In reply to Alexey BrodkinThe libitm is not supported on ARC, so disable it
--- meta/recipes-devtools/gcc/gcc-runtime.inc | 1 + 1 file changed, 1 insertion(+)
meta/recipes-devtools/gcc/gcc-runtime.inc +1 -0
@@ -17,6 +17,7 @@ EXTRA_OECONF_PATHS = "\ EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu" RUNTIMELIBITM = "libitm" +RUNTIMELIBITM_arc = "" RUNTIMELIBITM_mipsarch = "" RUNTIMELIBITM_nios2 = "" RUNTIMELIBITM_microblaze = ""
Signature · 1 line
1.8.3.1
PATCH 9/10 binutils: Fix Glibc building for ARC
In reply to Alexey Brodkin--- meta/recipes-devtools/binutils/binutils-2.31.inc | 4 + ...location-where-GOT-information-is-collect.patch | 198 +++++++++++++++++++++ ...bustness.-Return-FALSE-in-case-of-NULL-po.patch | 35 ++++ ...lobal-symbol-is-not-an-indirect-or-warnin.patch | 43 +++++ ...tion-was-still-being-generated-when-symbo.patch | 37 ++++ 5 files changed, 317 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/0018-Refactored-location-where-GOT-information-is-collect.patch create mode 100644 meta/recipes-devtools/binutils/binutils/0019-Improved-robustness.-Return-FALSE-in-case-of-NULL-po.patch create mode 100644 meta/recipes-devtools/binutils/binutils/0020-Make-sure-global-symbol-is-not-an-indirect-or-warnin.patch create mode 100644 meta/recipes-devtools/binutils/binutils/0021-PLT-information-was-still-being-generated-when-symbo.patch
meta/recipes-devtools/binutils/binutils-2.31.inc +4 -0
@@ -37,6 +37,10 @@ SRC_URI = "\ file://0015-sync-with-OE-libtool-changes.patch \ file://0016-add-i386pep-emulation-for-x86_64.patch \ file://0017-improve-check-for-input-file-matching-output-file.patch \ + file://0018-Refactored-location-where-GOT-information-is-collect.patch \ + file://0019-Improved-robustness.-Return-FALSE-in-case-of-NULL-po.patch \ + file://0020-Make-sure-global-symbol-is-not-an-indirect-or-warnin.patch \ + file://0021-PLT-information-was-still-being-generated-when-symbo.patch \ " S = "${WORKDIR}/git"
meta/recipes-devtools/binutils/binutils/0018-Refactored-location-where-GOT-information-is-collect.patch new file +198 -0
198 lines not on this page · raw message
meta/recipes-devtools/binutils/binutils/0019-Improved-robustness.-Return-FALSE-in-case-of-NULL-po.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 955176bd999fe80c5b937ab8786665079e35c387 Mon Sep 17 00:00:00 2001 +From: Cupertino Miranda <cmiranda at synopsys.com> +Date: Fri, 2 Mar 2018 17:33:48 +0100 +Subject: [PATCH] Improved robustness. Return FALSE in case of NULL pointer. + +bfd/ +2018-03-01 Cupertino Miranda <cmiranda at synopsys.com> + + * elf32-arc.c (elf_arc_finish_dynamic_symbol) Return FALSE in case + arc_htab is NULL. + +Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com> +[Romain: rebase on top of 2.31] +Signed-off-by: Romain Naour <romain.naour at gmail.com> +--- + bfd/elf32-arc.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c +index ab84de43815..33fc72cff6e 100644 +--- a/bfd/elf32-arc.c ++++ b/bfd/elf32-arc.c +@@ -2420,6 +2420,9 @@ elf_arc_finish_dynamic_symbol (bfd * output_bfd, + { + struct elf_arc_link_hash_table *arc_htab = elf_arc_hash_table (info); + ++ if(arc_htab == NULL) ++ return FALSE; ++ + if (h->dynindx == -1 + || (h->root.type != bfd_link_hash_defined + && h->root.type != bfd_link_hash_defweak) +-- +2.14.4 +
meta/recipes-devtools/binutils/binutils/0020-Make-sure-global-symbol-is-not-an-indirect-or-warnin.patch new file +43 -0
43 lines not on this page · raw message
meta/recipes-devtools/binutils/binutils/0021-PLT-information-was-still-being-generated-when-symbo.patch new file +37 -0
@@ -0,0 +1,37 @@ +From e4861c68067cb2166b4c2bb9c052abeb6ad9aaa1 Mon Sep 17 00:00:00 2001 +From: Cupertino Miranda <cmiranda at synopsys.com> +Date: Fri, 2 Mar 2018 17:44:29 +0100 +Subject: [PATCH] PLT information was still being generated when symbol was + forced_local. + +A change upstream reveiled this issue, triggering an assert when linking glibc. + +bfd/ +2018-03-01 Cupertino Miranda <cmiranda at synopsys.com> + + * elf32-arc.c (elf_arc_check_relocs): Changed. + +Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com> +[Romain: rebase on top of 2.31] +Signed-off-by: Romain Naour <romain.naour at gmail.com> +--- + bfd/elf32-arc.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c +index 9b72c5b4f4f..b40b463d34d 100644 +--- a/bfd/elf32-arc.c ++++ b/bfd/elf32-arc.c +@@ -2041,7 +2041,8 @@ elf_arc_check_relocs (bfd * abfd, + if (h == NULL) + continue; + else +- h->needs_plt = 1; ++ if(h->forced_local == 0) ++ h->needs_plt = 1; + } + + /* Add info to the symbol got_entry_list. */ +-- +2.14.4 +
Signature · 1 line
1.8.3.1
PATCH 10/10 gcc: Fix specs generation for ARC
In reply to Alexey BrodkinGCC's built-in spec for LD is missing a space after "--eh-frame-hdr" thus with the next option merged together they are not understood by LD and so LD fails.
Back-port from upstream GCC, see:
https://github.com/gcc-mirror/gcc/commit/892142379c6b99fe8c3ebdfe0b79e2a435228c1d
--- meta/recipes-devtools/gcc/gcc-8.2.inc | 1 + .../gcc/gcc-8.2/0041-ARC-fix-spec-gen.patch | 40 ++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 meta/recipes-devtools/gcc/gcc-8.2/0041-ARC-fix-spec-gen.patch
meta/recipes-devtools/gcc/gcc-8.2.inc +1 -0
@@ -69,6 +69,7 @@ SRC_URI = "\ file://0038-fix-segmentation-fault-in-precompiled-header-generat.patch \ file://0039-Fix-for-testsuite-failure.patch \ file://0040-Re-introduce-spe-commandline-options.patch \ + file://0041-ARC-fix-spec-gen.patch \ ${BACKPORTS} \ " BACKPORTS = "\
meta/recipes-devtools/gcc/gcc-8.2/0041-ARC-fix-spec-gen.patch new file +40 -0
@@ -0,0 +1,40 @@ +From 892142379c6b99fe8c3ebdfe0b79e2a435228c1d Mon Sep 17 00:00:00 2001 +From: claziss <claziss at 138bc75d-0d04-0410-961f-82ee72b054a4> +Date: Mon, 17 Sep 2018 08:52:10 +0000 +Subject: [PATCH] [ARC] Update LINK_EH_SPEC linker spec. + +With no trailing space in LINK_EH_SPEC linker spec gets generated as: +------------------------>8--------------------- +%{!r:--build-id} --eh-frame-hdr%{h*} ... +------------------------>8--------------------- + +or even worse if hash style is added: +------------------------>8--------------------- +%{!r:--build-id} --eh-frame-hdr--hash-style=sysv %{h*} ... +------------------------>8--------------------- + +Now if that spec is really used by LD then it fails inevitably +saying that it doesn't know option "--eh-frame-hdr--hash-style=sysv". + +2018-09-17 Alexey Brodkin <abrodkin at synopsys.com> + + * config/arc/linux.h (LINK_EH_SPEC): Add missing space. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk at 264361 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + gcc/config/arc/linux.h | 2 +- + 1 files changed, 1 insertions(+), 1 deletion(-) + +diff --git a/gcc/config/arc/linux.h b/gcc/config/arc/linux.h +index 96d548eae341..62ebe4de0fc7 100644 +--- a/gcc/config/arc/linux.h ++++ b/gcc/config/arc/linux.h +@@ -98,7 +98,7 @@ along with GCC; see the file COPYING3. If not see + Signalize that because we have fde-glibc, we don't need all C shared libs + linked against -lgcc_s. */ + #undef LINK_EH_SPEC +-#define LINK_EH_SPEC "--eh-frame-hdr" ++#define LINK_EH_SPEC "--eh-frame-hdr " + #endif + + #undef SUBTARGET_CPP_SPEC
Signature · 1 line
1.8.3.1
Re: [PATCH 10/10] gcc: Fix specs generation for ARC
Quoted 8 lines · Alexey Brodkin
GCC's built-in spec for LD is missing a space after "--eh-frame-hdr" thus with the next option merged together they are not understood by LD and so LD fails.
Back-port from upstream GCC, see:
https://github.com/gcc-mirror/gcc/commit/892142379c6b99fe8c3ebdfe0b79e2a435228c1d
Can you add this to
Upstream-Status tag in patch file itself
Quoted 77 lines
Signed-off-by Alexey Brodkin <[email protected]>--- meta/recipes-devtools/gcc/gcc-8.2.inc | 1 + .../gcc/gcc-8.2/0041-ARC-fix-spec-gen.patch | 40 ++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644
meta/recipes-devtools/gcc/gcc-8.2/0041-ARC-fix-spec-gen.patchmeta/recipes-devtools/gcc/gcc-8.2.inc +1
-0@@ -69,6 +69,7 @@ SRC_URI = "\ file://0038-fix-segmentation-fault-in-precompiled-header-generat.patch \ file://0039-Fix-for-testsuite-failure.patch \ file://0040-Re-introduce-spe-commandline-options.patch \ + file://0041-ARC-fix-spec-gen.patch \ ${BACKPORTS} \ "BACKPORTS = "\
meta/recipes-devtools/gcc/gcc-8.2/0041-ARC-fix-spec-gen.patch new file +23
-0@@ -0,0 +1,40 @@ +From 892142379c6b99fe8c3ebdfe0b79e2a435228c1d Mon Sep 17 00:00:00 2001 +From: claziss <claziss@138bc75d-0d04-0410-961f-82ee72b054a4> +Date: Mon, 17 Sep 2018 08:52:10 +0000 +Subject: [PATCH] [ARC] Update LINK_EH_SPEC linker spec. + +With no trailing space in LINK_EH_SPEC linker spec gets generated as: +------------------------>8--------------------- +%{!r:--build-id} --eh-frame-hdr%{h*} ... +------------------------>8--------------------- + +or even worse if hash style is added: +------------------------>8--------------------- +%{!r:--build-id} --eh-frame-hdr--hash-style=sysv %{h*} ... +------------------------>8--------------------- + +Now if that spec is really used by LD then it fails inevitably +saying that it doesn't know option "--eh-frame-hdr--hash-style=sysv". + +2018-09-17 Alexey Brodkin <[email protected]> + + * config/arc/linux.h (LINK_EH_SPEC): Add missing space. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264361138bc75d-0d04-0410-961f-82ee72b054a4
+--- + gcc/config/arc/linux.h | 2 +-+ 1 files changed, 1 insertions(+), 1 deletion(-)
meta/recipes-devtools/gcc/gcc-8.2/0041-ARC-fix-spec-gen.patch new file +7
-0+ +diff --git a/gcc/config/arc/linux.h b/gcc/config/arc/linux.h +index 96d548eae341..62ebe4de0fc7 100644 +--- a/gcc/config/arc/linux.h ++++ b/gcc/config/arc/linux.h +@@ -98,7 +98,7 @@ along with GCC; see the file COPYING3. If not see + Signalize that because we have fde-glibc, we don't need all C sharedlibs
meta/recipes-devtools/gcc/gcc-8.2/0041-ARC-fix-spec-gen.patch new file +7
-1+ linked against -lgcc_s. */ + #undef LINK_EH_SPEC +-#define LINK_EH_SPEC "--eh-frame-hdr" ++#define LINK_EH_SPEC "--eh-frame-hdr " + #endif + + #undef SUBTARGET_CPP_SPEC --1.8.3.1
✗ patchtest: failure for Introduce ARC port of OpenEmbedded
In reply to Alexey Brodkin== Series Details ==
Series: Introduce ARC port of OpenEmbedded
Revision: 1
URL : https://patchwork.openembedded.org/series/14104/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:
* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at 6a1e550838)
* Issue A patch file has been added, but does not have a Signed-off-by tag [test_signed_off_by_presence]
Suggested fix Sign off the added patch file (meta/recipes-devtools/gcc/gcc-8.2/0041-ARC-fix-spec-gen.patch)
* Issue Added patch file is missing Upstream-Status in the header [test_upstream_status_presence_format]
Suggested fix Add Upstream-Status: <Valid status> to the header of meta/recipes-support/nspr/nspr/0004-Add-ARC-support.patch Standard format Upstream-Status: <Valid status> Valid status Pending, Accepted, Backport, Denied, Inappropriate [reason], Submitted [where]
If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
Quoted 3 lines · Alexey Brodkin
DesignWare ARC Processors are a family of 32-bit CPUs from Synopsys. This series introduces basic support for ARC architecture in OpenEmbedded.
Thanks for the contributions
Quoted 4 lines
As of today latest upstream GCC and Binutils are perfectly usable for building packages for ARC so we just need a couple of fixes.
These fixes look primarily ok you might have to
Address the little tweaks I asked
Quoted 7 lines
Glibc for ARC is under review and we're working hard to get it accepted in the next upstream release. For now we'll use latest code-base back-ported on top of 2.28 release via meta-synopsys.
Its fine once it’s upstreamed we can then get the support into core via
normal recipe updates
More platform and architecture specific bits could be found in
Quoted 61 lines
meta-synopsys layer here (please refer to the "master" branch):
https://github.com/foss-for-synopsys-dwc-arc-processors/meta-synopsysAlexey Brodkin (8):
siteinfo: Define data for ARC
site: Add ARC linux
kernel-arch.bbclass: Add ARC to kernel arch map
openssl: Add support for ARC
icu: Add ARC support
gcc: Disable libitm for ARC
binutils: Fix Glibc building for ARC
gcc: Fix specs generation for ARCAntoine Tenart (1):
nspr: Add ARC supportMylene Josserand (1):
libgpg-error: Add ARC supportmeta/classes/kernel-arch.bbclass | 1 + meta/classes/siteinfo.bbclass | 2 + .../openssl/openssl10_1.0.2p.bb | 2 +- .../openssl/openssl_1.1.1-pre9.bb | 2 +- meta/recipes-devtools/binutils/binutils-2.31.inc | 4 + ...location-where-GOT-information-is-collect.patch | 198 +++++++++++++++++++++ ...bustness.-Return-FALSE-in-case-of-NULL-po.patch | 35 ++++ ...lobal-symbol-is-not-an-indirect-or-warnin.patch | 43 +++++ ...tion-was-still-being-generated-when-symbo.patch | 37 ++++ meta/recipes-devtools/gcc/gcc-8.2.inc | 1 + .../gcc/gcc-8.2/0041-ARC-fix-spec-gen.patch | 40 +++++ meta/recipes-devtools/gcc/gcc-runtime.inc | 1 + .../icu/icu/0002-Add-ARC-support.patch | 25 +++ meta/recipes-support/icu/icu_62.1.bb | 1 + .../0001-syscfg-Add-an-arc-architecture.patch | 75 ++++++++ .../libgpg-error/libgpg-error_1.32.bb | 1 + .../nspr/nspr/0004-Add-ARC-support.patch | 86 +++++++++ meta/recipes-support/nspr/nspr_4.19.bb | 1 + meta/site/arc-linux | 11 ++ 19 files changed, 564 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-devtools/binutils/binutils/0018-Refactored-location-where-GOT-information-is-collect.patch create mode 100644 meta/recipes-devtools/binutils/binutils/0019-Improved-robustness.-Return-FALSE-in-case-of-NULL-po.patch create mode 100644 meta/recipes-devtools/binutils/binutils/0020-Make-sure-global-symbol-is-not-an-indirect-or-warnin.patch create mode 100644 meta/recipes-devtools/binutils/binutils/0021-PLT-information-was-still-being-generated-when-symbo.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.2/0041-ARC-fix-spec-gen.patch create mode 100644 meta/recipes-support/icu/icu/0002-Add-ARC-support.patch create mode 100644 meta/recipes-support/libgpg-error/libgpg-error/0001-syscfg-Add-an-arc-architecture.patch create mode 100644 meta/recipes-support/nspr/nspr/0004-Add-ARC-support.patch create mode 100644 meta/site/arc-linux--
1.8.3.1