From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10707 invoked by alias); 6 Dec 2002 15:45:42 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 10688 invoked from network); 6 Dec 2002 15:45:39 -0000 Received: from unknown (HELO sunsite.mff.cuni.cz) (195.113.19.66) by sources.redhat.com with SMTP; 6 Dec 2002 15:45:39 -0000 Received: (from jakub@localhost) by sunsite.mff.cuni.cz (8.11.6/8.11.6) id gB6Fjae13784; Fri, 6 Dec 2002 16:45:36 +0100 Date: Fri, 06 Dec 2002 07:45:00 -0000 From: Jakub Jelinek To: Ulrich Drepper , Roland McGrath Cc: Glibc hackers Subject: [PATCH] Fix annexc test Message-ID: <20021206164536.G1310@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i X-SW-Source: 2002-12/txt/msg00005.txt.bz2 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 :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 :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 * 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 \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