Fix configure check for source locations
Andreas Schwab
schwab@suse.de
Thu Aug 12 16:46:00 GMT 2004
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."
More information about the Libc-hacker
mailing list