This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.25-349-g9aa4965
- From: jsm28 at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 19 May 2017 11:31:25 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.25-349-g9aa4965
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, master has been updated
via 9aa4965cdf59279c74a768e429f4155a00fea5e2 (commit)
from 8f2e1830f298f45d34cfdb4cffc8ce3b940a3990 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9aa4965cdf59279c74a768e429f4155a00fea5e2
commit 9aa4965cdf59279c74a768e429f4155a00fea5e2
Author: Joseph Myers <joseph@codesourcery.com>
Date: Fri May 19 11:30:26 2017 +0000
Also create and use ldbl-compat-choose.h.
This patch makes the glibc build generate an additional header
ldbl-compat-choose.h that defines LONG_DOUBLE_COMPAT_CHOOSE_* macros
for each libc and libm symbol, which select one or the other of their
arguments based on whether the symbol was added before a change to
long double != double.
The effect of this is that it is then possible to define a macro
maybe_long_double_symbol that automatically acts as either
long_double_symbol or weak_alias depending on when the symbol being
defined was added. This can be used when building long double
functions from type-generic templates. Thus, with this patch ldbl-opt
no longer needs special long double implementations of each new libm
function added using such a template, and the existing such
implementations are removed.
This is a step towards being able more generally to use common macros
to create all the aliases needed for a libm function, so reducing the
amount of special-case code needed in ldbl-opt and ldbl-64-128, and
facilitating subsequently adding *f32 / *f64 / *f128 / *f32x / *f64x
aliases to existing functions (where the set of aliases that a
function should have may depend on the architecture in various ways).
Tested with build-many-glibcs.py. Except for on
powerpc64le-linux-gnu, installed stripped shared libraries are
unchanged by the patch. powerpc64le-linux-gnu is the unique
configuration which used ldbl-opt from the start rather than adding a
new long double choice after originally only having had long double =
double. The effect of the patch there is that various cases that
previously used long_double_symbol unconditionally now use weak_alias
instead, so .os files contain e.g. a symbol cabsl instead of
cabsl@@GLIBC_2.17. The final dynamic symbols and versions in the
resulting shared libraries are unchanged (ABI tests pass), as is the
disassembly of the shared libraries, but the differences in the .os
files still result in different .gnu_hash contents in libm.so; the
differences are of no significance and logically using weak_alias is
what's most appropriate in those cases.
* scripts/versions.awk: Generate ldbl-compat-choose.h.
* sysdeps/ieee754/ldbl-opt/math-type-macros-ldouble.h: Include
<ldbl-compat-choose.h>.
(maybe_long_double_symbol): New macro.
[!declare_mgen_alias] (declare_mgen_alias): Use
maybe_long_double_symbol.
* sysdeps/ieee754/ldbl-opt/s_canonicalizel.c: Remove.
* sysdeps/ieee754/ldbl-opt/s_fmaxmagl.c: Likewise.
* sysdeps/ieee754/ldbl-opt/s_fminmagl.c: Likewise.
* sysdeps/ieee754/ldbl-opt/s_nextdownl.c: Likewise.
* sysdeps/ieee754/ldbl-opt/w_llogbl.c: Likewise.
* Makerules [$(build-shared) = yes && !avoid-generated]
(before-compile): Add $(common-objpfx)ldbl-compat-choose.h.
[$(build-shared) = yes && !avoid-generated]
($(common-objpfx)ldbl-compat-choose.h): New target.
diff --git a/ChangeLog b/ChangeLog
index ed4db8c..edeed50 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
2017-05-19 Joseph Myers <joseph@codesourcery.com>
+ * scripts/versions.awk: Generate ldbl-compat-choose.h.
+ * sysdeps/ieee754/ldbl-opt/math-type-macros-ldouble.h: Include
+ <ldbl-compat-choose.h>.
+ (maybe_long_double_symbol): New macro.
+ [!declare_mgen_alias] (declare_mgen_alias): Use
+ maybe_long_double_symbol.
+ * sysdeps/ieee754/ldbl-opt/s_canonicalizel.c: Remove.
+ * sysdeps/ieee754/ldbl-opt/s_fmaxmagl.c: Likewise.
+ * sysdeps/ieee754/ldbl-opt/s_fminmagl.c: Likewise.
+ * sysdeps/ieee754/ldbl-opt/s_nextdownl.c: Likewise.
+ * sysdeps/ieee754/ldbl-opt/w_llogbl.c: Likewise.
+ * Makerules [$(build-shared) = yes && !avoid-generated]
+ (before-compile): Add $(common-objpfx)ldbl-compat-choose.h.
+ [$(build-shared) = yes && !avoid-generated]
+ ($(common-objpfx)ldbl-compat-choose.h): New target.
+
* scripts/versions.awk: Generate first-versions.h.
* sysdeps/ieee754/ldbl-opt/math-type-macros-double.h: Include
<first-versions.h>.
diff --git a/Makerules b/Makerules
index d19ebf2..7656c49 100644
--- a/Makerules
+++ b/Makerules
@@ -106,10 +106,12 @@ $(common-objpfx)%.latest: $(common-objpfx)abi-versions.h
$(common-objpfx)abi-versions.h > $@T
mv -f $@T $@
-# first-versions.h provides macros used in various symbol versioning
-# macro calls.
-before-compile := $(common-objpfx)first-versions.h $(before-compile)
+# first-versions.h and ldbl-compat-choose.h provide macros used in
+# various symbol versioning macro calls.
+before-compile := $(common-objpfx)first-versions.h \
+ $(common-objpfx)ldbl-compat-choose.h $(before-compile)
$(common-objpfx)first-versions.h: $(common-objpfx)versions.stmp
+$(common-objpfx)ldbl-compat-choose.h: $(common-objpfx)versions.stmp
endif # avoid-generated
endif # $(build-shared) = yes
diff --git a/scripts/versions.awk b/scripts/versions.awk
index df08d06..5d4768c 100644
--- a/scripts/versions.awk
+++ b/scripts/versions.awk
@@ -105,6 +105,13 @@ END {
first_ver_header = real_first_ver_header "T"
printf("#ifndef _FIRST_VERSIONS_H\n") > first_ver_header;
printf("#define _FIRST_VERSIONS_H\n") > first_ver_header;
+ real_ldbl_compat_header = buildroot "ldbl-compat-choose.h"
+ ldbl_compat_header = real_ldbl_compat_header "T"
+ printf("#ifndef _LDBL_COMPAT_CHOOSE_H\n") > ldbl_compat_header;
+ printf("#define _LDBL_COMPAT_CHOOSE_H\n") > ldbl_compat_header;
+ printf("#ifndef LONG_DOUBLE_COMPAT\n") > ldbl_compat_header;
+ printf("# error LONG_DOUBLE_COMPAT not defined\n") > ldbl_compat_header;
+ printf("#endif\n") > ldbl_compat_header;
printf("version-maps =");
while (getline < tmpfile) {
if ($1 != oldlib) {
@@ -141,14 +148,26 @@ END {
gsub("\\.", "_", ver_val);
printf("#define %s %s\n", first_ver_macro, ver_val) > first_ver_header;
first_ver_seen[first_ver_macro] = 1;
+ if (oldlib == "libc" || oldlib == "libm") {
+ printf("#if LONG_DOUBLE_COMPAT (%s, %s)\n",
+ oldlib, ver_val) > ldbl_compat_header;
+ printf("# define LONG_DOUBLE_COMPAT_CHOOSE_%s_%s(a, b) a\n",
+ oldlib, sym) > ldbl_compat_header;
+ printf("#else\n") > ldbl_compat_header;
+ printf("# define LONG_DOUBLE_COMPAT_CHOOSE_%s_%s(a, b) b\n",
+ oldlib, sym) > ldbl_compat_header;
+ printf("#endif\n") > ldbl_compat_header;
+ }
}
}
printf("\n") > outfile;
}
printf("\n");
printf("#endif /* first-versions.h */\n") > first_ver_header;
+ printf("#endif /* ldbl-compat-choose.h */\n") > ldbl_compat_header;
closeversion(oldver, veryoldver);
close_and_move(outfile, real_outfile);
close_and_move(first_ver_header, real_first_ver_header);
+ close_and_move(ldbl_compat_header, real_ldbl_compat_header);
#system("rm -f " tmpfile);
}
diff --git a/sysdeps/ieee754/ldbl-opt/math-type-macros-ldouble.h b/sysdeps/ieee754/ldbl-opt/math-type-macros-ldouble.h
index da926da..20873ae 100644
--- a/sysdeps/ieee754/ldbl-opt/math-type-macros-ldouble.h
+++ b/sysdeps/ieee754/ldbl-opt/math-type-macros-ldouble.h
@@ -19,12 +19,19 @@
#ifndef _MATH_TYPE_MACROS_LDOUBLE
#include <math_ldbl_opt.h>
+#include <ldbl-compat-choose.h>
+
+#define maybe_long_double_symbol(lib, from, to) \
+ LONG_DOUBLE_COMPAT_CHOOSE_ ## lib ## _ ## to (long_double_symbol (lib, \
+ from, \
+ to), \
+ weak_alias (from, to))
/* Use properly versioned symbols for long double on platforms where
it was not always a distinct type. */
#if !defined declare_mgen_alias
# define declare_mgen_alias(from, to) \
- long_double_symbol (libm, from ## l, to ## l);
+ maybe_long_double_symbol (libm, from ## l, to ## l);
#endif
#include_next <math-type-macros-ldouble.h>
diff --git a/sysdeps/ieee754/ldbl-opt/s_canonicalizel.c b/sysdeps/ieee754/ldbl-opt/s_canonicalizel.c
deleted file mode 100644
index d5d67df..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_canonicalizel.c
+++ /dev/null
@@ -1,5 +0,0 @@
-/* canonicalizel is not subject to complex aliasing rules. It was
- added in glibc 2.25. */
-#define declare_mgen_alias(from, to) weak_alias (M_SUF (from), M_SUF (to))
-#include <math-type-macros-ldouble.h>
-#include <s_canonicalize_template.c>
diff --git a/sysdeps/ieee754/ldbl-opt/s_fmaxmagl.c b/sysdeps/ieee754/ldbl-opt/s_fmaxmagl.c
deleted file mode 100644
index 7e23761..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_fmaxmagl.c
+++ /dev/null
@@ -1,5 +0,0 @@
-/* fmaxmagl is not subject to complex aliasing rules. It was added in
- glibc 2.25. */
-#define declare_mgen_alias(from, to) weak_alias (M_SUF (from), M_SUF (to))
-#include <math-type-macros-ldouble.h>
-#include <s_fmaxmag_template.c>
diff --git a/sysdeps/ieee754/ldbl-opt/s_fminmagl.c b/sysdeps/ieee754/ldbl-opt/s_fminmagl.c
deleted file mode 100644
index 46c1051..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_fminmagl.c
+++ /dev/null
@@ -1,5 +0,0 @@
-/* fminmagl is not subject to complex aliasing rules. It was added in
- glibc 2.25. */
-#define declare_mgen_alias(from, to) weak_alias (M_SUF (from), M_SUF (to))
-#include <math-type-macros-ldouble.h>
-#include <s_fminmag_template.c>
diff --git a/sysdeps/ieee754/ldbl-opt/s_nextdownl.c b/sysdeps/ieee754/ldbl-opt/s_nextdownl.c
deleted file mode 100644
index c92c02e..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_nextdownl.c
+++ /dev/null
@@ -1,5 +0,0 @@
-/* nextdownl is not subject to complex aliasing rules. It was
- added in glibc 2.24. */
-#define declare_mgen_alias(from, to) weak_alias (M_SUF (from), M_SUF (to))
-#include <math-type-macros-ldouble.h>
-#include <s_nextdown_template.c>
diff --git a/sysdeps/ieee754/ldbl-opt/w_llogbl.c b/sysdeps/ieee754/ldbl-opt/w_llogbl.c
deleted file mode 100644
index 8abe54b..0000000
--- a/sysdeps/ieee754/ldbl-opt/w_llogbl.c
+++ /dev/null
@@ -1,5 +0,0 @@
-/* llogbl is not subject to complex aliasing rules. It was added in
- glibc 2.25. */
-#define declare_mgen_alias(from, to) weak_alias (M_SUF (from), M_SUF (to))
-#include <math-type-macros-ldouble.h>
-#include <w_llogb_template.c>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 16 ++++++++++++++++
Makerules | 8 +++++---
scripts/versions.awk | 19 +++++++++++++++++++
.../ieee754/ldbl-opt/math-type-macros-ldouble.h | 9 ++++++++-
sysdeps/ieee754/ldbl-opt/s_canonicalizel.c | 5 -----
sysdeps/ieee754/ldbl-opt/s_fmaxmagl.c | 5 -----
sysdeps/ieee754/ldbl-opt/s_fminmagl.c | 5 -----
sysdeps/ieee754/ldbl-opt/s_nextdownl.c | 5 -----
sysdeps/ieee754/ldbl-opt/w_llogbl.c | 5 -----
9 files changed, 48 insertions(+), 29 deletions(-)
delete mode 100644 sysdeps/ieee754/ldbl-opt/s_canonicalizel.c
delete mode 100644 sysdeps/ieee754/ldbl-opt/s_fmaxmagl.c
delete mode 100644 sysdeps/ieee754/ldbl-opt/s_fminmagl.c
delete mode 100644 sysdeps/ieee754/ldbl-opt/s_nextdownl.c
delete mode 100644 sysdeps/ieee754/ldbl-opt/w_llogbl.c
hooks/post-receive
--
GNU C Library master sources