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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH]: Conditionally reintroduce config.h to ggc-none.c


Hi People,

> > I suppose that's fair.  Let's hear what the Java maintainers think is
> > the Right Thing, though.
>
>I think your alternative 1 is perhaps more intrusive than I'd like.
>Your alternative 2 seems quite reasonable.  But I'm happy to consider
>a patch that does either of these.

This is the first of two patches to fix the (i686-pc-linux-gnu,i686-pc-mingw32,i686-pc-mingw32)
build (or any build!=host build) for Java as discussed here:

http://gcc.gnu.org/ml/gcc-patches/2004-09/msg00534.html

(
Note that in the above post, my statement about "we got (i686-pc-linux-gnu,i686-pc-linux-gnu,i686-pc-mingw32)
to build" was incorrect, as Zack pointed out here:

http://gcc.gnu.org/ml/gcc-patches/2004-09/msg00535.html
)

(Since this patch affects a top-level Changelog, I wasn't sure whether to submit
it together with the Java-specific second part or alone as I've done here.
So much to learn....)

It reintroduces #include "config.h" based on the macro GENERATOR_FILE. It's needed
for the second Java-specific patch which needs a host-specific ggc-none.o for
gcjh and jcf-dump when doing a cross build. The post-patch behavior should be
100% identical (knocking on simulated wood cabinet) to the prepatch behavior for
the top-level build of this file because -DGENERATOR_FILE is always defined
when building the top-level ggc-none.o.

I tested this for the following builds using cvs -D 2004-09-01:

- (i686-pc-linux-gnu,i686-pc-linux-gnu,i686-pc-linux-gnu)
- (i686-pc-linux-gnu,i686-pc-linux-gnu,i686-pc-mingw32)
- (i686-pc-linux-gnu,i686-pc-mingw32,i686-pc-mingw32)

...and successfully building and running both C++ and Java executables
on these. (The patch itself is written against current CVS HEAD but applies
cleanly to 2004-09-01. I can't test this against CVS HEAD because it doesn't
build.)

-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/

2004-09-06  Mohan Embar  <gnustuff@thisiscool.com>

	* ggc-none.c: Include "bconfig.h" if -DGENERATOR_FILE,
	"config.h" if not.

Index: ggc-none.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ggc-none.c,v
retrieving revision 1.19
diff -u -2 -r1.19 ggc-none.c
--- ggc-none.c	4 Aug 2004 20:55:08 -0000	1.19
+++ ggc-none.c	6 Sep 2004 14:53:06 -0000
@@ -20,9 +20,14 @@
    02111-1307, USA.  */
 
-/* This version is used by the gen* programs, where we don't really
-   need GC at all.  This prevents problems with pulling in all the
-   tree stuff.  */
+/* This version is used by the gen* programs and certain language-specific
+   targets (such as java), where we don't really need GC at all.
+   This prevents problems with pulling in all the tree stuff.  */
 
+#ifdef GENERATOR_FILE
 #include "bconfig.h"
+#else
+#include "config.h"
+#endif
+
 #include "system.h"
 #include "coretypes.h"





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