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

[Mac] Update build system to properly support Xcode 5 and later

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 8u40
    • 8
    • javafx
    • Mac OS X

    Description

      Currently a hard coded path is used to find the SDK to build against. This is problematic as if multiple versions of Xcode exist it may end up using the wrong version of Xcode than what the developer intended. Additionally, the SDK is currently wired to 10.7 which is no longer included with Xcode 5.


      There's two solutions to this:
      If we continue using -isysroot and need the paths, the first part can be resolved by running "xcode-select --print-path", the second by checking for the 10.7 SDK and switching to the 10.8 SDK if it's not found. But, IMHO, this solution just kicks the problem down the road again leaving more work to be done later.


      A more appropriate solution would be to change the compiler commands to "xcrun --sdk macosx clang" from clang, gcc or cc, and "xcrun --sdk macosx clang++" from clang++ or g++. If $(CC) and related macros are used in the build files then this should be easy to set globally so all projects always use the correct compiler. This avoids any use of isysroot and having the build system track locations of SDKs, which as we've seen several times now is prone to breakage with new releases of Xcode.

      Attachments

        Issue Links

          Activity

            People

              kcr Kevin Rushforth
              ddehaven David Dehaven (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: