This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 1/2]: configure: use the .set directive when testing for .weak


When testing for the .weak assembler directive, use the .set syntax
if that is what the assembler supports; else use the "=" syntax for
setting symbols.  Without this, assembler support for .weak is
mis-detected.

2010-09-21  Linas Vepstas <linasvepstas@gmail.com>
        * configure.in: use the .set directive when testing for .weak support


I'm including the patch as an attachment; as otherwise I fear my mailer
will scramble it; If you'd prefer inline rather than attachments, let me know
and I can retry ...

--linas
When testing for the .weak assembler directive, use the .set syntax
if that is what the assembler supports; else use the "=" syntax for
setting symbols.  Without this, assembler support for .weak is
mis-detected.

2010-09-21  Linas Vepstas <linasvepstas@gmail.com>
	* configure.in: use the .set directive when testing for .weak support

---
 configure.in |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Index: glibc-2.12.1/configure.in
===================================================================
--- glibc-2.12.1.orig/configure.in	2010-09-21 10:58:19.000000000 -0500
+++ glibc-2.12.1/configure.in	2010-09-21 11:42:56.000000000 -0500
@@ -1894,6 +1894,13 @@ if test $elf = yes; then
   libc_cv_weak_symbols=yes
 fi
 
+if test $libc_cv_asm_set_directive = yes; then
+  libc_cv_asm_do_set=.set
+  libc_cv_asm_do_set_eq=","
+else
+  libc_cv_asm_do_set=
+  libc_cv_asm_do_set_eq="="
+fi
 AC_CACHE_CHECK(for assembler .weak directive, libc_cv_asm_weak_directive,
 	       [dnl
 cat > conftest.s <<EOF
@@ -1901,7 +1908,8 @@ ${libc_cv_dot_text}
 ${libc_cv_asm_global_directive} foo
 foo:
 .weak foo
-.weak bar; bar = foo
+.weak bar
+${libc_cv_asm_do_set} bar ${libc_cv_asm_do_set_eq} foo
 EOF
 if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
   libc_cv_asm_weak_directive=yes

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]