[PATCH v6 1/3] Handle clang -Wignored-attributes on weak aliases
Sam James
sam@gentoo.org
Sat Dec 6 13:24:53 GMT 2025
Adhemerval Zanella <adhemerval.zanella@linaro.org> writes:
> 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>
> ---
> Makefile.in | 2 -
> benchtests/bench-memset.c | 1 +
> configure | 70 -------------------
> configure.ac | 24 -------
> dirent/Makefile | 1 -
> include/libc-symbols.h | 10 +++
> inet/Makefile | 3 -
> inet/in6_addr.c | 4 +-
> io/Makefile | 18 +++--
> io/Versions | 1 -
> io/lockf64.c | 2 +-
> libio/Makefile | 14 +---
> libio/feof_u.c | 2 +-
> libio/ferror_u.c | 2 +-
> libio/fileno.c | 2 +-
> libio/getc_u.c | 2 +-
> libio/iofflush.c | 2 +-
> libio/iofflush_u.c | 2 +-
> libio/iofgets_u.c | 2 +-
> libio/iofputs.c | 2 +-
> libio/iofputs_u.c | 2 +-
> libio/iofwrite.c | 2 +-
> libio/ioputs.c | 2 +-
> libio/putc_u.c | 2 +-
> login/Makefile | 1 -
> misc/Makefile | 2 -
> misc/makedev.c | 6 +-
> posix/Makefile | 6 +-
> posix/confstr.c | 2 +-
> posix/fork.c | 2 +-
> resolv/Makefile | 1 -
> resolv/inet_pton.c | 2 +-
> resource/Makefile | 3 -
> socket/Makefile | 10 +--
> stdio-common/Makefile | 2 -
> stdlib/Makefile | 12 ----
> stdlib/secure-getenv.c | 2 +-
> stdlib/strtod_l.c | 10 +--
> stdlib/strtof_l.c | 4 +-
> stdlib/strtol.c | 2 +-
> string/Makefile | 9 ---
> string/argz-next.c | 2 +-
> string/basename.c | 2 +-
> string/ffs.c | 2 +-
> string/ffsll.c | 4 +-
> string/memmem.c | 2 +-
> string/mempcpy.c | 2 +-
> string/test-memchr.c | 4 +-
> string/test-strchr.c | 4 +-
> string/test-strlen.c | 4 +-
> string/test-strnlen.c | 4 +-
> sysdeps/aarch64/Makefile | 1 -
> sysdeps/aarch64/fpu/fclrexcpt.c | 2 +-
> sysdeps/aarch64/fpu/fegetenv.c | 2 +-
> sysdeps/aarch64/fpu/fegetround.c | 2 +-
> sysdeps/aarch64/fpu/feholdexcpt.c | 2 +-
> sysdeps/aarch64/fpu/fesetenv.c | 2 +-
> sysdeps/aarch64/fpu/fesetround.c | 2 +-
> sysdeps/aarch64/fpu/feupdateenv.c | 2 +-
> sysdeps/aarch64/fpu/fraiseexcpt.c | 2 +-
> sysdeps/aarch64/fpu/ftestexcept.c | 2 +-
> sysdeps/arm/Makefile | 4 --
> sysdeps/generic/math_ldbl_opt.h | 2 +-
> sysdeps/i386/i686/multiarch/wcschr-c.c | 4 +-
> sysdeps/ieee754/float128/s_fabsf128.c | 6 ++
> sysdeps/ieee754/ldbl-128/strtold_l.c | 8 +--
> sysdeps/ieee754/ldbl-96/strtold_l.c | 4 +-
> .../power4/multiarch/mempcpy-ppc32.c | 4 +-
> sysdeps/s390/wcschr-c.c | 4 +-
> sysdeps/unix/sysv/linux/accept.c | 2 +-
> sysdeps/unix/sysv/linux/connect.c | 4 +-
> sysdeps/unix/sysv/linux/dirfd.c | 2 +-
> sysdeps/unix/sysv/linux/fcntl64.c | 2 +-
> sysdeps/unix/sysv/linux/getlogin_r.c | 2 +-
> sysdeps/unix/sysv/linux/getrlimit64.c | 4 +-
> sysdeps/unix/sysv/linux/if_index.c | 8 +--
> sysdeps/unix/sysv/linux/ifaddrs.c | 4 +-
> sysdeps/unix/sysv/linux/lseek64.c | 2 +-
> sysdeps/unix/sysv/linux/mmap64.c | 4 +-
> sysdeps/unix/sysv/linux/pread64.c | 2 +-
> sysdeps/unix/sysv/linux/pwrite64.c | 2 +-
> sysdeps/unix/sysv/linux/read.c | 4 +-
> sysdeps/unix/sysv/linux/recv.c | 4 +-
> sysdeps/unix/sysv/linux/send.c | 4 +-
> sysdeps/unix/sysv/linux/write.c | 4 +-
> sysdeps/wordsize-64/Makefile | 4 +-
> sysdeps/wordsize-64/strtol.c | 10 +--
> sysdeps/wordsize-64/strtoul.c | 6 +-
> sysdeps/wordsize-64/wcstol.c | 6 +-
> sysdeps/wordsize-64/wcstoul.c | 6 +-
> sysdeps/x86_64/fpu/fclrexcpt.c | 2 +-
> sysdeps/x86_64/fpu/fegetenv.c | 2 +-
> sysdeps/x86_64/fpu/fegetround.c | 2 +-
> sysdeps/x86_64/fpu/feholdexcpt.c | 2 +-
> sysdeps/x86_64/fpu/fesetenv.c | 2 +-
> sysdeps/x86_64/fpu/fesetround.c | 2 +-
> sysdeps/x86_64/fpu/fraiseexcpt.c | 2 +-
> sysdeps/x86_64/fpu/ftestexcept.c | 2 +-
> sysdeps/x86_64/fpu/multiarch/s_exp10m1f.c | 1 +
> sysdeps/x86_64/fpu/multiarch/s_exp2m1f.c | 1 +
> sysdeps/x86_64/fpu/multiarch/s_sincos.c | 1 +
> sysdeps/x86_64/multiarch/mempcpy.c | 2 +-
> sysdeps/x86_64/multiarch/stpcpy.c | 2 +-
> sysdeps/x86_64/multiarch/strnlen.c | 2 +-
> sysdeps/x86_64/multiarch/wcschr.c | 2 +-
> sysdeps/x86_64/multiarch/wmemchr.c | 2 +-
> sysdeps/x86_64/multiarch/wmemset.c | 2 +-
> termios/Makefile | 1 -
> time/Makefile | 1 -
> time/mktime.c | 2 +-
> wcsmbs/Makefile | 24 +++----
> wcsmbs/mbrtowc.c | 2 +-
> wcsmbs/wcrtomb.c | 2 +-
> wcsmbs/wcschr.c | 2 +-
> wcsmbs/wmemchr.c | 2 +-
> wcsmbs/wmemset.c | 2 +-
> wctype/Makefile | 2 -
> wctype/wcfuncs.c | 6 +-
> 118 files changed, 180 insertions(+), 318 deletions(-)
>
> diff --git a/Makefile.in b/Makefile.in
> index 15b44842ae..e40dcbbc78 100644
> --- a/Makefile.in
> +++ b/Makefile.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)" \
> diff --git a/benchtests/bench-memset.c b/benchtests/bench-memset.c
> index f767ed1dbf..9fc424cfa2 100644
> --- a/benchtests/bench-memset.c
> +++ b/benchtests/bench-memset.c
> @@ -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
> diff --git a/configure b/configure
> index 09ac6ff760..fc36935dd0 100755
> --- a/configure
> +++ b/configure
> @@ -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}
> diff --git a/configure.ac b/configure.ac
> index 73176840cc..679a4a96cf 100644
> --- a/configure.ac
> +++ b/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],
> diff --git a/dirent/Makefile b/dirent/Makefile
> index f469b7f25d..242fd4941a 100644
> --- a/dirent/Makefile
> +++ b/dirent/Makefile
> @@ -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
>
> diff --git a/include/libc-symbols.h b/include/libc-symbols.h
> index 2f9453e0d7..224afa0fe3 100644
> --- a/include/libc-symbols.h
> +++ b/include/libc-symbols.h
> @@ -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)
> diff --git a/inet/Makefile b/inet/Makefile
> index 104b5828bf..a572936086 100644
> --- a/inet/Makefile
> +++ b/inet/Makefile
> @@ -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
> diff --git a/inet/in6_addr.c b/inet/in6_addr.c
> index df99e4a23d..f7f39fe395 100644
> --- a/inet/in6_addr.c
> +++ b/inet/in6_addr.c
> @@ -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)
> diff --git a/io/Makefile b/io/Makefile
> index 269a3151a2..fd156fc201 100644
> --- a/io/Makefile
> +++ b/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
> diff --git a/io/Versions b/io/Versions
> index 04d196eee0..e5f297e39e 100644
> --- a/io/Versions
> +++ b/io/Versions
> @@ -138,7 +138,6 @@ libc {
> closefrom;
> }
> GLIBC_PRIVATE {
> - __libc_fcntl64;
> __fcntl_nocancel;
> __open64_nocancel;
> __write_nocancel;
> diff --git a/io/lockf64.c b/io/lockf64.c
> index c490730d1f..354665cea8 100644
> --- a/io/lockf64.c
> +++ b/io/lockf64.c
> @@ -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
> diff --git a/libio/Makefile b/libio/Makefile
> index ccc8df387b..f946cd311b 100644
> --- a/libio/Makefile
> +++ b/libio/Makefile
> @@ -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
> diff --git a/libio/feof_u.c b/libio/feof_u.c
> index 4d2babe362..36a1e5b628 100644
> --- a/libio/feof_u.c
> +++ b/libio/feof_u.c
> @@ -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)
> diff --git a/libio/ferror_u.c b/libio/ferror_u.c
> index 0e19e0c198..d81facfac4 100644
> --- a/libio/ferror_u.c
> +++ b/libio/ferror_u.c
> @@ -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)
> diff --git a/libio/fileno.c b/libio/fileno.c
> index d1e945f549..d580582b4d 100644
> --- a/libio/fileno.c
> +++ b/libio/fileno.c
> @@ -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
> diff --git a/libio/getc_u.c b/libio/getc_u.c
> index cfd052d7c2..ea57c7d049 100644
> --- a/libio/getc_u.c
> +++ b/libio/getc_u.c
> @@ -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)
> diff --git a/libio/iofflush.c b/libio/iofflush.c
> index 3683c93e15..6165493c31 100644
> --- a/libio/iofflush.c
> +++ b/libio/iofflush.c
> @@ -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
> diff --git a/libio/iofflush_u.c b/libio/iofflush_u.c
> index cd9e4afd80..5690db5a44 100644
> --- a/libio/iofflush_u.c
> +++ b/libio/iofflush_u.c
> @@ -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)
> diff --git a/libio/iofgets_u.c b/libio/iofgets_u.c
> index b9ac6b9640..86e6ca55b7 100644
> --- a/libio/iofgets_u.c
> +++ b/libio/iofgets_u.c
> @@ -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)
> diff --git a/libio/iofputs.c b/libio/iofputs.c
> index 0a7e0b4b3e..f90830f751 100644
> --- a/libio/iofputs.c
> +++ b/libio/iofputs.c
> @@ -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
> diff --git a/libio/iofputs_u.c b/libio/iofputs_u.c
> index b283f488e8..dc4bd55514 100644
> --- a/libio/iofputs_u.c
> +++ b/libio/iofputs_u.c
> @@ -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)
> diff --git a/libio/iofwrite.c b/libio/iofwrite.c
> index 7897c4afaf..c88c91a4d4 100644
> --- a/libio/iofwrite.c
> +++ b/libio/iofwrite.c
> @@ -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)
> diff --git a/libio/ioputs.c b/libio/ioputs.c
> index 8baf502185..3e57e319d0 100644
> --- a/libio/ioputs.c
> +++ b/libio/ioputs.c
> @@ -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)
> diff --git a/libio/putc_u.c b/libio/putc_u.c
> index 609ef42b6a..d8f1562eb4 100644
> --- a/libio/putc_u.c
> +++ b/libio/putc_u.c
> @@ -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)
> diff --git a/login/Makefile b/login/Makefile
> index d6a9a6975e..e6b5a1fff4 100644
> --- a/login/Makefile
> +++ b/login/Makefile
> @@ -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 += \
> diff --git a/misc/Makefile b/misc/Makefile
> index e792d94ebd..d6514ca5d3 100644
> --- a/misc/Makefile
> +++ b/misc/Makefile
> @@ -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.
> diff --git a/misc/makedev.c b/misc/makedev.c
> index e7a0029f1d..3ad6dcb0aa 100644
> --- a/misc/makedev.c
> +++ b/misc/makedev.c
> @@ -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)
> diff --git a/posix/Makefile b/posix/Makefile
> index f6421e5379..062e7fdc20 100644
> --- a/posix/Makefile
> +++ b/posix/Makefile
> @@ -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
> diff --git a/posix/confstr.c b/posix/confstr.c
> index 415905b269..1f41e14193 100644
> --- a/posix/confstr.c
> +++ b/posix/confstr.c
> @@ -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)
> diff --git a/posix/fork.c b/posix/fork.c
> index 011e92fc1d..dfd413051e 100644
> --- a/posix/fork.c
> +++ b/posix/fork.c
> @@ -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)
> diff --git a/resolv/Makefile b/resolv/Makefile
> index ebb06cb14a..d294c3f3fc 100644
> --- a/resolv/Makefile
> +++ b/resolv/Makefile
> @@ -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
> diff --git a/resolv/inet_pton.c b/resolv/inet_pton.c
> index 5307a5b243..901bc3fb54 100644
> --- a/resolv/inet_pton.c
> +++ b/resolv/inet_pton.c
> @@ -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)
> diff --git a/resource/Makefile b/resource/Makefile
> index 9b4998107f..55982ebeed 100644
> --- a/resource/Makefile
> +++ b/resource/Makefile
> @@ -32,6 +32,3 @@ tests := \
>
>
> include ../Rules
> -
> -CFLAGS-getrlimit64.c += $(config-cflags-wno-ignored-attributes)
> -CFLAGS-getrlimit.c += $(config-cflags-wno-ignored-attributes)
> diff --git a/socket/Makefile b/socket/Makefile
> index 70fd4138b9..bc39579682 100644
> --- a/socket/Makefile
> +++ b/socket/Makefile
> @@ -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
> diff --git a/stdio-common/Makefile b/stdio-common/Makefile
> index cb816de335..ddffe653e9 100644
> --- a/stdio-common/Makefile
> +++ b/stdio-common/Makefile
> @@ -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)
> diff --git a/stdlib/Makefile b/stdlib/Makefile
> index 7bf4a52b6b..e4f3b4e0e7 100644
> --- a/stdlib/Makefile
> +++ b/stdlib/Makefile
> @@ -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
> diff --git a/stdlib/secure-getenv.c b/stdlib/secure-getenv.c
> index a2408a304f..b16efcb40e 100644
> --- a/stdlib/secure-getenv.c
> +++ b/stdlib/secure-getenv.c
> @@ -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);
> diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c
> index d00a336589..3988049f7e 100644
> --- a/stdlib/strtod_l.c
> +++ b/stdlib/strtod_l.c
> @@ -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
> diff --git a/stdlib/strtof_l.c b/stdlib/strtof_l.c
> index 2ec5f576cf..966db79725 100644
> --- a/stdlib/strtof_l.c
> +++ b/stdlib/strtof_l.c
> @@ -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
> diff --git a/stdlib/strtol.c b/stdlib/strtol.c
> index 155bfe166d..5b4e9d1cd9 100644
> --- a/stdlib/strtol.c
> +++ b/stdlib/strtol.c
> @@ -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
> diff --git a/string/Makefile b/string/Makefile
> index 9e913e2bee..cbebe64d8d 100644
> --- a/string/Makefile
> +++ b/string/Makefile
> @@ -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 $^ > $@; \
> diff --git a/string/argz-next.c b/string/argz-next.c
> index aac67a9d1c..be567cf573 100644
> --- a/string/argz-next.c
> +++ b/string/argz-next.c
> @@ -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)
> diff --git a/string/basename.c b/string/basename.c
> index dd2c8182db..ca45ca8ae9 100644
> --- a/string/basename.c
> +++ b/string/basename.c
> @@ -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)
> diff --git a/string/ffs.c b/string/ffs.c
> index a2aa5b1242..7010059833 100644
> --- a/string/ffs.c
> +++ b/string/ffs.c
> @@ -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)
>
> diff --git a/string/ffsll.c b/string/ffsll.c
> index 1b01d8fb12..6794de1c2a 100644
> --- a/string/ffsll.c
> +++ b/string/ffsll.c
> @@ -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
> diff --git a/string/memmem.c b/string/memmem.c
> index 8d9b7d196e..febb50b605 100644
> --- a/string/memmem.c
> +++ b/string/memmem.c
> @@ -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)
> diff --git a/string/mempcpy.c b/string/mempcpy.c
> index efbc9d42f1..1199f124ed 100644
> --- a/string/mempcpy.c
> +++ b/string/mempcpy.c
> @@ -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)
> diff --git a/string/test-memchr.c b/string/test-memchr.c
> index aaf9a6db29..fbfcd4d17d 100644
> --- a/string/test-memchr.c
> +++ b/string/test-memchr.c
> @@ -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
> diff --git a/string/test-strchr.c b/string/test-strchr.c
> index 765d69ecc2..8ea4335ac0 100644
> --- a/string/test-strchr.c
> +++ b/string/test-strchr.c
> @@ -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
> diff --git a/string/test-strlen.c b/string/test-strlen.c
> index 03a8969e54..2b85fc421a 100644
> --- a/string/test-strlen.c
> +++ b/string/test-strlen.c
> @@ -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
> diff --git a/string/test-strnlen.c b/string/test-strnlen.c
> index 7b5ceaf941..eae82786b2 100644
> --- a/string/test-strnlen.c
> +++ b/string/test-strnlen.c
> @@ -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"
> diff --git a/sysdeps/aarch64/Makefile b/sysdeps/aarch64/Makefile
> index 29348912e3..b0944d6b21 100644
> --- a/sysdeps/aarch64/Makefile
> +++ b/sysdeps/aarch64/Makefile
> @@ -58,7 +58,6 @@ endif
>
> ifeq ($(subdir),math)
> CPPFLAGS += -I../soft-fp
> -CFLAGS-feupdateenv.c += $(config-cflags-wno-ignored-attributes)
> endif
>
> ifeq ($(subdir),misc)
> diff --git a/sysdeps/aarch64/fpu/fclrexcpt.c b/sysdeps/aarch64/fpu/fclrexcpt.c
> index 21eb731e29..9f6fc8dd03 100644
> --- a/sysdeps/aarch64/fpu/fclrexcpt.c
> +++ b/sysdeps/aarch64/fpu/fclrexcpt.c
> @@ -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)
> diff --git a/sysdeps/aarch64/fpu/fegetenv.c b/sysdeps/aarch64/fpu/fegetenv.c
> index eb8117c61d..76f68e77ef 100644
> --- a/sysdeps/aarch64/fpu/fegetenv.c
> +++ b/sysdeps/aarch64/fpu/fegetenv.c
> @@ -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)
> diff --git a/sysdeps/aarch64/fpu/fegetround.c b/sysdeps/aarch64/fpu/fegetround.c
> index d6758c9879..f5db20165f 100644
> --- a/sysdeps/aarch64/fpu/fegetround.c
> +++ b/sysdeps/aarch64/fpu/fegetround.c
> @@ -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)
> diff --git a/sysdeps/aarch64/fpu/feholdexcpt.c b/sysdeps/aarch64/fpu/feholdexcpt.c
> index 79ae5494c6..f1d6ef54e7 100644
> --- a/sysdeps/aarch64/fpu/feholdexcpt.c
> +++ b/sysdeps/aarch64/fpu/feholdexcpt.c
> @@ -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)
> diff --git a/sysdeps/aarch64/fpu/fesetenv.c b/sysdeps/aarch64/fpu/fesetenv.c
> index 6a0df368c8..9c1d2114d0 100644
> --- a/sysdeps/aarch64/fpu/fesetenv.c
> +++ b/sysdeps/aarch64/fpu/fesetenv.c
> @@ -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)
> diff --git a/sysdeps/aarch64/fpu/fesetround.c b/sysdeps/aarch64/fpu/fesetround.c
> index cd0c3bcfed..f00437ab5b 100644
> --- a/sysdeps/aarch64/fpu/fesetround.c
> +++ b/sysdeps/aarch64/fpu/fesetround.c
> @@ -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)
> diff --git a/sysdeps/aarch64/fpu/feupdateenv.c b/sysdeps/aarch64/fpu/feupdateenv.c
> index 4690e84f21..6117a46443 100644
> --- a/sysdeps/aarch64/fpu/feupdateenv.c
> +++ b/sysdeps/aarch64/fpu/feupdateenv.c
> @@ -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)
> diff --git a/sysdeps/aarch64/fpu/fraiseexcpt.c b/sysdeps/aarch64/fpu/fraiseexcpt.c
> index 518a6eb321..9440339c93 100644
> --- a/sysdeps/aarch64/fpu/fraiseexcpt.c
> +++ b/sysdeps/aarch64/fpu/fraiseexcpt.c
> @@ -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)
> diff --git a/sysdeps/aarch64/fpu/ftestexcept.c b/sysdeps/aarch64/fpu/ftestexcept.c
> index f057616f7f..46150510da 100644
> --- a/sysdeps/aarch64/fpu/ftestexcept.c
> +++ b/sysdeps/aarch64/fpu/ftestexcept.c
> @@ -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)
> diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile
> index 9c4fd6b236..d08dade3c5 100644
> --- a/sysdeps/arm/Makefile
> +++ b/sysdeps/arm/Makefile
> @@ -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
> diff --git a/sysdeps/generic/math_ldbl_opt.h b/sysdeps/generic/math_ldbl_opt.h
> index fbd2c82e2f..0a14c723ca 100644
> --- a/sysdeps/generic/math_ldbl_opt.h
> +++ b/sysdeps/generic/math_ldbl_opt.h
> @@ -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)
> diff --git a/sysdeps/i386/i686/multiarch/wcschr-c.c b/sysdeps/i386/i686/multiarch/wcschr-c.c
> index 38d41d04de..f99a348624 100644
> --- a/sysdeps/i386/i686/multiarch/wcschr-c.c
> +++ b/sysdeps/i386/i686/multiarch/wcschr-c.c
> @@ -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
> diff --git a/sysdeps/ieee754/float128/s_fabsf128.c b/sysdeps/ieee754/float128/s_fabsf128.c
> index d877b0214f..9d64f15040 100644
> --- a/sysdeps/ieee754/float128/s_fabsf128.c
> +++ b/sysdeps/ieee754/float128/s_fabsf128.c
> @@ -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)
> diff --git a/sysdeps/ieee754/ldbl-128/strtold_l.c b/sysdeps/ieee754/ldbl-128/strtold_l.c
> index 64f14c11c7..3366040c77 100644
> --- a/sysdeps/ieee754/ldbl-128/strtold_l.c
> +++ b/sysdeps/ieee754/ldbl-128/strtold_l.c
> @@ -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
> diff --git a/sysdeps/ieee754/ldbl-96/strtold_l.c b/sysdeps/ieee754/ldbl-96/strtold_l.c
> index c721ddc696..ae6f87b44c 100644
> --- a/sysdeps/ieee754/ldbl-96/strtold_l.c
> +++ b/sysdeps/ieee754/ldbl-96/strtold_l.c
> @@ -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
> diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy-ppc32.c b/sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy-ppc32.c
> index d0bfe0da43..7ca044c213 100644
> --- a/sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy-ppc32.c
> +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy-ppc32.c
> @@ -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
> diff --git a/sysdeps/s390/wcschr-c.c b/sysdeps/s390/wcschr-c.c
> index 18d6b329c2..404fcbbbb6 100644
> --- a/sysdeps/s390/wcschr-c.c
> +++ b/sysdeps/s390/wcschr-c.c
> @@ -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
> diff --git a/sysdeps/unix/sysv/linux/accept.c b/sysdeps/unix/sysv/linux/accept.c
> index 410b1c0bcb..1cf84ff6ec 100644
> --- a/sysdeps/unix/sysv/linux/accept.c
> +++ b/sysdeps/unix/sysv/linux/accept.c
> @@ -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)
> diff --git a/sysdeps/unix/sysv/linux/connect.c b/sysdeps/unix/sysv/linux/connect.c
> index d60dc2ef11..dab24198fb 100644
> --- a/sysdeps/unix/sysv/linux/connect.c
> +++ b/sysdeps/unix/sysv/linux/connect.c
> @@ -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)
> diff --git a/sysdeps/unix/sysv/linux/dirfd.c b/sysdeps/unix/sysv/linux/dirfd.c
> index 1c637c666b..0f6b8b6a5f 100644
> --- a/sysdeps/unix/sysv/linux/dirfd.c
> +++ b/sysdeps/unix/sysv/linux/dirfd.c
> @@ -27,5 +27,5 @@ __dirfd (DIR *dirp)
> return dirp->fd;
> }
>
> -weak_alias (__dirfd, dirfd)
> +static_weak_alias (__dirfd, dirfd)
> libc_hidden_def (dirfd)
> diff --git a/sysdeps/unix/sysv/linux/fcntl64.c b/sysdeps/unix/sysv/linux/fcntl64.c
> index 1861b18eee..9682e4a070 100644
> --- a/sysdeps/unix/sysv/linux/fcntl64.c
> +++ b/sysdeps/unix/sysv/linux/fcntl64.c
> @@ -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
> diff --git a/sysdeps/unix/sysv/linux/getlogin_r.c b/sysdeps/unix/sysv/linux/getlogin_r.c
> index f03ecd4da9..d9ec274522 100644
> --- a/sysdeps/unix/sysv/linux/getlogin_r.c
> +++ b/sysdeps/unix/sysv/linux/getlogin_r.c
> @@ -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)
> diff --git a/sysdeps/unix/sysv/linux/getrlimit64.c b/sysdeps/unix/sysv/linux/getrlimit64.c
> index 8500fe366a..092eaea3e7 100644
> --- a/sysdeps/unix/sysv/linux/getrlimit64.c
> +++ b/sysdeps/unix/sysv/linux/getrlimit64.c
> @@ -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)
> diff --git a/sysdeps/unix/sysv/linux/if_index.c b/sysdeps/unix/sysv/linux/if_index.c
> index 5d137598f0..601c5a2c11 100644
> --- a/sysdeps/unix/sysv/linux/if_index.c
> +++ b/sysdeps/unix/sysv/linux/if_index.c
> @@ -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)
> diff --git a/sysdeps/unix/sysv/linux/ifaddrs.c b/sysdeps/unix/sysv/linux/ifaddrs.c
> index ddc4be78ee..ca7f2a3918 100644
> --- a/sysdeps/unix/sysv/linux/ifaddrs.c
> +++ b/sysdeps/unix/sysv/linux/ifaddrs.c
> @@ -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)
> diff --git a/sysdeps/unix/sysv/linux/lseek64.c b/sysdeps/unix/sysv/linux/lseek64.c
> index 49f4136844..f921bba9b0 100644
> --- a/sysdeps/unix/sysv/linux/lseek64.c
> +++ b/sysdeps/unix/sysv/linux/lseek64.c
> @@ -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
> diff --git a/sysdeps/unix/sysv/linux/mmap64.c b/sysdeps/unix/sysv/linux/mmap64.c
> index e202356efe..6bf4b0ab7f 100644
> --- a/sysdeps/unix/sysv/linux/mmap64.c
> +++ b/sysdeps/unix/sysv/linux/mmap64.c
> @@ -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
> diff --git a/sysdeps/unix/sysv/linux/pread64.c b/sysdeps/unix/sysv/linux/pread64.c
> index 5fbf14b4be..8db26c21ab 100644
> --- a/sysdeps/unix/sysv/linux/pread64.c
> +++ b/sysdeps/unix/sysv/linux/pread64.c
> @@ -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)
>
> diff --git a/sysdeps/unix/sysv/linux/pwrite64.c b/sysdeps/unix/sysv/linux/pwrite64.c
> index c1388b03bd..aeccaa5962 100644
> --- a/sysdeps/unix/sysv/linux/pwrite64.c
> +++ b/sysdeps/unix/sysv/linux/pwrite64.c
> @@ -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)
>
> diff --git a/sysdeps/unix/sysv/linux/read.c b/sysdeps/unix/sysv/linux/read.c
> index cb2f22e319..3ec3acdf13 100644
> --- a/sysdeps/unix/sysv/linux/read.c
> +++ b/sysdeps/unix/sysv/linux/read.c
> @@ -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)
> diff --git a/sysdeps/unix/sysv/linux/recv.c b/sysdeps/unix/sysv/linux/recv.c
> index 24ee8f74e4..64a7245beb 100644
> --- a/sysdeps/unix/sysv/linux/recv.c
> +++ b/sysdeps/unix/sysv/linux/recv.c
> @@ -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)
> diff --git a/sysdeps/unix/sysv/linux/send.c b/sysdeps/unix/sysv/linux/send.c
> index 68cdd4069d..84404be4d3 100644
> --- a/sysdeps/unix/sysv/linux/send.c
> +++ b/sysdeps/unix/sysv/linux/send.c
> @@ -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)
> diff --git a/sysdeps/unix/sysv/linux/write.c b/sysdeps/unix/sysv/linux/write.c
> index dd40926e76..f6c4d31451 100644
> --- a/sysdeps/unix/sysv/linux/write.c
> +++ b/sysdeps/unix/sysv/linux/write.c
> @@ -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)
> diff --git a/sysdeps/wordsize-64/Makefile b/sysdeps/wordsize-64/Makefile
> index 6a84d0f863..c1efde12d6 100644
> --- a/sysdeps/wordsize-64/Makefile
> +++ b/sysdeps/wordsize-64/Makefile
> @@ -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
> diff --git a/sysdeps/wordsize-64/strtol.c b/sysdeps/wordsize-64/strtol.c
> index a21fa8da10..cd99cb22fd 100644
> --- a/sysdeps/wordsize-64/strtol.c
> +++ b/sysdeps/wordsize-64/strtol.c
> @@ -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)
> diff --git a/sysdeps/wordsize-64/strtoul.c b/sysdeps/wordsize-64/strtoul.c
> index 60c82b89d9..00e83d2c38 100644
> --- a/sysdeps/wordsize-64/strtoul.c
> +++ b/sysdeps/wordsize-64/strtoul.c
> @@ -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)
> diff --git a/sysdeps/wordsize-64/wcstol.c b/sysdeps/wordsize-64/wcstol.c
> index 557c763941..ba8796b9b9 100644
> --- a/sysdeps/wordsize-64/wcstol.c
> +++ b/sysdeps/wordsize-64/wcstol.c
> @@ -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)
> diff --git a/sysdeps/wordsize-64/wcstoul.c b/sysdeps/wordsize-64/wcstoul.c
> index 9b48ca6ab2..f7a03871b6 100644
> --- a/sysdeps/wordsize-64/wcstoul.c
> +++ b/sysdeps/wordsize-64/wcstoul.c
> @@ -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)
> diff --git a/sysdeps/x86_64/fpu/fclrexcpt.c b/sysdeps/x86_64/fpu/fclrexcpt.c
> index 82029af7f6..80dcbf9147 100644
> --- a/sysdeps/x86_64/fpu/fclrexcpt.c
> +++ b/sysdeps/x86_64/fpu/fclrexcpt.c
> @@ -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)
> diff --git a/sysdeps/x86_64/fpu/fegetenv.c b/sysdeps/x86_64/fpu/fegetenv.c
> index a2523e0978..21ed713aca 100644
> --- a/sysdeps/x86_64/fpu/fegetenv.c
> +++ b/sysdeps/x86_64/fpu/fegetenv.c
> @@ -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)
> diff --git a/sysdeps/x86_64/fpu/fegetround.c b/sysdeps/x86_64/fpu/fegetround.c
> index 9537cd3142..a7fc1a8870 100644
> --- a/sysdeps/x86_64/fpu/fegetround.c
> +++ b/sysdeps/x86_64/fpu/fegetround.c
> @@ -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)
> diff --git a/sysdeps/x86_64/fpu/feholdexcpt.c b/sysdeps/x86_64/fpu/feholdexcpt.c
> index 74314b0fc9..f899e92193 100644
> --- a/sysdeps/x86_64/fpu/feholdexcpt.c
> +++ b/sysdeps/x86_64/fpu/feholdexcpt.c
> @@ -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)
> diff --git a/sysdeps/x86_64/fpu/fesetenv.c b/sysdeps/x86_64/fpu/fesetenv.c
> index 781de281b8..73cdc98d6c 100644
> --- a/sysdeps/x86_64/fpu/fesetenv.c
> +++ b/sysdeps/x86_64/fpu/fesetenv.c
> @@ -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)
> diff --git a/sysdeps/x86_64/fpu/fesetround.c b/sysdeps/x86_64/fpu/fesetround.c
> index e06225213a..c7d6421ec6 100644
> --- a/sysdeps/x86_64/fpu/fesetround.c
> +++ b/sysdeps/x86_64/fpu/fesetround.c
> @@ -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)
> diff --git a/sysdeps/x86_64/fpu/fraiseexcpt.c b/sysdeps/x86_64/fpu/fraiseexcpt.c
> index 05474bec13..f0a1d8282b 100644
> --- a/sysdeps/x86_64/fpu/fraiseexcpt.c
> +++ b/sysdeps/x86_64/fpu/fraiseexcpt.c
> @@ -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)
> diff --git a/sysdeps/x86_64/fpu/ftestexcept.c b/sysdeps/x86_64/fpu/ftestexcept.c
> index 5e7054edcb..1d23e7ca80 100644
> --- a/sysdeps/x86_64/fpu/ftestexcept.c
> +++ b/sysdeps/x86_64/fpu/ftestexcept.c
> @@ -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)
> diff --git a/sysdeps/x86_64/fpu/multiarch/s_exp10m1f.c b/sysdeps/x86_64/fpu/multiarch/s_exp10m1f.c
> index 7bb1749a28..4b0c825fc5 100644
> --- a/sysdeps/x86_64/fpu/multiarch/s_exp10m1f.c
> +++ b/sysdeps/x86_64/fpu/multiarch/s_exp10m1f.c
> @@ -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);
> diff --git a/sysdeps/x86_64/fpu/multiarch/s_exp2m1f.c b/sysdeps/x86_64/fpu/multiarch/s_exp2m1f.c
> index 1361b79e51..890b149ec2 100644
> --- a/sysdeps/x86_64/fpu/multiarch/s_exp2m1f.c
> +++ b/sysdeps/x86_64/fpu/multiarch/s_exp2m1f.c
> @@ -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);
> diff --git a/sysdeps/x86_64/fpu/multiarch/s_sincos.c b/sysdeps/x86_64/fpu/multiarch/s_sincos.c
> index 5d60cd0548..4514eedcd1 100644
> --- a/sysdeps/x86_64/fpu/multiarch/s_sincos.c
> +++ b/sysdeps/x86_64/fpu/multiarch/s_sincos.c
> @@ -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-double.h>
>
> extern void __redirect_sincos (double, double *, double *);
> diff --git a/sysdeps/x86_64/multiarch/mempcpy.c b/sysdeps/x86_64/multiarch/mempcpy.c
> index ba5297e7c3..cc67b425be 100644
> --- a/sysdeps/x86_64/multiarch/mempcpy.c
> +++ b/sysdeps/x86_64/multiarch/mempcpy.c
> @@ -36,7 +36,7 @@ weak_alias (__mempcpy, mempcpy)
> # ifdef SHARED
> __hidden_ver1 (__mempcpy, __GI___mempcpy, __redirect___mempcpy)
> __attribute__ ((visibility ("hidden"))) __attribute_copy__ (mempcpy);
> -__hidden_ver1 (mempcpy, __GI_mempcpy, __redirect_mempcpy)
> +__hidden_ver1 (__mempcpy, __GI_mempcpy, __redirect_mempcpy)
> __attribute__ ((visibility ("hidden"))) __attribute_copy__ (mempcpy);
> # endif
> #endif
> diff --git a/sysdeps/x86_64/multiarch/stpcpy.c b/sysdeps/x86_64/multiarch/stpcpy.c
> index df027e314e..5b084e78f7 100644
> --- a/sysdeps/x86_64/multiarch/stpcpy.c
> +++ b/sysdeps/x86_64/multiarch/stpcpy.c
> @@ -36,7 +36,7 @@ weak_alias (__stpcpy, stpcpy)
> # ifdef SHARED
> __hidden_ver1 (__stpcpy, __GI___stpcpy, __redirect___stpcpy)
> __attribute__ ((visibility ("hidden"))) __attribute_copy__ (stpcpy);
> -__hidden_ver1 (stpcpy, __GI_stpcpy, __redirect_stpcpy)
> +__hidden_ver1 (__stpcpy, __GI_stpcpy, __redirect_stpcpy)
> __attribute__ ((visibility ("hidden"))) __attribute_copy__ (stpcpy);
> # endif
> #endif
> diff --git a/sysdeps/x86_64/multiarch/strnlen.c b/sysdeps/x86_64/multiarch/strnlen.c
> index 6444ca1d80..0b0bd977de 100644
> --- a/sysdeps/x86_64/multiarch/strnlen.c
> +++ b/sysdeps/x86_64/multiarch/strnlen.c
> @@ -33,7 +33,7 @@ weak_alias (__strnlen, strnlen);
> # ifdef SHARED
> __hidden_ver1 (__strnlen, __GI___strnlen, __redirect___strnlen)
> __attribute__((visibility ("hidden"))) __attribute_copy__ (strnlen);
> -__hidden_ver1 (strnlen, __GI_strnlen, __redirect_strnlen)
> +__hidden_ver1 (__strnlen, __GI_strnlen, __redirect_strnlen)
> __attribute__((weak, visibility ("hidden"))) __attribute_copy__ (strnlen);
> # endif
> #endif
> diff --git a/sysdeps/x86_64/multiarch/wcschr.c b/sysdeps/x86_64/multiarch/wcschr.c
> index 3df2367f93..5a10cccde1 100644
> --- a/sysdeps/x86_64/multiarch/wcschr.c
> +++ b/sysdeps/x86_64/multiarch/wcschr.c
> @@ -33,7 +33,7 @@ weak_alias (__wcschr, wcschr);
> # ifdef SHARED
> __hidden_ver1 (__wcschr, __GI___wcschr, __redirect___wcschr)
> __attribute__((visibility ("hidden")));
> -__hidden_ver1 (wcschr, __GI_wcschr, __redirect_wcschr)
> +__hidden_ver1 (__wcschr, __GI_wcschr, __redirect_wcschr)
> __attribute__((weak, visibility ("hidden")));
> # endif
> #endif
> diff --git a/sysdeps/x86_64/multiarch/wmemchr.c b/sysdeps/x86_64/multiarch/wmemchr.c
> index bba610394c..b5bee75f38 100644
> --- a/sysdeps/x86_64/multiarch/wmemchr.c
> +++ b/sysdeps/x86_64/multiarch/wmemchr.c
> @@ -33,7 +33,7 @@ weak_alias (__wmemchr, wmemchr)
> # ifdef SHARED
> __hidden_ver1 (__wmemchr, __GI___wmemchr, __redirect___wmemchr)
> __attribute__((visibility ("hidden")));
> -__hidden_ver1 (wmemchr, __GI_wmemchr, __redirect_wmemchr)
> +__hidden_ver1 (__wmemchr, __GI_wmemchr, __redirect_wmemchr)
> __attribute__((weak, visibility ("hidden")));
> # endif
> #endif
> diff --git a/sysdeps/x86_64/multiarch/wmemset.c b/sysdeps/x86_64/multiarch/wmemset.c
> index 0169f2ac54..096633b7ac 100644
> --- a/sysdeps/x86_64/multiarch/wmemset.c
> +++ b/sysdeps/x86_64/multiarch/wmemset.c
> @@ -34,7 +34,7 @@ weak_alias (__wmemset, wmemset)
> # ifdef SHARED
> __hidden_ver1 (__wmemset, __GI___wmemset, __redirect___wmemset)
> __attribute__ ((visibility ("hidden")));
> -__hidden_ver1 (wmemset, __GI_wmemset, __redirect_wmemset)
> +__hidden_ver1 (__wmemset, __GI_wmemset, __redirect_wmemset)
> __attribute__ ((visibility ("hidden")));
> # endif
> #endif
> diff --git a/termios/Makefile b/termios/Makefile
> index 1e23608255..0308bacf74 100644
> --- a/termios/Makefile
> +++ b/termios/Makefile
> @@ -53,4 +53,3 @@ routines := \
> include ../Rules
>
> CFLAGS-tcdrain.c += -fexceptions -fasynchronous-unwind-tables
> -CFLAGS-tcsetattr.c += $(config-cflags-wno-ignored-attributes)
> diff --git a/time/Makefile b/time/Makefile
> index 3e010d2c15..55b8b690ca 100644
> --- a/time/Makefile
> +++ b/time/Makefile
> @@ -141,7 +141,6 @@ CFLAGS-tzset.c += $(tz-cflags)
> CFLAGS-getdate.c += -fexceptions
> CFLAGS-clock_nanosleep.c += -fexceptions -fasynchronous-unwind-tables
> CFLAGS-nanosleep.c += -fexceptions -fasynchronous-unwind-tables
> -CFLAGS-mktime.c += $(config-cflags-wno-ignored-attributes)
>
> # Don't warn about Y2k problem in strftime format string.
> CFLAGS-test_time.c += -Wno-format
> diff --git a/time/mktime.c b/time/mktime.c
> index 86d496ca65..6769bab478 100644
> --- a/time/mktime.c
> +++ b/time/mktime.c
> @@ -573,6 +573,6 @@ mktime (struct tm *tp)
>
> #endif
>
> -weak_alias (mktime, timelocal)
> +static_weak_alias (mktime, timelocal)
> libc_hidden_def (mktime)
> libc_hidden_weak (timelocal)
> diff --git a/wcsmbs/Makefile b/wcsmbs/Makefile
> index 71b5ffe1bd..a993d015d8 100644
> --- a/wcsmbs/Makefile
> +++ b/wcsmbs/Makefile
> @@ -249,32 +249,24 @@ CFLAGS-wcwidth.c += -I../wctype
> CFLAGS-wcswidth.c += -I../wctype
>
> strtox-CFLAGS = -I../include
> -CFLAGS-wcstol.c += $(strtox-CFLAGS) $(config-cflags-wno-ignored-attributes)
> -CFLAGS-wcstoul.c += $(strtox-CFLAGS) $(config-cflags-wno-ignored-attributes)
> +CFLAGS-wcstol.c += $(strtox-CFLAGS)
> +CFLAGS-wcstoul.c += $(strtox-CFLAGS)
> CFLAGS-wcstoll.c += $(strtox-CFLAGS)
> CFLAGS-wcstoull.c += $(strtox-CFLAGS)
> -CFLAGS-wcstod.c += $(strtox-CFLAGS) $(config-cflags-wno-ignored-attributes)
> -CFLAGS-wcstold.c += $(strtox-CFLAGS) $(config-cflags-wno-ignored-attributes)
> +CFLAGS-wcstod.c += $(strtox-CFLAGS)
> +CFLAGS-wcstold.c += $(strtox-CFLAGS)
> CFLAGS-wcstof128.c += $(strtox-CFLAGS)
> -CFLAGS-wcstof.c += $(strtox-CFLAGS) $(config-cflags-wno-ignored-attributes)
> +CFLAGS-wcstof.c += $(strtox-CFLAGS)
> CFLAGS-wcstol_l.c += $(strtox-CFLAGS)
> CFLAGS-wcstoul_l.c += $(strtox-CFLAGS)
> CFLAGS-wcstoll_l.c += $(strtox-CFLAGS)
> CFLAGS-wcstoull_l.c += $(strtox-CFLAGS)
> -CFLAGS-wcstod_l.c += $(strtox-CFLAGS) $(config-cflags-wno-ignored-attributes)
> -CFLAGS-wcstold_l.c += $(strtox-CFLAGS) $(config-cflags-wno-ignored-attributes)
> +CFLAGS-wcstod_l.c += $(strtox-CFLAGS)
> +CFLAGS-wcstold_l.c += $(strtox-CFLAGS)
> CFLAGS-wcstof128_l.c += $(strtox-CFLAGS)
> -CFLAGS-wcstof_l.c += $(strtox-CFLAGS) $(config-cflags-wno-ignored-attributes)
> +CFLAGS-wcstof_l.c += $(strtox-CFLAGS)
> CPPFLAGS-tst-wchar-h.c += $(no-fortify-source) -D_FORTIFY_SOURCE=2
>
> -CFLAGS-wcschr.c += $(config-cflags-wno-ignored-attributes)
> -CFLAGS-wmemchr.c += $(config-cflags-wno-ignored-attributes)
> -CFLAGS-wmemset.c += $(config-cflags-wno-ignored-attributes)
> -CFLAGS-mbrtowc.c += $(config-cflags-wno-ignored-attributes)
> -CFLAGS-wcrtomb.c += $(config-cflags-wno-ignored-attributes)
> -CFLAGS-wcstoll.c += $(config-cflags-wno-ignored-attributes)
> -CFLAGS-wcstoull.c += $(config-cflags-wno-ignored-attributes)
> -
> CFLAGS-isoc99_wscanf.c += -fexceptions
> CFLAGS-isoc99_fwscanf.c += -fexceptions
> CFLAGS-isoc99_vwscanf.c += -fexceptions
> diff --git a/wcsmbs/mbrtowc.c b/wcsmbs/mbrtowc.c
> index 47068ed0e0..ce8f6045b1 100644
> --- a/wcsmbs/mbrtowc.c
> +++ b/wcsmbs/mbrtowc.c
> @@ -117,5 +117,5 @@ __mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
> return result;
> }
> libc_hidden_def (__mbrtowc)
> -weak_alias (__mbrtowc, mbrtowc)
> +static_weak_alias (__mbrtowc, mbrtowc)
> libc_hidden_weak (mbrtowc)
> diff --git a/wcsmbs/wcrtomb.c b/wcsmbs/wcrtomb.c
> index d4ce187781..19788ffbb5 100644
> --- a/wcsmbs/wcrtomb.c
> +++ b/wcsmbs/wcrtomb.c
> @@ -123,5 +123,5 @@ __wcrtomb (char *s, wchar_t wc, mbstate_t *ps)
> {
> return __wcrtomb_internal (s, wc, ps, (size_t) -1);
> }
> -weak_alias (__wcrtomb, wcrtomb)
> +static_weak_alias (__wcrtomb, wcrtomb)
> libc_hidden_weak (wcrtomb)
> diff --git a/wcsmbs/wcschr.c b/wcsmbs/wcschr.c
> index 6bd3ad9ddf..f64f6baac4 100644
> --- a/wcsmbs/wcschr.c
> +++ b/wcsmbs/wcschr.c
> @@ -45,5 +45,5 @@ WCSCHR (const wchar_t *wcs, const wchar_t wc)
> return dest;
> }
> libc_hidden_def (__wcschr)
> -weak_alias (__wcschr, wcschr)
> +static_weak_alias (__wcschr, wcschr)
> libc_hidden_weak (wcschr)
> diff --git a/wcsmbs/wmemchr.c b/wcsmbs/wmemchr.c
> index a5403581a3..e78874d302 100644
> --- a/wcsmbs/wmemchr.c
> +++ b/wcsmbs/wmemchr.c
> @@ -60,5 +60,5 @@ __wmemchr (const wchar_t *s, wchar_t c, size_t n)
> return NULL;
> }
> libc_hidden_def (__wmemchr)
> -weak_alias (__wmemchr, wmemchr)
> +static_weak_alias (__wmemchr, wmemchr)
> libc_hidden_weak (wmemchr)
> diff --git a/wcsmbs/wmemset.c b/wcsmbs/wmemset.c
> index 3441ece2b2..517a22b06b 100644
> --- a/wcsmbs/wmemset.c
> +++ b/wcsmbs/wmemset.c
> @@ -52,5 +52,5 @@ __wmemset (wchar_t *s, wchar_t c, size_t n)
> return s;
> }
> libc_hidden_def (__wmemset)
> -weak_alias (__wmemset, wmemset)
> +static_weak_alias (__wmemset, wmemset)
> libc_hidden_weak (wmemset)
> diff --git a/wctype/Makefile b/wctype/Makefile
> index 4708594d84..cdcf3b2328 100644
> --- a/wctype/Makefile
> +++ b/wctype/Makefile
> @@ -29,5 +29,3 @@ routines := wcfuncs wctype iswctype wctrans towctrans \
> tests := test_wctype test_wcfuncs bug-wctypeh
>
> include ../Rules
> -
> -CFLAGS-wcfuncs.c += $(config-cflags-wno-ignored-attributes)
> diff --git a/wctype/wcfuncs.c b/wctype/wcfuncs.c
> index 49f9ed2157..0d078609a5 100644
> --- a/wctype/wcfuncs.c
> +++ b/wctype/wcfuncs.c
> @@ -34,7 +34,7 @@
> const char *desc = _NL_CURRENT (LC_CTYPE, i); \
> return wctype_table_lookup (desc, wc); \
> } \
> - weak_alias (__isw##name, isw##name)
> + static_weak_alias (__isw##name, isw##name)
>
> #undef iswalnum
> func (alnum, __ISwalnum)
> @@ -78,7 +78,7 @@ __towlower (wint_t wc)
> return wctrans_table_lookup (desc, wc);
> }
> libc_hidden_def (__towlower)
> -weak_alias (__towlower, towlower)
> +static_weak_alias (__towlower, towlower)
> libc_hidden_weak (towlower)
>
> #undef towupper
> @@ -90,5 +90,5 @@ __towupper (wint_t wc)
> return wctrans_table_lookup (desc, wc);
> }
> libc_hidden_def (__towupper)
> -weak_alias (__towupper, towupper)
> +static_weak_alias (__towupper, towupper)
> libc_hidden_weak (towupper)
More information about the Libc-alpha
mailing list