This is the mail archive of the gcc-bugs@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: autoconf wrong + ICE during bootstrap for 000430 on i386-linux


 > From: "Andi Kleen" <ak@suse.de>
 > 
 > First it needed some surgery to compile at all to handle the
 > getrlimits: This autoconf check from gcc/configure.in seems to be
 > broken:
 > 
 > gcc_AC_NEED_DECLARATIONS(getrlimit setrlimit getrusage, [
 > #include "gansidecl.h"
 > #include "system.h"
 > #ifdef HAVE_SYS_RESOURCE_H
 > #include <sys/resource.h>
 > #endif
 > ])
 > 
 > because there is no way to pass HAVE_SYS_RESOURCE_H in, so the include
 > is never included, so the compilation of the test program fails. Later
 > the own declarations cause the compilation of gcc/gcc.c to fail,
 > because the RLIM_* constants are missing.
 > 
 > Given that it is impossible to add portable definition of RLIM_*
 > (gcc.c uses RLIM_STACK) the check for declarations is bogus. It'll
 > never work without the include.
 > 
 > The easiest fix is to remove it.
 > -Andi


Andi,

I don't think the test is broken.  HAVE_SYS_RESOURCE_H is supposed to
be defined in confdefs.h (if your system has it) and autoconf prepends
confdefs.h to the source code above.  (Take a look at the resulting C
code in the generated configure file.)  All of my platforms correctly
pass this test.  E.g. on redhat-linux:

 > checking whether getrlimit must be declared... no
 > checking whether setrlimit must be declared... no
 > checking whether getrusage must be declared... no


Would you please look in config.log and show me exactly what is going
wrong on your system?  This test shouldn't be failing, but if it is
I'd like to see the error message, etc.

		Thanks,
		--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]