mirror of
git://sourceware.org/git/glibc.git
synced 2026-09-09 17:58:30 +08:00
Compare commits
33
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
357524c07e | ||
|
|
b20dc55e0a | ||
|
|
5756f8227e | ||
|
|
3a7215f0ea | ||
|
|
9a54bf0a7a | ||
|
|
dc0aceae66 | ||
|
|
2ceff7a1d1 | ||
|
|
4d954e99e9 | ||
|
|
85ad9efa68 | ||
|
|
7912ccf3b2 | ||
|
|
3e4adc6b12 | ||
|
|
4a52f7accb | ||
|
|
c0085baf04 | ||
|
|
eb218d6b8b | ||
|
|
74926dde57 | ||
|
|
cb702b410e | ||
|
|
02023efdf7 | ||
|
|
3f0460438a | ||
|
|
b12e3e064c | ||
|
|
4206f5d089 | ||
|
|
74a92277d1 | ||
|
|
280167543d | ||
|
|
b353dca40c | ||
|
|
6ebb7473f2 | ||
|
|
64182edc57 | ||
|
|
b5fbe03601 | ||
|
|
2defba5a32 | ||
|
|
98e480caca | ||
|
|
e363210bfa | ||
|
|
1162eadb40 | ||
|
|
3dd64fbf92 | ||
|
|
23254d1d86 | ||
|
|
f850d180b0 |
+14
@@ -829,7 +829,9 @@ endif
|
||||
# We have to assume that glibc functions are called in any rounding
|
||||
# mode and also change the rounding mode in a few functions. So,
|
||||
# disable any optimization that assume default rounding mode.
|
||||
ifeq ($(with-clang),no)
|
||||
+math-flags = -frounding-math
|
||||
endif
|
||||
|
||||
# We might want to compile with some stack-protection flag.
|
||||
ifneq ($(stack-protector),)
|
||||
@@ -895,6 +897,18 @@ ifeq "$(strip $(+cflags))" ""
|
||||
+cflags := $(default_cflags)
|
||||
endif # $(+cflags) == ""
|
||||
|
||||
# For now, manually add known-needed clang flags here.
|
||||
ifeq ($(with-clang),yes)
|
||||
+cflags += -fheinous-gnu-extensions
|
||||
# Don't complain about __sigsetjmp.
|
||||
+cflags += -Wno-builtin-requires-header
|
||||
# clang takes gnu89 as requiring a warning about duplicates, gcc does not
|
||||
+cflags += -Wno-duplicate-decl-specifier
|
||||
# Non-string format arguments come from debugging prints in ld.so.
|
||||
+cflags += -Wno-format-security
|
||||
|
||||
endif # with-clang == yes
|
||||
|
||||
+cflags += $(cflags-cpu) $(+gccwarn) $(+merge-constants) $(+math-flags) \
|
||||
$(+stack-protector)
|
||||
+gcc-nowarn := -w
|
||||
|
||||
@@ -225,6 +225,11 @@ sed-remove-dotdot := -e 's@ *\([^ \/$$][^ \]*\)@ $$(..)\1@g' \
|
||||
-e 's@^\([^ \/$$][^ \]*\)@$$(..)\1@g'
|
||||
endif
|
||||
|
||||
MOARFLAGS =
|
||||
ifeq ($(with-clang),yes)
|
||||
MOARFLAGS = -no-integrated-as
|
||||
endif
|
||||
|
||||
ifdef gen-py-const-headers
|
||||
# We'll use a static pattern rule to match .pysym files with their
|
||||
# corresponding generated .py files.
|
||||
@@ -260,7 +265,7 @@ $(py-const): $(py-const-dir)%.py: %.pysym $(py-const-script) \
|
||||
$(common-before-compile)
|
||||
$(make-target-directory)
|
||||
$(AWK) -f $(py-const-script) $< \
|
||||
| $(CC) -S -o $@.tmp $(CFLAGS) $(CPPFLAGS) -x c -
|
||||
| $(CC) -S $(MOARFLAGS) -o $@.tmp $(CFLAGS) $(CPPFLAGS) -x c -
|
||||
echo '# GENERATED FILE\n' > $@.tmp2
|
||||
echo '# Constant definitions for pretty printers.' >> $@.tmp2
|
||||
echo '# See gen-py-const.awk for details.\n' >> $@.tmp2
|
||||
@@ -276,10 +281,11 @@ ifdef gen-as-const-headers
|
||||
# Generating headers for assembly constants.
|
||||
# We need this defined early to get into before-compile before
|
||||
# it's used in sysd-rules, below.
|
||||
# clang's integrated assembler doesn't like the freaky tokens.
|
||||
$(common-objpfx)%.h $(common-objpfx)%.h.d: $(..)scripts/gen-as-const.awk \
|
||||
%.sym $(common-before-compile)
|
||||
$(AWK) -f $< $(filter %.sym,$^) \
|
||||
| $(CC) -S -o $(@:.h.d=.h)T3 $(CFLAGS) $(CPPFLAGS) -x c - \
|
||||
| $(CC) -S $(MOARFLAGS) -o $(@:.h.d=.h)T3 $(CFLAGS) $(CPPFLAGS) -x c - \
|
||||
-MD -MP -MF $(@:.h=.h.d)T -MT '$(@:.h=.h.d) $(@:.h.d=.h)'
|
||||
sed -n 's/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*$$/#define \1 \2/p' \
|
||||
$(@:.h.d=.h)T3 > $(@:.h.d=.h)T
|
||||
@@ -653,7 +659,7 @@ $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules
|
||||
common-generated += shlib.lds
|
||||
|
||||
shlib-lds = $(common-objpfx)shlib.lds
|
||||
shlib-lds-flags = -T $(shlib-lds)
|
||||
shlib-lds-flags = -Wl,-T,$(shlib-lds)
|
||||
endif
|
||||
|
||||
define build-shlib
|
||||
@@ -705,7 +711,7 @@ LDFLAGS-c.so = -nostdlib -nostartfiles
|
||||
# But we still want to link libc.so against $(libc.so-gnulib).
|
||||
LDLIBS-c.so += $(libc.so-gnulib)
|
||||
# Give libc.so an entry point and make it directly runnable itself.
|
||||
LDFLAGS-c.so += -e __libc_main
|
||||
LDFLAGS-c.so += -Wl,-e,__libc_main
|
||||
# Pre-link the objects of libc_pic.a so that we can locally resolve
|
||||
# COMMON symbols before we link against ld.so. This is because ld.so
|
||||
# contains some of libc_pic.a already, which will prevent the COMMONs
|
||||
|
||||
@@ -169,6 +169,8 @@
|
||||
/* Define if the linker defines __ehdr_start. */
|
||||
#undef HAVE_EHDR_START
|
||||
|
||||
#define WANT_FLOAT128 0
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
|
||||
@@ -101,6 +101,7 @@ use-nscd = @use_nscd@
|
||||
build-hardcoded-path-in-tests= @hardcoded_path_in_tests@
|
||||
build-pt-chown = @build_pt_chown@
|
||||
have-tunables = @have_tunables@
|
||||
enable-float128 = @enable_float128@
|
||||
|
||||
# Build tools.
|
||||
CC = @CC@
|
||||
|
||||
@@ -669,6 +669,7 @@ stack_protector
|
||||
libc_cv_ssp
|
||||
libc_cv_with_fp
|
||||
base_machine
|
||||
enable_float128
|
||||
have_tunables
|
||||
build_pt_chown
|
||||
build_nscd
|
||||
@@ -730,6 +731,7 @@ infodir
|
||||
docdir
|
||||
oldincludedir
|
||||
includedir
|
||||
runstatedir
|
||||
localstatedir
|
||||
sharedstatedir
|
||||
sysconfdir
|
||||
@@ -759,6 +761,7 @@ with_gd_include
|
||||
with_gd_lib
|
||||
with_binutils
|
||||
with_selinux
|
||||
with_clang
|
||||
with_headers
|
||||
with_default_link
|
||||
enable_sanity_checks
|
||||
@@ -787,6 +790,7 @@ enable_build_nscd
|
||||
enable_nscd
|
||||
enable_pt_chown
|
||||
enable_tunables
|
||||
enable_float128
|
||||
enable_mathvec
|
||||
with_cpu
|
||||
'
|
||||
@@ -840,6 +844,7 @@ datadir='${datarootdir}'
|
||||
sysconfdir='${prefix}/etc'
|
||||
sharedstatedir='${prefix}/com'
|
||||
localstatedir='${prefix}/var'
|
||||
runstatedir='${localstatedir}/run'
|
||||
includedir='${prefix}/include'
|
||||
oldincludedir='/usr/include'
|
||||
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
||||
@@ -1092,6 +1097,15 @@ do
|
||||
| -silent | --silent | --silen | --sile | --sil)
|
||||
silent=yes ;;
|
||||
|
||||
-runstatedir | --runstatedir | --runstatedi | --runstated \
|
||||
| --runstate | --runstat | --runsta | --runst | --runs \
|
||||
| --run | --ru | --r)
|
||||
ac_prev=runstatedir ;;
|
||||
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
|
||||
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
|
||||
| --run=* | --ru=* | --r=*)
|
||||
runstatedir=$ac_optarg ;;
|
||||
|
||||
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
||||
ac_prev=sbindir ;;
|
||||
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||
@@ -1229,7 +1243,7 @@ fi
|
||||
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
||||
datadir sysconfdir sharedstatedir localstatedir includedir \
|
||||
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
||||
libdir localedir mandir
|
||||
libdir localedir mandir runstatedir
|
||||
do
|
||||
eval ac_val=\$$ac_var
|
||||
# Remove trailing slashes.
|
||||
@@ -1382,6 +1396,7 @@ Fine tuning of the installation directories:
|
||||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
||||
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
||||
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
||||
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
|
||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||
--includedir=DIR C header files [PREFIX/include]
|
||||
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
||||
@@ -1459,6 +1474,7 @@ Optional Features:
|
||||
--enable-pt_chown Enable building and installing pt_chown
|
||||
--enable-tunables Enable tunables support. Known values are 'yes',
|
||||
'no' and 'valstring'
|
||||
--disable-float128 disable float128 support
|
||||
--enable-mathvec Enable building and installing mathvec [default
|
||||
depends on architecture]
|
||||
|
||||
@@ -1472,6 +1488,7 @@ Optional Packages:
|
||||
--with-gd-lib=DIR find libgd library files in DIR
|
||||
--with-binutils=PATH specify location of binutils (as and ld)
|
||||
--with-selinux if building with SELinux support
|
||||
--with-clang if building with clang (temporary)
|
||||
--with-headers=PATH location of system headers to use (for example
|
||||
/usr/src/linux/include) [default=compiler default]
|
||||
--with-default-link do not use explicit linker scripts
|
||||
@@ -3312,6 +3329,16 @@ else
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --with-clang was given.
|
||||
if test "${with_clang+set}" = set; then :
|
||||
withval=$with_clang; with_clang=$withval
|
||||
else
|
||||
with_clang=no
|
||||
fi
|
||||
|
||||
config_vars="$config_vars
|
||||
with-clang = $with_clang"
|
||||
|
||||
|
||||
# Check whether --with-headers was given.
|
||||
if test "${with_headers+set}" = set; then :
|
||||
@@ -3721,6 +3748,19 @@ if test "$have_tunables" = yes; then
|
||||
|
||||
fi
|
||||
|
||||
# Check whether --enable-float128 was given.
|
||||
if test "${enable_float128+set}" = set; then :
|
||||
enableval=$enable_float128; enable_float128=$enableval
|
||||
else
|
||||
enable_float128=yes
|
||||
fi
|
||||
|
||||
|
||||
if test "$enable_float128" = yes; then
|
||||
$as_echo "#define WANT_FLOAT128 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
# The abi-tags file uses a fairly simplistic model for name recognition that
|
||||
# can't distinguish i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a
|
||||
# $host_os of `gnu*' here to be `gnu-gnu*' just so that it can tell.
|
||||
@@ -5030,7 +5070,9 @@ main ()
|
||||
{
|
||||
|
||||
#if !defined __GNUC__ || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 9)
|
||||
#if !defined __clang__
|
||||
#error insufficient compiler
|
||||
#endif
|
||||
#endif
|
||||
;
|
||||
return 0;
|
||||
@@ -6170,7 +6212,7 @@ char *foo (const char *a, const char *b)
|
||||
return __builtin_strstr (a, b);
|
||||
}
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -O3 -S conftest.c -o - | grep -F "my_strstr" > /dev/null'
|
||||
if { ac_try='${CC-cc} -O3 -S conftest.c -o - | grep -F "strstr" > /dev/null'
|
||||
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
@@ -6251,7 +6293,7 @@ __attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
|
||||
foo (void) {}
|
||||
EOF
|
||||
libc_cv_cc_loop_to_function=no
|
||||
if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c'
|
||||
if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Werror -c conftest.c'
|
||||
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
@@ -6771,7 +6813,10 @@ libc_cv_pie_default=$libc_cv_cc_pie_default
|
||||
|
||||
# Set the `multidir' variable by grabbing the variable from the compiler.
|
||||
# We do it once and save the result in a generated makefile.
|
||||
libc_cv_multidir=.
|
||||
if test "$with_clang" = no; then
|
||||
libc_cv_multidir=`${CC-cc} $CFLAGS $CPPFLAGS -print-multi-directory`
|
||||
fi
|
||||
|
||||
|
||||
if test "$static_pie" = yes; then
|
||||
|
||||
+24
-2
@@ -137,6 +137,13 @@ AC_ARG_WITH([selinux],
|
||||
[if building with SELinux support]),
|
||||
[with_selinux=$withval],
|
||||
[with_selinux=auto])
|
||||
dnl This is a temporary hack, to help sort out wired-in GCC assumptions.
|
||||
AC_ARG_WITH([clang],
|
||||
AC_HELP_STRING([--with-clang],
|
||||
[if building with clang (temporary)]),
|
||||
[with_clang=$withval],
|
||||
[with_clang=no])
|
||||
LIBC_CONFIG_VAR([with-clang], [$with_clang])
|
||||
|
||||
AC_ARG_WITH([headers],
|
||||
AC_HELP_STRING([--with-headers=PATH],
|
||||
@@ -435,6 +442,16 @@ if test "$have_tunables" = yes; then
|
||||
AC_DEFINE(HAVE_TUNABLES)
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([float128],
|
||||
AC_HELP_STRING([--disable-float128],
|
||||
[disable float128 support]),
|
||||
[enable_float128=$enableval],
|
||||
[enable_float128=yes])
|
||||
AC_SUBST(enable_float128)
|
||||
if test "$enable_float128" = yes; then
|
||||
AC_DEFINE(WANT_FLOAT128)
|
||||
fi
|
||||
|
||||
# The abi-tags file uses a fairly simplistic model for name recognition that
|
||||
# can't distinguish i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a
|
||||
# $host_os of `gnu*' here to be `gnu-gnu*' just so that it can tell.
|
||||
@@ -958,7 +975,9 @@ AC_CHECK_PROG_VER(BISON, bison, --version,
|
||||
AC_CACHE_CHECK([if $CC is sufficient to build libc], libc_cv_compiler_ok, [
|
||||
AC_TRY_COMPILE([], [
|
||||
#if !defined __GNUC__ || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 9)
|
||||
#if !defined __clang__
|
||||
#error insufficient compiler
|
||||
#endif
|
||||
#endif],
|
||||
[libc_cv_compiler_ok=yes],
|
||||
[libc_cv_compiler_ok=no])])
|
||||
@@ -1502,7 +1521,7 @@ char *foo (const char *a, const char *b)
|
||||
}
|
||||
EOF
|
||||
dnl
|
||||
if AC_TRY_COMMAND([${CC-cc} -O3 -S conftest.c -o - | grep -F "my_strstr" > /dev/null]);
|
||||
if AC_TRY_COMMAND([${CC-cc} -O3 -S conftest.c -o - | grep -F "strstr" > /dev/null]);
|
||||
then
|
||||
libc_cv_gcc_builtin_redirection=yes
|
||||
else
|
||||
@@ -1545,7 +1564,7 @@ __attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
|
||||
foo (void) {}
|
||||
EOF
|
||||
libc_cv_cc_loop_to_function=no
|
||||
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c])
|
||||
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -Werror -c conftest.c])
|
||||
then
|
||||
libc_cv_cc_loop_to_function=yes
|
||||
fi
|
||||
@@ -1811,7 +1830,10 @@ AC_SUBST(libc_cv_pie_default)
|
||||
|
||||
# Set the `multidir' variable by grabbing the variable from the compiler.
|
||||
# We do it once and save the result in a generated makefile.
|
||||
libc_cv_multidir=.
|
||||
if test "$with_clang" = no; then
|
||||
libc_cv_multidir=`${CC-cc} $CFLAGS $CPPFLAGS -print-multi-directory`
|
||||
fi
|
||||
AC_SUBST(libc_cv_multidir)
|
||||
|
||||
if test "$static_pie" = yes; then
|
||||
|
||||
+22
-1
@@ -39,20 +39,26 @@ $CFLAGS{"POSIX2008"} = "-std=c99 -D_POSIX_C_SOURCE=200809L";
|
||||
# Return a list of functions exported by a header, empty if an include
|
||||
# of the header does not compile.
|
||||
sub list_exported_functions {
|
||||
my ($cc, $standard, $header, $tmpdir) = @_;
|
||||
my ($cc, $standard, $header, $tmpdir, $withclang) = @_;
|
||||
my ($cc_all) = "$cc -D_ISOMAC $CFLAGS{$standard}";
|
||||
my ($tmpfile) = "$tmpdir/list-$$.c";
|
||||
my ($auxfile) = "$tmpdir/list-$$.c.aux";
|
||||
my ($astfile) = "$tmpdir/list-$$.c.ast";
|
||||
my ($ret);
|
||||
my (%res) = ();
|
||||
open (TMPFILE, ">$tmpfile") || die ("open $tmpfile: $!\n");
|
||||
print TMPFILE "#include <$header>\n";
|
||||
close (TMPFILE) || die ("close $tmpfile: $!\n");
|
||||
if ($withclang ne "yes") {
|
||||
$ret = system "$cc_all -c $tmpfile -o /dev/null -aux-info $auxfile > /dev/null";
|
||||
} else {
|
||||
$ret = system "$cc_all -c $tmpfile -o /dev/null -Xclang -ast-dump |grep FunctionDecl > $astfile";
|
||||
}
|
||||
unlink ($tmpfile) || die ("unlink $tmpfile: $!\n");
|
||||
if ($ret != 0) {
|
||||
return;
|
||||
}
|
||||
if ($withclang ne "yes") {
|
||||
open (AUXFILE, "<$auxfile") || die ("open $auxfile: $!\n");
|
||||
while (<AUXFILE>) {
|
||||
s|/\*.*?\*/||g;
|
||||
@@ -70,5 +76,20 @@ sub list_exported_functions {
|
||||
}
|
||||
close (AUXFILE) || die ("close $auxfile: $!\n");
|
||||
unlink ($auxfile) || die ("unlink $auxfile: $!\n");
|
||||
} else {
|
||||
open (ASTFILE, "<$astfile") || die ("open $astfile: $!\n");
|
||||
while (<ASTFILE>) {
|
||||
s/^.*:[0-9][0-9]*:[0-9][0-9]* //g;
|
||||
s/^.*:[0-9][0-9]* implicit //g;
|
||||
s/^.*:[0-9][0-9]* //g;
|
||||
if (/(\w+)\s* /) {
|
||||
$res{$1} = 1;
|
||||
} else {
|
||||
die ("couldn't parse -ast-dump output: $_\n");
|
||||
}
|
||||
}
|
||||
close (ASTFILE) || die ("close $astfile: $!\n");
|
||||
unlink ($astfile) || die ("unlink $astfile: $!\n");
|
||||
}
|
||||
return sort keys %res;
|
||||
}
|
||||
|
||||
@@ -178,6 +178,7 @@ $(conformtest-header-tests): $(objpfx)%/conform.out: \
|
||||
$(PERL) -I. conformtest.pl --tmpdir=$(@D)/scratch --cc='$(CC)' \
|
||||
--flags='$(conformtest-cc-flags)' --standard=$$std \
|
||||
--headers=$$hdr $(conformtest-xfail) $(conformtest-cross) \
|
||||
--withclang='$(with-clang)' \
|
||||
> $@); \
|
||||
$(evaluate-test)
|
||||
|
||||
@@ -185,6 +186,7 @@ $(linknamespace-symlists-tests): $(objpfx)symlist-%: list-header-symbols.pl
|
||||
$(PERL) -I. -w $< --tmpdir=$(objpfx) --cc='$(CC)' \
|
||||
--flags='$(conformtest-cc-flags)' --standard=$* \
|
||||
--headers="$(strip $(conformtest-headers-$*))" \
|
||||
--withclang='$(with-clang)' \
|
||||
> $@ 2> $@.err; \
|
||||
$(evaluate-test)
|
||||
|
||||
@@ -225,6 +227,7 @@ $(linknamespace-header-tests): $(objpfx)%/linknamespace.out: \
|
||||
--stdsyms=$(objpfx)symlist-$$std --header=$$hdr \
|
||||
--libsyms=$(objpfx)symlist-stdlibs-$$std \
|
||||
--readelf='$(READELF)' \
|
||||
--withclang='$(with-clang)' \
|
||||
> $@ 2>&1); \
|
||||
$(evaluate-test)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ $cross = "";
|
||||
$xfail_str = "";
|
||||
GetOptions ('headers=s' => \@headers, 'standard=s' => \$standard,
|
||||
'flags=s' => \$flags, 'cc=s' => \$CC, 'tmpdir=s' => \$tmpdir,
|
||||
'cross' => \$cross, 'xfail=s' => \$xfail_str);
|
||||
'cross' => \$cross, 'xfail=s' => \$xfail_str, 'withclang=s' => \$withclang);
|
||||
@headers = split(/,/,join(',',@headers));
|
||||
|
||||
# List of the headers we are testing.
|
||||
@@ -270,9 +270,17 @@ sub checknamespace {
|
||||
close (TESTFILE);
|
||||
|
||||
undef %errors;
|
||||
if ($withclang eq "yes") {
|
||||
open (CONTENT, "$CC $CFLAGS_namespace -E $fnamebase.c -P -Wp,-dM | sed -e '/^# [1-9]/d' -e '/^[[:space:]]*\$/d' |");
|
||||
} else {
|
||||
open (CONTENT, "$CC $CFLAGS_namespace -E $fnamebase.c -P -Wp,-dN | sed -e '/^# [1-9]/d' -e '/^[[:space:]]*\$/d' |");
|
||||
}
|
||||
loop: while (<CONTENT>) {
|
||||
chop;
|
||||
if ($withclang eq "yes") {
|
||||
# Filter extra output coming from -dM
|
||||
s/^(#[^ ]+ [^ (]+).*$/$1/g;
|
||||
}
|
||||
if (/^#define (.*)/) {
|
||||
newtoken ($1, @allow);
|
||||
} elsif (/^#undef (.*)/) {
|
||||
|
||||
@@ -27,7 +27,9 @@ use Getopt::Long;
|
||||
GetOptions ('header=s' => \$header, 'standard=s' => \$standard,
|
||||
'flags=s' => \$flags, 'cc=s' => \$CC, 'tmpdir=s' => \$tmpdir,
|
||||
'stdsyms=s' => \$stdsyms_file, 'libsyms=s' => \$libsyms_file,
|
||||
'readelf=s' => \$READELF);
|
||||
'readelf=s' => \$READELF, 'withclang=s' => \$withclang);
|
||||
|
||||
$debug = 1;
|
||||
|
||||
# Load the list of symbols that are OK.
|
||||
%stdsyms = ();
|
||||
@@ -162,7 +164,7 @@ foreach my $sym (@sym_data) {
|
||||
# detected by this script if the same namespace issue applies for
|
||||
# static linking.
|
||||
|
||||
@c_syms = list_exported_functions ("$CC $flags", $standard, $header, $tmpdir);
|
||||
@c_syms = list_exported_functions ("$CC $flags", $standard, $header, $tmpdir, $withclang);
|
||||
$cincfile = "$tmpdir/undef-$$.c";
|
||||
$cincfile_o = "$tmpdir/undef-$$.o";
|
||||
$cincfile_sym = "$tmpdir/undef-$$.sym";
|
||||
@@ -177,9 +179,11 @@ system ("$CC $flags -D_ISOMAC $CFLAGS{$standard} -c $cincfile -o $cincfile_o")
|
||||
system ("LC_ALL=C $READELF -W -s $cincfile_o > $cincfile_sym")
|
||||
&& die ("readelf failed\n");
|
||||
@elf_syms = list_syms ($cincfile_sym);
|
||||
unlink ($cincfile) || die ("unlink $cincfile: $!\n");
|
||||
unlink ($cincfile_o) || die ("unlink $cincfile_o: $!\n");
|
||||
unlink ($cincfile_sym) || die ("unlink $cincfile_sym: $!\n");
|
||||
if (!$debug) {
|
||||
unlink ($cincfile) || die ("unlink $cincfile: $!\n");
|
||||
unlink ($cincfile_o) || die ("unlink $cincfile_o: $!\n");
|
||||
unlink ($cincfile_sym) || die ("unlink $cincfile_sym: $!\n");
|
||||
}
|
||||
|
||||
%seen_where = ();
|
||||
%files_seen = ();
|
||||
@@ -207,7 +211,31 @@ while (%current_undef) {
|
||||
$seen_where{$ssym} = "$current_undef{$sym} -> [$file] $ssym";
|
||||
}
|
||||
}
|
||||
# A clang build can leave strong undefined symbols in the file,
|
||||
# instead of GC'ing them; filter them out.
|
||||
foreach my $usym (@{$strong_undef_syms{$file}}) {
|
||||
$alsoseen = 0;
|
||||
foreach my $ssym (@{$seen_syms{$file}}) {
|
||||
if ($ssym eq $usym) {
|
||||
if ($debug) {
|
||||
print "$usym is strong undef also seen in $file, skipping\n";
|
||||
}
|
||||
$alsoseen = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
if ($alsoseen) {
|
||||
next;
|
||||
}
|
||||
if ($debug) {
|
||||
foreach my $file2 (@{$sym_objs{$sym}}) {
|
||||
foreach my $ssym (@{$seen_syms{$file2}}) {
|
||||
if ($ssym eq $usym) {
|
||||
print " seen in $file2";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!defined ($all_undef{$usym})) {
|
||||
$all_undef{$usym} = "$current_undef{$sym} -> [$file] $usym";
|
||||
$new_undef{$usym} = "$current_undef{$sym} -> [$file] $usym";
|
||||
@@ -220,14 +248,27 @@ while (%current_undef) {
|
||||
|
||||
$ret = 0;
|
||||
foreach my $sym (sort keys %seen_where) {
|
||||
if ($debug) {
|
||||
print "RAW $seen_where{$sym}\n";
|
||||
}
|
||||
if ($sym =~ /^_/) {
|
||||
next;
|
||||
}
|
||||
if (defined ($stdsyms{$sym})) {
|
||||
if ($debug) {
|
||||
print "$sym IS IN stdsyms\n";
|
||||
}
|
||||
next;
|
||||
}
|
||||
if ($debug) {
|
||||
print "FINAL ";
|
||||
}
|
||||
print "$seen_where{$sym}\n";
|
||||
$ret = 1;
|
||||
}
|
||||
|
||||
if ($debug) {
|
||||
print "Return result is $ret\n";
|
||||
}
|
||||
|
||||
exit $ret;
|
||||
|
||||
@@ -24,7 +24,7 @@ use GlibcConform;
|
||||
use Getopt::Long;
|
||||
|
||||
GetOptions ('headers=s' => \$headers, 'standard=s' => \$standard,
|
||||
'flags=s' => \$flags, 'cc=s' => \$CC, 'tmpdir=s' => \$tmpdir);
|
||||
'flags=s' => \$flags, 'cc=s' => \$CC, 'tmpdir=s' => \$tmpdir, 'withclang=s' => \$withclang);
|
||||
@headers = split (/\s+/, $headers);
|
||||
|
||||
# Extra symbols possibly not found through -aux-info but still
|
||||
@@ -67,7 +67,7 @@ $extra_syms{"POSIX2008"} = ["errno", "setjmp", "va_end", "environ",
|
||||
%user_syms = ();
|
||||
|
||||
foreach my $header (@headers) {
|
||||
@syms = list_exported_functions ("$CC $flags", $standard, $header, $tmpdir);
|
||||
@syms = list_exported_functions ("$CC $flags", $standard, $header, $tmpdir, $withclang);
|
||||
foreach my $sym (@syms) {
|
||||
if ($sym !~ /^_/) {
|
||||
$user_syms{$sym} = 1;
|
||||
|
||||
@@ -200,9 +200,11 @@ endif
|
||||
test-srcs = tst-pathopt
|
||||
selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null)
|
||||
ifneq ($(selinux-enabled),1)
|
||||
ifneq ($(with-clang),yes)
|
||||
tests-execstack-yes = tst-execstack tst-execstack-needed tst-execstack-prog
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq ($(run-built-tests),yes)
|
||||
tests-special += $(objpfx)tst-leaks1-mem.out \
|
||||
$(objpfx)tst-leaks1-static-mem.out $(objpfx)noload-mem.out \
|
||||
@@ -304,7 +306,9 @@ tests-pie += vismain
|
||||
CFLAGS-vismain.c += $(PIE-ccflag)
|
||||
endif
|
||||
endif
|
||||
ifneq ($(with-clang),yes)
|
||||
modules-execstack-yes = tst-execstack-mod
|
||||
endif
|
||||
extra-test-objs += $(addsuffix .os,$(strip $(modules-names)))
|
||||
|
||||
# filtmod1.so has a special rule
|
||||
|
||||
+37
-10
@@ -27,17 +27,8 @@
|
||||
#include <sys/types.h>
|
||||
#include "dynamic-link.h"
|
||||
|
||||
void
|
||||
_dl_resolve_conflicts (struct link_map *l, ElfW(Rela) *conflict,
|
||||
ElfW(Rela) *conflictend)
|
||||
{
|
||||
#if ! ELF_MACHINE_NO_RELA
|
||||
if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_RELOC))
|
||||
_dl_debug_printf ("\nconflict processing: %s\n", DSO_FILENAME (l->l_name));
|
||||
#ifndef NESTING
|
||||
|
||||
{
|
||||
/* Do the conflict relocation of the object and library GOT and other
|
||||
data. */
|
||||
|
||||
/* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code. */
|
||||
#define RESOLVE_MAP(ref, version, flags) (*ref = NULL, NULL)
|
||||
@@ -51,13 +42,49 @@ _dl_resolve_conflicts (struct link_map *l, ElfW(Rela) *conflict,
|
||||
(map) = resolve_conflict_map; \
|
||||
} while (0)
|
||||
|
||||
#include "dynamic-link.h"
|
||||
|
||||
#endif /* n NESTING */
|
||||
|
||||
void
|
||||
_dl_resolve_conflicts (struct link_map *l, ElfW(Rela) *conflict,
|
||||
ElfW(Rela) *conflictend)
|
||||
{
|
||||
#if ! ELF_MACHINE_NO_RELA
|
||||
if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_RELOC))
|
||||
_dl_debug_printf ("\nconflict processing: %s\n", DSO_FILENAME (l->l_name));
|
||||
|
||||
{
|
||||
/* Do the conflict relocation of the object and library GOT and other
|
||||
data. */
|
||||
|
||||
#ifdef NESTING
|
||||
|
||||
/* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code. */
|
||||
#define RESOLVE_MAP(ref, version, flags) (*ref = NULL, NULL)
|
||||
#define RESOLVE(ref, version, flags) (*ref = NULL, 0)
|
||||
#define RESOLVE_CONFLICT_FIND_MAP(map, r_offset) \
|
||||
do { \
|
||||
while ((resolve_conflict_map->l_map_end < (ElfW(Addr)) (r_offset)) \
|
||||
|| (resolve_conflict_map->l_map_start > (ElfW(Addr)) (r_offset))) \
|
||||
resolve_conflict_map = resolve_conflict_map->l_next; \
|
||||
\
|
||||
(map) = resolve_conflict_map; \
|
||||
} while (0)
|
||||
|
||||
#endif /* NESTING */
|
||||
|
||||
/* Prelinking makes no sense for anything but the main namespace. */
|
||||
assert (l->l_ns == LM_ID_BASE);
|
||||
struct link_map *resolve_conflict_map __attribute__ ((__unused__))
|
||||
= GL(dl_ns)[LM_ID_BASE]._ns_loaded;
|
||||
|
||||
#ifdef NESTING
|
||||
|
||||
#include "dynamic-link.h"
|
||||
|
||||
#endif /* NESTING */
|
||||
|
||||
/* Override these, defined in dynamic-link.h. */
|
||||
#undef CHECK_STATIC_TLS
|
||||
#define CHECK_STATIC_TLS(ref_map, sym_map) ((void) 0)
|
||||
|
||||
@@ -141,6 +141,40 @@ _dl_nothread_init_static_tls (struct link_map *map)
|
||||
'\0', map->l_tls_blocksize - map->l_tls_initimage_size);
|
||||
}
|
||||
|
||||
#ifndef NESTING
|
||||
|
||||
/* String table object symbols. */
|
||||
|
||||
static struct link_map *glob_l;
|
||||
static struct r_scope_elem **glob_scope;
|
||||
static const char *glob_strtab;
|
||||
|
||||
/* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code. */
|
||||
#define RESOLVE_MAP(ref, version, r_type) \
|
||||
((ELFW(ST_BIND) ((*ref)->st_info) != STB_LOCAL \
|
||||
&& __glibc_likely (!dl_symbol_visibility_binds_local_p (*ref))) \
|
||||
? ((__builtin_expect ((*ref) == glob_l->l_lookup_cache.sym, 0) \
|
||||
&& elf_machine_type_class (r_type) == glob_l->l_lookup_cache.type_class) \
|
||||
? (bump_num_cache_relocations (), \
|
||||
(*ref) = glob_l->l_lookup_cache.ret, \
|
||||
glob_l->l_lookup_cache.value) \
|
||||
: ({ lookup_t _lr; \
|
||||
int _tc = elf_machine_type_class (r_type); \
|
||||
glob_l->l_lookup_cache.type_class = _tc; \
|
||||
glob_l->l_lookup_cache.sym = (*ref); \
|
||||
const struct r_found_version *v = NULL; \
|
||||
if ((version) != NULL && (version)->hash != 0) \
|
||||
v = (version); \
|
||||
_lr = _dl_lookup_symbol_x (glob_strtab + (*ref)->st_name, glob_l, (ref), \
|
||||
glob_scope, v, _tc, \
|
||||
DL_LOOKUP_ADD_DEPENDENCY, NULL); \
|
||||
glob_l->l_lookup_cache.ret = (*ref); \
|
||||
glob_l->l_lookup_cache.value = _lr; })) \
|
||||
: glob_l)
|
||||
|
||||
#include "dynamic-link.h"
|
||||
|
||||
#endif /* n NESTING */
|
||||
|
||||
void
|
||||
_dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
|
||||
@@ -227,6 +261,8 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
|
||||
{
|
||||
/* Do the actual relocation of the object's GOT and other data. */
|
||||
|
||||
#ifdef NESTING
|
||||
|
||||
/* String table object symbols. */
|
||||
const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]);
|
||||
|
||||
@@ -255,6 +291,14 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
|
||||
|
||||
#include "dynamic-link.h"
|
||||
|
||||
#else
|
||||
|
||||
glob_l = l;
|
||||
glob_scope = scope;
|
||||
glob_strtab = (const void *) D_PTR (glob_l, l_info[DT_STRTAB]);
|
||||
|
||||
#endif /* NESTING */
|
||||
|
||||
ELF_DYNAMIC_RELOCATE (l, lazy, consider_profiling, skip_ifunc);
|
||||
|
||||
#ifndef PROF
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef NESTING
|
||||
#define auto static
|
||||
#endif
|
||||
|
||||
/* This macro is used as a callback from elf_machine_rel{a,} when a
|
||||
static TLS reloc is about to be performed. Since (in dl-load.c) we
|
||||
permit dynamic loading of objects that might use such relocs, we
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#include <assert.h>
|
||||
#include <libc-diag.h>
|
||||
|
||||
#if defined NESTING || !defined SAW_EGDI
|
||||
|
||||
#ifndef RESOLVE_MAP
|
||||
static
|
||||
#else
|
||||
@@ -184,3 +186,11 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
|
||||
info[DT_RPATH] = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef NESTING
|
||||
#ifndef SAW_EGDI
|
||||
#define SAW_EGDI
|
||||
#endif
|
||||
#endif /* n NESTING */
|
||||
|
||||
+35
-1
@@ -324,7 +324,7 @@ DL_SYSINFO_IMPLEMENTATION
|
||||
is fine, too. The latter is important here. We can avoid setting
|
||||
up a temporary link map for ld.so if we can mark _rtld_global as
|
||||
hidden. */
|
||||
#ifdef PI_STATIC_AND_HIDDEN
|
||||
#if 0 //def PI_STATIC_AND_HIDDEN
|
||||
# define DONT_USE_BOOTSTRAP_MAP 1
|
||||
#endif
|
||||
|
||||
@@ -439,9 +439,27 @@ _dl_start_final (void *arg, struct dl_start_final_info *info)
|
||||
return start_addr;
|
||||
}
|
||||
|
||||
#ifndef NESTING
|
||||
#ifdef DONT_USE_BOOTSTRAP_MAP
|
||||
# define bootstrap_map GL(dl_rtld_map)
|
||||
#else
|
||||
struct dl_start_final_info info;
|
||||
# define bootstrap_map info.l
|
||||
#endif
|
||||
|
||||
/* This #define produces dynamic linking inline functions for
|
||||
bootstrap relocation instead of general-purpose relocation.
|
||||
Since ld.so must not have any undefined symbols the result
|
||||
is trivial: always the map of ld.so itself. */
|
||||
#define RTLD_BOOTSTRAP
|
||||
#define RESOLVE_MAP(sym, version, flags) (&bootstrap_map)
|
||||
#include "dynamic-link.h"
|
||||
#endif /* n NESTING */
|
||||
|
||||
static ElfW(Addr) __attribute_used__
|
||||
_dl_start (void *arg)
|
||||
{
|
||||
#ifdef NESTING
|
||||
#ifdef DONT_USE_BOOTSTRAP_MAP
|
||||
# define bootstrap_map GL(dl_rtld_map)
|
||||
#else
|
||||
@@ -457,6 +475,7 @@ _dl_start (void *arg)
|
||||
#define BOOTSTRAP_MAP (&bootstrap_map)
|
||||
#define RESOLVE_MAP(sym, version, flags) BOOTSTRAP_MAP
|
||||
#include "dynamic-link.h"
|
||||
#endif /* NESTING */
|
||||
|
||||
if (HP_TIMING_INLINE && HP_SMALL_TIMING_AVAIL)
|
||||
#ifdef DONT_USE_BOOTSTRAP_MAP
|
||||
@@ -2785,3 +2804,18 @@ print_statistics (hp_timing_t *rtld_total_timep)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef NESTING
|
||||
char *dummy1 = (char *)elf_get_dynamic_info;
|
||||
# if ! ELF_MACHINE_NO_REL
|
||||
char *dummy2 = (char *)elf_machine_rel;
|
||||
char *dummy3 = (char *)elf_machine_rel_relative;
|
||||
#endif
|
||||
# if ! ELF_MACHINE_NO_RELA
|
||||
char *dummy4 = (char *)elf_machine_rela;
|
||||
char *dummy5 = (char *)elf_machine_rela_relative;
|
||||
#endif
|
||||
# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
|
||||
char *dummy6 = (char *)elf_machine_lazy_rel;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/* Macros to support TLS testing in times of missing compiler support. */
|
||||
|
||||
#define COMMON_INT_DEF(x) \
|
||||
asm (".tls_common " #x ",4,4")
|
||||
__thread int x;
|
||||
/* XXX Until we get compiler support we don't need declarations. */
|
||||
#define COMMON_INT_DECL(x)
|
||||
|
||||
|
||||
@@ -114,6 +114,10 @@ enum
|
||||
|
||||
/* Internal function. Terminate the process using __libc_fatal. */
|
||||
void __libc_alloc_buffer_create_failure (void *start, size_t size);
|
||||
/* clang wants a hidden proto ahead of use. */
|
||||
#ifndef _ISOMAC
|
||||
libc_hidden_proto (__libc_alloc_buffer_create_failure)
|
||||
#endif
|
||||
|
||||
/* Create a new allocation buffer. The byte range from START to START
|
||||
+ SIZE - 1 must be valid, and the allocation buffer allocates
|
||||
@@ -132,6 +136,10 @@ alloc_buffer_create (void *start, size_t size)
|
||||
/* Internal function. See alloc_buffer_allocate below. */
|
||||
struct alloc_buffer __libc_alloc_buffer_allocate (size_t size, void **pptr)
|
||||
__attribute__ ((nonnull (2)));
|
||||
/* clang wants a hidden proto ahead of use. */
|
||||
#ifndef _ISOMAC
|
||||
libc_hidden_proto (__libc_alloc_buffer_allocate)
|
||||
#endif
|
||||
|
||||
/* Allocate a buffer of SIZE bytes using malloc. The returned buffer
|
||||
is in a failed state if malloc fails. *PPTR points to the start of
|
||||
@@ -342,6 +350,10 @@ alloc_buffer_copy_bytes (struct alloc_buffer *buf, const void *src, size_t size)
|
||||
struct alloc_buffer __libc_alloc_buffer_copy_string (struct alloc_buffer,
|
||||
const char *)
|
||||
__attribute__ ((nonnull (2)));
|
||||
/* clang wants a hidden proto ahead of use. */
|
||||
#ifndef _ISOMAC
|
||||
libc_hidden_proto (__libc_alloc_buffer_copy_string)
|
||||
#endif
|
||||
|
||||
/* Copy the string at SRC into the buffer, including its null
|
||||
terminator. If there is not enough room in the buffer, the buffer
|
||||
|
||||
+1
-2
@@ -440,11 +440,10 @@
|
||||
/* Decide whether we can define 'extern inline' functions in headers. */
|
||||
#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \
|
||||
&& !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__ \
|
||||
&& defined __extern_inline
|
||||
&& defined __extern_inline && !defined __clang__
|
||||
# define __USE_EXTERN_INLINES 1
|
||||
#endif
|
||||
|
||||
|
||||
/* This is here only because every header file already includes this one.
|
||||
Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
|
||||
<gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
|
||||
|
||||
@@ -459,9 +459,19 @@ for linking")
|
||||
__hidden_proto (name, , __GI_##name, ##attrs)
|
||||
# define hidden_tls_proto(name, attrs...) \
|
||||
__hidden_proto (name, __thread, __GI_##name, ##attrs)
|
||||
#ifndef __clang__
|
||||
# define __hidden_proto(name, thread, internal, attrs...) \
|
||||
extern thread __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
|
||||
__hidden_proto_hiddenattr (attrs);
|
||||
#else
|
||||
# define __hidden_proto(name, thread, internal, attrs...) \
|
||||
extern thread __typeof (name) name \
|
||||
__hidden_proto_hiddenattr (attrs); \
|
||||
_Pragma (__redefine(name, internal))
|
||||
/* Note that this macro does not use __hidden_asmname, since it produces a string. */
|
||||
# define __redefine(name, internal) __stringize(redefine_extname name internal)
|
||||
# define __stringize(X) #X
|
||||
#endif
|
||||
# define __hidden_asmname(name) \
|
||||
__hidden_asmname1 (__USER_LABEL_PREFIX__, name)
|
||||
# define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
|
||||
|
||||
@@ -163,6 +163,7 @@ extern __typeof (strnlen) strnlen attribute_hidden;
|
||||
extern __typeof (strsep) strsep attribute_hidden;
|
||||
#endif
|
||||
|
||||
#ifndef __clang__
|
||||
#if (!IS_IN (libc) || !defined SHARED) \
|
||||
&& !defined NO_MEMPCPY_STPCPY_REDIRECT
|
||||
/* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
|
||||
@@ -170,6 +171,7 @@ extern __typeof (strsep) strsep attribute_hidden;
|
||||
extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
|
||||
extern __typeof (stpcpy) stpcpy __asm__ ("__stpcpy");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern void *__memcpy_chk (void *__restrict __dest,
|
||||
const void *__restrict __src, size_t __len,
|
||||
|
||||
@@ -308,8 +308,11 @@ libm-test-incs = $(foreach f,$(libm-test-funcs-all),libm-test-$(f).inc)
|
||||
endif
|
||||
|
||||
ifdef PYTHON
|
||||
# Suppress these tests with clang for now, multiple issues
|
||||
ifneq ($(with-clang),yes)
|
||||
tests += test-tgmath3
|
||||
generated += test-tgmath3.c
|
||||
endif
|
||||
CFLAGS-test-tgmath3.c += -fno-builtin
|
||||
|
||||
$(objpfx)test-tgmath3.c: gen-tgmath-tests.py
|
||||
|
||||
@@ -52,23 +52,40 @@ __BEGIN_DECLS
|
||||
#undef I
|
||||
#define I _Complex_I
|
||||
|
||||
#if defined __USE_ISOC11 && defined __clang__
|
||||
/* Clang casts types to _Complex instead of using __builtin_complex. */
|
||||
#define __CMPLX(x, y, t) (+(_Complex t){(t)(x), (t)(y)})
|
||||
#define CMPLX(x, y) __CMPLX(x, y, double)
|
||||
#define CMPLXF(x, y) __CMPLX(x, y, float)
|
||||
#define CMPLXL(x, y) __CMPLX(x, y, long double)
|
||||
#else
|
||||
#if defined __USE_ISOC11 && __GNUC_PREREQ (4, 7)
|
||||
/* Macros to expand into expression of specified complex type. */
|
||||
# define CMPLX(x, y) __builtin_complex ((double) (x), (double) (y))
|
||||
# define CMPLXF(x, y) __builtin_complex ((float) (x), (float) (y))
|
||||
# define CMPLXL(x, y) __builtin_complex ((long double) (x), (long double) (y))
|
||||
#endif
|
||||
#endif /* __clang __ */
|
||||
|
||||
#if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)
|
||||
# define CMPLXF16(x, y) __builtin_complex ((_Float16) (x), (_Float16) (y))
|
||||
#endif
|
||||
|
||||
#if __HAVE_FLOAT32 && __GLIBC_USE (IEC_60559_TYPES_EXT)
|
||||
#if defined(__clang__)
|
||||
/* The typedef _Float32 does not seem to work here. */
|
||||
# define CMPLXF32(x, y) __CMPLX(x, y, float)
|
||||
#else
|
||||
# define CMPLXF32(x, y) __builtin_complex ((_Float32) (x), (_Float32) (y))
|
||||
#endif /* __clang __ */
|
||||
#endif
|
||||
|
||||
#if __HAVE_FLOAT64 && __GLIBC_USE (IEC_60559_TYPES_EXT)
|
||||
#if defined(__clang__)
|
||||
# define CMPLXF64(x, y) __CMPLX(x, y, double)
|
||||
#else
|
||||
# define CMPLXF64(x, y) __builtin_complex ((_Float64) (x), (_Float64) (y))
|
||||
#endif /* __clang __ */
|
||||
#endif
|
||||
|
||||
#if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
|
||||
@@ -76,11 +93,19 @@ __BEGIN_DECLS
|
||||
#endif
|
||||
|
||||
#if __HAVE_FLOAT32X && __GLIBC_USE (IEC_60559_TYPES_EXT)
|
||||
#if defined(__clang__)
|
||||
# define CMPLXF32X(x, y) __CMPLX(x, y, double)
|
||||
#else
|
||||
# define CMPLXF32X(x, y) __builtin_complex ((_Float32x) (x), (_Float32x) (y))
|
||||
#endif
|
||||
#endif /* __clang __ */
|
||||
|
||||
#if __HAVE_FLOAT64X && __GLIBC_USE (IEC_60559_TYPES_EXT)
|
||||
#if defined(__clang__)
|
||||
# define CMPLXF64X(x, y) __CMPLX(x, y, long double)
|
||||
#else
|
||||
# define CMPLXF64X(x, y) __builtin_complex ((_Float64x) (x), (_Float64x) (y))
|
||||
#endif /* __clang __ */
|
||||
#endif
|
||||
|
||||
#if __HAVE_FLOAT128X && __GLIBC_USE (IEC_60559_TYPES_EXT)
|
||||
|
||||
@@ -20,7 +20,11 @@
|
||||
|
||||
#ifdef FE_INVALID
|
||||
# ifndef FE_SNANS_ALWAYS_SIGNAL
|
||||
# ifdef __clang__
|
||||
# warning "FE_SNANS_ALWAYS_SIGNAL not defined, fix clang please"
|
||||
# else
|
||||
# error "FE_SNANS_ALWAYS_SIGNAL not defined"
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
# ifdef FE_SNANS_ALWAYS_SIGNAL
|
||||
|
||||
@@ -354,9 +354,14 @@
|
||||
/* GCC 4.3 and above allow passing all anonymous arguments of an
|
||||
__extern_always_inline function to some other vararg function. */
|
||||
#if __GNUC_PREREQ (4,3)
|
||||
#if defined(__clang__)
|
||||
# define __va_arg_pack() __VA_ARGS__
|
||||
# define __va_arg_pack_len() 0
|
||||
#else
|
||||
# define __va_arg_pack() __builtin_va_arg_pack ()
|
||||
# define __va_arg_pack_len() __builtin_va_arg_pack_len ()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* It is possible to compile containing GCC extensions even if GCC is
|
||||
run in pedantic mode if the uses are carefully marked using the
|
||||
|
||||
+9
-2
@@ -378,15 +378,21 @@ tests += tst-atfork2 tst-tls4 tst-_res1 tst-fini1 tst-compat-forwarder
|
||||
tests-internal += tst-tls3 tst-tls3-malloc tst-tls5 tst-stackguard1
|
||||
tests-nolibpthread += tst-fini1
|
||||
ifeq ($(have-z-execstack),yes)
|
||||
# Test depends on a nested function, can't compile without rewrite
|
||||
ifneq ($(with-clang),yes)
|
||||
tests += tst-execstack
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
modules-names = tst-atfork2mod tst-tls3mod tst-tls4moda tst-tls4modb \
|
||||
tst-tls5mod tst-tls5moda tst-tls5modb tst-tls5modc \
|
||||
tst-tls5modd tst-tls5mode tst-tls5modf tst-stack4mod \
|
||||
tst-_res1mod1 tst-_res1mod2 tst-execstack-mod tst-fini1mod \
|
||||
tst-_res1mod1 tst-_res1mod2 tst-fini1mod \
|
||||
tst-join7mod tst-compat-forwarder-mod
|
||||
ifneq ($(with-clang),yes)
|
||||
modules-names += tst-execstack-mod
|
||||
endif
|
||||
extra-test-objs += $(addsuffix .os,$(strip $(modules-names))) \
|
||||
tst-cleanup4aux.o tst-cleanupx4aux.o
|
||||
test-extras += tst-cleanup4aux tst-cleanupx4aux
|
||||
@@ -411,10 +417,11 @@ ifeq ($(build-shared),yes)
|
||||
|
||||
# Set the `multidir' variable by grabbing the variable from the compiler.
|
||||
# We do it once and save the result in a generated makefile.
|
||||
# Suppress not-working clang attempt to include 32 and x32 multidirs.
|
||||
-include $(objpfx)multidir.mk
|
||||
$(objpfx)multidir.mk: $(common-objpfx)config.make
|
||||
$(make-target-directory)
|
||||
dir=`$(CC) $(CFLAGS) $(CPPFLAGS) -print-multi-directory`; \
|
||||
dir="."; \
|
||||
echo "multidir := $$dir" > $@T
|
||||
mv -f $@T $@
|
||||
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@
|
||||
produce a tail-call to __libc_vfork, consider including the version
|
||||
in sysdeps/unix/sysv/linux/aarch64/pt-vfork.c. */
|
||||
|
||||
#if !HAVE_IFUNC
|
||||
#if 0 /*!HAVE_IFUNC*/
|
||||
# error "must write pt-vfork for this machine or get IFUNC support"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -618,6 +618,47 @@ next_prime (size_t seed)
|
||||
return seed;
|
||||
}
|
||||
|
||||
#ifndef NESTING
|
||||
static struct database *globdb;
|
||||
static size_t max_chainlength;
|
||||
static char *wp;
|
||||
static size_t nhashentries;
|
||||
static bool copy_string;
|
||||
|
||||
void add_key(const void *nodep, const VISIT which, const int depth)
|
||||
{
|
||||
if (which != leaf && which != postorder)
|
||||
return;
|
||||
|
||||
const struct dbentry *dbe = *(const struct dbentry **) nodep;
|
||||
|
||||
ptrdiff_t stridx;
|
||||
if (copy_string)
|
||||
{
|
||||
stridx = wp - globdb->keystrtab;
|
||||
wp = stpcpy (wp, dbe->str) + 1;
|
||||
}
|
||||
else
|
||||
stridx = 0;
|
||||
|
||||
size_t hidx = dbe->hashval % nhashentries;
|
||||
size_t hval2 = 1 + dbe->hashval % (nhashentries - 2);
|
||||
size_t chainlength = 0;
|
||||
|
||||
while (globdb->hashtable[hidx] != ~((stridx_t) 0))
|
||||
{
|
||||
++chainlength;
|
||||
if ((hidx += hval2) >= nhashentries)
|
||||
hidx -= nhashentries;
|
||||
}
|
||||
|
||||
globdb->hashtable[hidx] = ((globdb->extra_string ? valstrlen : 0)
|
||||
+ dbe->validx);
|
||||
globdb->keyidxtab[hidx] = stridx;
|
||||
|
||||
max_chainlength = MAX (max_chainlength, chainlength);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
compute_tables (void)
|
||||
@@ -649,6 +690,7 @@ compute_tables (void)
|
||||
db->keyidxtab = db->hashtable + nhashentries_max;
|
||||
db->keystrtab = (char *) (db->keyidxtab + nhashentries_max);
|
||||
|
||||
#ifdef NESTING
|
||||
static size_t max_chainlength;
|
||||
static char *wp;
|
||||
static size_t nhashentries;
|
||||
@@ -687,6 +729,9 @@ compute_tables (void)
|
||||
|
||||
max_chainlength = MAX (max_chainlength, chainlength);
|
||||
}
|
||||
#else
|
||||
globdb = db;
|
||||
#endif
|
||||
|
||||
copy_string = false;
|
||||
nhashentries = nhashentries_min;
|
||||
|
||||
@@ -113,6 +113,8 @@ others := getconf
|
||||
install-bin := getconf
|
||||
install-others-programs := $(inst_libexecdir)/getconf
|
||||
|
||||
CFLAGS-regex.c += -Wno-error
|
||||
|
||||
before-compile += testcases.h ptestcases.h $(objpfx)posix-conf-vars-def.h
|
||||
|
||||
# So they get cleaned up.
|
||||
|
||||
+271
-1
@@ -2765,6 +2765,262 @@ build_collating_symbol (bitset_t sbcset, const unsigned char *name)
|
||||
}
|
||||
#endif /* not _LIBC */
|
||||
|
||||
#ifndef NESTING
|
||||
|
||||
/* Local function for parse_bracket_exp used in _LIBC environment.
|
||||
Seek the collating symbol entry corresponding to NAME.
|
||||
Return the index of the symbol in the SYMB_TABLE,
|
||||
or -1 if not found. */
|
||||
|
||||
static int32_t
|
||||
__attribute__ ((always_inline))
|
||||
seek_collating_symbol_entry (const unsigned char *name, size_t name_len,
|
||||
int32_t *symb_table, int32_t table_size,
|
||||
unsigned char *extra)
|
||||
{
|
||||
int32_t elem;
|
||||
|
||||
for (elem = 0; elem < table_size; elem++)
|
||||
if (symb_table[2 * elem] != 0)
|
||||
{
|
||||
int32_t idx = symb_table[2 * elem + 1];
|
||||
/* Skip the name of collating element name. */
|
||||
idx += 1 + extra[idx];
|
||||
if (/* Compare the length of the name. */
|
||||
name_len == extra[idx]
|
||||
/* Compare the name. */
|
||||
&& memcmp (name, &extra[idx + 1], name_len) == 0)
|
||||
/* Yep, this is the entry. */
|
||||
return elem;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Local function for parse_bracket_exp used in _LIBC environment.
|
||||
Look up the collation sequence value of BR_ELEM.
|
||||
Return the value if succeeded, UINT_MAX otherwise. */
|
||||
|
||||
static unsigned int
|
||||
__attribute__ ((always_inline))
|
||||
lookup_collation_sequence_value (bracket_elem_t *br_elem, uint32_t nrules,
|
||||
unsigned char *collseqmb, char *collseqwc,
|
||||
int32_t *symb_table, int32_t table_size,
|
||||
unsigned char *extra)
|
||||
{
|
||||
if (br_elem->type == SB_CHAR)
|
||||
{
|
||||
/*
|
||||
if (MB_CUR_MAX == 1)
|
||||
*/
|
||||
if (nrules == 0)
|
||||
return collseqmb[br_elem->opr.ch];
|
||||
else
|
||||
{
|
||||
wint_t wc = __btowc (br_elem->opr.ch);
|
||||
return __collseq_table_lookup (collseqwc, wc);
|
||||
}
|
||||
}
|
||||
else if (br_elem->type == MB_CHAR)
|
||||
{
|
||||
if (nrules != 0)
|
||||
return __collseq_table_lookup (collseqwc, br_elem->opr.wch);
|
||||
}
|
||||
else if (br_elem->type == COLL_SYM)
|
||||
{
|
||||
size_t sym_name_len = strlen ((char *) br_elem->opr.name);
|
||||
if (nrules != 0)
|
||||
{
|
||||
int32_t elem, idx;
|
||||
elem = seek_collating_symbol_entry (br_elem->opr.name,
|
||||
sym_name_len,
|
||||
symb_table, table_size,
|
||||
extra);
|
||||
if (elem != -1)
|
||||
{
|
||||
/* We found the entry. */
|
||||
idx = symb_table[2 * elem + 1];
|
||||
/* Skip the name of collating element name. */
|
||||
idx += 1 + extra[idx];
|
||||
/* Skip the byte sequence of the collating element. */
|
||||
idx += 1 + extra[idx];
|
||||
/* Adjust for the alignment. */
|
||||
idx = (idx + 3) & ~3;
|
||||
/* Skip the multibyte collation sequence value. */
|
||||
idx += sizeof (unsigned int);
|
||||
/* Skip the wide char sequence of the collating element. */
|
||||
idx += sizeof (unsigned int) *
|
||||
(1 + *(unsigned int *) (extra + idx));
|
||||
/* Return the collation sequence value. */
|
||||
return *(unsigned int *) (extra + idx);
|
||||
}
|
||||
else if (sym_name_len == 1)
|
||||
{
|
||||
/* No valid character. Match it as a single byte
|
||||
character. */
|
||||
return collseqmb[br_elem->opr.name[0]];
|
||||
}
|
||||
}
|
||||
else if (sym_name_len == 1)
|
||||
return collseqmb[br_elem->opr.name[0]];
|
||||
}
|
||||
return UINT_MAX;
|
||||
}
|
||||
|
||||
/* Local function for parse_bracket_exp used in _LIBC environment.
|
||||
Build the range expression which starts from START_ELEM, and ends
|
||||
at END_ELEM. The result are written to MBCSET and SBCSET.
|
||||
RANGE_ALLOC is the allocated size of mbcset->range_starts, and
|
||||
mbcset->range_ends, is a pointer argument since we may
|
||||
update it. */
|
||||
|
||||
static reg_errcode_t
|
||||
__attribute__ ((always_inline))
|
||||
build_range_exp (bitset_t sbcset, re_charset_t *mbcset, int *range_alloc,
|
||||
bracket_elem_t *start_elem, bracket_elem_t *end_elem,
|
||||
re_dfa_t *dfa, reg_syntax_t syntax, uint32_t nrules,
|
||||
unsigned char *collseqmb, char *collseqwc,
|
||||
int32_t *symb_table, int32_t table_size,
|
||||
unsigned char *extra)
|
||||
{
|
||||
unsigned int ch;
|
||||
uint32_t start_collseq;
|
||||
uint32_t end_collseq;
|
||||
|
||||
/* Equivalence Classes and Character Classes can't be a range
|
||||
start/end. */
|
||||
if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS
|
||||
|| end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS,
|
||||
0))
|
||||
return REG_ERANGE;
|
||||
|
||||
start_collseq = lookup_collation_sequence_value (start_elem, nrules, collseqmb, collseqwc,
|
||||
symb_table, table_size, extra);
|
||||
end_collseq = lookup_collation_sequence_value (end_elem, nrules, collseqmb, collseqwc,
|
||||
symb_table, table_size, extra);
|
||||
/* Check start/end collation sequence values. */
|
||||
if (BE (start_collseq == UINT_MAX || end_collseq == UINT_MAX, 0))
|
||||
return REG_ECOLLATE;
|
||||
if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_collseq > end_collseq, 0))
|
||||
return REG_ERANGE;
|
||||
|
||||
/* Got valid collation sequence values, add them as a new entry.
|
||||
However, if we have no collation elements, and the character set
|
||||
is single byte, the single byte character set that we
|
||||
build below suffices. */
|
||||
if (nrules > 0 || dfa->mb_cur_max > 1)
|
||||
{
|
||||
/* Check the space of the arrays. */
|
||||
if (BE (*range_alloc == mbcset->nranges, 0))
|
||||
{
|
||||
/* There is not enough space, need realloc. */
|
||||
uint32_t *new_array_start;
|
||||
uint32_t *new_array_end;
|
||||
int new_nranges;
|
||||
|
||||
/* +1 in case of mbcset->nranges is 0. */
|
||||
new_nranges = 2 * mbcset->nranges + 1;
|
||||
new_array_start = re_realloc (mbcset->range_starts, uint32_t,
|
||||
new_nranges);
|
||||
new_array_end = re_realloc (mbcset->range_ends, uint32_t,
|
||||
new_nranges);
|
||||
|
||||
if (BE (new_array_start == NULL || new_array_end == NULL, 0))
|
||||
return REG_ESPACE;
|
||||
|
||||
mbcset->range_starts = new_array_start;
|
||||
mbcset->range_ends = new_array_end;
|
||||
*range_alloc = new_nranges;
|
||||
}
|
||||
|
||||
mbcset->range_starts[mbcset->nranges] = start_collseq;
|
||||
mbcset->range_ends[mbcset->nranges++] = end_collseq;
|
||||
}
|
||||
|
||||
/* Build the table for single byte characters. */
|
||||
for (ch = 0; ch < SBC_MAX; ch++)
|
||||
{
|
||||
uint32_t ch_collseq;
|
||||
/*
|
||||
if (MB_CUR_MAX == 1)
|
||||
*/
|
||||
if (nrules == 0)
|
||||
ch_collseq = collseqmb[ch];
|
||||
else
|
||||
ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch));
|
||||
if (start_collseq <= ch_collseq && ch_collseq <= end_collseq)
|
||||
bitset_set (sbcset, ch);
|
||||
}
|
||||
return REG_NOERROR;
|
||||
}
|
||||
|
||||
/* Local function for parse_bracket_exp used in _LIBC environment.
|
||||
Build the collating element which is represented by NAME.
|
||||
The result are written to MBCSET and SBCSET.
|
||||
COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a
|
||||
pointer argument since we may update it. */
|
||||
|
||||
static reg_errcode_t
|
||||
__attribute__ ((always_inline))
|
||||
build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset,
|
||||
int *coll_sym_alloc, const unsigned char *name,
|
||||
uint32_t nrules, int32_t *symb_table, int32_t table_size,
|
||||
unsigned char *extra)
|
||||
{
|
||||
int32_t elem, idx;
|
||||
size_t name_len = strlen ((const char *) name);
|
||||
if (nrules != 0)
|
||||
{
|
||||
elem = seek_collating_symbol_entry (name, name_len, symb_table,
|
||||
table_size, extra);
|
||||
if (elem != -1)
|
||||
{
|
||||
/* We found the entry. */
|
||||
idx = symb_table[2 * elem + 1];
|
||||
/* Skip the name of collating element name. */
|
||||
idx += 1 + extra[idx];
|
||||
}
|
||||
else if (name_len == 1)
|
||||
{
|
||||
/* No valid character, treat it as a normal
|
||||
character. */
|
||||
bitset_set (sbcset, name[0]);
|
||||
return REG_NOERROR;
|
||||
}
|
||||
else
|
||||
return REG_ECOLLATE;
|
||||
|
||||
/* Got valid collation sequence, add it as a new entry. */
|
||||
/* Check the space of the arrays. */
|
||||
if (BE (*coll_sym_alloc == mbcset->ncoll_syms, 0))
|
||||
{
|
||||
/* Not enough, realloc it. */
|
||||
/* +1 in case of mbcset->ncoll_syms is 0. */
|
||||
int new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1;
|
||||
/* Use realloc since mbcset->coll_syms is NULL
|
||||
if *alloc == 0. */
|
||||
int32_t *new_coll_syms = re_realloc (mbcset->coll_syms, int32_t,
|
||||
new_coll_sym_alloc);
|
||||
if (BE (new_coll_syms == NULL, 0))
|
||||
return REG_ESPACE;
|
||||
mbcset->coll_syms = new_coll_syms;
|
||||
*coll_sym_alloc = new_coll_sym_alloc;
|
||||
}
|
||||
mbcset->coll_syms[mbcset->ncoll_syms++] = idx;
|
||||
return REG_NOERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (BE (name_len != 1, 0))
|
||||
return REG_ECOLLATE;
|
||||
else
|
||||
{
|
||||
bitset_set (sbcset, name[0]);
|
||||
return REG_NOERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* n NESTING */
|
||||
|
||||
/* This function parse bracket expression like "[abc]", "[a-c]",
|
||||
"[[.a-a.]]" etc. */
|
||||
|
||||
@@ -2780,6 +3036,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
|
||||
const int32_t *symb_table;
|
||||
const unsigned char *extra;
|
||||
|
||||
# ifdef NESTING
|
||||
|
||||
/* Local function for parse_bracket_exp used in _LIBC environment.
|
||||
Seek the collating symbol entry corresponding to NAME.
|
||||
Return the index of the symbol in the SYMB_TABLE,
|
||||
@@ -3016,6 +3274,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
|
||||
}
|
||||
}
|
||||
}
|
||||
# endif /* NESTING */
|
||||
#endif
|
||||
|
||||
re_token_t br_token;
|
||||
@@ -3157,8 +3416,15 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
|
||||
token_len = peek_token_bracket (token, regexp, syntax);
|
||||
|
||||
#ifdef _LIBC
|
||||
# ifdef NESTING
|
||||
*err = build_range_exp (sbcset, mbcset, &range_alloc,
|
||||
&start_elem, &end_elem);
|
||||
# else /* n NESTING */
|
||||
*err = build_range_exp (sbcset, mbcset, &range_alloc,
|
||||
&start_elem, &end_elem,
|
||||
dfa, syntax, nrules, collseqmb, collseqwc,
|
||||
symb_table, table_size, extra);
|
||||
# endif /* NESTING */
|
||||
#else
|
||||
# ifdef RE_ENABLE_I18N
|
||||
*err = build_range_exp (sbcset,
|
||||
@@ -3211,7 +3477,11 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
|
||||
#ifdef RE_ENABLE_I18N
|
||||
mbcset, &coll_sym_alloc,
|
||||
#endif /* RE_ENABLE_I18N */
|
||||
start_elem.opr.name);
|
||||
start_elem.opr.name
|
||||
#ifndef NESTING
|
||||
, nrules, symb_table, table_size, extra
|
||||
#endif /* NESTING */
|
||||
);
|
||||
if (BE (*err != REG_NOERROR, 0))
|
||||
goto parse_bracket_exp_free_return;
|
||||
break;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
int
|
||||
do_test (void)
|
||||
{
|
||||
#ifndef __clang__ /* clang never finishes */
|
||||
size_t instances = 16384;
|
||||
#define X0 "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
|
||||
const char *item = "\na\nabbcd55";
|
||||
@@ -44,6 +45,7 @@ do_test (void)
|
||||
return 1;
|
||||
}
|
||||
free (buf);
|
||||
#endif /* __clang__ */
|
||||
return 0;
|
||||
}
|
||||
#define TEST_FUNCTION do_test ()
|
||||
|
||||
+15
-16
@@ -21,27 +21,26 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
int failures = 0;
|
||||
|
||||
void
|
||||
try (const char *name, long long int param, int value, int expected)
|
||||
{
|
||||
if (value != expected)
|
||||
{
|
||||
printf ("%s(%#llx) expected %d got %d\n",
|
||||
name, param, expected, value);
|
||||
++failures;
|
||||
}
|
||||
else
|
||||
printf ("%s(%#llx) as expected %d\n", name, param, value);
|
||||
}
|
||||
|
||||
int
|
||||
do_test (void)
|
||||
{
|
||||
int failures = 0;
|
||||
int i;
|
||||
|
||||
auto void try (const char *name, long long int param, int value,
|
||||
int expected);
|
||||
|
||||
void try (const char *name, long long int param, int value, int expected)
|
||||
{
|
||||
if (value != expected)
|
||||
{
|
||||
printf ("%s(%#llx) expected %d got %d\n",
|
||||
name, param, expected, value);
|
||||
++failures;
|
||||
}
|
||||
else
|
||||
printf ("%s(%#llx) as expected %d\n", name, param, value);
|
||||
}
|
||||
|
||||
#define TEST(fct, type) \
|
||||
try (#fct, 0, fct ((type) 0), 0); \
|
||||
for (i=0 ; i < 8 * sizeof (type); i++) \
|
||||
|
||||
@@ -710,7 +710,11 @@ _dl_dprintf (int fd, const char *fmt, ...)
|
||||
{
|
||||
/* Use local declaration to avoid includign <stdio.h>. */
|
||||
extern int __dprintf(int fd, const char *format, ...) attribute_hidden;
|
||||
#if defined(__clang__)
|
||||
__dprintf (fd, fmt);
|
||||
#else
|
||||
__dprintf (fd, fmt, __builtin_va_arg_pack ());
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <fenv.h>
|
||||
#include <fpu_control.h>
|
||||
|
||||
#ifdef __SSE2_MATH__
|
||||
#if defined(__SSE2_MATH__) && !defined(__clang__)
|
||||
# define math_opt_barrier(x) \
|
||||
({ __typeof(x) __x; \
|
||||
if (sizeof (x) <= sizeof (double) \
|
||||
|
||||
@@ -69,6 +69,8 @@ __ieee754_log (double x)
|
||||
number num;
|
||||
mp_no mpx, mpy, mpy1, mpy2, mperr;
|
||||
|
||||
volatile double zero = 0.0;
|
||||
|
||||
#include "ulog.tbl"
|
||||
#include "ulog.h"
|
||||
|
||||
@@ -81,9 +83,9 @@ __ieee754_log (double x)
|
||||
if (__glibc_unlikely (ux < 0x00100000))
|
||||
{
|
||||
if (__glibc_unlikely (((ux & 0x7fffffff) | dx) == 0))
|
||||
return MHALF / 0.0; /* return -INF */
|
||||
return MHALF / zero; /* return -INF */
|
||||
if (__glibc_unlikely (ux < 0))
|
||||
return (x - x) / 0.0; /* return NaN */
|
||||
return (x - x) / zero; /* return NaN */
|
||||
n -= 54;
|
||||
x *= two54.d; /* scale x */
|
||||
num.d = x;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Include this earlier so it can be used earlier in Makefiles,
|
||||
# and sysdep/ makefiles.
|
||||
float128-fcts = yes
|
||||
float128-fcts = $(enable-float128)
|
||||
float64x-alias-fcts = yes
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
ifeq ($(enable-float128),yes)
|
||||
ifeq ($(subdir),stdlib)
|
||||
routines += float1282mpn strfromf128
|
||||
routines += strtof128 strtof128_l strtof128_nan mpn2float128
|
||||
@@ -10,3 +11,4 @@ endif
|
||||
ifeq ($(subdir),wcsmbs)
|
||||
routines += wcstof128_l wcstof128 wcstof128_nan
|
||||
endif
|
||||
endif # enable-float128
|
||||
|
||||
@@ -38,7 +38,7 @@ static char rcsid[] = "$NetBSD: k_standard.c,v 1.6 1995/05/10 20:46:35 jtc Exp $
|
||||
# if 0
|
||||
static const double zero = 0.0; /* used as const */
|
||||
# else
|
||||
static double zero = 0.0; /* used as const */
|
||||
volatile static double zero = 0.0; /* used as const */
|
||||
# endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -74,7 +74,11 @@
|
||||
|
||||
|
||||
#define gai_start_notify_thread __gai_start_notify_thread
|
||||
/* For some reason, with clang this define causes a linktime failure
|
||||
building libanl.so. */
|
||||
#ifndef __clang__
|
||||
#define gai_create_helper_thread __gai_create_helper_thread
|
||||
#endif
|
||||
|
||||
extern inline void
|
||||
__gai_start_notify_thread (void)
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
|
||||
#include <features.h>
|
||||
|
||||
#if 0 /* for macro expansion debugging */
|
||||
#define capture(sym, val) extern int sym[val]
|
||||
#endif
|
||||
|
||||
/* Defined to 1 if the current compiler invocation provides a
|
||||
floating-point type with the IEEE 754 binary128 format, and this
|
||||
glibc includes corresponding *f128 interfaces for it. The required
|
||||
@@ -55,6 +59,11 @@
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#if 0 /* for macro expansion debugging */
|
||||
capture(i_have_float128, __HAVE_FLOAT128);
|
||||
capture(i_have_distinct_float128, __HAVE_DISTINCT_FLOAT128);
|
||||
#endif
|
||||
|
||||
/* Defined to concatenate the literal suffix to be used with _Float128
|
||||
types, if __HAVE_FLOAT128 is 1. */
|
||||
# if __HAVE_FLOAT128
|
||||
@@ -83,9 +92,25 @@ typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));
|
||||
|
||||
/* The type _Float128 exists only since GCC 7.0. */
|
||||
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
|
||||
/* need a clang 5.0 case here? */
|
||||
typedef __float128 _Float128;
|
||||
# endif
|
||||
|
||||
#if defined __clang__
|
||||
|
||||
#if 0 /* clang 5.0 or less */
|
||||
#define __builtin_huge_valf128() ((_Float128) __builtin_huge_val ())
|
||||
#define __builtin_inff128() ((_Float128) __builtin_inf ())
|
||||
#define __builtin_nanf128(x) ((_Float128) __builtin_nan (x))
|
||||
#define __builtin_nansf128(x) ((_Float128) __builtin_nans (x))
|
||||
|
||||
#define __builtin_copysignf128(x,y) ((_Float128) __builtin_copysign ((double)(x),(double)(y)))
|
||||
#define __builtin_fabsf128(x) ((_Float128) __builtin_fabs ((double)(x)))
|
||||
#endif
|
||||
#define __builtin_signbitf128(x) (__builtin_signbit (x))
|
||||
|
||||
#else /* GCC */
|
||||
|
||||
/* __builtin_huge_valf128 doesn't exist before GCC 7.0. */
|
||||
# if !__GNUC_PREREQ (7, 0)
|
||||
# define __builtin_huge_valf128() ((_Float128) __builtin_huge_val ())
|
||||
@@ -112,8 +137,14 @@ typedef __float128 _Float128;
|
||||
# define __builtin_signbitf128 __signbitf128
|
||||
# endif
|
||||
|
||||
#endif /* clang or GCC */
|
||||
|
||||
# endif
|
||||
|
||||
#if !__HAVE_FLOAT128 && defined __clang__
|
||||
typedef long double _Float128;
|
||||
#endif
|
||||
|
||||
#endif /* !__ASSEMBLER__. */
|
||||
|
||||
#include <bits/floatn-common.h>
|
||||
|
||||
@@ -9,6 +9,9 @@ CFLAGS-test-fenv-sse.c += -msse2 -mfpmath=sse
|
||||
CFLAGS-test-fenv-clear-sse.c += -msse2 -mfpmath=sse
|
||||
CFLAGS-test-fenv-sse-2.c += -msse2 -mfpmath=sse
|
||||
CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
|
||||
ifeq ($(with-clang),yes)
|
||||
CFLAGS-test-flt-eval-method-387.c += -mno-sse
|
||||
endif
|
||||
CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
|
||||
-mfpmath=sse
|
||||
endif
|
||||
|
||||
+11
-1
@@ -1,6 +1,13 @@
|
||||
# The i387 `long double' is a distinct type we support.
|
||||
long-double-fcts = yes
|
||||
|
||||
ifeq ($(with-clang),yes)
|
||||
# Clang integrated assembler objects to AVX-512 instructions if not specifically
|
||||
# allowed. (-mavx512 is the preferred option but does not work in 5.0)
|
||||
ASFLAGS-.o += -march=knl
|
||||
ASFLAGS-.os += -march=knl
|
||||
endif
|
||||
|
||||
ifeq ($(subdir),csu)
|
||||
gen-as-const-headers += link-defines.sym
|
||||
endif
|
||||
@@ -127,7 +134,10 @@ $(objpfx)tst-sse: $(objpfx)tst-ssemod.so
|
||||
$(objpfx)tst-avx: $(objpfx)tst-avx-aux.o $(objpfx)tst-avxmod.so
|
||||
$(objpfx)tst-avx512: $(objpfx)tst-avx512-aux.o $(objpfx)tst-avx512mod.so
|
||||
|
||||
AVX-CFLAGS=-mavx -mno-vzeroupper
|
||||
AVX-CFLAGS = -mavx
|
||||
ifneq ($(with-clang),yes)
|
||||
AVX-CFLAGS += -mno-vzeroupper
|
||||
endif
|
||||
CFLAGS-tst-audit4-aux.c += $(AVX-CFLAGS)
|
||||
CFLAGS-tst-auditmod4a.c += $(AVX-CFLAGS)
|
||||
CFLAGS-tst-auditmod4b.c += $(AVX-CFLAGS)
|
||||
|
||||
@@ -45,7 +45,8 @@
|
||||
#ifdef __ILP32__
|
||||
# define PRESERVE_BND_REGS_PREFIX
|
||||
#else
|
||||
# ifdef HAVE_MPX_SUPPORT
|
||||
/* clang integrated assembler does not like "bnd" by itself on a line. */
|
||||
# if defined(HAVE_MPX_SUPPORT) && !defined(__clang__)
|
||||
# define PRESERVE_BND_REGS_PREFIX bnd
|
||||
# else
|
||||
# define PRESERVE_BND_REGS_PREFIX .byte 0xf2
|
||||
|
||||
@@ -17,7 +17,13 @@ RCSID("$NetBSD: s_log1p.S,v 1.7 1995/05/09 00:10:58 jtc Exp $")
|
||||
-1 + sqrt(2) / 2 <= x <= 1 - sqrt(2) / 2
|
||||
0.29 is a safe value.
|
||||
*/
|
||||
#if defined(__clang__)
|
||||
/* Necessary in the absence of a .tfloat directive in the assembler. */
|
||||
limit:
|
||||
.byte 0xe1, 0x7a, 0x14, 0xae, 0x47, 0xe1, 0x7a, 0x94, 0xfd, 0x3f
|
||||
#else
|
||||
limit: .tfloat 0.29
|
||||
#endif
|
||||
/* Please note: we use a double value here. Since 1.0 has
|
||||
an exact representation this does not effect the accuracy
|
||||
but it helps to optimize the code. */
|
||||
|
||||
@@ -29,9 +29,12 @@
|
||||
__svml_dexp_data:
|
||||
|
||||
/* Lookup table of 2^(j/2^K): */
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_dexp_data != __dbT
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.quad 0x3ff0000000000000
|
||||
.quad 0x3ff002c605e2e8cf
|
||||
.quad 0x3ff0058c86da1c0a
|
||||
|
||||
@@ -32,18 +32,24 @@
|
||||
#define __iDomainRange 8768
|
||||
|
||||
.macro double_vector offset value
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_dexp_data != \offset
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.rept 8
|
||||
.quad \value
|
||||
.endr
|
||||
.endm
|
||||
|
||||
.macro float_vector offset value
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_dexp_data != \offset
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.rept 16
|
||||
.long \value
|
||||
.endr
|
||||
|
||||
@@ -30,9 +30,12 @@ __svml_dlog_data:
|
||||
|
||||
/* Lookup table in high+low parts and 9-bit index for
|
||||
-log(mRcp), where mRcp is mantissa of 1/x 9-bit accurate reciprocal: */
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_dlog_data != _Log_HA_table
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.quad 0xc086232bdd7a8300
|
||||
.quad 0xbe1ce91eef3fb100
|
||||
.quad 0xc086232fdc7ad828
|
||||
@@ -1066,9 +1069,12 @@ __svml_dlog_data:
|
||||
/* Lookup table with 9-bit index for
|
||||
-log(mRcp), where mRcp is mantissa of 1/x 9-bit accurate reciprocal:
|
||||
*/
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_dlog_data != _Log_LA_table
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.quad 0x8000000000000000
|
||||
.quad 0xbf5ff802a9ab10e6
|
||||
.quad 0xbf6ff00aa2b10bc0
|
||||
@@ -1630,9 +1636,12 @@ double_vector _L2 0x3fe62e42fefa39ef
|
||||
|
||||
/* General purpose constants:
|
||||
DP infinities, +/- */
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_dlog_data != _dInfs
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.quad 0x7ff0000000000000
|
||||
.quad 0xfff0000000000000
|
||||
.rept 48
|
||||
@@ -1640,9 +1649,12 @@ double_vector _L2 0x3fe62e42fefa39ef
|
||||
.endr
|
||||
|
||||
/* DP 1.0, +/- */
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_dlog_data != _dOnes
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.quad 0x3ff0000000000000
|
||||
.quad 0xbff0000000000000
|
||||
.rept 48
|
||||
@@ -1650,9 +1662,12 @@ double_vector _L2 0x3fe62e42fefa39ef
|
||||
.endr
|
||||
|
||||
/* DP 0.0, +/- */
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_dlog_data != _dZeros
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.quad 0x0000000000000000
|
||||
.quad 0x8000000000000000
|
||||
.rept 48
|
||||
|
||||
@@ -43,9 +43,12 @@
|
||||
#define _dZeros 13568
|
||||
|
||||
.macro double_vector offset value
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_dlog_data != \offset
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.rept 8
|
||||
.quad \value
|
||||
.endr
|
||||
|
||||
@@ -30,9 +30,12 @@
|
||||
__svml_dpow_data:
|
||||
|
||||
/* Lookup log(2) table (for HSW): */
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_dpow_data != _hsw_log2_table
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.quad 0xc08ff00000000000
|
||||
.quad 0x0000000000000000
|
||||
.quad 0xc08ff005c3e0ffc2
|
||||
@@ -1064,9 +1067,12 @@ __svml_dpow_data:
|
||||
.endr
|
||||
|
||||
/* Lookup exp(2) table (for HSW): */
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_dpow_data != _hsw_dTe
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.quad 0x3ff0000000000000
|
||||
.quad 0x3ff00b1afa5abcbf
|
||||
.quad 0x3ff0163da9fb3335
|
||||
@@ -1395,9 +1401,12 @@ double_vector _hsw_dce2 0x3fcebfbdff82c54d
|
||||
double_vector _hsw_dce1 0x3fe62e42fefa39b9
|
||||
|
||||
/* Reciprocal lookup table for log part (non HSW): */
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_dpow_data != _rcp_t1
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.quad 0x3ff7154740000000
|
||||
.quad 0x3ff70f8340000000
|
||||
.quad 0x3ff709c240000000
|
||||
@@ -2429,9 +2438,12 @@ double_vector _hsw_dce1 0x3fe62e42fefa39b9
|
||||
.endr
|
||||
|
||||
/* Log(2) lookup table for log part (non HSW): */
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_dpow_data != _log2_t1
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.rept 2
|
||||
.quad 0x0000000000000000
|
||||
.endr
|
||||
@@ -4489,9 +4501,12 @@ double_vector _hsw_dce1 0x3fe62e42fefa39b9
|
||||
.endr
|
||||
|
||||
/* Exp(2) lookup table for exp part (non HSW) */
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_dpow_data != _exp2_tbl
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.quad 0x3ff0000000000000
|
||||
.quad 0x0000000000000000
|
||||
.quad 0x3ff0163da9fb3335
|
||||
|
||||
@@ -84,18 +84,24 @@
|
||||
#define _jIndexMask 40704
|
||||
|
||||
.macro double_vector offset value
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_dpow_data != \offset
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.rept 8
|
||||
.quad \value
|
||||
.endr
|
||||
.endm
|
||||
|
||||
.macro float_vector offset value
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_dpow_data != \offset
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.rept 16
|
||||
.long \value
|
||||
.endr
|
||||
|
||||
@@ -61,9 +61,15 @@
|
||||
#define __dSignMask __lNZero
|
||||
|
||||
.macro double_vector offset value
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_d_trig_data != \offset
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.short 0x1234
|
||||
.long .-__svml_d_trig_data
|
||||
.short 0x4321
|
||||
.rept 8
|
||||
.quad \value
|
||||
.endr
|
||||
|
||||
@@ -34,9 +34,12 @@
|
||||
#define __iDomainRange 768
|
||||
|
||||
.macro float_vector offset value
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_sexp_data != \offset
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.rept 16
|
||||
.long \value
|
||||
.endr
|
||||
|
||||
@@ -70,9 +70,12 @@ float_vector _sOne 0x3f800000
|
||||
float_vector _sLn2 0x3f317218
|
||||
|
||||
/* SP infinity, +/- */
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_slog_data != _sInfs
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.long 0x7f800000
|
||||
.long 0xff800000
|
||||
.rept 56
|
||||
@@ -80,9 +83,12 @@ float_vector _sLn2 0x3f317218
|
||||
.endr
|
||||
|
||||
/* SP one, +/- */
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_slog_data != _sOnes
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.long 0x3f800000
|
||||
.long 0xbf800000
|
||||
.rept 56
|
||||
@@ -90,9 +96,12 @@ float_vector _sLn2 0x3f317218
|
||||
.endr
|
||||
|
||||
/* SP zero +/- */
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_slog_data != _sZeros
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.long 0x00000000
|
||||
.long 0x80000000
|
||||
.rept 56
|
||||
|
||||
@@ -37,9 +37,12 @@
|
||||
#define _sZeros 960
|
||||
|
||||
.macro float_vector offset value
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_slog_data != \offset
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.rept 16
|
||||
.long \value
|
||||
.endr
|
||||
|
||||
@@ -46,9 +46,12 @@ float_vector _ABSMASK 0x7fffffff
|
||||
float_vector _DOMAINRANGE 0x42ae9a00
|
||||
|
||||
/* Log(2) lookup High+Low table for logarithmic part */
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_spow_data != _Log_HA_table
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.quad 0xc086232bdd7a8300
|
||||
.quad 0xbe1ce91eef3fb100
|
||||
.quad 0xc086232fdc7ad828
|
||||
@@ -1080,9 +1083,12 @@ float_vector _DOMAINRANGE 0x42ae9a00
|
||||
.endr
|
||||
|
||||
/* Log(2) lookup table for logarithmic part */
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_spow_data != _Log_LA_table
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.quad 0x8000000000000000
|
||||
.quad 0xbf5ff802a9ab10e6
|
||||
.quad 0xbf6ff00aa2b10bc0
|
||||
@@ -1650,9 +1656,12 @@ double_vector _Bias1 0x408ff00000000000
|
||||
double_vector _L2 0x3fe62e42fefa39ef
|
||||
|
||||
/* dInfs = DP infinity, +/- == */
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_spow_data != _dInfs
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.quad 0x7ff0000000000000
|
||||
.quad 0xfff0000000000000
|
||||
.rept 48
|
||||
@@ -1660,9 +1669,12 @@ double_vector _L2 0x3fe62e42fefa39ef
|
||||
.endr
|
||||
|
||||
/* dOnes = DP one, +/- == */
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_spow_data != _dOnes
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.quad 0x3ff0000000000000
|
||||
.quad 0xbff0000000000000
|
||||
.rept 48
|
||||
@@ -1670,17 +1682,23 @@ double_vector _L2 0x3fe62e42fefa39ef
|
||||
.endr
|
||||
|
||||
/* dZeros = DP zero +/- == */
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_spow_data != _dZeros
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.quad 0x0000000000000000
|
||||
.quad 0x8000000000000000
|
||||
.rept 48
|
||||
.byte 0
|
||||
.endr
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_spow_data != __dbT
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.quad 0x3feffffffc27dd9e
|
||||
.quad 0x3ff00162f1a4047d
|
||||
.quad 0x3ff002c603f68252
|
||||
|
||||
@@ -56,18 +56,24 @@
|
||||
#define __iDomainRange 30784
|
||||
|
||||
.macro double_vector offset value
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_spow_data != \offset
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.rept 8
|
||||
.quad \value
|
||||
.endr
|
||||
.endm
|
||||
|
||||
.macro float_vector offset value
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_spow_data != \offset
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.rept 16
|
||||
.long \value
|
||||
.endr
|
||||
|
||||
@@ -20,9 +20,12 @@
|
||||
#define S_TRIG_DATA_H
|
||||
|
||||
.macro float_vector offset value
|
||||
/* clang integrated assembler doesn't think subtract yields an absolute, skip. */
|
||||
#if !defined(__clang__)
|
||||
.if .-__svml_s_trig_data != \offset
|
||||
.err
|
||||
.endif
|
||||
#endif
|
||||
.rept 16
|
||||
.long \value
|
||||
.endr
|
||||
|
||||
@@ -2232,8 +2232,9 @@ LABEL(strcmp_exitz):
|
||||
|
||||
.p2align 4
|
||||
LABEL(Byte0):
|
||||
movzx (%rsi), %ecx
|
||||
movzx (%rdi), %eax
|
||||
# Clang assembler objects to movzx here.
|
||||
movzbl (%rsi), %ecx
|
||||
movzbl (%rdi), %eax
|
||||
|
||||
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
||||
leaq _nl_C_LC_CTYPE_tolower+128*4(%rip), %rdx
|
||||
|
||||
Reference in New Issue
Block a user