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

Linux: use gcc to compile c++ files

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.4.1
    • Fix Version/s: 1.4.2
    • Component/s: infrastructure
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      mantis
    • CPU:
      generic
    • OS:
      linux

      Description


      Please see also bug 4665166. Note we have already fixed that one for the HotSpot
      workspace, this bug is filed for J2SE workspace, as apparently both
      libfontmanager.so and plugin still have dependency on libstdc++-libc6.1-1.so.2
      in b15. That could cause library-not-found errors on new Linux versions
      which do not have the ancient gcc-2.91 installed. The solution for now is to
      statically link libstdc++. And that's extremely easy to do and risk-free, just
      use the gcc driver instead of "g++" to compile and link C++ programs.

      The only change needed is in make/common/Defs-linux.gmk,

      34c34
      < CXX = $(COMPILER_PATH)gcc
      ---
      > CXX = $(COMPILER_PATH)g++

      It's been used in Blackdown's JDK port for quite a while and has been
      proved can solve many of the compatibility issues.

      I am logging the bug as P1, as it's expected major Linux vendors will be
      shipping their next release later this year based on gcc-3.x (e.g. Slackware 8.1
      is just released this week). We need to prepare for that, otherwise we could
      see a flurry of bugs on JDK not working with new Linux releases.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hhuangsunw Hui Huang (Inactive)
                Reporter:
                hhuangsunw Hui Huang (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: