Thu, 27 Dec 2018 11:59:21 +0800
Added tag mips64el-jdk8u192-b13 for changeset 64a3eeabf6e5
aoqi@0 | 1 | # |
kevinw@2206 | 2 | # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. |
aoqi@0 | 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
aoqi@0 | 4 | # |
aoqi@0 | 5 | # This code is free software; you can redistribute it and/or modify it |
aoqi@0 | 6 | # under the terms of the GNU General Public License version 2 only, as |
aoqi@0 | 7 | # published by the Free Software Foundation. Oracle designates this |
aoqi@0 | 8 | # particular file as subject to the "Classpath" exception as provided |
aoqi@0 | 9 | # by Oracle in the LICENSE file that accompanied this code. |
aoqi@0 | 10 | # |
aoqi@0 | 11 | # This code is distributed in the hope that it will be useful, but WITHOUT |
aoqi@0 | 12 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
aoqi@0 | 13 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
aoqi@0 | 14 | # version 2 for more details (a copy is included in the LICENSE file that |
aoqi@0 | 15 | # accompanied this code). |
aoqi@0 | 16 | # |
aoqi@0 | 17 | # You should have received a copy of the GNU General Public License version |
aoqi@0 | 18 | # 2 along with this work; if not, write to the Free Software Foundation, |
aoqi@0 | 19 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
aoqi@0 | 20 | # |
aoqi@0 | 21 | # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
aoqi@0 | 22 | # or visit www.oracle.com if you need additional information or have any |
aoqi@0 | 23 | # questions. |
aoqi@0 | 24 | # |
aoqi@0 | 25 | |
aoqi@2161 | 26 | # |
aoqi@2161 | 27 | # This file has been modified by Loongson Technology in 2018. These |
aoqi@2161 | 28 | # modifications are Copyright (c) 2018 Loongson Technology, and are made |
aoqi@2161 | 29 | # available on the same license terms set forth above. |
aoqi@2161 | 30 | # |
aoqi@2161 | 31 | |
aoqi@0 | 32 | ############################################################################### |
aoqi@0 | 33 | # |
aoqi@0 | 34 | # Includes and boilerplate |
aoqi@0 | 35 | # |
aoqi@0 | 36 | ############################################################################### |
aoqi@0 | 37 | |
aoqi@0 | 38 | |
aoqi@0 | 39 | AC_PREREQ([2.69]) |
aoqi@0 | 40 | AC_INIT(OpenJDK, jdk8, build-dev@openjdk.java.net,,http://openjdk.java.net) |
aoqi@0 | 41 | |
kevinw@2213 | 42 | AC_CONFIG_AUX_DIR([$TOPDIR/common/autoconf/build-aux]) |
aoqi@0 | 43 | m4_include([build-aux/pkg.m4]) |
aoqi@0 | 44 | |
aoqi@0 | 45 | # Include these first... |
aoqi@0 | 46 | m4_include([basics.m4]) |
aoqi@0 | 47 | m4_include([basics_windows.m4]) |
aoqi@0 | 48 | m4_include([builddeps.m4]) |
aoqi@0 | 49 | # ... then the rest |
aoqi@0 | 50 | m4_include([boot-jdk.m4]) |
aoqi@0 | 51 | m4_include([build-performance.m4]) |
kevinw@2206 | 52 | m4_include([flags.m4]) |
aoqi@0 | 53 | m4_include([help.m4]) |
aoqi@0 | 54 | m4_include([jdk-options.m4]) |
aoqi@0 | 55 | m4_include([libraries.m4]) |
aoqi@0 | 56 | m4_include([platform.m4]) |
aoqi@0 | 57 | m4_include([source-dirs.m4]) |
aoqi@0 | 58 | m4_include([toolchain.m4]) |
aoqi@0 | 59 | m4_include([toolchain_windows.m4]) |
aoqi@0 | 60 | |
aoqi@0 | 61 | AC_DEFUN_ONCE([CUSTOM_EARLY_HOOK]) |
aoqi@0 | 62 | AC_DEFUN_ONCE([CUSTOM_LATE_HOOK]) |
ihse@1320 | 63 | AC_DEFUN_ONCE([CUSTOM_CONFIG_OUTPUT_GENERATED_HOOK]) |
aoqi@0 | 64 | |
aoqi@0 | 65 | # This line needs to be here, verbatim, after all includes and the dummy hook |
aoqi@0 | 66 | # definitions. It is replaced with custom functionality when building |
aoqi@0 | 67 | # custom sources. |
aoqi@0 | 68 | #CUSTOM_AUTOCONF_INCLUDE |
aoqi@0 | 69 | |
aoqi@0 | 70 | # Do not change or remove the following line, it is needed for consistency checks: |
aoqi@0 | 71 | DATE_WHEN_GENERATED=@DATE_WHEN_GENERATED@ |
aoqi@0 | 72 | |
aoqi@0 | 73 | ############################################################################### |
aoqi@0 | 74 | # |
aoqi@0 | 75 | # Initialization / Boot-strapping |
aoqi@0 | 76 | # |
aoqi@0 | 77 | # The bootstrapping process needs to solve the "chicken or the egg" problem, |
aoqi@0 | 78 | # thus it jumps back and forth, each time gaining something needed later on. |
aoqi@0 | 79 | # |
aoqi@0 | 80 | ############################################################################### |
aoqi@0 | 81 | |
kevinw@2206 | 82 | # If we are requested to print additional help, do that and then exit. |
kevinw@2206 | 83 | # This must be the very first call. |
kevinw@2206 | 84 | HELP_PRINT_ADDITIONAL_HELP_AND_EXIT |
kevinw@2206 | 85 | |
kevinw@2206 | 86 | # Basic initialization that must happen first of all in the normal process. |
aoqi@0 | 87 | BASIC_INIT |
aoqi@0 | 88 | BASIC_SETUP_FUNDAMENTAL_TOOLS |
aoqi@0 | 89 | |
aoqi@0 | 90 | # Now we can determine OpenJDK build and target platforms. This is required to |
aoqi@0 | 91 | # have early on. |
aoqi@0 | 92 | PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET |
aoqi@0 | 93 | |
aoqi@0 | 94 | # Continue setting up basic stuff. Most remaining code require fundamental tools. |
aoqi@0 | 95 | BASIC_SETUP_PATHS |
aoqi@0 | 96 | BASIC_SETUP_LOGGING |
aoqi@0 | 97 | |
aoqi@0 | 98 | # Check if it's a pure open build or if custom sources are to be used. |
aoqi@0 | 99 | JDKOPT_SETUP_OPEN_OR_CUSTOM |
aoqi@0 | 100 | |
aoqi@0 | 101 | # These are needed to be able to create a configuration name (and thus the output directory) |
aoqi@0 | 102 | JDKOPT_SETUP_JDK_VARIANT |
aoqi@0 | 103 | JDKOPT_SETUP_JVM_INTERPRETER |
aoqi@0 | 104 | JDKOPT_SETUP_JVM_VARIANTS |
aoqi@0 | 105 | JDKOPT_SETUP_DEBUG_LEVEL |
aoqi@0 | 106 | |
aoqi@0 | 107 | # With basic setup done, call the custom early hook. |
aoqi@0 | 108 | CUSTOM_EARLY_HOOK |
aoqi@0 | 109 | |
kevinw@2215 | 110 | # Check if we have devkits, extra paths or sysroot set. |
kevinw@2215 | 111 | BASIC_SETUP_DEVKIT |
kevinw@2215 | 112 | |
aoqi@0 | 113 | # To properly create a configuration name, we need to have the OpenJDK target |
aoqi@0 | 114 | # and options (variants and debug level) parsed. |
aoqi@0 | 115 | BASIC_SETUP_OUTPUT_DIR |
aoqi@0 | 116 | |
aoqi@0 | 117 | # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY. |
aoqi@0 | 118 | HELP_SETUP_DEPENDENCY_HELP |
aoqi@0 | 119 | |
aoqi@0 | 120 | # Setup tools that requires more complex handling, or that is not needed by the configure script. |
aoqi@0 | 121 | BASIC_SETUP_COMPLEX_TOOLS |
aoqi@0 | 122 | |
aoqi@0 | 123 | # Check if pkg-config is available. |
aoqi@0 | 124 | PKG_PROG_PKG_CONFIG |
aoqi@0 | 125 | |
aoqi@0 | 126 | # After basic tools have been setup, we can check build os specific details. |
aoqi@0 | 127 | PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION |
aoqi@0 | 128 | |
aoqi@0 | 129 | # Setup builddeps, for automatic downloading of tools we need. |
aoqi@0 | 130 | # This is needed before we can call BDEPS_CHECK_MODULE, which is done in |
aoqi@0 | 131 | # boot-jdk setup, but we need to have basic tools setup first. |
aoqi@0 | 132 | BDEPS_CONFIGURE_BUILDDEPS |
aoqi@0 | 133 | BDEPS_SCAN_FOR_BUILDDEPS |
aoqi@0 | 134 | |
aoqi@0 | 135 | ############################################################################### |
aoqi@0 | 136 | # |
aoqi@0 | 137 | # Determine OpenJDK variants, options and version numbers. |
aoqi@0 | 138 | # |
aoqi@0 | 139 | ############################################################################### |
aoqi@0 | 140 | |
aoqi@0 | 141 | # We need build & target for this. |
aoqi@0 | 142 | JDKOPT_SETUP_JDK_OPTIONS |
aoqi@0 | 143 | JDKOPT_SETUP_JDK_VERSION_NUMBERS |
aoqi@0 | 144 | |
aoqi@0 | 145 | ############################################################################### |
aoqi@0 | 146 | # |
aoqi@0 | 147 | # Setup BootJDK, used to bootstrap the build. |
aoqi@0 | 148 | # |
aoqi@0 | 149 | ############################################################################### |
aoqi@0 | 150 | |
aoqi@0 | 151 | BOOTJDK_SETUP_BOOT_JDK |
aoqi@0 | 152 | BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS |
aoqi@0 | 153 | |
aoqi@0 | 154 | ############################################################################### |
aoqi@0 | 155 | # |
aoqi@0 | 156 | # Configure the sources to use. We can add or override individual directories. |
aoqi@0 | 157 | # |
aoqi@0 | 158 | ############################################################################### |
aoqi@0 | 159 | |
aoqi@0 | 160 | SRCDIRS_SETUP_TOPDIRS |
aoqi@0 | 161 | SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS |
aoqi@0 | 162 | SRCDIRS_SETUP_OUTPUT_DIRS |
aoqi@0 | 163 | |
aoqi@0 | 164 | ############################################################################### |
aoqi@0 | 165 | # |
kevinw@2206 | 166 | # Setup the toolchain (compilers etc), i.e. tools used to compile and process |
kevinw@2206 | 167 | # native code. |
aoqi@0 | 168 | # |
aoqi@0 | 169 | ############################################################################### |
aoqi@0 | 170 | |
kevinw@2206 | 171 | # First determine the toolchain type (compiler family) |
kevinw@2206 | 172 | TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE |
aoqi@0 | 173 | |
kevinw@2206 | 174 | # Then detect the actual binaries needed |
kevinw@2206 | 175 | TOOLCHAIN_PRE_DETECTION |
kevinw@2206 | 176 | TOOLCHAIN_DETECT_TOOLCHAIN_CORE |
kevinw@2206 | 177 | TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA |
kevinw@2206 | 178 | TOOLCHAIN_POST_DETECTION |
aoqi@0 | 179 | |
kevinw@2206 | 180 | # Finally do some processing after the detection phase |
kevinw@2206 | 181 | TOOLCHAIN_SETUP_BUILD_COMPILERS |
kevinw@2206 | 182 | TOOLCHAIN_SETUP_LEGACY |
kevinw@2206 | 183 | TOOLCHAIN_MISC_CHECKS |
kevinw@2206 | 184 | |
kevinw@2206 | 185 | # Setup the JTReg Regression Test Harness. |
kevinw@2206 | 186 | TOOLCHAIN_SETUP_JTREG |
kevinw@2206 | 187 | |
kevinw@2206 | 188 | FLAGS_SETUP_INIT_FLAGS |
kevinw@2206 | 189 | |
kevinw@2206 | 190 | # FIXME: Currently we must test this after toolchain but before flags. Fix! |
kevinw@2206 | 191 | |
kevinw@2206 | 192 | # Now we can test some aspects on the target using configure macros. |
aoqi@0 | 193 | PLATFORM_SETUP_OPENJDK_TARGET_BITS |
aoqi@0 | 194 | PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS |
aoqi@2161 | 195 | GET_BUILDER_AND_HOST_DATA |
aoqi@0 | 196 | |
aoqi@0 | 197 | # Configure flags for the tools |
kevinw@2206 | 198 | FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS |
kevinw@2206 | 199 | FLAGS_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION |
kevinw@2206 | 200 | FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK |
kevinw@2206 | 201 | FLAGS_SETUP_COMPILER_FLAGS_MISC |
aoqi@0 | 202 | |
aoqi@0 | 203 | # Setup debug symbols (need objcopy from the toolchain for that) |
aoqi@0 | 204 | JDKOPT_SETUP_DEBUG_SYMBOLS |
aoqi@0 | 205 | |
aoqi@0 | 206 | ############################################################################### |
aoqi@0 | 207 | # |
aoqi@0 | 208 | # Check dependencies for external and internal libraries. |
aoqi@0 | 209 | # |
aoqi@0 | 210 | ############################################################################### |
aoqi@0 | 211 | |
aoqi@0 | 212 | # After we have toolchain, we can compile fixpath. It's needed by the lib checks. |
aoqi@0 | 213 | BASIC_COMPILE_FIXPATH |
aoqi@0 | 214 | |
aoqi@0 | 215 | LIB_SETUP_INIT |
aoqi@0 | 216 | LIB_SETUP_X11 |
aoqi@0 | 217 | LIB_SETUP_CUPS |
aoqi@0 | 218 | LIB_SETUP_FREETYPE |
aoqi@0 | 219 | LIB_SETUP_ALSA |
aoqi@0 | 220 | LIB_SETUP_MISC_LIBS |
aoqi@0 | 221 | LIB_SETUP_STATIC_LINK_LIBSTDCPP |
kevinw@2206 | 222 | LIB_SETUP_ON_WINDOWS |
aoqi@0 | 223 | |
aoqi@0 | 224 | ############################################################################### |
aoqi@0 | 225 | # |
aoqi@0 | 226 | # We need to do some final tweaking, when everything else is done. |
aoqi@0 | 227 | # |
aoqi@0 | 228 | ############################################################################### |
aoqi@0 | 229 | |
aoqi@0 | 230 | JDKOPT_SETUP_BUILD_TWEAKS |
aoqi@0 | 231 | JDKOPT_DETECT_INTREE_EC |
aoqi@0 | 232 | |
aoqi@0 | 233 | ############################################################################### |
aoqi@0 | 234 | # |
aoqi@0 | 235 | # Configure parts of the build that only affect the build performance, |
aoqi@0 | 236 | # not the result. |
aoqi@0 | 237 | # |
aoqi@0 | 238 | ############################################################################### |
aoqi@0 | 239 | |
aoqi@0 | 240 | BPERF_SETUP_BUILD_CORES |
aoqi@0 | 241 | BPERF_SETUP_BUILD_MEMORY |
aoqi@0 | 242 | BPERF_SETUP_BUILD_JOBS |
aoqi@0 | 243 | |
aoqi@0 | 244 | # Setup smart javac (after cores and memory have been setup) |
aoqi@0 | 245 | BPERF_SETUP_SMART_JAVAC |
aoqi@0 | 246 | |
aoqi@0 | 247 | # Can the C/C++ compiler use precompiled headers? |
aoqi@0 | 248 | BPERF_SETUP_PRECOMPILED_HEADERS |
aoqi@0 | 249 | |
aoqi@0 | 250 | # Setup use of ccache, if available |
aoqi@0 | 251 | BPERF_SETUP_CCACHE |
aoqi@0 | 252 | |
aoqi@0 | 253 | ############################################################################### |
aoqi@0 | 254 | # |
aoqi@0 | 255 | # And now the finish... |
aoqi@0 | 256 | # |
aoqi@0 | 257 | ############################################################################### |
aoqi@0 | 258 | |
aoqi@0 | 259 | # Check for some common pitfalls |
aoqi@0 | 260 | BASIC_TEST_USABILITY_ISSUES |
aoqi@0 | 261 | |
aoqi@0 | 262 | # At the end, call the custom hook. (Dummy macro if no custom sources available) |
aoqi@0 | 263 | CUSTOM_LATE_HOOK |
aoqi@0 | 264 | |
aoqi@0 | 265 | # We're messing a bit with internal autoconf variables to put the config.status |
aoqi@0 | 266 | # in the output directory instead of the current directory. |
aoqi@0 | 267 | CONFIG_STATUS="$OUTPUT_ROOT/config.status" |
aoqi@0 | 268 | |
aoqi@0 | 269 | # Create the actual output files. Now the main work of configure is done. |
aoqi@0 | 270 | AC_OUTPUT |
ihse@1320 | 271 | CUSTOM_CONFIG_OUTPUT_GENERATED_HOOK |
aoqi@0 | 272 | |
aoqi@0 | 273 | # Try to move the config.log file to the output directory. |
aoqi@0 | 274 | if test -e ./config.log; then |
aoqi@0 | 275 | $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null |
aoqi@0 | 276 | fi |
aoqi@0 | 277 | |
aoqi@0 | 278 | # Make the compare script executable |
aoqi@0 | 279 | $CHMOD +x $OUTPUT_ROOT/compare.sh |
aoqi@0 | 280 | |
aoqi@0 | 281 | # Finally output some useful information to the user |
aoqi@0 | 282 | HELP_PRINT_SUMMARY_AND_WARNINGS |