This is the mail archive of the libc-alpha@sources.redhat.com 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]

Workaround for current gcc problem



The current GCC version from CVS has done changes to CPP which break
some assumptions in glibc.  One place (I didn't find others so far but
suspect that there might be more) has been reported by Stanislav via
GNATS:

> Preprocessing of
> i.86-.*-linux.*         ld=ld-linux.so.2
> will cause
> i.86 -.*-linux.* ld=ld-linux.so.2
> 
> I didn't investigated more about reason, why space is added (see fix),
> but problematic phase is cpp'ing.
> 
> >How-To-Repeat:
> echo "i.86-.*-linux.* ld=ld-linux.so.2" | gcc -E -undef -x c -
> The result is the line above.

The following patch fixes this and works also with gcc 2.95.2.  Neil,
can you send your explanation why this patch is needed?

Please note that the current CVS version still will not compile glibc,
the problems are:
- zero size arrays don't work at all
- -g -include does not work (there's a patch available but not applied)
- some code generation problems

Is it ok to commit this?

Andreas

2000-11-20  Andreas Jaeger  <aj@suse.de>

	* Makeconfig (preprocess-version): Use -traditional-cpp to fix
	problems with current GCC CVS version.
        Patch by Stanislav Brabec <utx@penguin.cz>.

============================================================
Index: Makeconfig
--- Makeconfig	2000/11/16 02:06:35	1.248
+++ Makeconfig	2000/11/20 08:38:44
@@ -694,7 +694,7 @@
 # %ifdef et al based on config.h settings or other %include'd files.
 define preprocess-versions
 sed 's/#.*$$//;s/^[ 	]*%/#/' \
-| $(CC) -E -undef -I$(common-objdir) -I$(..)include \
+| $(CC) -E -traditional-cpp -undef -I$(common-objdir) -I$(..)include \
 		  -include $(common-objpfx)config.h \
 		  -x c - \
 | sed 's/#.*$$//;/^[ 	]*$$/d'

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

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