From 84d34071af098889f54656c76671caa7e66777eb Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Thu, 8 Jan 2015 18:51:32 +0530 Subject: [PATCH] Define a __tls_get_addr macro to avoid a conflicting declaration --- glibc-s390-tls-get-addr.patch | 18 ++++++++++++++++++ glibc.spec | 8 +++++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 glibc-s390-tls-get-addr.patch diff --git a/glibc-s390-tls-get-addr.patch b/glibc-s390-tls-get-addr.patch new file mode 100644 index 0000000..ea6a157 --- /dev/null +++ b/glibc-s390-tls-get-addr.patch @@ -0,0 +1,18 @@ +diff --git a/sysdeps/s390/dl-tls.h b/sysdeps/s390/dl-tls.h +index 0fa8045..8132b10 100644 +--- a/sysdeps/s390/dl-tls.h ++++ b/sysdeps/s390/dl-tls.h +@@ -33,6 +33,13 @@ extern unsigned long __tls_get_offset (unsigned long got_offset); + + # include + ++/* dl-tls.c declares __tls_get_addr as an exported symbol if it is not defined ++ as a macro. It seems suitable to do that in the generic code because all ++ architectures other than s390 export __tls_get_addr. The declaration causes ++ problems in s390 though, so we define __tls_get_addr here to avoid declaring ++ __tls_get_addr again. */ ++# define __tls_get_addr __tls_get_addr ++ + extern void *__tls_get_addr (tls_index *ti) attribute_hidden; + /* Make a temporary alias of __tls_get_addr to remove the hidden + attribute. Then export __tls_get_addr as __tls_get_addr_internal diff --git a/glibc.spec b/glibc.spec index e98c381..c3b361a 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,6 +1,6 @@ %define glibcsrcdir glibc-2.20-480-g46abb64 %define glibcversion 2.20.90 -%define glibcrelease 16%{?dist} +%define glibcrelease 17%{?dist} # Pre-release tarballs are pulled in from git using a command that is # effectively: # @@ -236,6 +236,8 @@ Patch2031: %{name}-rh1070416.patch Patch2033: %{name}-aarch64-tls-fixes.patch Patch2034: %{name}-aarch64-workaround-nzcv-clobber-in-tlsdesc.patch +Patch2035: glibc-s390-tls-get-addr.patch + ############################################################################## # End of glibc patches. ############################################################################## @@ -568,6 +570,7 @@ package or when debugging this package. %patch0050 -p1 %patch0052 -p1 %patch0053 -p1 +%patch2035 -p1 ############################################################################## # %%prep - Additional prep required... @@ -1742,6 +1745,9 @@ rm -f *.filelist* %endif %changelog +* Thu Jan 08 2015 Siddhesh Poyarekar - 2.20.90-17 +- Define a __tls_get_addr macro to avoid a conflicting declaration. + * Wed Jan 07 2015 Siddhesh Poyarekar - 2.20.90-16 - Disable -Werror for s390 as well.