Define a __tls_get_addr macro to avoid a conflicting declaration

This commit is contained in:
Siddhesh Poyarekar 2015-01-08 18:51:32 +05:30
parent 80f41525f9
commit 84d34071af
2 changed files with 25 additions and 1 deletions

View File

@ -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 <shlib-compat.h>
+/* 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

View File

@ -1,6 +1,6 @@
%define glibcsrcdir glibc-2.20-480-g46abb64 %define glibcsrcdir glibc-2.20-480-g46abb64
%define glibcversion 2.20.90 %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 # Pre-release tarballs are pulled in from git using a command that is
# effectively: # effectively:
# #
@ -236,6 +236,8 @@ Patch2031: %{name}-rh1070416.patch
Patch2033: %{name}-aarch64-tls-fixes.patch Patch2033: %{name}-aarch64-tls-fixes.patch
Patch2034: %{name}-aarch64-workaround-nzcv-clobber-in-tlsdesc.patch Patch2034: %{name}-aarch64-workaround-nzcv-clobber-in-tlsdesc.patch
Patch2035: glibc-s390-tls-get-addr.patch
############################################################################## ##############################################################################
# End of glibc patches. # End of glibc patches.
############################################################################## ##############################################################################
@ -568,6 +570,7 @@ package or when debugging this package.
%patch0050 -p1 %patch0050 -p1
%patch0052 -p1 %patch0052 -p1
%patch0053 -p1 %patch0053 -p1
%patch2035 -p1
############################################################################## ##############################################################################
# %%prep - Additional prep required... # %%prep - Additional prep required...
@ -1742,6 +1745,9 @@ rm -f *.filelist*
%endif %endif
%changelog %changelog
* Thu Jan 08 2015 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.20.90-17
- Define a __tls_get_addr macro to avoid a conflicting declaration.
* Wed Jan 07 2015 Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com> - 2.20.90-16 * Wed Jan 07 2015 Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com> - 2.20.90-16
- Disable -Werror for s390 as well. - Disable -Werror for s390 as well.