newlib/configure patch

Joe Buehler
Fri Nov 22 06:58:00 GMT 2002

A test in newlib/configure will malfunction under at least some
shells (e.g. ksh) if ${CC} does not contain the string /libc/include.
The "test -z" ends up with no argument after the -z, which is a syntax

Index: src/newlib/configure
RCS file: /cvs/src/src/newlib/configure,v
retrieving revision 1.16
diff -u -r1.16 configure
--- src/newlib/configure	7 Jun 2002 21:59:35 -0000	1.16
+++ src/newlib/configure	8 Aug 2002 16:38:25 -0000
@@ -2987,7 +2987,8 @@

  # These get added in the top-level, except in the case where
  # newlib is being built natively.
-if test -z `echo ${CC} | grep \/libc\/include`; then
+X=`echo ${CC} | grep \/libc\/include`
+if test -z "$X"; then
    CC_FOR_NEWLIB="${CC} -I$PWD/targ-include -I${newlib_basedir}/libc/include"
Joe Buehler

More information about the Newlib mailing list