Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4955492

GCC 3.3.1 Build Error / Too many warnings when building HotSpot with gcc

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 6
    • Fix Version/s: 6
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      mustang
    • CPU:
      x86, itanium
    • OS:
      linux, linux_redhat_3.0

      Description



      Name: jl125535 Date: 11/17/2003


      FULL PRODUCT VERSION :


      FULL OS VERSION :
      Linux server 2.4.22-lfs-1 #1 SMP Fri Oct 24 12:47:16 PDT 2003 i686 GenuineIntel unknown GNU/Linux


      A DESCRIPTION OF THE PROBLEM :
      Unable to compile j2sdk 1.4.2 as a source build.

        Bug Report that was sent to GCC.
      http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12590


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Follow Instructions as posted at.

      http://java.sun.com/j2se/1.4.2/scsl/build.html


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      A complete user-build java sdk, using GCC 3.3.x
      ACTUAL -
      /usr/src/java/hotspot/src/os_cpu/linux_i486/vm/atomic_linux_i486.inline.hpp: In
         function `jboolean JVM_CX8Field(JNIEnv*, _jobject*, _jfieldID*, long long
         int, long long int)':
      /usr/src/java/hotspot/src/os_cpu/linux_i486/vm/atomic_linux_i486.inline.hpp:50:
       error: impossible constraint in `asm'

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
        Fix suggested by GCC.

      The problem is with the "o" constriant, if I change it to m (which looks better and is right constraint to use in this case because the memory location could be any where).

        Patch for the above fix.
      diff -Naur java.orig/hotspot/src/os_cpu/linux_i486/vm/atomic_linux_i486.inline.hpp java/hotspot/src/os_cpu/linux_i486/vm/atomic_linux_i486.inline.hpp
      --- java.orig/hotspot/src/os_cpu/linux_i486/vm/atomic_linux_i486.inline.hpp 2003-09-11 01:40:30.000000000 +0000
      +++ java/hotspot/src/os_cpu/linux_i486/vm/atomic_linux_i486.inline.hpp 2003-10-19 17:41:48.000000000 +0000
      @@ -49,7 +49,7 @@
         jlong old_value;
         __asm__ volatile ( "pushl %%ebx;mov 4+%1,%%ecx;mov %1,%%ebx;lock;cmpxchg8b (%3);popl %%ebx"
                           : "=A" (old_value)
      - : "o" (exchange_value), "A" (compare_value), "r" (dest)
      + : "m" (exchange_value), "A" (compare_value), "r" (dest)
                           : "%ebx", "%ecx", "memory");
         return old_value;
       }
      (Incident Review ID: 217806)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              hhuangsunw Hui Huang (Inactive)
              Reporter:
              jleesunw Jon Lee (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: