From: Zhao Wei Liew Date: Mon, 8 Aug 2016 23:24:10 +0000 (+0800) Subject: build: Allow both OpenJDK and OracleJDK by default X-Git-Tag: android-x86-7.1-r1~14 X-Git-Url: http://git.osdn.net/view?p=android-x86%2Fbuild.git;a=commitdiff_plain;h=49717409a50aedcfc843ef531d464f83ca161deb build: Allow both OpenJDK and OracleJDK by default Some users would like to build with Oracle JDK on Linux, while others would like to build with OpenJDK on Darwin. CM should build fine with either configuration, so drop the OpenJDK checks to allow both of them. Change-Id: I64d7887c2fab4dd301b07d7df0d19f28e97d80ab --- diff --git a/core/main.mk b/core/main.mk index a612f835d..f5baeac43 100644 --- a/core/main.mk +++ b/core/main.mk @@ -210,39 +210,6 @@ $(info ************************************************************) $(error stop) endif -# Check for the current JDK. -# -# For Java 1.7/1.8, we require OpenJDK on linux and Oracle JDK on Mac OS. -requires_openjdk := false -ifeq ($(BUILD_OS),linux) -requires_openjdk := true -endif - - -# Check for the current jdk -ifeq ($(requires_openjdk), true) -# The user asked for openjdk, so check that the host -# java version is really openjdk and not some other JDK. -ifeq ($(shell echo '$(java_version_str)' | grep -i openjdk),) -$(info ************************************************************) -$(info You asked for an OpenJDK based build but your version is) -$(info $(java_version_str).) -$(info ************************************************************) -$(error stop) -endif # java version is not OpenJdk -else # if requires_openjdk -ifneq ($(shell echo '$(java_version_str)' | grep -i openjdk),) -$(info ************************************************************) -$(info You are attempting to build with an unsupported JDK.) -$(info $(space)) -$(info You use OpenJDK but only Sun/Oracle JDK is supported.) -$(info Please follow the machine setup instructions at) -$(info $(space)$(space)$(space)$(space)https://source.android.com/source/download.html) -$(info ************************************************************) -$(error stop) -endif # java version is not Sun Oracle JDK -endif # if requires_openjdk - KNOWN_INCOMPATIBLE_JAVAC_VERSIONS := google incompat_javac := $(foreach v,$(KNOWN_INCOMPATIBLE_JAVAC_VERSIONS),$(findstring $(v),$(javac_version_str))) ifneq ($(incompat_javac),)