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: f2c configure fix


 > From: Richard Henderson <rth@twiddle.net>
 > 
 > I don't recall noticing when it started, but libf2c's fragile
 > integer size detection widgetry has broken again.
 > 
 > This time it gets confused because f/proj.h includes system,
 > which includes system.h, which includes libiberty.h, which
 > includes ansidecl.h (the libiberty version), which defines
 > PROTO in a way that is incompatible with gcc's headers.  So
 > you wind up with lots of error messages from cpp.  Why libf2c
 > doesn't die in its configury here, I don't know.
 > 
 > But it winds up deciding that an int is a long, and on Alpha
 > things go downhill with that.
 > 
 > It appears one must get gansidecl.h to define PROTO properly,
 > which requires IN_GCC and tm.h.  
 > 
 > The following seems to work.  Kaveh, is this the best thing
 > to do to get what's needed?
 > r~


	In trying to understand what's not working here, I
bootstrapped on alphaev5-dec-osf4.0b (which was successful.)

	I then looked at alphaev5-dec-osf4.0b/libf2c/config.log and
found this:


 > configure:986: checking f2c integer type
 > configure:995: using $CPP $CPPFLAGS -I../../gcc/f -I../../gcc -I../../gcc/config
 > In file included from ../../gcc/f/system.j:25,
 >                  from ../../gcc/f/proj.h:32,
 >                  from configure:998:
 > ../../gcc/system.h:426: libiberty.h: No such file or directory
 > configure:1056: checking f2c long int type
 > configure:1065: using $CPP $CPPFLAGS -I../../gcc/f -I../../gcc -I../../gcc/config
 > In file included from ../../gcc/f/system.j:25,
 >                  from ../../gcc/f/proj.h:32,
 >                  from configure:1068:
 > ../../gcc/system.h:426: libiberty.h: No such file or directory
 > configure:1089: using $CPP $CPPFLAGS -I../../gcc/f -I../../gcc -I../../gcc/config
 > In file included from ../../gcc/f/system.j:25,
 >                  from ../../gcc/f/proj.h:32,
 >                  from configure:1092:
 > ../../gcc/system.h:426: libiberty.h: No such file or directory


	So it appeared that the problem was that the appropriate -I
flag wasn't passed to configure to find libiberty.h..  (I'll assume
your explanation above occured because you fixed this and found the
next problem was that PROTO wasn't defined properly.)

	If PROTO is the only problem, then perhaps all you need is to
get gansidecl.h before proj.h in these tests from configure.in.
Gansidecl.h includes ansidecl.h and then ensures we have the
appropriate definition for the PROTO macro.  I haven't tested this
though.

However, I am leery about the current setup in libf2c/configure.in.  The
problem is that proj.h includes either config.j or hconfig.j and then
system.j.  Your use of tm.h seems more correct since this is a test on
the "target" arch for building multilibbed stuff.  I'm not convinced
that the autoconf test including proj.h which then gets
config.j/hconfig.j is valid for a cross compiler when building target
libraries.  This has nothing to do with your problem though. 

	I hope these thoughts are useful.

		--Kaveh
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions


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