This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch hjl/pr21120/2.25 created. glibc-2.25-27-g42dbed7
- From: hjl at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 30 Jun 2017 11:43:23 -0000
- Subject: GNU C Library master sources branch hjl/pr21120/2.25 created. glibc-2.25-27-g42dbed7
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, hjl/pr21120/2.25 has been created
at 42dbed7a8404680c29fc13916bb7c6bced9facd1 (commit)
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=42dbed7a8404680c29fc13916bb7c6bced9facd1
commit 42dbed7a8404680c29fc13916bb7c6bced9facd1
Author: Florian Weimer <fweimer@redhat.com>
Date: Tue Jun 13 22:09:59 2017 +0200
configure: Suppress expected compiler error message
(cherry picked from commit c2528fef3b05bcffb1ac27c6c09cc3ff24b7f03f)
diff --git a/configure b/configure
index 9158a7d..ee637a7 100755
--- a/configure
+++ b/configure
@@ -5319,7 +5319,8 @@ fi
# copy of those headers in Makerules.
if test -n "$CXX"; then
find_cxx_header () {
- echo "#include <$1>" | $CXX -M -MP -x c++ - | sed -n "\,$1:,{s/:\$//;p}"
+ echo "#include <$1>" | $CXX -M -MP -x c++ - 2>/dev/null \
+ | sed -n "\,$1:,{s/:\$//;p}"
}
CXX_CSTDLIB_HEADER="$(find_cxx_header cstdlib)"
CXX_CMATH_HEADER="$(find_cxx_header cmath)"
diff --git a/configure.ac b/configure.ac
index 789283e..d288ff4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1176,7 +1176,8 @@ AC_SUBST(CXX_SYSINCLUDES)
# copy of those headers in Makerules.
if test -n "$CXX"; then
find_cxx_header () {
- echo "#include <$1>" | $CXX -M -MP -x c++ - | sed -n "\,$1:,{s/:\$//;p}"
+ echo "#include <$1>" | $CXX -M -MP -x c++ - 2>/dev/null \
+ | sed -n "\,$1:,{s/:\$//;p}"
}
CXX_CSTDLIB_HEADER="$(find_cxx_header cstdlib)"
CXX_CMATH_HEADER="$(find_cxx_header cmath)"
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=32a06064cdf9632de5b6fc05fb2c9384cf04dd3c
commit 32a06064cdf9632de5b6fc05fb2c9384cf04dd3c
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jun 13 09:28:14 2017 -0700
Make copy of <bits/std_abs.h> from GCC 7 [BZ #21573]
<bits/std_abs.h> from GCC 7 will include /usr/include/stdlib.h from
"#include_next" (instead of stdlib/stdlib.h in the glibc source
directory), and this turns up as a make dependency. Also make a copy
of <bits/std_abs.h> to prevent it from including /usr/include/stdlib.h.
[BZ #21573]
* Makerules [$(c++-bits-std_abs-h) != ""] (before-compile): Add
$(common-objpfx)bits/std_abs.h.
[$(c++-bits-std_abs-h) != ""] ($(common-objpfx)bits/std_abs.h):
New target.
* config.make.in (c++-bits-std_abs-h): New.
* configure.ac (find_cxx_header): Use "\,$1," with sed.
(CXX_BITS_STD_ABS_H): New.
(AC_SUBST(CXX_BITS_STD_ABS_H)): Likewise.
* configure: Regenerated.
(cherry picked from commit a65ea28d1833d3502c5070472e43bda04410e6b5)
diff --git a/Makerules b/Makerules
index 7f0eef8..8210a45 100644
--- a/Makerules
+++ b/Makerules
@@ -127,6 +127,14 @@ $(common-objpfx)cstdlib: $(c++-cstdlib-header)
$(common-objpfx)cmath: $(c++-cmath-header)
$(INSTALL_DATA) $< $@T
$(move-if-change) $@T $@
+ifneq (,$(c++-bits-std_abs-h))
+# Also make a copy of <bits/std_abs.h> from GCC 7 to prevent it from
+# including /usr/include/stdlib.h.
+before-compile := $(common-objpfx)bits/std_abs.h $(before-compile)
+$(common-objpfx)bits/std_abs.h: $(c++-bits-std_abs-h)
+ $(INSTALL_DATA) $< $@T
+ $(move-if-change) $@T $@
+endif
endif
before-compile := $(common-objpfx)libc-abis.h $(before-compile)
diff --git a/config.make.in b/config.make.in
index 5836b32..709527d 100644
--- a/config.make.in
+++ b/config.make.in
@@ -47,6 +47,7 @@ sysincludes = @SYSINCLUDES@
c++-sysincludes = @CXX_SYSINCLUDES@
c++-cstdlib-header = @CXX_CSTDLIB_HEADER@
c++-cmath-header = @CXX_CMATH_HEADER@
+c++-bits-std_abs-h = @CXX_BITS_STD_ABS_H@
all-warnings = @all_warnings@
enable-werror = @enable_werror@
diff --git a/configure b/configure
index eecd0ac..9158a7d 100755
--- a/configure
+++ b/configure
@@ -634,6 +634,7 @@ BISON
INSTALL_INFO
PERL
BASH_SHELL
+CXX_BITS_STD_ABS_H
CXX_CMATH_HEADER
CXX_CSTDLIB_HEADER
CXX_SYSINCLUDES
@@ -5318,14 +5319,16 @@ fi
# copy of those headers in Makerules.
if test -n "$CXX"; then
find_cxx_header () {
- echo "#include <$1>" | $CXX -M -MP -x c++ - | sed -n "/$1:/{s/:\$//;p}"
+ echo "#include <$1>" | $CXX -M -MP -x c++ - | sed -n "\,$1:,{s/:\$//;p}"
}
CXX_CSTDLIB_HEADER="$(find_cxx_header cstdlib)"
CXX_CMATH_HEADER="$(find_cxx_header cmath)"
+ CXX_BITS_STD_ABS_H="$(find_cxx_header bits/std_abs.h)"
fi
+
# Test if LD_LIBRARY_PATH contains the notation for the current directory
# since this would lead to problems installing/building glibc.
# LD_LIBRARY_PATH contains the current directory if one of the following
diff --git a/configure.ac b/configure.ac
index 4a77411..789283e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1176,13 +1176,15 @@ AC_SUBST(CXX_SYSINCLUDES)
# copy of those headers in Makerules.
if test -n "$CXX"; then
find_cxx_header () {
- echo "#include <$1>" | $CXX -M -MP -x c++ - | sed -n "/$1:/{s/:\$//;p}"
+ echo "#include <$1>" | $CXX -M -MP -x c++ - | sed -n "\,$1:,{s/:\$//;p}"
}
CXX_CSTDLIB_HEADER="$(find_cxx_header cstdlib)"
CXX_CMATH_HEADER="$(find_cxx_header cmath)"
+ CXX_BITS_STD_ABS_H="$(find_cxx_header bits/std_abs.h)"
fi
AC_SUBST(CXX_CSTDLIB_HEADER)
AC_SUBST(CXX_CMATH_HEADER)
+AC_SUBST(CXX_BITS_STD_ABS_H)
# Test if LD_LIBRARY_PATH contains the notation for the current directory
# since this would lead to problems installing/building glibc.
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6ad06690d711a93361fab9bf2493bd75c17ad563
commit 6ad06690d711a93361fab9bf2493bd75c17ad563
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Jun 29 10:26:04 2017 -0700
i386: Increase MALLOC_ALIGNMENT to 16 [BZ #21120]
GCC 7 changed the definition of max_align_t on i386:
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=9b5c49ef97e63cc63f1ffa13baf771368105ebe2
As a result, glibc malloc no longer returns memory blocks which are as
aligned as max_align_t requires.
This causes malloc/tst-malloc-thread-fail to fail with an error like this
one:
error: allocation function 0, size 144 not aligned to 16
This patch increases the malloc alignment to 16 for i386.
[BZ #21120]
* sysdeps/generic/malloc-alignment.h: New file.
* sysdeps/i386/malloc-alignment.h: Likewise.
* sysdeps/generic/malloc-machine.h: Include <malloc-alignment.h>.
diff --git a/sysdeps/generic/malloc-machine.h b/sysdeps/generic/malloc-alignment.h
similarity index 53%
copy from sysdeps/generic/malloc-machine.h
copy to sysdeps/generic/malloc-alignment.h
index 21aa9fc..193e827 100644
--- a/sysdeps/generic/malloc-machine.h
+++ b/sysdeps/generic/malloc-alignment.h
@@ -1,6 +1,5 @@
-/* Basic platform-independent macro definitions for mutexes,
- thread-specific data and parameters for malloc.
- Copyright (C) 2003-2017 Free Software Foundation, Inc.
+/* Define MALLOC_ALIGNMENT for malloc. Generic version.
+ Copyright (C) 2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,25 +16,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#ifndef _GENERIC_MALLOC_MACHINE_H
-#define _GENERIC_MALLOC_MACHINE_H
+#ifndef _GENERIC_MALLOC_ALIGNMENT_H
+#define _GENERIC_MALLOC_ALIGNMENT_H
-#include <atomic.h>
+/* Use the default MALLOC_ALIGNMENT. */
-#ifndef atomic_full_barrier
-# define atomic_full_barrier() __asm ("" ::: "memory")
-#endif
-
-#ifndef atomic_read_barrier
-# define atomic_read_barrier() atomic_full_barrier ()
-#endif
-
-#ifndef atomic_write_barrier
-# define atomic_write_barrier() atomic_full_barrier ()
-#endif
-
-#ifndef DEFAULT_TOP_PAD
-# define DEFAULT_TOP_PAD 131072
-#endif
-
-#endif /* !defined(_GENERIC_MALLOC_MACHINE_H) */
+#endif /* !defined(_GENERIC_MALLOC_ALIGNMENT_H) */
diff --git a/sysdeps/generic/malloc-machine.h b/sysdeps/generic/malloc-machine.h
index 21aa9fc..4491b90 100644
--- a/sysdeps/generic/malloc-machine.h
+++ b/sysdeps/generic/malloc-machine.h
@@ -21,6 +21,7 @@
#define _GENERIC_MALLOC_MACHINE_H
#include <atomic.h>
+#include <malloc-alignment.h>
#ifndef atomic_full_barrier
# define atomic_full_barrier() __asm ("" ::: "memory")
diff --git a/sysdeps/generic/malloc-machine.h b/sysdeps/i386/malloc-alignment.h
similarity index 53%
copy from sysdeps/generic/malloc-machine.h
copy to sysdeps/i386/malloc-alignment.h
index 21aa9fc..f72f7a8 100644
--- a/sysdeps/generic/malloc-machine.h
+++ b/sysdeps/i386/malloc-alignment.h
@@ -1,6 +1,5 @@
-/* Basic platform-independent macro definitions for mutexes,
- thread-specific data and parameters for malloc.
- Copyright (C) 2003-2017 Free Software Foundation, Inc.
+/* Define MALLOC_ALIGNMENT for malloc. i386 version.
+ Copyright (C) 2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,25 +16,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#ifndef _GENERIC_MALLOC_MACHINE_H
-#define _GENERIC_MALLOC_MACHINE_H
+#ifndef _I386_MALLOC_ALIGNMENT_H
+#define _I386_MALLOC_ALIGNMENT_H
-#include <atomic.h>
+#define MALLOC_ALIGNMENT 16
-#ifndef atomic_full_barrier
-# define atomic_full_barrier() __asm ("" ::: "memory")
-#endif
-
-#ifndef atomic_read_barrier
-# define atomic_read_barrier() atomic_full_barrier ()
-#endif
-
-#ifndef atomic_write_barrier
-# define atomic_write_barrier() atomic_full_barrier ()
-#endif
-
-#ifndef DEFAULT_TOP_PAD
-# define DEFAULT_TOP_PAD 131072
-#endif
-
-#endif /* !defined(_GENERIC_MALLOC_MACHINE_H) */
+#endif /* !defined(_I386_MALLOC_ALIGNMENT_H) */
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=39cc492b907492a64c5bdbfd288828ea00fbd697
commit 39cc492b907492a64c5bdbfd288828ea00fbd697
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Jun 23 14:38:46 2017 -0700
Avoid .symver on common symbols [BZ #21666]
The .symver directive on common symbol just creates a new common symbol,
not an alias and the newer assembler with the bug fix for
https://sourceware.org/bugzilla/show_bug.cgi?id=21661
will issue an error. Before the fix, we got
$ readelf -sW libc.so | grep "loc[12s]"
5109: 00000000003a0608 8 OBJECT LOCAL DEFAULT 36 loc1
5188: 00000000003a0610 8 OBJECT LOCAL DEFAULT 36 loc2
5455: 00000000003a0618 8 OBJECT LOCAL DEFAULT 36 locs
6575: 00000000003a05f0 8 OBJECT GLOBAL DEFAULT 36 locs@GLIBC_2.2.5
7156: 00000000003a05f8 8 OBJECT GLOBAL DEFAULT 36 loc1@GLIBC_2.2.5
7312: 00000000003a0600 8 OBJECT GLOBAL DEFAULT 36 loc2@GLIBC_2.2.5
in libc.so. The versioned loc1, loc2 and locs have the wrong addresses.
After the fix, we got
$ readelf -sW libc.so | grep "loc[12s]"
6570: 000000000039e3b8 8 OBJECT GLOBAL DEFAULT 34 locs@GLIBC_2.2.5
7151: 000000000039e3c8 8 OBJECT GLOBAL DEFAULT 34 loc1@GLIBC_2.2.5
7307: 000000000039e3c0 8 OBJECT GLOBAL DEFAULT 34 loc2@GLIBC_2.2.5
[BZ #21666]
* misc/regexp.c (loc1): Add __attribute__ ((nocommon));
(loc2): Likewise.
(locs): Likewise.
(cherry picked from commit 388b4f1a02f3a801965028bbfcd48d905638b797)
diff --git a/misc/regexp.c b/misc/regexp.c
index 19d76c0..eaea7c3 100644
--- a/misc/regexp.c
+++ b/misc/regexp.c
@@ -29,14 +29,15 @@
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_23)
-/* Define the variables used for the interface. */
-char *loc1;
-char *loc2;
+/* Define the variables used for the interface. Avoid .symver on common
+ symbol, which just creates a new common symbol, not an alias. */
+char *loc1 __attribute__ ((nocommon));
+char *loc2 __attribute__ ((nocommon));
compat_symbol (libc, loc1, loc1, GLIBC_2_0);
compat_symbol (libc, loc2, loc2, GLIBC_2_0);
/* Although we do not support the use we define this variable as well. */
-char *locs;
+char *locs __attribute__ ((nocommon));
compat_symbol (libc, locs, locs, GLIBC_2_0);
-----------------------------------------------------------------------
hooks/post-receive
--
GNU C Library master sources