public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Roland McGrath <roland@redhat.com>
Cc: libc-hacker@sources.redhat.com
Subject: Re: Fix configure check for source locations
Date: Thu, 12 Aug 2004 16:46:00 -0000	[thread overview]
Message-ID: <jellgkfgqx.fsf@sykes.suse.de> (raw)
In-Reply-To: <200408120614.i7C6E3oW028156@magilla.sf.frob.com> (Roland McGrath's message of "Wed, 11 Aug 2004 23:14:03 -0700")

Roland McGrath <roland@redhat.com> writes:

>> 2004-08-11  Andreas Schwab  <schwab@suse.de>
>> 
>> 	* configure.in: Fix libc_cv_cpp_asm_debuginfo test for ia64 and
>> 	add missing parens.
>
> I put in the syntax fix.  The outcome of this test is actually only used on
> i?86 (in sysdeps/i386/sysdep.h).  Unless an actual need for it is being
> introduced, I would prefer, rather than kludging it up for general use, to
> just stuff it into sysdeps/i386/configure.in instead so it won't even run
> on ia64.

So how about this:

2004-08-12  Andreas Schwab  <schwab@suse.de>

	* configure.in (libc_cv_cpp_asm_debuginfo): Move check to ...
	* sysdeps/i386/configure.in: ... here.  New file.
	* config.h.in (HAVE_CPP_ASM_DEBUGINFO): Mark it i386 specific.
	* configure: Rebuild.
	* sysdeps/i386/configure: New file.

Index: config.h.in
===================================================================
RCS file: /cvs/glibc/libc/config.h.in,v
retrieving revision 1.68
diff -u -p -a -r1.68 config.h.in
--- config.h.in	6 Jul 2004 04:14:17 -0000	1.68
+++ config.h.in	12 Aug 2004 16:32:27 -0000
@@ -61,9 +61,6 @@
 /* Define a symbol_name as a global .symbol_name for ld.  */
 #undef	HAVE_ASM_GLOBAL_DOT_NAME
 
-/* Define if the assembler generates debugging information directly.  */
-#undef	HAVE_CPP_ASM_DEBUGINFO
-
 /* Define if _Unwind_Find_FDE should be exported from glibc.  */
 #undef  EXPORT_UNWIND_FIND_FDE
 
@@ -199,6 +196,10 @@
 /* Mach/i386 specific: define if the `i386_set_gdt' RPC is available.  */
 #undef	HAVE_I386_SET_GDT
 
+/* i386 specific: Define if the assembler generates debugging information
+   directly.  */
+#undef	HAVE_CPP_ASM_DEBUGINFO
+
 /* Defined if forced unwind support is available.  */
 #undef	HAVE_FORCED_UNWIND
 
Index: configure.in
===================================================================
RCS file: /cvs/glibc/libc/configure.in,v
retrieving revision 1.420
diff -u -p -a -r1.420 configure.in
--- configure.in	12 Aug 2004 06:12:22 -0000	1.420
+++ configure.in	12 Aug 2004 16:32:27 -0000
@@ -1656,39 +1656,6 @@ if test $libc_cv_asm_cfi_directives = ye
   AC_DEFINE(HAVE_ASM_CFI_DIRECTIVES)
 fi
 
-AC_CACHE_CHECK(if -g produces usable source locations for assembler-with-cpp,
-	       libc_cv_cpp_asm_debuginfo, [dnl
-cat > conftest.S <<EOF
-#include "confdefs.h"
-
-/* comment on
-   two lines */
-	${libc_cv_dot_text}
-	${libc_cv_asm_global_directive} foo
-foo:
-	/* Unfortunately this test only works for a real instruction,
-	   not for any of the machine-independent pseudo-ops.
-	   So we just have to assume everybody has a "nop".  */
-	nop
-	/* comment */
-	nop
-	/* comment */
-	nop
-EOF
-if AC_TRY_COMMAND([${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&AS_MESSAGE_LOG_FD]) && {
-   ac_pattern='conftest\.S'
-   AC_TRY_COMMAND([readelf --debug-dump=line conftest.o |
-		   grep $ac_pattern 1>&AS_MESSAGE_LOG_FD])
-  }; then
-  libc_cv_cpp_asm_debuginfo=yes
-else
-  libc_cv_cpp_asm_debuginfo=no
-fi
-rm -f conftest*])AC_SUBST(libc_cv_cpp_asm_debuginfo)
-if test $libc_cv_cpp_asm_debuginfo = yes; then
-  AC_DEFINE(HAVE_CPP_ASM_DEBUGINFO)
-fi
-
 AC_CACHE_CHECK(for ld --no-whole-archive, libc_cv_ld_no_whole_archive, [dnl
 cat > conftest.c <<\EOF
 _start () {}
Index: sysdeps/i386/configure.in
===================================================================
RCS file: sysdeps/i386/configure.in
diff -N sysdeps/i386/configure.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ sysdeps/i386/configure.in	12 Aug 2004 16:32:30 -0000
@@ -0,0 +1,33 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/i386.
+
+AC_CACHE_CHECK(if -g produces usable source locations for assembler-with-cpp,
+	       libc_cv_cpp_asm_debuginfo, [dnl
+cat > conftest.S <<EOF
+#include "confdefs.h"
+
+/* comment on
+   two lines */
+	${libc_cv_dot_text}
+	${libc_cv_asm_global_directive} foo
+foo:
+	nop
+	/* comment */
+	nop
+	/* comment */
+	nop
+EOF
+if AC_TRY_COMMAND([${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&AS_MESSAGE_LOG_FD]) && {
+   ac_pattern='conftest\.S'
+   AC_TRY_COMMAND([readelf --debug-dump=line conftest.o |
+		   grep $ac_pattern 1>&AS_MESSAGE_LOG_FD])
+  }; then
+  libc_cv_cpp_asm_debuginfo=yes
+else
+  libc_cv_cpp_asm_debuginfo=no
+fi
+rm -f conftest*])
+AC_SUBST(libc_cv_cpp_asm_debuginfo)
+if test $libc_cv_cpp_asm_debuginfo = yes; then
+  AC_DEFINE(HAVE_CPP_ASM_DEBUGINFO)
+fi


Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

      reply	other threads:[~2004-08-12 16:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-10 22:53 Andreas Schwab
2004-08-12  6:14 ` Roland McGrath
2004-08-12 16:46   ` Andreas Schwab [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jellgkfgqx.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=libc-hacker@sources.redhat.com \
    --cc=roland@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).