toolchain: Bump ARC tools to arc-2016.09-eng007 and PIE fix
PATCH v2 1/1 toolchain: Bump ARC tools to arc-2016.09-eng007 and PIE fix
As described at:4520524ba055706236db9f00dd79f1b2e2e87fde
this commit continues a series of updates of ARC tools. This time we're updating tools to arc-2016.09-eng007 tag plus a couple of fixes on top of it that will all make its way in the next engineering build.
We hope this patch will cure most buildroot ARC failures as it contains important fixes:
1) PIE fix. We have added PIE support to ARC toolchain at last. So that should prevent breakage of many packages. As ARC now supports PIE we remove ARC from BR2_TOOLCHAIN_SUPPORTS_PIE exclusion in toolchain/Config.in file.
2) Assembler fix. This patch also have changes that fixes frequent assembler failures, e.g.:
http://autobuild.buildroot.net/results/543/5430b902d900943a34c1888e7e410bd5df367bc2//
Note that we added patch for uClibc-ng that also affects PIE feature. We had to do that because in Buildroot for ARC uclibc comes right from uClibc-ng release tarballs and the change hasn't been in any release of uClibc-ng. If we don't add this patch we see a lot of link-time issues. This patch is stopgap measure. We are going to upstream this change to uClibc-ng and remove from buildroot as soon as it would be included in some uClibc-ng release.
We still keep GDB as it is of arc-2016.03 release because there're some issues we'd like to resolve before releasing it to wider audience.
So again note this is next engineering builds of arc-2016.09 series and it might have all kinds of breakages, please don't use it for production builds.
---
package/binutils/Config.in.host | 2 +-
.../0300-ld-makefile.patch | 0
.../0301-check-ldrunpath-length.patch | 0
.../0500-add-sysroot-fix-from-bug-3049.patch | 0
.../0600-poison-system-directories.patch | 0
.../0700-PIE-fixes-in-for-ARC-bfd.patch | 289 +++++++++++++++++++++
.../0701-Fixed-init-fini-linker-options.patch | 43 +++
...x-undefined-symbols-aborting-on-PIE-cases.patch | 30 +++
.../0800-Fixed-issue-in-tvheadend-package.patch | 26 ++
package/binutils/binutils.hash | 2 +-
package/binutils/binutils.mk | 2 +-
package/gcc/Config.in.host | 2 +-
.../130-fix_build_with_gcc-6.patch | 0
.../130-pr43538.patch | 0
.../301-missing-execinfo_h.patch | 0
.../305-libmudflap-susv3-legacy.patch | 0
.../842-PR60155.patch | 0
.../850-libstdcxx-uclibc-c99.patch | 0
.../851-PR-other-56780.patch | 0
.../930-libgcc-disable-split-stack-nothreads.patch | 0
package/gcc/gcc.hash | 2 +-
package/uclibc/0003-Fix-to-PIE.patch | 38 +++
toolchain/Config.in | 2 +-
23 files changed, 432 insertions(+), 6 deletions(-)
rename package/binutils/{arc-2016.09-eng006 => arc-2016.09-eng007}/0300-ld-makefile.patch (100%)
rename package/binutils/{arc-2016.09-eng006 => arc-2016.09-eng007}/0301-check-ldrunpath-length.patch (100%)
rename package/binutils/{arc-2016.09-eng006 => arc-2016.09-eng007}/0500-add-sysroot-fix-from-bug-3049.patch (100%)
rename package/binutils/{arc-2016.09-eng006 => arc-2016.09-eng007}/0600-poison-system-directories.patch (100%)
create mode 100644 package/binutils/arc-2016.09-eng007/0700-PIE-fixes-in-for-ARC-bfd.patch
create mode 100644 package/binutils/arc-2016.09-eng007/0701-Fixed-init-fini-linker-options.patch
create mode 100644 package/binutils/arc-2016.09-eng007/0702-Fix-undefined-symbols-aborting-on-PIE-cases.patch
create mode 100644 package/binutils/arc-2016.09-eng007/0800-Fixed-issue-in-tvheadend-package.patch
rename package/gcc/{arc-2016.09-eng006 => arc-2016.09-eng007}/130-fix_build_with_gcc-6.patch (100%)
rename package/gcc/{arc-2016.09-eng006 => arc-2016.09-eng007}/130-pr43538.patch (100%)
rename package/gcc/{arc-2016.09-eng006 => arc-2016.09-eng007}/301-missing-execinfo_h.patch (100%)
rename package/gcc/{arc-2016.09-eng006 => arc-2016.09-eng007}/305-libmudflap-susv3-legacy.patch (100%)
rename package/gcc/{arc-2016.09-eng006 => arc-2016.09-eng007}/842-PR60155.patch (100%)
rename package/gcc/{arc-2016.09-eng006 => arc-2016.09-eng007}/850-libstdcxx-uclibc-c99.patch (100%)
rename package/gcc/{arc-2016.09-eng006 => arc-2016.09-eng007}/851-PR-other-56780.patch (100%)
rename package/gcc/{arc-2016.09-eng006 => arc-2016.09-eng007}/930-libgcc-disable-split-stack-nothreads.patch (100%)
create mode 100644 package/uclibc/0003-Fix-to-PIE.patchpackage/binutils/Config.in.host +1 -1
@@ -28,7 +28,7 @@ endchoice config BR2_BINUTILS_VERSION string - default "arc-2016.09-eng006" if BR2_arc + default "arc-2016.09-eng007" if BR2_arc default "2.24" if BR2_BINUTILS_VERSION_2_24_X default "2.25.1" if BR2_BINUTILS_VERSION_2_25_X default "2.26.1" if BR2_BINUTILS_VERSION_2_26_X
package/binutils/arc-2016.09-eng007/0300-ld-makefile.patch renamed from package/binutils/arc-2016.09-eng006/0300-ld-makefile.patch +0 -0
package/binutils/arc-2016.09-eng007/0301-check-ldrunpath-length.patch renamed from package/binutils/arc-2016.09-eng006/0301-check-ldrunpath-length.patch +0 -0
package/binutils/arc-2016.09-eng007/0500-add-sysroot-fix-from-bug-3049.patch renamed from package/binutils/arc-2016.09-eng006/0500-add-sysroot-fix-from-bug-3049.patch +0 -0
package/binutils/arc-2016.09-eng007/0600-poison-system-directories.patch renamed from package/binutils/arc-2016.09-eng006/0600-poison-system-directories.patch +0 -0
package/binutils/arc-2016.09-eng007/0700-PIE-fixes-in-for-ARC-bfd.patch new file +289 -0
289 lines not on this page · raw message
package/binutils/arc-2016.09-eng007/0701-Fixed-init-fini-linker-options.patch new file +43 -0
43 lines not on this page · raw message
package/binutils/arc-2016.09-eng007/0702-Fix-undefined-symbols-aborting-on-PIE-cases.patch new file +30 -0
@@ -0,0 +1,30 @@ +From 5bc929f1609ddcc1180d9f004dd0064fa1f351ca Mon Sep 17 00:00:00 2001 +From: Cupertino Miranda <[email protected]> +Date: Fri, 22 Jul 2016 13:53:35 +0200 +Subject: [PATCH 702/703] Fix undefined symbols aborting on PIE cases. + +In the context of STAR 9000925001. +Extended check instruction to validate for this case. + +Signed-off-by: Cupertino Miranda <[email protected]> +Signed-off-by: Vlad Zakharov <[email protected]> +--- + bfd/elf32-arc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c +index a0533f2..f4e1521 100644 +--- a/bfd/elf32-arc.c ++++ b/bfd/elf32-arc.c +@@ -1359,7 +1359,7 @@ elf_arc_relocate_section (bfd * output_bfd, + + reloc_data.should_relocate = TRUE; + } +- else if (!bfd_link_pic (info)) ++ else if (!bfd_link_pic (info) || bfd_link_executable (info)) + (*info->callbacks->undefined_symbol) + (info, h->root.root.string, input_bfd, input_section, + rel->r_offset, TRUE); +-- +2.5.5 +
package/binutils/arc-2016.09-eng007/0800-Fixed-issue-in-tvheadend-package.patch new file +26 -0
@@ -0,0 +1,26 @@ +From d10d05e66fd2f8431a08ceaf8b655bc47ce13a21 Mon Sep 17 00:00:00 2001 +From: Cupertino Miranda <[email protected]> +Date: Tue, 26 Jul 2016 17:34:05 +0200 +Subject: [PATCH 703/703] Fixed issue in tvheadend package. + +Signed-off-by: Cupertino Miranda <[email protected]> +Signed-off-by: Vlad Zakharov <[email protected]> +--- + bfd/elf32-arc.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c +index f4e1521..857b7b6 100644 +--- a/bfd/elf32-arc.c ++++ b/bfd/elf32-arc.c +@@ -1747,7 +1747,6 @@ elf_arc_check_relocs (bfd * abfd, + if ((bfd_link_pic (info)) + && ((r_type != R_ARC_PC32 && r_type != R_ARC_32_PCREL) + || (h != NULL +- && h->dynindx != -1 + && (!info->symbolic || !h->def_regular)))) + { + if (sreloc == NULL) +-- +2.5.5 +
package/binutils/binutils.hash +1 -1
@@ -4,4 +4,4 @@ sha512 0b36dda0e6d32cd25613c0e64b56b28312515c54d6a159efd3db9a86717f114ab0a0a1f6 sha512 9d9165609fd3b0f20d616f9891fc8e2b466eb13e2bfce40125e12427f8f201d20e2b8322bb6cb2b45e8df812f0e8ac059149f8a1f69ba3ed9d86a35c6a540b67 binutils-2.26.1.tar.bz2 # Locally calculated (fetched from Github) -sha512 2609afaad4c37469ee3661f12140d7b0c856cd8050a0d29ec28c92416377bc0742ff680fcffba753ac38a2692c77ac8bf2ec1373a94dde3782d9b077b939c8fa binutils-arc-2016.09-eng006.tar.gz +sha512 5ab5d45671ad57eff8f8688260c425ca5b10440b89fd54387a68e7834abee190c540bd2d19292d119f2add6fdf5d39d378315f97384ae26e74d9917b1e163291 binutils-arc-2016.09-eng007.tar.gz
package/binutils/binutils.mk +1 -1
@@ -9,7 +9,7 @@ BINUTILS_VERSION = $(call qstrip,$(BR2_BINUTILS_VERSION)) ifeq ($(BINUTILS_VERSION),) ifeq ($(BR2_arc),y) -BINUTILS_VERSION = arc-2016.09-eng006 +BINUTILS_VERSION = arc-2016.09-eng007 else BINUTILS_VERSION = 2.25.1 endif
package/gcc/Config.in.host +1 -1
@@ -107,7 +107,7 @@ config BR2_GCC_VERSION default "4.9.3" if BR2_GCC_VERSION_4_9_X default "5.4.0" if BR2_GCC_VERSION_5_X default "6.1.0" if BR2_GCC_VERSION_6_X - default "arc-2016.09-eng006" if BR2_GCC_VERSION_4_8_ARC + default "arc-2016.09-eng007" if BR2_GCC_VERSION_4_8_ARC config BR2_EXTRA_GCC_CONFIG_OPTIONS string "Additional gcc options"
package/gcc/arc-2016.09-eng007/130-fix_build_with_gcc-6.patch renamed from package/gcc/arc-2016.09-eng006/130-fix_build_with_gcc-6.patch +0 -0
package/gcc/arc-2016.09-eng007/130-pr43538.patch renamed from package/gcc/arc-2016.09-eng006/130-pr43538.patch +0 -0
package/gcc/arc-2016.09-eng007/301-missing-execinfo_h.patch renamed from package/gcc/arc-2016.09-eng006/301-missing-execinfo_h.patch +0 -0
package/gcc/arc-2016.09-eng007/305-libmudflap-susv3-legacy.patch renamed from package/gcc/arc-2016.09-eng006/305-libmudflap-susv3-legacy.patch +0 -0
package/gcc/arc-2016.09-eng007/842-PR60155.patch renamed from package/gcc/arc-2016.09-eng006/842-PR60155.patch +0 -0
package/gcc/arc-2016.09-eng007/850-libstdcxx-uclibc-c99.patch renamed from package/gcc/arc-2016.09-eng006/850-libstdcxx-uclibc-c99.patch +0 -0
package/gcc/arc-2016.09-eng007/851-PR-other-56780.patch renamed from package/gcc/arc-2016.09-eng006/851-PR-other-56780.patch +0 -0
package/gcc/arc-2016.09-eng007/930-libgcc-disable-split-stack-nothreads.patch renamed from package/gcc/arc-2016.09-eng006/930-libgcc-disable-split-stack-nothreads.patch +0 -0
package/gcc/gcc.hash +1 -1
@@ -12,4 +12,4 @@ sha512 2941cc950c8f2409a314df497631f9b0266211aa74746c1839c46e04f1c7c299afe2528d sha512 eeed3e2018b8c012aabce419e8d718fde701e5c3c179b4486c61ba46e5736eecc8fccdd18b01fcd973a42c6ad3116dbbe2ee247fe3757d622d373f93ebaf8d2e gcc-6.1.0.tar.bz2 # Locally calculated (fetched from Github) -sha512 40e4c5d8dc4086c1d5edea94fa4efc5726b1dd6d0b7c14f28d75a2538d434e908f7561bfae28e239c87bde52775464fd86a8b08fde4204bc374312c37e681db1 gcc-arc-2016.09-eng006.tar.gz +sha512 f798e450ae3095538c5b12c785eab00f8f4084d3ff3e5e2dfd05ed20e0a20d4e754d87359482962d85c9082cb9fcbbf100d9eab6dfd2dbdccbecdcbf680ff23a gcc-arc-2016.09-eng007.tar.gz
package/uclibc/0003-Fix-to-PIE.patch new file +38 -0
@@ -0,0 +1,38 @@ +From 7d673f05311266f42f16f654794f9817b3286649 Mon Sep 17 00:00:00 2001 +From: Cupertino Miranda <[email protected]> +Date: Tue, 19 Jul 2016 14:27:49 +0200 +Subject: [PATCH] Fix to PIE. + +crt1.S needed to use a got relative reference. +Libraries like pthreads define a _init and unless it is GOT, the +linker will fail because it will try to create a dynamic reloc on +.text section, more precisely on __start. + +Signed-off-by: Cupertino Miranda <[email protected]> +Signed-off-by: Vlad Zakharov <[email protected]> +--- + libc/sysdeps/linux/arc/crt1.S | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/libc/sysdeps/linux/arc/crt1.S b/libc/sysdeps/linux/arc/crt1.S +index 178c5b4..f895e18 100644 +--- a/libc/sysdeps/linux/arc/crt1.S ++++ b/libc/sysdeps/linux/arc/crt1.S +@@ -41,10 +41,11 @@ __start: + + mov_s r5, r0 ; rltd_fini + add_s r2, sp, 4 ; argv ++ + #ifdef L_Scrt1 +- add r0, pcl, @main at pcl +- add r3, pcl, @_init at pcl +- add r4, pcl, @_fini at pcl ++ ld r0, [pcl, @main at gotpc] ++ ld r3, [pcl, @_init at gotpc] ++ ld r4, [pcl, @_fini at gotpc] + #else + mov_s r0, main + mov_s r3, _init +-- +2.5.5 +
toolchain/Config.in +1 -1
@@ -19,7 +19,7 @@ config BR2_TOOLCHAIN_USES_GLIBC config BR2_TOOLCHAIN_USES_UCLIBC bool - select BR2_TOOLCHAIN_SUPPORTS_PIE if !BR2_arc && !BR2_m68k && !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_SUPPORTS_PIE if !BR2_m68k && !BR2_STATIC_LIBS config BR2_TOOLCHAIN_USES_MUSL bool
Signature · 1 line
2.5.5
PATCH v2 1/1 toolchain: Bump ARC tools to arc-2016.09-eng007 and PIE fix
Hello,
Quoted 19 lines · Vlad Zakharov
As described at:
4520524ba055706236db9f00dd79f1b2e2e87fde
this commit continues a series of updates of ARC tools. This time we're updating tools to arc-2016.09-eng007 tag plus a couple of fixes on top of it that will all make its way in the next engineering build.We hope this patch will cure most buildroot ARC failures as it contains important fixes:
1) PIE fix. We have added PIE support to ARC toolchain at last. So that should prevent breakage of many packages. As ARC now supports PIE we remove ARC from
BR2_TOOLCHAIN_SUPPORTS_PIEexclusion in toolchain/Config.in file.2) Assembler fix. This patch also have changes that fixes frequent assembler failures, e.g.:
http://autobuild.buildroot.net/results/543/5430b902d900943a34c1888e7e410bd5df367bc2//
Quoted 7 lines
Note that we added patch for uClibc-ng that also affects PIE feature. We had to do that because in Buildroot for ARC uclibc comes right from uClibc-ng release tarballs and the change hasn't been in any release of uClibc-ng. If we don't add this patch we see a lot of link-time issues. This patch is stopgap measure. We are going to upstream this change to uClibc-ng and remove from buildroot as soon as it would be included in some uClibc-ng release.
In fact, a new release of uClibc-ng has been made, and Buildroot was updated accordingly. This new uClibc-ng release contains the ARC PIE fix, so I've dropped this part from your patch, and adjusted the commit log.
Other than that, I've applied the rest of your patch. Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/1 toolchain: Bump ARC tools to arc-2016.09-eng007 and PIE fix
Hi Thomas,
Quoted 31 lines · Thomas Petazzoni
Hello,
Quoted 20 lines · Vlad Zakharov
As described at:
4520524ba055706236db9f00dd79f1b2e2e87fde
this commit continues a series of updates of ARC tools. This time we're updating tools to arc-2016.09-eng007 tag plus a couple of fixes on top of it that will all make its way in the next engineering build.We hope this patch will cure most buildroot ARC failures as it contains important fixes:
1) PIE fix. We have added PIE support to ARC toolchain at last. So that should prevent breakage of many packages. As ARC now supports PIE we remove ARC from
BR2_TOOLCHAIN_SUPPORTS_PIEexclusion in toolchain/Config.in file.2) Assembler fix. This patch also have changes that fixes frequent assembler failures, e.g.:
http://autobuild.buildroot.net/results/543/5430b902d900943a34c1888e7e410bd5df367bc2//Quoted 7 lines
Note that we added patch for uClibc-ng that also affects PIE feature. We had to do that because in Buildroot for ARC uclibc comes right from uClibc-ng release tarballs and the change hasn't been in any release of uClibc-ng. If we don't add this patch we see a lot of link-time issues. This patch is stopgap measure. We are going to upstream this change to uClibc-ng and remove from buildroot as soon as it would be included in some uClibc-ng release.
Quoted 6 lines
In fact, a new release of uClibc-ng has been made, and Buildroot was updated accordingly. This new uClibc-ng release contains the ARC PIE fix, so I've dropped this part from your patch, and adjusted the commit log.
Other than that, I've applied the rest of your patch. Thanks a lot!
Thanks for doing that.
Care to rebuild pre-built BR tools for ARC?
-Alexey
PATCH v2 1/1 toolchain: Bump ARC tools to arc-2016.09-eng007 and PIE fix
Hello,
Quoted 2 lines · Alexey Brodkin
Thanks for doing that.
Care to rebuild pre-built BR tools for ARC?
-rc1 is going to be released in a few days, and my plan is to wait for -rc1 to rebuild all the toolchains.
Would this be OK?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/1 toolchain: Bump ARC tools to arc-2016.09-eng007 and PIE fix
Hi Thomas,
Quoted 11 lines · Thomas Petazzoni
Hello,
Quoted 3 lines · Alexey Brodkin
Thanks for doing that.
Care to rebuild pre-built BR tools for ARC?(quoted diff) +0
-2-rc1 is going to be released in a few days, and my plan is to wait for -rc1 to rebuild all the toolchains.
Quoted 1 line
Would this be OK?
Sounds like a good plan!
-Alexey