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

Change macosx deployment target to 10.9

    XMLWordPrintable

Details

    • b09
    • os_x

    Backports

      Description

        When building JDK 11 with Xcode 9.2, we get a bunch of warnings like this:

        clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]

        This is because Xcode comes with two different standard library implementations, the gnu libstdc++ and the newer libc++. Clang in more recent versions has deprecated libstdc++ and Xcode has picked that up.

        In order to change to libc++, we must also change our deployment target from 10.7 to at least 10.9, as specified in the warning message. We currently use 10.7 because that was the minimum version when we brought the mac port in. However, for JDK 9, Oracle already specified the minimum supported version of Macos to be 10.10, so we should be fine bumping the deployment target to that version. We cannot do that until we switch to the new Xcode version however, so for now, lets stick to 10.9.

        Making this change in the build is easy, just bump the MACOSX_MINIMUM_VERSION variable in flags.m4 to 10.9 and then change the -stdlib=libstdc++ argument in JVM_LDFLAGS (or remove it altogether). However, when doing so we trigger a lot of warnings which need to be addressed. These are beyond me to get right.

        Attachments

          1. java.desktop-disabled-warnings.patch
            1 kB
            Erik Joelsson
          2. patch
            2 kB
            Erik Joelsson

          Issue Links

            Activity

              People

                erikj Erik Joelsson
                erikj Erik Joelsson
                Votes:
                0 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: