mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-21 17:31:10 +03:00
Handle clang -Wignored-attributes on weak aliases
Clang issues a warning for double alias redirection, indicating that thei
original symbol is used even if a weak definition attempts to override it.
For instance, in the construction:
int __internal_impl (...) {}
weak_alias (__internal_impl, external_impl);
#if SOMETHING
weak_alias (external_impl, another_external_impl)
#endif
Clang warns that another_external_impl always resolves to __internal_impl,
even if external_impl is a weak reference. Using the internal symbol for
both aliases resolves this warning.
This issue also occurs with certain libc_hidden_def usage:
int __internal_impl (...) {}
weak_alias (__internal_impl, __internal_alias)
libc_hidden_weak (__internal_alias)
In this case, using a strong_alias is sufficient to avoid the warning
(since the alias is internal, there is no need to use a weak alias).
However, for the constructions like:
int __internal_impl (...) {}
weak_alias (__internal_impl, __internal_alias)
libc_hidden_def (__internal_alias)
weak_alias (__internal_impl, external_alias)
libc_hidden_def (external_alias)
Clang warns that the internal external_alias will always resolve to
__GI___internal_impl, even if a weak definition of __GI_internal_impl is
overridden. For this case, a new macro named static_weak_alias is used
to create a strong alias for SHARED, or a weak_alias otherwise.
With these changes, there is no need to check and enable the
-Wno-ignored-attributes suppression when using clang.
Checked with a build on affected ABIs, and a full check on aarch64,
armhf, i686, and x86_64.
Reviewed-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -5,7 +5,6 @@ TEST_CXX = @TEST_CXX@
|
||||
test-cc-option-wimplicit-fallthrough = @libc_cv_test_cc_wimplicit_fallthrough@
|
||||
test-config-cflags-mprefer-vector-width = @libc_cv_test_cc_mprefer_vector_width@
|
||||
test-config-cflags-signaling-nans = @libc_cv_test_cc_signaling_nans@
|
||||
test-config-cflags-wno-ignored-attributes = @libc_cv_test_wno_ignored_attributes@
|
||||
test-cc-option-wfree-labels = @libc_cv_test_cc_wfree_labels@
|
||||
test-cc-option-wmissing-parameter-name = @libc_cv_test_cc_wmissing_parameter_name@
|
||||
test-enable-cet = @test_enable_cet@
|
||||
@@ -26,7 +25,6 @@ check xcheck test:
|
||||
cc-option-wimplicit-fallthrough="$(test-cc-option-wimplicit-fallthrough)" \
|
||||
config-cflags-mprefer-vector-width="$(test-config-cflags-mprefer-vector-width)" \
|
||||
config-cflags-signaling-nans="$(test-config-cflags-signaling-nans)" \
|
||||
config-cflags-wno-ignored-attributes="$(test-config-cflags-wno-ignored-attributes)" \
|
||||
cc-option-wfree-labels="$(test-cc-option-wfree-labels)" \
|
||||
cc-option-wmissing-parameter-name="$(test-cc-option-wmissing-parameter-name)" \
|
||||
enable-cet="$(test-enable-cet)" \
|
||||
|
||||
@@ -148,6 +148,7 @@ test_main (void)
|
||||
#define libc_hidden_def(X)
|
||||
#define libc_hidden_weak(X)
|
||||
#define weak_alias(X,Y)
|
||||
#define static_weak_alias(X,Y)
|
||||
#ifndef WIDE
|
||||
# undef MEMSET
|
||||
# define MEMSET generic_memset
|
||||
|
||||
70
configure
vendored
70
configure
vendored
@@ -655,7 +655,6 @@ libc_cv_cc_loop_to_function
|
||||
libc_cv_test_cc_signaling_nans
|
||||
libc_cv_cc_submachine
|
||||
libc_cv_cc_nofma
|
||||
libc_cv_test_wno_ignored_attributes
|
||||
libc_cv_has_glob_dat
|
||||
libc_cv_fpie
|
||||
libc_cv_test_static_pie
|
||||
@@ -7544,75 +7543,6 @@ rm -f conftest*
|
||||
config_vars="$config_vars
|
||||
have-test-mtls-traditional = $libc_cv_test_mtls_traditional"
|
||||
|
||||
conftest_code="
|
||||
void __foo (void)
|
||||
{
|
||||
}
|
||||
extern __typeof (__foo) foo __attribute__ ((weak, alias (\"__foo\")));
|
||||
extern __typeof (__foo) bar __attribute__ ((weak, alias (\"foo\")));
|
||||
"
|
||||
|
||||
cat > conftest.c <<EOF
|
||||
$conftest_code
|
||||
EOF
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -Wno-ignored-attributes is required for aliases" >&5
|
||||
printf %s "checking if -Wno-ignored-attributes is required for aliases... " >&6; }
|
||||
if test ${libc_cv_wno_ignored_attributes+y}
|
||||
then :
|
||||
printf %s "(cached) " >&6
|
||||
else case e in #(
|
||||
e) if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c -Werror -Wno-ignored-attributes conftest.c -o conftest 1>&5'
|
||||
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; }
|
||||
then
|
||||
libc_cv_wno_ignored_attributes="-Wno-ignored-attributes"
|
||||
else
|
||||
libc_cv_wno_ignored_attributes=
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_ignored_attributes" >&5
|
||||
printf "%s\n" "$libc_cv_wno_ignored_attributes" >&6; }
|
||||
if test "$TEST_CC" = "$CC"; then
|
||||
libc_cv_test_wno_ignored_attributes=$libc_cv_wno_ignored_attributes
|
||||
else
|
||||
|
||||
saved_CC="$CC"
|
||||
CC="$TEST_CC"
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -Wno-ignored-attributes is required for aliases in testing" >&5
|
||||
printf %s "checking if -Wno-ignored-attributes is required for aliases in testing... " >&6; }
|
||||
if test ${libc_cv_test_wno_ignored_attributes+y}
|
||||
then :
|
||||
printf %s "(cached) " >&6
|
||||
else case e in #(
|
||||
e) if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c -Werror -Wno-ignored-attributes conftest.c -o conftest 1>&5'
|
||||
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; }
|
||||
then
|
||||
libc_cv_test_wno_ignored_attributes="-Wno-ignored-attributes"
|
||||
else
|
||||
libc_cv_test_wno_ignored_attributes=
|
||||
fi ;;
|
||||
esac
|
||||
fi
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_test_wno_ignored_attributes" >&5
|
||||
printf "%s\n" "$libc_cv_test_wno_ignored_attributes" >&6; }
|
||||
|
||||
CC="$saved_CC"
|
||||
|
||||
fi
|
||||
rm -f conftest*
|
||||
config_vars="$config_vars
|
||||
config-cflags-wno-ignored-attributes = $libc_cv_wno_ignored_attributes"
|
||||
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wno-maybe-uninitialized" >&5
|
||||
printf %s "checking for -Wno-maybe-uninitialized... " >&6; }
|
||||
if test ${libc_cv_wno_maybe_uninitialized+y}
|
||||
|
||||
24
configure.ac
24
configure.ac
@@ -1420,30 +1420,6 @@ LIBC_TRY_TEST_CC_COMMAND([for traditional tls support],
|
||||
LIBC_CONFIG_VAR([have-test-mtls-traditional],
|
||||
[$libc_cv_test_mtls_traditional])
|
||||
|
||||
dnl clang emits an warning for a double alias redirection, to warn the
|
||||
dnl original symbol is sed even when weak definition overrides it.
|
||||
dnl It is a usual pattern for weak_alias, where multiple alias point to
|
||||
dnl same symbol.
|
||||
conftest_code="
|
||||
void __foo (void)
|
||||
{
|
||||
}
|
||||
extern __typeof (__foo) foo __attribute__ ((weak, alias (\"__foo\")));
|
||||
extern __typeof (__foo) bar __attribute__ ((weak, alias (\"foo\")));
|
||||
"
|
||||
LIBC_TRY_CC_AND_TEST_CC_COMMAND([if -Wno-ignored-attributes is required for aliases],
|
||||
[$conftest_code],
|
||||
[-c -Werror -Wno-ignored-attributes],
|
||||
libc_cv_wno_ignored_attributes,
|
||||
[libc_cv_wno_ignored_attributes="-Wno-ignored-attributes"],
|
||||
[libc_cv_wno_ignored_attributes=],
|
||||
libc_cv_test_wno_ignored_attributes,
|
||||
[libc_cv_test_wno_ignored_attributes="-Wno-ignored-attributes"],
|
||||
[libc_cv_test_wno_ignored_attributes=])
|
||||
LIBC_CONFIG_VAR([config-cflags-wno-ignored-attributes],
|
||||
[$libc_cv_wno_ignored_attributes])
|
||||
AC_SUBST(libc_cv_test_wno_ignored_attributes)
|
||||
|
||||
AC_CACHE_CHECK([for -Wno-maybe-uninitialized],
|
||||
libc_cv_wno_maybe_uninitialized, [dnl
|
||||
LIBC_TRY_CC_OPTION([-Werror -Wno-maybe-uninitialized],
|
||||
|
||||
@@ -85,7 +85,6 @@ CFLAGS-scandir.c += $(uses-callbacks)
|
||||
CFLAGS-scandir64.c += $(uses-callbacks)
|
||||
CFLAGS-scandir-tail.c += $(uses-callbacks)
|
||||
CFLAGS-scandir64-tail.c += $(uses-callbacks)
|
||||
CFLAGS-dirfd.c += $(config-cflags-wno-ignored-attributes)
|
||||
|
||||
include ../Rules
|
||||
|
||||
|
||||
@@ -156,6 +156,16 @@
|
||||
extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))) \
|
||||
__attribute_copy__ (name);
|
||||
|
||||
/* Define a strong_alias for SHARED, or weak_alias otherwise. It is used to
|
||||
avoid potential compiler warnings for weak alias indirection (when a weak
|
||||
alias is always resolved to a symbol even if a weak definition also
|
||||
exists). */
|
||||
# ifdef SHARED
|
||||
# define static_weak_alias(name, aliasname) strong_alias (name, aliasname)
|
||||
# else
|
||||
# define static_weak_alias(name, aliasname) weak_alias (name, aliasname)
|
||||
# endif
|
||||
|
||||
/* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined). */
|
||||
# define weak_extern(symbol) _weak_extern (weak symbol)
|
||||
# define _weak_extern(expr) _Pragma (#expr)
|
||||
|
||||
@@ -124,9 +124,6 @@ ifeq ($(have-thread-library),yes)
|
||||
CFLAGS-rcmd.c += -fexceptions
|
||||
CFLAGS-either_ntoh.c += -fexceptions
|
||||
CFLAGS-either_hton.c += -fexceptions
|
||||
CFLAGS-in6_addr.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-if_index.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-ifaddrs.c += $(config-cflags-wno-ignored-attributes)
|
||||
|
||||
CFLAGS-tst-checks-posix.c += -std=c99
|
||||
CFLAGS-tst-sockaddr.c += -fno-strict-aliasing
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
const struct in6_addr __in6addr_any =
|
||||
{ { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } };
|
||||
libc_hidden_data_def (__in6addr_any)
|
||||
weak_alias (__in6addr_any, in6addr_any)
|
||||
static_weak_alias (__in6addr_any, in6addr_any)
|
||||
libc_hidden_data_weak (in6addr_any)
|
||||
const struct in6_addr __in6addr_loopback =
|
||||
{ { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } };
|
||||
libc_hidden_data_def (__in6addr_loopback)
|
||||
weak_alias (__in6addr_loopback, in6addr_loopback)
|
||||
static_weak_alias (__in6addr_loopback, in6addr_loopback)
|
||||
libc_hidden_data_weak (in6addr_loopback)
|
||||
|
||||
18
io/Makefile
18
io/Makefile
@@ -267,21 +267,20 @@ endif
|
||||
|
||||
include ../Rules
|
||||
|
||||
CFLAGS-open.c += -fexceptions -fasynchronous-unwind-tables $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-openat.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-open.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-open64.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-creat.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-creat64.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-fcntl.c += -fexceptions -fasynchronous-unwind-tables $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-fcntl64.c += -fexceptions -fasynchronous-unwind-tables $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-fcntl.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-fcntl64.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-poll.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-ppoll.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-lockf.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-lockf64.c += -fexceptions -fasynchronous-unwind-tables $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-lockf64.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-statfs.c += -fexceptions
|
||||
CFLAGS-fstatfs.c += -fexceptions
|
||||
CFLAGS-statvfs.c += -fexceptions $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-fstatvfs.c += -fexceptions $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-statvfs.c += -fexceptions
|
||||
CFLAGS-fstatvfs.c += -fexceptions
|
||||
CFLAGS-fts.c += -Wno-uninitialized $(uses-callbacks) -fexceptions
|
||||
CFLAGS-fts64.c += -Wno-uninitialized $(uses-callbacks) -fexceptions
|
||||
CFLAGS-fts64-time64.c += -Wno-uninitialized $(uses-callbacks) -fexceptions
|
||||
@@ -292,10 +291,9 @@ CFLAGS-posix_fallocate.c += -fexceptions
|
||||
CFLAGS-posix_fallocate64.c += -fexceptions
|
||||
CFLAGS-fallocate.c += -fexceptions
|
||||
CFLAGS-fallocate64.c += -fexceptions
|
||||
CFLAGS-read.c += -fexceptions -fasynchronous-unwind-tables $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-write.c += -fexceptions -fasynchronous-unwind-tables $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-read.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-write.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-close.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-lseek64.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-tst-read-zero.c += $(no-fortify-source) -D_FORTIFY_SOURCE=$(supported-fortify)
|
||||
|
||||
CFLAGS-test-stat.c += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
|
||||
|
||||
@@ -138,7 +138,6 @@ libc {
|
||||
closefrom;
|
||||
}
|
||||
GLIBC_PRIVATE {
|
||||
__libc_fcntl64;
|
||||
__fcntl_nocancel;
|
||||
__open64_nocancel;
|
||||
__write_nocancel;
|
||||
|
||||
@@ -58,5 +58,5 @@ __lockf64 (int fd, int cmd, off64_t len64)
|
||||
}
|
||||
weak_alias (__lockf64, lockf64)
|
||||
#ifdef __OFF_T_MATCHES_OFF64_T
|
||||
weak_alias (lockf64, lockf)
|
||||
weak_alias (__lockf64, lockf)
|
||||
#endif
|
||||
|
||||
@@ -199,18 +199,18 @@ CFLAGS-getchar.c += -fexceptions
|
||||
CFLAGS-getwc.c += -fexceptions
|
||||
CFLAGS-getwchar.c += -fexceptions
|
||||
CFLAGS-iofclose.c += -fexceptions
|
||||
CFLAGS-iofflush.c += -fexceptions $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-iofflush.c += -fexceptions
|
||||
CFLAGS-iofgetpos64.c += -fexceptions
|
||||
CFLAGS-iofgetpos.c += -fexceptions
|
||||
CFLAGS-iofgets.c += -fexceptions
|
||||
CFLAGS-iofgetws.c += -fexceptions
|
||||
CFLAGS-iofputs.c += -fexceptions $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-iofputs.c += -fexceptions
|
||||
CFLAGS-iofputws.c += -fexceptions
|
||||
CFLAGS-iofread.c += -fexceptions
|
||||
CFLAGS-iofsetpos64.c += -fexceptions
|
||||
CFLAGS-iofsetpos.c += -fexceptions
|
||||
CFLAGS-ioftell.c += -fexceptions
|
||||
CFLAGS-iofwrite.c += -fexceptions $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-iofwrite.c += -fexceptions
|
||||
CFLAGS-iogetdelim.c += -fexceptions
|
||||
CFLAGS-iogetline.c += -fexceptions
|
||||
CFLAGS-iogets.c += -fexceptions
|
||||
@@ -240,14 +240,6 @@ CFLAGS-oldiofopen.c += -fexceptions
|
||||
CFLAGS-iofopen.c += -fexceptions
|
||||
CFLAGS-iofopen64.c += -fexceptions
|
||||
CFLAGS-oldtmpfile.c += -fexceptions
|
||||
CFLAGS-fileno.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-feof_u.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-ferror_u.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-getc_u.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-iofflush_u.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-putc_u.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-iofgets_u.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-iofputs_u.c += $(config-cflags-wno-ignored-attributes)
|
||||
# XXX Do we need filedoalloc and wfiledoalloc? Others?
|
||||
|
||||
# Prevent fortification as these are built with -O0
|
||||
|
||||
@@ -35,5 +35,5 @@ __feof_unlocked (FILE *fp)
|
||||
CHECK_FILE (fp, EOF);
|
||||
return _IO_feof_unlocked (fp);
|
||||
}
|
||||
weak_alias (__feof_unlocked, feof_unlocked)
|
||||
static_weak_alias (__feof_unlocked, feof_unlocked)
|
||||
libc_hidden_weak (feof_unlocked)
|
||||
|
||||
@@ -35,5 +35,5 @@ __ferror_unlocked (FILE *fp)
|
||||
CHECK_FILE (fp, EOF);
|
||||
return _IO_ferror_unlocked (fp);
|
||||
}
|
||||
weak_alias (__ferror_unlocked, ferror_unlocked)
|
||||
static_weak_alias (__ferror_unlocked, ferror_unlocked)
|
||||
libc_hidden_weak (ferror_unlocked)
|
||||
|
||||
@@ -41,7 +41,7 @@ __fileno (FILE *fp)
|
||||
return _IO_fileno (fp);
|
||||
}
|
||||
libc_hidden_def (__fileno)
|
||||
weak_alias (__fileno, fileno)
|
||||
static_weak_alias (__fileno, fileno)
|
||||
libc_hidden_weak (fileno)
|
||||
|
||||
/* The fileno implementation for libio does not require locking because
|
||||
|
||||
@@ -36,6 +36,6 @@ __getc_unlocked (FILE *fp)
|
||||
return _IO_getc_unlocked (fp);
|
||||
}
|
||||
|
||||
weak_alias (__getc_unlocked, getc_unlocked)
|
||||
static_weak_alias (__getc_unlocked, getc_unlocked)
|
||||
libc_hidden_weak (getc_unlocked)
|
||||
weak_alias (__getc_unlocked, fgetc_unlocked)
|
||||
|
||||
@@ -44,7 +44,7 @@ _IO_fflush (FILE *fp)
|
||||
}
|
||||
libc_hidden_def (_IO_fflush)
|
||||
|
||||
weak_alias (_IO_fflush, fflush)
|
||||
static_weak_alias (_IO_fflush, fflush)
|
||||
libc_hidden_weak (fflush)
|
||||
|
||||
#ifndef _IO_MTSAFE_IO
|
||||
|
||||
@@ -39,5 +39,5 @@ __fflush_unlocked (FILE *fp)
|
||||
}
|
||||
}
|
||||
libc_hidden_def (__fflush_unlocked)
|
||||
weak_alias (__fflush_unlocked, fflush_unlocked)
|
||||
static_weak_alias (__fflush_unlocked, fflush_unlocked)
|
||||
libc_hidden_weak (fflush_unlocked)
|
||||
|
||||
@@ -63,5 +63,5 @@ __fgets_unlocked (char *buf, int n, FILE *fp)
|
||||
return result;
|
||||
}
|
||||
libc_hidden_def (__fgets_unlocked)
|
||||
weak_alias (__fgets_unlocked, fgets_unlocked)
|
||||
static_weak_alias (__fgets_unlocked, fgets_unlocked)
|
||||
libc_hidden_weak (fgets_unlocked)
|
||||
|
||||
@@ -42,7 +42,7 @@ _IO_fputs (const char *str, FILE *fp)
|
||||
}
|
||||
libc_hidden_def (_IO_fputs)
|
||||
|
||||
weak_alias (_IO_fputs, fputs)
|
||||
static_weak_alias (_IO_fputs, fputs)
|
||||
libc_hidden_weak (fputs)
|
||||
|
||||
# ifndef _IO_MTSAFE_IO
|
||||
|
||||
@@ -39,5 +39,5 @@ __fputs_unlocked (const char *str, FILE *fp)
|
||||
return result;
|
||||
}
|
||||
libc_hidden_def (__fputs_unlocked)
|
||||
weak_alias (__fputs_unlocked, fputs_unlocked)
|
||||
static_weak_alias (__fputs_unlocked, fputs_unlocked)
|
||||
libc_hidden_weak (fputs_unlocked)
|
||||
|
||||
@@ -79,7 +79,7 @@ _IO_fwrite (const void *buf, size_t size, size_t count, FILE *fp)
|
||||
libc_hidden_def (_IO_fwrite)
|
||||
|
||||
# include <stdio.h>
|
||||
weak_alias (_IO_fwrite, fwrite)
|
||||
static_weak_alias (_IO_fwrite, fwrite)
|
||||
libc_hidden_weak (fwrite)
|
||||
# ifndef _IO_MTSAFE_IO
|
||||
weak_alias (_IO_fwrite, fwrite_unlocked)
|
||||
|
||||
@@ -45,5 +45,5 @@ _IO_puts (const char *str)
|
||||
return result;
|
||||
}
|
||||
|
||||
weak_alias (_IO_puts, puts)
|
||||
static_weak_alias (_IO_puts, puts)
|
||||
libc_hidden_def (_IO_puts)
|
||||
|
||||
@@ -26,5 +26,5 @@ __putc_unlocked (int c, FILE *fp)
|
||||
CHECK_FILE (fp, EOF);
|
||||
return _IO_putc_unlocked (c, fp);
|
||||
}
|
||||
weak_alias (__putc_unlocked, putc_unlocked)
|
||||
static_weak_alias (__putc_unlocked, putc_unlocked)
|
||||
libc_hidden_weak (putc_unlocked)
|
||||
|
||||
@@ -110,7 +110,6 @@ endif # $(have-GLIBC_2.33)
|
||||
include ../Rules
|
||||
|
||||
CFLAGS-getpt.c += -fexceptions
|
||||
CFLAGS-getlogin_r.c += $(config-cflags-wno-ignored-attributes)
|
||||
|
||||
# Exclude fortified routines from being built with _FORTIFY_SOURCE
|
||||
routines_no_fortify += \
|
||||
|
||||
@@ -341,8 +341,6 @@ CFLAGS-tst-tsearch.c += $(stack-align-test-flags)
|
||||
CFLAGS-msync.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-fdatasync.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-fsync.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-makedev.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-mmap64.c += $(config-cflags-wno-ignored-attributes)
|
||||
|
||||
# Called during static library initialization, so turn stack-protection
|
||||
# off for non-shared builds.
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
rtype __gnu_dev_##name proto
|
||||
|
||||
__SYSMACROS_DEFINE_MAJOR(OUT_OF_LINE_IMPL_TEMPL)
|
||||
weak_alias (__gnu_dev_major, gnu_dev_major)
|
||||
static_weak_alias (__gnu_dev_major, gnu_dev_major)
|
||||
libc_hidden_weak (gnu_dev_major)
|
||||
__SYSMACROS_DEFINE_MINOR(OUT_OF_LINE_IMPL_TEMPL)
|
||||
weak_alias (__gnu_dev_minor, gnu_dev_minor)
|
||||
static_weak_alias (__gnu_dev_minor, gnu_dev_minor)
|
||||
libc_hidden_weak (gnu_dev_minor)
|
||||
__SYSMACROS_DEFINE_MAKEDEV(OUT_OF_LINE_IMPL_TEMPL)
|
||||
weak_alias (__gnu_dev_makedev, gnu_dev_makedev)
|
||||
static_weak_alias (__gnu_dev_makedev, gnu_dev_makedev)
|
||||
libc_hidden_weak (gnu_dev_makedev)
|
||||
|
||||
@@ -568,9 +568,9 @@ $(objpfx)config-name.h: $(..)scripts/config-uname.sh $(common-objpfx)config.make
|
||||
|
||||
CFLAGS-pause.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-pread.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-pread64.c += -fexceptions -fasynchronous-unwind-tables $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-pread64.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-pwrite.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-pwrite64.c += -fexceptions -fasynchronous-unwind-tables $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-pwrite64.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-sleep.c += -fexceptions
|
||||
CFLAGS-wait.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-waitid.c += -fexceptions -fasynchronous-unwind-tables
|
||||
@@ -599,7 +599,7 @@ CFLAGS-execl.os = -fomit-frame-pointer
|
||||
CFLAGS-execvp.os = -fomit-frame-pointer
|
||||
CFLAGS-execlp.os = -fomit-frame-pointer
|
||||
CFLAGS-nanosleep.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-fork.c = $(libio-mtsafe) $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-fork.c = $(libio-mtsafe)
|
||||
|
||||
tstgetopt-ARGS = -a -b -cfoobar --required foobar --optional=bazbug \
|
||||
--none random --col --color --colour
|
||||
|
||||
@@ -291,4 +291,4 @@ __confstr (int name, char *buf, size_t len)
|
||||
}
|
||||
libc_hidden_def (__confstr)
|
||||
libc_hidden_def (confstr)
|
||||
weak_alias (__confstr, confstr)
|
||||
static_weak_alias (__confstr, confstr)
|
||||
|
||||
@@ -137,6 +137,6 @@ __libc_fork (void)
|
||||
|
||||
return pid;
|
||||
}
|
||||
weak_alias (__libc_fork, __fork)
|
||||
strong_alias (__libc_fork, __fork)
|
||||
libc_hidden_def (__fork)
|
||||
weak_alias (__libc_fork, fork)
|
||||
|
||||
@@ -249,7 +249,6 @@ LOCALES := en_US.UTF-8 en_US.ISO-8859-1
|
||||
include ../gen-locales.mk
|
||||
|
||||
CFLAGS-res_hconf.c += -fexceptions
|
||||
CFLAGS-inet_pton.c += $(config-cflags-wno-ignored-attributes)
|
||||
|
||||
# The DNS NSS modules needs the resolver.
|
||||
$(objpfx)libnss_dns.so: $(objpfx)libresolv.so
|
||||
|
||||
@@ -43,5 +43,5 @@ __inet_pton (int af, const char *src, void *dst)
|
||||
return __inet_pton_length (af, src, strlen (src), dst);
|
||||
}
|
||||
libc_hidden_def (__inet_pton)
|
||||
weak_alias (__inet_pton, inet_pton)
|
||||
static_weak_alias (__inet_pton, inet_pton)
|
||||
libc_hidden_weak (inet_pton)
|
||||
|
||||
@@ -32,6 +32,3 @@ tests := \
|
||||
|
||||
|
||||
include ../Rules
|
||||
|
||||
CFLAGS-getrlimit64.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-getrlimit.c += $(config-cflags-wno-ignored-attributes)
|
||||
|
||||
@@ -87,11 +87,11 @@ aux := sa_len
|
||||
|
||||
include ../Rules
|
||||
|
||||
CFLAGS-recv.c += -fexceptions -fasynchronous-unwind-tables $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-recv.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-recvfrom.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-sendto.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-recvmsg.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-sendmsg.c += -fexceptions -fasynchronous-unwind-tables $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-send.c += -fexceptions -fasynchronous-unwind-tables $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-connect.c += -fexceptions -fasynchronous-unwind-tables $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-accept.c += -fexceptions -fasynchronous-unwind-tables $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-sendmsg.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-send.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-connect.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-accept.c += -fexceptions -fasynchronous-unwind-tables
|
||||
|
||||
@@ -717,8 +717,6 @@ CFLAGS-isoc23_vscanf.c += -fexceptions
|
||||
CFLAGS-isoc23_fscanf.c += -fexceptions
|
||||
CFLAGS-isoc23_scanf.c += -fexceptions
|
||||
|
||||
CFLAGS-dprintf.c += $(config-cflags-wno-ignored-attributes)
|
||||
|
||||
# Called during static library initialization, so turn stack-protection
|
||||
# off for non-shared builds.
|
||||
CFLAGS-_itoa.o = $(no-stack-protector)
|
||||
|
||||
@@ -543,18 +543,6 @@ CFLAGS-strfromd.c += $(libio-mtsafe)
|
||||
CFLAGS-strfromf.c += $(libio-mtsafe)
|
||||
CFLAGS-strfroml.c += $(libio-mtsafe)
|
||||
|
||||
CFLAGS-strtol.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-strtoul.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-strtoll.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-strtoull.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-strtof.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-strtof_l.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-strtod.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-strtod_l.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-strtold.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-strtold_l.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-secure-getenv.c += $(config-cflags-wno-ignored-attributes)
|
||||
|
||||
CFLAGS-tst-bsearch.c += $(stack-align-test-flags)
|
||||
CFLAGS-tst-qsort.c += $(stack-align-test-flags)
|
||||
CFLAGS-tst-makecontext.c += -funwind-tables
|
||||
|
||||
@@ -29,7 +29,7 @@ __libc_secure_getenv (const char *name)
|
||||
return __libc_enable_secure ? NULL : getenv (name);
|
||||
}
|
||||
weak_alias (__libc_secure_getenv, secure_getenv)
|
||||
libc_hidden_weak (__libc_secure_getenv)
|
||||
libc_hidden_def (__libc_secure_getenv)
|
||||
|
||||
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_17)
|
||||
compat_symbol (libc, __libc_secure_getenv, __secure_getenv, GLIBC_2_0);
|
||||
|
||||
@@ -1785,7 +1785,7 @@ __STRTOF (const STRING_TYPE *nptr, STRING_TYPE **endptr, locale_t loc)
|
||||
libc_hidden_def (__STRTOF)
|
||||
libc_hidden_ver (__STRTOF, STRTOF)
|
||||
#endif
|
||||
weak_alias (__STRTOF, STRTOF)
|
||||
static_weak_alias (__STRTOF, STRTOF)
|
||||
|
||||
#ifdef LONG_DOUBLE_COMPAT
|
||||
# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_1)
|
||||
@@ -1809,18 +1809,18 @@ compat_symbol (libc, strtod_l, strtold_l, GLIBC_2_3);
|
||||
# undef strtof64_l
|
||||
# undef wcstof64_l
|
||||
# ifdef USE_WIDE_CHAR
|
||||
weak_alias (wcstod_l, wcstof64_l)
|
||||
weak_alias (__wcstod_l, wcstof64_l)
|
||||
# else
|
||||
weak_alias (strtod_l, strtof64_l)
|
||||
weak_alias (__strtod_l, strtof64_l)
|
||||
# endif
|
||||
# endif
|
||||
# if __HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X
|
||||
# undef strtof32x_l
|
||||
# undef wcstof32x_l
|
||||
# ifdef USE_WIDE_CHAR
|
||||
weak_alias (wcstod_l, wcstof32x_l)
|
||||
weak_alias (__wcstod_l, wcstof32x_l)
|
||||
# else
|
||||
weak_alias (strtod_l, strtof32x_l)
|
||||
weak_alias (__strtod_l, strtof32x_l)
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -47,8 +47,8 @@ extern float ____strtof_l_internal (const char *, char **, int, locale_t);
|
||||
# undef strtof32_l
|
||||
# undef wcstof32_l
|
||||
# ifdef USE_WIDE_CHAR
|
||||
weak_alias (wcstof_l, wcstof32_l)
|
||||
weak_alias (__wcstof_l, wcstof32_l)
|
||||
# else
|
||||
weak_alias (strtof_l, strtof32_l)
|
||||
weak_alias (__strtof_l, strtof32_l)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -117,7 +117,7 @@ __strtol (const STRING_TYPE *nptr, STRING_TYPE **endptr, int base)
|
||||
return INTERNAL (__strtol_l) (nptr, endptr, base, 0, false,
|
||||
_NL_CURRENT_LOCALE);
|
||||
}
|
||||
weak_alias (__strtol, strtol)
|
||||
static_weak_alias (__strtol, strtol)
|
||||
libc_hidden_weak (strtol)
|
||||
|
||||
INT
|
||||
|
||||
@@ -287,15 +287,6 @@ CFLAGS-wordcopy.c += $(no-stack-protector)
|
||||
CFLAGS-strncmp.c += $(no-stack-protector)
|
||||
CFLAGS-memset.c += $(no-stack-protector)
|
||||
|
||||
CFLAGS-argz-next.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-basename.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-ffs.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-memmem.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-memchr.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-mempcpy.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-stpcpy.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-strnlen.c += $(config-cflags-wno-ignored-attributes)
|
||||
|
||||
ifeq ($(run-built-tests),yes)
|
||||
$(objpfx)tst-svc-cmp.out: tst-svc.expect $(objpfx)tst-svc.out
|
||||
cmp $^ > $@; \
|
||||
|
||||
@@ -36,5 +36,5 @@ __argz_next (const char *argz, size_t argz_len, const char *entry)
|
||||
return NULL;
|
||||
}
|
||||
libc_hidden_def (__argz_next)
|
||||
weak_alias (__argz_next, argz_next)
|
||||
static_weak_alias (__argz_next, argz_next)
|
||||
libc_hidden_weak (argz_next)
|
||||
|
||||
@@ -25,5 +25,5 @@ __basename (const char *filename)
|
||||
return p ? p + 1 : (char *) filename;
|
||||
}
|
||||
libc_hidden_def (__basename)
|
||||
weak_alias (__basename, basename)
|
||||
static_weak_alias (__basename, basename)
|
||||
libc_hidden_weak (basename)
|
||||
|
||||
@@ -47,7 +47,7 @@ __ffs (int i)
|
||||
return table[x >> a] + a;
|
||||
#endif
|
||||
}
|
||||
weak_alias (__ffs, ffs)
|
||||
static_weak_alias (__ffs, ffs)
|
||||
libc_hidden_def (__ffs)
|
||||
libc_hidden_builtin_def (ffs)
|
||||
|
||||
|
||||
@@ -37,9 +37,9 @@ __ffsll (long long int i)
|
||||
return 32 + ffs (i >> 32);
|
||||
#endif
|
||||
}
|
||||
weak_alias (__ffsll, ffsll)
|
||||
static_weak_alias (__ffsll, ffsll)
|
||||
|
||||
#if ULONG_MAX != UINT_MAX
|
||||
#undef ffsl
|
||||
weak_alias (ffsll, ffsl)
|
||||
static_weak_alias (__ffsll, ffsl)
|
||||
#endif
|
||||
|
||||
@@ -125,5 +125,5 @@ __memmem (const void *haystack, size_t hs_len,
|
||||
return NULL;
|
||||
}
|
||||
libc_hidden_def (__memmem)
|
||||
weak_alias (__memmem, memmem)
|
||||
static_weak_alias (__memmem, memmem)
|
||||
libc_hidden_weak (memmem)
|
||||
|
||||
@@ -35,5 +35,5 @@ MEMPCPY (void *dest, const void *src, size_t len)
|
||||
return memcpy (dest, src, len) + len;
|
||||
}
|
||||
libc_hidden_def (__mempcpy)
|
||||
weak_alias (__mempcpy, mempcpy)
|
||||
static_weak_alias (__mempcpy, mempcpy)
|
||||
libc_hidden_builtin_def (mempcpy)
|
||||
|
||||
@@ -47,8 +47,8 @@ IMPL (MEMCHR, 1)
|
||||
|
||||
/* Also check the generic implementation. */
|
||||
#undef MEMCHR
|
||||
#undef weak_alias
|
||||
#define weak_alias(a, b)
|
||||
#undef static_weak_alias
|
||||
#define static_weak_alias(a, b)
|
||||
#undef libc_hidden_builtin_def
|
||||
#define libc_hidden_builtin_def(a)
|
||||
#undef libc_hidden_def
|
||||
|
||||
@@ -74,8 +74,8 @@ IMPL (STRCHR, 1)
|
||||
|
||||
/* Also check the generic implementation. */
|
||||
#undef STRCHR
|
||||
#undef weak_alias
|
||||
#define weak_alias(a, b)
|
||||
#undef static_weak_alias
|
||||
#define static_weak_alias(a, b)
|
||||
#undef libc_hidden_builtin_def
|
||||
#define libc_hidden_builtin_def(a)
|
||||
#undef libc_hidden_def
|
||||
|
||||
@@ -41,8 +41,8 @@ IMPL (STRLEN, 1)
|
||||
|
||||
/* Also check the generic implementation. */
|
||||
#undef STRLEN
|
||||
#undef weak_alias
|
||||
#define weak_alias(a, b)
|
||||
#undef static_weak_alias
|
||||
#define static_weak_alias(a, b)
|
||||
#undef libc_hidden_builtin_def
|
||||
#define libc_hidden_builtin_def(a)
|
||||
#ifndef WIDE
|
||||
|
||||
@@ -47,7 +47,7 @@ typedef size_t (*proto_t) (const CHAR *, size_t);
|
||||
#undef STRNLEN
|
||||
#ifndef WIDE
|
||||
# define MEMCHR __memchr_default
|
||||
# define weak_alias(a, b)
|
||||
# define static_weak_alias(a, b)
|
||||
# define libc_hidden_def(a)
|
||||
# define libc_hidden_builtin_def(a)
|
||||
# include "string/memchr.c"
|
||||
@@ -58,7 +58,7 @@ typedef size_t (*proto_t) (const CHAR *, size_t);
|
||||
IMPL (__strnlen_default, 1)
|
||||
#else
|
||||
# define WMEMCHR __wmemchr_default
|
||||
# define weak_alias(a, b)
|
||||
# define static_weak_alias(a, b)
|
||||
# define libc_hidden_def(a)
|
||||
# define libc_hidden_weak(a)
|
||||
# include "wcsmbs/wmemchr.c"
|
||||
|
||||
@@ -62,7 +62,6 @@ endif
|
||||
|
||||
ifeq ($(subdir),math)
|
||||
CPPFLAGS += -I../soft-fp
|
||||
CFLAGS-feupdateenv.c += $(config-cflags-wno-ignored-attributes)
|
||||
endif
|
||||
|
||||
ifeq ($(subdir),misc)
|
||||
|
||||
@@ -35,6 +35,6 @@ __feclearexcept (int excepts)
|
||||
|
||||
return 0;
|
||||
}
|
||||
weak_alias (__feclearexcept, feclearexcept)
|
||||
static_weak_alias (__feclearexcept, feclearexcept)
|
||||
libm_hidden_def (__feclearexcept)
|
||||
libm_hidden_def (feclearexcept)
|
||||
|
||||
@@ -31,5 +31,5 @@ __fegetenv (fenv_t *envp)
|
||||
return 0;
|
||||
}
|
||||
libm_hidden_def (__fegetenv)
|
||||
weak_alias (__fegetenv, fegetenv)
|
||||
static_weak_alias (__fegetenv, fegetenv)
|
||||
libm_hidden_weak (fegetenv)
|
||||
|
||||
@@ -25,5 +25,5 @@ __fegetround (void)
|
||||
return get_rounding_mode ();
|
||||
}
|
||||
libm_hidden_def (__fegetround)
|
||||
weak_alias (__fegetround, fegetround)
|
||||
static_weak_alias (__fegetround, fegetround)
|
||||
libm_hidden_weak (fegetround)
|
||||
|
||||
@@ -26,5 +26,5 @@ __feholdexcept (fenv_t *envp)
|
||||
return 0;
|
||||
}
|
||||
libm_hidden_def (__feholdexcept)
|
||||
weak_alias (__feholdexcept, feholdexcept)
|
||||
static_weak_alias (__feholdexcept, feholdexcept)
|
||||
libm_hidden_weak (feholdexcept)
|
||||
|
||||
@@ -74,5 +74,5 @@ __fesetenv (const fenv_t *envp)
|
||||
return 0;
|
||||
}
|
||||
libm_hidden_def (__fesetenv)
|
||||
weak_alias (__fesetenv, fesetenv)
|
||||
static_weak_alias (__fesetenv, fesetenv)
|
||||
libm_hidden_weak (fesetenv)
|
||||
|
||||
@@ -30,5 +30,5 @@ __fesetround (int round)
|
||||
return 0;
|
||||
}
|
||||
libm_hidden_def (__fesetround)
|
||||
weak_alias (__fesetround, fesetround)
|
||||
static_weak_alias (__fesetround, fesetround)
|
||||
libm_hidden_weak (fesetround)
|
||||
|
||||
@@ -85,5 +85,5 @@ __feupdateenv (const fenv_t *envp)
|
||||
return 0;
|
||||
}
|
||||
libm_hidden_def (__feupdateenv)
|
||||
weak_alias (__feupdateenv, feupdateenv)
|
||||
static_weak_alias (__feupdateenv, feupdateenv)
|
||||
libm_hidden_weak (feupdateenv)
|
||||
|
||||
@@ -90,5 +90,5 @@ __feraiseexcept (int excepts)
|
||||
return 0;
|
||||
}
|
||||
libm_hidden_def (__feraiseexcept)
|
||||
weak_alias (__feraiseexcept, feraiseexcept)
|
||||
static_weak_alias (__feraiseexcept, feraiseexcept)
|
||||
libm_hidden_weak (feraiseexcept)
|
||||
|
||||
@@ -25,5 +25,5 @@ __fetestexcept (int excepts)
|
||||
return libc_fetestexcept_aarch64 (excepts);
|
||||
}
|
||||
libm_hidden_def (__fetestexcept)
|
||||
weak_alias (__fetestexcept, fetestexcept)
|
||||
static_weak_alias (__fetestexcept, fetestexcept)
|
||||
libm_hidden_def (fetestexcept)
|
||||
|
||||
@@ -54,10 +54,6 @@ ifeq ($(subdir),gmon)
|
||||
sysdep_routines += arm-mcount
|
||||
endif
|
||||
|
||||
ifeq ($(subdir),math)
|
||||
CFLAGS-feupdateenv.c += $(config-cflags-wno-ignored-attributes)
|
||||
endif
|
||||
|
||||
ifeq ($(subdir),rt)
|
||||
librt-sysdep_routines += rt-aeabi_unwind_cpp_pr1 rt-arm-unwind-resume
|
||||
librt-shared-only-routines += rt-aeabi_unwind_cpp_pr1 rt-arm-unwind-resume
|
||||
|
||||
@@ -12,6 +12,6 @@
|
||||
#define long_double_symbol(lib, local, symbol)
|
||||
#define ldbl_hidden_def(local, name) libc_hidden_def (name)
|
||||
#define ldbl_strong_alias(name, aliasname) strong_alias (name, aliasname)
|
||||
#define ldbl_weak_alias(name, aliasname) weak_alias (name, aliasname)
|
||||
#define ldbl_weak_alias(name, aliasname) static_weak_alias (name, aliasname)
|
||||
#define ldbl_compat_symbol(lib, local, symbol, version) \
|
||||
compat_symbol (lib, local, symbol, version)
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
# undef libc_hidden_weak
|
||||
# define libc_hidden_weak(name)
|
||||
|
||||
# undef weak_alias
|
||||
# define weak_alias(name,alias)
|
||||
# undef static_weak_alias
|
||||
# define static_weak_alias(name,alias)
|
||||
|
||||
# ifdef SHARED
|
||||
# undef libc_hidden_def
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
#include <float128_private.h>
|
||||
#ifndef __USE_EXTERN_INLINES
|
||||
# undef libm_alias_float128_r
|
||||
# define libm_alias_float128_r(from, to, r) \
|
||||
static_weak_alias (from ## f128 ## r, to ## f128 ## r); \
|
||||
libm_alias_float128_other_r (from, to, r)
|
||||
#endif
|
||||
#include "../ldbl-128/s_fabsl.c"
|
||||
#ifndef __USE_EXTERN_INLINES
|
||||
libm_hidden_def (fabsf128)
|
||||
|
||||
@@ -50,9 +50,9 @@
|
||||
# undef strtof128_l
|
||||
# undef wcstof128_l
|
||||
# ifdef USE_WIDE_CHAR
|
||||
weak_alias (wcstold_l, wcstof128_l)
|
||||
weak_alias (__wcstold_l, wcstof128_l)
|
||||
# else
|
||||
weak_alias (strtold_l, strtof128_l)
|
||||
weak_alias (__strtold_l, strtof128_l)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -60,8 +60,8 @@ weak_alias (strtold_l, strtof128_l)
|
||||
# undef strtof64x_l
|
||||
# undef wcstof64x_l
|
||||
# ifdef USE_WIDE_CHAR
|
||||
weak_alias (wcstold_l, wcstof64x_l)
|
||||
weak_alias (__wcstold_l, wcstof64x_l)
|
||||
# else
|
||||
weak_alias (strtold_l, strtof64x_l)
|
||||
weak_alias (__strtold_l, strtof64x_l)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
# undef strtof64x_l
|
||||
# undef wcstof64x_l
|
||||
# ifdef USE_WIDE_CHAR
|
||||
weak_alias (wcstold_l, wcstof64x_l)
|
||||
static_weak_alias (__wcstold_l, wcstof64x_l)
|
||||
# else
|
||||
weak_alias (strtold_l, strtof64x_l)
|
||||
static_weak_alias (__strtold_l, strtof64x_l)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
|
||||
#undef libc_hidden_def
|
||||
#define libc_hidden_def(name)
|
||||
#undef weak_alias
|
||||
#define weak_alias(a, b)
|
||||
#undef static_weak_alias
|
||||
#define static_weak_alias(a, b)
|
||||
|
||||
#if defined SHARED
|
||||
# undef libc_hidden_builtin_def
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
# if HAVE_WCSCHR_IFUNC || HAVE_WCSCHR_Z13
|
||||
# define WCSCHR WCSCHR_C
|
||||
|
||||
# undef weak_alias
|
||||
# define weak_alias(name, alias)
|
||||
# undef static_weak_alias
|
||||
# define static_weak_alias(name, alias)
|
||||
|
||||
# if defined SHARED && IS_IN (libc)
|
||||
# undef libc_hidden_weak
|
||||
|
||||
@@ -30,5 +30,5 @@ __libc_accept (int fd, __SOCKADDR_ARG addr, socklen_t *len)
|
||||
return SOCKETCALL_CANCEL (accept, fd, addr.__sockaddr__, len);
|
||||
#endif
|
||||
}
|
||||
weak_alias (__libc_accept, accept)
|
||||
static_weak_alias (__libc_accept, accept)
|
||||
libc_hidden_def (accept)
|
||||
|
||||
@@ -28,6 +28,6 @@ __libc_connect (int fd, __CONST_SOCKADDR_ARG addr, socklen_t len)
|
||||
return SOCKETCALL_CANCEL (connect, fd, addr.__sockaddr__, len);
|
||||
#endif
|
||||
}
|
||||
weak_alias (__libc_connect, connect)
|
||||
weak_alias (__libc_connect, __connect)
|
||||
static_weak_alias (__libc_connect, connect)
|
||||
static_weak_alias (__libc_connect, __connect)
|
||||
libc_hidden_weak (__connect)
|
||||
|
||||
@@ -27,5 +27,5 @@ __dirfd (DIR *dirp)
|
||||
return dirp->fd;
|
||||
}
|
||||
|
||||
weak_alias (__dirfd, dirfd)
|
||||
static_weak_alias (__dirfd, dirfd)
|
||||
libc_hidden_def (dirfd)
|
||||
|
||||
@@ -51,7 +51,7 @@ __libc_fcntl64 (int fd, int cmd, ...)
|
||||
return __fcntl64_nocancel_adjusted (fd, cmd, arg);
|
||||
}
|
||||
libc_hidden_def (__libc_fcntl64)
|
||||
weak_alias (__libc_fcntl64, __fcntl64)
|
||||
strong_alias (__libc_fcntl64, __fcntl64)
|
||||
libc_hidden_weak (__fcntl64)
|
||||
weak_alias (__libc_fcntl64, fcntl64)
|
||||
#if __TIMESIZE != 64
|
||||
|
||||
@@ -114,5 +114,5 @@ __getlogin_r (char *name, size_t namesize)
|
||||
return getlogin_r_fd0 (name, namesize);
|
||||
}
|
||||
libc_hidden_def (__getlogin_r)
|
||||
weak_alias (__getlogin_r, getlogin_r)
|
||||
static_weak_alias (__getlogin_r, getlogin_r)
|
||||
libc_hidden_weak (getlogin_r)
|
||||
|
||||
@@ -48,8 +48,8 @@ strong_alias (__getrlimit64, __GI___getrlimit)
|
||||
strong_alias (__getrlimit64, __getrlimit)
|
||||
/* Alpha defines a versioned getrlimit{64}. */
|
||||
# ifndef USE_VERSIONED_RLIMIT
|
||||
weak_alias (__getrlimit64, getrlimit)
|
||||
weak_alias (__getrlimit64, getrlimit64)
|
||||
static_weak_alias (__getrlimit64, getrlimit)
|
||||
static_weak_alias (__getrlimit64, getrlimit64)
|
||||
libc_hidden_weak (getrlimit64)
|
||||
# else
|
||||
weak_alias (__getrlimit64, __GI_getrlimit64)
|
||||
|
||||
@@ -51,7 +51,7 @@ __if_nametoindex (const char *ifname)
|
||||
return status < 0 ? 0 : ifr.ifr_ifindex;
|
||||
}
|
||||
libc_hidden_def (__if_nametoindex)
|
||||
weak_alias (__if_nametoindex, if_nametoindex)
|
||||
static_weak_alias (__if_nametoindex, if_nametoindex)
|
||||
libc_hidden_weak (if_nametoindex)
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ __if_freenameindex (struct if_nameindex *ifn)
|
||||
free (ifn);
|
||||
}
|
||||
libc_hidden_def (__if_freenameindex)
|
||||
weak_alias (__if_freenameindex, if_freenameindex)
|
||||
static_weak_alias (__if_freenameindex, if_freenameindex)
|
||||
libc_hidden_weak (if_freenameindex)
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ __if_nameindex (void)
|
||||
|
||||
return idx;
|
||||
}
|
||||
weak_alias (__if_nameindex, if_nameindex)
|
||||
static_weak_alias (__if_nameindex, if_nameindex)
|
||||
libc_hidden_weak (if_nameindex)
|
||||
|
||||
|
||||
@@ -218,5 +218,5 @@ __if_indextoname (unsigned int ifindex, char ifname[IF_NAMESIZE])
|
||||
else
|
||||
return strncpy (ifname, ifr.ifr_name, IFNAMSIZ);
|
||||
}
|
||||
weak_alias (__if_indextoname, if_indextoname)
|
||||
static_weak_alias (__if_indextoname, if_indextoname)
|
||||
libc_hidden_weak (if_indextoname)
|
||||
|
||||
@@ -833,7 +833,7 @@ __getifaddrs (struct ifaddrs **ifap)
|
||||
|
||||
return res;
|
||||
}
|
||||
weak_alias (__getifaddrs, getifaddrs)
|
||||
static_weak_alias (__getifaddrs, getifaddrs)
|
||||
libc_hidden_def (__getifaddrs)
|
||||
libc_hidden_weak (getifaddrs)
|
||||
|
||||
@@ -843,6 +843,6 @@ __freeifaddrs (struct ifaddrs *ifa)
|
||||
{
|
||||
free (ifa);
|
||||
}
|
||||
weak_alias (__freeifaddrs, freeifaddrs)
|
||||
static_weak_alias (__freeifaddrs, freeifaddrs)
|
||||
libc_hidden_def (__freeifaddrs)
|
||||
libc_hidden_weak (freeifaddrs)
|
||||
|
||||
@@ -43,7 +43,7 @@ __lseek64 (int fd, off64_t offset, int whence)
|
||||
|
||||
#ifdef __OFF_T_MATCHES_OFF64_T
|
||||
weak_alias (__lseek64, lseek)
|
||||
weak_alias (__lseek64, __lseek)
|
||||
strong_alias (__lseek64, __lseek)
|
||||
strong_alias (__lseek64, __libc_lseek)
|
||||
libc_hidden_def (__lseek)
|
||||
#endif
|
||||
|
||||
@@ -62,7 +62,7 @@ weak_alias (__mmap64, mmap64)
|
||||
libc_hidden_def (__mmap64)
|
||||
|
||||
#ifdef __OFF_T_MATCHES_OFF64_T
|
||||
weak_alias (__mmap64, mmap)
|
||||
weak_alias (__mmap64, __mmap)
|
||||
static_weak_alias (__mmap64, mmap)
|
||||
strong_alias (__mmap64, __mmap)
|
||||
libc_hidden_def (__mmap)
|
||||
#endif
|
||||
|
||||
@@ -25,7 +25,7 @@ __libc_pread64 (int fd, void *buf, size_t count, off64_t offset)
|
||||
return SYSCALL_CANCEL (pread64, fd, buf, count, SYSCALL_LL64_PRW (offset));
|
||||
}
|
||||
|
||||
weak_alias (__libc_pread64, __pread64)
|
||||
strong_alias (__libc_pread64, __pread64)
|
||||
libc_hidden_weak (__pread64)
|
||||
weak_alias (__libc_pread64, pread64)
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ __libc_pwrite64 (int fd, const void *buf, size_t count, off64_t offset)
|
||||
return SYSCALL_CANCEL (pwrite64, fd, buf, count, SYSCALL_LL64_PRW (offset));
|
||||
}
|
||||
|
||||
weak_alias (__libc_pwrite64, __pwrite64)
|
||||
strong_alias (__libc_pwrite64, __pwrite64)
|
||||
libc_hidden_weak (__pwrite64)
|
||||
weak_alias (__libc_pwrite64, pwrite64)
|
||||
|
||||
|
||||
@@ -28,6 +28,6 @@ __libc_read (int fd, void *buf, size_t nbytes)
|
||||
libc_hidden_def (__libc_read)
|
||||
|
||||
libc_hidden_def (__read)
|
||||
weak_alias (__libc_read, __read)
|
||||
strong_alias (__libc_read, __read)
|
||||
libc_hidden_def (read)
|
||||
weak_alias (__libc_read, read)
|
||||
static_weak_alias (__libc_read, read)
|
||||
|
||||
@@ -30,6 +30,6 @@ __libc_recv (int fd, void *buf, size_t len, int flags)
|
||||
return SOCKETCALL_CANCEL (recv, fd, buf, len, flags);
|
||||
#endif
|
||||
}
|
||||
weak_alias (__libc_recv, recv)
|
||||
weak_alias (__libc_recv, __recv)
|
||||
static_weak_alias (__libc_recv, recv)
|
||||
static_weak_alias (__libc_recv, __recv)
|
||||
libc_hidden_weak (__recv)
|
||||
|
||||
@@ -30,6 +30,6 @@ __libc_send (int fd, const void *buf, size_t len, int flags)
|
||||
return SOCKETCALL_CANCEL (send, fd, buf, len, flags);
|
||||
#endif
|
||||
}
|
||||
weak_alias (__libc_send, send)
|
||||
weak_alias (__libc_send, __send)
|
||||
static_weak_alias (__libc_send, send)
|
||||
static_weak_alias (__libc_send, __send)
|
||||
libc_hidden_def (__send)
|
||||
|
||||
@@ -27,7 +27,7 @@ __libc_write (int fd, const void *buf, size_t nbytes)
|
||||
}
|
||||
libc_hidden_def (__libc_write)
|
||||
|
||||
weak_alias (__libc_write, __write)
|
||||
strong_alias (__libc_write, __write)
|
||||
libc_hidden_weak (__write)
|
||||
weak_alias (__libc_write, write)
|
||||
static_weak_alias (__libc_write, write)
|
||||
libc_hidden_weak (write)
|
||||
|
||||
@@ -8,6 +8,6 @@ fmt-xscanf-uint-convs += uint ulong
|
||||
endif
|
||||
|
||||
# strtol is aliased to stroll
|
||||
CFLAGS-strtol.c += -fno-builtin-strtoll $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-strtol.c += -fno-builtin-strtoll
|
||||
# strtoul is aliased to strtoull
|
||||
CFLAGS-strtoul.c += -fno-builtin-strtoull $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-strtoul.c += -fno-builtin-strtoull
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
#undef __isoc23_strtoll
|
||||
strong_alias (__strtol_internal, __strtoll_internal)
|
||||
libc_hidden_ver (__strtol_internal, __strtoll_internal)
|
||||
weak_alias (strtol, strtoll)
|
||||
libc_hidden_ver (strtol, strtoll)
|
||||
weak_alias (strtol, strtoq)
|
||||
libc_hidden_ver (strtol, strtoq)
|
||||
weak_alias (strtol, strtoimax)
|
||||
weak_alias (__strtol, strtoll)
|
||||
libc_hidden_ver (__strtol, strtoll)
|
||||
weak_alias (__strtol, strtoq)
|
||||
libc_hidden_ver (__strtol, strtoq)
|
||||
weak_alias (__strtol, strtoimax)
|
||||
weak_alias (__isoc23_strtol, __isoc23_strtoll)
|
||||
libc_hidden_ver (__isoc23_strtol, __isoc23_strtoll)
|
||||
weak_alias (__isoc23_strtol, __isoc23_strtoimax)
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
#undef __isoc23_strtoull
|
||||
strong_alias (__strtoul_internal, __strtoull_internal)
|
||||
libc_hidden_ver (__strtoul_internal, __strtoull_internal)
|
||||
weak_alias (strtoul, strtoull)
|
||||
weak_alias (strtoul, strtouq)
|
||||
weak_alias (strtoul, strtoumax)
|
||||
weak_alias (__strtoul, strtoull)
|
||||
weak_alias (__strtoul, strtouq)
|
||||
weak_alias (__strtoul, strtoumax)
|
||||
weak_alias (__isoc23_strtoul, __isoc23_strtoull)
|
||||
libc_hidden_ver (__isoc23_strtoul, __isoc23_strtoull)
|
||||
weak_alias (__isoc23_strtoul, __isoc23_strtoumax)
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
#undef __isoc23_wcstoll
|
||||
strong_alias (__wcstol_internal, __wcstoll_internal)
|
||||
libc_hidden_ver (__wcstol_internal, __wcstoll_internal)
|
||||
weak_alias (wcstol, wcstoll)
|
||||
weak_alias (wcstol, wcstoq)
|
||||
weak_alias (wcstol, wcstoimax)
|
||||
weak_alias (__wcstol, wcstoll)
|
||||
weak_alias (__wcstol, wcstoq)
|
||||
weak_alias (__wcstol, wcstoimax)
|
||||
weak_alias (__isoc23_wcstol, __isoc23_wcstoll)
|
||||
libc_hidden_ver (__isoc23_wcstol, __isoc23_wcstoll)
|
||||
weak_alias (__isoc23_wcstol, __isoc23_wcstoimax)
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
#undef __isoc23_wcstoull
|
||||
strong_alias (__wcstoul_internal, __wcstoull_internal)
|
||||
libc_hidden_ver (__wcstoul_internal, __wcstoull_internal)
|
||||
weak_alias (wcstoul, wcstoull)
|
||||
weak_alias (wcstoul, wcstouq)
|
||||
weak_alias (wcstoul, wcstoumax)
|
||||
weak_alias (__wcstoul, wcstoull)
|
||||
weak_alias (__wcstoul, wcstouq)
|
||||
weak_alias (__wcstoul, wcstoumax)
|
||||
weak_alias (__isoc23_wcstoul, __isoc23_wcstoull)
|
||||
libc_hidden_ver (__isoc23_wcstoul, __isoc23_wcstoull)
|
||||
weak_alias (__isoc23_wcstoul, __isoc23_wcstoumax)
|
||||
|
||||
@@ -51,5 +51,5 @@ __feclearexcept (int excepts)
|
||||
return 0;
|
||||
}
|
||||
libm_hidden_def (__feclearexcept)
|
||||
weak_alias (__feclearexcept, feclearexcept)
|
||||
static_weak_alias (__feclearexcept, feclearexcept)
|
||||
libm_hidden_def (feclearexcept)
|
||||
|
||||
@@ -33,5 +33,5 @@ __fegetenv (fenv_t *envp)
|
||||
return 0;
|
||||
}
|
||||
libm_hidden_def (__fegetenv)
|
||||
weak_alias (__fegetenv, fegetenv)
|
||||
static_weak_alias (__fegetenv, fegetenv)
|
||||
libm_hidden_weak (fegetenv)
|
||||
|
||||
@@ -30,5 +30,5 @@ __fegetround (void)
|
||||
return cw & 0xc00;
|
||||
}
|
||||
libm_hidden_def (__fegetround)
|
||||
weak_alias (__fegetround, fegetround)
|
||||
static_weak_alias (__fegetround, fegetround)
|
||||
libm_hidden_weak (fegetround)
|
||||
|
||||
@@ -37,5 +37,5 @@ __feholdexcept (fenv_t *envp)
|
||||
return 0;
|
||||
}
|
||||
libm_hidden_def (__feholdexcept)
|
||||
weak_alias (__feholdexcept, feholdexcept)
|
||||
static_weak_alias (__feholdexcept, feholdexcept)
|
||||
libm_hidden_weak (feholdexcept)
|
||||
|
||||
@@ -111,5 +111,5 @@ __fesetenv (const fenv_t *envp)
|
||||
return 0;
|
||||
}
|
||||
libm_hidden_def (__fesetenv)
|
||||
weak_alias (__fesetenv, fesetenv)
|
||||
static_weak_alias (__fesetenv, fesetenv)
|
||||
libm_hidden_weak (fesetenv)
|
||||
|
||||
@@ -45,5 +45,5 @@ __fesetround (int round)
|
||||
return 0;
|
||||
}
|
||||
libm_hidden_def (__fesetround)
|
||||
weak_alias (__fesetround, fesetround)
|
||||
static_weak_alias (__fesetround, fesetround)
|
||||
libm_hidden_weak (fesetround)
|
||||
|
||||
@@ -107,5 +107,5 @@ __feraiseexcept (int excepts)
|
||||
return 0;
|
||||
}
|
||||
libm_hidden_def (__feraiseexcept)
|
||||
weak_alias (__feraiseexcept, feraiseexcept)
|
||||
static_weak_alias (__feraiseexcept, feraiseexcept)
|
||||
libm_hidden_weak (feraiseexcept)
|
||||
|
||||
@@ -32,5 +32,5 @@ __fetestexcept (int excepts)
|
||||
return (temp | mxscr) & excepts & FE_ALL_EXCEPT;
|
||||
}
|
||||
libm_hidden_def (__fetestexcept)
|
||||
weak_alias (__fetestexcept, fetestexcept)
|
||||
static_weak_alias (__fetestexcept, fetestexcept)
|
||||
libm_hidden_def (fetestexcept)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <sysdeps/x86/isa-level.h>
|
||||
#if MINIMUM_X86_ISA_LEVEL < AVX2_X86_ISA_LEVEL
|
||||
# include <math.h>
|
||||
# include <libm-alias-float.h>
|
||||
|
||||
extern float __redirect_exp10m1f (float);
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <sysdeps/x86/isa-level.h>
|
||||
#if MINIMUM_X86_ISA_LEVEL < AVX2_X86_ISA_LEVEL
|
||||
# include <math.h>
|
||||
# include <libm-alias-float.h>
|
||||
|
||||
extern float __redirect_exp2m1f (float);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user