classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fwd: Re: [cp-patches] [RFC] require gcj 4 in build machinery]


From: Andrew Pinski
Subject: Re: [Fwd: Re: [cp-patches] [RFC] require gcj 4 in build machinery]
Date: Fri, 9 Sep 2005 21:47:14 -0400


On Sep 9, 2005, at 9:05 PM, Mark Wielaard wrote:

Forgot to CC classpath-patches.
If someone else (with more sed knowledge) could check that would be
appreciated.

Maybe a better way to make a small C file which tests the GCC version
that way?  You can compile it with the gcj driver so it should be no
problems with having two different versions of GCC installed.
And this will get away from using sed or regex fully.

The macros needed to test are __GNUC__, __GNUC_MINOR__, and
__GNUC_PATCHLEVEL__.
For 4.1.0, we get:
#define __GNUC__ 4
#define __GNUC_MINOR__ 1
#define __GNUC_PATCHLEVEL__ 0

Doing something like:
#if __GNUC__ <= 3
#error GCJ 4.0.0 or higher is required
#endif
----
will work, just fine.  If you want to test a specific version of 4.0
you could look at the __VERSION__ define:
#define __VERSION__ "4.1.0 20050705 (experimental)"


Thanks,
Andrew Pinski





reply via email to

[Prev in Thread] Current Thread [Next in Thread]