This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Re: gcc configure --with-headers broken?


I'm not sure my attempt to resend this to gcc-patches worked (it seems
to have been rejected), so here's what I've just tested, after Matt
Taggart confirmed it fixed his problem.



On Aug 23, 2000, Matt Taggart <taggart@carmen.fc.hp.com> wrote:

> It looks like "-nostdinc" is added to the compile line but then the right 
> include directory is not specified.

When --with-headers is given, configure disables newlib, so it
shouldn't be adding -nostdinc to FLAGS_FOR_TARGET.  This was yet
another side effect of the top-level configure.in/Makefile.in overhaul
I started one month ago.

Does this (untested) patch fix it for you?

Index: ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* configure.in (FLAGS_FOR_TARGET): Use $target_configdirs and
	$targargs to tell whether newlib is going to be built.

Index: configure.in
===================================================================
RCS file: /cvs/gcc/egcs/configure.in,v
retrieving revision 1.67
diff -u -p -r1.67 configure.in
--- configure.in	2000/08/16 18:34:04	1.67
+++ configure.in	2000/08/24 07:29:33
@@ -1235,6 +1235,10 @@ FLAGS_FOR_TARGET=
 case " $skipdirs " in
 *" target-newlib "*) ;;
 *)
+ case " $target_configdirs " in
+ *" newlib "*)
+  case " $targargs " in
+  *" --with-newlib "*)
    case "$target" in
    *-cygwin*)
      FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/include -isystem $$s/winsup/cygwin/include -isystem $$s/winsup/w32api/include -isystem $$s/newlib/libc/sys/cygwin -isystem $$s/newlib/libc/sys/cygwin32' ;;
@@ -1252,6 +1256,10 @@ case " $skipdirs " in
    # switch).
    FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
    ;;
+  esac
+  ;;
+ esac
+ ;;
 esac
 
 # On Canadian crosses, we'll be searching the right directories for
-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me



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