From 7ba0787710cf31d91dcdf3e43a19ca7af802b72f Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Tue, 16 Sep 2014 22:34:22 +0530 Subject: [PATCH] Sync with upstream master and revert patch for bz#737223 There was no rationale given for the change to fix bz#737223 and the fix was never even proposed upstream. This patch causes a test failure in the glibc testsuite. Revert the patch for now and do a proper documented analysis if this actually results in any kind of failure. --- glibc-extern-always-inline.patch | 126 ------------------------------- glibc-fedora-elf-rh737223.patch | 15 ---- glibc.spec | 13 ++-- 3 files changed, 6 insertions(+), 148 deletions(-) delete mode 100644 glibc-extern-always-inline.patch delete mode 100644 glibc-fedora-elf-rh737223.patch diff --git a/glibc-extern-always-inline.patch b/glibc-extern-always-inline.patch deleted file mode 100644 index d3428a7..0000000 --- a/glibc-extern-always-inline.patch +++ /dev/null @@ -1,126 +0,0 @@ -From 0998aff9be4f0a25b7a822c4f28e832d367977c6 Mon Sep 17 00:00:00 2001 -From: Siddhesh Poyarekar -Date: Wed, 13 Aug 2014 23:28:18 +0530 -Subject: [PATCH] Revert to defining __extern_inline only for gcc-4.3+ - -The check for only __GNUC_STDC_INLINE__ and __GNUC_GNU_INLINE__ may -not be sufficient since those flags were added during initial support -for C99 inlining semantics. There is also a problem with always -defining __extern_inline and __extern_always_inline, since it enables -inline wrapper functions even when GNU inlining semantics are not -guaranteed. This, along with the possibility of such wrappers using -redirection (btowc for example) could result in compiler generating an -infinitely recusrive call to the function. - -In fact it was such a recursion that led to this code being written -the way it was; see: - -https://bugzilla.redhat.com/show_bug.cgi?id=186410 - -The initial change was to fix bugs 14530 and 13741, but they can be -resolved by checking if __fortify_function and/or -__extern_always_inline are defined, as it has been done in this patch. -In addition, I have audited uses of __extern_always_inline to make -sure that none of the uses result in compilation errors. - -There is however a regression in this patch for llvm, since it reverts -the llvm expectation that __GNUC_STDC_INLINE__ or __GNUC_GNU_INLINE__ -definition imply proper extern inline semantics. ---- - libio/stdio.h | 2 +- - math/bits/math-finite.h | 8 +++++--- - misc/sys/cdefs.h | 18 ++++++++---------- - 3 files changed, 14 insertions(+), 14 deletions(-) - -diff --git a/libio/stdio.h b/libio/stdio.h -index d8c0bdb..1f4f837 100644 ---- a/libio/stdio.h -+++ b/libio/stdio.h -@@ -932,7 +932,7 @@ extern void funlockfile (FILE *__stream) __THROW; - #ifdef __USE_EXTERN_INLINES - # include - #endif --#if __USE_FORTIFY_LEVEL > 0 && defined __extern_always_inline -+#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function - # include - #endif - #ifdef __LDBL_COMPAT -diff --git a/math/bits/math-finite.h b/math/bits/math-finite.h -index aa755de..0656645 100644 ---- a/math/bits/math-finite.h -+++ b/math/bits/math-finite.h -@@ -251,7 +251,8 @@ extern long double __REDIRECT_NTH (lgammal_r, (long double, int *), - # endif - #endif - --#if defined __USE_XOPEN || defined __USE_ISOC99 -+#if ((defined __USE_XOPEN || defined __USE_ISOC99) \ -+ && defined __extern_always_inline) - /* lgamma. */ - __extern_always_inline double __NTH (lgamma (double __d)) - { -@@ -284,7 +285,8 @@ __extern_always_inline long double __NTH (lgammal (long double __d)) - # endif - #endif - --#if defined __USE_MISC || defined __USE_XOPEN -+#if ((defined __USE_MISC || defined __USE_XOPEN) \ -+ && defined __extern_always_inline) - /* gamma. */ - __extern_always_inline double __NTH (gamma (double __d)) - { -@@ -422,7 +424,7 @@ extern long double __REDIRECT_NTH (sqrtl, (long double), __sqrtl_finite); - # endif - #endif - --#ifdef __USE_ISOC99 -+#if defined __USE_ISOC99 && defined __extern_always_inline - /* tgamma. */ - extern double __gamma_r_finite (double, int *); - __extern_always_inline double __NTH (tgamma (double __d)) -diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h -index 04db956..d8ee73c 100644 ---- a/misc/sys/cdefs.h -+++ b/misc/sys/cdefs.h -@@ -131,7 +131,6 @@ - /* Fortify support. */ - #define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) - #define __bos0(ptr) __builtin_object_size (ptr, 0) --#define __fortify_function __extern_always_inline __attribute_artificial__ - - #if __GNUC_PREREQ (4,3) - # define __warndecl(name, msg) \ -@@ -318,12 +317,10 @@ - # define __attribute_artificial__ /* Ignore */ - #endif - --#ifdef __GNUC__ --/* One of these will be defined if the __gnu_inline__ attribute is -- available. In C++, __GNUC_GNU_INLINE__ will be defined even though -- __inline does not use the GNU inlining rules. If neither macro is -- defined, this version of GCC only supports GNU inline semantics. */ --# if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ -+/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 -+ inline semantics, unless -fgnu89-inline is used. */ -+#if !defined __cplusplus || __GNUC_PREREQ (4,3) -+# if defined __GNUC_STDC_INLINE__ || defined __cplusplus - # define __extern_inline extern __inline __attribute__ ((__gnu_inline__)) - # define __extern_always_inline \ - extern __always_inline __attribute__ ((__gnu_inline__)) -@@ -331,9 +328,10 @@ - # define __extern_inline extern __inline - # define __extern_always_inline extern __always_inline - # endif --#else /* Not GCC. */ --# define __extern_inline /* Ignore */ --# define __extern_always_inline /* Ignore */ -+#endif -+ -+#ifdef __extern_always_inline -+# define __fortify_function __extern_always_inline __attribute_artificial__ - #endif - - /* GCC 4.3 and above allow passing all anonymous arguments of an --- -1.9.3 - diff --git a/glibc-fedora-elf-rh737223.patch b/glibc-fedora-elf-rh737223.patch deleted file mode 100644 index 5ae6e3a..0000000 --- a/glibc-fedora-elf-rh737223.patch +++ /dev/null @@ -1,15 +0,0 @@ -Binary files a/elf/.rtld.c.rej.swp and b/elf/.rtld.c.rej.swp differ -diff -Nrup a/elf/setup-vdso.h b/elf/setup-vdso.h ---- a/elf/setup-vdso.h 2012-10-10 21:34:38.000000000 -0600 -+++ b/elf/setup-vdso.h 2012-10-11 09:43:14.152958832 -0600 -@@ -93,7 +93,9 @@ setup_vdso (struct link_map *main_map __ - char *copy = malloc (len); - if (copy == NULL) - _dl_fatal_printf ("out of memory\n"); -- l->l_libname->name = l->l_name = memcpy (copy, dsoname, len); -+ l->l_libname->name = memcpy (copy, dsoname, len); -+ if (GLRO(dl_debug_mask)) -+ l->l_name = copy; - } - - /* Add the vDSO to the object list. */ diff --git a/glibc.spec b/glibc.spec index c3dff86..a0fec8e 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,6 +1,6 @@ -%define glibcsrcdir glibc-2.20-3-g645a0e9 +%define glibcsrcdir glibc-2.20-35-gd330b98 %define glibcversion 2.20.90 -%define glibcrelease 2%{?dist} +%define glibcrelease 3%{?dist} # Pre-release tarballs are pulled in from git using a command that is # effectively: # @@ -158,7 +158,6 @@ Patch0025: %{name}-fedora-streams-rh436349.patch Patch0028: %{name}-fedora-localedata-rh61908.patch Patch0030: %{name}-fedora-uname-getrlimit.patch Patch0031: %{name}-fedora-__libc_multiple_libcs.patch -Patch0032: %{name}-fedora-elf-rh737223.patch Patch0033: %{name}-fedora-elf-ORIGIN.patch Patch0034: %{name}-fedora-elf-init-hidden_undef.patch @@ -226,8 +225,6 @@ Patch2031: %{name}-rh1070416.patch Patch2033: %{name}-aarch64-tls-fixes.patch Patch2034: %{name}-aarch64-workaround-nzcv-clobber-in-tlsdesc.patch -Patch2035: %{name}-extern-always-inline.patch - ############################################################################## # End of glibc patches. ############################################################################## @@ -545,7 +542,6 @@ package or when debugging this package. %patch0029 -p1 %patch0030 -p1 %patch0031 -p1 -%patch0032 -p1 %patch0033 -p1 %patch0034 -p1 %patch0037 -p1 @@ -558,7 +554,6 @@ package or when debugging this package. %patch0047 -p1 %patch2033 -p1 %patch2034 -p1 -%patch2035 -p1 %patch0050 -p1 ############################################################################## @@ -1667,6 +1662,10 @@ rm -f *.filelist* %endif %changelog +* Tue Sep 16 2014 Siddhesh Poyarekar - 2.20.90-3 +- Sync with upstream master. +- Revert patch for #737223. + * Mon Sep 08 2014 Siddhesh Poyarekar - 2.20.90-2 - Build build-locale-archive statically again.