< prev index next >

make/autoconf/toolchain.m4

Print this page
rev 54158 : 8250876: Fix issues with cross-compile on macos
Reviewed-by: erikj, ihse

@@ -946,13 +946,18 @@
     fi
 
     # FIXME: we should list the discovered compilers as an exclude pattern!
     # If we do that, we can do this detection before POST_DETECTION, and still
     # find the build compilers in the tools dir, if needed.
+    if test "x$OPENJDK_BUILD_OS" = xmacosx; then
+      BASIC_REQUIRE_PROGS(BUILD_CC, [clang cl cc gcc])
+      BASIC_REQUIRE_PROGS(BUILD_CXX, [clang++ cl CC g++])
+    else
     BASIC_REQUIRE_PROGS(BUILD_CC, [cl cc gcc])
-    BASIC_FIXUP_EXECUTABLE(BUILD_CC)
     BASIC_REQUIRE_PROGS(BUILD_CXX, [cl CC g++])
+    fi
+    BASIC_FIXUP_EXECUTABLE(BUILD_CC)
     BASIC_FIXUP_EXECUTABLE(BUILD_CXX)
     BASIC_PATH_PROGS(BUILD_NM, nm gcc-nm)
     BASIC_FIXUP_EXECUTABLE(BUILD_NM)
     BASIC_PATH_PROGS(BUILD_AR, ar gcc-ar)
     BASIC_FIXUP_EXECUTABLE(BUILD_AR)
< prev index next >