diff mbox

Don't encode the minor version in the gcj abi version

Message ID ydd60v280q6.fsf@lokon.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth April 28, 2016, 10:52 a.m. UTC
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

> Matthias Klose <doko@ubuntu.com> writes:
>
>> Bumping the version from from 6.0.0 to 6.1.0 broke gcj, because the minor
>> version is still encoded in the gcj abi, not seen during development of the
>> 6 series until it was bumped for the final release.
>
> This is PR java/70839.

I just noticed that your patch is incomplete: it leaves the now unused
minor around and incorrectly talks about sub-minor versions...

Here's what I had in the PR instead:

2016-04-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR java/70839
	* decl.c (parse_version): Remove minor handling.
Rainer

Comments

Matthias Klose April 28, 2016, 11:45 a.m. UTC | #1
On 28.04.2016 12:52, Rainer Orth wrote:
> Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:
>
>> Matthias Klose <doko@ubuntu.com> writes:
>>
>>> Bumping the version from from 6.0.0 to 6.1.0 broke gcj, because the minor
>>> version is still encoded in the gcj abi, not seen during development of the
>>> 6 series until it was bumped for the final release.
>>
>> This is PR java/70839.
>
> I just noticed that your patch is incomplete: it leaves the now unused
> minor around and incorrectly talks about sub-minor versions...
>
> Here's what I had in the PR instead:
>
> 2016-04-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>
> 	PR java/70839
> 	* decl.c (parse_version): Remove minor handling.

yes, that looks good. Can't approve it myself.
Andrew Haley April 28, 2016, 11:47 a.m. UTC | #2
On 04/28/2016 12:45 PM, Matthias Klose wrote:
> yes, that looks good. Can't approve it myself.

OK.

Andrew.
diff mbox

Patch

# HG changeset patch
# Parent  acf979f160547bd8b9b207525f97c29f6c9a9a6e
Don't include minor version in GCJ ABI version

diff --git a/gcc/java/decl.c b/gcc/java/decl.c
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -507,7 +507,7 @@  static void
 parse_version (void)
 {
   const char *p = version_string;
-  unsigned int major = 0, minor = 0;
+  unsigned int major = 0;
   unsigned int abi_version;
 
   /* Skip leading junk.  */
@@ -525,13 +525,6 @@  parse_version (void)
   gcc_assert (*p == '.' && ISDIGIT (p[1]));
   ++p;
 
-  /* Extract minor version.  */
-  while (ISDIGIT (*p))
-    {
-      minor = minor * 10 + *p - '0';
-      ++p;
-    }
-
   if (flag_indirect_dispatch)
     {
       abi_version = GCJ_CURRENT_BC_ABI_VERSION;
@@ -540,9 +533,9 @@  parse_version (void)
   else /* C++ ABI */
     {
       /* Implicit in this computation is the idea that we won't break the
-	 old-style binary ABI in a sub-minor release (e.g., from 4.0.0 to
-	 4.0.1).  */
-      abi_version = 100000 * major + 1000 * minor;
+	 old-style binary ABI in a minor release (e.g., from 6.1.0 to
+	 6.2.0).  */
+      abi_version = 100000 * major;
     }
   if (flag_bootstrap_classes)
     abi_version |= FLAG_BOOTSTRAP_LOADER;