about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--config.h.in6
-rwxr-xr-xconfigure67
-rw-r--r--configure.ac44
-rw-r--r--include/libc-symbols.h22
5 files changed, 15 insertions, 136 deletions
diff --git a/ChangeLog b/ChangeLog
index 961041189b..38fa0cb1f9 100644
--- 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.
diff --git a/config.h.in b/config.h.in
index 40c2d45009..44e859088b 100644
--- a/config.h.in
+++ b/config.h.in
@@ -18,12 +18,6 @@
 /* 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
diff --git a/configure b/configure
index d4cb9cd17f..489ea00200 100755
--- 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 :
diff --git a/configure.ac b/configure.ac
index 402de30b87..14f5c170d9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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 () {}
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index e2c63fc392..a9ac0e3ed7 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -35,11 +35,9 @@
    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'.
 
    */
 
@@ -80,10 +78,6 @@
 
 /* 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
@@ -142,23 +136,13 @@
 #  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