mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-23 13:20:34 +00:00
Merge remote-tracking branch 'upstream/master' into optim_to_hex_202501
This commit is contained in:
commit
79cdb55bcf
14
.editorconfig
Normal file
14
.editorconfig
Normal file
@ -0,0 +1,14 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
|
||||
[*.{cpp,hpp,c,h,java,cc,hh,m,mm,S,md,properties,gmk,m4,ac}]
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[Makefile]
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[src/hotspot/**.{cpp,hpp,h}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1,4 +1,5 @@
|
||||
* -text
|
||||
* encoding=utf-8
|
||||
*.java diff=java
|
||||
*.c diff=cpp
|
||||
*.h diff=cpp
|
||||
|
||||
4
.github/actions/do-build/action.yml
vendored
4
.github/actions/do-build/action.yml
vendored
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -42,7 +42,7 @@ runs:
|
||||
- name: 'Build'
|
||||
id: build
|
||||
run: >
|
||||
make LOG=info ${{ inputs.make-target }}
|
||||
make -k LOG=info ${{ inputs.make-target }}
|
||||
|| bash ./.github/scripts/gen-build-failure-report.sh "$GITHUB_STEP_SUMMARY"
|
||||
shell: bash
|
||||
|
||||
|
||||
37
.github/actions/get-bundles/action.yml
vendored
37
.github/actions/get-bundles/action.yml
vendored
@ -32,10 +32,16 @@ inputs:
|
||||
debug-suffix:
|
||||
description: 'File name suffix denoting debug level, possibly empty'
|
||||
required: false
|
||||
static-suffix:
|
||||
description: 'Static bundle file name suffix'
|
||||
required: false
|
||||
outputs:
|
||||
jdk-path:
|
||||
description: 'Path to the installed JDK bundle'
|
||||
value: ${{ steps.path-name.outputs.jdk }}
|
||||
static-jdk-path:
|
||||
description: 'Path to the installed static JDK bundle'
|
||||
value: ${{ steps.path-name.outputs.static_jdk }}
|
||||
symbols-path:
|
||||
description: 'Path to the installed symbols bundle'
|
||||
value: ${{ steps.path-name.outputs.symbols }}
|
||||
@ -61,6 +67,15 @@ runs:
|
||||
path: bundles
|
||||
if: steps.download-bundles.outcome == 'failure'
|
||||
|
||||
- name: 'Download static bundles artifact'
|
||||
id: download-static-bundles
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}
|
||||
path: bundles
|
||||
continue-on-error: true
|
||||
if: ${{ inputs.static-suffix == '-static' }}
|
||||
|
||||
- name: 'Unpack bundles'
|
||||
run: |
|
||||
if [[ -e bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.zip ]]; then
|
||||
@ -75,6 +90,20 @@ runs:
|
||||
tar -xf bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz -C bundles/jdk
|
||||
fi
|
||||
|
||||
if [[ '${{ inputs.static-suffix }}' == '-static' ]]; then
|
||||
if [[ -e bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}.zip ]]; then
|
||||
echo 'Unpacking static jdk bundle...'
|
||||
mkdir -p bundles/static-jdk
|
||||
unzip -q bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}.zip -d bundles/static-jdk
|
||||
fi
|
||||
|
||||
if [[ -e bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}.tar.gz ]]; then
|
||||
echo 'Unpacking static jdk bundle...'
|
||||
mkdir -p bundles/static-jdk
|
||||
tar -xf bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}.tar.gz -C bundles/static-jdk
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -e bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz ]]; then
|
||||
echo 'Unpacking symbols bundle...'
|
||||
mkdir -p bundles/symbols
|
||||
@ -106,4 +135,12 @@ runs:
|
||||
echo "jdk=$jdk_dir" >> $GITHUB_OUTPUT
|
||||
echo "symbols=$symbols_dir" >> $GITHUB_OUTPUT
|
||||
echo "tests=$tests_dir" >> $GITHUB_OUTPUT
|
||||
|
||||
if [[ '${{ inputs.static-suffix }}' == '-static' ]]; then
|
||||
static_jdk_dir="$GITHUB_WORKSPACE/$(dirname $(find bundles/static-jdk -name bin -type d))"
|
||||
if [[ '${{ runner.os }}' == 'Windows' ]]; then
|
||||
static_jdk_dir="$(cygpath $static_jdk_dir)"
|
||||
fi
|
||||
echo "static_jdk=$static_jdk_dir" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
15
.github/actions/upload-bundles/action.yml
vendored
15
.github/actions/upload-bundles/action.yml
vendored
@ -35,6 +35,9 @@ inputs:
|
||||
bundle-suffix:
|
||||
description: 'Bundle name suffix, possibly empty'
|
||||
required: false
|
||||
static-suffix:
|
||||
description: 'Static JDK bundle name suffix, possibly empty'
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
@ -46,6 +49,8 @@ runs:
|
||||
# Rename bundles to consistent names
|
||||
jdk_bundle_zip="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.zip 2> /dev/null || true)"
|
||||
jdk_bundle_tar_gz="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
|
||||
static_jdk_bundle_zip="$(ls build/*/bundles/static-jdk-*_bin${{ inputs.debug-suffix }}.zip 2> /dev/null || true)"
|
||||
static_jdk_bundle_tar_gz="$(ls build/*/bundles/static-jdk-*_bin${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
|
||||
symbols_bundle="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}-symbols.tar.gz 2> /dev/null || true)"
|
||||
tests_bundle="$(ls build/*/bundles/jdk-*_bin-tests${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
|
||||
static_libs_bundle="$(ls build/*/bundles/jdk-*_bin-static-libs${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
|
||||
@ -58,6 +63,12 @@ runs:
|
||||
if [[ "$jdk_bundle_tar_gz" != "" ]]; then
|
||||
mv "$jdk_bundle_tar_gz" "bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
|
||||
fi
|
||||
if [[ "$static_jdk_bundle_zip" != "" ]]; then
|
||||
mv "$static_jdk_bundle_zip" "bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}.zip"
|
||||
fi
|
||||
if [[ "$static_jdk_bundle_tar_gz" != "" ]]; then
|
||||
mv "$static_jdk_bundle_tar_gz" "bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}.tar.gz"
|
||||
fi
|
||||
if [[ "$symbols_bundle" != "" ]]; then
|
||||
mv "$symbols_bundle" "bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
|
||||
fi
|
||||
@ -68,7 +79,7 @@ runs:
|
||||
mv "$static_libs_bundle" "bundles/static-libs-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
|
||||
fi
|
||||
|
||||
if [[ "$jdk_bundle_zip$jdk_bundle_tar_gz$symbols_bundle$tests_bundle$static_libs_bundle" != "" ]]; then
|
||||
if [[ "$jdk_bundle_zip$jdk_bundle_tar_gz$static_jdk_bundle_zip$static_jdk_bundle_tar_gz$symbols_bundle$tests_bundle$static_libs_bundle" != "" ]]; then
|
||||
echo 'bundles-found=true' >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo 'bundles-found=false' >> $GITHUB_OUTPUT
|
||||
@ -78,7 +89,7 @@ runs:
|
||||
- name: 'Upload bundles artifact'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.bundle-suffix }}
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}${{ inputs.bundle-suffix }}
|
||||
path: bundles
|
||||
retention-days: 1
|
||||
if: steps.bundles.outputs.bundles-found == 'true'
|
||||
|
||||
4
.github/workflows/build-linux.yml
vendored
4
.github/workflows/build-linux.yml
vendored
@ -64,6 +64,9 @@ on:
|
||||
bundle-suffix:
|
||||
required: false
|
||||
type: string
|
||||
static-suffix:
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
@ -143,3 +146,4 @@ jobs:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}"
|
||||
bundle-suffix: ${{ inputs.bundle-suffix }}
|
||||
static-suffix: ${{ inputs.static-suffix }}
|
||||
|
||||
21
.github/workflows/main.yml
vendored
21
.github/workflows/main.yml
vendored
@ -231,16 +231,14 @@ jobs:
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
make-target: 'static-jdk-image'
|
||||
make-target: 'static-jdk-bundles'
|
||||
# There are issues with fastdebug static build in GHA due to space limit.
|
||||
# Only do release build for now.
|
||||
debug-levels: '[ "release" ]'
|
||||
gcc-major-version: '10'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
# It currently doesn't produce any bundles, but probably will do in
|
||||
# the future.
|
||||
bundle-suffix: "-static"
|
||||
static-suffix: "-static"
|
||||
if: needs.prepare.outputs.linux-x64 == 'true'
|
||||
|
||||
build-linux-x64-static-libs:
|
||||
@ -361,6 +359,19 @@ jobs:
|
||||
platform: linux-x64
|
||||
bootjdk-platform: linux-x64
|
||||
runs-on: ubuntu-22.04
|
||||
debug-suffix: -debug
|
||||
|
||||
test-linux-x64-static:
|
||||
name: linux-x64-static
|
||||
needs:
|
||||
- build-linux-x64
|
||||
- build-linux-x64-static
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
bootjdk-platform: linux-x64
|
||||
runs-on: ubuntu-22.04
|
||||
static-suffix: "-static"
|
||||
|
||||
test-macos-aarch64:
|
||||
name: macos-aarch64
|
||||
@ -372,6 +383,7 @@ jobs:
|
||||
bootjdk-platform: macos-aarch64
|
||||
runs-on: macos-14
|
||||
xcode-toolset-version: '15.4'
|
||||
debug-suffix: -debug
|
||||
|
||||
test-windows-x64:
|
||||
name: windows-x64
|
||||
@ -382,3 +394,4 @@ jobs:
|
||||
platform: windows-x64
|
||||
bootjdk-platform: windows-x64
|
||||
runs-on: windows-2019
|
||||
debug-suffix: -debug
|
||||
|
||||
44
.github/workflows/test.yml
vendored
44
.github/workflows/test.yml
vendored
@ -40,6 +40,12 @@ on:
|
||||
xcode-toolset-version:
|
||||
required: false
|
||||
type: string
|
||||
debug-suffix:
|
||||
required: false
|
||||
type: string
|
||||
static-suffix:
|
||||
required: false
|
||||
type: string
|
||||
|
||||
env:
|
||||
# These are needed to make the MSYS2 bash work properly
|
||||
@ -86,35 +92,35 @@ jobs:
|
||||
|
||||
- test-name: 'hs/tier1 common'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_common'
|
||||
debug-suffix: -debug
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
|
||||
- test-name: 'hs/tier1 compiler part 1'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler_1'
|
||||
debug-suffix: -debug
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
|
||||
- test-name: 'hs/tier1 compiler part 2'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler_2'
|
||||
debug-suffix: -debug
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
|
||||
- test-name: 'hs/tier1 compiler part 3'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler_3'
|
||||
debug-suffix: -debug
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
|
||||
- test-name: 'hs/tier1 gc'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_gc'
|
||||
debug-suffix: -debug
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
|
||||
- test-name: 'hs/tier1 runtime'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_runtime'
|
||||
debug-suffix: -debug
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
|
||||
- test-name: 'hs/tier1 serviceability'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_serviceability'
|
||||
debug-suffix: -debug
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
|
||||
- test-name: 'lib-test/tier1'
|
||||
test-suite: 'test/lib-test/:tier1'
|
||||
debug-suffix: -debug
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
@ -140,6 +146,7 @@ jobs:
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: ${{ matrix.debug-suffix }}
|
||||
static-suffix: ${{ inputs.static-suffix }}
|
||||
|
||||
- name: 'Install dependencies'
|
||||
run: |
|
||||
@ -160,6 +167,21 @@ jobs:
|
||||
else
|
||||
echo "value=$PATH" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
if [[ '${{ inputs.static-suffix }}' == '-static' ]]; then
|
||||
echo "static-hotspot-problemlist-path=`pwd`/test/hotspot/jtreg/ProblemList-StaticJdk.txt" >> $GITHUB_OUTPUT
|
||||
echo "static-jdk-problemlist-path=`pwd`/test/jdk/ProblemList-StaticJdk.txt" >> $GITHUB_OUTPUT
|
||||
echo "static-langtools-problemlist-path=`pwd`/test/langtools/ProblemList-StaticJdk.txt" >> $GITHUB_OUTPUT
|
||||
echo "static-lib-test-problemlist-path=`pwd`/test/lib-test/ProblemList-StaticJdk.txt" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: 'Set Extra Options'
|
||||
id: extra-options
|
||||
run: |
|
||||
if [[ '${{ inputs.static-suffix }}' == '-static' ]]; then
|
||||
echo "test-jdk=JDK_UNDER_TEST=${{ steps.bundles.outputs.static-jdk-path }}" >> $GITHUB_OUTPUT
|
||||
echo "compile-jdk=JDK_FOR_COMPILE=${{ steps.bundles.outputs.jdk-path }}" >> $GITHUB_OUTPUT
|
||||
echo "extra-problem-lists=EXTRA_PROBLEM_LISTS=${{ steps.path.outputs.static-hotspot-problemlist-path }}%20${{ steps.path.outputs.static-jdk-problemlist-path }}%20${{ steps.path.outputs.static-langtools-problemlist-path }}%20${{ steps.path.outputs.static-lib-test-problemlist-path }}" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: 'Run tests'
|
||||
id: run-tests
|
||||
@ -171,7 +193,9 @@ jobs:
|
||||
JDK_IMAGE_DIR=${{ steps.bundles.outputs.jdk-path }}
|
||||
SYMBOLS_IMAGE_DIR=${{ steps.bundles.outputs.symbols-path }}
|
||||
TEST_IMAGE_DIR=${{ steps.bundles.outputs.tests-path }}
|
||||
JTREG='JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash;VERBOSE=fail,error,time;KEYWORDS=!headful'
|
||||
${{ steps.extra-options.outputs.test-jdk }}
|
||||
${{ steps.extra-options.outputs.compile-jdk }}
|
||||
JTREG='JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash;VERBOSE=fail,error,time;KEYWORDS=!headful;${{ steps.extra-options.outputs.extra-problem-lists }}'
|
||||
&& bash ./.github/scripts/gen-test-summary.sh "$GITHUB_STEP_SUMMARY" "$GITHUB_OUTPUT"
|
||||
env:
|
||||
PATH: ${{ steps.path.outputs.value }}
|
||||
@ -204,7 +228,7 @@ jobs:
|
||||
echo '::warning ::Missing test-support directory'
|
||||
fi
|
||||
|
||||
artifact_name="results-${{ inputs.platform }}-$(echo ${{ matrix.test-name }} | tr '/ ' '__')"
|
||||
artifact_name="results-${{ inputs.platform }}-$(echo ${{ matrix.test-name }}${{ inputs.static-suffix }} | tr '/ ' '__')"
|
||||
echo "artifact-name=$artifact_name" >> $GITHUB_OUTPUT
|
||||
if: always()
|
||||
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
# Contributing to the JDK
|
||||
|
||||
Please see the [OpenJDK Developers’ Guide](https://openjdk.org/guide/).
|
||||
Please see the [OpenJDK Developers' Guide](https://openjdk.org/guide/).
|
||||
|
||||
@ -282,9 +282,34 @@ possible, use an SSD. The build process is very disk intensive, and
|
||||
having slow disk access will significantly increase build times. If you
|
||||
need to use a network share for the source code, see below for
|
||||
suggestions on how to keep the build artifacts on a local disk.</p></li>
|
||||
<li><p>On Windows, if using <a href="#cygwin">Cygwin</a>, extra care
|
||||
must be taken to make sure the environment is consistent. It is
|
||||
recommended that you follow this procedure:</p>
|
||||
<li><p>UTF-8 support is needed to compile the JDK. On Unix systems, this
|
||||
typically means that the <code>C.UTF-8</code> or
|
||||
<code>en_US.UTF-8</code> locale needs to be available. For Windows
|
||||
users, please see the section on <a href="#locale-requirements">Locale
|
||||
Requirements</a> below.</p></li>
|
||||
<li><p>On Windows, extra care must be taken to have a smooth building
|
||||
experience:</p>
|
||||
<ul>
|
||||
<li><p>Make sure that all relevant paths have short names. Short names
|
||||
are used by the build system to create space-free alternative paths.
|
||||
Short name creation is enabled per volume. The default setting can be
|
||||
checked with the command: <code>fsutil 8dot3name query</code>. If short
|
||||
name creation was turned off when a directory was created, it will not
|
||||
have a short name. Whether a short name exists can be checked by running
|
||||
<code>dir /X</code> in the containing directory (in cmd.exe). If a short
|
||||
path is present you should see something like 'ASDF~1' being displayed
|
||||
in one of the columns of the ouput. If a directory is missing a short
|
||||
name, the safest way to get one is to enable short names for that
|
||||
particular volume with
|
||||
<code>fsutil 8dot3name set <drive letter>: 0</code> (note that
|
||||
you need to run as administrator for this), and then re-create the
|
||||
particular directory. A short name should be generated automatically
|
||||
then. Another option is to manually assign a short name to the directory
|
||||
using
|
||||
<code>fsutil file setShortName <path> <short name></code>.</p></li>
|
||||
<li><p>If using <a href="#cygwin">Cygwin</a>, you must make sure the
|
||||
file permissions and attributes between Windows and Cygwin are
|
||||
consistent. It is recommended that you follow this procedure:</p>
|
||||
<ul>
|
||||
<li><p>Create the directory that is going to contain the top directory
|
||||
of the JDK clone by using the <code>mkdir</code> command in the Cygwin
|
||||
@ -294,6 +319,9 @@ it's children will inherit those attributes.</p></li>
|
||||
<li><p>Do not put the JDK clone in a path under your Cygwin home
|
||||
directory. This is especially important if your user name contains
|
||||
spaces and/or mixed upper and lower case letters.</p></li>
|
||||
</ul>
|
||||
<p>Failure to follow these procedures might result in hard-to-debug
|
||||
build problems.</p></li>
|
||||
<li><p>You need to install a git client. You have two choices, Cygwin
|
||||
git or Git for Windows. Unfortunately there are pros and cons with each
|
||||
choice.</p>
|
||||
@ -311,9 +339,7 @@ It does work well with the Skara CLI tooling, however. To alleviate the
|
||||
line ending problems, make sure you set <code>core.autocrlf</code> to
|
||||
<code>false</code> (this is asked during installation).</p></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<p>Failure to follow this procedure might result in hard-to-debug build
|
||||
problems.</p></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<h2 id="build-hardware-requirements">Build Hardware Requirements</h2>
|
||||
<p>The JDK is a massive project, and require machines ranging from
|
||||
@ -376,7 +402,7 @@ to date at the time of writing.</p>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>macOS</td>
|
||||
<td>macOS 13.x (Ventura)</td>
|
||||
<td>macOS 14.x</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>Windows</td>
|
||||
@ -513,8 +539,8 @@ this makes it difficult for a project such as the JDK to keep pace with
|
||||
a continuously updated machine running macOS. See the section on <a
|
||||
href="#apple-xcode">Apple Xcode</a> on some strategies to deal with
|
||||
this.</p>
|
||||
<p>It is recommended that you use at least macOS 13 (Ventura) and Xcode
|
||||
14, but earlier versions may also work.</p>
|
||||
<p>It is recommended that you use at least macOS 14 and Xcode 15.4, but
|
||||
earlier versions may also work.</p>
|
||||
<p>The standard macOS environment contains the basic tooling needed to
|
||||
build, but for external libraries a package manager is recommended. The
|
||||
JDK uses <a href="https://brew.sh/">homebrew</a> in the examples, but
|
||||
@ -586,15 +612,15 @@ to compile successfully without issues.</p>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td>Linux</td>
|
||||
<td>gcc 13.2.0</td>
|
||||
<td>gcc 14.2.0</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>macOS</td>
|
||||
<td>Apple Xcode 14.3.1 (using clang 14.0.3)</td>
|
||||
<td>Apple Xcode 15.4 (using clang 15.0.0)</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>Windows</td>
|
||||
<td>Microsoft Visual Studio 2022 version 17.6.5</td>
|
||||
<td>Microsoft Visual Studio 2022 version 17.13.2</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -604,7 +630,7 @@ standard for C, and C++14 for C++.</p>
|
||||
<p>The minimum accepted version of gcc is 10.0. Older versions will not
|
||||
be accepted by <code>configure</code>.</p>
|
||||
<p>The JDK is currently known to compile successfully with gcc version
|
||||
13.2 or newer.</p>
|
||||
14.2 or newer.</p>
|
||||
<p>In general, any version between these two should be usable.</p>
|
||||
<h3 id="clang">clang</h3>
|
||||
<p>The minimum accepted version of clang is 13. Older versions will not
|
||||
@ -1722,6 +1748,20 @@ packages in the sysroot, configure the build with
|
||||
--with-devkit=$DEVKIT \
|
||||
--with-sysroot=$SYSROOT</code></pre>
|
||||
<p>and run <code>make</code> normally.</p>
|
||||
<h4 id="building-for-windows-aarch64">Building for Windows AArch64</h4>
|
||||
<p>The Visual Studio Build Tools can be used for building the JDK
|
||||
without a full Visual Studio installation. To set up the Visual Studio
|
||||
2022 Build Tools on a Windows AArch64 machine for a native build, launch
|
||||
the installer as follows in a Windows command prompt:</p>
|
||||
<pre><code>vs_buildtools.exe --quiet --wait --norestart --nocache ^
|
||||
--installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" ^
|
||||
--add Microsoft.VisualStudio.Component.VC.CoreBuildTools ^
|
||||
--add Microsoft.VisualStudio.Component.VC.Tools.ARM64 ^
|
||||
--add Microsoft.VisualStudio.Component.Windows11SDK.22621</code></pre>
|
||||
<p>To generate Windows AArch64 builds using Cygwin on a Windows x64
|
||||
machine, you must set the proper target platform by adding
|
||||
<code>--openjdk-target=aarch64-unknown-cygwin</code> to your configure
|
||||
command line.</p>
|
||||
<h2 id="build-performance">Build Performance</h2>
|
||||
<p>Building the JDK requires a lot of horsepower. Some of the build
|
||||
tools can be adjusted to utilize more or less of resources such as
|
||||
|
||||
@ -83,19 +83,44 @@ on where and how to check out the source code.
|
||||
for the source code, see below for suggestions on how to keep the build
|
||||
artifacts on a local disk.
|
||||
|
||||
* On Windows, if using [Cygwin](#cygwin), extra care must be taken to make sure
|
||||
the environment is consistent. It is recommended that you follow this
|
||||
procedure:
|
||||
* UTF-8 support is needed to compile the JDK. On Unix systems, this typically
|
||||
means that the `C.UTF-8` or `en_US.UTF-8` locale needs to be available. For
|
||||
Windows users, please see the section on [Locale
|
||||
Requirements](#locale-requirements) below.
|
||||
|
||||
* Create the directory that is going to contain the top directory of the JDK
|
||||
clone by using the `mkdir` command in the Cygwin bash shell. That is, do
|
||||
*not* create it using Windows Explorer. This will ensure that it will have
|
||||
proper Cygwin attributes, and that it's children will inherit those
|
||||
attributes.
|
||||
* On Windows, extra care must be taken to have a smooth building experience:
|
||||
|
||||
* Do not put the JDK clone in a path under your Cygwin home directory. This
|
||||
is especially important if your user name contains spaces and/or mixed
|
||||
upper and lower case letters.
|
||||
* Make sure that all relevant paths have short names. Short names are used by
|
||||
the build system to create space-free alternative paths. Short name
|
||||
creation is enabled per volume. The default setting can be checked with the
|
||||
command: `fsutil 8dot3name query`. If short name creation was turned off
|
||||
when a directory was created, it will not have a short name. Whether a
|
||||
short name exists can be checked by running `dir /X` in the containing
|
||||
directory (in cmd.exe). If a short path is present you should see something
|
||||
like 'ASDF~1' being displayed in one of the columns of the ouput. If a
|
||||
directory is missing a short name, the safest way to get one is to enable
|
||||
short names for that particular volume with `fsutil 8dot3name set <drive
|
||||
letter>: 0` (note that you need to run as administrator for this), and then
|
||||
re-create the particular directory. A short name should be generated
|
||||
automatically then. Another option is to manually assign a short name to
|
||||
the directory using `fsutil file setShortName <path> <short name>`.
|
||||
|
||||
* If using [Cygwin](#cygwin), you must make sure the file permissions and
|
||||
attributes between Windows and Cygwin are consistent. It is recommended
|
||||
that you follow this procedure:
|
||||
|
||||
* Create the directory that is going to contain the top directory of the
|
||||
JDK clone by using the `mkdir` command in the Cygwin bash shell. That is,
|
||||
do *not* create it using Windows Explorer. This will ensure that it will
|
||||
have proper Cygwin attributes, and that it's children will inherit those
|
||||
attributes.
|
||||
|
||||
* Do not put the JDK clone in a path under your Cygwin home directory. This
|
||||
is especially important if your user name contains spaces and/or mixed
|
||||
upper and lower case letters.
|
||||
|
||||
Failure to follow these procedures might result in hard-to-debug build
|
||||
problems.
|
||||
|
||||
* You need to install a git client. You have two choices, Cygwin git or Git
|
||||
for Windows. Unfortunately there are pros and cons with each choice.
|
||||
@ -113,9 +138,6 @@ on where and how to check out the source code.
|
||||
make sure you set `core.autocrlf` to `false` (this is asked during
|
||||
installation).
|
||||
|
||||
Failure to follow this procedure might result in hard-to-debug build
|
||||
problems.
|
||||
|
||||
## Build Hardware Requirements
|
||||
|
||||
The JDK is a massive project, and require machines ranging from decent to
|
||||
@ -175,7 +197,7 @@ time of writing.
|
||||
| ----------------- | ---------------------------------- |
|
||||
| Linux/x64 | Oracle Enterprise Linux 6.4 / 8.x |
|
||||
| Linux/aarch64 | Oracle Enterprise Linux 7.6 / 8.x |
|
||||
| macOS | macOS 13.x (Ventura) |
|
||||
| macOS | macOS 14.x |
|
||||
| Windows | Windows Server 2016 |
|
||||
|
||||
The double version numbers for Linux are due to the hybrid model used at
|
||||
@ -327,7 +349,7 @@ difficult for a project such as the JDK to keep pace with a continuously
|
||||
updated machine running macOS. See the section on [Apple Xcode](#apple-xcode)
|
||||
on some strategies to deal with this.
|
||||
|
||||
It is recommended that you use at least macOS 13 (Ventura) and Xcode 14, but
|
||||
It is recommended that you use at least macOS 14 and Xcode 15.4, but
|
||||
earlier versions may also work.
|
||||
|
||||
The standard macOS environment contains the basic tooling needed to build, but
|
||||
@ -390,11 +412,11 @@ possible to compile the JDK with both older and newer versions, but the closer
|
||||
you stay to this list, the more likely you are to compile successfully without
|
||||
issues.
|
||||
|
||||
| Operating system | Toolchain version |
|
||||
| ------------------ | ------------------------------------------- |
|
||||
| Linux | gcc 13.2.0 |
|
||||
| macOS | Apple Xcode 14.3.1 (using clang 14.0.3) |
|
||||
| Windows | Microsoft Visual Studio 2022 version 17.6.5 |
|
||||
| Operating system | Toolchain version |
|
||||
| ------------------ | -------------------------------------------- |
|
||||
| Linux | gcc 14.2.0 |
|
||||
| macOS | Apple Xcode 15.4 (using clang 15.0.0) |
|
||||
| Windows | Microsoft Visual Studio 2022 version 17.13.2 |
|
||||
|
||||
All compilers are expected to be able to handle the C11 language standard for
|
||||
C, and C++14 for C++.
|
||||
@ -404,7 +426,7 @@ C, and C++14 for C++.
|
||||
The minimum accepted version of gcc is 10.0. Older versions will not be accepted
|
||||
by `configure`.
|
||||
|
||||
The JDK is currently known to compile successfully with gcc version 13.2 or
|
||||
The JDK is currently known to compile successfully with gcc version 14.2 or
|
||||
newer.
|
||||
|
||||
In general, any version between these two should be usable.
|
||||
@ -1457,6 +1479,24 @@ sh ./configure --with-jvm-variants=server \
|
||||
|
||||
and run `make` normally.
|
||||
|
||||
#### Building for Windows AArch64
|
||||
The Visual Studio Build Tools can be used for building the JDK without a full
|
||||
Visual Studio installation. To set up the Visual Studio 2022 Build Tools on a
|
||||
Windows AArch64 machine for a native build, launch the installer as follows
|
||||
in a Windows command prompt:
|
||||
|
||||
```
|
||||
vs_buildtools.exe --quiet --wait --norestart --nocache ^
|
||||
--installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" ^
|
||||
--add Microsoft.VisualStudio.Component.VC.CoreBuildTools ^
|
||||
--add Microsoft.VisualStudio.Component.VC.Tools.ARM64 ^
|
||||
--add Microsoft.VisualStudio.Component.Windows11SDK.22621
|
||||
```
|
||||
|
||||
To generate Windows AArch64 builds using Cygwin on a Windows x64 machine,
|
||||
you must set the proper target platform by adding
|
||||
`--openjdk-target=aarch64-unknown-cygwin` to your configure command line.
|
||||
|
||||
## Build Performance
|
||||
|
||||
Building the JDK requires a lot of horsepower. Some of the build tools can be
|
||||
|
||||
@ -32,11 +32,12 @@
|
||||
<ul>
|
||||
<li><a href="#introduction" id="toc-introduction">Introduction</a>
|
||||
<ul>
|
||||
<li><a href="#changing-this-document"
|
||||
id="toc-changing-this-document">Changing this Document</a></li>
|
||||
<li><a href="#why-care-about-style" id="toc-why-care-about-style">Why
|
||||
Care About Style?</a></li>
|
||||
<li><a href="#counterexamples-and-updates"
|
||||
id="toc-counterexamples-and-updates">Counterexamples and
|
||||
Updates</a></li>
|
||||
<li><a href="#counterexamples"
|
||||
id="toc-counterexamples">Counterexamples</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#structure-and-formatting"
|
||||
id="toc-structure-and-formatting">Structure and Formatting</a>
|
||||
@ -99,6 +100,21 @@ writing HotSpot code. Following these will help new code fit in with
|
||||
existing HotSpot code, making it easier to read and maintain. Failure to
|
||||
follow these guidelines may lead to discussion during code reviews, if
|
||||
not outright rejection of a change.</p>
|
||||
<h3 id="changing-this-document">Changing this Document</h3>
|
||||
<p>Proposed changes should be discussed on the <a
|
||||
href="mailto:hotspot-dev@openjdk.org">HotSpot Developers</a> mailing
|
||||
list. Changes are likely to be cautious and incremental, since HotSpot
|
||||
coders have been using these guidelines for years.</p>
|
||||
<p>Substantive changes are approved by <a
|
||||
href="https://www.rfc-editor.org/rfc/rfc7282.html">rough consensus</a>
|
||||
of the <a href="https://openjdk.org/census#hotspot">HotSpot Group</a>
|
||||
Members. The Group Lead determines whether consensus has been
|
||||
reached.</p>
|
||||
<p>Editorial changes (changes that only affect the description of
|
||||
HotSpot style, not its substance) do not require the full consensus
|
||||
gathering process. The normal HotSpot pull request process may be used
|
||||
for editorial changes, with the additional requirement that the
|
||||
requisite reviewers are also HotSpot Group Members.</p>
|
||||
<h3 id="why-care-about-style">Why Care About Style?</h3>
|
||||
<p>Some programmers seem to have lexers and even C preprocessors
|
||||
installed directly behind their eyeballs. The rest of us require code
|
||||
@ -124,7 +140,7 @@ conforms locally to its own peculiar conventions, it is not worth
|
||||
reformatting the whole thing. Also consider separating changes that make
|
||||
extensive stylistic updates from those which make functional
|
||||
changes.</p>
|
||||
<h3 id="counterexamples-and-updates">Counterexamples and Updates</h3>
|
||||
<h3 id="counterexamples">Counterexamples</h3>
|
||||
<p>Many of the guidelines mentioned here have (sometimes widespread)
|
||||
counterexamples in the HotSpot code base. Finding a counterexample is
|
||||
not sufficient justification for new code to follow the counterexample
|
||||
@ -137,20 +153,6 @@ bring it up for discussion and possible change. The architectural rule,
|
||||
of course, is "When in Rome do as the Romans". Sometimes in the suburbs
|
||||
of Rome the rules are a little different; these differences can be
|
||||
pointed out here.</p>
|
||||
<p>Proposed changes should be discussed on the <a
|
||||
href="mailto:hotspot-dev@openjdk.org">HotSpot Developers</a> mailing
|
||||
list. Changes are likely to be cautious and incremental, since HotSpot
|
||||
coders have been using these guidelines for years.</p>
|
||||
<p>Substantive changes are approved by <a
|
||||
href="https://www.rfc-editor.org/rfc/rfc7282.html">rough consensus</a>
|
||||
of the <a href="https://openjdk.org/census#hotspot">HotSpot Group</a>
|
||||
Members. The Group Lead determines whether consensus has been
|
||||
reached.</p>
|
||||
<p>Editorial changes (changes that only affect the description of
|
||||
HotSpot style, not its substance) do not require the full consensus
|
||||
gathering process. The normal HotSpot pull request process may be used
|
||||
for editorial changes, with the additional requirement that the
|
||||
requisite reviewers are also HotSpot Group Members.</p>
|
||||
<h2 id="structure-and-formatting">Structure and Formatting</h2>
|
||||
<h3 id="factoring-and-class-design">Factoring and Class Design</h3>
|
||||
<ul>
|
||||
|
||||
@ -8,6 +8,24 @@ HotSpot code, making it easier to read and maintain. Failure to
|
||||
follow these guidelines may lead to discussion during code reviews, if
|
||||
not outright rejection of a change.
|
||||
|
||||
### Changing this Document
|
||||
|
||||
Proposed changes should be discussed on the
|
||||
[HotSpot Developers](mailto:hotspot-dev@openjdk.org) mailing
|
||||
list. Changes are likely to be cautious and incremental, since HotSpot
|
||||
coders have been using these guidelines for years.
|
||||
|
||||
Substantive changes are approved by
|
||||
[rough consensus](https://www.rfc-editor.org/rfc/rfc7282.html) of
|
||||
the [HotSpot Group](https://openjdk.org/census#hotspot) Members.
|
||||
The Group Lead determines whether consensus has been reached.
|
||||
|
||||
Editorial changes (changes that only affect the description of HotSpot
|
||||
style, not its substance) do not require the full consensus gathering
|
||||
process. The normal HotSpot pull request process may be used for
|
||||
editorial changes, with the additional requirement that the requisite
|
||||
reviewers are also HotSpot Group Members.
|
||||
|
||||
### Why Care About Style?
|
||||
|
||||
Some programmers seem to have lexers and even C preprocessors
|
||||
@ -38,7 +56,7 @@ reformatting the whole thing. Also consider separating changes that
|
||||
make extensive stylistic updates from those which make functional
|
||||
changes.
|
||||
|
||||
### Counterexamples and Updates
|
||||
### Counterexamples
|
||||
|
||||
Many of the guidelines mentioned here have (sometimes widespread)
|
||||
counterexamples in the HotSpot code base. Finding a counterexample is
|
||||
@ -54,22 +72,6 @@ rule, of course, is "When in Rome do as the Romans". Sometimes in the
|
||||
suburbs of Rome the rules are a little different; these differences
|
||||
can be pointed out here.
|
||||
|
||||
Proposed changes should be discussed on the
|
||||
[HotSpot Developers](mailto:hotspot-dev@openjdk.org) mailing
|
||||
list. Changes are likely to be cautious and incremental, since HotSpot
|
||||
coders have been using these guidelines for years.
|
||||
|
||||
Substantive changes are approved by
|
||||
[rough consensus](https://www.rfc-editor.org/rfc/rfc7282.html) of
|
||||
the [HotSpot Group](https://openjdk.org/census#hotspot) Members.
|
||||
The Group Lead determines whether consensus has been reached.
|
||||
|
||||
Editorial changes (changes that only affect the description of HotSpot
|
||||
style, not its substance) do not require the full consensus gathering
|
||||
process. The normal HotSpot pull request process may be used for
|
||||
editorial changes, with the additional requirement that the requisite
|
||||
reviewers are also HotSpot Group Members.
|
||||
|
||||
## Structure and Formatting
|
||||
|
||||
### Factoring and Class Design
|
||||
|
||||
@ -189,7 +189,7 @@ wants to find) and design tests using those models.</p>
|
||||
<p>Prefer having checks inside test code.</p>
|
||||
<p>Not only does having test logic outside, e.g. verification method,
|
||||
depending on asserts in product code contradict with several items above
|
||||
but also decreases test’s readability and stability. It is much easier
|
||||
but also decreases test's readability and stability. It is much easier
|
||||
to understand that a test is testing when all testing logic is located
|
||||
inside a test or nearby in shared test libraries. As a rule of thumb,
|
||||
the closer a check to a test, the better.</p>
|
||||
@ -198,7 +198,7 @@ the closer a check to a test, the better.</p>
|
||||
<p>Prefer <code>EXPECT</code> over <code>ASSERT</code> if possible.</p>
|
||||
<p>This is related to the <a href="#informativeness">informativeness</a>
|
||||
property of tests, information for other checks can help to better
|
||||
localize a defect’s root-cause. One should use <code>ASSERT</code> if it
|
||||
localize a defect's root-cause. One should use <code>ASSERT</code> if it
|
||||
is impossible to continue test execution or if it does not make much
|
||||
sense. Later in the text, <code>EXPECT</code> forms will be used to
|
||||
refer to both <code>ASSERT/EXPECT</code>.</p>
|
||||
@ -235,7 +235,7 @@ which checks that the absolute value of the difference between
|
||||
<code>eps</code>.</p>
|
||||
<h3 id="c-string-comparison">C string comparison</h3>
|
||||
<p>Use string special macros for C strings comparisons.</p>
|
||||
<p><code>EXPECT_EQ</code> just compares pointers’ values, which is
|
||||
<p><code>EXPECT_EQ</code> just compares pointers' values, which is
|
||||
hardly what one wants comparing C strings. GoogleTest provides
|
||||
<code>EXPECT_STREQ</code> and <code>EXPECT_STRNE</code> macros to
|
||||
compare C string contents. There are also case-insensitive versions
|
||||
@ -293,7 +293,7 @@ subsystem, etc.</p>
|
||||
<p>This naming scheme helps to find tests, filter them and simplifies
|
||||
test failure analysis. For example, class <code>Foo</code> - test group
|
||||
<code>Foo</code>, compiler logging subsystem - test group
|
||||
<code>CompilerLogging</code>, G1 GC — test group <code>G1GC</code>, and
|
||||
<code>CompilerLogging</code>, G1 GC - test group <code>G1GC</code>, and
|
||||
so forth.</p>
|
||||
<h3 id="filename">Filename</h3>
|
||||
<p>A test file must have <code>test_</code> prefix and <code>.cpp</code>
|
||||
@ -345,7 +345,7 @@ name starts or ends with an underscore are enough to be safe.</p>
|
||||
<h3 id="friend-classes">Friend classes</h3>
|
||||
<p>All test purpose friends should have either <code>Test</code> or
|
||||
<code>Testable</code> suffix.</p>
|
||||
<p>It greatly simplifies understanding of friendship’s purpose and
|
||||
<p>It greatly simplifies understanding of friendship's purpose and
|
||||
allows statically check that private members are not exposed
|
||||
unexpectedly. Having <code>FooTest</code> as a friend of
|
||||
<code>Foo</code> without any comments will be understood as a necessary
|
||||
@ -435,7 +435,7 @@ inapplicable tests.</p>
|
||||
<h3 id="flag-restoring">Flag restoring</h3>
|
||||
<p>Restore changed flags.</p>
|
||||
<p>It is quite common for tests to configure JVM in a certain way
|
||||
changing flags’ values. GoogleTest provides two ways to set up
|
||||
changing flags' values. GoogleTest provides two ways to set up
|
||||
environment before a test and restore it afterward: using either
|
||||
constructor and destructor or <code>SetUp</code> and
|
||||
<code>TearDown</code> functions. Both ways require to use a test fixture
|
||||
@ -444,7 +444,7 @@ class, which sometimes is too wordy. The simpler facilities like
|
||||
be used in such cases to restore/set values.</p>
|
||||
<p>Caveats:</p>
|
||||
<ul>
|
||||
<li><p>Changing a flag’s value could break the invariants between flags'
|
||||
<li><p>Changing a flag's value could break the invariants between flags'
|
||||
values and hence could lead to unexpected/unsupported JVM
|
||||
state.</p></li>
|
||||
<li><p><code>FLAG_SET_*</code> macros can change more than one flag (in
|
||||
|
||||
@ -106,7 +106,7 @@ Prefer having checks inside test code.
|
||||
|
||||
Not only does having test logic outside, e.g. verification method,
|
||||
depending on asserts in product code contradict with several items
|
||||
above but also decreases test’s readability and stability. It is much
|
||||
above but also decreases test's readability and stability. It is much
|
||||
easier to understand that a test is testing when all testing logic is
|
||||
located inside a test or nearby in shared test libraries. As a rule of
|
||||
thumb, the closer a check to a test, the better.
|
||||
@ -119,7 +119,7 @@ Prefer `EXPECT` over `ASSERT` if possible.
|
||||
|
||||
This is related to the [informativeness](#informativeness) property of
|
||||
tests, information for other checks can help to better localize a
|
||||
defect’s root-cause. One should use `ASSERT` if it is impossible to
|
||||
defect's root-cause. One should use `ASSERT` if it is impossible to
|
||||
continue test execution or if it does not make much sense. Later in
|
||||
the text, `EXPECT` forms will be used to refer to both
|
||||
`ASSERT/EXPECT`.
|
||||
@ -160,7 +160,7 @@ value of the difference between `v1` and `v2` is not greater than `eps`.
|
||||
|
||||
Use string special macros for C strings comparisons.
|
||||
|
||||
`EXPECT_EQ` just compares pointers’ values, which is hardly what one
|
||||
`EXPECT_EQ` just compares pointers' values, which is hardly what one
|
||||
wants comparing C strings. GoogleTest provides `EXPECT_STREQ` and
|
||||
`EXPECT_STRNE` macros to compare C string contents. There are also
|
||||
case-insensitive versions `EXPECT_STRCASEEQ`, `EXPECT_STRCASENE`.
|
||||
@ -226,7 +226,7 @@ subsystem, etc.
|
||||
|
||||
This naming scheme helps to find tests, filter them and simplifies
|
||||
test failure analysis. For example, class `Foo` - test group `Foo`,
|
||||
compiler logging subsystem - test group `CompilerLogging`, G1 GC — test
|
||||
compiler logging subsystem - test group `CompilerLogging`, G1 GC - test
|
||||
group `G1GC`, and so forth.
|
||||
|
||||
### Filename
|
||||
@ -287,7 +287,7 @@ Fixture classes should be named after tested classes, subsystems, etc
|
||||
|
||||
All test purpose friends should have either `Test` or `Testable` suffix.
|
||||
|
||||
It greatly simplifies understanding of friendship’s purpose and allows
|
||||
It greatly simplifies understanding of friendship's purpose and allows
|
||||
statically check that private members are not exposed unexpectedly.
|
||||
Having `FooTest` as a friend of `Foo` without any comments will be
|
||||
understood as a necessary evil to get testability.
|
||||
@ -397,7 +397,7 @@ and filter out inapplicable tests.
|
||||
Restore changed flags.
|
||||
|
||||
It is quite common for tests to configure JVM in a certain way
|
||||
changing flags’ values. GoogleTest provides two ways to set up
|
||||
changing flags' values. GoogleTest provides two ways to set up
|
||||
environment before a test and restore it afterward: using either
|
||||
constructor and destructor or `SetUp` and `TearDown` functions. Both ways
|
||||
require to use a test fixture class, which sometimes is too wordy. The
|
||||
@ -406,7 +406,7 @@ be used in such cases to restore/set values.
|
||||
|
||||
Caveats:
|
||||
|
||||
* Changing a flag’s value could break the invariants between flags' values and hence could lead to unexpected/unsupported JVM state.
|
||||
* Changing a flag's value could break the invariants between flags' values and hence could lead to unexpected/unsupported JVM state.
|
||||
|
||||
* `FLAG_SET_*` macros can change more than one flag (in order to
|
||||
maintain invariants) so it is hard to predict what flags will be
|
||||
|
||||
@ -411,6 +411,13 @@ instrumentation
|
||||
special target <code>jcov-test</code> instead of <code>test</code>, e.g.
|
||||
<code>make jcov-test TEST=jdk_lang</code>. This will make sure the JCov
|
||||
image is built, and that JCov reporting is enabled.</p>
|
||||
<p>To include JCov coverage for just a subset of all modules, you can
|
||||
use the <code>--with-jcov-modules</code> arguments to
|
||||
<code>configure</code>, e.g.
|
||||
<code>--with-jcov-modules=jdk.compiler,java.desktop</code>.</p>
|
||||
<p>For more fine-grained control, you can pass arbitrary filters to JCov
|
||||
using <code>--with-jcov-filters</code>, and you can specify a specific
|
||||
JDK to instrument using <code>--with-jcov-input-jdk</code>.</p>
|
||||
<p>The JCov report is stored in
|
||||
<code>build/$BUILD/test-results/jcov-output/report</code>.</p>
|
||||
<p>Please note that running with JCov reporting can be very memory
|
||||
|
||||
@ -345,6 +345,14 @@ The simplest way to run tests with JCov coverage report is to use the special
|
||||
target `jcov-test` instead of `test`, e.g. `make jcov-test TEST=jdk_lang`. This
|
||||
will make sure the JCov image is built, and that JCov reporting is enabled.
|
||||
|
||||
To include JCov coverage for just a subset of all modules, you can use the
|
||||
`--with-jcov-modules` arguments to `configure`, e.g.
|
||||
`--with-jcov-modules=jdk.compiler,java.desktop`.
|
||||
|
||||
For more fine-grained control, you can pass arbitrary filters to JCov using
|
||||
`--with-jcov-filters`, and you can specify a specific JDK to instrument
|
||||
using `--with-jcov-input-jdk`.
|
||||
|
||||
The JCov report is stored in `build/$BUILD/test-results/jcov-output/report`.
|
||||
|
||||
Please note that running with JCov reporting can be very memory intensive.
|
||||
|
||||
@ -174,9 +174,11 @@ else
|
||||
JRE_IMAGE_HOMEDIR := $(JRE_IMAGE_DIR)
|
||||
JDK_BUNDLE_SUBDIR := jdk-$(VERSION_NUMBER)
|
||||
JRE_BUNDLE_SUBDIR := jre-$(VERSION_NUMBER)
|
||||
STATIC_JDK_BUNDLE_SUBDIR := static-jdk-$(VERSION_NUMBER)
|
||||
ifneq ($(DEBUG_LEVEL), release)
|
||||
JDK_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
|
||||
JRE_BUNDLE_SUBDIR := $(JRE_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
|
||||
STATIC_JDK_BUNDLE_SUBDIR := $(STATIC_JDK_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
|
||||
endif
|
||||
# In certain situations, the JDK_IMAGE_DIR points to an image without the
|
||||
# the symbols and demos. If so, the symobls and demos can be found in a
|
||||
@ -242,7 +244,10 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
||||
)
|
||||
|
||||
JDK_SYMBOLS_BUNDLE_FILES := \
|
||||
$(call FindFiles, $(SYMBOLS_IMAGE_DIR))
|
||||
$(filter-out \
|
||||
%.stripped.pdb, \
|
||||
$(call FindFiles, $(SYMBOLS_IMAGE_DIR)) \
|
||||
)
|
||||
|
||||
TEST_DEMOS_BUNDLE_FILES := $(filter $(JDK_DEMOS_IMAGE_HOMEDIR)/demo/%, \
|
||||
$(ALL_JDK_DEMOS_FILES))
|
||||
@ -497,6 +502,21 @@ ifneq ($(filter static-libs-graal-bundles, $(MAKECMDGOALS)), )
|
||||
STATIC_LIBS_GRAAL_TARGETS += $(BUILD_STATIC_LIBS_GRAAL_BUNDLE)
|
||||
endif
|
||||
|
||||
#################################################################################
|
||||
|
||||
ifneq ($(filter static-jdk-bundles, $(MAKECMDGOALS)), )
|
||||
STATIC_JDK_BUNDLE_FILES := $(call FindFiles, $(STATIC_JDK_IMAGE_DIR))
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_STATIC_JDK_BUNDLE, \
|
||||
BUNDLE_NAME := $(STATIC_JDK_BUNDLE_NAME), \
|
||||
FILES := $(STATIC_JDK_BUNDLE_FILES), \
|
||||
BASE_DIRS := $(STATIC_JDK_IMAGE_DIR), \
|
||||
SUBDIR := $(STATIC_JDK_BUNDLE_SUBDIR), \
|
||||
))
|
||||
|
||||
STATIC_JDK_TARGETS += $(BUILD_STATIC_JDK_BUNDLE)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
product-bundles: $(PRODUCT_TARGETS)
|
||||
@ -507,11 +527,12 @@ docs-javase-bundles: $(DOCS_JAVASE_TARGETS)
|
||||
docs-reference-bundles: $(DOCS_REFERENCE_TARGETS)
|
||||
static-libs-bundles: $(STATIC_LIBS_TARGETS)
|
||||
static-libs-graal-bundles: $(STATIC_LIBS_GRAAL_TARGETS)
|
||||
static-jdk-bundles: $(STATIC_JDK_TARGETS)
|
||||
jcov-bundles: $(JCOV_TARGETS)
|
||||
|
||||
.PHONY: product-bundles test-bundles \
|
||||
docs-jdk-bundles docs-javase-bundles docs-reference-bundles \
|
||||
static-libs-bundles static-libs-graal-bundles jcov-bundles
|
||||
static-libs-bundles static-libs-graal-bundles static-jdk-bundles jcov-bundles
|
||||
|
||||
################################################################################
|
||||
|
||||
|
||||
@ -95,14 +95,16 @@ define SetupInterimModule
|
||||
SRC := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim \
|
||||
$$(wildcard $(SUPPORT_OUTPUTDIR)/gensrc/$1) \
|
||||
$(TOPDIR)/src/$1/share/classes, \
|
||||
EXCLUDES := sun javax/tools/snippet-files, \
|
||||
EXCLUDES := sun, \
|
||||
EXCLUDE_FILES := $(TOPDIR)/src/$1/share/classes/module-info.java \
|
||||
$(TOPDIR)/src/$1/share/classes/javax/tools/ToolProvider.java \
|
||||
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/Main.java \
|
||||
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/MemoryClassLoader.java \
|
||||
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/MemoryContext.java \
|
||||
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/MemoryModuleFinder.java \
|
||||
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/SourceLauncher.java \
|
||||
Standard.java, \
|
||||
EXCLUDE_PATTERNS := -files, \
|
||||
EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java \
|
||||
$($1.interim_EXTRA_FILES), \
|
||||
COPY := .gif .png .xml .css .svg .js .js.template .txt .woff .woff2 javax.tools.JavaCompilerTool, \
|
||||
|
||||
@ -113,6 +113,7 @@ $(eval $(call SetupJavaCompilation, $(MODULE), \
|
||||
DISABLED_WARNINGS := $(DISABLED_WARNINGS_java), \
|
||||
EXCLUDES := $(EXCLUDES), \
|
||||
EXCLUDE_FILES := $(EXCLUDE_FILES), \
|
||||
EXCLUDE_PATTERNS := -files, \
|
||||
KEEP_ALL_TRANSLATIONS := $(KEEP_ALL_TRANSLATIONS), \
|
||||
JAVAC_FLAGS := \
|
||||
$(DOCLINT) \
|
||||
|
||||
@ -34,21 +34,28 @@ else
|
||||
JCOV_INPUT_IMAGE_DIR := $(JDK_IMAGE_DIR)
|
||||
endif
|
||||
|
||||
JCOV_SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/jcov
|
||||
|
||||
#moving instrumented jdk image in and out of jcov_temp because of CODETOOLS-7902299
|
||||
JCOV_TEMP := $(SUPPORT_OUTPUTDIR)/jcov_temp
|
||||
JCOV_TEMP := $(JCOV_SUPPORT_DIR)/temp
|
||||
|
||||
ifneq ($(JCOV_MODULES), )
|
||||
JCOV_MODULES_FILTER := $(foreach m, $(JCOV_MODULES), -include_module $m)
|
||||
endif
|
||||
|
||||
$(JCOV_IMAGE_DIR)/release: $(JCOV_INPUT_IMAGE_DIR)/release
|
||||
$(call LogWarn, Creating instrumented jdk image with JCov)
|
||||
$(call MakeDir, $(JCOV_TEMP) $(IMAGES_OUTPUTDIR))
|
||||
$(RM) -r $(JCOV_IMAGE_DIR) $(JCOV_TEMP)/*
|
||||
$(CP) -r $(JCOV_INPUT_IMAGE_DIR) $(JCOV_TEMP)/$(JCOV_IMAGE_SUBDIR)
|
||||
$(JAVA) -Xmx3g -jar $(JCOV_HOME)/lib/jcov.jar JREInstr \
|
||||
$(call ExecuteWithLog, $(JCOV_SUPPORT_DIR)/run-jcov, \
|
||||
$(JAVA) -Xmx3g -jar $(JCOV_HOME)/lib/jcov.jar JREInstr \
|
||||
-t $(JCOV_TEMP)/$(JCOV_IMAGE_SUBDIR)/template.xml \
|
||||
-rt $(JCOV_HOME)/lib/jcov_network_saver.jar \
|
||||
-exclude 'java.lang.Object' \
|
||||
-exclude jdk.test.Main -exclude '**\$Proxy*' \
|
||||
$(JCOV_FILTERS) \
|
||||
$(JCOV_TEMP)/$(JCOV_IMAGE_SUBDIR)
|
||||
$(JCOV_MODULES_FILTER) $(JCOV_FILTERS) \
|
||||
$(JCOV_TEMP)/$(JCOV_IMAGE_SUBDIR))
|
||||
$(MV) $(JCOV_TEMP)/$(JCOV_IMAGE_SUBDIR) $(JCOV_IMAGE_DIR)
|
||||
$(RMDIR) $(JCOV_TEMP)
|
||||
|
||||
|
||||
@ -79,6 +79,8 @@ JAVADOC_TAGS := \
|
||||
-tag see \
|
||||
-taglet build.tools.taglet.ExtLink \
|
||||
-taglet build.tools.taglet.Incubating \
|
||||
-taglet build.tools.taglet.PreviewNote \
|
||||
--preview-note-tag previewNote \
|
||||
-tagletpath $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
$(CUSTOM_JAVADOC_TAGS) \
|
||||
#
|
||||
@ -92,20 +94,16 @@ REFERENCE_TAGS := $(JAVADOC_TAGS)
|
||||
JAVADOC_DISABLED_DOCLINT_WARNINGS := missing
|
||||
JAVADOC_DISABLED_DOCLINT_PACKAGES := org.w3c.* javax.smartcardio
|
||||
|
||||
# Allow overriding on the command line
|
||||
# (intentionally sharing name with the javac option)
|
||||
JAVA_WARNINGS_ARE_ERRORS ?= -Werror
|
||||
|
||||
# The initial set of options for javadoc
|
||||
JAVADOC_OPTIONS := -use -keywords -notimestamp \
|
||||
-serialwarn -encoding ISO-8859-1 -docencoding UTF-8 -breakiterator \
|
||||
-serialwarn -encoding utf-8 -docencoding utf-8 -breakiterator \
|
||||
-splitIndex --system none -javafx --expand-requires transitive \
|
||||
--override-methods=summary
|
||||
|
||||
# The reference options must stay stable to allow for comparisons across the
|
||||
# development cycle.
|
||||
REFERENCE_OPTIONS := -XDignore.symbol.file=true -use -keywords -notimestamp \
|
||||
-serialwarn -encoding ISO-8859-1 -breakiterator -splitIndex --system none \
|
||||
-serialwarn -encoding utf-8 -breakiterator -splitIndex --system none \
|
||||
-html5 -javafx --expand-requires transitive
|
||||
|
||||
# Should we add DRAFT stamps to the generated javadoc?
|
||||
@ -264,7 +262,7 @@ define create_overview_file
|
||||
$$($1_OVERVIEW): $$($1_OVERVIEW_VARDEPS_FILE)
|
||||
$$(call LogInfo, Creating overview.html for $1)
|
||||
$$(call MakeDir, $$(@D))
|
||||
$$(PRINTF) > $$@ '$$($1_OVERVIEW_TEXT)'
|
||||
$$(PRINTF) "%s" '$$($1_OVERVIEW_TEXT)' > $$@
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
@ -322,7 +320,9 @@ define SetupApiDocsGenerationBody
|
||||
# Ignore the doclint warnings in certain packages
|
||||
$1_OPTIONS += -Xdoclint/package:$$(call CommaList, $$(addprefix -, \
|
||||
$$(JAVADOC_DISABLED_DOCLINT_PACKAGES)))
|
||||
$1_OPTIONS += $$(JAVA_WARNINGS_ARE_ERRORS)
|
||||
ifeq ($$(JAVA_WARNINGS_AS_ERRORS), true)
|
||||
$1_OPTIONS += -Werror
|
||||
endif
|
||||
|
||||
$1_DOC_TITLE := $$($1_LONG_NAME)<br>Version $$(VERSION_SPECIFICATION) API \
|
||||
Specification
|
||||
|
||||
@ -76,10 +76,14 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
|
||||
$(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $(JLI_TRACE_FILE)))
|
||||
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.raw \
|
||||
$(CLASSLIST_FILE_VM_OPTS) \
|
||||
-Xlog:aot=off \
|
||||
-Xlog:cds=off \
|
||||
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
|
||||
build.tools.classlist.HelloClasslist $(LOG_DEBUG)
|
||||
$(GREP) -v HelloClasslist $@.raw > $@.interim
|
||||
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -Xshare:dump \
|
||||
-Xlog:aot=off \
|
||||
-Xlog:cds=off \
|
||||
-XX:SharedClassListFile=$@.interim -XX:SharedArchiveFile=$@.jsa \
|
||||
-Xmx128M -Xms128M $(LOG_INFO)
|
||||
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.raw.2 \
|
||||
@ -87,6 +91,8 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
|
||||
-Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \
|
||||
$(CLASSLIST_FILE_VM_OPTS) \
|
||||
--module-path $(SUPPORT_OUTPUTDIR)/classlist.jar \
|
||||
-Xlog:aot=off \
|
||||
-Xlog:cds=off \
|
||||
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
|
||||
build.tools.classlist.HelloClasslist \
|
||||
2> $(LINK_OPT_DIR)/stderr > $(JLI_TRACE_FILE) \
|
||||
@ -100,6 +106,8 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
|
||||
$(GREP) -v HelloClasslist $@.raw.2 > $@.raw.3
|
||||
$(GREP) -v @cp $@.raw.3 > $@.raw.4
|
||||
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java \
|
||||
-Xlog:aot=off \
|
||||
-Xlog:cds=off \
|
||||
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
|
||||
build.tools.classlist.SortClasslist $@.raw.4 > $@
|
||||
|
||||
|
||||
@ -162,7 +162,7 @@ define CreateCDSArchive
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG_CDS_ARCHIVE), true)
|
||||
$1_$2_CDS_DUMP_FLAGS += -Xlog:cds+map*=trace:file=$$(JDK_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE).cdsmap:none:filesize=0
|
||||
$1_$2_CDS_DUMP_FLAGS += -Xlog:aot+map*=trace:file=$$(JDK_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE).cdsmap:none:filesize=0
|
||||
endif
|
||||
|
||||
$$(eval $$(call SetupExecute, $1_$2_gen_cds_archive_jdk, \
|
||||
|
||||
@ -137,7 +137,7 @@ main: MAKEOVERRIDES :=
|
||||
main: $(INIT_TARGETS)
|
||||
ifneq ($(SEQUENTIAL_TARGETS)$(PARALLEL_TARGETS), )
|
||||
$(call RotateLogFiles)
|
||||
$(PRINTF) "Building $(TARGET_DESCRIPTION)\n" $(BUILD_LOG_PIPE_SIMPLE)
|
||||
$(ECHO) "Building $(TARGET_DESCRIPTION)" $(BUILD_LOG_PIPE_SIMPLE)
|
||||
ifneq ($(SEQUENTIAL_TARGETS), )
|
||||
# Don't touch build output dir since we might be cleaning. That
|
||||
# means no log pipe.
|
||||
@ -158,7 +158,8 @@ main: $(INIT_TARGETS)
|
||||
-f make/Main.gmk $(USER_MAKE_VARS) \
|
||||
$(PARALLEL_TARGETS) $(COMPARE_BUILD_MAKE) $(BUILD_LOG_PIPE) || \
|
||||
( exitcode=$$? && \
|
||||
$(PRINTF) "\nERROR: Build failed for $(TARGET_DESCRIPTION) (exit code $$exitcode) \n" \
|
||||
$(ECHO) "" $(BUILD_LOG_PIPE_SIMPLE) && \
|
||||
$(ECHO) "ERROR: Build failed for $(TARGET_DESCRIPTION) (exit code $$exitcode)" \
|
||||
$(BUILD_LOG_PIPE_SIMPLE) && \
|
||||
cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -j 1 -f make/Init.gmk \
|
||||
on-failure ; \
|
||||
@ -170,7 +171,7 @@ main: $(INIT_TARGETS)
|
||||
if test -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error ; then \
|
||||
exit 1 ; \
|
||||
fi
|
||||
$(PRINTF) "Finished building $(TARGET_DESCRIPTION)\n" $(BUILD_LOG_PIPE_SIMPLE)
|
||||
$(ECHO) "Finished building $(TARGET_DESCRIPTION)" $(BUILD_LOG_PIPE_SIMPLE)
|
||||
$(call ReportProfileTimes)
|
||||
endif
|
||||
|
||||
@ -181,7 +182,8 @@ on-failure:
|
||||
$(call PrintFailureReports)
|
||||
$(call PrintBuildLogFailures)
|
||||
$(call ReportProfileTimes)
|
||||
$(PRINTF) "HELP: Run 'make doctor' to diagnose build problems.\n\n"
|
||||
$(ECHO) "HELP: Run 'make doctor' to diagnose build problems."
|
||||
$(ECHO) ""
|
||||
ifneq ($(COMPARE_BUILD), )
|
||||
$(call CleanupCompareBuild)
|
||||
endif
|
||||
|
||||
@ -173,9 +173,10 @@ define PrintFailureReports
|
||||
$(RM) $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log ; \
|
||||
$(if $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*.log), \
|
||||
( \
|
||||
$(PRINTF) "\n=== Output from failing command(s) repeated here ===\n" ; \
|
||||
$(ECHO) "" ; \
|
||||
$(ECHO) "=== Output from failing command(s) repeated here ===" ; \
|
||||
$(foreach logfile, $(sort $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*.log)), \
|
||||
$(PRINTF) "* For target $(notdir $(basename $(logfile))):\n" ; \
|
||||
$(ECHO) "* For target $(notdir $(basename $(logfile))):" ; \
|
||||
$(if $(filter all, $(LOG_REPORT)), \
|
||||
$(GREP) -v -e "^Note: including file:" < $(logfile) || true ; \
|
||||
, \
|
||||
@ -185,8 +186,9 @@ define PrintFailureReports
|
||||
fi ; \
|
||||
) \
|
||||
) \
|
||||
$(PRINTF) "\n* All command lines available in $(MAKESUPPORT_OUTPUTDIR)/failure-logs.\n" ; \
|
||||
$(PRINTF) "=== End of repeated output ===\n" ; \
|
||||
$(ECHO) "" ; \
|
||||
$(ECHO) "* All command lines available in $(MAKESUPPORT_OUTPUTDIR)/failure-logs." ; \
|
||||
$(ECHO) "=== End of repeated output ===" ; \
|
||||
) >> $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log \
|
||||
) \
|
||||
)
|
||||
@ -195,13 +197,16 @@ endef
|
||||
define PrintBuildLogFailures
|
||||
$(if $(filter none, $(LOG_REPORT)), , \
|
||||
if $(GREP) -q "recipe for target .* failed" $(BUILD_LOG) 2> /dev/null; then \
|
||||
$(PRINTF) "\n=== Make failed targets repeated here ===\n" ; \
|
||||
$(ECHO) "" ; \
|
||||
$(ECHO) "=== Make failed targets repeated here ===" ; \
|
||||
$(GREP) "recipe for target .* failed" $(BUILD_LOG) ; \
|
||||
$(PRINTF) "=== End of repeated output ===\n" ; \
|
||||
$(PRINTF) "\nHELP: Try searching the build log for the name of the first failed target.\n" ; \
|
||||
$(ECHO) "=== End of repeated output ===" ; \
|
||||
$(ECHO) "" ; \
|
||||
$(ECHO) "HELP: Try searching the build log for the name of the first failed target." ; \
|
||||
else \
|
||||
$(PRINTF) "\nNo indication of failed target found.\n" ; \
|
||||
$(PRINTF) "HELP: Try searching the build log for '] Error'.\n" ; \
|
||||
$(ECHO) "" ; \
|
||||
$(ECHO) "No indication of failed target found." ; \
|
||||
$(ECHO) "HELP: Try searching the build log for '] Error'." ; \
|
||||
fi >> $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log ; \
|
||||
$(CAT) $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log \
|
||||
)
|
||||
|
||||
@ -875,6 +875,12 @@ $(eval $(call SetupTarget, static-libs-graal-bundles, \
|
||||
DEPS := static-libs-graal-image, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupTarget, static-jdk-bundles, \
|
||||
MAKEFILE := Bundles, \
|
||||
TARGET := static-jdk-bundles, \
|
||||
DEPS := static-jdk-image, \
|
||||
))
|
||||
|
||||
ifeq ($(JCOV_ENABLED), true)
|
||||
$(eval $(call SetupTarget, jcov-bundles, \
|
||||
MAKEFILE := Bundles, \
|
||||
|
||||
@ -58,76 +58,76 @@ endef
|
||||
|
||||
define CleanDocs
|
||||
@$(PRINTF) "Cleaning docs ..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/docs
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/javadoc
|
||||
$(RM) -r $(IMAGES_OUTPUTDIR)/docs
|
||||
@$(PRINTF) " done\n"
|
||||
@$(ECHO) " done"
|
||||
endef
|
||||
|
||||
# Cleans the dir given as $1
|
||||
define CleanDir
|
||||
@$(PRINTF) "Cleaning $(strip $1) build artifacts ..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
@$(PRINTF) "Cleaning %s build artifacts ..." "$(strip $1)"
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
($(CD) $(OUTPUTDIR) && $(RM) -r $1)
|
||||
@$(PRINTF) " done\n"
|
||||
@$(ECHO) " done"
|
||||
endef
|
||||
|
||||
define CleanSupportDir
|
||||
@$(PRINTF) "Cleaning $(strip $1) build artifacts ..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
@$(PRINTF) "Cleaning %s build artifacts ..." "$(strip $1)"
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/$(strip $1)
|
||||
@$(PRINTF) " done\n"
|
||||
@$(ECHO) " done"
|
||||
endef
|
||||
|
||||
define CleanMakeSupportDir
|
||||
@$(PRINTF) "Cleaning $(strip $1) make support artifacts ..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
@$(PRINTF) "Cleaning %s make support artifacts ..." "$(strip $1)"
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
$(RM) -r $(MAKESUPPORT_OUTPUTDIR)/$(strip $1)
|
||||
@$(PRINTF) " done\n"
|
||||
@$(ECHO) " done"
|
||||
endef
|
||||
|
||||
define CleanTest
|
||||
@$(PRINTF) "Cleaning test $(strip $1) ..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
@$(PRINTF) "Cleaning test %s ..." "$(strip $1)"
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/test/$(strip $(subst -,/,$1))
|
||||
# Remove as much of the test directory structure as is empty
|
||||
$(RMDIR) -p $(dir $(SUPPORT_OUTPUTDIR)/test/$(strip $(subst -,/,$1))) 2> /dev/null || true
|
||||
@$(PRINTF) " done\n"
|
||||
@$(ECHO) " done"
|
||||
endef
|
||||
|
||||
define Clean-gensrc
|
||||
@$(PRINTF) "Cleaning gensrc $(if $1,for $(strip $1) )..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
@$(PRINTF) "Cleaning gensrc %s..." "$(if $1,for $(strip $1) )"
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/gensrc/$(strip $1)
|
||||
@$(PRINTF) " done\n"
|
||||
@$(ECHO) " done"
|
||||
endef
|
||||
|
||||
define Clean-java
|
||||
@$(PRINTF) "Cleaning java $(if $1,for $(strip $1) )..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
@$(PRINTF) "Cleaning java %s..." "$(if $1,for $(strip $1) )"
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
$(RM) -r $(JDK_OUTPUTDIR)/modules/$(strip $1)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/special_classes/$(strip $1)
|
||||
$(PRINTF) " done\n"
|
||||
$(PRINTF) "Cleaning headers $(if $1,for $(strip $1)) ..."
|
||||
$(ECHO) " done"
|
||||
$(PRINTF) "Cleaning headers %s..." "$(if $1,for $(strip $1) )"
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/headers/$(strip $1)
|
||||
@$(PRINTF) " done\n"
|
||||
@$(ECHO) " done"
|
||||
endef
|
||||
|
||||
define Clean-native
|
||||
@$(PRINTF) "Cleaning native $(if $1,for $(strip $1) )..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
@$(PRINTF) "Cleaning native %s..." "$(if $1,for $(strip $1) )"
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/native/$(strip $1)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_cmds/$(strip $1)
|
||||
@$(PRINTF) " done\n"
|
||||
@$(ECHO) " done"
|
||||
endef
|
||||
|
||||
define Clean-include
|
||||
@$(PRINTF) "Cleaning include $(if $1,for $(strip $1) )..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
@$(PRINTF) "Cleaning include %s..." "$(if $1,for $(strip $1) )"
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_include/$(strip $1)
|
||||
@$(PRINTF) " done\n"
|
||||
@$(ECHO) " done"
|
||||
endef
|
||||
|
||||
define CleanModule
|
||||
|
||||
@ -161,19 +161,19 @@ ifneq ($(SKIP_SPEC), true)
|
||||
( cd $(TOPDIR) && \
|
||||
$(foreach spec, $(SPECS), \
|
||||
$(MAKE) $(MAKE_INIT_ARGS) -j 1 -f $(TOPDIR)/make/Init.gmk \
|
||||
SPEC=$(spec) $(MAKE_INIT_MAIN_TARGET_ARGS) \
|
||||
main && \
|
||||
SPEC=$(spec) TOPDIR_ALT=$(TOPDIR) \
|
||||
$(MAKE_INIT_MAIN_TARGET_ARGS) main && \
|
||||
$(if $(and $(COMPARE_BUILD), $(PARALLEL_TARGETS)), \
|
||||
$(MAKE) $(MAKE_INIT_ARGS) -f $(TOPDIR)/make/Init.gmk \
|
||||
SPEC=$(spec) \
|
||||
SPEC=$(spec) TOPDIR_ALT=$(TOPDIR) \
|
||||
COMPARE_BUILD="$(COMPARE_BUILD)" \
|
||||
pre-compare-build && \
|
||||
$(MAKE) $(MAKE_INIT_ARGS) -j 1 -f $(TOPDIR)/make/Init.gmk \
|
||||
SPEC=$(spec) $(MAKE_INIT_MAIN_TARGET_ARGS) \
|
||||
SPEC=$(spec) TOPDIR_ALT=$(TOPDIR) \
|
||||
COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" \
|
||||
main && \
|
||||
$(MAKE_INIT_MAIN_TARGET_ARGS) main && \
|
||||
$(MAKE) $(MAKE_INIT_ARGS) -f $(TOPDIR)/make/Init.gmk \
|
||||
SPEC=$(spec) \
|
||||
SPEC=$(spec) TOPDIR_ALT=$(TOPDIR) \
|
||||
COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" \
|
||||
post-compare-build && \
|
||||
) \
|
||||
|
||||
@ -250,13 +250,14 @@ endef
|
||||
# Param 1: FORCE = force generation of main-targets.gmk or LAZY = do not force.
|
||||
# Param 2: The SPEC file to use.
|
||||
define DefineMainTargets
|
||||
SPEC_FILE := $(strip $2)
|
||||
|
||||
# We will start by making sure the main-targets.gmk file is removed, if
|
||||
# make has not been restarted. By the -include, we will trigger the
|
||||
# rule for generating the file (which is never there since we removed it),
|
||||
# thus generating it fresh, and make will restart, incrementing the restart
|
||||
# count.
|
||||
main_targets_file := $$(dir $(strip $2))make-support/main-targets.gmk
|
||||
main_targets_file := $$(dir $$(SPEC_FILE))make-support/main-targets.gmk
|
||||
|
||||
ifeq ($$(MAKE_RESTARTS), )
|
||||
# Only do this if make has not been restarted, and if we do not force it.
|
||||
@ -268,10 +269,10 @@ define DefineMainTargets
|
||||
$$(main_targets_file):
|
||||
@( cd $$(TOPDIR) && \
|
||||
$$(MAKE) $$(MAKE_LOG_FLAGS) -r -R -f $$(TOPDIR)/make/GenerateFindTests.gmk \
|
||||
-I $$(TOPDIR)/make/common SPEC=$(strip $2) )
|
||||
-I $$(TOPDIR)/make/common SPEC=$$(SPEC_FILE) TOPDIR_ALT=$$(TOPDIR))
|
||||
@( cd $$(TOPDIR) && \
|
||||
$$(MAKE) $$(MAKE_LOG_FLAGS) -r -R -f $$(TOPDIR)/make/Main.gmk \
|
||||
-I $$(TOPDIR)/make/common SPEC=$(strip $2) NO_RECIPES=true \
|
||||
-I $$(TOPDIR)/make/common SPEC=$$(SPEC_FILE) TOPDIR_ALT=$$(TOPDIR) NO_RECIPES=true \
|
||||
$$(MAKE_LOG_VARS) \
|
||||
create-main-targets-include )
|
||||
|
||||
|
||||
@ -115,6 +115,7 @@ JTREG_COV_OPTIONS :=
|
||||
|
||||
ifeq ($(TEST_OPTS_JCOV), true)
|
||||
JCOV_OUTPUT_DIR := $(TEST_RESULTS_DIR)/jcov-output
|
||||
JCOV_SUPPORT_DIR := $(TEST_SUPPORT_DIR)/jcov-support
|
||||
JCOV_GRABBER_LOG := $(JCOV_OUTPUT_DIR)/grabber.log
|
||||
JCOV_RESULT_FILE := $(JCOV_OUTPUT_DIR)/result.xml
|
||||
JCOV_REPORT := $(JCOV_OUTPUT_DIR)/report
|
||||
@ -534,22 +535,21 @@ define SetupRunGtestTestBody
|
||||
$$(eval $1_PASSED := $$(shell $$(AWK) '/\[ PASSED \] .* tests?./ \
|
||||
{ print $$$$4 }' $$($1_RESULT_FILE))) \
|
||||
$$(if $$($1_PASSED), , $$(eval $1_PASSED := 0)) \
|
||||
$$(eval $1_SKIPPED := $$(shell $$(AWK) \
|
||||
'/YOU HAVE [0-9]+ DISABLED TEST/ { \
|
||||
if (match($$$$0, /[0-9]+/, arr)) { \
|
||||
print arr[0]; \
|
||||
found=1; \
|
||||
} \
|
||||
} \
|
||||
END { if (!found) print 0; }' \
|
||||
$$($1_RESULT_FILE))) \
|
||||
$$(eval $1_GTEST_DISABLED := $$(shell $$(AWK) '/YOU HAVE .* DISABLED TEST/ \
|
||||
{ print $$$$3 }' $$($1_RESULT_FILE))) \
|
||||
$$(if $$($1_GTEST_DISABLED), , $$(eval $1_GTEST_DISABLED := 0)) \
|
||||
$$(eval $1_GTEST_SKIPPED := $$(shell $$(AWK) '/\[ SKIPPED \] .* tests?.*/ \
|
||||
{ print $$$$4 }' $$($1_RESULT_FILE))) \
|
||||
$$(if $$($1_GTEST_SKIPPED), , $$(eval $1_GTEST_SKIPPED := 0)) \
|
||||
$$(eval $1_SKIPPED := $$(shell \
|
||||
$$(EXPR) $$($1_GTEST_DISABLED) + $$($1_GTEST_SKIPPED))) \
|
||||
$$(eval $1_FAILED := $$(shell $$(AWK) '/\[ FAILED \] .* tests?, \
|
||||
listed below/ { print $$$$4 }' $$($1_RESULT_FILE))) \
|
||||
$$(if $$($1_FAILED), , $$(eval $1_FAILED := 0)) \
|
||||
$$(eval $1_ERROR := $$(shell \
|
||||
$$(EXPR) $$($1_RUN) - $$($1_PASSED) - $$($1_FAILED))) \
|
||||
$$(EXPR) $$($1_RUN) - $$($1_PASSED) - $$($1_FAILED) - $$($1_GTEST_SKIPPED))) \
|
||||
$$(eval $1_TOTAL := $$(shell \
|
||||
$$(EXPR) $$($1_RUN) + $$($1_SKIPPED))) \
|
||||
$$(EXPR) $$($1_RUN) + $$($1_GTEST_DISABLED))) \
|
||||
, \
|
||||
$$(eval $1_PASSED := 0) \
|
||||
$$(eval $1_FAILED := 0) \
|
||||
@ -754,7 +754,7 @@ define SetupAOTBody
|
||||
cd $$($1_AOT_JDK_OUTPUT_DIR); \
|
||||
$(JAR) --extract --file $(TEST_IMAGE_DIR)/setup_aot/TestSetupAOT.jar; \
|
||||
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java $$($1_VM_OPTIONS) \
|
||||
-Xlog:class+load,cds,cds+class=debug:file=$$($1_AOT_JDK_CONF).log -Xlog:cds*=error \
|
||||
-Xlog:class+load,aot,aot+class=debug:file=$$($1_AOT_JDK_CONF).log -Xlog:cds*=error -Xlog:aot*=error \
|
||||
-XX:AOTMode=record -XX:AOTConfiguration=$$($1_AOT_JDK_CONF) \
|
||||
TestSetupAOT $$($1_AOT_JDK_OUTPUT_DIR) > $$($1_AOT_JDK_LOG) \
|
||||
))
|
||||
@ -762,7 +762,7 @@ define SetupAOTBody
|
||||
$$(call LogWarn, AOT: Generate AOT cache $$($1_AOT_JDK_CACHE) with flags: $$($1_VM_OPTIONS))
|
||||
$$(call ExecuteWithLog, $$($1_AOT_JDK_OUTPUT_DIR), ( \
|
||||
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java \
|
||||
$$($1_VM_OPTIONS) -Xlog:cds,cds+class=debug:file=$$($1_AOT_JDK_CACHE).log -Xlog:cds*=error \
|
||||
$$($1_VM_OPTIONS) -Xlog:aot,aot+class=debug:file=$$($1_AOT_JDK_CACHE).log -Xlog:cds*=error -Xlog:aot*=error \
|
||||
-XX:ExtraSharedClassListFile=$(JDK_UNDER_TEST)/lib/classlist \
|
||||
-XX:AOTMode=create -XX:AOTConfiguration=$$($1_AOT_JDK_CONF) -XX:AOTCache=$$($1_AOT_JDK_CACHE) \
|
||||
))
|
||||
@ -930,6 +930,11 @@ define SetupRunJtregTestBody
|
||||
JTREG_AUTO_PROBLEM_LISTS += ProblemList-shenandoah.txt
|
||||
endif
|
||||
|
||||
ifneq ($$(findstring --enable-preview, $$(JTREG_ALL_OPTIONS)), )
|
||||
JTREG_AUTO_PROBLEM_LISTS += ProblemList-enable-preview.txt
|
||||
endif
|
||||
|
||||
|
||||
ifneq ($$(JTREG_EXTRA_PROBLEM_LISTS), )
|
||||
# Accept both absolute paths as well as relative to the current test root.
|
||||
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \
|
||||
@ -1017,7 +1022,8 @@ define SetupRunJtregTestBody
|
||||
$1_COMMAND_LINE := \
|
||||
for i in {0..$$(JTREG_RETRY_COUNT)}; do \
|
||||
if [ "$$$$i" != 0 ]; then \
|
||||
$$(PRINTF) "\nRetrying Jtreg run. Attempt: $$$$i\n"; \
|
||||
$$(ECHO) ""; \
|
||||
$$(ECHO) "Retrying Jtreg run. Attempt: $$$$i"; \
|
||||
fi; \
|
||||
$$($1_COMMAND_LINE); \
|
||||
if [ "`$$(CAT) $$($1_EXITCODE)`" = "0" ]; then \
|
||||
@ -1030,10 +1036,12 @@ define SetupRunJtregTestBody
|
||||
ifneq ($$(JTREG_REPEAT_COUNT), 0)
|
||||
$1_COMMAND_LINE := \
|
||||
for i in {1..$$(JTREG_REPEAT_COUNT)}; do \
|
||||
$$(PRINTF) "\nRepeating Jtreg run: $$$$i out of $$(JTREG_REPEAT_COUNT)\n"; \
|
||||
$$(ECHO) ""; \
|
||||
$$(ECHO) "Repeating Jtreg run: $$$$i out of $$(JTREG_REPEAT_COUNT)"; \
|
||||
$$($1_COMMAND_LINE); \
|
||||
if [ "`$$(CAT) $$($1_EXITCODE)`" != "0" ]; then \
|
||||
$$(PRINTF) "\nFailures detected, no more repeats.\n"; \
|
||||
$$(ECHO) ""; \
|
||||
$$(ECHO) "Failures detected, no more repeats."; \
|
||||
break; \
|
||||
fi; \
|
||||
done
|
||||
@ -1336,12 +1344,14 @@ TARGETS += run-all-tests pre-run-test post-run-test run-test-report run-test
|
||||
|
||||
ifeq ($(TEST_OPTS_JCOV), true)
|
||||
|
||||
JCOV_VM_OPTS := -Xmx4g -Djdk.xml.totalEntitySizeLimit=0 -Djdk.xml.maxGeneralEntitySizeLimit=0
|
||||
|
||||
jcov-do-start-grabber:
|
||||
$(call MakeDir, $(JCOV_OUTPUT_DIR))
|
||||
if $(JAVA) -jar $(JCOV_HOME)/lib/jcov.jar GrabberManager -status 1>/dev/null 2>&1 ; then \
|
||||
$(JAVA) -jar $(JCOV_HOME)/lib/jcov.jar GrabberManager -stop -stoptimeout 3600 ; \
|
||||
fi
|
||||
$(JAVA) -Xmx4g -jar $(JCOV_HOME)/lib/jcov.jar Grabber -v -t \
|
||||
$(JAVA) $(JCOV_VM_OPTS) -jar $(JCOV_HOME)/lib/jcov.jar Grabber -v -t \
|
||||
$(JCOV_IMAGE_DIR)/template.xml -o $(JCOV_RESULT_FILE) \
|
||||
1>$(JCOV_GRABBER_LOG) 2>&1 &
|
||||
|
||||
@ -1354,6 +1364,10 @@ ifeq ($(TEST_OPTS_JCOV), true)
|
||||
$(JAVA) -jar $(JCOV_HOME)/lib/jcov.jar GrabberManager -stop -stoptimeout 3600
|
||||
|
||||
JCOV_REPORT_TITLE := JDK code coverage report<br/>
|
||||
ifneq ($(JCOV_MODULES), )
|
||||
JCOV_MODULES_FILTER := $(foreach m, $(JCOV_MODULES), -include_module $m)
|
||||
JCOV_REPORT_TITLE += Included modules: $(JCOV_MODULES)<br>
|
||||
endif
|
||||
ifneq ($(JCOV_FILTERS), )
|
||||
JCOV_REPORT_TITLE += Code filters: $(JCOV_FILTERS)<br>
|
||||
endif
|
||||
@ -1361,11 +1375,12 @@ ifeq ($(TEST_OPTS_JCOV), true)
|
||||
|
||||
jcov-gen-report: jcov-stop-grabber
|
||||
$(call LogWarn, Generating JCov report ...)
|
||||
$(JAVA) -Xmx4g -jar $(JCOV_HOME)/lib/jcov.jar RepGen -sourcepath \
|
||||
$(call ExecuteWithLog, $(JCOV_SUPPORT_DIR)/run-jcov-repgen, \
|
||||
$(JAVA) $(JCOV_VM_OPTS) -jar $(JCOV_HOME)/lib/jcov.jar RepGen -sourcepath \
|
||||
`$(ECHO) $(TOPDIR)/src/*/share/classes/ | $(TR) ' ' ':'` -fmt html \
|
||||
$(JCOV_FILTERS) \
|
||||
$(JCOV_MODULES_FILTER) $(JCOV_FILTERS) \
|
||||
-mainReportTitle "$(JCOV_REPORT_TITLE)" \
|
||||
-o $(JCOV_REPORT) $(JCOV_RESULT_FILE)
|
||||
-o $(JCOV_REPORT) $(JCOV_RESULT_FILE))
|
||||
|
||||
TARGETS += jcov-do-start-grabber jcov-start-grabber jcov-stop-grabber \
|
||||
jcov-gen-report
|
||||
@ -1385,7 +1400,7 @@ ifeq ($(TEST_OPTS_JCOV), true)
|
||||
jcov-gen-diffcoverage: jcov-stop-grabber
|
||||
$(call LogWarn, Generating diff coverage with changeset $(TEST_OPTS_JCOV_DIFF_CHANGESET) ... )
|
||||
$(DIFF_COMMAND)
|
||||
$(JAVA) -Xmx4g -jar $(JCOV_HOME)/lib/jcov.jar \
|
||||
$(JAVA) $(JCOV_VM_OPTS) -jar $(JCOV_HOME)/lib/jcov.jar \
|
||||
DiffCoverage -replaceDiff "src/.*/classes/:" -all \
|
||||
$(JCOV_RESULT_FILE) $(JCOV_SOURCE_DIFF) > \
|
||||
$(JCOV_DIFF_COVERAGE_REPORT)
|
||||
|
||||
@ -217,9 +217,9 @@ else ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
else ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
NUM_CORES := $(NUMBER_OF_PROCESSORS)
|
||||
MEMORY_SIZE := $(shell \
|
||||
$(EXPR) `wmic computersystem get totalphysicalmemory -value \
|
||||
| $(GREP) = | $(SED) 's/\\r//g' \
|
||||
| $(CUT) -d "=" -f 2-` / 1024 / 1024 \
|
||||
$(EXPR) `powershell -Command \
|
||||
"(Get-CimInstance Win32_ComputerSystem).TotalPhysicalMemory" \
|
||||
| $(SED) 's/\\r//g' ` / 1024 / 1024 \
|
||||
)
|
||||
endif
|
||||
ifeq ($(NUM_CORES), )
|
||||
|
||||
@ -55,7 +55,7 @@ ifneq ($(and $(GIT), $(wildcard $(TOPDIR)/.git)), )
|
||||
SCM_DIR := .git
|
||||
ID_COMMAND := $(PRINTF) "git:%s%s\n" \
|
||||
"$$($(GIT) log -n1 --format=%H | cut -c1-12)" \
|
||||
"$$(if test -n "$$($(GIT) status --porcelain)"; then printf '+'; fi)"
|
||||
"$$(if test -n "$$($(GIT) status --porcelain)"; then $(PRINTF) '+'; fi)"
|
||||
endif
|
||||
|
||||
ifeq ($(USE_SCM), true)
|
||||
|
||||
@ -134,17 +134,33 @@ AC_DEFUN_ONCE([BASIC_SETUP_BUILD_ENV],
|
||||
)
|
||||
AC_SUBST(BUILD_ENV)
|
||||
|
||||
AC_MSG_CHECKING([for locale to use])
|
||||
if test "x$LOCALE" != x; then
|
||||
# Check if we actually have C.UTF-8; if so, use it
|
||||
if $LOCALE -a | $GREP -q -E "^C\.(utf8|UTF-8)$"; then
|
||||
LOCALE_USED=C.UTF-8
|
||||
AC_MSG_RESULT([C.UTF-8 (recommended)])
|
||||
elif $LOCALE -a | $GREP -q -E "^en_US\.(utf8|UTF-8)$"; then
|
||||
LOCALE_USED=en_US.UTF-8
|
||||
AC_MSG_RESULT([en_US.UTF-8 (acceptable fallback)])
|
||||
else
|
||||
AC_MSG_WARN([C.UTF-8 locale not found, using C locale])
|
||||
LOCALE_USED=C
|
||||
# As a fallback, check if users locale is UTF-8. USER_LOCALE was saved
|
||||
# by the wrapper configure script before autconf messed up LC_ALL.
|
||||
if $ECHO $USER_LOCALE | $GREP -q -E "\.(utf8|UTF-8)$"; then
|
||||
LOCALE_USED=$USER_LOCALE
|
||||
AC_MSG_RESULT([$USER_LOCALE (untested fallback)])
|
||||
AC_MSG_WARN([Could not find C.UTF-8 or en_US.UTF-8 locale. This is not supported, and the build might fail unexpectedly.])
|
||||
else
|
||||
AC_MSG_RESULT([no UTF-8 locale found])
|
||||
AC_MSG_WARN([No UTF-8 locale found. This is not supported. Proceeding with the C locale, but the build might fail unexpectedly.])
|
||||
LOCALE_USED=C
|
||||
fi
|
||||
AC_MSG_NOTICE([The recommended locale is C.UTF-8, but en_US.UTF-8 is also accepted.])
|
||||
fi
|
||||
else
|
||||
AC_MSG_WARN([locale command not not found, using C locale])
|
||||
LOCALE_USED=C
|
||||
LOCALE_USED=C.UTF-8
|
||||
AC_MSG_RESULT([C.UTF-8 (default)])
|
||||
AC_MSG_WARN([locale command not not found, using C.UTF-8 locale])
|
||||
fi
|
||||
|
||||
export LC_ALL=$LOCALE_USED
|
||||
|
||||
@ -468,7 +468,15 @@ AC_DEFUN_ONCE([BASIC_SETUP_PANDOC],
|
||||
AC_MSG_CHECKING([if the pandoc smart extension needs to be disabled for markdown])
|
||||
if $PANDOC --list-extensions | $GREP -q '+smart'; then
|
||||
AC_MSG_RESULT([yes])
|
||||
PANDOC_MARKDOWN_FLAG="markdown-smart"
|
||||
PANDOC_MARKDOWN_FLAG="$PANDOC_MARKDOWN_FLAG-smart"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if the pandoc tex_math_dollars extension needs to be disabled for markdown])
|
||||
if $PANDOC --list-extensions | $GREP -q '+tex_math_dollars'; then
|
||||
AC_MSG_RESULT([yes])
|
||||
PANDOC_MARKDOWN_FLAG="$PANDOC_MARKDOWN_FLAG-tex_math_dollars"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -159,7 +159,7 @@ AC_DEFUN([BASIC_SETUP_PATHS_WINDOWS],
|
||||
else
|
||||
WINENV_PREFIX_ARG="$WINENV_PREFIX"
|
||||
fi
|
||||
FIXPATH_ARGS="-e $PATHTOOL -p $WINENV_PREFIX_ARG -r ${WINENV_ROOT//\\/\\\\} -t $WINENV_TEMP_DIR -c $CMD -q"
|
||||
FIXPATH_ARGS="-e $PATHTOOL -p $WINENV_PREFIX_ARG -r ${WINENV_ROOT//\\/\\\\} -t $WINENV_TEMP_DIR -c $CMD"
|
||||
FIXPATH_BASE="$BASH $FIXPATH_DIR/fixpath.sh $FIXPATH_ARGS"
|
||||
FIXPATH="$FIXPATH_BASE exec"
|
||||
|
||||
@ -215,7 +215,7 @@ AC_DEFUN([BASIC_WINDOWS_FINALIZE_FIXPATH],
|
||||
if test "x$OPENJDK_BUILD_OS" = xwindows; then
|
||||
FIXPATH_CMDLINE=". $TOPDIR/make/scripts/fixpath.sh -e $PATHTOOL \
|
||||
-p $WINENV_PREFIX_ARG -r ${WINENV_ROOT//\\/\\\\} -t $WINENV_TEMP_DIR \
|
||||
-c $CMD -q"
|
||||
-c $CMD"
|
||||
$ECHO > $OUTPUTDIR/fixpath '#!/bin/bash'
|
||||
$ECHO >> $OUTPUTDIR/fixpath export PATH='"[$]PATH:'$PATH'"'
|
||||
$ECHO >> $OUTPUTDIR/fixpath $FIXPATH_CMDLINE '"[$]@"'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -180,11 +180,13 @@ AC_DEFUN([BOOTJDK_CHECK_JAVA_HOME],
|
||||
# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
|
||||
AC_DEFUN([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK],
|
||||
[
|
||||
UTIL_LOOKUP_PROGS(JAVAC_CHECK, javac, , NOFIXPATH)
|
||||
UTIL_LOOKUP_PROGS(JAVA_CHECK, java, , NOFIXPATH)
|
||||
BINARY="$JAVAC_CHECK"
|
||||
if test "x$JAVAC_CHECK" = x; then
|
||||
BINARY="$JAVA_CHECK"
|
||||
UTIL_LOOKUP_PROGS(JAVAC_CHECK, javac)
|
||||
UTIL_GET_EXECUTABLE(JAVAC_CHECK) # Will setup JAVAC_CHECK_EXECUTABLE
|
||||
UTIL_LOOKUP_PROGS(JAVA_CHECK, java)
|
||||
UTIL_GET_EXECUTABLE(JAVA_CHECK) # Will setup JAVA_CHECK_EXECUTABLE
|
||||
BINARY="$JAVAC_CHECK_EXECUTABLE"
|
||||
if test "x$JAVAC_CHECK_EXECUTABLE" = x; then
|
||||
BINARY="$JAVA_CHECK_EXECUTABLE"
|
||||
fi
|
||||
if test "x$BINARY" != x; then
|
||||
# So there is a java(c) binary, it might be part of a JDK.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -75,7 +75,8 @@ AC_DEFUN([BPERF_CHECK_MEMORY_SIZE],
|
||||
FOUND_MEM=yes
|
||||
elif test "x$OPENJDK_BUILD_OS" = xwindows; then
|
||||
# Windows, but without cygwin
|
||||
MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
|
||||
MEMORY_SIZE=`powershell -Command \
|
||||
"(Get-CimInstance Win32_ComputerSystem).TotalPhysicalMemory" | $SED 's/\\r//g' `
|
||||
MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
|
||||
FOUND_MEM=yes
|
||||
fi
|
||||
|
||||
4
make/autoconf/configure
vendored
4
make/autoconf/configure
vendored
@ -49,7 +49,9 @@ fi
|
||||
export CONFIG_SHELL=$BASH
|
||||
export _as_can_reexec=no
|
||||
|
||||
# Make sure all shell commands are executed with the C locale
|
||||
# Save user's current locale, but make sure all future shell commands are
|
||||
# executed with the C locale
|
||||
export USER_LOCALE=$LC_ALL
|
||||
export LC_ALL=C
|
||||
|
||||
if test "x$CUSTOM_CONFIG_DIR" != x; then
|
||||
|
||||
@ -261,6 +261,7 @@ JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE_COH
|
||||
JDKOPT_ENABLE_DISABLE_COMPATIBLE_CDS_ALIGNMENT
|
||||
JDKOPT_SETUP_MACOSX_SIGNING
|
||||
JDKOPT_SETUP_SIGNING_HOOK
|
||||
JDKOPT_SETUP_JAVA_WARNINGS
|
||||
|
||||
################################################################################
|
||||
#
|
||||
|
||||
@ -573,12 +573,20 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
TOOLCHAIN_CFLAGS_JDK="$TOOLCHAIN_CFLAGS_JDK -fvisibility=hidden -fstack-protector"
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# The -utf-8 option sets source and execution character sets to UTF-8 to enable correct
|
||||
# compilation of all source files regardless of the active code page on Windows.
|
||||
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:inline -Zc:throwingNew -permissive- -utf-8 -MP"
|
||||
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:inline -Zc:throwingNew -permissive- -utf-8 -Zc:wchar_t-"
|
||||
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:inline -Zc:throwingNew -permissive- -MP"
|
||||
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:inline -Zc:throwingNew -permissive- -Zc:wchar_t-"
|
||||
fi
|
||||
|
||||
# Set character encoding in source
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
CHARSET_CFLAGS="-finput-charset=utf-8"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# The -utf-8 option sets both source and execution character sets
|
||||
CHARSET_CFLAGS="-utf-8 -validate-charset"
|
||||
fi
|
||||
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM $CHARSET_CFLAGS"
|
||||
TOOLCHAIN_CFLAGS_JDK="$TOOLCHAIN_CFLAGS_JDK $CHARSET_CFLAGS"
|
||||
|
||||
# CFLAGS C language level for JDK sources (hotspot only uses C++)
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
LANGSTD_CFLAGS="-std=c11"
|
||||
@ -721,7 +729,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
$1_CFLAGS_CPU="-fsigned-char -Wno-psabi $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
|
||||
$1_CFLAGS_CPU_JVM="-DARM"
|
||||
elif test "x$FLAGS_CPU_ARCH" = xppc; then
|
||||
$1_CFLAGS_CPU_JVM="-minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
|
||||
$1_CFLAGS_CPU_JVM="-mno-multiple -mno-string"
|
||||
if test "x$FLAGS_CPU" = xppc64; then
|
||||
# -mminimal-toc fixes `relocation truncated to fit' error for gcc 4.1.
|
||||
# Use ppc64 instructions, but schedule for power5
|
||||
|
||||
@ -228,19 +228,19 @@ AC_DEFUN_ONCE([HELP_PRINT_ADDITIONAL_HELP_AND_EXIT],
|
||||
if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
|
||||
|
||||
# Print available toolchains
|
||||
$PRINTF "The following toolchains are valid as arguments to --with-toolchain-type.\n"
|
||||
$PRINTF "Which are available to use depends on the build platform.\n"
|
||||
$ECHO "The following toolchains are valid as arguments to --with-toolchain-type."
|
||||
$ECHO "Which are available to use depends on the build platform."
|
||||
for toolchain in $VALID_TOOLCHAINS_all; do
|
||||
# Use indirect variable referencing
|
||||
toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
|
||||
TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
|
||||
$PRINTF " %-22s %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
|
||||
done
|
||||
$PRINTF "\n"
|
||||
$ECHO ""
|
||||
|
||||
# Print available JVM features
|
||||
$PRINTF "The following JVM features are valid as arguments to --with-jvm-features.\n"
|
||||
$PRINTF "Which are available to use depends on the environment and JVM variant.\n"
|
||||
$ECHO "The following JVM features are valid as arguments to --with-jvm-features."
|
||||
$ECHO "Which are available to use depends on the environment and JVM variant."
|
||||
m4_foreach(FEATURE, m4_split(jvm_features_valid), [
|
||||
# Create an m4 variable containing the description for FEATURE.
|
||||
m4_define(FEATURE_DESCRIPTION, [jvm_feature_desc_]m4_translit(FEATURE, -, _))
|
||||
@ -257,115 +257,117 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
|
||||
[
|
||||
# Finally output some useful information to the user
|
||||
|
||||
printf "\n"
|
||||
printf "====================================================\n"
|
||||
$ECHO ""
|
||||
$ECHO "===================================================="
|
||||
if test "x$no_create" != "xyes"; then
|
||||
if test "x$IS_RECONFIGURE" != "xyes"; then
|
||||
printf "A new configuration has been successfully created in\n%s\n" "$OUTPUTDIR"
|
||||
$ECHO "A new configuration has been successfully created in"
|
||||
$ECHO "$OUTPUTDIR"
|
||||
else
|
||||
printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUTDIR"
|
||||
$ECHO "The existing configuration has been successfully updated in"
|
||||
$ECHO "$OUTPUTDIR"
|
||||
fi
|
||||
else
|
||||
if test "x$IS_RECONFIGURE" != "xyes"; then
|
||||
printf "A configuration has been successfully checked but not created\n"
|
||||
$ECHO "A configuration has been successfully checked but not created"
|
||||
else
|
||||
printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUTDIR"
|
||||
$ECHO "The existing configuration has been successfully checked in"
|
||||
$ECHO "$OUTPUTDIR"
|
||||
fi
|
||||
fi
|
||||
if test "x$CONFIGURE_COMMAND_LINE" != x; then
|
||||
printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
|
||||
$ECHO "using configure arguments '$CONFIGURE_COMMAND_LINE'."
|
||||
else
|
||||
printf "using default settings.\n"
|
||||
$ECHO "using default settings."
|
||||
fi
|
||||
|
||||
if test "x$REAL_CONFIGURE_COMMAND_EXEC_FULL" != x; then
|
||||
printf "\n"
|
||||
printf "The original configure invocation was '$REAL_CONFIGURE_COMMAND_EXEC_SHORT $REAL_CONFIGURE_COMMAND_LINE'.\n"
|
||||
$ECHO ""
|
||||
$ECHO "The original configure invocation was '$REAL_CONFIGURE_COMMAND_EXEC_SHORT $REAL_CONFIGURE_COMMAND_LINE'."
|
||||
fi
|
||||
|
||||
printf "\n"
|
||||
printf "Configuration summary:\n"
|
||||
printf "* Name: $CONF_NAME\n"
|
||||
printf "* Debug level: $DEBUG_LEVEL\n"
|
||||
printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
|
||||
printf "* JVM variants: $JVM_VARIANTS\n"
|
||||
printf "* JVM features: "
|
||||
$ECHO ""
|
||||
$ECHO "Configuration summary:"
|
||||
$ECHO "* Name: $CONF_NAME"
|
||||
$ECHO "* Debug level: $DEBUG_LEVEL"
|
||||
$ECHO "* HS debug level: $HOTSPOT_DEBUG_LEVEL"
|
||||
$ECHO "* JVM variants: $JVM_VARIANTS"
|
||||
$PRINTF "* JVM features: "
|
||||
|
||||
for variant in $JVM_VARIANTS; do
|
||||
features_var_name=JVM_FEATURES_$variant
|
||||
JVM_FEATURES_FOR_VARIANT=${!features_var_name}
|
||||
printf "$variant: \'$JVM_FEATURES_FOR_VARIANT\' "
|
||||
$PRINTF "%s: \'%s\' " "$variant" "$JVM_FEATURES_FOR_VARIANT"
|
||||
done
|
||||
printf "\n"
|
||||
$ECHO ""
|
||||
|
||||
printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
|
||||
printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
|
||||
$ECHO "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS"
|
||||
$ECHO "* Version string: $VERSION_STRING ($VERSION_SHORT)"
|
||||
|
||||
if test "x$SOURCE_DATE" != xupdated; then
|
||||
source_date_info="$SOURCE_DATE ($SOURCE_DATE_ISO_8601)"
|
||||
else
|
||||
source_date_info="Determined at build time"
|
||||
fi
|
||||
printf "* Source date: $source_date_info\n"
|
||||
$ECHO "* Source date: $source_date_info"
|
||||
|
||||
printf "\n"
|
||||
printf "Tools summary:\n"
|
||||
$ECHO ""
|
||||
$ECHO "Tools summary:"
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
printf "* Environment: %s version %s; windows version %s; prefix \"%s\"; root \"%s\"\n" \
|
||||
"$WINENV_VENDOR" "$WINENV_VERSION" "$WINDOWS_VERSION" "$WINENV_PREFIX" "$WINENV_ROOT"
|
||||
$ECHO "* Environment: $WINENV_VENDOR version $WINENV_VERSION; windows version $WINDOWS_VERSION; prefix \"$WINENV_PREFIX\"; root \"$WINENV_ROOT\""
|
||||
fi
|
||||
printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
|
||||
printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
|
||||
$ECHO "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)"
|
||||
$ECHO "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)"
|
||||
if test "x$DEVKIT_NAME" != x; then
|
||||
printf "* Devkit: $DEVKIT_NAME ($DEVKIT_ROOT)\n"
|
||||
$ECHO "* Devkit: $DEVKIT_NAME ($DEVKIT_ROOT)"
|
||||
elif test "x$DEVKIT_ROOT" != x; then
|
||||
printf "* Devkit: $DEVKIT_ROOT\n"
|
||||
$ECHO "* Devkit: $DEVKIT_ROOT"
|
||||
elif test "x$SYSROOT" != x; then
|
||||
printf "* Sysroot: $SYSROOT\n"
|
||||
$ECHO "* Sysroot: $SYSROOT"
|
||||
fi
|
||||
printf "* C Compiler: Version $CC_VERSION_NUMBER (at ${CC#"$FIXPATH "})\n"
|
||||
printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at ${CXX#"$FIXPATH "})\n"
|
||||
$ECHO "* C Compiler: Version $CC_VERSION_NUMBER (at ${CC#"$FIXPATH "})"
|
||||
$ECHO "* C++ Compiler: Version $CXX_VERSION_NUMBER (at ${CXX#"$FIXPATH "})"
|
||||
|
||||
printf "\n"
|
||||
printf "Build performance summary:\n"
|
||||
printf "* Build jobs: $JOBS\n"
|
||||
printf "* Memory limit: $MEMORY_SIZE MB\n"
|
||||
$ECHO ""
|
||||
$ECHO "Build performance summary:"
|
||||
$ECHO "* Build jobs: $JOBS"
|
||||
$ECHO "* Memory limit: $MEMORY_SIZE MB"
|
||||
if test "x$CCACHE_STATUS" != "x"; then
|
||||
printf "* ccache status: $CCACHE_STATUS\n"
|
||||
$ECHO "* ccache status: $CCACHE_STATUS"
|
||||
fi
|
||||
printf "\n"
|
||||
$ECHO ""
|
||||
|
||||
if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
|
||||
printf "NOTE: You have requested to build more than one version of the JVM, which\n"
|
||||
printf "will result in longer build times.\n"
|
||||
printf "\n"
|
||||
$ECHO "NOTE: You have requested to build more than one version of the JVM, which"
|
||||
$ECHO "will result in longer build times."
|
||||
$ECHO ""
|
||||
fi
|
||||
|
||||
if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
|
||||
printf "WARNING: Your build output directory is not on a local disk.\n"
|
||||
printf "This will severely degrade build performance!\n"
|
||||
printf "It is recommended that you create an output directory on a local disk,\n"
|
||||
printf "and run the configure script again from that directory.\n"
|
||||
printf "\n"
|
||||
$ECHO "WARNING: Your build output directory is not on a local disk."
|
||||
$ECHO "This will severely degrade build performance!"
|
||||
$ECHO "It is recommended that you create an output directory on a local disk,"
|
||||
$ECHO "and run the configure script again from that directory."
|
||||
$ECHO ""
|
||||
fi
|
||||
|
||||
if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
|
||||
printf "WARNING: The result of this configuration has overridden an older\n"
|
||||
printf "configuration. You *should* run 'make clean' to make sure you get a\n"
|
||||
printf "proper build. Failure to do so might result in strange build problems.\n"
|
||||
printf "\n"
|
||||
$ECHO "WARNING: The result of this configuration has overridden an older"
|
||||
$ECHO "configuration. You *should* run 'make clean' to make sure you get a"
|
||||
$ECHO "proper build. Failure to do so might result in strange build problems."
|
||||
$ECHO ""
|
||||
fi
|
||||
|
||||
if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
|
||||
printf "WARNING: The result of this configuration was not saved.\n"
|
||||
printf "You should run without '--no-create | -n' to create the configuration.\n"
|
||||
printf "\n"
|
||||
$ECHO "WARNING: The result of this configuration was not saved."
|
||||
$ECHO "You should run without '--no-create | -n' to create the configuration."
|
||||
$ECHO ""
|
||||
fi
|
||||
|
||||
if test "x$UNSUPPORTED_TOOLCHAIN_VERSION" = "xyes"; then
|
||||
printf "WARNING: The toolchain version used is known to have issues. Please\n"
|
||||
printf "consider using a supported version unless you know what you are doing.\n"
|
||||
printf "\n"
|
||||
$ECHO "WARNING: The toolchain version used is known to have issues. Please"
|
||||
$ECHO "consider using a supported version unless you know what you are doing."
|
||||
$ECHO ""
|
||||
fi
|
||||
])
|
||||
|
||||
@ -381,10 +383,10 @@ AC_DEFUN_ONCE([HELP_REPEAT_WARNINGS],
|
||||
if test -e "$CONFIG_LOG_PATH/config.log"; then
|
||||
$GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
|
||||
if test $? -eq 0; then
|
||||
printf "The following warnings were produced. Repeated here for convenience:\n"
|
||||
$ECHO "The following warnings were produced. Repeated here for convenience:"
|
||||
# We must quote sed expression (using []) to stop m4 from eating the [].
|
||||
$GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e [ 's/^configure:[0-9]*: //' ]
|
||||
printf "\n"
|
||||
$ECHO ""
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
@ -405,10 +405,19 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_CODE_COVERAGE],
|
||||
JCOV_FILTERS="$with_jcov_filters"
|
||||
fi
|
||||
fi
|
||||
|
||||
UTIL_ARG_WITH(NAME: jcov-modules, TYPE: string,
|
||||
DEFAULT: [], RESULT: JCOV_MODULES_COMMMA_SEPARATED,
|
||||
DESC: [which modules to include in jcov (comma-separated)],
|
||||
OPTIONAL: true)
|
||||
|
||||
# Replace "," with " ".
|
||||
JCOV_MODULES=${JCOV_MODULES_COMMMA_SEPARATED//,/ }
|
||||
AC_SUBST(JCOV_ENABLED)
|
||||
AC_SUBST(JCOV_HOME)
|
||||
AC_SUBST(JCOV_INPUT_JDK)
|
||||
AC_SUBST(JCOV_FILTERS)
|
||||
AC_SUBST(JCOV_MODULES)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
@ -520,8 +529,21 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER],
|
||||
# Silence them for now.
|
||||
UBSAN_CHECKS="-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-sanitize=shift-base -fno-sanitize=alignment \
|
||||
$ADDITIONAL_UBSAN_CHECKS"
|
||||
UBSAN_CFLAGS="$UBSAN_CHECKS -Wno-stringop-truncation -Wno-format-overflow -Wno-array-bounds -Wno-stringop-overflow -fno-omit-frame-pointer -DUNDEFINED_BEHAVIOR_SANITIZER"
|
||||
UBSAN_CFLAGS="$UBSAN_CHECKS -Wno-array-bounds -fno-omit-frame-pointer -DUNDEFINED_BEHAVIOR_SANITIZER"
|
||||
if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
|
||||
UBSAN_CFLAGS="$UBSAN_CFLAGS -Wno-format-overflow -Wno-stringop-overflow -Wno-stringop-truncation"
|
||||
fi
|
||||
UBSAN_LDFLAGS="$UBSAN_CHECKS"
|
||||
# On AIX, the llvm_symbolizer is not found out of the box, so we have to provide the
|
||||
# full qualified llvm_symbolizer path in the __ubsan_default_options() function in
|
||||
# make/data/ubsan/ubsan_default_options.c. To get it there we compile our sources
|
||||
# with an additional define LLVM_SYMBOLIZER, which we set here.
|
||||
# To calculate the correct llvm_symbolizer path we can use the location of the compiler, because
|
||||
# their relation is fixed.
|
||||
if test "x$TOOLCHAIN_TYPE" = "xclang" && test "x$OPENJDK_TARGET_OS" = "xaix"; then
|
||||
UBSAN_CFLAGS="$UBSAN_CFLAGS -fno-sanitize=function,vptr -DLLVM_SYMBOLIZER=$(dirname $(dirname $CC))/tools/ibm-llvm-symbolizer"
|
||||
UBSAN_LDFLAGS="$UBSAN_LDFLAGS -fno-sanitize=function,vptr -Wl,-bbigtoc"
|
||||
fi
|
||||
UTIL_ARG_ENABLE(NAME: ubsan, DEFAULT: false, RESULT: UBSAN_ENABLED,
|
||||
DESC: [enable UndefinedBehaviorSanitizer],
|
||||
CHECK_AVAILABLE: [
|
||||
@ -988,6 +1010,18 @@ AC_DEFUN([JDKOPT_SETUP_SIGNING_HOOK],
|
||||
AC_SUBST(SIGNING_HOOK)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Setup how javac should handle warnings.
|
||||
#
|
||||
AC_DEFUN([JDKOPT_SETUP_JAVA_WARNINGS],
|
||||
[
|
||||
UTIL_ARG_ENABLE(NAME: java-warnings-as-errors, DEFAULT: true,
|
||||
RESULT: JAVA_WARNINGS_AS_ERRORS,
|
||||
DESC: [consider java warnings to be an error])
|
||||
AC_SUBST(JAVA_WARNINGS_AS_ERRORS)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# fallback linker
|
||||
|
||||
@ -62,19 +62,29 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBJPEG],
|
||||
|
||||
if test "x${with_libjpeg}" = "xbundled"; then
|
||||
USE_EXTERNAL_LIBJPEG=false
|
||||
LIBJPEG_CFLAGS=""
|
||||
LIBJPEG_LIBS=""
|
||||
elif test "x${with_libjpeg}" = "xsystem"; then
|
||||
AC_CHECK_HEADER(jpeglib.h, [],
|
||||
[ AC_MSG_ERROR([--with-libjpeg=system specified, but jpeglib.h not found!])])
|
||||
AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, [],
|
||||
[ AC_MSG_ERROR([--with-libjpeg=system specified, but no libjpeg found])])
|
||||
PKG_CHECK_MODULES(LIBJPEG, libjpeg, [LIBJPEG_FOUND=yes], [LIBJPEG_FOUND=no])
|
||||
if test "x${LIBJPEG_FOUND}" = "xyes"; then
|
||||
# PKG_CHECK_MODULES will set LIBJPEG_CFLAGS and LIBJPEG_LIBS
|
||||
USE_EXTERNAL_LIBJPEG=true
|
||||
else
|
||||
AC_CHECK_HEADER(jpeglib.h, [],
|
||||
[ AC_MSG_ERROR([--with-libjpeg=system specified, but jpeglib.h not found!])])
|
||||
AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, [],
|
||||
[ AC_MSG_ERROR([--with-libjpeg=system specified, but no libjpeg found])])
|
||||
|
||||
USE_EXTERNAL_LIBJPEG=true
|
||||
LIBJPEG_LIBS="-ljpeg"
|
||||
USE_EXTERNAL_LIBJPEG=true
|
||||
LIBJPEG_CFLAGS=""
|
||||
LIBJPEG_LIBS="-ljpeg"
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'])
|
||||
fi
|
||||
|
||||
AC_SUBST(USE_EXTERNAL_LIBJPEG)
|
||||
AC_SUBST(LIBJPEG_CFLAGS)
|
||||
AC_SUBST(LIBJPEG_LIBS)
|
||||
])
|
||||
|
||||
@ -85,6 +95,10 @@ AC_DEFUN_ONCE([LIB_SETUP_GIFLIB],
|
||||
[
|
||||
AC_ARG_WITH(giflib, [AS_HELP_STRING([--with-giflib],
|
||||
[use giflib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
|
||||
AC_ARG_WITH(giflib-include, [AS_HELP_STRING([--with-giflib-include],
|
||||
[specify directory for the system giflib include files])])
|
||||
AC_ARG_WITH(giflib-lib, [AS_HELP_STRING([--with-giflib-lib],
|
||||
[specify directory for the system giflib library])])
|
||||
|
||||
AC_MSG_CHECKING([for which giflib to use])
|
||||
# default is bundled
|
||||
@ -97,11 +111,40 @@ AC_DEFUN_ONCE([LIB_SETUP_GIFLIB],
|
||||
|
||||
if test "x${with_giflib}" = "xbundled"; then
|
||||
USE_EXTERNAL_LIBGIF=false
|
||||
GIFLIB_CFLAGS=""
|
||||
GIFLIB_LIBS=""
|
||||
elif test "x${with_giflib}" = "xsystem"; then
|
||||
AC_CHECK_HEADER(gif_lib.h, [],
|
||||
[ AC_MSG_ERROR([--with-giflib=system specified, but gif_lib.h not found!])])
|
||||
AC_CHECK_LIB(gif, DGifGetCode, [],
|
||||
[ AC_MSG_ERROR([--with-giflib=system specified, but no giflib found!])])
|
||||
GIFLIB_H_FOUND=no
|
||||
if test "x${with_giflib_include}" != x; then
|
||||
GIFLIB_CFLAGS="-I${with_giflib_include}"
|
||||
GIFLIB_H_FOUND=yes
|
||||
fi
|
||||
if test "x$GIFLIB_H_FOUND" = xno; then
|
||||
AC_CHECK_HEADER(gif_lib.h,
|
||||
[
|
||||
GIFLIB_CFLAGS=""
|
||||
GIFLIB_H_FOUND=yes
|
||||
])
|
||||
fi
|
||||
if test "x$GIFLIB_H_FOUND" = xno; then
|
||||
AC_MSG_ERROR([--with-giflib=system specified, but gif_lib.h not found!])
|
||||
fi
|
||||
|
||||
GIFLIB_LIB_FOUND=no
|
||||
if test "x${with_giflib_lib}" != x; then
|
||||
GIFLIB_LIBS="-L${with_giflib_lib} -lgif"
|
||||
GIFLIB_LIB_FOUND=yes
|
||||
fi
|
||||
if test "x$GIFLIB_LIB_FOUND" = xno; then
|
||||
AC_CHECK_LIB(gif, DGifGetCode,
|
||||
[
|
||||
GIFLIB_LIBS="-lgif"
|
||||
GIFLIB_LIB_FOUND=yes
|
||||
])
|
||||
fi
|
||||
if test "x$GIFLIB_LIB_FOUND" = xno; then
|
||||
AC_MSG_ERROR([--with-giflib=system specified, but no giflib found!])
|
||||
fi
|
||||
|
||||
USE_EXTERNAL_LIBGIF=true
|
||||
GIFLIB_LIBS=-lgif
|
||||
@ -110,6 +153,7 @@ AC_DEFUN_ONCE([LIB_SETUP_GIFLIB],
|
||||
fi
|
||||
|
||||
AC_SUBST(USE_EXTERNAL_LIBGIF)
|
||||
AC_SUBST(GIFLIB_CFLAGS)
|
||||
AC_SUBST(GIFLIB_LIBS)
|
||||
])
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -98,13 +98,7 @@ AC_DEFUN([LIB_SETUP_JVM_LIBS],
|
||||
# 32-bit platforms needs fallback library for 8-byte atomic ops on Zero
|
||||
if HOTSPOT_CHECK_JVM_VARIANT(zero); then
|
||||
if test "x$OPENJDK_$1_OS" = xlinux &&
|
||||
(test "x$OPENJDK_$1_CPU" = xarm ||
|
||||
test "x$OPENJDK_$1_CPU" = xm68k ||
|
||||
test "x$OPENJDK_$1_CPU" = xmips ||
|
||||
test "x$OPENJDK_$1_CPU" = xmipsel ||
|
||||
test "x$OPENJDK_$1_CPU" = xppc ||
|
||||
test "x$OPENJDK_$1_CPU" = xsh ||
|
||||
test "x$OPENJDK_$1_CPU" = xriscv32); then
|
||||
test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
|
||||
BASIC_JVM_LIBS_$1="$BASIC_JVM_LIBS_$1 -latomic"
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -454,6 +454,7 @@ JCOV_ENABLED := @JCOV_ENABLED@
|
||||
JCOV_HOME := @JCOV_HOME@
|
||||
JCOV_INPUT_JDK := @JCOV_INPUT_JDK@
|
||||
JCOV_FILTERS := @JCOV_FILTERS@
|
||||
JCOV_MODULES := @JCOV_MODULES@
|
||||
|
||||
# AddressSanitizer
|
||||
ASAN_ENABLED := @ASAN_ENABLED@
|
||||
@ -517,6 +518,7 @@ DISABLED_WARNINGS_CXX := @DISABLED_WARNINGS_CXX@
|
||||
|
||||
# A global flag (true or false) determining if native warnings are considered errors.
|
||||
WARNINGS_AS_ERRORS := @WARNINGS_AS_ERRORS@
|
||||
JAVA_WARNINGS_AS_ERRORS := @JAVA_WARNINGS_AS_ERRORS@
|
||||
|
||||
CFLAGS_CCACHE := @CFLAGS_CCACHE@
|
||||
ADLC_LANGSTD_CXXFLAGS := @ADLC_LANGSTD_CXXFLAGS@
|
||||
@ -800,8 +802,10 @@ TAR_SUPPORTS_TRANSFORM := @TAR_SUPPORTS_TRANSFORM@
|
||||
|
||||
# Build setup
|
||||
USE_EXTERNAL_LIBJPEG := @USE_EXTERNAL_LIBJPEG@
|
||||
LIBJPEG_CFLAGS := @LIBJPEG_CFLAGS@
|
||||
LIBJPEG_LIBS := @LIBJPEG_LIBS@
|
||||
USE_EXTERNAL_LIBGIF := @USE_EXTERNAL_LIBGIF@
|
||||
GIFLIB_CFLAGS := @GIFLIB_CFLAGS@
|
||||
GIFLIB_LIBS := @GIFLIB_LIBS@
|
||||
USE_EXTERNAL_LIBZ := @USE_EXTERNAL_LIBZ@
|
||||
LIBZ_CFLAGS := @LIBZ_CFLAGS@
|
||||
@ -843,10 +847,12 @@ SVE_CFLAGS := @SVE_CFLAGS@
|
||||
JDK_IMAGE_SUBDIR := jdk
|
||||
JRE_IMAGE_SUBDIR := jre
|
||||
JCOV_IMAGE_SUBDIR := jdk-jcov
|
||||
STATIC_JDK_IMAGE_SUBDIR := static-jdk
|
||||
|
||||
# Colon left out to be able to override output dir for bootcycle-images
|
||||
JDK_IMAGE_DIR = $(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR)
|
||||
JRE_IMAGE_DIR = $(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR)
|
||||
STATIC_JDK_IMAGE_DIR = $(IMAGES_OUTPUTDIR)/$(STATIC_JDK_IMAGE_SUBDIR)
|
||||
JCOV_IMAGE_DIR = $(IMAGES_OUTPUTDIR)/$(JCOV_IMAGE_SUBDIR)
|
||||
|
||||
# Test image, as above
|
||||
@ -926,6 +932,7 @@ DOCS_JAVASE_BUNDLE_NAME := javase-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
|
||||
DOCS_REFERENCE_BUNDLE_NAME := jdk-reference-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
|
||||
STATIC_LIBS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-static-libs$(DEBUG_PART).tar.gz
|
||||
STATIC_LIBS_GRAAL_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-static-libs-graal$(DEBUG_PART).tar.gz
|
||||
STATIC_JDK_BUNDLE_NAME := static-jdk-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
|
||||
JCOV_BUNDLE_NAME := jdk-jcov-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
|
||||
|
||||
JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_BUNDLE_NAME)
|
||||
@ -936,6 +943,7 @@ TEST_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(TEST_BUNDLE_NAME)
|
||||
DOCS_JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DOCS_JDK_BUNDLE_NAME)
|
||||
DOCS_JAVASE_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DOCS_JAVASE_BUNDLE_NAME)
|
||||
DOCS_REFERENCE_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DOCS_REFERENCE_BUNDLE_NAME)
|
||||
STATIC_JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(STATIC_JDK_BUNDLE_NAME)
|
||||
JCOV_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JCOV_BUNDLE_NAME)
|
||||
|
||||
# This macro is called to allow inclusion of closed source counterparts.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -58,21 +58,32 @@ AC_DEFUN([UTIL_PREPEND_TO_PATH],
|
||||
# 2) The path will be absolute, and it will be in unix-style (on
|
||||
# cygwin).
|
||||
# $1: The name of the variable to fix
|
||||
# $2: if NOFAIL, errors will be silently ignored
|
||||
# $2: if NOFAIL, if the path cannot be resolved then errors will not be
|
||||
# reported and an empty path will be set
|
||||
AC_DEFUN([UTIL_FIXUP_PATH],
|
||||
[
|
||||
# Only process if variable expands to non-empty
|
||||
path="[$]$1"
|
||||
if test "x$path" != x; then
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
if test "x$2" = "xNOFAIL"; then
|
||||
quiet_option="-q"
|
||||
imported_path=`$FIXPATH_BASE -q import "$path"`
|
||||
if test $? -ne 0 || test ! -e $imported_path; then
|
||||
if test "x$2" != "xNOFAIL"; then
|
||||
AC_MSG_NOTICE([The path of $1, which is given as "$path", can not be properly resolved.])
|
||||
AC_MSG_NOTICE([Please see the section "Special Considerations" in building.md.])
|
||||
AC_MSG_NOTICE([This is the error message given by fixpath:])
|
||||
# Rerun fixpath without -q to get an error message
|
||||
$FIXPATH_BASE import "$path"
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
else
|
||||
imported_path=""
|
||||
fi
|
||||
fi
|
||||
imported_path=`$FIXPATH_BASE $quiet_option import "$path"`
|
||||
$FIXPATH_BASE verify "$imported_path"
|
||||
|
||||
$FIXPATH_BASE -q verify "$imported_path"
|
||||
if test $? -ne 0; then
|
||||
if test "x$2" != "xNOFAIL"; then
|
||||
AC_MSG_ERROR([The path of $1, which resolves as "$path", could not be imported.])
|
||||
AC_MSG_ERROR([The path of $1, which resolves as "$path", could not be verified.])
|
||||
else
|
||||
imported_path=""
|
||||
fi
|
||||
@ -83,7 +94,7 @@ AC_DEFUN([UTIL_FIXUP_PATH],
|
||||
if test "x$imported_path_lower" != "x$orig_path_lower"; then
|
||||
$1="$imported_path"
|
||||
fi
|
||||
else
|
||||
else # non-Windows
|
||||
[ if [[ "$path" =~ " " ]]; then ]
|
||||
if test "x$2" != "xNOFAIL"; then
|
||||
AC_MSG_NOTICE([The path of $1, which resolves as "$path", is invalid.])
|
||||
@ -186,7 +197,6 @@ AC_DEFUN([UTIL_CHECK_WINENV_EXEC_TYPE],
|
||||
# it need to be in the PATH.
|
||||
# $1: The name of the variable to fix
|
||||
# $2: Where to look for the command (replaces $PATH)
|
||||
# $3: set to NOFIXPATH to skip prefixing FIXPATH, even if needed on platform
|
||||
AC_DEFUN([UTIL_FIXUP_EXECUTABLE],
|
||||
[
|
||||
input="[$]$1"
|
||||
@ -233,15 +243,19 @@ AC_DEFUN([UTIL_FIXUP_EXECUTABLE],
|
||||
# This is a path with slashes, don't look at $PATH
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
# fixpath.sh import will do all heavy lifting for us
|
||||
new_path=`$FIXPATH_BASE import "$path"`
|
||||
new_path=`$FIXPATH_BASE -q import "$path"`
|
||||
|
||||
if test ! -e $new_path; then
|
||||
if test $? -ne 0 || test ! -e $new_path; then
|
||||
# It failed, but maybe spaces were part of the path and not separating
|
||||
# the command and argument. Retry using that assumption.
|
||||
new_path=`$FIXPATH_BASE import "$input"`
|
||||
if test ! -e $new_path; then
|
||||
AC_MSG_NOTICE([The command for $1, which resolves as "$input", can not be found.])
|
||||
AC_MSG_ERROR([Cannot locate $input])
|
||||
new_path=`$FIXPATH_BASE -q import "$input"`
|
||||
if test $? -ne 0 || test ! -e $new_path; then
|
||||
AC_MSG_NOTICE([The command for $1, which is given as "$input", can not be properly resolved.])
|
||||
AC_MSG_NOTICE([Please see the section "Special Considerations" in building.md.])
|
||||
AC_MSG_NOTICE([This is the error message given by fixpath:])
|
||||
# Rerun fixpath without -q to get an error message
|
||||
$FIXPATH_BASE import "$input"
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
# It worked, clear all "arguments"
|
||||
arguments=""
|
||||
@ -282,10 +296,6 @@ AC_DEFUN([UTIL_FIXUP_EXECUTABLE],
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$3" = xNOFIXPATH; then
|
||||
fixpath_prefix=""
|
||||
fi
|
||||
|
||||
# Now join together the path and the arguments once again
|
||||
new_complete="$fixpath_prefix$new_path$arguments"
|
||||
$1="$new_complete"
|
||||
@ -353,7 +363,15 @@ AC_DEFUN([UTIL_SETUP_TOOL],
|
||||
else
|
||||
# Otherwise we believe it is a complete path. Use it as it is.
|
||||
if test ! -x "$tool_command" && test ! -x "${tool_command}.exe"; then
|
||||
AC_MSG_ERROR([User supplied tool $1="$tool_command" does not exist or is not executable])
|
||||
# Maybe the path had spaces in it; try again with the entire argument
|
||||
if test ! -x "$tool_override" && test ! -x "${tool_override}.exe"; then
|
||||
AC_MSG_ERROR([User supplied tool $1="$tool_override" does not exist or is not executable])
|
||||
else
|
||||
# We successfully located the executable assuming the spaces were part of the path.
|
||||
# We can't combine using paths with spaces and arguments, so assume tool_args is empty.
|
||||
tool_command="$tool_override"
|
||||
tool_args=""
|
||||
fi
|
||||
fi
|
||||
if test ! -x "$tool_command"; then
|
||||
tool_command="${tool_command}.exe"
|
||||
@ -379,7 +397,6 @@ AC_DEFUN([UTIL_SETUP_TOOL],
|
||||
# $1: variable to set
|
||||
# $2: executable name (or list of names) to look for
|
||||
# $3: [path]
|
||||
# $4: set to NOFIXPATH to skip prefixing FIXPATH, even if needed on platform
|
||||
AC_DEFUN([UTIL_LOOKUP_PROGS],
|
||||
[
|
||||
UTIL_SETUP_TOOL($1, [
|
||||
@ -421,10 +438,8 @@ AC_DEFUN([UTIL_LOOKUP_PROGS],
|
||||
|
||||
# If we have FIXPATH enabled, strip all instances of it and prepend
|
||||
# a single one, to avoid double fixpath prefixing.
|
||||
if test "x$4" != xNOFIXPATH; then
|
||||
[ if [[ $FIXPATH != "" && $result =~ ^"$FIXPATH " ]]; then ]
|
||||
result="\$FIXPATH ${result#"$FIXPATH "}"
|
||||
fi
|
||||
[ if [[ $FIXPATH != "" && $result =~ ^"$FIXPATH " ]]; then ]
|
||||
result="\$FIXPATH ${result#"$FIXPATH "}"
|
||||
fi
|
||||
AC_MSG_RESULT([$result])
|
||||
break 2;
|
||||
@ -515,6 +530,24 @@ AC_DEFUN([UTIL_ADD_FIXPATH],
|
||||
fi
|
||||
])
|
||||
|
||||
################################################################################
|
||||
# Return a path to the executable binary from a command line, stripping away
|
||||
# any FIXPATH prefix or arguments. The resulting value can be checked for
|
||||
# existence using "test -e". The result is returned in a variable named
|
||||
# "$1_EXECUTABLE".
|
||||
#
|
||||
# $1: variable describing the command to get the binary for
|
||||
AC_DEFUN([UTIL_GET_EXECUTABLE],
|
||||
[
|
||||
# Strip the FIXPATH prefix, if any
|
||||
fixpath_stripped="[$]$1"
|
||||
[ if [[ $FIXPATH != "" && $fixpath_stripped =~ ^"$FIXPATH " ]]; then ]
|
||||
fixpath_stripped="${fixpath_stripped#"$FIXPATH "}"
|
||||
fi
|
||||
# Remove any arguments following the binary
|
||||
$1_EXECUTABLE="${fixpath_stripped%% *}"
|
||||
])
|
||||
|
||||
################################################################################
|
||||
AC_DEFUN([UTIL_REMOVE_SYMBOLIC_LINKS],
|
||||
[
|
||||
|
||||
@ -58,13 +58,15 @@ ifeq ($(GENERATE_FIND_TESTS_FILE), true)
|
||||
$(TOPDIR)/test/make/TestMake.gmk
|
||||
$(call MakeTargetDir)
|
||||
( $(foreach root, $(JTREG_TESTROOTS), \
|
||||
$(PRINTF) "\n$(root)_JTREG_TEST_GROUPS := " ; \
|
||||
$(ECHO) ""; \
|
||||
$(PRINTF) "\n%s_JTREG_TEST_GROUPS := " "$(root)"; \
|
||||
$(SED) -n -e 's/^\#.*//g' -e 's/\([^ ]*\)\w*=.*/\1/gp' \
|
||||
$($(root)_JTREG_GROUP_FILES) \
|
||||
| $(SORT) -u | $(TR) '\n' ' ' ; \
|
||||
) \
|
||||
) > $@
|
||||
$(PRINTF) "\nMAKE_TEST_TARGETS := " >> $@
|
||||
$(ECHO) "" >> $@
|
||||
$(PRINTF) "MAKE_TEST_TARGETS := " >> $@
|
||||
$(MAKE) -s --no-print-directory $(MAKE_ARGS) \
|
||||
SPEC=$(SPEC) -f $(TOPDIR)/test/make/TestMake.gmk print-targets \
|
||||
TARGETS_FILE=$@
|
||||
|
||||
@ -256,7 +256,7 @@ define SetupJarArchiveBody
|
||||
$$(if $$($1_JARMAIN), \
|
||||
$(ECHO) "Main-Class: $$(strip $$($1_JARMAIN))" >> $$($1_MANIFEST_FILE) $$(NEWLINE)) \
|
||||
$$(if $$($1_EXTRA_MANIFEST_ATTR), \
|
||||
$(PRINTF) "$$($1_EXTRA_MANIFEST_ATTR)\n" >> $$($1_MANIFEST_FILE) $$(NEWLINE)) \
|
||||
$(ECHO) "$$($1_EXTRA_MANIFEST_ATTR)" >> $$($1_MANIFEST_FILE) $$(NEWLINE)) \
|
||||
$(ECHO) Creating $$($1_NAME) $$(NEWLINE) \
|
||||
$$($1_JAR_CMD) --create $$($1_JAR_OPTIONS) --file $$@ --manifest $$($1_MANIFEST_FILE) $$(NEWLINE) \
|
||||
$$($1_SCAPTURE_CONTENTS) \
|
||||
|
||||
@ -80,15 +80,13 @@ endef
|
||||
#
|
||||
# The sed expression does this:
|
||||
# 1. Add a backslash before any :, = or ! that do not have a backslash already.
|
||||
# 2. Apply the file unicode2x.sed which does a whole bunch of \u00XX to \xXX
|
||||
# conversions.
|
||||
# 3. Delete all lines starting with #.
|
||||
# 4. Delete empty lines.
|
||||
# 5. Append lines ending with \ with the next line.
|
||||
# 6. Remove leading and trailing white space. Note that tabs must be explicit
|
||||
# 2. Delete all lines starting with #.
|
||||
# 3. Delete empty lines.
|
||||
# 4. Append lines ending with \ with the next line.
|
||||
# 5. Remove leading and trailing white space. Note that tabs must be explicit
|
||||
# as sed on macosx does not understand '\t'.
|
||||
# 7. Replace the first \= with just =.
|
||||
# 8. Finally it's all sorted to create a stable output.
|
||||
# 6. Replace the first \= with just =.
|
||||
# 7. Finally it's all sorted to create a stable output.
|
||||
#
|
||||
# It is assumed that = is the character used for separating names and values.
|
||||
define add_file_to_clean
|
||||
@ -108,7 +106,6 @@ define add_file_to_clean
|
||||
( $(CAT) $$< && $(ECHO) "" ) \
|
||||
| $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' \
|
||||
-e 's/\([^\\]\)!/\1\\!/g' -e 's/^[ ]*#.*/#/g' \
|
||||
| $(SED) -f "$$(TOPDIR)/make/common/support/unicode2x.sed" \
|
||||
| $(SED) -e '/^#/d' -e '/^$$$$/d' \
|
||||
-e :a -e '/\\$$$$/N; s/\\\n//; ta' \
|
||||
-e 's/^[ ]*//;s/[ ]*$$$$//' \
|
||||
@ -155,6 +152,7 @@ endef
|
||||
# INCLUDE_FILES "com/sun/SolarisFoobar.java" means only compile this file!
|
||||
# EXCLUDE_FILES "com/sun/SolarisFoobar.java" means do not compile this particular file!
|
||||
# "SolarisFoobar.java" means do not compile SolarisFoobar, wherever it is found.
|
||||
# EXCLUDE_PATTERNS Exclude files matching any of these substrings
|
||||
# EXTRA_FILES List of extra source files to include in compilation. Can be used to
|
||||
# specify files that need to be generated by other rules first.
|
||||
# HEADERS path to directory where all generated c-headers are written.
|
||||
@ -264,14 +262,17 @@ define SetupJavaCompilationBody
|
||||
$$(error Invalid value for COMPILER in SetupJavaCompilation for $1: '$$($1_COMPILER)')
|
||||
endif
|
||||
|
||||
# Allow overriding on the command line
|
||||
JAVA_WARNINGS_ARE_ERRORS ?= -Werror
|
||||
|
||||
# Tell javac to do exactly as told and no more
|
||||
PARANOIA_FLAGS := -implicit:none -Xprefer:source -XDignore.symbol.file=true -encoding ascii
|
||||
PARANOIA_FLAGS := -implicit:none -Xprefer:source -XDignore.symbol.file=true
|
||||
|
||||
$1_FLAGS += -g -Xlint:all $$($1_TARGET_RELEASE) $$(PARANOIA_FLAGS) $$(JAVA_WARNINGS_ARE_ERRORS)
|
||||
$1_FLAGS += -g -Xlint:all $$($1_TARGET_RELEASE) $$(PARANOIA_FLAGS)
|
||||
$1_FLAGS += $$($1_JAVAC_FLAGS)
|
||||
# Set character encoding in source
|
||||
$1_FLAGS += -encoding utf-8
|
||||
|
||||
ifeq ($$(JAVA_WARNINGS_AS_ERRORS), true)
|
||||
$1_FLAGS += -Werror
|
||||
endif
|
||||
|
||||
ifneq ($$($1_DISABLED_WARNINGS), )
|
||||
$1_FLAGS += -Xlint:$$(call CommaList, $$(addprefix -, $$($1_DISABLED_WARNINGS)))
|
||||
@ -332,6 +333,20 @@ define SetupJavaCompilationBody
|
||||
$1_INCLUDE_PATTERN += $$(foreach i, $$($1_SRC), $$(addprefix $$i/, $$(addsuffix /%, $$($1_INCLUDES))))
|
||||
endif
|
||||
|
||||
ifneq ($$($1_EXCLUDE_PATTERNS), )
|
||||
# We must not match the exclude pattern against the src roots, so first
|
||||
# strip the src prefixes from the absolute file paths in SRCS.
|
||||
$1_SRCS_WITHOUT_ROOTS := $$(foreach i, $$($1_SRC), \
|
||||
$$(patsubst $$i/%,%, $$(filter $$i/%, $$($1_SRCS))))
|
||||
$1_EXCLUDE_PATTERNS_WITHOUT_ROOTS := $$(call containing, \
|
||||
$$($1_EXCLUDE_PATTERNS), $$($1_SRCS_WITHOUT_ROOTS))
|
||||
# The add back all possible src prefixes; this will generate more paths
|
||||
# than really exists, but it does not matter since we will use this as
|
||||
# input to filter-out.
|
||||
$1_EXCLUDE_PATTERN += $$(foreach i, $$($1_SRC), $$(addprefix $$i/, \
|
||||
$$($1_EXCLUDE_PATTERNS_WITHOUT_ROOTS)))
|
||||
endif
|
||||
|
||||
# Apply include/exclude patterns to java sources
|
||||
ifneq ($$($1_EXCLUDE_PATTERN), )
|
||||
$1_SRCS := $$(filter-out $$($1_EXCLUDE_PATTERN), $$($1_SRCS))
|
||||
|
||||
@ -227,6 +227,8 @@ endef
|
||||
|
||||
GLOBAL_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/common/version.rc
|
||||
|
||||
# \xA9 is the copyright symbol in ANSI encoding (Windows-1252), which rc.exe
|
||||
# assumes the resource file is in.
|
||||
JDK_RCFLAGS=$(RCFLAGS) \
|
||||
-D"JDK_VERSION_STRING=$(VERSION_STRING)" \
|
||||
-D"JDK_COMPANY=$(JDK_RC_COMPANY_NAME)" \
|
||||
|
||||
@ -47,7 +47,7 @@ endif
|
||||
# We need spec.gmk to get $(TOPDIR)
|
||||
include $(SPEC)
|
||||
|
||||
THIS_MAKEFILE := $(patsubst make/%,%,$(patsubst $(TOPDIR)/%,%,$(THIS_MAKEFILE_PATH)))
|
||||
THIS_MAKEFILE := $(patsubst make/%,%,$(patsubst $(TOPDIR_ALT)/make/%,%,$(patsubst $(TOPDIR)/%,%,$(THIS_MAKEFILE_PATH))))
|
||||
|
||||
ifeq ($(LOG_FLOW), true)
|
||||
$(info :Enter $(THIS_MAKEFILE))
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
# Get the next to last word (by prepending a padding element)
|
||||
THIS_INCLUDE_PATH := $(word $(words ${MAKEFILE_LIST}),padding ${MAKEFILE_LIST})
|
||||
THIS_INCLUDE := $(patsubst $(TOPDIR)/make/%,%,$(THIS_INCLUDE_PATH))
|
||||
THIS_INCLUDE := $(patsubst $(TOPDIR_ALT)/make/%,%,$(patsubst $(TOPDIR)/make/%,%,$(THIS_INCLUDE_PATH)))
|
||||
|
||||
# Print an indented message, also counting the top-level makefile as a level
|
||||
ifneq ($(INCLUDE_GUARD_$(THIS_INCLUDE)), true)
|
||||
|
||||
@ -180,7 +180,7 @@ ifeq ($(GENERATE_MODULE_DEPS_FILE), true)
|
||||
$(call MakeTargetDir)
|
||||
$(RM) $@
|
||||
$(foreach m, $(MODULE_INFOS), \
|
||||
( $(PRINTF) "DEPS_$(call GetModuleNameFromModuleInfo, $m) := " && \
|
||||
( $(PRINTF) "DEPS_%s := " "$(call GetModuleNameFromModuleInfo, $m)" && \
|
||||
$(AWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) ' \
|
||||
BEGIN { if (MODULE != "java.base") printf(" java.base"); } \
|
||||
/^ *requires/ { sub(/;/, ""); \
|
||||
@ -194,7 +194,7 @@ ifeq ($(GENERATE_MODULE_DEPS_FILE), true)
|
||||
gsub(/\r/, ""); \
|
||||
printf(" %s", $$0) } \
|
||||
END { printf("\n") }' $m && \
|
||||
$(PRINTF) "TRANSITIVE_MODULES_$(call GetModuleNameFromModuleInfo, $m) := " && \
|
||||
$(PRINTF) "TRANSITIVE_MODULES_%s := " "$(call GetModuleNameFromModuleInfo, $m)" && \
|
||||
$(AWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) ' \
|
||||
BEGIN { if (MODULE != "java.base") printf(" java.base"); } \
|
||||
/^ *requires *transitive/ { \
|
||||
|
||||
@ -41,8 +41,8 @@ include $(TOPDIR)/make/ToolsJdk.gmk
|
||||
define SetupVersionProperties
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/$$(strip $2):
|
||||
$$(call MakeTargetDir)
|
||||
$(PRINTF) "jdk=$(VERSION_NUMBER)\nfull=$(VERSION_STRING)\nrelease=$(VERSION_SHORT)\n" \
|
||||
> $$@
|
||||
$(PRINTF) "jdk=%s\nfull=%s\nrelease=%s\n" \
|
||||
$(VERSION_NUMBER) $(VERSION_STRING) $(VERSION_SHORT) > $$@
|
||||
|
||||
$$(strip $1) += $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/$$(strip $2)
|
||||
endef
|
||||
|
||||
@ -128,10 +128,9 @@ define SetupSourceFiles
|
||||
# Extract the C/C++ files.
|
||||
ifneq ($$($1_EXCLUDE_PATTERNS), )
|
||||
# We must not match the exclude pattern against the src root(s).
|
||||
$1_SRCS_WITHOUT_ROOTS := $$($1_SRCS)
|
||||
$$(foreach i, $$($1_SRC), $$(eval $1_SRCS_WITHOUT_ROOTS := $$(patsubst \
|
||||
$$i/%,%, $$($1_SRCS_WITHOUT_ROOTS))))
|
||||
$1_ALL_EXCLUDE_FILES := $$(call containing, $$($1_EXCLUDE_PATTERNS), \
|
||||
$1_SRCS_WITHOUT_ROOTS := $$(foreach i, $$($1_SRC), \
|
||||
$$(patsubst $$i/%,%, $$(filter $$i/%, $$($1_SRCS))))
|
||||
$1_ALL_EXCLUDE_FILES := $$(call containing, $$($1_EXCLUDE_PATTERNS), \
|
||||
$$($1_SRCS_WITHOUT_ROOTS))
|
||||
endif
|
||||
ifneq ($$($1_EXCLUDE_FILES), )
|
||||
|
||||
@ -1,100 +0,0 @@
|
||||
s/\\u0020/\x20/g
|
||||
s/\\u003A/\x3A/g
|
||||
s/\\u006B/\x6B/g
|
||||
s/\\u0075/\x75/g
|
||||
s/\\u00A0/\xA0/g
|
||||
s/\\u00A3/\xA3/g
|
||||
s/\\u00B0/\xB0/g
|
||||
s/\\u00B7/\xB7/g
|
||||
s/\\u00BA/\xBA/g
|
||||
s/\\u00BF/\xBF/g
|
||||
s/\\u00C0/\xC0/g
|
||||
s/\\u00C1/\xC1/g
|
||||
s/\\u00C2/\xC2/g
|
||||
s/\\u00C4/\xC4/g
|
||||
s/\\u00C5/\xC5/g
|
||||
s/\\u00C8/\xC8/g
|
||||
s/\\u00C9/\xC9/g
|
||||
s/\\u00CA/\xCA/g
|
||||
s/\\u00CD/\xCD/g
|
||||
s/\\u00CE/\xCE/g
|
||||
s/\\u00D3/\xD3/g
|
||||
s/\\u00D4/\xD4/g
|
||||
s/\\u00D6/\xD6/g
|
||||
s/\\u00DA/\xDA/g
|
||||
s/\\u00DC/\xDC/g
|
||||
s/\\u00DD/\xDD/g
|
||||
s/\\u00DF/\xDF/g
|
||||
s/\\u00E0/\xE0/g
|
||||
s/\\u00E1/\xE1/g
|
||||
s/\\u00E2/\xE2/g
|
||||
s/\\u00E3/\xE3/g
|
||||
s/\\u00E4/\xE4/g
|
||||
s/\\u00E5/\xE5/g
|
||||
s/\\u00E6/\xE6/g
|
||||
s/\\u00E7/\xE7/g
|
||||
s/\\u00E8/\xE8/g
|
||||
s/\\u00E9/\xE9/g
|
||||
s/\\u00EA/\xEA/g
|
||||
s/\\u00EB/\xEB/g
|
||||
s/\\u00EC/\xEC/g
|
||||
s/\\u00ED/\xED/g
|
||||
s/\\u00EE/\xEE/g
|
||||
s/\\u00EF/\xEF/g
|
||||
s/\\u00F1/\xF1/g
|
||||
s/\\u00F2/\xF2/g
|
||||
s/\\u00F3/\xF3/g
|
||||
s/\\u00F4/\xF4/g
|
||||
s/\\u00F5/\xF5/g
|
||||
s/\\u00F6/\xF6/g
|
||||
s/\\u00F9/\xF9/g
|
||||
s/\\u00FA/\xFA/g
|
||||
s/\\u00FC/\xFC/g
|
||||
s/\\u0020/\x20/g
|
||||
s/\\u003f/\x3f/g
|
||||
s/\\u006f/\x6f/g
|
||||
s/\\u0075/\x75/g
|
||||
s/\\u00a0/\xa0/g
|
||||
s/\\u00a3/\xa3/g
|
||||
s/\\u00b0/\xb0/g
|
||||
s/\\u00ba/\xba/g
|
||||
s/\\u00bf/\xbf/g
|
||||
s/\\u00c1/\xc1/g
|
||||
s/\\u00c4/\xc4/g
|
||||
s/\\u00c5/\xc5/g
|
||||
s/\\u00c8/\xc8/g
|
||||
s/\\u00c9/\xc9/g
|
||||
s/\\u00ca/\xca/g
|
||||
s/\\u00cd/\xcd/g
|
||||
s/\\u00d6/\xd6/g
|
||||
s/\\u00dc/\xdc/g
|
||||
s/\\u00dd/\xdd/g
|
||||
s/\\u00df/\xdf/g
|
||||
s/\\u00e0/\xe0/g
|
||||
s/\\u00e1/\xe1/g
|
||||
s/\\u00e2/\xe2/g
|
||||
s/\\u00e3/\xe3/g
|
||||
s/\\u00e4/\xe4/g
|
||||
s/\\u00e5/\xe5/g
|
||||
s/\\u00e7/\xe7/g
|
||||
s/\\u00e8/\xe8/g
|
||||
s/\\u00e9/\xe9/g
|
||||
s/\\u00ea/\xea/g
|
||||
s/\\u00eb/\xeb/g
|
||||
s/\\u00ec/\xec/g
|
||||
s/\\u00ed/\xed/g
|
||||
s/\\u00ee/\xee/g
|
||||
s/\\u00ef/\xef/g
|
||||
s/\\u00f0/\xf0/g
|
||||
s/\\u00f1/\xf1/g
|
||||
s/\\u00f2/\xf2/g
|
||||
s/\\u00f3/\xf3/g
|
||||
s/\\u00f4/\xf4/g
|
||||
s/\\u00f5/\xf5/g
|
||||
s/\\u00f6/\xf6/g
|
||||
s/\\u00f7/\xf7/g
|
||||
s/\\u00f8/\xf8/g
|
||||
s/\\u00f9/\xf9/g
|
||||
s/\\u00fa/\xfa/g
|
||||
s/\\u00fc/\xfc/g
|
||||
s/\\u00ff/\xff/g
|
||||
@ -33,8 +33,8 @@ LINUX_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk24/1f9ff9062db4449d8
|
||||
LINUX_X64_BOOT_JDK_SHA256=88b090fa80c6c1d084ec9a755233967458788e2c0777ae2e172230c5c692d7ef
|
||||
|
||||
ALPINE_LINUX_X64_BOOT_JDK_EXT=tar.gz
|
||||
ALPINE_LINUX_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin24-binaries/releases/download/jdk-24%2B36/OpenJDK24U-jdk_aarch64_alpine-linux_hotspot_24_36.tar.gz
|
||||
ALPINE_LINUX_X64_BOOT_JDK_SHA256=4a673456aa6e726b86108a095a21868b7ebcdde050a92b3073d50105ff92f07f
|
||||
ALPINE_LINUX_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin24-binaries/releases/download/jdk-24%2B36/OpenJDK24U-jdk_x64_alpine-linux_hotspot_24_36.tar.gz
|
||||
ALPINE_LINUX_X64_BOOT_JDK_SHA256=a642608f0da78344ee6812fb1490b8bc1d7ad5a18064c70994d6f330568c51cb
|
||||
|
||||
MACOS_AARCH64_BOOT_JDK_EXT=tar.gz
|
||||
MACOS_AARCH64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk24/1f9ff9062db4449d8ca828c504ffae90/36/GPL/openjdk-24_macos-aarch64_bin.tar.gz
|
||||
|
||||
@ -241,10 +241,10 @@ var getJibProfilesCommon = function (input, data) {
|
||||
|
||||
// List of the main profile names used for iteration
|
||||
common.main_profile_names = [
|
||||
"linux-x64", "linux-x86", "macosx-x64", "macosx-aarch64",
|
||||
"macosx-x64", "macosx-aarch64",
|
||||
"windows-x64", "windows-aarch64",
|
||||
"linux-aarch64", "linux-arm32", "linux-ppc64le", "linux-s390x",
|
||||
"linux-riscv64"
|
||||
"linux-x64", "linux-aarch64",
|
||||
"linux-arm32", "linux-ppc64le", "linux-s390x", "linux-riscv64"
|
||||
];
|
||||
|
||||
// These are the base settings for all the main build profiles.
|
||||
@ -254,7 +254,6 @@ var getJibProfilesCommon = function (input, data) {
|
||||
configure_args: concat(
|
||||
"--with-exclude-translations=es,fr,it,ko,pt_BR,sv,ca,tr,cs,sk,ja_JP_A,ja_JP_HA,ja_JP_HI,ja_JP_I,zh_TW,zh_HK",
|
||||
"--disable-jvm-feature-shenandoahgc",
|
||||
"--disable-cds-archive-coh",
|
||||
versionArgs(input, common))
|
||||
};
|
||||
|
||||
@ -283,9 +282,6 @@ var getJibProfilesCommon = function (input, data) {
|
||||
labels: "open"
|
||||
};
|
||||
|
||||
common.configure_args_64bit = ["--with-target-bits=64"];
|
||||
common.configure_args_32bit = ["--with-target-bits=32"];
|
||||
|
||||
/**
|
||||
* Define common artifacts template for all main profiles
|
||||
* @param o - Object containing data for artifacts
|
||||
@ -412,58 +408,34 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
|
||||
// Main SE profiles
|
||||
var profiles = {
|
||||
|
||||
"linux-x64": {
|
||||
target_os: "linux",
|
||||
target_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest", "build_devkit", "graphviz", "pandoc", "tidy"],
|
||||
configure_args: concat(
|
||||
(input.build_cpu == "x64" ? common.configure_args_64bit
|
||||
: "--openjdk-target=x86_64-linux-gnu"),
|
||||
"--with-zlib=system", "--disable-dtrace",
|
||||
(isWsl(input) ? [ "--host=x86_64-unknown-linux-gnu",
|
||||
"--build=x86_64-unknown-linux-gnu" ] : [])),
|
||||
},
|
||||
|
||||
"linux-x86": {
|
||||
target_os: "linux",
|
||||
target_cpu: "x86",
|
||||
build_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest", "libffi"],
|
||||
configure_args: concat(common.configure_args_32bit, [
|
||||
"--with-jvm-variants=minimal,server",
|
||||
"--with-zlib=system",
|
||||
"--with-libffi=" + input.get("libffi", "home_path"),
|
||||
"--enable-libffi-bundling",
|
||||
"--enable-fallback-linker"
|
||||
])
|
||||
},
|
||||
|
||||
"macosx-x64": {
|
||||
target_os: "macosx",
|
||||
target_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest", "graphviz", "pandoc", "tidy"],
|
||||
configure_args: concat(common.configure_args_64bit, "--with-zlib=system",
|
||||
configure_args: [
|
||||
"--with-zlib=system",
|
||||
"--with-macosx-version-max=11.00.00",
|
||||
"--enable-compatible-cds-alignment",
|
||||
// Use system SetFile instead of the one in the devkit as the
|
||||
// devkit one may not work on Catalina.
|
||||
"SETFILE=/usr/bin/SetFile"),
|
||||
"SETFILE=/usr/bin/SetFile"
|
||||
],
|
||||
},
|
||||
|
||||
"macosx-aarch64": {
|
||||
target_os: "macosx",
|
||||
target_cpu: "aarch64",
|
||||
dependencies: ["devkit", "gtest", "graphviz", "pandoc", "tidy"],
|
||||
configure_args: concat(common.configure_args_64bit,
|
||||
"--with-macosx-version-max=11.00.00"),
|
||||
configure_args: [
|
||||
"--with-macosx-version-max=11.00.00"
|
||||
],
|
||||
},
|
||||
|
||||
"windows-x64": {
|
||||
target_os: "windows",
|
||||
target_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest", "pandoc"],
|
||||
configure_args: concat(common.configure_args_64bit),
|
||||
configure_args: [],
|
||||
},
|
||||
|
||||
"windows-aarch64": {
|
||||
@ -475,7 +447,19 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
],
|
||||
},
|
||||
|
||||
"linux-aarch64": {
|
||||
"linux-x64": {
|
||||
target_os: "linux",
|
||||
target_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest", "build_devkit", "graphviz", "pandoc", "tidy"],
|
||||
configure_args: concat(
|
||||
"--with-zlib=system",
|
||||
"--disable-dtrace",
|
||||
(cross_compiling ? [ "--openjdk-target=x86_64-linux-gnu" ] : []),
|
||||
(isWsl(input) ? [ "--host=x86_64-unknown-linux-gnu",
|
||||
"--build=x86_64-unknown-linux-gnu" ] : [])),
|
||||
},
|
||||
|
||||
"linux-aarch64": {
|
||||
target_os: "linux",
|
||||
target_cpu: "aarch64",
|
||||
dependencies: ["devkit", "gtest", "build_devkit", "graphviz", "pandoc", "tidy"],
|
||||
@ -492,8 +476,10 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
build_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest", "build_devkit"],
|
||||
configure_args: [
|
||||
"--openjdk-target=arm-linux-gnueabihf", "--with-freetype=bundled",
|
||||
"--with-abi-profile=arm-vfp-hflt", "--disable-warnings-as-errors"
|
||||
"--openjdk-target=arm-linux-gnueabihf",
|
||||
"--with-freetype=bundled",
|
||||
"--with-abi-profile=arm-vfp-hflt",
|
||||
"--disable-warnings-as-errors"
|
||||
],
|
||||
},
|
||||
|
||||
@ -503,7 +489,8 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
build_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest", "build_devkit"],
|
||||
configure_args: [
|
||||
"--openjdk-target=ppc64le-linux-gnu", "--with-freetype=bundled",
|
||||
"--openjdk-target=ppc64le-linux-gnu",
|
||||
"--with-freetype=bundled",
|
||||
"--disable-warnings-as-errors"
|
||||
],
|
||||
},
|
||||
@ -514,7 +501,8 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
build_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest", "build_devkit"],
|
||||
configure_args: [
|
||||
"--openjdk-target=s390x-linux-gnu", "--with-freetype=bundled",
|
||||
"--openjdk-target=s390x-linux-gnu",
|
||||
"--with-freetype=bundled",
|
||||
"--disable-warnings-as-errors"
|
||||
],
|
||||
},
|
||||
@ -525,7 +513,8 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
build_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest", "build_devkit"],
|
||||
configure_args: [
|
||||
"--openjdk-target=riscv64-linux-gnu", "--with-freetype=bundled",
|
||||
"--openjdk-target=riscv64-linux-gnu",
|
||||
"--with-freetype=bundled",
|
||||
"--disable-warnings-as-errors"
|
||||
],
|
||||
},
|
||||
@ -586,24 +575,24 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
target_os: "linux",
|
||||
target_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest", "libffi"],
|
||||
configure_args: concat(common.configure_args_64bit, [
|
||||
configure_args: [
|
||||
"--with-zlib=system",
|
||||
"--with-jvm-variants=zero",
|
||||
"--with-libffi=" + input.get("libffi", "home_path"),
|
||||
"--enable-libffi-bundling",
|
||||
])
|
||||
]
|
||||
},
|
||||
|
||||
"linux-aarch64-zero": {
|
||||
target_os: "linux",
|
||||
target_cpu: "aarch64",
|
||||
dependencies: ["devkit", "gtest", "libffi"],
|
||||
configure_args: concat(common.configure_args_64bit, [
|
||||
configure_args: [
|
||||
"--with-zlib=system",
|
||||
"--with-jvm-variants=zero",
|
||||
"--with-libffi=" + input.get("libffi", "home_path"),
|
||||
"--enable-libffi-bundling"
|
||||
])
|
||||
]
|
||||
},
|
||||
|
||||
"linux-x86-zero": {
|
||||
@ -611,12 +600,13 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
target_cpu: "x86",
|
||||
build_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest", "libffi"],
|
||||
configure_args: concat(common.configure_args_32bit, [
|
||||
configure_args: [
|
||||
"--with-target-bits=32",
|
||||
"--with-zlib=system",
|
||||
"--with-jvm-variants=zero",
|
||||
"--with-libffi=" + input.get("libffi", "home_path"),
|
||||
"--enable-libffi-bundling"
|
||||
])
|
||||
]
|
||||
}
|
||||
}
|
||||
profiles = concatObjects(profiles, zeroProfiles);
|
||||
@ -635,8 +625,10 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
target_os: "linux",
|
||||
target_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest"],
|
||||
configure_args: concat(common.configure_args_64bit,
|
||||
"--with-zlib=system", "--disable-precompiled-headers"),
|
||||
configure_args: [
|
||||
"--with-zlib=system",
|
||||
"--disable-precompiled-headers"
|
||||
],
|
||||
},
|
||||
};
|
||||
profiles = concatObjects(profiles, noPchProfiles);
|
||||
@ -693,9 +685,6 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
"linux-x64": {
|
||||
platform: "linux-x64",
|
||||
},
|
||||
"linux-x86": {
|
||||
platform: "linux-x86",
|
||||
},
|
||||
"macosx-x64": {
|
||||
platform: "macos-x64",
|
||||
jdk_subdir: "jdk-" + data.version + ".jdk/Contents/Home",
|
||||
@ -872,7 +861,8 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
profiles[cmpBaselineName].configure_args = concat(
|
||||
profiles[cmpBaselineName].configure_args,
|
||||
"--with-hotspot-build-time=n/a",
|
||||
"--disable-precompiled-headers");
|
||||
"--disable-precompiled-headers",
|
||||
"--with-source-date=version");
|
||||
// Do not inherit artifact definitions from base profile
|
||||
delete profiles[cmpBaselineName].artifacts;
|
||||
});
|
||||
@ -1088,14 +1078,14 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
var getJibProfilesDependencies = function (input, common) {
|
||||
|
||||
var devkit_platform_revisions = {
|
||||
linux_x64: "gcc13.2.0-OL6.4+1.0",
|
||||
macosx: "Xcode14.3.1+1.0",
|
||||
windows_x64: "VS2022-17.6.5+1.0",
|
||||
linux_aarch64: "gcc13.2.0-OL7.6+1.0",
|
||||
linux_x64: "gcc14.2.0-OL6.4+1.0",
|
||||
macosx: "Xcode15.4+1.0",
|
||||
windows_x64: "VS2022-17.13.2+1.0",
|
||||
linux_aarch64: "gcc14.2.0-OL7.6+1.0",
|
||||
linux_arm: "gcc8.2.0-Fedora27+1.0",
|
||||
linux_ppc64le: "gcc13.2.0-Fedora_41+1.0",
|
||||
linux_s390x: "gcc13.2.0-Fedora_41+1.0",
|
||||
linux_riscv64: "gcc13.2.0-Fedora_41+1.0"
|
||||
linux_ppc64le: "gcc14.2.0-Fedora_41+1.0",
|
||||
linux_s390x: "gcc14.2.0-Fedora_41+1.0",
|
||||
linux_riscv64: "gcc14.2.0-Fedora_41+1.0"
|
||||
};
|
||||
|
||||
var devkit_platform = (input.target_cpu == "x86"
|
||||
@ -1161,10 +1151,7 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
organization: common.organization,
|
||||
ext: "tar.gz",
|
||||
module: "devkit-" + devkit_cross_prefix + devkit_platform,
|
||||
revision: devkit_platform_revisions[devkit_platform],
|
||||
environment: {
|
||||
"DEVKIT_HOME": input.get("devkit", "home_path"),
|
||||
}
|
||||
revision: devkit_platform_revisions[devkit_platform]
|
||||
},
|
||||
|
||||
build_devkit: {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
UNICODE LICENSE V3
|
||||
UNICODE LICENSE V3
|
||||
|
||||
COPYRIGHT AND PERMISSION NOTICE
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -43,6 +43,18 @@
|
||||
#define ATTRIBUTE_USED
|
||||
#endif
|
||||
|
||||
// On AIX, the llvm_symbolizer is not found out of the box, so we have to provide the
|
||||
// full qualified llvm_symbolizer path in the __ubsan_default_options() function.
|
||||
// To get it here we compile our sources with an additional define LLVM_SYMBOLIZER
|
||||
// containing the path, which we set in make/autoconf/jdk-options.m4.
|
||||
#ifdef LLVM_SYMBOLIZER
|
||||
#define _LLVM_SYMBOLIZER(X) ",external_symbolizer_path=" X_LLVM_SYMBOLIZER(X)
|
||||
#define X_LLVM_SYMBOLIZER(X) #X
|
||||
#else
|
||||
#define LLVM_SYMBOLIZER
|
||||
#define _LLVM_SYMBOLIZER(X)
|
||||
#endif
|
||||
|
||||
// Override weak symbol exposed by UBSan to override default options. This is called by UBSan
|
||||
// extremely early during library loading, before main is called. We need to override the default
|
||||
// options because by default UBSan only prints a warning for each occurrence. We want jtreg tests
|
||||
@ -50,5 +62,5 @@
|
||||
// thread so it is easier to track down. You can override these options by setting the environment
|
||||
// variable UBSAN_OPTIONS.
|
||||
ATTRIBUTE_DEFAULT_VISIBILITY ATTRIBUTE_USED const char* __ubsan_default_options() {
|
||||
return "halt_on_error=1,print_stacktrace=1";
|
||||
return "halt_on_error=1,print_stacktrace=1" _LLVM_SYMBOLIZER(LLVM_SYMBOLIZER);
|
||||
}
|
||||
|
||||
@ -39,6 +39,8 @@
|
||||
# Fix this...
|
||||
#
|
||||
|
||||
uppercase = $(shell echo $1 | tr a-z A-Z)
|
||||
|
||||
$(info TARGET=$(TARGET))
|
||||
$(info HOST=$(HOST))
|
||||
$(info BUILD=$(BUILD))
|
||||
@ -91,89 +93,28 @@ endif
|
||||
################################################################################
|
||||
# Define external dependencies
|
||||
|
||||
# Latest that could be made to work.
|
||||
GCC_VER := 13.2.0
|
||||
ifeq ($(GCC_VER), 13.2.0)
|
||||
gcc_ver := gcc-13.2.0
|
||||
binutils_ver := binutils-2.41
|
||||
ccache_ver := ccache-3.7.12
|
||||
mpfr_ver := mpfr-4.2.0
|
||||
gmp_ver := gmp-6.3.0
|
||||
mpc_ver := mpc-1.3.1
|
||||
gdb_ver := gdb-13.2
|
||||
REQUIRED_MIN_MAKE_MAJOR_VERSION := 4
|
||||
else ifeq ($(GCC_VER), 11.3.0)
|
||||
gcc_ver := gcc-11.3.0
|
||||
binutils_ver := binutils-2.39
|
||||
ccache_ver := ccache-3.7.12
|
||||
mpfr_ver := mpfr-4.1.1
|
||||
gmp_ver := gmp-6.2.1
|
||||
mpc_ver := mpc-1.2.1
|
||||
gdb_ver := gdb-11.2
|
||||
REQUIRED_MIN_MAKE_MAJOR_VERSION := 4
|
||||
else ifeq ($(GCC_VER), 11.2.0)
|
||||
gcc_ver := gcc-11.2.0
|
||||
binutils_ver := binutils-2.37
|
||||
ccache_ver := ccache-3.7.12
|
||||
mpfr_ver := mpfr-4.1.0
|
||||
gmp_ver := gmp-6.2.1
|
||||
mpc_ver := mpc-1.2.1
|
||||
gdb_ver := gdb-11.1
|
||||
REQUIRED_MIN_MAKE_MAJOR_VERSION := 4
|
||||
else ifeq ($(GCC_VER), 10.3.0)
|
||||
gcc_ver := gcc-10.3.0
|
||||
binutils_ver := binutils-2.36.1
|
||||
ccache_ver := ccache-3.7.11
|
||||
mpfr_ver := mpfr-4.1.0
|
||||
gmp_ver := gmp-6.2.0
|
||||
mpc_ver := mpc-1.1.0
|
||||
gdb_ver := gdb-10.1
|
||||
REQUIRED_MIN_MAKE_MAJOR_VERSION := 4
|
||||
else ifeq ($(GCC_VER), 10.2.0)
|
||||
gcc_ver := gcc-10.2.0
|
||||
binutils_ver := binutils-2.35
|
||||
ccache_ver := ccache-3.7.11
|
||||
mpfr_ver := mpfr-4.1.0
|
||||
gmp_ver := gmp-6.2.0
|
||||
mpc_ver := mpc-1.1.0
|
||||
gdb_ver := gdb-9.2
|
||||
REQUIRED_MIN_MAKE_MAJOR_VERSION := 4
|
||||
else ifeq ($(GCC_VER), 9.2.0)
|
||||
gcc_ver := gcc-9.2.0
|
||||
binutils_ver := binutils-2.34
|
||||
ccache_ver := ccache-3.7.3
|
||||
mpfr_ver := mpfr-3.1.5
|
||||
gmp_ver := gmp-6.1.2
|
||||
mpc_ver := mpc-1.0.3
|
||||
gdb_ver := gdb-8.3
|
||||
else ifeq ($(GCC_VER), 8.3.0)
|
||||
gcc_ver := gcc-8.3.0
|
||||
binutils_ver := binutils-2.32
|
||||
ccache_ver := ccache-3.7.3
|
||||
mpfr_ver := mpfr-3.1.5
|
||||
gmp_ver := gmp-6.1.2
|
||||
mpc_ver := mpc-1.0.3
|
||||
gdb_ver := gdb-8.3
|
||||
else ifeq ($(GCC_VER), 7.3.0)
|
||||
gcc_ver := gcc-7.3.0
|
||||
binutils_ver := binutils-2.30
|
||||
ccache_ver := ccache-3.3.6
|
||||
mpfr_ver := mpfr-3.1.5
|
||||
gmp_ver := gmp-6.1.2
|
||||
mpc_ver := mpc-1.0.3
|
||||
gdb_ver := gdb-8.1
|
||||
else ifeq ($(GCC_VER), 4.9.2)
|
||||
gcc_ver := gcc-4.9.2
|
||||
binutils_ver := binutils-2.25
|
||||
ccache_ver := ccache-3.2.1
|
||||
mpfr_ver := mpfr-3.0.1
|
||||
gmp_ver := gmp-4.3.2
|
||||
mpc_ver := mpc-1.0.1
|
||||
gdb_ver := gdb-7.12.1
|
||||
else
|
||||
$(error Unsupported GCC version)
|
||||
endif
|
||||
gcc_ver_only := 14.2.0
|
||||
binutils_ver_only := 2.43
|
||||
ccache_ver_only := 4.10.2
|
||||
CCACHE_CMAKE_BASED := 1
|
||||
mpfr_ver_only := 4.2.1
|
||||
gmp_ver_only := 6.3.0
|
||||
mpc_ver_only := 1.3.1
|
||||
gdb_ver_only := 15.2
|
||||
|
||||
dependencies := gcc binutils ccache mpfr gmp mpc gdb
|
||||
|
||||
$(foreach dep,$(dependencies),$(eval $(dep)_ver := $(dep)-$($(dep)_ver_only)))
|
||||
|
||||
GCC := http://ftp.gnu.org/pub/gnu/gcc/$(gcc_ver)/$(gcc_ver).tar.xz
|
||||
BINUTILS := http://ftp.gnu.org/pub/gnu/binutils/$(binutils_ver).tar.gz
|
||||
CCACHE := https://github.com/ccache/ccache/releases/download/v$(ccache_ver_only)/$(ccache_ver).tar.xz
|
||||
MPFR := https://www.mpfr.org/$(mpfr_ver)/$(mpfr_ver).tar.bz2
|
||||
GMP := http://ftp.gnu.org/pub/gnu/gmp/$(gmp_ver).tar.bz2
|
||||
MPC := http://ftp.gnu.org/pub/gnu/mpc/$(mpc_ver).tar.gz
|
||||
GDB := http://ftp.gnu.org/gnu/gdb/$(gdb_ver).tar.xz
|
||||
|
||||
REQUIRED_MIN_MAKE_MAJOR_VERSION := 4
|
||||
ifneq ($(REQUIRED_MIN_MAKE_MAJOR_VERSION),)
|
||||
MAKE_MAJOR_VERSION := $(word 1,$(subst ., ,$(MAKE_VERSION)))
|
||||
SUPPORTED_MAKE_VERSION := $(shell [ $(MAKE_MAJOR_VERSION) -ge $(REQUIRED_MIN_MAKE_MAJOR_VERSION) ] && echo true)
|
||||
@ -182,17 +123,6 @@ ifneq ($(REQUIRED_MIN_MAKE_MAJOR_VERSION),)
|
||||
endif
|
||||
endif
|
||||
|
||||
ccache_ver_only := $(patsubst ccache-%,%,$(ccache_ver))
|
||||
|
||||
|
||||
GCC := http://ftp.gnu.org/pub/gnu/gcc/$(gcc_ver)/$(gcc_ver).tar.xz
|
||||
BINUTILS := http://ftp.gnu.org/pub/gnu/binutils/$(binutils_ver).tar.gz
|
||||
CCACHE := https://github.com/ccache/ccache/releases/download/v$(ccache_ver_only)/$(ccache_ver).tar.xz
|
||||
MPFR := https://www.mpfr.org/${mpfr_ver}/${mpfr_ver}.tar.bz2
|
||||
GMP := http://ftp.gnu.org/pub/gnu/gmp/${gmp_ver}.tar.bz2
|
||||
MPC := http://ftp.gnu.org/pub/gnu/mpc/${mpc_ver}.tar.gz
|
||||
GDB := http://ftp.gnu.org/gnu/gdb/${gdb_ver}.tar.xz
|
||||
|
||||
# RPMs used by all BASE_OS
|
||||
RPM_LIST := \
|
||||
$(KERNEL_HEADERS_RPM) \
|
||||
@ -262,10 +192,18 @@ define Download
|
||||
# Allow override
|
||||
$(1)_DIRNAME ?= $(basename $(basename $(notdir $($(1)))))
|
||||
$(1)_DIR = $(abspath $(SRCDIR)/$$($(1)_DIRNAME))
|
||||
$(1)_CFG = $$($(1)_DIR)/configure
|
||||
ifeq ($$($(1)_CMAKE_BASED),)
|
||||
$(1)_CFG = $$($(1)_DIR)/configure
|
||||
$(1)_SRC_MARKER = $$($(1)_DIR)/configure
|
||||
$(1)_CONFIG = $(CONFIG)
|
||||
else
|
||||
$(1)_CFG = cmake
|
||||
$(1)_SRC_MARKER = $$($(1)_DIR)/CMakeLists.txt
|
||||
$(1)_CONFIG = $$(CMAKE_CONFIG) $$($(1)_DIR)
|
||||
endif
|
||||
$(1)_FILE = $(DOWNLOAD)/$(notdir $($(1)))
|
||||
|
||||
$$($(1)_CFG) : $$($(1)_FILE)
|
||||
$$($(1)_SRC_MARKER) : $$($(1)_FILE)
|
||||
mkdir -p $$(SRCDIR)
|
||||
tar -C $$(SRCDIR) -xf $$<
|
||||
$$(foreach p,$$(abspath $$(wildcard patches/$$(ARCH)-$$(notdir $$($(1)_DIR)).patch)), \
|
||||
@ -279,7 +217,7 @@ define Download
|
||||
endef
|
||||
|
||||
# Download and unpack all source packages
|
||||
$(foreach p,GCC BINUTILS CCACHE MPFR GMP MPC GDB,$(eval $(call Download,$(p))))
|
||||
$(foreach dep,$(dependencies),$(eval $(call Download,$(call uppercase,$(dep)))))
|
||||
|
||||
################################################################################
|
||||
# Unpack RPMS
|
||||
@ -356,7 +294,7 @@ endif
|
||||
################################################################################
|
||||
|
||||
# Define marker files for each source package to be compiled
|
||||
$(foreach t,binutils mpfr gmp mpc gcc ccache gdb,$(eval $(t) = $(TARGETDIR)/$($(t)_ver).done))
|
||||
$(foreach dep,$(dependencies),$(eval $(dep) = $(TARGETDIR)/$($(dep)_ver).done))
|
||||
|
||||
################################################################################
|
||||
|
||||
@ -365,6 +303,8 @@ CONFIG = --target=$(TARGET) \
|
||||
--host=$(HOST) --build=$(BUILD) \
|
||||
--prefix=$(PREFIX)
|
||||
|
||||
CMAKE_CONFIG = -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(PREFIX)
|
||||
|
||||
PATHEXT = $(PREFIX)/bin:
|
||||
|
||||
PATHPRE = PATH=$(PATHEXT)$(PATH)
|
||||
@ -576,6 +516,8 @@ ifeq ($(HOST), $(TARGET))
|
||||
$(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" $(GDB_CFG) \
|
||||
$(CONFIG) \
|
||||
--with-sysroot=$(SYSROOT) \
|
||||
--with-mpfr=$(PREFIX) \
|
||||
--with-gmp=$(PREFIX) \
|
||||
) > $(@D)/log.config 2>&1
|
||||
@echo 'done'
|
||||
|
||||
@ -591,13 +533,13 @@ endif
|
||||
################################################################################
|
||||
# very straightforward. just build a ccache. it is only for host.
|
||||
$(BUILDDIR)/$(ccache_ver)/Makefile \
|
||||
: $(CCACHE_CFG)
|
||||
: $(CCACHE_SRC_MARKER)
|
||||
$(info Configuring $@. Log in $(@D)/log.config)
|
||||
@mkdir -p $(@D)
|
||||
@( \
|
||||
cd $(@D) ; \
|
||||
$(PATHPRE) $(ENVS) $(CCACHE_CFG) \
|
||||
$(CONFIG) \
|
||||
$(CCACHE_CONFIG) \
|
||||
) > $(@D)/log.config 2>&1
|
||||
@echo 'done'
|
||||
|
||||
@ -699,10 +641,18 @@ ifeq ($(TARGET), $(HOST))
|
||||
ln -s $(TARGET)-$* $@
|
||||
|
||||
missing-links := $(addprefix $(PREFIX)/bin/, \
|
||||
addr2line ar as c++ c++filt dwp elfedit g++ gcc gcc-$(GCC_VER) gprof ld ld.bfd \
|
||||
addr2line ar as c++ c++filt dwp elfedit g++ gcc gcc-$(gcc_ver_only) gprof ld ld.bfd \
|
||||
ld.gold nm objcopy objdump ranlib readelf size strings strip)
|
||||
endif
|
||||
|
||||
# Add link to work around "plugin needed to handle lto object" (JDK-8344272)
|
||||
$(PREFIX)/lib/bfd-plugins/liblto_plugin.so: $(PREFIX)/libexec/gcc/$(TARGET)/$(gcc_ver_only)/liblto_plugin.so
|
||||
@echo 'Creating missing $(@F) soft link'
|
||||
@mkdir -p $(@D)
|
||||
ln -s $$(realpath -s --relative-to=$(@D) $<) $@
|
||||
|
||||
missing-links += $(PREFIX)/lib/bfd-plugins/liblto_plugin.so
|
||||
|
||||
################################################################################
|
||||
|
||||
bfdlib : $(bfdlib)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
#
|
||||
# Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -24,10 +24,21 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Create a bundle in the current directory, containing what's needed to run
|
||||
# Create a bundle in OpenJDK build folder, containing what's needed to run
|
||||
# the 'autoconf' program by the OpenJDK build. To override TARGET_PLATFORM
|
||||
# just set the variable before running this script.
|
||||
|
||||
# This script fetches sources from network so make sure your proxy is setup appropriately.
|
||||
|
||||
# colored print to highlight some of the logs
|
||||
function print_log()
|
||||
{
|
||||
Color_Cyan='\033[1;36m' # Cyan
|
||||
Color_Off='\033[0m' # Reset color
|
||||
printf "${Color_Cyan}> $1${Color_Off}\n"
|
||||
}
|
||||
|
||||
|
||||
# Autoconf depends on m4, so download and build that first.
|
||||
AUTOCONF_VERSION=2.69
|
||||
M4_VERSION=1.4.18
|
||||
@ -58,11 +69,12 @@ MODULE_NAME=autoconf-$TARGET_PLATFORM-$AUTOCONF_VERSION+$PACKAGE_VERSION
|
||||
BUNDLE_NAME=$MODULE_NAME.tar.gz
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
|
||||
OUTPUT_ROOT="${SCRIPT_DIR}/../../build/autoconf"
|
||||
BASEDIR="$(cd "$SCRIPT_DIR/../.." > /dev/null && pwd)"
|
||||
OUTPUT_ROOT="$BASEDIR/build/autoconf"
|
||||
|
||||
cd $OUTPUT_ROOT
|
||||
IMAGE_DIR=$OUTPUT_ROOT/$MODULE_NAME
|
||||
mkdir -p $IMAGE_DIR/usr
|
||||
cd $OUTPUT_ROOT
|
||||
|
||||
# Download and build m4
|
||||
|
||||
@ -76,7 +88,7 @@ elif test "x$TARGET_PLATFORM" = xcygwin_x86; then
|
||||
cp /usr/bin/m4 $IMAGE_DIR/usr/bin
|
||||
elif test "x$TARGET_PLATFORM" = xlinux_x64; then
|
||||
M4_VERSION=1.4.13-5
|
||||
wget http://yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/getPackage/m4-$M4_VERSION.el6.x86_64.rpm
|
||||
wget https://yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/getPackage/m4-$M4_VERSION.el6.x86_64.rpm
|
||||
cd $IMAGE_DIR
|
||||
rpm2cpio $OUTPUT_ROOT/m4-$M4_VERSION.el6.x86_64.rpm | cpio -d -i
|
||||
elif test "x$TARGET_PLATFORM" = xlinux_x86; then
|
||||
@ -85,27 +97,38 @@ elif test "x$TARGET_PLATFORM" = xlinux_x86; then
|
||||
cd $IMAGE_DIR
|
||||
rpm2cpio $OUTPUT_ROOT/m4-$M4_VERSION.el6.i686.rpm | cpio -d -i
|
||||
else
|
||||
print_log "m4: download"
|
||||
wget https://ftp.gnu.org/gnu/m4/m4-$M4_VERSION.tar.gz
|
||||
tar xzf m4-$M4_VERSION.tar.gz
|
||||
tar -xzf m4-$M4_VERSION.tar.gz
|
||||
cd m4-$M4_VERSION
|
||||
print_log "m4: configure"
|
||||
./configure --prefix=$IMAGE_DIR/usr CFLAGS="-w -Wno-everything"
|
||||
print_log "m4: make"
|
||||
make
|
||||
print_log "m4: make install"
|
||||
make install
|
||||
cd ..
|
||||
fi
|
||||
|
||||
# Download and build autoconf
|
||||
|
||||
print_log "autoconf: download"
|
||||
wget https://ftp.gnu.org/gnu/autoconf/autoconf-$AUTOCONF_VERSION.tar.gz
|
||||
tar xzf autoconf-$AUTOCONF_VERSION.tar.gz
|
||||
tar -xzf autoconf-$AUTOCONF_VERSION.tar.gz
|
||||
cd autoconf-$AUTOCONF_VERSION
|
||||
print_log "autoconf: configure"
|
||||
./configure --prefix=$IMAGE_DIR/usr M4=$IMAGE_DIR/usr/bin/m4
|
||||
print_log "autoconf: make"
|
||||
make
|
||||
print_log "autoconf: make install"
|
||||
make install
|
||||
cd ..
|
||||
|
||||
# The resulting scripts from installation folder use absolute paths to reference other files within installation folder
|
||||
print_log "replace absolue paths from installation files with a relative ."
|
||||
perl -pi -e "s!$IMAGE_DIR/!./!" $IMAGE_DIR/usr/bin/auto* $IMAGE_DIR/usr/share/autoconf/autom4te.cfg
|
||||
|
||||
print_log "creating $IMAGE_DIR/autoconf wrapper script"
|
||||
cat > $IMAGE_DIR/autoconf << EOF
|
||||
#!/bin/bash
|
||||
# Get an absolute path to this script
|
||||
@ -123,6 +146,9 @@ PREPEND_INCLUDE="--prepend-include \$this_script_dir/usr/share/autoconf"
|
||||
|
||||
exec \$this_script_dir/usr/bin/autoconf \$PREPEND_INCLUDE "\$@"
|
||||
EOF
|
||||
|
||||
chmod +x $IMAGE_DIR/autoconf
|
||||
|
||||
print_log "archiving $IMAGE_DIR directory as $OUTPUT_ROOT/$BUNDLE_NAME"
|
||||
cd $IMAGE_DIR
|
||||
tar -cvzf $OUTPUT_ROOT/$BUNDLE_NAME *
|
||||
|
||||
@ -56,16 +56,22 @@ BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
|
||||
|
||||
UNAME_SYSTEM=`uname -s`
|
||||
UNAME_RELEASE=`uname -r`
|
||||
UNAME_OS=`uname -o`
|
||||
|
||||
# Detect cygwin or WSL
|
||||
IS_CYGWIN=`echo $UNAME_SYSTEM | grep -i CYGWIN`
|
||||
IS_WSL=`echo $UNAME_RELEASE | grep Microsoft`
|
||||
IS_MSYS=`echo $UNAME_OS | grep -i Msys`
|
||||
MSYS2_ARG_CONV_EXCL="*" # make "cmd.exe /c" work for msys2
|
||||
CMD_EXE="cmd.exe /c"
|
||||
if test "x$IS_CYGWIN" != "x"; then
|
||||
BUILD_ENV="cygwin"
|
||||
elif test "x$IS_MSYS" != "x"; then
|
||||
BUILD_ENV="cygwin"
|
||||
elif test "x$IS_WSL" != "x"; then
|
||||
BUILD_ENV="wsl"
|
||||
else
|
||||
echo "Unknown environment; only Cygwin and WSL are supported."
|
||||
echo "Unknown environment; only Cygwin/MSYS2/WSL are supported."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -76,7 +82,7 @@ elif test "x$BUILD_ENV" = "xwsl"; then
|
||||
fi
|
||||
|
||||
# Work around the insanely named ProgramFiles(x86) env variable
|
||||
PROGRAMFILES_X86="$($WINDOWS_PATH_TO_UNIX_PATH "$(cmd.exe /c set | sed -n 's/^ProgramFiles(x86)=//p' | tr -d '\r')")"
|
||||
PROGRAMFILES_X86="$($WINDOWS_PATH_TO_UNIX_PATH "$(${CMD_EXE} set | sed -n 's/^ProgramFiles(x86)=//p' | tr -d '\r')")"
|
||||
PROGRAMFILES="$($WINDOWS_PATH_TO_UNIX_PATH "$PROGRAMFILES")"
|
||||
|
||||
case $VS_VERSION in
|
||||
@ -99,13 +105,15 @@ esac
|
||||
|
||||
|
||||
# Find Visual Studio installation dir
|
||||
VSNNNCOMNTOOLS=`cmd.exe /c echo %VS${VS_VERSION_NUM_NODOT}COMNTOOLS% | tr -d '\r'`
|
||||
VSNNNCOMNTOOLS=`${CMD_EXE} echo %VS${VS_VERSION_NUM_NODOT}COMNTOOLS% | tr -d '\r'`
|
||||
VSNNNCOMNTOOLS="$($WINDOWS_PATH_TO_UNIX_PATH "$VSNNNCOMNTOOLS")"
|
||||
if [ -d "$VSNNNCOMNTOOLS" ]; then
|
||||
VS_INSTALL_DIR="$($WINDOWS_PATH_TO_UNIX_PATH "$VSNNNCOMNTOOLS/../..")"
|
||||
VS_INSTALL_DIR="$VSNNNCOMNTOOLS/../.."
|
||||
else
|
||||
VS_INSTALL_DIR="${MSVC_PROGRAMFILES_DIR}/Microsoft Visual Studio/$VS_VERSION"
|
||||
VS_INSTALL_DIR="$(ls -d "${VS_INSTALL_DIR}/"{Community,Professional,Enterprise} 2>/dev/null | head -n1)"
|
||||
fi
|
||||
echo "VSNNNCOMNTOOLS: $VSNNNCOMNTOOLS"
|
||||
echo "VS_INSTALL_DIR: $VS_INSTALL_DIR"
|
||||
|
||||
# Extract semantic version
|
||||
@ -180,7 +188,11 @@ cp $DEVKIT_ROOT/VC/redist/arm64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/arm64
|
||||
################################################################################
|
||||
# Copy SDK files
|
||||
|
||||
SDK_INSTALL_DIR="$PROGRAMFILES_X86/Windows Kits/$SDK_VERSION"
|
||||
SDK_INSTALL_DIR=`${CMD_EXE} echo %WindowsSdkDir% | tr -d '\r'`
|
||||
SDK_INSTALL_DIR="$($WINDOWS_PATH_TO_UNIX_PATH "$SDK_INSTALL_DIR")"
|
||||
if [ ! -d "$SDK_INSTALL_DIR" ]; then
|
||||
SDK_INSTALL_DIR="$PROGRAMFILES_X86/Windows Kits/$SDK_VERSION"
|
||||
fi
|
||||
echo "SDK_INSTALL_DIR: $SDK_INSTALL_DIR"
|
||||
|
||||
SDK_FULL_VERSION="$(ls "$SDK_INSTALL_DIR/bin" | sort -r -n | head -n1)"
|
||||
|
||||
@ -125,6 +125,7 @@ endif
|
||||
ifneq ($(call check-jvm-feature, cds), true)
|
||||
JVM_CFLAGS_FEATURES += -DINCLUDE_CDS=0
|
||||
JVM_EXCLUDE_FILES += \
|
||||
aotCodeCache.cpp \
|
||||
classLoaderDataShared.cpp \
|
||||
classLoaderExt.cpp \
|
||||
systemDictionaryShared.cpp
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -59,6 +59,7 @@ public class HelloClasslist {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger("Hello");
|
||||
|
||||
@SuppressWarnings("restricted")
|
||||
public static void main(String ... args) throws Throwable {
|
||||
|
||||
FileSystems.getDefault();
|
||||
@ -141,6 +142,7 @@ public class HelloClasslist {
|
||||
HelloClasslist.class.getMethod("staticMethod_V").invoke(null);
|
||||
var obj = HelloClasslist.class.getMethod("staticMethod_L_L", Object.class).invoke(null, instance);
|
||||
HelloClasslist.class.getField("field").get(instance);
|
||||
MethodHandles.Lookup.ClassOption.class.getEnumConstants();
|
||||
|
||||
// A selection of trivial and relatively common MH operations
|
||||
invoke(MethodHandles.identity(double.class), 1.0);
|
||||
@ -160,6 +162,9 @@ public class HelloClasslist {
|
||||
case B b -> b.b;
|
||||
default -> 17;
|
||||
};
|
||||
// record run-time methods
|
||||
o.equals(new B(5));
|
||||
o.hashCode();
|
||||
LOGGER.log(Level.FINE, "Value: " + value);
|
||||
|
||||
// The Striped64$Cell is loaded rarely only when there's a contention among
|
||||
|
||||
127
make/jdk/src/classes/build/tools/taglet/PreviewNote.java
Normal file
127
make/jdk/src/classes/build/tools/taglet/PreviewNote.java
Normal file
@ -0,0 +1,127 @@
|
||||
/*
|
||||
* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package build.tools.taglet;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
import javax.lang.model.element.Element;
|
||||
import javax.tools.Diagnostic;
|
||||
|
||||
|
||||
import com.sun.source.doctree.DocTree;
|
||||
import com.sun.source.doctree.UnknownInlineTagTree;
|
||||
import jdk.javadoc.doclet.Doclet;
|
||||
import jdk.javadoc.doclet.DocletEnvironment;
|
||||
import jdk.javadoc.doclet.Reporter;
|
||||
import jdk.javadoc.doclet.StandardDoclet;
|
||||
import jdk.javadoc.doclet.Taglet;
|
||||
|
||||
import static com.sun.source.doctree.DocTree.Kind.UNKNOWN_INLINE_TAG;
|
||||
|
||||
/**
|
||||
* An inline tag to insert a note formatted as preview note.
|
||||
* The tag can be used as follows:
|
||||
*
|
||||
* <pre>
|
||||
* {@previewNote jep-number [Preview note heading]}
|
||||
* Preview note content
|
||||
* {@previewNote}
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
public class PreviewNote implements Taglet {
|
||||
|
||||
static final String TAG_NAME = "previewNote";
|
||||
Reporter reporter = null;
|
||||
|
||||
@Override
|
||||
public void init(DocletEnvironment env, Doclet doclet) {
|
||||
if (doclet instanceof StandardDoclet stdoclet) {
|
||||
reporter = stdoclet.getReporter();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the set of locations in which the tag may be used.
|
||||
*/
|
||||
@Override
|
||||
public Set<Location> getAllowedLocations() {
|
||||
return EnumSet.allOf(Taglet.Location.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInlineTag() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return TAG_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(List<? extends DocTree> tags, Element elem) {
|
||||
|
||||
for (DocTree tag : tags) {
|
||||
if (tag.getKind() == UNKNOWN_INLINE_TAG) {
|
||||
UnknownInlineTagTree inlineTag = (UnknownInlineTagTree) tag;
|
||||
String[] content = inlineTag.getContent().toString().trim().split("\\s+", 2);
|
||||
if (!content[0].isBlank()) {
|
||||
StringBuilder sb = new StringBuilder("""
|
||||
<div class="preview-block" style="margin-top:10px; display:block; max-width:max-content;">
|
||||
""");
|
||||
if (content.length == 2) {
|
||||
sb.append("""
|
||||
<div class="preview-label">
|
||||
""")
|
||||
.append(content[1])
|
||||
.append("""
|
||||
</div>
|
||||
""");
|
||||
}
|
||||
sb.append("""
|
||||
<div class="preview-comment">
|
||||
""");
|
||||
return sb.toString();
|
||||
} else {
|
||||
return """
|
||||
</div>
|
||||
</div>
|
||||
""";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (reporter == null) {
|
||||
throw new IllegalArgumentException("@" + TAG_NAME + " taglet content must be begin or end");
|
||||
}
|
||||
reporter.print(Diagnostic.Kind.ERROR, "@" + TAG_NAME + " taglet content must be begin or end");
|
||||
return "";
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -99,7 +99,7 @@ JVMCFG := $(LIB_DST_DIR)/jvm.cfg
|
||||
|
||||
define print-cfg-line
|
||||
$(call LogInfo, Adding -$1 $2 to jvm.cfg)
|
||||
$(PRINTF) -- "-$1 $2\n" >> $@ $(NEWLINE)
|
||||
$(ECHO) "-$1 $2" >> $@ $(NEWLINE)
|
||||
endef
|
||||
|
||||
$(JVMCFG): $(call DependOnVariable, ORDERED_CFG_VARIANTS)
|
||||
|
||||
@ -41,11 +41,6 @@ CLEAN += intrinsic.properties
|
||||
EXCLUDE_FILES += \
|
||||
$(TOPDIR)/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java
|
||||
|
||||
EXCLUDES += java/lang/doc-files \
|
||||
java/lang/classfile/snippet-files \
|
||||
java/lang/classfile/components/snippet-files \
|
||||
java/lang/foreign/snippet-files
|
||||
|
||||
# Exclude BreakIterator classes that are just used in compile process to generate
|
||||
# data files and shouldn't go in the product
|
||||
EXCLUDE_FILES += sun/text/resources/BreakIteratorRules.java
|
||||
|
||||
@ -158,6 +158,7 @@ endif
|
||||
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBSYSLOOKUP, \
|
||||
NAME := syslookup, \
|
||||
EXTRA_HEADER_DIRS := java.base:libjava, \
|
||||
LD_SET_ORIGIN := false, \
|
||||
LDFLAGS_linux := -Wl$(COMMA)--no-as-needed, \
|
||||
LDFLAGS_aix := -brtl -bexpfull, \
|
||||
|
||||
@ -272,7 +272,7 @@ define SetupGenBuffer
|
||||
$$($1_long_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
|
||||
$$($1_float_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
|
||||
$$($1_double_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
|
||||
$(PRINTF) "}\n" >> $$($1_DST).tmp
|
||||
$(ECHO) "}" >> $$($1_DST).tmp
|
||||
mv $$($1_DST).tmp $$($1_DST)
|
||||
endif
|
||||
|
||||
|
||||
@ -163,7 +163,7 @@ $(SCOPED_MEMORY_ACCESS_DEST): $(BUILD_TOOLS_JDK) $(SCOPED_MEMORY_ACCESS_TEMPLATE
|
||||
$(foreach t, $(SCOPE_MEMORY_ACCESS_TYPES), \
|
||||
$(TOOL_SPP) -nel -K$(BIN_$t_type) -Dtype=$(BIN_$t_type) -DType=$(BIN_$t_Type) $(BIN_$t_ARGS) \
|
||||
-i$(SCOPED_MEMORY_ACCESS_BIN_TEMPLATE) -o$(SCOPED_MEMORY_ACCESS_DEST) ;)
|
||||
$(PRINTF) "}\n" >> $(SCOPED_MEMORY_ACCESS_DEST)
|
||||
$(ECHO) "}" >> $(SCOPED_MEMORY_ACCESS_DEST)
|
||||
|
||||
TARGETS += $(SCOPED_MEMORY_ACCESS_DEST)
|
||||
|
||||
|
||||
@ -32,6 +32,4 @@
|
||||
DOCLINT += -Xdoclint:all/protected \
|
||||
'-Xdoclint/package:java.*,javax.*'
|
||||
|
||||
EXCLUDES += javax/tools/snippet-files
|
||||
|
||||
################################################################################
|
||||
|
||||
@ -31,15 +31,6 @@ DOCLINT += -Xdoclint:all/protected \
|
||||
COPY += .gif .png .wav .txt .xml .css .pf
|
||||
CLEAN += iio-plugin.properties cursors.properties
|
||||
|
||||
EXCLUDES += \
|
||||
java/awt/doc-files \
|
||||
javax/swing/doc-files \
|
||||
javax/swing/text/doc-files \
|
||||
javax/swing/plaf/synth/doc-files \
|
||||
javax/swing/undo/doc-files \
|
||||
sun/awt/X11/doc-files \
|
||||
#
|
||||
|
||||
EXCLUDE_FILES += \
|
||||
javax/swing/plaf/nimbus/InternalFrameTitlePanePainter.java \
|
||||
javax/swing/plaf/nimbus/OptionPaneMessageAreaPainter.java \
|
||||
|
||||
@ -87,7 +87,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBLCMS, \
|
||||
libawt/java2d \
|
||||
java.base:libjvm, \
|
||||
HEADERS_FROM_SRC := $(LIBLCMS_HEADERS_FROM_SRC), \
|
||||
DISABLED_WARNINGS_gcc := format-nonliteral stringop-truncation type-limits \
|
||||
DISABLED_WARNINGS_gcc := format-nonliteral stringop-truncation \
|
||||
unused-variable, \
|
||||
DISABLED_WARNINGS_clang := format-nonliteral, \
|
||||
JDK_LIBS := libawt java.base:libjava, \
|
||||
|
||||
@ -53,7 +53,6 @@ COMPILECREATESYMBOLS_ADD_EXPORTS := \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
|
||||
--add-exports jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED \
|
||||
#
|
||||
|
||||
# TODO: Unify with jdk.javadoc-gendata. Should only compile this once and share.
|
||||
@ -61,7 +60,7 @@ $(eval $(call SetupJavaCompilation, COMPILE_CREATE_SYMBOLS, \
|
||||
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK), \
|
||||
COMPILER := buildjdk, \
|
||||
SRC := $(TOPDIR)/make/langtools/src/classes, \
|
||||
INCLUDES := build/tools/symbolgenerator com/sun/tools/classfile, \
|
||||
INCLUDES := build/tools/symbolgenerator, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/create_symbols_javac, \
|
||||
DISABLED_WARNINGS := options, \
|
||||
JAVAC_FLAGS := \
|
||||
|
||||
@ -51,7 +51,7 @@ $(eval $(call SetupJavaCompilation, COMPILE_CREATE_SYMBOLS, \
|
||||
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||
SRC := $(TOPDIR)/make/langtools/src/classes \
|
||||
$(TOPDIR)/src/jdk.jdeps/share/classes, \
|
||||
INCLUDES := build/tools/symbolgenerator com/sun/tools/classfile, \
|
||||
INCLUDES := build/tools/symbolgenerator, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/create_symbols_javadoc, \
|
||||
DISABLED_WARNINGS := options, \
|
||||
JAVAC_FLAGS := \
|
||||
|
||||
@ -31,7 +31,6 @@ EXCLUDES += \
|
||||
com/sun/tools/example/debug/bdi \
|
||||
com/sun/tools/example/debug/event \
|
||||
com/sun/tools/example/debug/gui \
|
||||
com/sun/jdi/doc-files \
|
||||
#
|
||||
|
||||
EXCLUDE_FILES += jdi-overview.html
|
||||
|
||||
@ -68,6 +68,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJDWP, \
|
||||
DISABLED_WARNINGS_clang_threadControl.c := unused-but-set-variable \
|
||||
unused-variable, \
|
||||
DISABLED_WARNINGS_clang_utf_util.c := unused-but-set-variable, \
|
||||
DISABLED_WARNINGS_microsoft_debugInit.c := 5287, \
|
||||
LDFLAGS := $(ICONV_LDFLAGS), \
|
||||
EXTRA_HEADER_DIRS := \
|
||||
include \
|
||||
|
||||
32
make/modules/jdk.jlink/Java.gmk
Normal file
32
make/modules/jdk.jlink/Java.gmk
Normal file
@ -0,0 +1,32 @@
|
||||
#
|
||||
# Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
|
||||
# Instruct SetupJavaCompilation for the jdk.jlink module to include
|
||||
# upgrade_files_<module-name>.conf files
|
||||
COPY += .conf
|
||||
|
||||
################################################################################
|
||||
@ -203,12 +203,12 @@ compare_permissions() {
|
||||
do
|
||||
if [ ! -f ${OTHER_DIR}/$f ]; then continue; fi
|
||||
if [ ! -f ${THIS_DIR}/$f ]; then continue; fi
|
||||
OP=`ls -l ${OTHER_DIR}/$f | awk '{printf("%.10s\n", $1);}'`
|
||||
TP=`ls -l ${THIS_DIR}/$f | awk '{printf("%.10s\n", $1);}'`
|
||||
OP=`ls -l ${OTHER_DIR}/$f | $AWK '{printf("%.10s\n", $1);}'`
|
||||
TP=`ls -l ${THIS_DIR}/$f | $AWK '{printf("%.10s\n", $1);}'`
|
||||
if [ "$OP" != "$TP" ]
|
||||
then
|
||||
if [ -z "$found" ]; then echo ; found="yes"; fi
|
||||
$PRINTF "\tother: ${OP} this: ${TP}\t$f\n"
|
||||
$PRINTF "\tother: %s this: %s\t%s\n" "${OP}" "${TP}" "$f"
|
||||
fi
|
||||
done
|
||||
if [ -z "$found" ]; then
|
||||
@ -260,7 +260,7 @@ compare_file_types() {
|
||||
continue
|
||||
else
|
||||
if [ -z "$found" ]; then echo ; found="yes"; fi
|
||||
$PRINTF "\tother: ${OF}\n\tthis : ${TF}\n"
|
||||
$PRINTF "\tother: %s\n\tthis : %s\n" "${OF}" "${TF}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -157,11 +157,21 @@ function import_path() {
|
||||
if [[ $? -eq 0 && -e "$unixpath" ]]; then
|
||||
if [[ ! "$winpath" =~ ^"$ENVROOT"\\.*$ ]] ; then
|
||||
# If it is not in envroot, it's a generic windows path
|
||||
if [[ ! $winpath =~ ^[-_.:\\a-zA-Z0-9]*$ ]] ; then
|
||||
if [[ ! $winpath =~ ^[-_.:~+\\a-zA-Z0-9]*$ ]] ; then
|
||||
# Path has forbidden characters, rewrite as short name
|
||||
# This monster of a command uses the %~s support from cmd.exe to
|
||||
# reliably convert to short paths on all winenvs.
|
||||
shortpath="$($CMD /q /c for %I in \( "$winpath" \) do echo %~sI 2>/dev/null | tr -d \\n\\r)"
|
||||
if [[ ! $shortpath =~ ^[-_.:~+\\a-zA-Z0-9]*$ ]] ; then
|
||||
if [[ $QUIET != true ]]; then
|
||||
echo fixpath: failure: Path "'"$path"'" could not be converted to short path >&2
|
||||
fi
|
||||
if [[ $IGNOREFAILURES != true ]]; then
|
||||
exit 1
|
||||
else
|
||||
shortpath=""
|
||||
fi
|
||||
fi
|
||||
unixpath="$($PATHTOOL -u "$shortpath")"
|
||||
# unixpath is based on short name
|
||||
fi
|
||||
|
||||
@ -68,8 +68,7 @@ if [ "`git status --porcelain=v1 .`x" != "x" ] ; then
|
||||
exit 1
|
||||
fi;
|
||||
|
||||
$1/bin/java --add-exports jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
|
||||
$1/bin/java --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
|
||||
--add-modules jdk.jdeps \
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#!/bin/bash -f
|
||||
|
||||
#
|
||||
# Copyright (c) 2010, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2010, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -41,10 +41,6 @@ set -e
|
||||
# To allow total changes counting
|
||||
shopt -s lastpipe
|
||||
|
||||
# Get an absolute path to this script, since that determines the top-level directory.
|
||||
this_script_dir=`dirname $0`
|
||||
this_script_dir=`cd $this_script_dir > /dev/null && pwd`
|
||||
|
||||
# Temp area
|
||||
tmp=/tmp/`basename $0`.${USER}.$$
|
||||
rm -f -r ${tmp}
|
||||
@ -98,10 +94,16 @@ while getopts "c:fhy:" option; do
|
||||
done
|
||||
|
||||
# VCS check
|
||||
git_installed=false
|
||||
which git > /dev/null && git_installed=true
|
||||
if [ "$git_installed" != "true" ]; then
|
||||
echo "Error: This script requires git. Please install it."
|
||||
exit 1
|
||||
fi
|
||||
git_found=false
|
||||
[ -d "${this_script_dir}/../../.git" ] && git_found=true
|
||||
git status &> /dev/null && git_found=true
|
||||
if [ "$git_found" != "true" ]; then
|
||||
echo "Error: Please execute script from within make/scripts."
|
||||
echo "Error: Please execute script from within a JDK git repository."
|
||||
exit 1
|
||||
else
|
||||
echo "Using Git version control system"
|
||||
|
||||
@ -119,7 +119,6 @@ $(JMH_UNPACKED_JARS_DONE): $(JMH_RUNTIME_JARS)
|
||||
$(foreach jar, $(JMH_RUNTIME_JARS), \
|
||||
$$($(UNZIP) -oq $(jar) -d $(JMH_UNPACKED_DIR)))
|
||||
$(RM) -r $(JMH_UNPACKED_DIR)/META-INF
|
||||
$(RM) $(JMH_UNPACKED_DIR)/*.xml
|
||||
$(TOUCH) $@
|
||||
|
||||
# Copy dependency files for inclusion in the benchmark JARs
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
ما هي الشفرة الموحدة "يونِكود" ؟
|
||||
ما هي الشفرة الموحدة "يونِكود" ؟
|
||||
|
||||
أساسًا، تتعامل الحواسيب فقط مع الأرقام، وتقوم بتخزين الأحرف والمحارف الأخرى بعد أن تُعطي رقما معينا لكل واحد منها. وقبل اختراع "يونِكود"، كان هناك مئات الأنظمة للتشفير وتخصيص هذه الأرقام للمحارف، ولم يوجد نظام تشفير واحد يحتوي على جميع المحارف الضرورية. وعلى سبيل المثال، فإن الاتحاد الأوروبي لوحده، احتوى العديد من الشفرات المختلفة ليغطي جميع اللغات المستخدمة في الاتحاد. وحتى لو اعتبرنا لغة واحدة، كاللغة الإنجليزية، فإن جدول شفرة واحد لم يكف لاستيعاب جميع الأحرف وعلامات الترقيم والرموز الفنية والعلمية الشائعة الاستعمال.
|
||||
|
||||
@ -8,4 +8,4 @@
|
||||
|
||||
تخصص الشفرة الموحدة "يونِكود" رقما وحيدا لكل محرف في جميع اللغات العالمية، وذلك بغض النظر عن نوع الحاسوب أو البرامج المستخدمة. وقد تـم تبني مواصفة "يونِكود" مــن قبـل قادة الصانعين لأنظمة الحواسيب فـي العالم، مثل شركات آي.بي.إم. (IBM)، أبـل (APPLE)، هِيـْولِـت بـاكـرد (Hewlett-Packard) ، مايكروسوفت (Microsoft)، أوراكِـل (Oracle) ، صن (Sun) وغيرها. كما أن المواصفات والمقاييس الحديثة (مثل لغة البرمجة "جافا" "JAVA" ولغة "إكس إم إل" "XML" التي تستخدم لبرمجة الانترنيت) تتطلب استخدام "يونِكود". علاوة على ذلك ، فإن "يونِكود" هي الطـريـقـة الرسـمية لتطبيق المقيـاس الـعـالـمي إيزو ١٠٦٤٦ (ISO 10646) .
|
||||
|
||||
إن بزوغ مواصفة "يونِكود" وتوفُّر الأنظمة التي تستخدمه وتدعمه، يعتبر من أهم الاختراعات الحديثة في عولمة البرمجيات لجميع اللغات في العالم. وإن استخدام "يونِكود" في عالم الانترنيت سيؤدي إلى توفير كبير مقارنة مع استخدام المجموعات التقليدية للمحارف المشفرة. كما أن استخدام "يونِكود" سيُمكِّن المبرمج من كتابة البرنامج مرة واحدة، واستخدامه على أي نوع من الأجهزة أو الأنظمة، ولأي لغة أو دولة في العالم أينما كانت، دون الحاجة لإعادة البرمجة أو إجراء أي تعديل. وأخيرا، فإن استخدام "يونِكود" سيمكن البيانات من الانتقال عبر الأنظمة والأجهزة المختلفة دون أي خطورة لتحريفها، مهما تعددت الشركات الصانعة للأنظمة واللغات، والدول التي تمر من خلالها هذه البيانات.
|
||||
إن بزوغ مواصفة "يونِكود" وتوفُّر الأنظمة التي تستخدمه وتدعمه، يعتبر من أهم الاختراعات الحديثة في عولمة البرمجيات لجميع اللغات في العالم. وإن استخدام "يونِكود" في عالم الانترنيت سيؤدي إلى توفير كبير مقارنة مع استخدام المجموعات التقليدية للمحارف المشفرة. كما أن استخدام "يونِكود" سيُمكِّن المبرمج من كتابة البرنامج مرة واحدة، واستخدامه على أي نوع من الأجهزة أو الأنظمة، ولأي لغة أو دولة في العالم أينما كانت، دون الحاجة لإعادة البرمجة أو إجراء أي تعديل. وأخيرا، فإن استخدام "يونِكود" سيمكن البيانات من الانتقال عبر الأنظمة والأجهزة المختلفة دون أي خطورة لتحريفها، مهما تعددت الشركات الصانعة للأنظمة واللغات، والدول التي تمر من خلالها هذه البيانات.
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
What is Unicode?
|
||||
What is Unicode?
|
||||
Unicode provides a unique number for every character,
|
||||
no matter what the platform,
|
||||
no matter what the program,
|
||||
@ -16,4 +16,4 @@ Incorporating Unicode into client-server or multi-tiered applications and websit
|
||||
About the Unicode Consortium
|
||||
The Unicode Consortium is a non-profit organization founded to develop, extend and promote use of the Unicode Standard, which specifies the representation of text in modern software products and standards. The membership of the consortium represents a broad spectrum of corporations and organizations in the computer and information processing industry. The consortium is supported financially solely through membership dues. Membership in the Unicode Consortium is open to organizations and individuals anywhere in the world who support the Unicode Standard and wish to assist in its extension and implementation.
|
||||
|
||||
For more information, see the Glossary, Unicode Enabled Products, Technical Introduction and Useful Resources.
|
||||
For more information, see the Glossary, Unicode Enabled Products, Technical Introduction and Useful Resources.
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Τι είναι το Unicode?
|
||||
Τι είναι το Unicode?
|
||||
|
||||
Η κωδικοσελίδα Unicode προτείνει έναν και μοναδικό αριθμό για κάθε χαρακτήρα,
|
||||
ανεξάρτητα από το λειτουργικό σύστημα,
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
|
||||
יוניקוד מקצה מספר ייחודי לכל תו,
|
||||
לא משנה על איזו פלטפורמה,
|
||||
לא משנה באיזו תוכנית,
|
||||
|
||||
יוניקוד מקצה מספר ייחודי לכל תו,
|
||||
לא משנה על איזו פלטפורמה,
|
||||
לא משנה באיזו תוכנית,
|
||||
ולא משנה באיזו שפה.
|
||||
|
||||
באופן בסיסי, מחשבים עוסקים רק במספרים. הם מאחסנים אותיות ותווים אחרים על-ידי הקצאת מספר לכל אחד מהם. בטרם הומצא היוניקוד, היו מאות מערכות קידוד שונות להקצאת המספרים הללו. אף לא אחת מהן יכלה להכיל כמות תווים מספקת. לדוגמא: רק לאיחוד האירופאי נדרשים כמה סוגי קידודים שונים על מנת לכסות את כל השפות המדוברות בו. יתירה מזאת אף לשפה בודדת, כמו אנגלית למשל, לא היה די במערכת קידוד אחת בעבור כל האותיות, סימני הפיסוק והסמלים הטכניים שבשימוש שוטף.
|
||||
באופן בסיסי, מחשבים עוסקים רק במספרים. הם מאחסנים אותיות ותווים אחרים על-ידי הקצאת מספר לכל אחד מהם. בטרם הומצא היוניקוד, היו מאות מערכות קידוד שונות להקצאת המספרים הללו. אף לא אחת מהן יכלה להכיל כמות תווים מספקת. לדוגמא: רק לאיחוד האירופאי נדרשים כמה סוגי קידודים שונים על מנת לכסות את כל השפות המדוברות בו. יתירה מזאת אף לשפה בודדת, כמו אנגלית למשל, לא היה די במערכת קידוד אחת בעבור כל האותיות, סימני הפיסוק והסמלים הטכניים שבשימוש שוטף.
|
||||
|
||||
מערכות קידוד אלו אף סותרות זו את זו. כלומר, שני קידודים יכולים להשתמש באותו מספר לשני תוים נבדלים, או להשתמש במספרים שונים לאותו תו. על כל מחשב (ובמיוחד שרתים) לתמוך במספר רב של מערכות קידוד שונות; אולם כל אימת שנתונים עוברים בין מערכות קידוד או פלטפורמות שונות קיים הסיכון שייפגמו.
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
שילוב יוניקוד ביישומי שרת-לקוח או ביישומים רבי-שכבות ובאתרי אינטרנט מאפשר חיסכון ניכר בעלויות לעומת השימוש בסדרות התווים המסורתיות. הודות ליוניקוד, מוצר תוכנה אחד או אתר יחיד ברשת יכול להרחיב את יעדיו למגוון פלטפורמות, ארצות ושפות ללא צורך בשינויים מרחיקים. יוניקוד מאפשר מעבר נתונים דרך מערכות רבות ושונות מבלי שייפגמו.
|
||||
|
||||
פרטים אודות הקונסורציום של יוניקוד (Unicode Consortium)
|
||||
פרטים אודות הקונסורציום של יוניקוד (Unicode Consortium)
|
||||
הקונסורציום של יוניקוד הוא ארגון ללא מטרת רווח שנוסד כדי לפתח, להרחיב ולקדם את השימוש בתקן יוניקוד, אשר מגדיר את ייצוג הטקסט במוצרי תוכנה ותקנים מודרניים. חברים בקונסורציום מגוון רחב של תאגידים וארגונים בתעשיית המחשבים ועיבוד המידע. הקונסורציום ממומן על-ידי דמי-חבר בלבד. החברות בקונסורציום יוניקוד פתוחה לארגונים ולאנשים פרטיים, בכל רחבי העולם, אשר תומכים בתקן יוניקוד ומעוניינים לסייע בהתפתחותו והטמעתו.
|
||||
|
||||
למידע נוסף, ראה מילון מונחים, רשימה חלקית של מוצרים מותאמים ליוניקוד, מבוא טכני ו- חומרי עזר [קישורים באנגלית].
|
||||
למידע נוסף, ראה מילון מונחים, רשימה חלקית של מוצרים מותאמים ליוניקוד, מבוא טכני ו- חומרי עזר [קישורים באנגלית].
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
यूनिकोड क्या है?
|
||||
यूनिकोड क्या है?
|
||||
यूनिकोड प्रत्येक अक्षर के लिए एक विशेष नम्बर प्रदान करता है,
|
||||
चाहे कोई भी प्लैटफॉर्म हो,
|
||||
चाहे कोई भी प्रोग्राम हो,
|
||||
@ -16,4 +16,4 @@
|
||||
यूनिकोड कन्सॉर्शियम के बारे में
|
||||
यूनिकोड कन्सॉर्शियम, लाभ न कमाने वाला एक संगठन है जिसकी स्थापना यूनिकोड स्टैंडर्ड, जो आधुनिक सॉफ्टवेयर उत्पादों और मानकों में पाठ की प्रस्तुति को निर्दिष्ट करता है, के विकास, विस्तार और इसके प्रयोग को बढ़ावा देने के लिए की गई थी। इस कन्सॉर्शियम के सदस्यों में, कम्प्यूटर और सूचना उद्योग में विभिन्न निगम और संगठन शामिल हैं। इस कन्सॉर्शियम का वित्तपोषण पूर्णतः सदस्यों के शुल्क से किया जाता है। यूनिकोड कन्सॉर्शियम में सदस्यता, विश्व में कहीं भी स्थित उन संगठनों और व्यक्तियों के लिए खुली है जो यूनिकोड का समर्थन करते हैं और जो इसके विस्तार और कार्यान्वयन में सहायता करना चाहते हैं।
|
||||
|
||||
अधिक जानकारी के लिए, शब्दावली, सैम्पल यूनिकोड-सक्षम उत्पाद, तकनीकी परिचय और उपयोगी स्रोत देखिए।
|
||||
अधिक जानकारी के लिए, शब्दावली, सैम्पल यूनिकोड-सक्षम उत्पाद, तकनीकी परिचय और उपयोगी स्रोत देखिए।
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
ユニコードとは何か?
|
||||
ユニコードとは何か?
|
||||
ユニコードは、すべての文字に固有の番号を付与します
|
||||
プラットフォームには依存しません
|
||||
プログラムにも依存しません
|
||||
@ -16,4 +16,4 @@
|
||||
ユニコードコンソーシアムについて
|
||||
ユニコードコンソーシアムは、最新のソフトウエア製品と標準においてテキストを表現することを意味する“ユニコード標準”の構築、発展、普及、利用促進を目的として設立された非営利組織です。同コンソーシアムの会員は、コンピューターと情報処理に係わる広汎な企業や組織から構成されています。同コンソーシアムは、財政的には、純粋に会費のみによって運営されています。ユニコード標準を支持し、その拡張と実装を支援する世界中の組織や個人は、だれもがユニコードコンソーシアムの会員なることができます。
|
||||
|
||||
より詳しいことをお知りになりたい方は、Glossary, Unicode-Enabled Products, Technical Introduction および Useful Resourcesをご参照ください。
|
||||
より詳しいことをお知りになりたい方は、Glossary, Unicode-Enabled Products, Technical Introduction および Useful Resourcesをご参照ください。
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
유니코드에 대해 ?
|
||||
유니코드에 대해 ?
|
||||
어떤 플랫폼,
|
||||
어떤 프로그램,
|
||||
어떤 언어에도 상관없이
|
||||
@ -16,4 +16,4 @@
|
||||
유니코드 콘소시엄에 대해
|
||||
유니코드 콘소시엄은 비영리 조직으로서 현대 소프트웨어 제품과 표준에서 텍스트의 표현을 지정하는 유니코드 표준의 사용을 개발하고 확장하며 장려하기 위해 세워졌습니다. 콘소시엄 멤버쉽은 컴퓨터와 정보 처리 산업에 종사하고 있는 광범위한 회사 및 조직의 범위를 나타냅니다. 콘소시엄의 재정은 전적으로 회비에 의해 충당됩니다. 유니코드 컨소시엄에서의 멤버쉽은 전 세계 어느 곳에서나 유니코드 표준을 지원하고 그 확장과 구현을 지원하고자하는 조직과 개인에게 개방되어 있습니다.
|
||||
|
||||
더 자세한 내용은 용어집, 예제 유니코드 사용 가능 제품, 기술 정보 및 기타 유용한 정보를 참조하십시오.
|
||||
더 자세한 내용은 용어집, 예제 유니코드 사용 가능 제품, 기술 정보 및 기타 유용한 정보를 참조하십시오.
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
Unicode คืออะไร?
|
||||
Unicode คืออะไร?
|
||||
Unicode กำหนดหมายเลขเฉพาะสำหรับทุกอักขระ
|
||||
โดยไม่สนใจว่าเป็นแพล็ตฟอร์มใด
|
||||
ไม่ขึ้นกับว่าจะเป็นโปรแกรมใด
|
||||
และไม่ว่าจะเป็นภาษาใด
|
||||
|
||||
โดยพื้นฐานแล้ว, คอมพิวเตอร์จะเกี่ยวข้องกับเรื่องของตัวเลข. คอมพิวเตอร์จัดเก็บตัวอักษรและอักขระอื่นๆ โดยการกำหนดหมายเลขให้สำหรับแต่ละตัว. ก่อนหน้าที่๊ Unicode จะถูกสร้างขึ้น, ได้มีระบบ encoding อยู่หลายร้อยระบบสำหรับการกำหนดหมายเลขเหล่านี้. ไม่มี encoding ใดที่มีจำนวนตัวอักขระมากเพียงพอ: ยกตัวอย่างเช่น, เฉพาะในกลุ่มสหภาพยุโรปเพียงแห่งเดียว ก็ต้องการหลาย encoding ในการครอบคลุมทุกภาษาในกลุ่ม. หรือแม้แต่ในภาษาเดี่ยว เช่น ภาษาอังกฤษ ก็ไม่มี encoding ใดที่เพียงพอสำหรับทุกตัวอักษร, เครื่องหมายวรรคตอน และสัญลักษณ์ทางเทคนิคที่ใช้กันอยู่ทั่วไป.
|
||||
โดยพื้นฐานแล้ว, คอมพิวเตอร์จะเกี่ยวข้องกับเรื่องของตัวเลข. คอมพิวเตอร์จัดเก็บตัวอักษรและอักขระอื่นๆ โดยการกำหนดหมายเลขให้สำหรับแต่ละตัว. ก่อนหน้าที่๊ Unicode จะถูกสร้างขึ้น, ได้มีระบบ encoding อยู่หลายร้อยระบบสำหรับการกำหนดหมายเลขเหล่านี้. ไม่มี encoding ใดที่มีจำนวนตัวอักขระมากเพียงพอ: ยกตัวอย่างเช่น, เฉพาะในกลุ่มสหภาพยุโรปเพียงแห่งเดียว ก็ต้องการหลาย encoding ในการครอบคลุมทุกภาษาในกลุ่ม. หรือแม้แต่ในภาษาเดี่ยว เช่น ภาษาอังกฤษ ก็ไม่มี encoding ใดที่เพียงพอสำหรับทุกตัวอักษร, เครื่องหมายวรรคตอน และสัญลักษณ์ทางเทคนิคที่ใช้กันอยู่ทั่วไป.
|
||||
|
||||
ระบบ encoding เหล่านี้ยังขัดแย้งซึ่งกันและกัน. นั่นก็คือ, ในสอง encoding สามารถใช้หมายเลขเดียวกันสำหรับตัวอักขระสองตัวที่แตกต่างกัน,หรือใช้หมายเลขต่างกันสำหรับอักขระตัวเดียวกัน. ในระบบคอมพิวเตอร์ (โดยเฉพาะเซิร์ฟเวอร์) ต้องมีการสนับสนุนหลาย encoding; และเมื่อข้อมูลที่ผ่านไปมาระหว่างการเข้ารหัสหรือแพล็ตฟอร์มที่ต่างกัน, ข้อมูลนั้นจะเสี่ยงต่อการผิดพลาดเสียหาย.
|
||||
|
||||
@ -14,6 +14,6 @@ Unicode กำหนดหมายเลขเฉพาะสำหรับแ
|
||||
การรวม Unicode เข้าไปในระบบไคลเอ็นต์-เซิร์ฟเวอร์ หรือแอ็พพลิเคชันแบบ multi-tiered และเว็บไซต์ จะทำให้เกิดการประหยัดค่าใช้จ่ายมากกว่าการใช้ชุดอักขระแบบเดิม. Unicode ทำให้ผลิตภัณฑ์ซอฟต์แวร์หนึ่งเดียว หรือเว็บไซต์แห่งเดียว รองรับได้หลายแพล็ตฟอร์ม, หลายภาษาและหลายประเทศโดยไม่ต้องทำการรื้อปรับระบบ. Unicode ยังทำให้ข้อมูลสามารถเคลื่อนย้ายไปมาในหลายๆ ระบบโดยไม่เกิดความผิดพลาดเสียหาย.
|
||||
|
||||
เกี่ยวกับ Unicode Consortium
|
||||
Unicode Consortium เป็นองค์กรไม่แสวงหากำไรที่ก่อตั้งขึ้นเพื่อพัฒนา, ขยายและส่งเสริมการใช้ Unicode Standard, ซึ่งกำหนดรูปแบบการแทนค่าของข้อความในผลิตภัณฑ์ซอฟต์แวร์และมาตรฐานใหม่ๆ. สมาชิกของสมาคมเป็นตัวแทนจากบริษัทและองค์กรในอุตสาหกรรมคอมพิวเตอร์และการประมวลผลสารสนเทศ. สมาคมได้รับการสนับสนุนทางการเงินผ่านทางค่าธรรมเนียมของการเป็นสมาชิกเท่านั้น. สมาชิกภาพของ Unicode Consortium เปิดกว้างสำหรับองค์กรหรือบุคคลใดๆ ในโลกที่ต้องการสนับสนุน Unicode Standard และช่วยเหลือการขยายตัวและการนำ Unicode ไปใช้งาน.
|
||||
Unicode Consortium เป็นองค์กรไม่แสวงหากำไรที่ก่อตั้งขึ้นเพื่อพัฒนา, ขยายและส่งเสริมการใช้ Unicode Standard, ซึ่งกำหนดรูปแบบการแทนค่าของข้อความในผลิตภัณฑ์ซอฟต์แวร์และมาตรฐานใหม่ๆ. สมาชิกของสมาคมเป็นตัวแทนจากบริษัทและองค์กรในอุตสาหกรรมคอมพิวเตอร์และการประมวลผลสารสนเทศ. สมาคมได้รับการสนับสนุนทางการเงินผ่านทางค่าธรรมเนียมของการเป็นสมาชิกเท่านั้น. สมาชิกภาพของ Unicode Consortium เปิดกว้างสำหรับองค์กรหรือบุคคลใดๆ ในโลกที่ต้องการสนับสนุน Unicode Standard และช่วยเหลือการขยายตัวและการนำ Unicode ไปใช้งาน.
|
||||
|
||||
สำหรับข้อมูลเพิ่มเติม, ให้ดูที่ Glossary, Sample Unicode-Enabled Products, Technical Introduction และ Useful Resources.
|
||||
สำหรับข้อมูลเพิ่มเติม, ให้ดูที่ Glossary, Sample Unicode-Enabled Products, Technical Introduction และ Useful Resources.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>README - CodePointIM</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Code Point Input Method</h1>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>自述文件——代码点输入法</title>
|
||||
|
||||
@ -63,7 +63,7 @@ public class CodePointInputMethodDescriptor implements InputMethodDescriptor {
|
||||
* Creates a new instance of the Code Point input method.
|
||||
*
|
||||
* @return a new instance of the Code Point input method
|
||||
* @exception Exception any exception that may occur while creating the
|
||||
* @throws Exception any exception that may occur while creating the
|
||||
* input method instance
|
||||
*/
|
||||
public InputMethod createInputMethod() throws Exception {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
|
||||
<META NAME="GENERATOR" CONTENT="Mozilla/4.02 [en] (X11; U; SunOS 5.6 sun4u) [Netscape]">
|
||||
<TITLE>Java L&F</TITLE>
|
||||
</HEAD>
|
||||
@ -39,7 +39,7 @@ icons used by the L&F.</P>
|
||||
<P>The theme mechanism is designed to allow developers to create
|
||||
their own themes. For an example of this, see the themes
|
||||
which are included with Metalworks. Note, like all of the L&F packages,
|
||||
the metal package is not yet frozen and the theme mechanism may change as
|
||||
the metal package is not yet frozen and the theme mechanism may change as
|
||||
we get developer feedback on how to improve it.</P>
|
||||
|
||||
<H1>
|
||||
@ -53,7 +53,7 @@ is an example:</P>
|
||||
|
||||
<PRE>
|
||||
JSlider slider = new JSlider();<BR>
|
||||
slider.putClientProperty("JSlider.isFilled",
|
||||
slider.putClientProperty("JSlider.isFilled",
|
||||
Boolean.TRUE);<BR> <BR>
|
||||
</PRE>
|
||||
|
||||
@ -64,7 +64,7 @@ to a different L&F.</P>
|
||||
|
||||
<H1>
|
||||
ToolBars</H1>
|
||||
<P>Many popular applications support "roll-over" effects on buttons in toolbars.
|
||||
<P>Many popular applications support "roll-over" effects on buttons in toolbars.
|
||||
The Java L&F provides an easy way to do this. Here is a code snippit:</P>
|
||||
|
||||
<PRE>
|
||||
@ -72,7 +72,7 @@ JToolBar toolbar = new JToolBar();<BR>
|
||||
|
||||
// add your buttons here<BR>
|
||||
|
||||
toolbar.putClientProperty("JToolBar.isRollover",
|
||||
toolbar.putClientProperty("JToolBar.isRollover",
|
||||
Boolean.TRUE);<BR>
|
||||
</PRE>
|
||||
|
||||
@ -98,7 +98,7 @@ myTree.putClientProperty("JTree.lineStyle",
|
||||
// This will provide lines separating root notes
|
||||
// it is the default setting
|
||||
myTree.putClientProperty("JTree.lineStyle",
|
||||
"Horizontal");
|
||||
"Horizontal");
|
||||
</PRE>
|
||||
|
||||
<P><A HREF="toc.html"><IMG alt="Back" SRC="back.gif" BORDER=0 HEIGHT=22 WIDTH=42 ALIGN=BOTTOM>Back</A>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
|
||||
<META NAME="GENERATOR" CONTENT="Mozilla/4.02 [en] (X11; U; SunOS 5.6 sun4u) [Netscape]">
|
||||
<TITLE>Metalworks</TITLE>
|
||||
</HEAD>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Untitled Document</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF">
|
||||
@ -10,106 +10,106 @@
|
||||
</h1>
|
||||
<p align="center"><img src="images/Octavo/ant.jpg" width="481" height="325"></p>
|
||||
<p align="center"> </p>
|
||||
<blockquote>
|
||||
<blockquote>
|
||||
<blockquote>
|
||||
<p><font size="4">This was a creature, more troublesom to be drawn, then any
|
||||
of the rest, for I could not, for a good while, think of a way to make it
|
||||
<p><font size="4">This was a creature, more troublesom to be drawn, then any
|
||||
of the rest, for I could not, for a good while, think of a way to make it
|
||||
suffer its body to ly quiet in a natural posture; but whil'st it was alive,
|
||||
if its feet were fetter'd in Wax or Glew, it would so twist and wind its body,
|
||||
that I could not any wayes get a good view of it; and if I killed it, its
|
||||
body was so little, that I did often spoile the shape of it, before I could
|
||||
throughly view it: for this is the nature of these minute Bodies, that as
|
||||
soon, almost, as ever their life is destroy'd, their parts immediately shrivel,
|
||||
and lose their beauty; and so is it also with small Plants, as I instanced
|
||||
if its feet were fetter'd in Wax or Glew, it would so twist and wind its body,
|
||||
that I could not any wayes get a good view of it; and if I killed it, its
|
||||
body was so little, that I did often spoile the shape of it, before I could
|
||||
throughly view it: for this is the nature of these minute Bodies, that as
|
||||
soon, almost, as ever their life is destroy'd, their parts immediately shrivel,
|
||||
and lose their beauty; and so is it also with small Plants, as I instanced
|
||||
before, in the description of Moss. </font></p>
|
||||
<p><font size="4">And thence also is the reason of the variations in the beards
|
||||
of wild Oats, and in those of Muskgrass seed, that their bodies, being exceeding
|
||||
small, those small variations which are made in the surfaces of all bodies,
|
||||
almost upon every change of Air, especially if the body be porous, do here
|
||||
become sensible, where the whole body is so small, that it is almost nothing
|
||||
but surface; for as in vegetable substances, I see no great reason to think,
|
||||
that the moisture of the Aire (that, sticking to a wreath'd beard, does make
|
||||
it untwist) should evaporate, or exhale away, any faster then the moisture
|
||||
of other bodies, but rather that the avolation from, or access of moisture
|
||||
to, the surfaces of bodies being much the same, those bodies become most
|
||||
sensible of it, which have the least proportion of body to their surface.
|
||||
<p><font size="4">And thence also is the reason of the variations in the beards
|
||||
of wild Oats, and in those of Muskgrass seed, that their bodies, being exceeding
|
||||
small, those small variations which are made in the surfaces of all bodies,
|
||||
almost upon every change of Air, especially if the body be porous, do here
|
||||
become sensible, where the whole body is so small, that it is almost nothing
|
||||
but surface; for as in vegetable substances, I see no great reason to think,
|
||||
that the moisture of the Aire (that, sticking to a wreath'd beard, does make
|
||||
it untwist) should evaporate, or exhale away, any faster then the moisture
|
||||
of other bodies, but rather that the avolation from, or access of moisture
|
||||
to, the surfaces of bodies being much the same, those bodies become most
|
||||
sensible of it, which have the least proportion of body to their surface.
|
||||
</font></p>
|
||||
<p><font size="4">So is it also with Animal substances; the dead body of an
|
||||
Ant, or such little creature, does almost instantly shrivel and dry, and
|
||||
your object shall be quite another thing, before you can half delineate
|
||||
it, which proceeds not from the extraordinary exhalation, but from the small
|
||||
proportion of body and juices, to the usual drying of bodies in the Air,
|
||||
<p><font size="4">So is it also with Animal substances; the dead body of an
|
||||
Ant, or such little creature, does almost instantly shrivel and dry, and
|
||||
your object shall be quite another thing, before you can half delineate
|
||||
it, which proceeds not from the extraordinary exhalation, but from the small
|
||||
proportion of body and juices, to the usual drying of bodies in the Air,
|
||||
especially if warm. </font></p>
|
||||
<p><font size="4">For which inconvenience, where I could not otherwise remove
|
||||
it, I thought of this expedient. I took the creature, I had design'd to delineate,
|
||||
and put it into a drop of very well rectified spirit of Wine, this I found
|
||||
would presently dispatch, as it were, the Animal, and being taken out of
|
||||
it, and lay'd on a paper,the spirit of Wine would immediately fly away,
|
||||
and leave the Animal dry, in its natural posture, or at least, in a constitution,
|
||||
that it might easily with a pin be plac'd, in what posture you desired to
|
||||
draw it, and the limbs would so remain, without either moving, or shriveling.
|
||||
<p><font size="4">For which inconvenience, where I could not otherwise remove
|
||||
it, I thought of this expedient. I took the creature, I had design'd to delineate,
|
||||
and put it into a drop of very well rectified spirit of Wine, this I found
|
||||
would presently dispatch, as it were, the Animal, and being taken out of
|
||||
it, and lay'd on a paper,the spirit of Wine would immediately fly away,
|
||||
and leave the Animal dry, in its natural posture, or at least, in a constitution,
|
||||
that it might easily with a pin be plac'd, in what posture you desired to
|
||||
draw it, and the limbs would so remain, without either moving, or shriveling.
|
||||
</font></p>
|
||||
<p><font size="4">And thus I dealt with this Ant, which I have here delineated,
|
||||
which was one of many, of a very large kind, that inhabited under the Roots
|
||||
of a Tree, from whence they would sally out in great parties, and make most
|
||||
grievous havock of the Flowers and Fruits, in the ambient Garden, and return back
|
||||
<p><font size="4">And thus I dealt with this Ant, which I have here delineated,
|
||||
which was one of many, of a very large kind, that inhabited under the Roots
|
||||
of a Tree, from whence they would sally out in great parties, and make most
|
||||
grievous havock of the Flowers and Fruits, in the ambient Garden, and return back
|
||||
again very expertly, by the same wayes and paths they went. </font></p>
|
||||
<p><font size="4">It was more then half the bigness of an Earwig, of a dark
|
||||
brown, or reddish colour, with long legs, on the hinder of which it would
|
||||
stand up, and raise its head as high as it could above the ground, that it
|
||||
might stare the further about it, just after the same manner as I have also
|
||||
observ'd a hunting Spider to do: and putting my finger towards them, they
|
||||
have at first all run towards it, till almost at it; and then they would stand
|
||||
round about it, at a certain distance, and smell, as it were, and consider
|
||||
whether they should any of them venture any further, till one more bold then
|
||||
the rest venturing to climb it, all the rest, if I would have suffered them,
|
||||
would have immediately followed : much such other seemingly rational actions
|
||||
I have observ'd in this little Vermine with much pleasure, which would be
|
||||
too long to be here related; those that desire more of them may satisfie
|
||||
<p><font size="4">It was more then half the bigness of an Earwig, of a dark
|
||||
brown, or reddish colour, with long legs, on the hinder of which it would
|
||||
stand up, and raise its head as high as it could above the ground, that it
|
||||
might stare the further about it, just after the same manner as I have also
|
||||
observ'd a hunting Spider to do: and putting my finger towards them, they
|
||||
have at first all run towards it, till almost at it; and then they would stand
|
||||
round about it, at a certain distance, and smell, as it were, and consider
|
||||
whether they should any of them venture any further, till one more bold then
|
||||
the rest venturing to climb it, all the rest, if I would have suffered them,
|
||||
would have immediately followed : much such other seemingly rational actions
|
||||
I have observ'd in this little Vermine with much pleasure, which would be
|
||||
too long to be here related; those that desire more of them may satisfie
|
||||
their curiosity in Ligons History of the Barbadoes. </font></p>
|
||||
<p><font size="4">Having insnar'd several of these into a small Box, I made
|
||||
choice of the tallest grown among them, and separating it from the rest,
|
||||
I gave it a Gill of Brandy, or Spirit of Wine, which after a while e'en knock'd
|
||||
him down dead drunk, so that he became moveless, though at first putting
|
||||
in he struggled for a pretty while very much, till at last, certain bubbles
|
||||
issuing out of his mouth, it ceased to move; this (because I had before found
|
||||
them quickly to recover again, if they were taken out presently) I suffered
|
||||
to lye above an hour in the Spirit; and after I had taken it out, and put
|
||||
its body and legs into a natural posture, remained moveless about an hour;
|
||||
but then, upon a sudden, as if it had been awaken out of a drunken sleep,
|
||||
it suddenly reviv'd and ran away; being caught, and serv'd as before, he
|
||||
for a while continued struggling and striving, till at last there issued
|
||||
several bubbles out of its mouth, and then, tanquam animam expirasset, he
|
||||
remained moveless for a good while ; but at length again recovering, it was
|
||||
again redipt, and suffered to lye some hours in the Spirit; notwithstanding
|
||||
which, after it had layen dry some three or four hours, it again recovered
|
||||
life and motion: Which kind of Experiments, if prosecuted, which they highly
|
||||
deserve, seem to me of no inconsiderable use towards the invention of the
|
||||
Latent Scheme, (as the Noble Ve rulam calls it) or the hidden, unknown Texture
|
||||
<p><font size="4">Having insnar'd several of these into a small Box, I made
|
||||
choice of the tallest grown among them, and separating it from the rest,
|
||||
I gave it a Gill of Brandy, or Spirit of Wine, which after a while e'en knock'd
|
||||
him down dead drunk, so that he became moveless, though at first putting
|
||||
in he struggled for a pretty while very much, till at last, certain bubbles
|
||||
issuing out of his mouth, it ceased to move; this (because I had before found
|
||||
them quickly to recover again, if they were taken out presently) I suffered
|
||||
to lye above an hour in the Spirit; and after I had taken it out, and put
|
||||
its body and legs into a natural posture, remained moveless about an hour;
|
||||
but then, upon a sudden, as if it had been awaken out of a drunken sleep,
|
||||
it suddenly reviv'd and ran away; being caught, and serv'd as before, he
|
||||
for a while continued struggling and striving, till at last there issued
|
||||
several bubbles out of its mouth, and then, tanquam animam expirasset, he
|
||||
remained moveless for a good while ; but at length again recovering, it was
|
||||
again redipt, and suffered to lye some hours in the Spirit; notwithstanding
|
||||
which, after it had layen dry some three or four hours, it again recovered
|
||||
life and motion: Which kind of Experiments, if prosecuted, which they highly
|
||||
deserve, seem to me of no inconsiderable use towards the invention of the
|
||||
Latent Scheme, (as the Noble Ve rulam calls it) or the hidden, unknown Texture
|
||||
of Bodies. </font></p>
|
||||
<p><font size="4">Of what Figure this Creature appear'd through the Microscope,
|
||||
the 32. Scheme (though not so carefully graven as it ought) will represent
|
||||
to the eye, namely, That it had a large head A A, at the upper end of which
|
||||
were two protuberant eyes, pearl'd like those of a Fly, but smaller B B;
|
||||
of the Nose, or foremost part, issued two horns C C, of a shape sufficiently
|
||||
differing from those of a blew Fly, though indeed they seem to be both the
|
||||
same kind of Organ, and to serve for a kind of smelling; beyond these were
|
||||
two indented jaws D D, which he open'd sideways, and was able to gape them
|
||||
asunder very wide; and the ends of them being armed with teeth, which meeting
|
||||
went between each other, it was able to grasp and hold a heavy body, three
|
||||
or four times the bulk and weight of its own body: It had only six legs,
|
||||
shap'd like those of a Fly, which, as I shewed before, is an Argument that
|
||||
it is a winged Insect, and though I could not perceive any sign of them in
|
||||
the middle part of its body (which seem'd to consist of three joints or pieces
|
||||
E F G, out of which sprung two legs, yet 'tis known that there are of them
|
||||
<p><font size="4">Of what Figure this Creature appear'd through the Microscope,
|
||||
the 32. Scheme (though not so carefully graven as it ought) will represent
|
||||
to the eye, namely, That it had a large head A A, at the upper end of which
|
||||
were two protuberant eyes, pearl'd like those of a Fly, but smaller B B;
|
||||
of the Nose, or foremost part, issued two horns C C, of a shape sufficiently
|
||||
differing from those of a blew Fly, though indeed they seem to be both the
|
||||
same kind of Organ, and to serve for a kind of smelling; beyond these were
|
||||
two indented jaws D D, which he open'd sideways, and was able to gape them
|
||||
asunder very wide; and the ends of them being armed with teeth, which meeting
|
||||
went between each other, it was able to grasp and hold a heavy body, three
|
||||
or four times the bulk and weight of its own body: It had only six legs,
|
||||
shap'd like those of a Fly, which, as I shewed before, is an Argument that
|
||||
it is a winged Insect, and though I could not perceive any sign of them in
|
||||
the middle part of its body (which seem'd to consist of three joints or pieces
|
||||
E F G, out of which sprung two legs, yet 'tis known that there are of them
|
||||
that have long wings, and fly up and down in the air. </font></p>
|
||||
<p><font size="4">The third and last part of its body I I I was bigger and
|
||||
larger then the other two, unto which it was joyn'd by a very small middle,
|
||||
and had a kind of loose shell, or another distinct part of its body H, which
|
||||
seem'd to be interpos'd, and to keep the thorax and belly from touching.
|
||||
The whole body was cas'd over with a very strong armour, and the belly I
|
||||
I I was covered likewise with multitudes of small white shining brisles;
|
||||
the legs, horns, head, and middle parts of its body were bestruck with hairs
|
||||
<p><font size="4">The third and last part of its body I I I was bigger and
|
||||
larger then the other two, unto which it was joyn'd by a very small middle,
|
||||
and had a kind of loose shell, or another distinct part of its body H, which
|
||||
seem'd to be interpos'd, and to keep the thorax and belly from touching.
|
||||
The whole body was cas'd over with a very strong armour, and the belly I
|
||||
I I was covered likewise with multitudes of small white shining brisles;
|
||||
the legs, horns, head, and middle parts of its body were bestruck with hairs
|
||||
also, but smaller and darker. </font></p>
|
||||
</blockquote>
|
||||
<p> </p>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user