This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix for PR 8180, --without-headers
- From: Geoffrey Keating <gkeating at apple dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Dan Kegel <dank at kegel dot com>, Dara Hazeghi <dhazeghi at yahoo dot com>
- Date: Wed, 20 Aug 2003 19:18:09 -0700 (PDT)
- Subject: Fix for PR 8180, --without-headers
This ought to fix PR 8180, which is that --without-headers doesn't
work.
Bootstrapped & tested on powerpc-darwin.
--
- Geoffrey Keating <geoffk@apple.com>
===File ~/patches/gcc-withoutheader.patch===================
Index: ChangeLog
2003-08-20 Geoffrey Keating <geoffk@apple.com>
PR 8180
* configure.in: When testing with_libs and with_headers, treat
'no' as unset. Based on a patch by Dan Kegel <dank@kegel.com>.
* configure: Regenerate.
Index: gcc/ChangeLog
2003-08-20 Geoffrey Keating <geoffk@apple.com>
PR 8180
* configure.in: When testing with_libs and with_headers, treat
'no' as unset. Based on a patch by Dan Kegel <dank@kegel.com>.
* configure: Regenerate.
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/configure.in,v
retrieving revision 1.251
diff -u -p -u -p -r1.251 configure.in
--- configure.in 21 Aug 2003 02:14:45 -0000 1.251
+++ configure.in 21 Aug 2003 02:15:36 -0000
@@ -253,7 +253,8 @@ esac
# If both --with-headers and --with-libs are specified, default to
# --without-newlib.
-if test x"${with_headers}" != x && test x"${with_libs}" != x ; then
+if test x"${with_headers}" != x && test x"${with_headers} != xno \
+ && test x"${with_libs}" != x && test x"${with_libs} != xno ; then
if test x"${with_newlib}" = x ; then
with_newlib=no
fi
@@ -937,7 +938,7 @@ copy_dirs=
# Handle --with-headers=XXX. If the value is not "yes", the contents of
# the named directory are copied to $(tooldir)/sys-include.
-if test x"${with_headers}" != x ; then
+if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
if test x${is_cross_compiler} = xno ; then
echo 1>&2 '***' --with-headers is only supported when cross compiling
exit 1
@@ -954,7 +955,7 @@ fi
# Handle --with-libs=XXX. If the value is not "yes", the contents of
# the name directories are copied to $(tooldir)/lib. Multiple directories
# are permitted.
-if test x"${with_libs}" != x ; then
+if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
if test x${is_cross_compiler} = xno ; then
echo 1>&2 '***' --with-libs is only supported when cross compiling
exit 1
Index: gcc/configure.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.in,v
retrieving revision 1.717
diff -u -p -u -p -r1.717 configure.in
--- gcc/configure.in 20 Aug 2003 02:58:49 -0000 1.717
+++ gcc/configure.in 21 Aug 2003 02:15:36 -0000
@@ -1449,7 +1449,7 @@ fi
inhibit_libc=
if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
test x$with_newlib = xyes ; } &&
- test "x$with_headers" = x ; then
+ { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
inhibit_libc=-Dinhibit_libc
fi
AC_SUBST(inhibit_libc)
============================================================