RFR: JDK-8138694: Devkit build on Macosx still requires Xcode to be installed
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Fri Oct 2 15:14:53 UTC 2015
On 2015-10-02 15:34, Erik Joelsson wrote:
> Hello,
>
> While trying the macosx build using devkits again, I happened to be on
> a system where some Xcode install/update error had left the
> /usr/include directory missing. This shouldn't be an issue since we
> have all the necessary include files in the SDK inside the
> devkit/Xcode application.
>
> Getting this to work required several changes and cleanups that will
> actually improve build consistency overall. It will also guarantee
> that we use the correct system headers in all cases.
>
> * Setup SYSROOT_*FLAGS before detecting toolchain and make those flags
> available to the configure toolchain tests.
> * Setup the user supplied extra flags before toolchain detection so
> that those are also used during configure toolchain tests.
> * When not cross compiling, use the SYSROOT_*FLAGS also when compiling
> build tools, like adlc in hotspot, and gensrc tools in jdk.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8138694
> Webrev: http://cr.openjdk.java.net/~erikj/8138694/webrev.top.01/
Your changes looks good. However, I notice that there is a problem with
the code that you moved. In FLAGS_SETUP_SYSROOT_FLAGS, there is a test:
elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
# Apple only wants -isysroot <path>, but we also need
-iframework<path>/System/Library/Frameworks
SYSROOT_CFLAGS="-isysroot $SYSROOT -iframework
$SYSROOT/System/Library/Frameworks"
SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
but this is incorrect. Remove this and instead add the -iframework stuff
at the end. There is already a macosx test for adding framework flags,
the -iframework addition fits in perfect there.
/Magnus
More information about the build-dev
mailing list