This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Passing LIBGCJ_CFLAGS to classpath configure and build
- From: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- To: java-patches at gcc dot gnu dot org
- Date: Fri, 7 Jul 2006 21:04:18 +0200 (MEST)
- Subject: Passing LIBGCJ_CFLAGS to classpath configure and build
I've started investigating how to fix PR libgcj/28190
[4.2 Regression] libjava bootstrap failure on IRIX 6.5: stdint.h misdetection
As already mentioned in the PR, the problem has three parts:
* libjava/classpath/m4/ax_create_stdint_h.m4 (AX_CREATE_STDINT_H) clears
CFLAGS etc. before testing for <stdint.h>. This is wrong on IRIX 6.5
where -std=c99 is necessary for <stdint.h> to work, and it only seems to
make sense to pass this flag into configure (before the macro is fixed to
handle this by itself). I've already contacted the macro author to learn
why this is done this way, but received no reaction so far.
For now, I lean to removing the code clearing CFLAGS etc. altogether.
* In order for the <stdint.h> detection to work properly, -std=c99 needs to
be passed into the classpath configure. I planned to do this via
libjava/configure.host, where I can easily set a per-platform
libgcj_cflags. It seems that I need to set CFLAGS="${CFLAGS}
${LIBGCJ_CFLAGS}" at the end of configure.ac for this to work, since
classpath knows nothing about LIBGCJ_CFLAGS (and shouldn't)?
* When I had initially achieved this (by manually fixing
classpath/config.status to include -std=c99), I noticed that the
compilation proper worked if run manually in classpath/native/fdlibm, but
broke during a bootstrap: the CFLAGS value in the classpath Makefiles
was overridden at compile time by passing in CFLAGS (without
LIBGCJ_CFLAGS) again from the libjava Makefile.
I have not yet been able to untangle that maze and find the correct way to
handle this.
Suggestions?
Rainer
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University