diff options
Diffstat (limited to 'arm-linux-gnueabi-toolchain/arm-linux-gnueabi-glibc')
-rw-r--r-- | arm-linux-gnueabi-toolchain/arm-linux-gnueabi-glibc/arm-linux-gnueabi-glibc.spec | 44 | ||||
-rw-r--r-- | arm-linux-gnueabi-toolchain/arm-linux-gnueabi-glibc/glibc-aarch64-dl-machine.patch | 81 |
2 files changed, 13 insertions, 112 deletions
diff --git a/arm-linux-gnueabi-toolchain/arm-linux-gnueabi-glibc/arm-linux-gnueabi-glibc.spec b/arm-linux-gnueabi-toolchain/arm-linux-gnueabi-glibc/arm-linux-gnueabi-glibc.spec index 0a5f9f1..8f92186 100644 --- a/arm-linux-gnueabi-toolchain/arm-linux-gnueabi-glibc/arm-linux-gnueabi-glibc.spec +++ b/arm-linux-gnueabi-toolchain/arm-linux-gnueabi-glibc/arm-linux-gnueabi-glibc.spec @@ -47,18 +47,15 @@ %endif Name: %{cross_triplet}-glibc%{pkg_suffix} -Version: 2.26 -Release: 6%{?dist} +Version: 2.27 +Release: 1%{?dist} Summary: The GNU C Library (%{cross_triplet}) -Group: Development/Libraries License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+ URL: https://www.gnu.org/software/libc Source0: https://ftp.gnu.org/gnu/glibc/glibc-%{version}.tar.xz -# https://sourceware.org/git/?p=glibc.git;a=commit;h=a68ba2f -Patch0: glibc-aarch64-dl-machine.patch - +BuildRequires: bison BuildRequires: %{cross_triplet}-filesystem BuildRequires: %{cross_triplet}-gcc-stage1 BuildRequires: %{cross_triplet}-kernel-headers @@ -89,6 +86,8 @@ export CXX=%{_bindir}/%{cross_triplet}-g++ export AR=%{_bindir}/%{cross_triplet}-ar export RANLIB=%{_bindir}/%{cross_triplet}-ranlib %global _configure ../glibc-%{version}/configure +%global _hardening_ldflags \\\ + %(echo "%{_hardening_ldflags}" | sed -e 's/-specs=[^ ]*//g') %global __global_ldflags \\\ %(echo "%{__global_ldflags}" | \\\ sed -e 's/-specs=[^ ]*//g' -e 's/-Wl,-z,defs *//g') @@ -96,7 +95,7 @@ export RANLIB=%{_bindir}/%{cross_triplet}-ranlib %(echo "%{optflags}" | \\\ sed -e 's/-m[^ ]*//g' -e 's/-specs=[^ ]*//g' -e 's/-Werror=[^ ]*//g' \\\ -e 's/-Wp,[^ ]*//g' -e 's/-fasynchronous-unwind-tables *//g' \\\ - -e 's/-fstack-clash-protection *//g') + -e 's/-fstack-clash-protection *//g' -e 's/-fcf-protection *//g') # Use /usr directly because it is the path in cross_sysroot %configure \ --libdir=/usr/%{lib_dir_name} \ @@ -166,29 +165,7 @@ chmod +x %{__ar_no_strip} %files %license COPYING COPYING.LIB LICENSES -%doc BUGS CONFORMANCE -%doc ChangeLog -%doc ChangeLog.1 ChangeLog.2 ChangeLog.3 ChangeLog.4 ChangeLog.5 -%doc ChangeLog.6 ChangeLog.7 ChangeLog.8 ChangeLog.9 ChangeLog.10 -%doc ChangeLog.11 ChangeLog.12 ChangeLog.13 ChangeLog.14 ChangeLog.15 -%doc ChangeLog.16 ChangeLog.17 -%doc ChangeLog.old-ports -%doc ChangeLog.old-ports-aarch64 -%doc ChangeLog.old-ports-aix -%doc ChangeLog.old-ports-alpha -%doc ChangeLog.old-ports-am33 -%doc ChangeLog.old-ports-arm -%doc ChangeLog.old-ports-cris -%doc ChangeLog.old-ports-hppa -%doc ChangeLog.old-ports-ia64 -%doc ChangeLog.old-ports-linux-generic -%doc ChangeLog.old-ports-m68k -%doc ChangeLog.old-ports-microblaze -%doc ChangeLog.old-ports-mips -%doc ChangeLog.old-ports-powerpc -%doc ChangeLog.old-ports-tile -%doc NAMESPACE NEWS README -%doc README.pretty-printers README.tunables WUR-REPORT +%doc ChangeLog MAINTAINERS NEWS README %{cross_sysroot}/usr/include/_G_config.h %{cross_sysroot}/usr/include/a.out.h %{cross_sysroot}/usr/include/aio.h @@ -540,7 +517,6 @@ chmod +x %{__ar_no_strip} %{cross_sysroot}/usr/%{lib_dir_name}/libdl.a %{cross_sysroot}/usr/%{lib_dir_name}/libdl.so %{cross_sysroot}/usr/%{lib_dir_name}/libg.a -%{cross_sysroot}/usr/%{lib_dir_name}/libieee.a %{cross_sysroot}/usr/%{lib_dir_name}/libm.a %{cross_sysroot}/usr/%{lib_dir_name}/libm.so %{cross_sysroot}/usr/%{lib_dir_name}/libmcheck.a @@ -591,6 +567,12 @@ chmod +x %{__ar_no_strip} %changelog +* Mon Feb 26 2018 Ting-Wei Lan <lantw44@gmail.com> - 2.27-1 +- Update to 2.27 +- Remove -fcf-protection from compiler flags because it needs -m options +- Remove -specs from _hardening_ldflags because it is now used directly +- Remove group tag because it is deprecated in Fedora + * Sun Jan 28 2018 Ting-Wei Lan <lantw44@gmail.com> - 2.26-6 - Remove the unsupported -fstack-clash-protection compiler flag - Remove the -Wl,-z,defs linker flag to avoid linking failure diff --git a/arm-linux-gnueabi-toolchain/arm-linux-gnueabi-glibc/glibc-aarch64-dl-machine.patch b/arm-linux-gnueabi-toolchain/arm-linux-gnueabi-glibc/glibc-aarch64-dl-machine.patch deleted file mode 100644 index 2a336a1..0000000 --- a/arm-linux-gnueabi-toolchain/arm-linux-gnueabi-glibc/glibc-aarch64-dl-machine.patch +++ /dev/null @@ -1,81 +0,0 @@ -From a68ba2f3cd3cbe32c1f31e13c20ed13487727b32 Mon Sep 17 00:00:00 2001 -From: Szabolcs Nagy <szabolcs.nagy@arm.com> -Date: Wed, 18 Oct 2017 17:26:23 +0100 -Subject: [PATCH] [AARCH64] Rewrite elf_machine_load_address using _DYNAMIC - symbol - -This patch rewrites aarch64 elf_machine_load_address to use special _DYNAMIC -symbol instead of _dl_start. - -The static address of _DYNAMIC symbol is stored in the first GOT entry. -Here is the change which makes this solution work (part of binutils 2.24): -https://sourceware.org/ml/binutils/2013-06/msg00248.html - -i386, x86_64 targets use the same method to do this as well. - -The original implementation relies on a trick that R_AARCH64_ABS32 relocation -being resolved at link time and the static address fits in the 32bits. -However, in LP64, normally, the address is defined to be 64 bit. - -Here is the C version one which should be portable in all cases. - - * sysdeps/aarch64/dl-machine.h (elf_machine_load_address): Use - _DYNAMIC symbol to calculate load address. ---- - ChangeLog | 5 +++++ - sysdeps/aarch64/dl-machine.h | 39 +++++---------------------------------- - 2 files changed, 10 insertions(+), 34 deletions(-) - -diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h -index b124547..e765612 100644 ---- a/sysdeps/aarch64/dl-machine.h -+++ b/sysdeps/aarch64/dl-machine.h -@@ -51,40 +51,11 @@ elf_machine_load_address (void) - /* To figure out the load address we use the definition that for any symbol: - dynamic_addr(symbol) = static_addr(symbol) + load_addr - -- The choice of symbol is arbitrary. The static address we obtain -- by constructing a non GOT reference to the symbol, the dynamic -- address of the symbol we compute using adrp/add to compute the -- symbol's address relative to the PC. -- This depends on 32/16bit relocations being resolved at link time -- and that the static address fits in the 32/16 bits. */ -- -- ElfW(Addr) static_addr; -- ElfW(Addr) dynamic_addr; -- -- asm (" \n" --" adrp %1, _dl_start; \n" --#ifdef __LP64__ --" add %1, %1, #:lo12:_dl_start \n" --#else --" add %w1, %w1, #:lo12:_dl_start \n" --#endif --" ldr %w0, 1f \n" --" b 2f \n" --"1: \n" --#ifdef __LP64__ --" .word _dl_start \n" --#else --# ifdef __AARCH64EB__ --" .short 0 \n" --# endif --" .short _dl_start \n" --# ifndef __AARCH64EB__ --" .short 0 \n" --# endif --#endif --"2: \n" -- : "=r" (static_addr), "=r" (dynamic_addr)); -- return dynamic_addr - static_addr; -+ _DYNAMIC sysmbol is used here as its link-time address stored in -+ the special unrelocated first GOT entry. */ -+ -+ extern ElfW(Dyn) _DYNAMIC[] attribute_hidden; -+ return (ElfW(Addr)) &_DYNAMIC - elf_machine_dynamic (); - } - - /* Set up the loaded object described by L so its unrelocated PLT --- -2.9.3 - |