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

link-time-opt should not be using -fwhole-program

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 10
    • 10
    • infrastructure
    • None
    • b34

      When building hotspot with link-time-opt, we are currently using -fwhole-program to the linker. This causes all public symbols to be removed. To counter this, the attribute "externally_visible" has been added to JNIEXPORT for arm (the platform that traditionally has used link-time-opt).

      This is not an appropriate way of doing things.

      The gcc documentation says about "-fwhole-program": "This option should not be used in combination with -flto. Instead relying on a linker plugin should provide safer and more precise information."

      If we replace -fwhole-program with -fuse-linker-plugin, the need to use externally_visible disappears.

            ihse Magnus Ihse Bursie
            ihse Magnus Ihse Bursie
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: