]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Remove .weak, .weakext configure tests.
authorJoseph Myers <joseph@codesourcery.com>
Mon, 19 Oct 2015 12:06:00 +0000 (12:06 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Mon, 19 Oct 2015 12:06:00 +0000 (12:06 +0000)
There are configure tests for assembler .weak support, and, as a
fallback, for .weakext support.

.weakext appears to be an ECOFF thing (although a few ELF targets
support it as well).  .weak has been supported by the GNU assembler
for ELF targets since version 2.2, so given the requirement for ELF
the configure tests are obsolete; this patch removes them.

Tested for x86_64 (testsuite, and that installed shared libraries are
unchanged by the patch).

* configure.ac (libc_cv_asm_weak_directive): Remove configure
test.
(libc_cv_asm_weakext_directive): Likewise.
* configure: Regenerated.
* config.h.in (HAVE_ASM_WEAK_DIRECTIVE): Remove #undef.
(HAVE_ASM_WEAKEXT_DIRECTIVE): Likewise.
* include/libc-symbols.h
[!HAVE_ASM_WEAK_DIRECTIVE && !HAVE_ASM_WEAKEXT_DIRECTIVE]: Remove
#error.
[HAVE_ASM_WEAKEXT_DIRECTIVE]: Remove conditional code.
[!HAVE_ASM_WEAKEXT_DIRECTIVE]: Make code unconditional.

ChangeLog
config.h.in
configure
configure.ac
include/libc-symbols.h

index 961041189b6d866793690afa0db6b32c57ed4710..38fa0cb1f9f5690719329ac805f56f55b281e04d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2015-10-19  Joseph Myers  <joseph@codesourcery.com>
 
+       * configure.ac (libc_cv_asm_weak_directive): Remove configure
+       test.
+       (libc_cv_asm_weakext_directive): Likewise.
+       * configure: Regenerated.
+       * config.h.in (HAVE_ASM_WEAK_DIRECTIVE): Remove #undef.
+       (HAVE_ASM_WEAKEXT_DIRECTIVE): Likewise.
+       * include/libc-symbols.h
+       [!HAVE_ASM_WEAK_DIRECTIVE && !HAVE_ASM_WEAKEXT_DIRECTIVE]: Remove
+       #error.
+       [HAVE_ASM_WEAKEXT_DIRECTIVE]: Remove conditional code.
+       [!HAVE_ASM_WEAKEXT_DIRECTIVE]: Make code unconditional.
+
        * sysdeps/arm/backtrace.c (__backtrace): Convert to
        prototype-style function definition.
        * sysdeps/i386/backtrace.c (__backtrace): Likewise.
index 40c2d45009aa52b988c58143f6afe9b5c55dfb35..44e859088bad1bf6f641f0725c19b046a2dff6d0 100644 (file)
 /* Defined if building with SELinux support & libcap libs are detected.  */
 #undef  HAVE_LIBCAP
 
-/* Define if weak symbols are available via the `.weak' directive.  */
-#undef HAVE_ASM_WEAK_DIRECTIVE
-
-/* Define if weak symbols are available via the `.weakext' directive.  */
-#undef HAVE_ASM_WEAKEXT_DIRECTIVE
-
 /* Define to the assembler line separator character for multiple
    assembler instructions per line.  Default is `;'  */
 #undef ASM_LINE_SEP
index d4cb9cd17f3d2f85fbde18086d6c8e491047a5b1..489ea002009dfa61007a4e08627221dd25b8a2fe 100755 (executable)
--- a/configure
+++ b/configure
@@ -6117,73 +6117,6 @@ if test $libc_cv_have_section_quotes = yes; then
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler .weak directive" >&5
-$as_echo_n "checking for assembler .weak directive... " >&6; }
-if ${libc_cv_asm_weak_directive+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat > conftest.s <<EOF
-${libc_cv_dot_text}
-.globl foo
-foo:
-.weak foo
-.weak bar; bar = foo
-EOF
-if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
-  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
-  libc_cv_asm_weak_directive=yes
-else
-  libc_cv_asm_weak_directive=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_weak_directive" >&5
-$as_echo "$libc_cv_asm_weak_directive" >&6; }
-
-if test $libc_cv_asm_weak_directive = no; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler .weakext directive" >&5
-$as_echo_n "checking for assembler .weakext directive... " >&6; }
-if ${libc_cv_asm_weakext_directive+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat > conftest.s <<EOF
-${libc_cv_dot_text}
-.globl foo
-foo:
-.weakext bar foo
-.weakext baz
-.globl baz
-baz:
-EOF
-  if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
-  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
-    libc_cv_asm_weakext_directive=yes
-  else
-    libc_cv_asm_weakext_directive=no
-  fi
-  rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_weakext_directive" >&5
-$as_echo "$libc_cv_asm_weakext_directive" >&6; }
-
-fi # no .weak
-
-if test $libc_cv_asm_weak_directive = yes; then
-  $as_echo "#define HAVE_ASM_WEAK_DIRECTIVE 1" >>confdefs.h
-
-elif test $libc_cv_asm_weakext_directive = yes; then
-  $as_echo "#define HAVE_ASM_WEAKEXT_DIRECTIVE 1" >>confdefs.h
-
-fi
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld --no-whole-archive" >&5
 $as_echo_n "checking for ld --no-whole-archive... " >&6; }
 if ${libc_cv_ld_no_whole_archive+:} false; then :
index 402de30b874afe7fdd8351ea20ba37678a791cd2..14f5c170d9c30bea14cdc03da7af433ab6678437 100644 (file)
@@ -1550,50 +1550,6 @@ if test $libc_cv_have_section_quotes = yes; then
   AC_DEFINE(HAVE_SECTION_QUOTES)
 fi
 
-AC_CACHE_CHECK(for assembler .weak directive, libc_cv_asm_weak_directive,
-              [dnl
-cat > conftest.s <<EOF
-${libc_cv_dot_text}
-.globl foo
-foo:
-.weak foo
-.weak bar; bar = foo
-EOF
-if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
-  libc_cv_asm_weak_directive=yes
-else
-  libc_cv_asm_weak_directive=no
-fi
-rm -f conftest*])
-
-if test $libc_cv_asm_weak_directive = no; then
-  AC_CACHE_CHECK(for assembler .weakext directive,
-                libc_cv_asm_weakext_directive,
-                [dnl
-cat > conftest.s <<EOF
-${libc_cv_dot_text}
-.globl foo
-foo:
-.weakext bar foo
-.weakext baz
-.globl baz
-baz:
-EOF
-  if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
-    libc_cv_asm_weakext_directive=yes
-  else
-    libc_cv_asm_weakext_directive=no
-  fi
-  rm -f conftest*])
-
-fi # no .weak
-
-if test $libc_cv_asm_weak_directive = yes; then
-  AC_DEFINE(HAVE_ASM_WEAK_DIRECTIVE)
-elif test $libc_cv_asm_weakext_directive = yes; then
-  AC_DEFINE(HAVE_ASM_WEAKEXT_DIRECTIVE)
-fi
-
 AC_CACHE_CHECK(for ld --no-whole-archive, libc_cv_ld_no_whole_archive, [dnl
 cat > conftest.c <<\EOF
 _start () {}
index e2c63fc3927a6c2f57f0829635a66b8b369472fd..a9ac0e3ed7d38fbc67a51feb02b93cacb9d9d550 100644 (file)
    file in the C library by -imacros.
 
    We include config.h which is generated by configure.
-   It should define for us the following symbols:
+   It should define for us the following symbol:
 
    * HAVE_ASM_SET_DIRECTIVE if we have `.set B, A' instead of `A = B'.
-   * HAVE_ASM_WEAK_DIRECTIVE if we have weak symbols using `.weak'.
-   * HAVE_ASM_WEAKEXT_DIRECTIVE if we have weak symbols using `.weakext'.
 
    */
 
 
 /* The symbols in all the user (non-_) macros are C symbols.  */
 
-#if !defined HAVE_ASM_WEAK_DIRECTIVE && !defined HAVE_ASM_WEAKEXT_DIRECTIVE
-# error "weak symbol support needed"
-#endif
-
 #ifndef __SYMBOL_PREFIX
 # define __SYMBOL_PREFIX
 #endif
 #  define strong_data_alias(original, alias) strong_alias(original, alias)
 # endif
 
-# ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
-#  define weak_alias(original, alias)                                  \
-  .weakext C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original)
-#  define weak_extern(symbol)                                          \
-  .weakext C_SYMBOL_NAME (symbol)
-
-# else /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
-
-#  define weak_alias(original, alias)                                  \
+# define weak_alias(original, alias)                                   \
   .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP                             \
   C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
 
-#  define weak_extern(symbol)                                          \
+# define weak_extern(symbol)                                           \
   .weak C_SYMBOL_NAME (symbol)
 
-# endif /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
-
 #endif /* __ASSEMBLER__ */
 
 /* On some platforms we can make internal function calls (i.e., calls of