public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix annexc test
@ 2002-12-06  7:45 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2002-12-06  7:45 UTC (permalink / raw)
  To: Ulrich Drepper, Roland McGrath; +Cc: Glibc hackers

Hi!

With nptl annexc test spits out
In file included from ../nptl/sysdeps/i386/i686/tls.h:34,
                 from ../include/tls.h:3,
                 from ../sysdeps/generic/bits/libc-tsd.h:45,
                 from ../locale/localeinfo.h:190,
                 from ../include/ctype.h:14,
                 from <stdin>:1:
../nptl/sysdeps/i386/tls.h:48:3: #error "TLS support is required."
In file included from ../nptl/sysdeps/i386/i686/tls.h:34,
                 from ../include/tls.h:3,
                 from ../include/errno.h:22,
                 from <stdin>:1:
../nptl/sysdeps/i386/tls.h:48:3: #error "TLS support is required."
and similarly to linuxthreads build outputs lots of invalid macro errors
which are not relevant to installed headers, but solely to glibc build.
The following patch seems to cure it, I've verified it only looks at
libc headers from current tree (plus linux headers and gcc headers),
never installed libc headers.

2002-12-06  Jakub Jelinek  <jakub@redhat.com>

	* posix/Makefile (annexc.out): Add -I../dir for all sorted-dirs.
	* posix/annexc.c (fmt, testfmt): Remove -D_LIBC.

--- libc/posix/Makefile.jj	2002-11-25 00:11:20.000000000 +0100
+++ libc/posix/Makefile	2002-12-06 18:03:01.000000000 +0100
@@ -155,7 +155,7 @@ endif
 
 $(objpfx)annexc.out: $(objpfx)annexc
 	-$(dir $<)$(notdir $<) '$(CC)' \
-			       '-I../include -I.. $(+sysdep-includes) $(sysincludes)' > $@
+	  '$(patsubst %,-I../%,$(sorted-subdirs)) -I../include -I.. $(+sysdep-includes) $(sysincludes)' > $@
 
 annexc-CFLAGS = -O
 $(objpfx)annexc: annexc.c
--- libc/posix/annexc.c.jj	2001-07-06 06:55:38.000000000 +0200
+++ libc/posix/annexc.c	2002-12-06 17:47:39.000000000 +0100
@@ -615,12 +615,12 @@ static struct header
 /* Format string to build command to invoke compiler.  */
 static const char fmt[] = "\
 echo \"#include <%s>\" |\
-%s -E -dM -D_POSIX_SOURCE -D_LIBC %s \
+%s -E -dM -D_POSIX_SOURCE %s \
 -isystem `%s --print-prog-name=include` - > %s";
 
 static const char testfmt[] = "\
 echo \"#include <unistd.h>\n#if !defined %s || %s == -1\n#error not defined\n#endif\n\" |\
-%s -E -dM -D_POSIX_SOURCE -D_LIBC %s \
+%s -E -dM -D_POSIX_SOURCE %s \
 -isystem `%s --print-prog-name=include` - 2> /dev/null > %s";
 
 

	Jakub

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-12-06 15:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-06  7:45 [PATCH] Fix annexc test Jakub Jelinek

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).