Compare commits

..

92 Commits

Author SHA1 Message Date
Ravi Reddy
dbbaa9e632 Merge 2024-07-23 08:17:19 +00:00
Justin Lu
82220915e5 8331446: Improve deserialization support
Reviewed-by: naoto
Backport-of: 8e4a392832f83e16d521024505b52c96d0a993f2
2024-07-22 16:59:19 +00:00
luwang1103
cc687e87d9 8334239: Introduce macro for ubsan method/function exclusions
Backport-of: ff30240926
2024-07-22 08:36:17 +00:00
Dean Long
dfbb5e3ffa 8332644: Improve graph optimizations
Reviewed-by: kvn
Backport-of: 7c16d649a8118d2e7ee77cedba87e620c83294b4
2024-07-19 23:49:47 +00:00
Xiaolong Peng
9805cbbd25 8331411: Shenandoah: Reconsider spinning duration in ShenandoahLock
Reviewed-by: shade
Backport-of: 817edcb697
2024-07-19 15:19:58 +00:00
Shivangi Gupta
c5f294b439 8336301: test/jdk/java/nio/channels/AsyncCloseAndInterrupt.java leaves around a FIFO file upon test completion
Backport-of: ae9f318fc3
2024-07-17 12:13:38 +00:00
Ravi Reddy
39aab17724 Merge 2024-07-17 11:42:33 +00:00
luwang1103
e9d86d853f 8332818: ubsan: archiveHeapLoader.cpp:70:27: runtime error: applying non-zero offset 18446744073707454464 to null pointer
Backport-of: 6861766b63
2024-07-17 09:21:58 +00:00
luwang1103
821a3aa53e 8333887: ubsan: unsafe.cpp:247:13: runtime error: store to null pointer of type 'volatile int'
Backport-of: 0d3a3771c3
2024-07-17 09:20:01 +00:00
Vanitha B P
8883b15634 8325525: Create jtreg test case for JDK-8325203
Backport-of: 81a0d1ba03
2024-07-17 07:20:13 +00:00
Matthias Baesken
e4d80b1f6c 8334123: log the opening of Type 1 fonts
Backport-of: f8c657f671
2024-07-16 13:30:23 +00:00
Shivangi Gupta
4ca2e48acb 8299813: java/nio/channels/DatagramChannel/Disconnect.java fails with jtreg test timeout due to lost datagram
Backport-of: 49eb00da8d
2024-07-11 10:37:51 +00:00
Andrew John Hughes
5cfaec2df8 8335775: Remove extraneous 's' in comment of rawmonitor.cpp test file
Backport-of: ff49f677ee
2024-07-11 01:26:48 +00:00
Rob McKenna
13e53b8e3d Merge 2024-07-10 19:48:56 +00:00
Jorn Vernee
5b9ecb1786 8333886: Explicitly specify that asSlice and reinterpret return a memory segment backed by the same region of memory.
Reviewed-by: sundar
Backport-of: c80e2eb35c
2024-07-10 16:58:04 +00:00
Ravi Reddy
8f5c6e6b02 Merge 2024-07-10 14:32:14 +00:00
Kevin Walls
70ad622bc2 8335124: com/sun/management/ThreadMXBean/ThreadCpuTimeArray.java failed with CPU time out of expected range
Reviewed-by: cjplummer
Backport-of: 79a3554e1d
2024-07-09 19:39:25 +00:00
Liam Miller-Cushon
ca37a482cc 8334757: AssertionError: Missing type variable in where clause
Reviewed-by: jlahoda, vromero
Backport-of: babf6df7d9
2024-07-09 16:05:45 +00:00
Thomas Schatzl
ae10055b2c 8335824: Test gc/arguments/TestMinInitialErgonomics.java is timing out
Reviewed-by: kbarrett, ayang
Backport-of: 953c35eb5b
2024-07-09 08:12:38 +00:00
Jan Lahoda
4e52320979 8334433: jshell.exe runs an executable test.exe on startup
Reviewed-by: vromero
Backport-of: 99d2bbf767
2024-07-09 07:35:22 +00:00
Qizheng Xing
e0dad6d5ae 8335536: Fix assertion failure in IdealGraphPrinter when append is true
Backport-of: 6db4c6a772
2024-07-09 07:23:49 +00:00
Weibing Xiao
bbbfb7ff61 8334653: ISO 4217 Amendment 177 Update
Reviewed-by: naoto
Backport-of: 86b0cf259f
2024-07-08 13:00:34 +00:00
Chen Liang
2f60d36848 8335475: ClassBuilder incorrectly calculates max_locals in some cases
Reviewed-by: asotona
Backport-of: 1ef34c1833
2024-07-08 11:01:53 +00:00
Christoph Langer
b415b98139 8334297: (so) java/nio/channels/SocketChannel/OpenLeak.java should not depend on SecurityManager
Reviewed-by: mbaesken, dfuchs
Backport-of: 50bed6c67b
2024-07-06 20:01:16 +00:00
Erik Gahlin
90d5b5b4c4 8324089: Fix typo in the manual page for "jcmd" (man jcmd)
Reviewed-by: mgronlun
Backport-of: 0bb9c76288
2024-07-05 10:53:09 +00:00
Erik Gahlin
653c481d71 8335479: JFR: Missing documentation for -XX:StartFlightRecording
Reviewed-by: mgronlun
Backport-of: 68ffec9800
2024-07-05 10:17:50 +00:00
Erik Gahlin
10b28babe5 8322812: Manpage for jcmd is missing JFR.view command
Reviewed-by: mgronlun
Backport-of: 350f9c1947
2024-07-05 09:58:56 +00:00
Erik Österlund
d383365ea4 8334890: Missing unconditional cross modifying fence in nmethod entry barriers
Reviewed-by: aboldtch
Backport-of: c0604fb823
2024-07-05 07:54:43 +00:00
Neethu Prasad
2723ffa8ed 8333716: Shenandoah: Check for disarmed method before taking the nmethod lock
Reviewed-by: shade
Backport-of: 18e7d7b5e7
2024-07-05 05:19:17 +00:00
Sean Coffey
a4f938c623 8307383: Enhance DTLS connections
Backport-of: 362dbbaa952b3d4a5270c6bfae879a12e9bdf4d1
2024-07-04 15:27:37 +00:00
Vladimir Kozlov
b6d0ead93f 8335221: Some C2 intrinsics incorrectly assume that type argument is compile-time constant
Reviewed-by: thartmann
Backport-of: 166f9d9ac0
2024-07-02 17:04:13 +00:00
Emanuel Peter
272d11a389 8335390: C2 MergeStores: wrong result with Unsafe
Reviewed-by: thartmann
Backport-of: 9046d7aee3
2024-07-02 14:27:45 +00:00
Ravi Reddy
58dc4c7e0e Merge 2024-07-02 08:36:17 +00:00
Chris Plummer
9d744b0e04 8335134: Test com/sun/jdi/BreakpointOnClassPrepare.java timeout
Reviewed-by: dholmes
Backport-of: 4e8cbf884a
2024-07-01 22:43:47 +00:00
SendaoYan
4410cdc839 8334600: TEST java/net/MulticastSocket/IPMulticastIF.java fails on linux-aarch64
Reviewed-by: clanger
Backport-of: f23295ec1d
2024-07-01 15:48:32 +00:00
Sean Coffey
9a4fc097e0 Merge 2024-07-01 14:35:51 +00:00
Coleen Phillimore
7040de19bd 8333542: Breakpoint in parallel code does not work
Reviewed-by: cjplummer
Backport-of: b3bf31a0a0
2024-07-01 12:16:58 +00:00
Axel Boldt-Christmas
e5fbc631ca 8326820: Metadata artificially kept alive
Reviewed-by: stefank
Backport-of: 5909d54147
2024-07-01 10:24:28 +00:00
Daniel Fuchs
e78c682142 8333849: (dc) DatagramChannel send/receive fails with UOE if buffer backed by memory segment allocated from shared arena
Reviewed-by: alanb
Backport-of: e7dc76b577
2024-07-01 07:55:31 +00:00
Gui Cao
d494c21b9b 8333652: RISC-V: compiler/vectorapi/VectorGatherMaskFoldingTest.java fails when using RVV
Backport-of: ce5727df44
2024-06-29 11:32:09 +00:00
Vladimir Kozlov
87a29629e3 8335220: C2: Missing check for Opaque4 node in EscapeAnalysis
Reviewed-by: vlivanov
Backport-of: 9d986a013d
2024-06-29 02:20:07 +00:00
Alexey Ivanov
e2db30a534 6967482: TAB-key does not work in JTables after selecting details-view in JFileChooser
8166352: FilePane.createDetailsView() removes JTable TAB, SHIFT-TAB functionality

Backport-of: 711e723819
2024-06-28 13:59:29 +00:00
Erik Gahlin
32ed61572c 8334886: jdk/jfr/api/recording/time/TestTimeMultiple.java failed with RuntimeException: getStopTime() > afterStop
Reviewed-by: mgronlun
Backport-of: 0e6b0cbaaa
2024-06-27 22:07:32 +00:00
Vladimir Kozlov
62d0ee9cc0 8334421: assert(!oldbox->is_unbalanced()) failed: this should not be called for unbalanced region
Reviewed-by: shade, thartmann
Backport-of: 9c89f0861c
2024-06-27 19:29:18 +00:00
Matias Saavedra Silva
b5bf9a6605 8311208: Improve CDS Support
Reviewed-by: mschoene, ccheung, iklam
Backport-of: 2c60805bc380945a8266112c7b5aee0498cb7d5b
2024-06-27 18:01:07 +00:00
Anthony Scarpino
98fd657cfa 8326705: Test CertMsgCheck.java fails to find alert certificate_required
Reviewed-by: rhalade
Backport-of: 4ffc5e6077
2024-06-27 14:17:56 +00:00
Stefan Karlsson
d7b9454205 8324781: runtime/Thread/TestAlwaysPreTouchStacks.java failed with Expected a higher ratio between stack committed and reserved
8325218: gc/parallel/TestAlwaysPreTouchBehavior.java fails

Reviewed-by: tschatzl
Backport-of: 31e8debae6
2024-06-27 14:01:23 +00:00
nibjen
9449a53217 8332524: Instead of printing "TLSv1.3," it is showing "TLS13"
Backport-of: e681b4e9b3
2024-06-27 12:23:28 +00:00
Volodymyr Paprotski
b5fbdb2166 8333583: Crypto-XDH.generateSecret regression after JDK-8329538
Reviewed-by: thartmann, sviswanathan
Backport-of: f101e153ce
2024-06-26 15:24:19 +00:00
Tobias Hartmann
2086b0f070 8334629: [BACKOUT] PhaseIdealLoop::conditional_move is too conservative
Reviewed-by: chagedorn, qamai
Backport-of: 933eababf2
2024-06-26 10:49:44 +00:00
Aleksey Shipilev
d1510505c1 8334594: Generational ZGC: Deadlock after OopMap rewrites in 8331572
Reviewed-by: stefank
Backport-of: 05ff3185ed
2024-06-26 07:46:27 +00:00
Prasanta Sadhukhan
ae49182985 8334580: Deprecate no-arg constructor BasicSliderUI() for removal
Reviewed-by: aivanov
Backport-of: e527e1c32f
2024-06-26 02:59:02 +00:00
Sean Coffey
1ea6456172 8328726: Better Kerberos support
Backport-of: 7325899a11f17bf4516d39495a12796385e459ed
2024-06-25 11:41:04 +00:00
Erik Österlund
37ebecec88 8332717: ZGC: Division by zero in heuristics
Reviewed-by: shade
Backport-of: 2d4185f4f1
2024-06-25 07:57:09 +00:00
Sean Coffey
17858b2f07 Merge 2024-06-25 07:25:18 +00:00
Christoph Langer
08c7c38342 8222884: ConcurrentClassDescLookup.java times out intermittently
Reviewed-by: mdoerr
Backport-of: bd046d9b9e
2024-06-25 03:38:09 +00:00
Erik Gahlin
fa7521b29e 8323196: jdk/jfr/api/consumer/filestream/TestOrdered.java failed with "Events are not ordered! Reuse = false"
Reviewed-by: mgronlun
Backport-of: bdd96604ae
2024-06-24 17:53:14 +00:00
Prasanta Sadhukhan
fbcf6d9c4f 8334509: Cancelling PageDialog does not return the same PageFormat object
Reviewed-by: prr
Backport-of: 689cee3d09
2024-06-24 17:26:11 +00:00
Chen Liang
a124e6e5c7 8333748: javap crash - Fatal error: Unmatched bit position 0x2 for location CLASS
Reviewed-by: asotona
Backport-of: 7e55ed3b10
2024-06-24 12:57:37 +00:00
Vicente Romero
0779f0d668 8334762: [BACKOUT BACKPORT] Improve error for illegal early access from nested class
Reviewed-by: liach, mcimadamore
2024-06-24 12:38:19 +00:00
SendaoYan
bd66b6b6f9 8333358: java/io/IO/IO.java test fails intermittently
Reviewed-by: prappo
Backport-of: 1b1dba8082
2024-06-24 09:53:50 +00:00
Hannes Greule
3edf379b67 8334708: FFM: two javadoc problems
Reviewed-by: jpai
Backport-of: 72ca7bafcd
2024-06-24 06:30:12 +00:00
SendaoYan
10d81a337d 8334441: Mark tests in jdk_security_infra group as manual
Reviewed-by: clanger
Backport-of: 8e1d2b091c
2024-06-23 16:43:27 +00:00
Chen Liang
1dbad8058b 8333854: IllegalAccessError with proxies after JDK-8332457
Reviewed-by: asotona
Backport-of: 91bd85d65d
2024-06-21 22:33:23 +00:00
SendaoYan
215149310c 8334333: MissingResourceCauseTestRun.java fails if run by root
Reviewed-by: naoto
Backport-of: de8ee97718
2024-06-21 16:39:18 +00:00
Kevin Walls
23f2c97f4c 8333344: JMX attaching of Subject does not work when security manager not allowed
Reviewed-by: dfuchs
Backport-of: bcf4bb4882
2024-06-21 10:09:14 +00:00
Vicente Romero
e84e0cdf62 8334488: Improve error for illegal early access from nested class
Reviewed-by: mcimadamore
Backport-of: 7b3a96d570
2024-06-20 18:02:13 +00:00
Erik Gahlin
2243974d29 8304732: jdk/jfr/api/consumer/recordingstream/TestStop.java failed again with "Expected outer stream to have 3 events"
Reviewed-by: mgronlun
Backport-of: 856931d01f
2024-06-20 13:55:55 +00:00
Ravi Reddy
7e6693aeba 8328286: Enhance HTTP client
Backport-of: cf8dc79f392c8ec3414d8b36803f026852c4e386
2024-06-20 11:02:42 +00:00
Richard Reingruber
79dd575113 8334402: ProblemList test/hotspot/jtreg/compiler/c2/TestMergeStores.java on big endian platforms
Reviewed-by: kvn
2024-06-20 07:09:24 +00:00
Vicente Romero
12a61bce8d 8334043: VerifyError when inner class is accessed in prologue
Reviewed-by: jpai
Backport-of: d4c1373717
2024-06-19 04:00:58 +00:00
Vicente Romero
d9dd2d19b0 8334258: Compiler erronousely allows access to instance variable in argument expression of a constructor invocation
Reviewed-by: jpai
Backport-of: e227c7e37d
2024-06-19 04:00:37 +00:00
Daniel Fuchs
b21d7b23c1 8333804: java/net/httpclient/ForbiddenHeadTest.java threw an exception with 0 failures
Reviewed-by: jpai
Backport-of: ec1664e8c9
2024-06-18 18:46:03 +00:00
SendaoYan
867312a7e5 8334332: TestIOException.java fails if run by root
Reviewed-by: prappo
Backport-of: 472b935b44
2024-06-18 13:13:31 +00:00
Christoph Langer
a4b49253e3 8331675: gtest CollectorPolicy.young_min_ergo_vm fails after 8272364
Reviewed-by: ayang, mdoerr
Backport-of: badf1cb9ce
2024-06-18 12:11:28 +00:00
Daniel Fuchs
86fcbe09f8 8299487: Test java/net/httpclient/whitebox/SSLTubeTestDriver.java timed out
Reviewed-by: jpai
Backport-of: 81083a0e10
2024-06-17 16:03:26 +00:00
Markus Grönlund
48997f54c9 8326715: ZGC: RunThese24H fails with ExitCode 139 during shutdown
Reviewed-by: egahlin
Backport-of: cdf22b1320
2024-06-17 14:22:29 +00:00
Christoph Langer
4e3bfc926e 8211847: [aix] java/lang/ProcessHandle/InfoTest.java fails: "reported cputime less than expected"
Reviewed-by: mbaesken
Backport-of: f5213671f7
2024-06-17 12:20:39 +00:00
Christoph Langer
d0b4f9baab 8334222: exclude containers/cgroup/PlainRead.java
Reviewed-by: mbaesken
Backport-of: 5e09397bf6
2024-06-17 12:19:36 +00:00
Christoph Langer
cb3c45a698 8211854: [aix] java/net/ServerSocket/AcceptInheritHandle.java fails: read times out
Reviewed-by: mbaesken
Backport-of: 9d8439c107
2024-06-17 12:19:27 +00:00
Tobias Hartmann
63e95d8987 8328544: Improve handling of vectorization
Backport-of: b5174c9159fbffdf335ee6835267ba0e674cf432
2024-06-17 09:01:05 +00:00
Marc R. Hoffmann
10f71f7dd4 8334032: javax.print: Missing @since tag in new class OutputBin
Reviewed-by: prr
Backport-of: 0721dbe442
2024-06-13 22:25:10 +00:00
Damon Nguyen
a7964453cf 8333827: JDK 23 RDP1 L10n resource files update
Reviewed-by: jlu, naoto
Backport-of: c4702ca8c0
2024-06-13 21:48:34 +00:00
Viktor Klang
5230786a0d 8334162: Gatherer.defaultCombiner has an erronous @see-link
Reviewed-by: iris
Backport-of: cff048c735
2024-06-13 16:58:58 +00:00
Christoph Langer
378cd12f6b 8333724: Problem list security/infra/java/security/cert/CertPathValidator/certification/CAInterop.java#teliasonerarootcav1
Reviewed-by: mbaesken
Backport-of: 8ffc35d117
2024-06-13 13:25:26 +00:00
Christian Hagedorn
d96476d8bd 8332920: C2: Partial Peeling is wrongly applied for CmpU with negative limit
Reviewed-by: thartmann
Backport-of: ef101f1bf2
2024-06-12 06:17:07 +00:00
Ravi Reddy
1a43190e41 Merge 2024-06-12 05:48:21 +00:00
Rob McKenna
90bf3a809a 8334041: Bump version numbers for 23.0.1
Reviewed-by: kcr, iris
2024-06-11 20:33:03 +00:00
Serguei Spitsyn
b17a1c092f 8333931: Problemlist serviceability/jvmti/vthread/CarrierThreadEventNotification
Reviewed-by: cjplummer
Backport-of: fe9c63cf73
2024-06-11 17:19:03 +00:00
Matthew Donovan
9e22b6dec3 8333829: ProblemList sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java due to JDK-8333317
Reviewed-by: mullan
Backport-of: b25476200a
2024-06-11 12:43:10 +00:00
Volker Simonis
fdbc2b24d3 8333722: Fix CompilerDirectives for non-compiler JVM variants
Reviewed-by: thartmann
Backport-of: 5f9d3e3af8
2024-06-10 14:31:34 +00:00
Kevin Rushforth
31696a445c 8333743: Change .jcheck/conf branches property to match valid branches
Reviewed-by: iris, erikj
Backport-of: 2a37764e74
2024-06-06 22:07:16 +00:00
11930 changed files with 334194 additions and 673358 deletions

View File

@@ -1,68 +0,0 @@
#
# Copyright (c) 2023, 2024, 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.
#
name: 'Build JTReg'
description: 'Build JTReg'
runs:
using: composite
steps:
- name: 'Get JTReg version configuration'
id: version
uses: ./.github/actions/config
with:
var: JTREG_VERSION
- name: 'Check cache for already built JTReg'
id: get-cached
uses: actions/cache@v4
with:
path: jtreg/installed
key: jtreg-${{ steps.version.outputs.value }}
- name: 'Checkout the JTReg source'
uses: actions/checkout@v4
with:
repository: openjdk/jtreg
ref: jtreg-${{ steps.version.outputs.value }}
path: jtreg/src
if: (steps.get-cached.outputs.cache-hit != 'true')
- name: 'Build JTReg'
run: |
# Build JTReg and move files to the proper locations
bash make/build.sh --jdk "$JAVA_HOME_17_X64"
mkdir ../installed
mv build/images/jtreg/* ../installed
working-directory: jtreg/src
shell: bash
if: (steps.get-cached.outputs.cache-hit != 'true')
- name: 'Upload JTReg artifact'
uses: actions/upload-artifact@v4
with:
name: bundles-jtreg-${{ steps.version.outputs.value }}
path: jtreg/installed
retention-days: 1

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 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,6 +41,6 @@ runs:
id: read-config
run: |
# Extract value from configuration file
value="$(grep -h '^${{ inputs.var }}'= make/conf/github-actions.conf | cut -d '=' -f 2-)"
value="$(grep -h ${{ inputs.var }}= make/conf/github-actions.conf | cut -d '=' -f 2-)"
echo "value=$value" >> $GITHUB_OUTPUT
shell: bash

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 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

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 2023, 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

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 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

View File

@@ -24,7 +24,7 @@
#
name: 'Get JTReg'
description: 'Get JTReg'
description: 'Download JTReg from cache or source location'
outputs:
path:
description: 'Path to the installed JTReg'
@@ -39,12 +39,36 @@ runs:
with:
var: JTREG_VERSION
- name: 'Download JTReg artifact'
id: download-jtreg
uses: actions/download-artifact@v4
- name: 'Check cache for JTReg'
id: get-cached-jtreg
uses: actions/cache@v4
with:
name: bundles-jtreg-${{ steps.version.outputs.value }}
path: jtreg/installed
key: jtreg-${{ steps.version.outputs.value }}
- name: 'Checkout the JTReg source'
uses: actions/checkout@v4
with:
repository: openjdk/jtreg
ref: jtreg-${{ steps.version.outputs.value }}
path: jtreg/src
if: steps.get-cached-jtreg.outputs.cache-hit != 'true'
- name: 'Build JTReg'
run: |
# If runner architecture is x64 set JAVA_HOME_17_X64 otherwise set to JAVA_HOME_17_arm64
if [[ '${{ runner.arch }}' == 'X64' ]]; then
JDK="$JAVA_HOME_17_X64"
else
JDK="$JAVA_HOME_17_arm64"
fi
# Build JTReg and move files to the proper locations
bash make/build.sh --jdk "$JDK"
mkdir ../installed
mv build/images/jtreg/* ../installed
working-directory: jtreg/src
shell: bash
if: steps.get-cached-jtreg.outputs.cache-hit != 'true'
- name: 'Export path to where JTReg is installed'
id: path-name

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 2023, 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

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 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
@@ -45,7 +45,6 @@ runs:
jdk_bundle_tar_gz="$(ls build/*/bundles/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)"
mkdir bundles
@@ -61,11 +60,8 @@ runs:
if [[ "$tests_bundle" != "" ]]; then
mv "$tests_bundle" "bundles/tests-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
fi
if [[ "$static_libs_bundle" != "" ]]; then
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$symbols_bundle$tests_bundle" != "" ]]; then
echo 'bundles-found=true' >> $GITHUB_OUTPUT
else
echo 'bundles-found=false' >> $GITHUB_OUTPUT

View File

@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 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,19 +24,12 @@
# questions.
#
# Import common utils
. .github/scripts/report-utils.sh
GITHUB_STEP_SUMMARY="$1"
BUILD_DIR="$(ls -d build/*)"
# Send signal to the do-build action that we failed
touch "$BUILD_DIR/build-failure"
# Collect hs_errs for build-time crashes, e.g. javac, jmod, jlink, CDS.
# These usually land in make/
hs_err_files=$(ls make/hs_err*.log 2> /dev/null || true)
(
echo '### :boom: Build failure summary'
echo ''
@@ -53,20 +46,6 @@ hs_err_files=$(ls make/hs_err*.log 2> /dev/null || true)
echo '</details>'
echo ''
for hs_err in $hs_err_files; do
echo "<details><summary><b>View HotSpot error log: "$hs_err"</b></summary>"
echo ''
echo '```'
echo "$hs_err:"
echo ''
cat "$hs_err"
echo '```'
echo '</details>'
echo ''
done
echo ''
echo ':arrow_right: To see the entire test log, click the job in the list to the left. To download logs, see the `failure-logs` [artifact above](#artifacts).'
) >> $GITHUB_STEP_SUMMARY
truncate_summary

View File

@@ -24,9 +24,6 @@
# questions.
#
# Import common utils
. .github/scripts/report-utils.sh
GITHUB_STEP_SUMMARY="$1"
test_suite_name=$(cat build/run-test-prebuilt/test-support/test-last-ids.txt)
@@ -92,6 +89,18 @@ for test in $failures $errors; do
fi
done >> $GITHUB_STEP_SUMMARY
echo ':arrow_right: To see the entire test log, click the job in the list to the left.' >> $GITHUB_STEP_SUMMARY
# With many failures, the summary can easily exceed 1024 kB, the limit set by Github
# Trim it down if so.
summary_size=$(wc -c < $GITHUB_STEP_SUMMARY)
if [[ $summary_size -gt 1000000 ]]; then
# Trim to below 1024 kB, and cut off after the last detail group
head -c 1000000 $GITHUB_STEP_SUMMARY | tac | sed -n -e '/<\/details>/,$ p' | tac > $GITHUB_STEP_SUMMARY.tmp
mv $GITHUB_STEP_SUMMARY.tmp $GITHUB_STEP_SUMMARY
(
echo ''
echo ':x: **WARNING: Summary is too large and has been truncated.**'
echo ''
) >> $GITHUB_STEP_SUMMARY
fi
truncate_summary
echo ':arrow_right: To see the entire test log, click the job in the list to the left.' >> $GITHUB_STEP_SUMMARY

View File

@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 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

View File

@@ -1,41 +0,0 @@
#!/bin/bash
#
# Copyright (c) 2024, 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.
#
function truncate_summary() {
# With large hs_errs, the summary can easily exceed 1024 kB, the limit set by Github
# Trim it down if so.
summary_size=$(wc -c < $GITHUB_STEP_SUMMARY)
if [[ $summary_size -gt 1000000 ]]; then
# Trim to below 1024 kB, and cut off after the last detail group
head -c 1000000 $GITHUB_STEP_SUMMARY | tac | sed -n -e '/<\/details>/,$ p' | tac > $GITHUB_STEP_SUMMARY.tmp
mv $GITHUB_STEP_SUMMARY.tmp $GITHUB_STEP_SUMMARY
(
echo ''
echo ':x: **WARNING: Summary is too large and has been truncated.**'
echo ''
) >> $GITHUB_STEP_SUMMARY
fi
}

View File

@@ -1,112 +0,0 @@
#
# Copyright (c) 2024, 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.
#
name: 'Build (alpine-linux)'
on:
workflow_call:
inputs:
platform:
required: true
type: string
extra-conf-options:
required: false
type: string
make-target:
required: false
type: string
default: 'product-bundles test-bundles'
debug-levels:
required: false
type: string
default: '[ "debug", "release" ]'
apk-extra-packages:
required: false
type: string
configure-arguments:
required: false
type: string
make-arguments:
required: false
type: string
jobs:
build-linux:
name: build
runs-on: ubuntu-22.04
container:
image: alpine:3.20
strategy:
fail-fast: false
matrix:
debug-level: ${{ fromJSON(inputs.debug-levels) }}
include:
- debug-level: debug
flags: --with-debug-level=fastdebug
suffix: -debug+
steps:
- name: 'Checkout the JDK source'
uses: actions/checkout@v4
- name: 'Install toolchain and dependencies'
run: |
apk update
apk add alpine-sdk alsa-lib-dev autoconf bash cups-dev cups-libs fontconfig-dev freetype-dev grep libx11-dev libxext-dev libxrandr-dev libxrender-dev libxt-dev libxtst-dev linux-headers wget zip ${{ inputs.apk-extra-packages }}
- name: 'Get the BootJDK'
id: bootjdk
uses: ./.github/actions/get-bootjdk
with:
platform: alpine-linux-x64
- name: 'Configure'
run: >
bash configure
--with-conf-name=${{ inputs.platform }}
${{ matrix.flags }}
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
--with-zlib=system
--with-jmod-compress=zip-1
${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
echo "Dumping config.log:" &&
cat config.log &&
exit 1)
- name: 'Build'
id: build
uses: ./.github/actions/do-build
with:
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
platform: ${{ inputs.platform }}
debug-suffix: '${{ matrix.suffix }}'
- name: 'Upload bundles'
uses: ./.github/actions/upload-bundles
with:
platform: ${{ inputs.platform }}
debug-suffix: '${{ matrix.suffix }}'

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 2023, 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
@@ -131,7 +131,6 @@ jobs:
id: create-sysroot
run: >
sudo debootstrap
--no-merged-usr
--arch=${{ matrix.debian-arch }}
--verbose
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype-dev,libpng-dev
@@ -152,9 +151,6 @@ jobs:
rm -rf sysroot/usr/{sbin,bin,share}
rm -rf sysroot/usr/lib/{apt,gcc,udev,systemd}
rm -rf sysroot/usr/libexec/gcc
# /{bin,sbin,lib}/ are not symbolic links to /usr/{bin,sbin,lib}/ when debootstrap with --no-merged-usr
rm -rf sysroot/{sbin,bin}
rm -rf sysroot/lib/{udev,systemd}
if: steps.create-sysroot.outcome == 'success' && steps.get-cached-sysroot.outputs.cache-hit != 'true'
- name: 'Remove broken sysroot'

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 2023, 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
@@ -133,12 +133,8 @@ jobs:
- name: 'Build'
id: build
uses: ./.github/actions/do-build
env:
# Only build static-libs-bundles for release builds.
# For debug builds, building static-libs often exceeds disk space.
STATIC_LIBS: ${{ matrix.debug-level == 'release' && 'static-libs-bundles' }}
with:
make-target: '${{ inputs.make-target }} ${STATIC_LIBS} ${{ inputs.make-arguments }}'
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
platform: ${{ inputs.platform }}
debug-suffix: '${{ matrix.suffix }}'

View File

@@ -36,7 +36,7 @@ on:
platforms:
description: 'Platform(s) to execute on (comma separated, e.g. "linux-x64, macos, aarch64")'
required: true
default: 'linux-x64, linux-x64-variants, linux-cross-compile, alpine-linux-x64, macos-x64, macos-aarch64, windows-x64, windows-aarch64, docs'
default: 'linux-x64, linux-x86, linux-x64-variants, linux-cross-compile, macos-x64, macos-aarch64, windows-x64, windows-aarch64, docs'
configure-arguments:
description: 'Additional configure arguments'
required: false
@@ -54,17 +54,14 @@ jobs:
### Determine platforms to include
###
prepare:
name: 'Prepare the run'
select:
name: 'Select platforms'
runs-on: ubuntu-22.04
env:
# List of platforms to exclude by default
EXCLUDED_PLATFORMS: 'alpine-linux-x64'
outputs:
linux-x64: ${{ steps.include.outputs.linux-x64 }}
linux-x86: ${{ steps.include.outputs.linux-x86 }}
linux-x64-variants: ${{ steps.include.outputs.linux-x64-variants }}
linux-cross-compile: ${{ steps.include.outputs.linux-cross-compile }}
alpine-linux-x64: ${{ steps.include.outputs.alpine-linux-x64 }}
macos-x64: ${{ steps.include.outputs.macos-x64 }}
macos-aarch64: ${{ steps.include.outputs.macos-aarch64 }}
windows-x64: ${{ steps.include.outputs.windows-x64 }}
@@ -72,19 +69,7 @@ jobs:
docs: ${{ steps.include.outputs.docs }}
steps:
- name: 'Checkout the scripts'
uses: actions/checkout@v4
with:
sparse-checkout: |
.github
make/conf/github-actions.conf
- name: 'Build JTReg'
id: jtreg
uses: ./.github/actions/build-jtreg
# TODO: Now that we are checking out the repo scripts, we can put the following code
# into a separate file
# This function must be inlined in main.yml, or we'd be forced to checkout the repo
- name: 'Check what jobs to run'
id: include
run: |
@@ -93,10 +78,6 @@ jobs:
# Returns 'true' if the input platform list matches any of the platform monikers given as argument,
# 'false' otherwise.
# arg $1: platform name or names to look for
# Convert EXCLUDED_PLATFORMS from a comma-separated string to an array
IFS=',' read -r -a excluded_array <<< "$EXCLUDED_PLATFORMS"
function check_platform() {
if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then
input='${{ github.event.inputs.platforms }}'
@@ -113,13 +94,7 @@ jobs:
normalized_input="$(echo ,$input, | tr -d ' ')"
if [[ "$normalized_input" == ",," ]]; then
# For an empty input, assume all platforms should run, except those in the EXCLUDED_PLATFORMS list
for excluded in "${excluded_array[@]}"; do
if [[ "$1" == "$excluded" ]]; then
echo 'false'
return
fi
done
# For an empty input, assume all platforms should run
echo 'true'
return
else
@@ -130,23 +105,15 @@ jobs:
return
fi
done
# If not explicitly included, check against the EXCLUDED_PLATFORMS list
for excluded in "${excluded_array[@]}"; do
if [[ "$1" == "$excluded" ]]; then
echo 'false'
return
fi
done
fi
echo 'false'
}
echo "linux-x64=$(check_platform linux-x64 linux x64)" >> $GITHUB_OUTPUT
echo "linux-x86=$(check_platform linux-x86 linux x86)" >> $GITHUB_OUTPUT
echo "linux-x64-variants=$(check_platform linux-x64-variants variants)" >> $GITHUB_OUTPUT
echo "linux-cross-compile=$(check_platform linux-cross-compile cross-compile)" >> $GITHUB_OUTPUT
echo "alpine-linux-x64=$(check_platform alpine-linux-x64 alpine-linux x64)" >> $GITHUB_OUTPUT
echo "macos-x64=$(check_platform macos-x64 macos x64)" >> $GITHUB_OUTPUT
echo "macos-aarch64=$(check_platform macos-aarch64 macos aarch64)" >> $GITHUB_OUTPUT
echo "windows-x64=$(check_platform windows-x64 windows x64)" >> $GITHUB_OUTPUT
@@ -159,18 +126,35 @@ jobs:
build-linux-x64:
name: linux-x64
needs: prepare
needs: select
uses: ./.github/workflows/build-linux.yml
with:
platform: linux-x64
gcc-major-version: '10'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.prepare.outputs.linux-x64 == 'true'
if: needs.select.outputs.linux-x64 == 'true'
build-linux-x86:
name: linux-x86
needs: select
uses: ./.github/workflows/build-linux.yml
with:
platform: linux-x86
gcc-major-version: '10'
gcc-package-suffix: '-multilib'
apt-architecture: 'i386'
# Some multilib libraries do not have proper inter-dependencies, so we have to
# install their dependencies manually.
apt-extra-packages: 'libfreetype-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libc6-i386 libgcc-s1:i386 libstdc++6:i386 libffi-dev:i386'
extra-conf-options: '--with-target-bits=32 --enable-fallback-linker --enable-libffi-bundling'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.select.outputs.linux-x86 == 'true'
build-linux-x64-hs-nopch:
name: linux-x64-hs-nopch
needs: prepare
needs: select
uses: ./.github/workflows/build-linux.yml
with:
platform: linux-x64
@@ -180,11 +164,11 @@ jobs:
extra-conf-options: '--disable-precompiled-headers'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.prepare.outputs.linux-x64-variants == 'true'
if: needs.select.outputs.linux-x64-variants == 'true'
build-linux-x64-hs-zero:
name: linux-x64-hs-zero
needs: prepare
needs: select
uses: ./.github/workflows/build-linux.yml
with:
platform: linux-x64
@@ -194,11 +178,11 @@ jobs:
extra-conf-options: '--with-jvm-variants=zero --disable-precompiled-headers'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.prepare.outputs.linux-x64-variants == 'true'
if: needs.select.outputs.linux-x64-variants == 'true'
build-linux-x64-hs-minimal:
name: linux-x64-hs-minimal
needs: prepare
needs: select
uses: ./.github/workflows/build-linux.yml
with:
platform: linux-x64
@@ -208,11 +192,11 @@ jobs:
extra-conf-options: '--with-jvm-variants=minimal --disable-precompiled-headers'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.prepare.outputs.linux-x64-variants == 'true'
if: needs.select.outputs.linux-x64-variants == 'true'
build-linux-x64-hs-optimized:
name: linux-x64-hs-optimized
needs: prepare
needs: select
uses: ./.github/workflows/build-linux.yml
with:
platform: linux-x64
@@ -223,31 +207,22 @@ jobs:
extra-conf-options: '--with-debug-level=optimized --disable-precompiled-headers'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.prepare.outputs.linux-x64-variants == 'true'
if: needs.select.outputs.linux-x64-variants == 'true'
build-linux-cross-compile:
name: linux-cross-compile
needs: prepare
needs:
- select
uses: ./.github/workflows/build-cross-compile.yml
with:
gcc-major-version: '10'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.prepare.outputs.linux-cross-compile == 'true'
build-alpine-linux-x64:
name: alpine-linux-x64
needs: prepare
uses: ./.github/workflows/build-alpine-linux.yml
with:
platform: alpine-linux-x64
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.prepare.outputs.alpine-linux-x64 == 'true'
if: needs.select.outputs.linux-cross-compile == 'true'
build-macos-x64:
name: macos-x64
needs: prepare
needs: select
uses: ./.github/workflows/build-macos.yml
with:
platform: macos-x64
@@ -255,23 +230,23 @@ jobs:
xcode-toolset-version: '14.3.1'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.prepare.outputs.macos-x64 == 'true'
if: needs.select.outputs.macos-x64 == 'true'
build-macos-aarch64:
name: macos-aarch64
needs: prepare
needs: select
uses: ./.github/workflows/build-macos.yml
with:
platform: macos-aarch64
runs-on: 'macos-14'
xcode-toolset-version: '15.4'
xcode-toolset-version: '14.3.1'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.prepare.outputs.macos-aarch64 == 'true'
if: needs.select.outputs.macos-aarch64 == 'true'
build-windows-x64:
name: windows-x64
needs: prepare
needs: select
uses: ./.github/workflows/build-windows.yml
with:
platform: windows-x64
@@ -279,11 +254,11 @@ jobs:
msvc-toolset-architecture: 'x86.x64'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.prepare.outputs.windows-x64 == 'true'
if: needs.select.outputs.windows-x64 == 'true'
build-windows-aarch64:
name: windows-aarch64
needs: prepare
needs: select
uses: ./.github/workflows/build-windows.yml
with:
platform: windows-aarch64
@@ -293,11 +268,11 @@ jobs:
extra-conf-options: '--openjdk-target=aarch64-unknown-cygwin'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.prepare.outputs.windows-aarch64 == 'true'
if: needs.select.outputs.windows-aarch64 == 'true'
build-docs:
name: docs
needs: prepare
needs: select
uses: ./.github/workflows/build-linux.yml
with:
platform: linux-x64
@@ -309,7 +284,7 @@ jobs:
gcc-major-version: '10'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.prepare.outputs.docs == 'true'
if: needs.select.outputs.docs == 'true'
###
### Test jobs
@@ -325,6 +300,16 @@ jobs:
bootjdk-platform: linux-x64
runs-on: ubuntu-22.04
test-linux-x86:
name: linux-x86
needs:
- build-linux-x86
uses: ./.github/workflows/test.yml
with:
platform: linux-x86
bootjdk-platform: linux-x64
runs-on: ubuntu-22.04
test-macos-x64:
name: macos-x64
needs:
@@ -334,7 +319,6 @@ jobs:
platform: macos-x64
bootjdk-platform: macos-x64
runs-on: macos-13
xcode-toolset-version: '14.3.1'
test-macos-aarch64:
name: macos-aarch64
@@ -345,7 +329,6 @@ jobs:
platform: macos-aarch64
bootjdk-platform: macos-aarch64
runs-on: macos-14
xcode-toolset-version: '15.4'
test-windows-x64:
name: windows-x64
@@ -356,3 +339,50 @@ jobs:
platform: windows-x64
bootjdk-platform: windows-x64
runs-on: windows-2019
# Remove bundles so they are not misconstrued as binary distributions from the JDK project
remove-bundles:
name: 'Remove bundle artifacts'
runs-on: ubuntu-22.04
if: always()
needs:
- build-linux-x64
- build-linux-x86
- build-linux-x64-hs-nopch
- build-linux-x64-hs-zero
- build-linux-x64-hs-minimal
- build-linux-x64-hs-optimized
- build-linux-cross-compile
- build-macos-x64
- build-macos-aarch64
- build-windows-x64
- build-windows-aarch64
- test-linux-x64
- test-linux-x86
- test-macos-x64
- test-windows-x64
steps:
# Hack to get hold of the api environment variables that are only defined for actions
- name: 'Get API configuration'
id: api
uses: actions/github-script@v7
with:
script: 'return { url: process.env["ACTIONS_RUNTIME_URL"], token: process.env["ACTIONS_RUNTIME_TOKEN"] }'
- name: 'Remove bundle artifacts'
run: |
# Find and remove all bundle artifacts
ALL_ARTIFACT_URLS="$(curl -s \
-H 'Accept: application/json;api-version=6.0-preview' \
-H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
'${{ fromJson(steps.api.outputs.result).url }}_apis/pipelines/workflows/${{ github.run_id }}/artifacts?api-version=6.0-preview')"
BUNDLE_ARTIFACT_URLS="$(echo "$ALL_ARTIFACT_URLS" | jq -r -c '.value | map(select(.name|startswith("bundles-"))) | .[].url')"
for url in $BUNDLE_ARTIFACT_URLS; do
echo "Removing $url"
curl -s \
-H 'Accept: application/json;api-version=6.0-preview' \
-H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
-X DELETE "$url" \
|| echo "Failed to remove bundle"
done

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 2023, 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
@@ -37,9 +37,6 @@ on:
runs-on:
required: true
type: string
xcode-toolset-version:
required: false
type: string
env:
# These are needed to make the MSYS2 bash work properly
@@ -66,6 +63,7 @@ jobs:
- 'hs/tier1 compiler part 1'
- 'hs/tier1 compiler part 2'
- 'hs/tier1 compiler part 3'
- 'hs/tier1 compiler not-xcomp'
- 'hs/tier1 gc'
- 'hs/tier1 runtime'
- 'hs/tier1 serviceability'
@@ -100,6 +98,10 @@ jobs:
test-suite: 'test/hotspot/jtreg/:tier1_compiler_3'
debug-suffix: -debug
- test-name: 'hs/tier1 compiler not-xcomp'
test-suite: 'test/hotspot/jtreg/:tier1_compiler_not_xcomp'
debug-suffix: -debug
- test-name: 'hs/tier1 gc'
test-suite: 'test/hotspot/jtreg/:tier1_gc'
debug-suffix: -debug
@@ -145,7 +147,7 @@ jobs:
run: |
# On macOS we need to install some dependencies for testing
brew install make
sudo xcode-select --switch /Applications/Xcode_${{ inputs.xcode-toolset-version }}.app/Contents/Developer
sudo xcode-select --switch /Applications/Xcode_14.3.1.app/Contents/Developer
# This will make GNU make available as 'make' and not only as 'gmake'
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH
if: runner.os == 'macOS'

2
.gitignore vendored
View File

@@ -20,5 +20,3 @@ NashornProfile.txt
/.settings/
/compile_commands.json
/.cache
/.gdbinit
/.lldbinit

View File

@@ -1,11 +1,11 @@
[general]
project=jdk
project=jdk-updates
jbs=JDK
version=25
version=23.0.1
[checks]
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists
warning=issuestitle,binary
warning=issuestitle
[repository]
tags=(?:jdk-(?:[1-9]([0-9]*)(?:\.(?:0|[1-9][0-9]*)){0,4})(?:\+(?:(?:[0-9]+))|(?:-ga)))|(?:jdk[4-9](?:u\d{1,3})?-(?:(?:b\d{2,3})|(?:ga)))|(?:hs\d\d(?:\.\d{1,2})?-b\d\d)

View File

@@ -1,3 +0,0 @@
# JDK Vulnerabilities
Please follow the process outlined in the [OpenJDK Vulnerability Policy](https://openjdk.org/groups/vulnerability/report) to disclose vulnerabilities in the JDK.

View File

@@ -329,8 +329,8 @@ GB of free disk space is required.</p>
<p>Even for 32-bit builds, it is recommended to use a 64-bit build
machine, and instead create a 32-bit target using
<code>--with-target-bits=32</code>.</p>
<p>Note: The 32-bit x86 port is deprecated and may be removed in a
future release.</p>
<p>Note: The Windows 32-bit x86 port is deprecated and may be removed in
a future release.</p>
<h3 id="building-on-aarch64">Building on aarch64</h3>
<p>At a minimum, a machine with 8 cores is advisable, as well as 8 GB of
RAM. (The more cores to use, the more memory you need.) At least 6 GB of
@@ -393,7 +393,8 @@ Build Platforms</a>. From time to time, this is updated by contributors
to list successes or failures of building on different platforms.</p>
<h3 id="windows">Windows</h3>
<p>Windows XP is not a supported platform, but all newer Windows should
be able to build the JDK.</p>
be able to build the JDK. (Note: The Windows 32-bit x86 port is
deprecated and may be removed in a future release.)</p>
<p>On Windows, it is important that you pay attention to the
instructions in the <a href="#special-considerations">Special
Considerations</a>.</p>
@@ -613,9 +614,10 @@ be accepted by <code>configure</code>.</p>
<code>--with-toolchain-type=clang</code>.</p>
<h3 id="apple-xcode">Apple Xcode</h3>
<p>The oldest supported version of Xcode is 13.0.</p>
<p>You will need to download Xcode either from the App Store or specific
versions can be easily located via the <a
href="https://xcodereleases.com">Xcode Releases</a> website.</p>
<p>You will need the Xcode command line developer tools to be able to
build the JDK. (Actually, <em>only</em> the command line tools are
needed, not the IDE.) The simplest way to install these is to run:</p>
<pre><code>xcode-select --install</code></pre>
<p>When updating Xcode, it is advisable to keep an older version for
building the JDK. To use a specific version of Xcode you have multiple
options:</p>
@@ -863,12 +865,12 @@ href="https://www.gnu.org/software/bash">GNU Bash</a>. No other shells
are supported.</p>
<p>At least version 3.2 of GNU Bash must be used.</p>
<h3 id="graphviz-and-pandoc">Graphviz and Pandoc</h3>
<p>In order to build man pages and the full docs (see the
<p>In order to build the full docs (see the
<code>--enable-full-docs</code> configure option) <a
href="https://pandoc.org">Pandoc</a> is required. For full docs also <a
href="https://www.graphviz.org">Graphviz</a> is required. Any recent
versions should work. For reference, and subject to change, Oracle
builds use Graphviz 9.0.0 and Pandoc 2.19.2.</p>
href="https://www.graphviz.org">Graphviz</a> and <a
href="https://pandoc.org">Pandoc</a> are required. Any recent versions
should work. For reference, and subject to change, Oracle builds use
Graphviz 9.0.0 and Pandoc 2.19.2.</p>
<h2 id="running-configure">Running Configure</h2>
<p>To build the JDK, you need a "configuration", which consists of a
directory where to store the build output, coupled with information
@@ -2015,18 +2017,10 @@ some directory names have spaces. Usually, it assumes those directories
have <a
href="https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil-8dot3name">short
paths</a>. You can run <code>fsutil file setshortname</code> in
<code>cmd</code> on directories to assign arbitrary short paths so
<code>configure</code> can access them. If the result says "Access
denied", it may be that there are processes running in that directory;
in this case, you can reboot Windows in safe mode and run the command on
those directories again.</p>
<p>The only directories required to have short paths are
<code>Microsoft Visual Studio</code> and <code>Windows Kits</code>; the
rest of the "contains space" warnings from <code>configure</code>, such
as <code>IntelliJ IDEA</code>, can be ignored. You can choose any short
name; once it is set, <code>configure</code>'s tools like
<code>cygpath</code> can convert the directory with spaces to your
chosen short name and pass it to the build system.</p>
<code>cmd</code> on certain directories, such as
<code>Microsoft Visual Studio</code> or <code>Windows Kits</code>, to
assign arbitrary short paths so <code>configure</code> can access
them.</p>
<h3 id="getting-help">Getting Help</h3>
<p>If none of the suggestions in this document helps you, or if you find
what you believe is a bug in the build system, please contact the Build

View File

@@ -134,7 +134,8 @@ space is required.
Even for 32-bit builds, it is recommended to use a 64-bit build machine, and
instead create a 32-bit target using `--with-target-bits=32`.
Note: The 32-bit x86 port is deprecated and may be removed in a future release.
Note: The Windows 32-bit x86 port is deprecated and may be removed in a future
release.
### Building on aarch64
@@ -190,7 +191,8 @@ on different platforms.
### Windows
Windows XP is not a supported platform, but all newer Windows should be able to
build the JDK.
build the JDK. (Note: The Windows 32-bit x86 port is deprecated and may be
removed in a future release.)
On Windows, it is important that you pay attention to the instructions in the
[Special Considerations](#special-considerations).
@@ -420,9 +422,13 @@ To use clang instead of gcc on Linux, use `--with-toolchain-type=clang`.
The oldest supported version of Xcode is 13.0.
You will need to download Xcode either from the App Store or specific versions
can be easily located via the [Xcode Releases](https://xcodereleases.com)
website.
You will need the Xcode command line developer tools to be able to build the
JDK. (Actually, *only* the command line tools are needed, not the IDE.) The
simplest way to install these is to run:
```
xcode-select --install
```
When updating Xcode, it is advisable to keep an older version for building the
JDK. To use a specific version of Xcode you have multiple options:
@@ -680,9 +686,9 @@ At least version 3.2 of GNU Bash must be used.
### Graphviz and Pandoc
In order to build man pages and the full docs (see the `--enable-full-docs`
configure option) [Pandoc](https://pandoc.org) is required. For full docs also
[Graphviz](https://www.graphviz.org) is required. Any recent versions should
In order to build the full docs (see the `--enable-full-docs`
configure option) [Graphviz](https://www.graphviz.org) and
[Pandoc](https://pandoc.org) are required. Any recent versions should
work. For reference, and subject to change, Oracle builds use Graphviz
9.0.0 and Pandoc 2.19.2.
@@ -1798,17 +1804,9 @@ temporarily.
On Windows, when configuring, `fixpath.sh` may report that some directory names
have spaces. Usually, it assumes those directories have [short
paths](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil-8dot3name).
You can run `fsutil file setshortname` in `cmd` on directories to assign
arbitrary short paths so `configure` can access them. If the result says "Access
denied", it may be that there are processes running in that directory; in this
case, you can reboot Windows in safe mode and run the command on those directories
again.
The only directories required to have short paths are `Microsoft Visual Studio`
and `Windows Kits`; the rest of the "contains space" warnings from `configure`,
such as `IntelliJ IDEA`, can be ignored. You can choose any short name; once it
is set, `configure`'s tools like `cygpath` can convert the directory with spaces
to your chosen short name and pass it to the build system.
You can run `fsutil file setshortname` in `cmd` on certain directories, such as
`Microsoft Visual Studio` or `Windows Kits`, to assign arbitrary short paths so
`configure` can access them.
### Getting Help

View File

@@ -63,12 +63,11 @@ workspace has been generated. To use it, choose
<p>The main <code>vscode-project</code> target configures the default
C++ support in Visual Studio Code. There are also other source indexers
that can be installed, that may provide additional features. It's
currently possible to generate configuration for three such indexers, <a
href="https://clang.llvm.org/extra/clangd/">clangd</a>, <a
href="https://github.com/MaskRay/ccls/wiki/Visual-Studio-Code">ccls</a>
and <a href="https://github.com/Andersbakken/rtags">rtags</a>. These can
be configured by appending the name of the indexer to the make target,
such as:</p>
currently possible to generate configuration for two such indexers, <a
href="https://clang.llvm.org/extra/clangd/">clangd</a> and <a
href="https://github.com/Andersbakken/rtags">rtags</a>. These can be
configured by appending the name of the indexer to the make target, such
as:</p>
<pre class="shell"><code>make vscode-project-clangd</code></pre>
<p>Additional instructions for configuring the given indexer will be
displayed after the workspace has been generated.</p>

View File

@@ -32,8 +32,7 @@ choose `File -> Open Workspace...` in Visual Studio Code.
The main `vscode-project` target configures the default C++ support in Visual
Studio Code. There are also other source indexers that can be installed, that
may provide additional features. It's currently possible to generate
configuration for three such indexers, [clangd](https://clang.llvm.org/extra/clangd/),
[ccls](https://github.com/MaskRay/ccls/wiki/Visual-Studio-Code)
configuration for two such indexers, [clangd](https://clang.llvm.org/extra/clangd/)
and [rtags](https://github.com/Andersbakken/rtags). These can be configured by
appending the name of the indexer to the make target, such as:

View File

@@ -72,9 +72,6 @@ id="toc-notes-for-specific-tests">Notes for Specific Tests</a>
<li><a href="#non-us-locale" id="toc-non-us-locale">Non-US
locale</a></li>
<li><a href="#pkcs11-tests" id="toc-pkcs11-tests">PKCS11 Tests</a></li>
<li><a href="#testing-with-alternative-security-providers"
id="toc-testing-with-alternative-security-providers">Testing with
alternative security providers</a></li>
<li><a href="#client-ui-tests" id="toc-client-ui-tests">Client UI
Tests</a></li>
</ul></li>
@@ -437,7 +434,7 @@ GB/2</em>.</p>
<p>Sets the argument <code>-timeoutHandlerTimeout</code> for JTReg. The
default value is 0. This is only valid if the failure handler is
built.</p>
<h4 id="test_thread_factory">TEST_THREAD_FACTORY</h4>
<h4 id="jtreg_test_thread_factory">JTREG_TEST_THREAD_FACTORY</h4>
<p>Sets the <code>-testThreadFactory</code> for JTReg. It should be the
fully qualified classname of a class which implements
<code>java.util.concurrent.ThreadFactory</code>. One such implementation
@@ -589,18 +586,6 @@ element of the appropriate <code>@Artifact</code> class. (See
JTREG=&quot;JAVA_OPTIONS=-Djdk.test.lib.artifacts.nsslib-linux_aarch64=/path/to/NSS-libs&quot;</code></pre>
<p>For more notes about the PKCS11 tests, please refer to
test/jdk/sun/security/pkcs11/README.</p>
<h3 id="testing-with-alternative-security-providers">Testing with
alternative security providers</h3>
<p>Some security tests use a hardcoded provider for
<code>KeyFactory</code>, <code>Cipher</code>,
<code>KeyPairGenerator</code>, <code>KeyGenerator</code>,
<code>AlgorithmParameterGenerator</code>, <code>KeyAgreement</code>,
<code>Mac</code>, <code>MessageDigest</code>, <code>SecureRandom</code>,
<code>Signature</code>, <code>AlgorithmParameters</code>,
<code>Configuration</code>, <code>Policy</code>, or
<code>SecretKeyFactory</code> objects. Specify the
<code>-Dtest.provider.name=NAME</code> property to use a different
provider for the service(s).</p>
<h3 id="client-ui-tests">Client UI Tests</h3>
<h4 id="system-key-shortcuts">System key shortcuts</h4>
<p>Some Client UI tests use key sequences which may be reserved by the

View File

@@ -380,7 +380,7 @@ Defaults to 4.
Sets the argument `-timeoutHandlerTimeout` for JTReg. The default value is 0.
This is only valid if the failure handler is built.
#### TEST_THREAD_FACTORY
#### JTREG_TEST_THREAD_FACTORY
Sets the `-testThreadFactory` for JTReg. It should be the fully qualified
classname of a class which implements `java.util.concurrent.ThreadFactory`. One
@@ -603,15 +603,6 @@ $ make test TEST="jtreg:sun/security/pkcs11/Secmod/AddTrustedCert.java" \
For more notes about the PKCS11 tests, please refer to
test/jdk/sun/security/pkcs11/README.
### Testing with alternative security providers
Some security tests use a hardcoded provider for `KeyFactory`, `Cipher`,
`KeyPairGenerator`, `KeyGenerator`, `AlgorithmParameterGenerator`,
`KeyAgreement`, `Mac`, `MessageDigest`, `SecureRandom`, `Signature`,
`AlgorithmParameters`, `Configuration`, `Policy`, or `SecretKeyFactory` objects.
Specify the `-Dtest.provider.name=NAME` property to use a different provider for
the service(s).
### Client UI Tests
#### System key shortcuts

View File

@@ -284,7 +284,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
ifeq ($(MACOSX_CODESIGN_MODE), hardened)
# Macosx release build and code signing available.
############################################################################
################################################################################
# JDK bundle
$(eval $(call SetupCopyFiles, CREATE_JDK_BUNDLE_DIR_SIGNED, \
SRC := $(JDK_IMAGE_DIR), \
@@ -313,7 +313,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
############################################################################
################################################################################
# JRE bundle
$(eval $(call SetupCopyFiles, CREATE_JRE_BUNDLE_DIR_SIGNED, \
SRC := $(JRE_IMAGE_DIR), \

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2020, 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

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013, 2023, 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

View File

@@ -52,7 +52,8 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_JDK, \
build/tools/deps \
build/tools/docs \
build/tools/jigsaw \
build/tools/depend, \
build/tools/depend \
, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
DISABLED_WARNINGS := dangling-doc-comments options, \
JAVAC_FLAGS := \
@@ -65,19 +66,17 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_JDK, \
TARGETS += $(BUILD_TOOLS_JDK)
$(eval $(call SetupCopyFiles, COPY_NIMBUS_TEMPLATES, \
$(eval $(call SetupCopyFiles,COPY_NIMBUS_TEMPLATES, \
SRC := $(TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus, \
DEST := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/generatenimbus/resources, \
FILES := $(wildcard $(TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/*.template), \
))
FILES := $(wildcard $(TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/*.template)))
TARGETS += $(COPY_NIMBUS_TEMPLATES)
$(eval $(call SetupCopyFiles, COPY_CLDRCONVERTER_PROPERTIES, \
$(eval $(call SetupCopyFiles,COPY_CLDRCONVERTER_PROPERTIES, \
SRC := $(TOPDIR)/make/jdk/src/classes/build/tools/cldrconverter, \
DEST := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/cldrconverter, \
FILES := $(wildcard $(TOPDIR)/make/jdk/src/classes/build/tools/cldrconverter/*.properties), \
))
FILES := $(wildcard $(TOPDIR)/make/jdk/src/classes/build/tools/cldrconverter/*.properties)))
TARGETS += $(COPY_CLDRCONVERTER_PROPERTIES)

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2019, 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

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2019, 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
@@ -30,7 +30,7 @@ include MakeBase.gmk
include CopyFiles.gmk
################################################################################
##########################################################################################
### TZDB tool needs files from java.time.zone package
@@ -41,13 +41,12 @@ define tzdb_copyfiles
< $(<) > $@
endef
$(eval $(call SetupCopyFiles, COPY_INTERIM_TZDB, \
$(eval $(call SetupCopyFiles,COPY_INTERIM_TZDB, \
SRC := $(TOPDIR)/src/java.base/share/classes/java/time/zone, \
DEST := $(BUILDTOOLS_OUTPUTDIR)/interim_tzdb_classes/build/tools/tzdb, \
FILES := ZoneRules.java ZoneOffsetTransition.java ZoneOffsetTransitionRule.java Ser.java, \
MACRO := tzdb_copyfiles, \
))
MACRO := tzdb_copyfiles))
################################################################################
##########################################################################################
all: $(COPY_INTERIM_TZDB)

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2023, 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
@@ -229,21 +229,8 @@ ifeq ($(INTERIM_JMOD), true)
# Interim JMODs are not shipped anywhere, so there is no reason
# to compress them at all.
JMOD_FLAGS += --compress zip-0
JMOD_TARGET_OS := $(OPENJDK_BUILD_OS)
ifeq ($(JMOD_TARGET_OS), macosx)
JMOD_TARGET_OS := macos
endif
JMOD_TARGET_CPU := $(OPENJDK_BUILD_CPU)
ifeq ($(JMOD_TARGET_CPU), x86_64)
JMOD_TARGET_CPU := amd64
endif
JMOD_TARGET_PLATFORM := $(JMOD_TARGET_OS)-$(JMOD_TARGET_CPU)
else
JMOD_FLAGS += --compress $(JMOD_COMPRESS)
JMOD_TARGET_PLATFORM := $(OPENJDK_MODULE_TARGET_PLATFORM)
endif
# Create jmods in the support dir and then move them into place to keep the
@@ -255,7 +242,7 @@ $(eval $(call SetupExecute, create_$(JMOD_FILE), \
SUPPORT_DIR := $(JMODS_SUPPORT_DIR), \
PRE_COMMAND := $(RM) $(JMODS_DIR)/$(JMOD_FILE) $(JMODS_SUPPORT_DIR)/$(JMOD_FILE), \
COMMAND := $(JMOD) $(JMOD_SMALL_FLAGS) create --module-version $(VERSION_SHORT) \
--target-platform '$(JMOD_TARGET_PLATFORM)' \
--target-platform '$(OPENJDK_MODULE_TARGET_PLATFORM)' \
--module-path $(JMODS_DIR) $(JMOD_FLAGS) \
--date $(SOURCE_DATE_ISO_8601) \
$(JMODS_SUPPORT_DIR)/$(JMOD_FILE), \

View File

@@ -1,4 +1,4 @@
# Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1997, 2023, 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
@@ -107,13 +107,15 @@ JAVA_WARNINGS_ARE_ERRORS ?= -Werror
JAVADOC_OPTIONS := -use -keywords -notimestamp \
-encoding ISO-8859-1 -docencoding UTF-8 -breakiterator \
-splitIndex --system none -javafx --expand-requires transitive \
--override-methods=summary
--override-methods=summary \
--no-external-specs-page
# The reference options must stay stable to allow for comparisons across the
# development cycle.
REFERENCE_OPTIONS := -XDignore.symbol.file=true -use -keywords -notimestamp \
-encoding ISO-8859-1 -breakiterator -splitIndex --system none \
-html5 -javafx --expand-requires transitive
-html5 -javafx --expand-requires transitive \
--no-external-specs-page
# Should we add DRAFT stamps to the generated javadoc?
ifeq ($(VERSION_IS_GA), true)
@@ -245,7 +247,7 @@ define create_overview_file
<!DOCTYPE html> \
<html><head></head><body> \
#
ifneq ($$($1_GROUPS), )
ifneq ($$($1_GROUPS),)
$1_OVERVIEW_TEXT += \
<p>This document is divided into \
$$(subst 2,two,$$(subst 3,three,$$(words $$($1_GROUPS)))) sections:</p> \
@@ -712,7 +714,7 @@ SPEC_HEADER_BLOCK := \
<div class="navbar"> \
<div>$(HEADER_RIGHT_SIDE_INFO)</div> \
<nav><ul><li><a href="PATH_TO_SPECS/../api/index.html">API</a> \
<li><a href="PATH_TO_SPECS/index.html">OTHER SPECIFICATIONS</a> \
<li><a href="PATH_TO_SPECS/index.html">OTHER SPECIFICATIONS \
<li><a href="PATH_TO_SPECS/man/index.html">TOOL GUIDES</a></ul></nav> \
</div> \
</header>

View File

@@ -62,15 +62,6 @@ ifeq ($(EXTERNAL_BUILDJDK), true)
INTERIM_IMAGE_DIR := $(BUILD_JDK)
endif
# To make the classlist deterministic:
# - The classlist can be influenced by locale. Always set it to en/US.
# - Concurrency in the core libraries can cause constant pool resolution
# to be non-deterministic. Since the benefits of resolved CP references in the
# default classlist is minimal, let's filter out the '@cp' lines until we can
# find a proper solution.
CLASSLIST_FILE_VM_OPTS = \
-Duser.language=en -Duser.country=US
# Save the stderr output of the command and print it along with stdout in case
# something goes wrong.
$(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST_JAR)
@@ -78,7 +69,7 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
$(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $@))
$(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $(JLI_TRACE_FILE)))
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.raw \
$(CLASSLIST_FILE_VM_OPTS) \
-Duser.language=en -Duser.country=US \
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
build.tools.classlist.HelloClasslist $(LOG_DEBUG)
$(GREP) -v HelloClasslist $@.raw > $@.interim
@@ -88,7 +79,7 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.raw.2 \
-XX:SharedClassListFile=$@.interim -XX:SharedArchiveFile=$@.jsa \
-Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \
$(CLASSLIST_FILE_VM_OPTS) \
-Duser.language=en -Duser.country=US \
--module-path $(SUPPORT_OUTPUTDIR)/classlist.jar \
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
build.tools.classlist.HelloClasslist \
@@ -101,10 +92,9 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
exit $$exitcode \
)
$(GREP) -v HelloClasslist $@.raw.2 > $@.raw.3
$(GREP) -v @cp $@.raw.3 > $@.raw.4
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java \
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
build.tools.classlist.SortClasslist $@.raw.4 > $@
build.tools.classlist.SortClasslist $@.raw.3 > $@
# The jli trace is created by the same recipe as classlist. By declaring these
# dependencies, make will correctly rebuild both jli trace and classlist

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 2023, 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
@@ -28,7 +28,7 @@
###
# Helper macro to allow $(info) to properly print strings beginning with spaces.
_ :=
_:=
help:
$(info )
@@ -102,14 +102,13 @@ help:
$(info $(_) # method is 'auto', 'ignore' or 'fail' (default))
$(info $(_) TEST="test1 ..." # Use the given test descriptor(s) for testing, e.g.)
$(info $(_) # make test TEST="jdk_lang gtest:all")
$(info $(_) TEST_DEPS="dependency1 ..." # Specify additional dependencies for running tests, e.g docs-jdk)
$(info $(_) JTREG="OPT1=x;OPT2=y" # Control the JTREG test harness, use 'make test-only JTREG=help' to list)
$(info $(_) GTEST="OPT1=x;OPT2=y" # Control the GTEST test harness, use 'make test-only GTEST=help' to list)
$(info $(_) MICRO="OPT1=x;OPT2=y" # Control the MICRO test harness, use 'make test-only MICRO=help' to list)
$(info $(_) TEST_OPTS="OPT1=x;..." # Generic control of all test harnesses)
$(info $(_) TEST_VM_OPTS="ARG ..." # Same as setting TEST_OPTS to VM_OPTIONS="ARG ...")
$(info )
$(if $(all_confs), $(info Available configurations in $(build_dir):) $(foreach var,$(all_confs),$(info * $(var))), \
$(if $(all_confs), $(info Available configurations in $(build_dir):) $(foreach var,$(all_confs),$(info * $(var))),\
$(info No configurations were found in $(build_dir).) $(info Run 'bash configure' to create a configuration.))
# We need a dummy rule otherwise make will complain
@true

View File

@@ -29,7 +29,6 @@ include $(SPEC)
include MakeBase.gmk
include CopyFiles.gmk
include DebugInfoUtils.gmk
include Execute.gmk
include Modules.gmk
include Utils.gmk
@@ -97,10 +96,6 @@ JLINK_DISABLE_WARNINGS := | ( $(GREP) -v -e "WARNING: Using incubator module" ||
JDK_IMAGE_SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jdk
JRE_IMAGE_SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jre
ifeq ($(JLINK_PRODUCE_LINKABLE_RUNTIME), true)
JLINK_JDK_EXTRA_OPTS += --generate-linkable-runtime
endif
$(eval $(call SetupExecute, jlink_jdk, \
WARN := Creating jdk image, \
DEPS := $(JDK_JMODS) $(BASE_RELEASE_FILE) \
@@ -137,19 +132,13 @@ CDS_DUMP_FLAGS = -Xmx128M -Xms128M
# Helper function for creating the CDS archives for the JDK and JRE
#
# Param1 - VM variant (e.g., server, client, zero, ...)
# Param2 - _nocoops, _coh, _nocoops_coh, or empty
# Param2 - _nocoops, or empty
define CreateCDSArchive
$1_$2_COOPS_OPTION := $(if $(findstring _nocoops, $2),-XX:-UseCompressedOops)
# enable and also explicitly disable coh as needed.
ifeq ($(call isTargetCpuBits, 64), true)
$1_$2_COH_OPTION := -XX:+UnlockExperimentalVMOptions \
$(if $(findstring _coh, $2),-XX:+UseCompactObjectHeaders,-XX:-UseCompactObjectHeaders)
endif
$1_$2_DUMP_EXTRA_ARG := $$($1_$2_COOPS_OPTION) $$($1_$2_COH_OPTION)
$1_$2_DUMP_TYPE := $(if $(findstring _nocoops, $2),-NOCOOPS,)$(if $(findstring _coh, $2),-COH,)
$1_$2_DUMP_EXTRA_ARG := $(if $(filter _nocoops, $2),-XX:-UseCompressedOops,)
$1_$2_DUMP_TYPE := $(if $(filter _nocoops, $2),-NOCOOPS,)
# Only G1 supports dumping the shared heap, so explicitly use G1 if the JVM supports it.
$1_$2_CDS_DUMP_FLAGS := $(CDS_DUMP_FLAGS) $(if $(filter g1gc, $(JVM_FEATURES_$1)), -XX:+UseG1GC)
$1_$2_CDS_DUMP_FLAGS := $(CDS_DUMP_FLAGS) $(if $(filter g1gc, $(JVM_FEATURES_$1)),-XX:+UseG1GC)
ifeq ($(OPENJDK_TARGET_OS), windows)
$1_$2_CDS_ARCHIVE := bin/$1/classes$2.jsa
@@ -201,14 +190,6 @@ ifeq ($(BUILD_CDS_ARCHIVE), true)
$(foreach v, $(JVM_VARIANTS), \
$(eval $(call CreateCDSArchive,$v,_nocoops)) \
)
ifeq ($(BUILD_CDS_ARCHIVE_COH), true)
$(foreach v, $(JVM_VARIANTS), \
$(eval $(call CreateCDSArchive,$v,_coh)) \
)
$(foreach v, $(JVM_VARIANTS), \
$(eval $(call CreateCDSArchive,$v,_nocoops_coh)) \
)
endif
endif
endif
@@ -254,7 +235,7 @@ endif
ifeq ($(GCOV_ENABLED), true)
$(eval $(call SetupCopyFiles, COPY_GCOV_GCNO, \
$(eval $(call SetupCopyFiles,COPY_GCOV_GCNO, \
SRC := $(OUTPUTDIR), \
DEST := $(SYMBOLS_IMAGE_DIR)/gcov, \
FILES := $(call FindFiles, $(HOTSPOT_OUTPUTDIR) \
@@ -282,6 +263,27 @@ else
endif
CMDS_TARGET_SUBDIR := bin
# Param 1 - dir to find debuginfo files in
FindDebuginfoFiles = \
$(wildcard $(addprefix $1/*, $(DEBUGINFO_SUFFIXES)) \
$(addprefix $1/*/*, $(DEBUGINFO_SUFFIXES)) \
$(addprefix $1/*/*/*, $(DEBUGINFO_SUFFIXES)))
# Pick the correct debug info files to copy, either zipped or not.
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true)
DEBUGINFO_SUFFIXES += .diz
else
DEBUGINFO_SUFFIXES := .debuginfo .pdb .map
# On Macosx, if debug symbols have not been zipped, find all files inside *.dSYM
# dirs.
ifeq ($(call isTargetOs, macosx), true)
$(call FillFindCache, \
$(SUPPORT_OUTPUTDIR)/modules_libs $(SUPPORT_OUTPUTDIR)/modules_cmds)
FindDebuginfoFiles = \
$(if $(wildcard $1), $(call containing, .dSYM/, $(call FindFiles, $1)))
endif
endif
# Param 1 - either JDK or JRE
SetupCopyDebuginfo = \
$(foreach m, $(ALL_$1_MODULES), \

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 2023, 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
@@ -37,7 +37,7 @@ default:
# serially, regardless of -j.
.NOTPARALLEL:
ifeq ($(HAS_SPEC), )
ifeq ($(HAS_SPEC),)
##############################################################################
# This is the default mode. We have not been recursively called with a SPEC.
##############################################################################
@@ -168,7 +168,7 @@ ifeq ($(HAS_SPEC), )
endif
make-info:
ifneq ($(findstring $(LOG_LEVEL), info debug trace), )
ifneq ($(findstring $(LOG_LEVEL),info debug trace),)
$(info Running make as '$(strip $(MAKE) $(MFLAGS) \
$(COMMAND_LINE_VARIABLES) $(MAKECMDGOALS))')
endif

View File

@@ -32,7 +32,7 @@
ifndef _INITSUPPORT_GMK
_INITSUPPORT_GMK := 1
ifeq ($(HAS_SPEC), )
ifeq ($(HAS_SPEC),)
# COMMA is defined in spec.gmk, but that is not included yet
COMMA := ,
@@ -50,7 +50,7 @@ ifeq ($(HAS_SPEC), )
# Make control variables, handled by Init.gmk
INIT_CONTROL_VARIABLES += LOG CONF CONF_NAME SPEC JOBS TEST_JOBS CONF_CHECK \
COMPARE_BUILD JTREG GTEST MICRO TEST_OPTS TEST_VM_OPTS TEST_DEPS
COMPARE_BUILD JTREG GTEST MICRO TEST_OPTS TEST_VM_OPTS
# All known make control variables
MAKE_CONTROL_VARIABLES := $(INIT_CONTROL_VARIABLES) TEST JDK_FILTER SPEC_FILTER
@@ -63,24 +63,24 @@ ifeq ($(HAS_SPEC), )
# The variable MAKEOVERRIDES contains variable assignments from the command
# line, but in reverse order to what the user entered.
# The '§' <=> '\ 'dance is needed to keep values with space in them connected.
COMMAND_LINE_VARIABLES := $(subst §,\ , $(call reverse, $(subst \ ,§,$(MAKEOVERRIDES))))
# The '\#' <=> '\ 'dance is needed to keep values with space in them connected.
COMMAND_LINE_VARIABLES := $(subst \#,\ , $(call reverse, $(subst \ ,\#,$(MAKEOVERRIDES))))
# A list like FOO="val1" BAR="val2" containing all user-supplied make
# variables that we should propagate.
# The '§' <=> '\ 'dance is needed to keep values with space in them connected.
USER_MAKE_VARS := $(subst §,\ , $(filter-out $(addsuffix =%, $(INIT_CONTROL_VARIABLES)), \
$(subst \ ,§,$(MAKEOVERRIDES))))
# The '\#' <=> '\ 'dance is needed to keep values with space in them connected.
USER_MAKE_VARS := $(subst \#,\ , $(filter-out $(addsuffix =%, $(INIT_CONTROL_VARIABLES)), \
$(subst \ ,\#,$(MAKEOVERRIDES))))
# Setup information about available configurations, if any.
ifneq ($(CUSTOM_ROOT), )
build_dir = $(CUSTOM_ROOT)/build
build_dir=$(CUSTOM_ROOT)/build
else
build_dir = $(topdir)/build
build_dir=$(topdir)/build
endif
all_spec_files = $(wildcard $(build_dir)/*/spec.gmk)
all_spec_files=$(wildcard $(build_dir)/*/spec.gmk)
# Extract the configuration names from the path
all_confs = $(patsubst %/spec.gmk, %, $(patsubst $(build_dir)/%, %, $(all_spec_files)))
all_confs=$(patsubst %/spec.gmk, %, $(patsubst $(build_dir)/%, %, $(all_spec_files)))
# Check for unknown command-line variables
define CheckControlVariables
@@ -128,7 +128,7 @@ ifeq ($(HAS_SPEC), )
ifeq ($$(CONF_CHECK), )
# Default behavior is fail
CONF_CHECK := fail
else ifneq ($$(filter-out auto fail ignore, $$(CONF_CHECK)), )
else ifneq ($$(filter-out auto fail ignore, $$(CONF_CHECK)),)
$$(info Error: CONF_CHECK must be one of: auto, fail or ignore.)
$$(error Cannot continue)
endif
@@ -147,11 +147,11 @@ ifeq ($(HAS_SPEC), )
$$(info Error: Cannot use CONF_NAME=$$(CONF_NAME) and SPEC=$$(SPEC) at the same time. Choose one.)
$$(error Cannot continue)
endif
ifeq ($$(wildcard $$(SPEC)), )
ifeq ($$(wildcard $$(SPEC)),)
$$(info Error: Cannot locate spec.gmk, given by SPEC=$$(SPEC).)
$$(error Cannot continue)
endif
ifeq ($$(filter /%, $$(SPEC)), )
ifeq ($$(filter /%, $$(SPEC)),)
# If given with relative path, make it absolute
SPECS := $$(CURDIR)/$$(strip $$(SPEC))
else
@@ -162,7 +162,7 @@ ifeq ($(HAS_SPEC), )
override SPEC :=
else
# Use spec.gmk files in the build output directory
ifeq ($$(all_spec_files), )
ifeq ($$(all_spec_files),)
ifneq ($(CUSTOM_ROOT), )
$$(info Error: No configurations found for $$(CUSTOM_ROOT).)
else
@@ -180,7 +180,7 @@ ifeq ($(HAS_SPEC), )
$$(error Cannot continue)
endif
matching_conf := $$(strip $$(filter $$(CONF_NAME), $$(all_confs)))
ifeq ($$(matching_conf), )
ifeq ($$(matching_conf),)
$$(info Error: No configurations found matching CONF_NAME=$$(CONF_NAME).)
$$(info Available configurations in $$(build_dir):)
$$(foreach var, $$(all_confs), $$(info * $$(var)))
@@ -197,12 +197,12 @@ ifeq ($(HAS_SPEC), )
SPECS := $$(build_dir)/$$(matching_conf)/spec.gmk
else ifneq ($$(origin CONF), undefined)
# User have given a CONF= argument.
ifeq ($$(CONF), )
ifeq ($$(CONF),)
# If given CONF=, match all configurations
matching_confs := $$(strip $$(all_confs))
else
# Otherwise select those that contain the given CONF string
ifeq ($$(patsubst !%,,$$(CONF)), )
ifeq ($$(patsubst !%,,$$(CONF)),)
# A CONF starting with ! means we should negate the search term
matching_confs := $$(strip $$(foreach var, $$(all_confs), \
$$(if $$(findstring $$(subst !,,$$(CONF)), $$(var)), ,$$(var))))
@@ -215,12 +215,12 @@ ifeq ($(HAS_SPEC), )
matching_confs := $$(CONF)
# Don't repeat this output on make restarts caused by including
# generated files.
ifeq ($$(MAKE_RESTARTS), )
ifeq ($$(MAKE_RESTARTS),)
$$(info Using exact match for CONF=$$(CONF) (other matches are possible))
endif
endif
endif
ifeq ($$(matching_confs), )
ifeq ($$(matching_confs),)
$$(info Error: No configurations found matching CONF=$$(CONF).)
$$(info Available configurations in $$(build_dir):)
$$(foreach var, $$(all_confs), $$(info * $$(var)))
@@ -228,9 +228,9 @@ ifeq ($(HAS_SPEC), )
else
# Don't repeat this output on make restarts caused by including
# generated files.
ifeq ($$(MAKE_RESTARTS), )
ifeq ($$(MAKE_RESTARTS),)
ifeq ($$(words $$(matching_confs)), 1)
ifneq ($$(findstring $$(LOG_LEVEL), info debug trace), )
ifneq ($$(findstring $$(LOG_LEVEL), info debug trace),)
$$(info Building configuration '$$(matching_confs)' (matching CONF=$$(CONF)))
endif
else
@@ -272,7 +272,7 @@ ifeq ($(HAS_SPEC), )
# count.
main_targets_file := $$(dir $(strip $2))make-support/main-targets.gmk
ifeq ($$(MAKE_RESTARTS), )
ifeq ($$(MAKE_RESTARTS),)
# Only do this if make has not been restarted, and if we do not force it.
ifeq ($(strip $1), FORCE)
$$(shell rm -f $$(main_targets_file))
@@ -316,9 +316,9 @@ else # $(HAS_SPEC)=true
BUILD_LOG_PIPE_SIMPLE := | $(TEE) -a $(BUILD_LOG)
ifneq ($(CUSTOM_ROOT), )
topdir = $(CUSTOM_ROOT)
topdir=$(CUSTOM_ROOT)
else
topdir = $(TOPDIR)
topdir=$(TOPDIR)
endif
# Setup the build environment to match the requested specification on
@@ -349,39 +349,39 @@ else # $(HAS_SPEC)=true
ifneq ($$(findstring :, $$(COMPARE_BUILD)), )
$$(foreach part, $$(subst :, , $$(COMPARE_BUILD)), \
$$(if $$(filter PATCH=%, $$(part)), \
$$(eval COMPARE_BUILD_PATCH = $$(strip $$(patsubst PATCH=%, %, $$(part)))) \
$$(eval COMPARE_BUILD_PATCH=$$(strip $$(patsubst PATCH=%, %, $$(part)))) \
) \
$$(if $$(filter CONF=%, $$(part)), \
$$(eval COMPARE_BUILD_CONF = $$(strip $$(subst +, , $$(patsubst CONF=%, %, $$(part))))) \
$$(eval COMPARE_BUILD_CONF=$$(strip $$(subst +, , $$(patsubst CONF=%, %, $$(part))))) \
) \
$$(if $$(filter MAKE=%, $$(part)), \
$$(eval COMPARE_BUILD_MAKE = $$(strip $$(subst +, , $$(patsubst MAKE=%, %, $$(part))))) \
$$(eval COMPARE_BUILD_MAKE=$$(strip $$(subst +, , $$(patsubst MAKE=%, %, $$(part))))) \
) \
$$(if $$(filter COMP_OPTS=%, $$(part)), \
$$(eval COMPARE_BUILD_COMP_OPTS = $$(strip $$(subst +, , $$(patsubst COMP_OPTS=%, %, $$(part))))) \
$$(eval COMPARE_BUILD_COMP_OPTS=$$(strip $$(subst +, , $$(patsubst COMP_OPTS=%, %, $$(part))))) \
) \
$$(if $$(filter COMP_DIR=%, $$(part)), \
$$(eval COMPARE_BUILD_COMP_DIR = $$(strip $$(subst +, , $$(patsubst COMP_DIR=%, %, $$(part))))) \
$$(eval COMPARE_BUILD_COMP_DIR=$$(strip $$(subst +, , $$(patsubst COMP_DIR=%, %, $$(part))))) \
) \
$$(if $$(filter FAIL=%, $$(part)), \
$$(eval COMPARE_BUILD_FAIL = $$(strip $$(subst +, , $$(patsubst FAIL=%, %, $$(part))))) \
$$(eval COMPARE_BUILD_FAIL=$$(strip $$(subst +, , $$(patsubst FAIL=%, %, $$(part))))) \
) \
$$(if $$(filter NODRYRUN=%, $$(part)), \
$$(eval COMPARE_BUILD_NODRYRUN = $$(strip $$(subst +, , $$(patsubst NODRYRUN=%, %, $$(part))))) \
$$(eval COMPARE_BUILD_NODRYRUN=$$(strip $$(subst +, , $$(patsubst NODRYRUN=%, %, $$(part))))) \
) \
)
else
# Separate handling for single field case, to allow for spaces in values.
ifneq ($$(filter PATCH=%, $$(COMPARE_BUILD)), )
COMPARE_BUILD_PATCH = $$(strip $$(patsubst PATCH=%, %, $$(COMPARE_BUILD)))
COMPARE_BUILD_PATCH=$$(strip $$(patsubst PATCH=%, %, $$(COMPARE_BUILD)))
else ifneq ($$(filter CONF=%, $$(COMPARE_BUILD)), )
COMPARE_BUILD_CONF = $$(strip $$(subst +, , $$(patsubst CONF=%, %, $$(COMPARE_BUILD))))
COMPARE_BUILD_CONF=$$(strip $$(subst +, , $$(patsubst CONF=%, %, $$(COMPARE_BUILD))))
else ifneq ($$(filter --%, $$(COMPARE_BUILD)), )
# Assume CONF if value begins with --
COMPARE_BUILD_CONF = $$(strip $$(subst +, , $$(COMPARE_BUILD)))
COMPARE_BUILD_CONF=$$(strip $$(subst +, , $$(COMPARE_BUILD)))
else
# Otherwise assume patch file
COMPARE_BUILD_PATCH = $$(strip $$(COMPARE_BUILD))
COMPARE_BUILD_PATCH=$$(strip $$(COMPARE_BUILD))
endif
endif
ifneq ($$(COMPARE_BUILD_PATCH), )
@@ -531,7 +531,7 @@ else # $(HAS_SPEC)=true
# used by build comparisons.
define WaitForJavacServerFinish
$(if $(JAVAC_SERVER_DIR), \
sleep 5 \
sleep 5\
)
endef
else
@@ -544,7 +544,7 @@ else # $(HAS_SPEC)=true
##############################################################################
# Store the build times in this directory.
BUILDTIMESDIR = $(OUTPUTDIR)/make-support/build-times
BUILDTIMESDIR=$(OUTPUTDIR)/make-support/build-times
# Record starting time for build of a sub repository.
define RecordStartTime
@@ -605,7 +605,7 @@ endif # HAS_SPEC
# $1: The option to look for
# $2: The variable to set to "true" if the option is found
define ParseLogOption
ifneq ($$(findstring $1, $$(LOG)), )
ifneq ($$(findstring $1, $$(LOG)),)
override $2 := true
# First try to remove ",<option>" if it exists, otherwise just remove "<option>"
LOG_STRIPPED := $$(subst $1,, $$(subst $$(COMMA)$$(strip $1),, $$(LOG)))
@@ -620,7 +620,7 @@ endef
# $1: The option to look for
# $2: The variable to set to the value of the option, if found
define ParseLogValue
ifneq ($$(findstring $1=, $$(LOG)), )
ifneq ($$(findstring $1=, $$(LOG)),)
# Make words of out comma-separated list and find the one with opt=val
value := $$(strip $$(subst $$(strip $1)=,, $$(filter $$(strip $1)=%, $$(subst $$(COMMA), , $$(LOG)))))
override $2 := $$(value)
@@ -673,7 +673,7 @@ define ParseLogLevel
override LOG_LEVEL := $$(LOG)
ifeq ($$(LOG_LEVEL), )
ifeq ($$(LOG_LEVEL),)
# Set LOG to "warn" as default if not set
override LOG_LEVEL := warn
endif

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2016, 2020, 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
@@ -27,13 +27,12 @@ default: all
include $(SPEC)
include MakeBase.gmk
include Execute.gmk
include Modules.gmk
################################################################################
INTERIM_JLINK_SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/interim-image-jlink
# Use this file inside the image as target for make rule
JIMAGE_TARGET_FILE := bin/java$(EXECUTABLE_SUFFIX)
INTERIM_MODULES_LIST := $(call CommaList, $(INTERIM_IMAGE_MODULES))
@@ -43,18 +42,17 @@ JLINK_TOOL := $(JLINK) -J-Djlink.debug=true \
--module-path $(INTERIM_JMODS_DIR) \
--endian $(OPENJDK_BUILD_CPU_ENDIAN)
$(eval $(call SetupExecute, jlink_interim_image, \
WARN := Creating interim jimage, \
DEPS := $(JMODS) $(call DependOnVariable, INTERIM_MODULES_LIST), \
OUTPUT_DIR := $(INTERIM_IMAGE_DIR), \
SUPPORT_DIR := $(INTERIM_JLINK_SUPPORT_DIR), \
PRE_COMMAND := $(RM) -r $(INTERIM_IMAGE_DIR), \
COMMAND := $(JLINK_TOOL) --output $(INTERIM_IMAGE_DIR) \
$(INTERIM_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
$(call DependOnVariable, INTERIM_MODULES_LIST)
$(call LogWarn, Creating interim jimage)
$(RM) -r $(INTERIM_IMAGE_DIR)
$(JLINK_TOOL) \
--output $(INTERIM_IMAGE_DIR) \
--disable-plugin generate-jli-classes \
--add-modules $(INTERIM_MODULES_LIST), \
))
--add-modules $(INTERIM_MODULES_LIST)
$(TOUCH) $@
TARGETS += $(jlink_interim_image)
TARGETS += $(INTERIM_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
################################################################################

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2023, 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
@@ -67,8 +67,7 @@ $(eval $(call SetupJavaCompilation, BUILD_JRTFS, \
$(eval $(call SetupCopyFiles, COPY_JIMAGE_SERVICE_PROVIDER, \
SRC := $(TOPDIR)/src/java.base/share/classes, \
DEST := $(SUPPORT_OUTPUTDIR)/jrtfs_classes, \
FILES := META-INF/services/java.nio.file.spi.FileSystemProvider, \
))
FILES := META-INF/services/java.nio.file.spi.FileSystemProvider))
$(eval $(call SetupJarArchive, BUILD_JRTFS_JAR, \
DEPENDENCIES := $(BUILD_JRTFS) $(COPY_JIMAGE_SERVICE_PROVIDER), \

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2019, 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

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2023, 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
@@ -31,7 +31,7 @@
# Declare default target
default:
ifeq ($(wildcard $(SPEC)), )
ifeq ($(wildcard $(SPEC)),)
$(error Main.gmk needs SPEC set to a proper spec.gmk)
endif
@@ -278,18 +278,6 @@ $(eval $(call SetupTarget, eclipse-mixed-env, \
ARGS := --always-make, \
))
$(eval $(call SetupTarget, hotspot-xcode-project, \
MAKEFILE := ide/xcode/hotspot/CreateXcodeProject, \
TARGET := build, \
DEPS := hotspot compile-commands-hotspot jdk-image, \
))
$(eval $(call SetupTarget, open-hotspot-xcode-project, \
MAKEFILE := ide/xcode/hotspot/CreateXcodeProject, \
TARGET := open, \
DEPS := hotspot-xcode-project, \
))
ALL_TARGETS += $(HOTSPOT_VARIANT_TARGETS) $(HOTSPOT_VARIANT_GENSRC_TARGETS) \
$(HOTSPOT_VARIANT_LIBS_TARGETS) $(HOTSPOT_VARIANT_STATIC_LIBS_TARGETS)
@@ -454,18 +442,6 @@ $(eval $(call SetupTarget, symbols-image, \
TARGET := symbols, \
))
$(eval $(call SetupTarget, static-launcher, \
MAKEFILE := StaticLibs, \
TARGET := static-launcher, \
DEPS := hotspot-static-libs static-libs, \
))
$(eval $(call SetupTarget, static-jdk-image, \
MAKEFILE := StaticLibs, \
TARGET := static-jdk-image, \
DEPS := static-exploded-image jdk-image, \
))
$(eval $(call SetupTarget, static-libs-image, \
MAKEFILE := StaticLibsImage, \
TARGET := static-libs-image, \
@@ -580,10 +556,6 @@ $(eval $(call SetupTarget, update-build-docs, \
MAKEFILE := UpdateBuildDocs, \
))
$(eval $(call SetupTarget, update-sleef-source, \
MAKEFILE := UpdateSleefSource, \
))
$(eval $(call SetupTarget, update-x11wrappers, \
MAKEFILE := UpdateX11Wrappers, \
DEPS := java.base-copy buildtools-jdk, \
@@ -797,13 +769,13 @@ $(eval $(call SetupTarget, build-microbenchmark, \
$(eval $(call SetupTarget, test, \
MAKEFILE := RunTests, \
ARGS := TEST="$(TEST)", \
DEPS := jdk-image test-image $(TEST_DEPS), \
DEPS := jdk-image test-image, \
))
$(eval $(call SetupTarget, exploded-test, \
MAKEFILE := RunTests, \
ARGS := TEST="$(TEST)" JDK_IMAGE_DIR=$(JDK_OUTPUTDIR), \
DEPS := exploded-image test-image $(TEST_DEPS), \
DEPS := exploded-image test-image, \
))
ifeq ($(JCOV_ENABLED), true)
@@ -1098,9 +1070,9 @@ else
symbols-image: $(LIBS_TARGETS) $(LAUNCHER_TARGETS)
static-libs-image: hotspot-static-libs static-libs
static-libs-image: hotspot-static-libs $(STATIC_LIBS_TARGETS)
static-libs-graal-image: static-libs
static-libs-graal-image: $(STATIC_LIBS_TARGETS)
bootcycle-images: jdk-image
@@ -1122,8 +1094,8 @@ else
test-make-compile-commands: compile-commands
# Declare dependency for all generated test targets
$(foreach t, $(filter-out test-make%, $(ALL_TEST_TARGETS)), $(eval $t: jdk-image test-image $(TEST_DEPS)))
$(foreach t, $(ALL_EXPLODED_TEST_TARGETS), $(eval $t: exploded-image test-image $(TEST_DEPS)))
$(foreach t, $(filter-out test-make%, $(ALL_TEST_TARGETS)), $(eval $t: jdk-image test-image))
$(foreach t, $(ALL_EXPLODED_TEST_TARGETS), $(eval $t: exploded-image test-image))
interim-image: $(INTERIM_JMOD_TARGETS)
@@ -1266,8 +1238,6 @@ ifeq ($(call isTargetOs, macosx), true)
legacy-images: mac-legacy-jre-bundle
endif
static-exploded-image: static-launcher exploded-image
# These targets build the various documentation images
docs-jdk-image: docs-jdk
docs-javase-image: docs-javase
@@ -1310,7 +1280,7 @@ endif
################################################################################
# all-images builds all our deliverables as images.
all-images: product-images static-jdk-image test-image all-docs-images
all-images: product-images test-image all-docs-images
# all-bundles packages all our deliverables as tar.gz bundles.
all-bundles: product-bundles test-bundles docs-bundles static-libs-bundles
@@ -1323,7 +1293,7 @@ ALL_TARGETS += buildtools hotspot hotspot-libs hotspot-static-libs \
create-buildjdk docs-jdk-api docs-javase-api docs-reference-api docs-jdk \
docs-javase docs-reference docs-javadoc mac-bundles product-images legacy-images \
docs-image docs-javase-image docs-reference-image all-docs-images \
docs-bundles all-docs-bundles test-image all-images static-exploded-image \
docs-bundles all-docs-bundles test-image all-images \
all-bundles
################################################################################
@@ -1358,13 +1328,9 @@ test-hotspot-jtreg-native: test-hotspot_native_sanity
test-hotspot-gtest: exploded-test-gtest
test-jdk-jtreg-native: test-jdk_native_sanity
# Set dependencies for doc tests
$(eval $(call AddTestDependency, docs_all, docs-jdk))
test-docs: test-docs_all
ALL_TARGETS += $(RUN_TEST_TARGETS) run-test exploded-run-test check \
test-hotspot-jtreg test-hotspot-jtreg-native test-hotspot-gtest \
test-jdk-jtreg-native test-docs
test-jdk-jtreg-native
################################################################################
################################################################################
@@ -1436,7 +1402,7 @@ dist-clean: clean
($(CD) $(OUTPUTDIR) && \
$(RM) -r *spec.gmk $(CONFIGURESUPPORT_OUTPUTDIR) Makefile compare.sh ide \
configure.log* build.log*)
$(if $(filter $(CONF_NAME), $(notdir $(OUTPUTDIR))), \
$(if $(filter $(CONF_NAME),$(notdir $(OUTPUTDIR))), \
if test "x`$(LS) $(OUTPUTDIR)`" != x; then \
$(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ; \
else \

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2023, 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
@@ -137,15 +137,6 @@ define CleanModule
$(call Clean-include, $1)
endef
define AddTestDependency
test-$(strip $1): $2
exploded-test-$(strip $1): $2
ifneq ($(filter $(TEST), $1), )
TEST_DEPS += $2
endif
endef
################################################################################
@@ -184,7 +175,7 @@ define DeclareRecipesForPhaseAndModule
$$(foreach d, $$($1_$2_TOPDIRS), \
$$(eval $1 += $2-$$($1_TARGET_SUFFIX)-$$(notdir $$d)))
endif
ifeq ($(NO_RECIPES), )
ifeq ($(NO_RECIPES),)
$$(eval $$(call DeclareRecipeForModuleMakefile,$1,$2))
endif
$1 += $2-$$($1_TARGET_SUFFIX)
@@ -206,8 +197,8 @@ endef
# $1_MODULES : All modules that had rules generated
# $1_TARGETS : All targets generated
define DeclareRecipesForPhase
$(foreach i, 2 3 4 5 6 7 8, $(if $(strip $($i)),$(strip $1)_$(strip $($i)))$(NEWLINE))
$(if $(9), $(error Internal makefile error: Too many arguments to \
$(foreach i,2 3 4 5 6 7 8, $(if $(strip $($i)),$(strip $1)_$(strip $($i)))$(NEWLINE))
$(if $(9),$(error Internal makefile error: Too many arguments to \
DeclareRecipesForPhase, please update MakeHelper.gmk))
$$(foreach m, $$($(strip $1)_CHECK_MODULES), \

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2022, 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
@@ -45,23 +45,6 @@ TARGETS :=
# Include the file being wrapped.
include $(MAKEFILE_PREFIX).gmk
ifeq ($(MAKEFILE_PREFIX), Lib)
# We need to keep track of what libraries are generated/needed by this
# module. This information is required when doing static linking, to know
# which static library files to include. The variable $(MODULE)_INCLUDED_LIBS is
# added to for each call to SetupJdkLibrary. The file module-included-libs.txt is then
# read in StaticLibs.gmk.
ifneq ($($(MODULE)_INCLUDED_LIBS), )
LIBLIST := $(SUPPORT_OUTPUTDIR)/modules_static-libs/$(MODULE)/module-included-libs.txt
$(LIBLIST): $(TARGETS)
$(call MakeDir, $(@D))
$(ECHO) $($(MODULE)_INCLUDED_LIBS) > $@
TARGETS += $(LIBLIST)
endif
endif
# Setup copy rules from the modules directories to the jdk image directory.
ifeq ($(call isTargetOs, windows), true)
TO_BIN_FILTER := %$(SHARED_LIBRARY_SUFFIX) %.diz %.pdb %.map

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2016, 2023, 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
@@ -45,7 +45,7 @@ ifneq ($(TEST_VM_OPTS), )
endif
$(eval $(call ParseKeywordVariable, TEST_OPTS, \
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR JCOV JCOV_DIFF_CHANGESET AOT_JDK, \
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR JCOV JCOV_DIFF_CHANGESET, \
STRING_KEYWORDS := VM_OPTIONS JAVA_OPTIONS, \
))
@@ -104,8 +104,7 @@ ifneq ($(wildcard $(JTREG_FAILURE_HANDLER)), )
-observerDir:$(JTREG_FAILURE_HANDLER) \
-timeoutHandler:jdk.test.failurehandler.jtreg.GatherProcessInfoTimeoutHandler \
-observer:jdk.test.failurehandler.jtreg.GatherDiagnosticInfoObserver \
-timeoutHandlerTimeout:$(JTREG_FAILURE_HANDLER_TIMEOUT) \
#
-timeoutHandlerTimeout:$(JTREG_FAILURE_HANDLER_TIMEOUT)
endif
GTEST_LAUNCHER_DIRS := $(patsubst %/gtestLauncher, %, \
@@ -202,12 +201,11 @@ $(eval $(call SetTestOpt,JOBS,JTREG))
$(eval $(call SetTestOpt,TIMEOUT_FACTOR,JTREG))
$(eval $(call SetTestOpt,FAILURE_HANDLER_TIMEOUT,JTREG))
$(eval $(call SetTestOpt,REPORT,JTREG))
$(eval $(call SetTestOpt,AOT_JDK,JTREG))
$(eval $(call ParseKeywordVariable, JTREG, \
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR FAILURE_HANDLER_TIMEOUT \
TEST_MODE ASSERT VERBOSE RETAIN TEST_THREAD_FACTORY MAX_MEM RUN_PROBLEM_LISTS \
RETRY_COUNT REPEAT_COUNT MAX_OUTPUT REPORT AOT_JDK $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
RETRY_COUNT REPEAT_COUNT MAX_OUTPUT REPORT $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
EXTRA_PROBLEM_LISTS LAUNCHER_OPTIONS \
$(CUSTOM_JTREG_STRING_KEYWORDS), \
@@ -265,7 +263,6 @@ jaxp_JTREG_PROBLEM_LIST += $(TOPDIR)/test/jaxp/ProblemList.txt
langtools_JTREG_PROBLEM_LIST += $(TOPDIR)/test/langtools/ProblemList.txt
hotspot_JTREG_PROBLEM_LIST += $(TOPDIR)/test/hotspot/jtreg/ProblemList.txt
lib-test_JTREG_PROBLEM_LIST += $(TOPDIR)/test/lib-test/ProblemList.txt
docs_JTREG_PROBLEM_LIST += $(TOPDIR)/test/docs/ProblemList.txt
################################################################################
# Parse test selection
@@ -503,7 +500,7 @@ define SetupRunGtestTestBody
endif
ifneq ($$(GTEST_REPEAT), )
$1_GTEST_REPEAT := --gtest_repeat=$$(GTEST_REPEAT)
$1_GTEST_REPEAT :=--gtest_repeat=$$(GTEST_REPEAT)
endif
run-test-$1: pre-run-test
@@ -605,7 +602,7 @@ define SetupRunMicroTestBody
$1_JMH_JVM_ARGS += $$(MICRO_VM_OPTIONS) $$(MICRO_JAVA_OPTIONS)
endif
$1_MICRO_VM_OPTIONS := -jvmArgsPrepend $(call ShellQuote,$$($1_JMH_JVM_ARGS))
$1_MICRO_VM_OPTIONS := -jvmArgs $(call ShellQuote,$$($1_JMH_JVM_ARGS))
ifneq ($$(MICRO_ITER), )
$1_MICRO_ITER := -i $$(MICRO_ITER)
@@ -703,58 +700,6 @@ define SetJtregValue
endif
endef
# Parameter 1 is the name of the rule.
#
# Remaining parameters are named arguments.
# VM_OPTIONS List of JVM arguments to use when creating AOT cache
#
# After calling this, the following variables are defined
# $1_AOT_TARGETS List of all targets that the test rule will need to depend on
# $1_AOT_JDK_CACHE The AOT cache file to be used to run the test with
#
SetupAot = $(NamedParamsMacroTemplate)
define SetupAotBody
$1_AOT_JDK_CONF := $$($1_TEST_SUPPORT_DIR)/aot/jdk.aotconf
$1_AOT_JDK_CACHE := $$($1_TEST_SUPPORT_DIR)/aot/jdk.aotcache
$1_JAVA_TOOL_OPTS := $$(addprefix -J, $$($1_VM_OPTIONS))
$$($1_AOT_JDK_CACHE): $$(JDK_IMAGE_DIR)/release
$$(call MakeDir, $$($1_TEST_SUPPORT_DIR)/aot)
$(foreach jtool, javac javap jlink jar, \
$(info AOT: Create cache configuration for $(jtool)) \
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/aot.$(jtool), ( \
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/$(jtool) $$($1_JAVA_TOOL_OPTS) \
-J-XX:AOTMode=record -J-XX:AOTConfiguration=$$($1_AOT_JDK_CONF).$(jtool) --help \
))
)
$$(info AOT: Copy $(JDK_UNDER_TEST)/lib/classlist to $$($1_AOT_JDK_CONF).jdk )
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/aot, ( \
$$(FIXPATH) $(CP) $(JDK_UNDER_TEST)/lib/classlist $$($1_AOT_JDK_CONF).jdk \
))
$$(FIXPATH) $$(CAT) $$($1_AOT_JDK_CONF).* > $$($1_AOT_JDK_CONF).temp
$$(FIXPATH) $$(CAT) $$($1_AOT_JDK_CONF).temp | $(GREP) -v '#' | $(GREP) -v '@' | $(SORT) | \
$(SED) -e 's/id:.*//g' | uniq \
> $$($1_AOT_JDK_CONF)
$$(FIXPATH) $$(CAT) $$($1_AOT_JDK_CONF).temp | $(GREP) '@cp' | $(SORT) \
>> $$($1_AOT_JDK_CONF)
$$(info AOT: Generate AOT cache $$($1_AOT_JDK_CACHE) with flags: $$($1_VM_OPTIONS))
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/aot, ( \
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java \
$$($1_VM_OPTIONS) -Xlog:cds,cds+class=debug:file=$$($1_AOT_JDK_CACHE).log \
-XX:AOTMode=create -XX:AOTConfiguration=$$($1_AOT_JDK_CONF) -XX:AOTCache=$$($1_AOT_JDK_CACHE) \
))
$1_AOT_TARGETS += $$($1_AOT_JDK_CACHE)
endef
SetupRunJtregTest = $(NamedParamsMacroTemplate)
define SetupRunJtregTestBody
$1_TEST_RESULTS_DIR := $$(TEST_RESULTS_DIR)/$1
@@ -793,11 +738,6 @@ define SetupRunJtregTestBody
# Only the problem list for the current test root should be used.
$1_JTREG_PROBLEM_LIST := $$(filter $$($1_TEST_ROOT)%, $$($1_JTREG_PROBLEM_LIST))
# Pass along the path to the tidy html checker
ifneq ($$(TIDY), )
$1_JTREG_BASIC_OPTIONS += -Dtidy=$$(TIDY)
endif
ifneq ($(TEST_JOBS), 0)
$$(eval $$(call SetJtregValue,$1,JTREG_JOBS,$$(TEST_JOBS)))
else
@@ -808,6 +748,8 @@ define SetupRunJtregTestBody
# we may end up with a lot of JVM's
$1_JTREG_MAX_RAM_PERCENTAGE := $$(shell $(AWK) 'BEGIN { print 25 / $$($1_JTREG_JOBS); }')
JTREG_TIMEOUT_FACTOR ?= 4
JTREG_VERBOSE ?= fail,error,summary
JTREG_RETAIN ?= fail,error
JTREG_TEST_THREAD_FACTORY ?=
@@ -815,7 +757,6 @@ define SetupRunJtregTestBody
JTREG_RETRY_COUNT ?= 0
JTREG_REPEAT_COUNT ?= 0
JTREG_REPORT ?= files
JTREG_AOT_JDK ?= false
ifneq ($$(JTREG_RETRY_COUNT), 0)
ifneq ($$(JTREG_REPEAT_COUNT), 0)
@@ -896,24 +837,6 @@ define SetupRunJtregTestBody
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$($1_JTREG_PROBLEM_LIST))
endif
JTREG_ALL_OPTIONS := $$(JTREG_JAVA_OPTIONS) $$(JTREG_VM_OPTIONS)
JTREG_AUTO_PROBLEM_LISTS :=
JTREG_AUTO_TIMEOUT_FACTOR := 4
ifneq ($$(findstring -Xcomp, $$(JTREG_ALL_OPTIONS)), )
JTREG_AUTO_PROBLEM_LISTS += ProblemList-Xcomp.txt
JTREG_AUTO_TIMEOUT_FACTOR := 10
endif
ifneq ($$(findstring -XX:+UseZGC, $$(JTREG_ALL_OPTIONS)), )
JTREG_AUTO_PROBLEM_LISTS += ProblemList-zgc.txt
endif
ifneq ($$(findstring -XX:+UseShenandoahGC, $$(JTREG_ALL_OPTIONS)), )
JTREG_AUTO_PROBLEM_LISTS += ProblemList-shenandoah.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 \
@@ -928,8 +851,6 @@ define SetupRunJtregTestBody
$1_JTREG_BASIC_OPTIONS += -e:TEST_IMAGE_DIR=$(TEST_IMAGE_DIR)
$1_JTREG_BASIC_OPTIONS += -e:DOCS_JDK_IMAGE_DIR=$$(DOCS_JDK_IMAGE_DIR)
ifneq ($$(JTREG_FAILURE_HANDLER_OPTIONS), )
$1_JTREG_LAUNCHER_OPTIONS += -Djava.library.path="$(JTREG_FAILURE_HANDLER_DIR)"
endif
@@ -945,33 +866,9 @@ define SetupRunJtregTestBody
endif
endif
ifeq ($$(JTREG_AOT_JDK), true)
$$(info Add AOT target for $1)
$$(eval $$(call SetupAot, $1, VM_OPTIONS := $$(JTREG_ALL_OPTIONS) ))
$$(info AOT_TARGETS=$$($1_AOT_TARGETS))
$$(info AOT_JDK_CACHE=$$($1_AOT_JDK_CACHE))
$1_JTREG_BASIC_OPTIONS += -vmoption:-XX:AOTCache="$$($1_AOT_JDK_CACHE)"
endif
$$(eval $$(call SetupRunJtregTestCustom, $1))
# SetupRunJtregTestCustom might also adjust JTREG_AUTO_ variables
# so set the final results after setting values from custom setup
ifneq ($$(JTREG_AUTO_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 \
$$(JTREG_AUTO_PROBLEM_LISTS) \
$$(addprefix $$($1_TEST_ROOT)/, $$(JTREG_AUTO_PROBLEM_LISTS)) \
))
endif
JTREG_TIMEOUT_FACTOR ?= $$(JTREG_AUTO_TIMEOUT_FACTOR)
clean-outputdirs-$1:
$$(call LogWarn, Clean up dirs for $1)
$$(RM) -r $$($1_TEST_SUPPORT_DIR)
$$(RM) -r $$($1_TEST_RESULTS_DIR)
@@ -1019,7 +916,7 @@ define SetupRunJtregTestBody
done
endif
run-test-$1: clean-outputdirs-$1 pre-run-test $$($1_AOT_TARGETS)
run-test-$1: pre-run-test clean-outputdirs-$1
$$(call LogWarn)
$$(call LogWarn, Running test '$$($1_TEST)')
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR) \

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2017, 2023, 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
@@ -34,7 +34,7 @@ ifneq ($(findstring :, $(MAKE)), )
endif
# Locate this Makefile
ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))), )
ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))),)
makefile_path := $(CURDIR)/$(strip $(lastword $(MAKEFILE_LIST)))
else
makefile_path := $(lastword $(MAKEFILE_LIST))
@@ -67,7 +67,7 @@ define SetupVariable
ifneq ($$(findstring $$(LOG), info debug trace), )
$$(info Prebuilt variable $1=$2 (default value))
endif
$1 := $2
$1:=$2
endif
else
ifneq ($$(findstring $$(LOG), info debug trace), )
@@ -163,7 +163,7 @@ else ifeq ($(UNAME_OS), MINGW64)
OPENJDK_TARGET_OS_TYPE := windows
OPENJDK_TARGET_OS_ENV := windows.msys2
else
OPENJDK_TARGET_OS_TYPE := unix
OPENJDK_TARGET_OS_TYPE:=unix
ifeq ($(UNAME_OS), Linux)
OPENJDK_TARGET_OS := linux
else ifeq ($(UNAME_OS), Darwin)

View File

@@ -63,16 +63,16 @@ TEST_JOBS ?= 0
# Use hard-coded values for java flags (one size, fits all!)
JAVA_FLAGS := -Duser.language=en -Duser.country=US
JAVA_FLAGS_BIG := -Xms64M -Xmx2048M
JAVA_FLAGS_BIG := -Xms64M -Xmx1600M
JAVA_FLAGS_SMALL := -XX:+UseSerialGC -Xms32M -Xmx512M -XX:TieredStopAtLevel=1
BUILDJDK_JAVA_FLAGS_SMALL := -Xms32M -Xmx512M -XX:TieredStopAtLevel=1
BUILD_JAVA_FLAGS := $(JAVA_FLAGS_BIG)
################################################################################
# Hard-coded values copied from spec.gmk.in.
X :=
SPACE := $(X) $(X)
COMMA := ,
X:=
SPACE:=$(X) $(X)
COMMA:=,
MAKE_ARGS = $(MAKE_LOG_FLAGS) -r -R -I $(TOPDIR)/make/common SPEC=$(SPEC) \
MAKE_LOG_FLAGS="$(MAKE_LOG_FLAGS)" LOG_LEVEL=$(LOG_LEVEL)
BASH_ARGS := -o pipefail -e

View File

@@ -64,7 +64,7 @@ ifeq ($(USE_SCM), true)
# Verify that the entire forest is consistent
$(foreach repo, $(call FindAllReposRel), \
$(if $(wildcard $(TOPDIR)/$(repo)/$(SCM_DIR)), , \
$(if $(wildcard $(TOPDIR)/$(repo)/$(SCM_DIR)),, \
$(error Inconsistent revision control: $(repo) is missing $(SCM_DIR) directory)) \
)
@@ -72,7 +72,7 @@ ifeq ($(USE_SCM), true)
MakeFilenameFromRepo = \
$(strip $(subst .,top, $(subst /,-, $1)))
##############################################################################
################################################################################
# SetupGetRevisionForRepo defines a make rule for creating a file containing
# the name of the repository and the output of the scm command for that
# repository.

View File

@@ -1,191 +0,0 @@
#
# Copyright (c) 2024, 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.
#
default: all
include $(SPEC)
include MakeBase.gmk
include CopyFiles.gmk
include DebugInfoUtils.gmk
include Modules.gmk
include modules/LauncherCommon.gmk
################################################################################
#
# Create the static java launcher
#
################################################################################
STATIC_JDK_IMAGE_DIR := $(IMAGES_OUTPUTDIR)/static-jdk
STATIC_LAUNCHER_OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/static-native/launcher
HOTSPOT_STATIC_LIB_PATH := $(HOTSPOT_OUTPUTDIR)/*/libjvm/objs/static
ifneq ($(word 2, $(wildcard $(HOTSPOT_STATIC_LIB_PATH))), )
$(error Cannot perform static linking when building more than one JVM library)
endif
# Find all modules with static libraries
STATIC_LIB_MODULES := $(patsubst $(SUPPORT_OUTPUTDIR)/modules_static-libs/%, \
%, $(wildcard $(SUPPORT_OUTPUTDIR)/modules_static-libs/*))
# Filter out known broken libraries. This is a temporary measure until
# proper support for these libraries can be provided.
ifeq ($(call isTargetOs, linux), true)
# libsplashscreen has a name conflict with libawt in the function
# BitmapToYXBandedRectangles, so we exclude it for now.
BROKEN_STATIC_LIBS += splashscreen
else ifeq ($(call isTargetOs, macosx), true)
# libosxsecurity has a name conflict with libosxapp in the function
# JavaStringToNSString, so we exclude it for now.
BROKEN_STATIC_LIBS += osxsecurity
else ifeq ($(call isTargetOs, windows), true)
# libsplashscreen has a name conflict with libawt in the function
# BitmapToYXBandedRectangles, so we exclude it for now.
BROKEN_STATIC_LIBS += splashscreen
# libsspi_bridge has name conflicts with sunmscapi
BROKEN_STATIC_LIBS += sspi_bridge
# These libs define DllMain which conflict with Hotspot
BROKEN_STATIC_LIBS += awt dt_shmem dt_socket
# These libs are dependent on any of the above disabled libs
BROKEN_STATIC_LIBS += fontmanager jawt lcms net nio
endif
$(foreach module, $(STATIC_LIB_MODULES), \
$(eval LIBS_$(module) := $(filter-out $(BROKEN_STATIC_LIBS), $(shell cat \
$(SUPPORT_OUTPUTDIR)/modules_static-libs/$(module)/module-included-libs.txt))) \
)
STATIC_LIB_FILES := $(foreach module, $(STATIC_LIB_MODULES), \
$(foreach lib, $(LIBS_$(module)), \
$(SUPPORT_OUTPUTDIR)/native/$(module)/lib$(lib)/static/$(LIBRARY_PREFIX)$(lib)$(STATIC_LIBRARY_SUFFIX)))
# Add Hotspot
STATIC_LIB_FILES += $(wildcard $(HOTSPOT_STATIC_LIB_PATH)/$(LIBRARY_PREFIX)jvm$(STATIC_LIBRARY_SUFFIX))
# Figure out what external libraries are required to link these static JDK
# libraries.
LIB_FLAGS_FILES := $(addsuffix .lib-flags.txt, $(STATIC_LIB_FILES))
# Gather the lib flags from all individual libraries. There are many duplicates,
# so sort and just keep unique instances. On macOS, a common pattern is
# "-framework FooFramework", so we must make sure we keep the two words together.
EXTERNAL_LIBS := $(strip $(shell $(CAT) $(LIB_FLAGS_FILES) | \
$(SED) -e 's/-framework /-framework_/g' | $(TR) ' ' '\n' | $(SORT) -u | \
$(SED) -e 's/-framework_/-framework /g'))
ifeq ($(call isTargetOs, macosx), true)
STATIC_LIBS := $(addprefix -force_load$(SPACE), $(STATIC_LIB_FILES))
else ifeq ($(call isTargetOs, linux), true)
STATIC_LIBS := -Wl,--export-dynamic -Wl,--whole-archive $(STATIC_LIB_FILES) -Wl,--no-whole-archive
else ifeq ($(call isTargetOs, windows), true)
STATIC_LIBS := $(addprefix -wholearchive:, $(STATIC_LIB_FILES))
else
$(error Unsupported platform)
endif
$(eval $(call SetupBuildLauncher, java, \
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES, \
EXTRA_RCFLAGS := $(JAVA_RCFLAGS), \
VERSION_INFO_RESOURCE := $(JAVA_VERSION_INFO_RESOURCE), \
OPTIMIZATION := HIGH, \
STATIC_LAUNCHER := true, \
LDFLAGS := $(LDFLAGS_STATIC_JDK), \
LIBS := $(STATIC_LIBS) $(EXTERNAL_LIBS), \
LINK_TYPE := C++, \
OUTPUT_DIR := $(STATIC_LAUNCHER_OUTPUT_DIR), \
OBJECT_DIR := $(STATIC_LAUNCHER_OUTPUT_DIR), \
))
$(java): $(STATIC_LIB_FILES)
TARGETS += $(java)
JAVA_LAUNCHER := $(BUILD_LAUNCHER_java_TARGET)
static-launcher: $(java)
################################################################################
#
# Create the static-jdk image with the statically built java launcher
#
################################################################################
# Until we get proper support in jlink for generating an image with static
# builds, we need to create the image ourselves. We base it on a normal
# dynamically linked JDK image.
# All these files/dirs should be copied as-is
JDK_IMAGE_COPY_FILES := $(addprefix $(JDK_IMAGE_DIR)/, conf demo include jmods \
legal man/man1/java.1 release README)
# We need to copy some files from lib, but not the dynamic libraries themselves
ALL_LIB_FILES := $(call FindFiles, $(JDK_IMAGE_DIR)/lib)
# Remove all dynamic libraries from the list
JDK_IMAGE_COPY_LIB_FILES := $(filter-out %$(SHARED_LIBRARY_SUFFIX), $(ALL_LIB_FILES))
# Remove all debug files from the list
ifeq ($(call isTargetOs, macosx), true)
JDK_IMAGE_COPY_LIB_FILES := $(call not-containing, .dSYM, $(JDK_IMAGE_COPY_LIB_FILES))
else
JDK_IMAGE_COPY_LIB_FILES := $(filter-out %.debuginfo %.pdb %.map, $(JDK_IMAGE_COPY_LIB_FILES))
endif
static-jdk-info:
$(call LogWarn, Creating static-jdk image)
$(eval $(call SetupCopyFiles, copy-from-jdk-image, \
SRC := $(JDK_IMAGE_DIR), \
DEST := $(STATIC_JDK_IMAGE_DIR), \
FILES := $(call FindFiles, $(JDK_IMAGE_COPY_FILES)) \
$(JDK_IMAGE_COPY_LIB_FILES), \
))
TARGETS += $(copy-from-jdk-image)
$(copy-from-jdk-image): | static-jdk-info
$(eval $(call SetupCopyFiles, copy-static-launcher, \
FILES := $(JAVA_LAUNCHER), \
DEST := $(STATIC_JDK_IMAGE_DIR)/bin, \
))
TARGETS += $(copy-static-launcher)
$(eval $(call SetupCopyFiles, copy-static-launcher-debuginfo, \
SRC := $(STATIC_LAUNCHER_OUTPUT_DIR), \
DEST := $(STATIC_JDK_IMAGE_DIR)/bin, \
FILES := $(call FindDebuginfoFiles, $(STATIC_LAUNCHER_OUTPUT_DIR)), \
))
TARGETS += $(copy-static-launcher-debuginfo)
static-jdk-image: $(copy-from-jdk-image) $(copy-static-launcher) $(copy-static-launcher-debuginfo)
TARGETS += static-jdk-image
all: $(TARGETS)
.PHONY: all static-launcher static-jdk-image

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2019, 2023, 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,9 +41,9 @@ ALL_MODULES = $(call FindAllModules)
TARGETS :=
ifneq ($(filter static-libs-image, $(MAKECMDGOALS)), )
IMAGE_DEST_DIR = $(STATIC_LIBS_IMAGE_DIR)/lib
IMAGE_DEST_DIR=$(STATIC_LIBS_IMAGE_DIR)/lib
else ifneq ($(filter static-libs-graal-image, $(MAKECMDGOALS)), )
IMAGE_DEST_DIR = $(STATIC_LIBS_GRAAL_IMAGE_DIR)/lib
IMAGE_DEST_DIR=$(STATIC_LIBS_GRAAL_IMAGE_DIR)/lib
endif
# Copy JDK static libs to the image.

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2017, 2020, 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
@@ -31,7 +31,7 @@ include MakeBase.gmk
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, TestImage-pre.gmk))
################################################################################
############################################################################
BUILD_INFO_PROPERTIES := $(TEST_IMAGE_DIR)/build-info.properties

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2020, 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,6 +42,6 @@ BUILD_TOOLS_HOTSPOT := $(call SetupJavaCompilationCompileTarget, \
TOOL_JFR_GEN := $(JAVA_SMALL) -cp $(HOTSPOT_TOOLS_OUTPUTDIR) \
build.tools.jfr.GenerateJfrFiles
################################################################################
##########################################################################################
endif # _TOOLS_HOTSPOT_GMK

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2023, 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
@@ -128,14 +128,14 @@ TOOL_PUBLICSUFFIXLIST = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_clas
TOOL_FIXUPPANDOC = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.fixuppandoc.Main
################################################################################
##########################################################################################
# Executable javascript filter for man page generation using pandoc.
PANDOC_TROFF_MANPAGE_FILTER := $(BUILDTOOLS_OUTPUTDIR)/manpages/pandoc-troff-manpage-filter
PANDOC_HTML_MANPAGE_FILTER := $(BUILDTOOLS_OUTPUTDIR)/manpages/pandoc-html-manpage-filter
################################################################################
##########################################################################################
# Hook to include the corresponding custom post file, if present.
$(eval $(call IncludeCustomExtension, ToolsJdk-post.gmk))

View File

@@ -1,153 +0,0 @@
#
# Copyright (c) 2024, 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.
#
################################################################################
default: all
include $(SPEC)
include MakeBase.gmk
include CopyFiles.gmk
include Execute.gmk
################################################################################
# This file is responsible for updating the generated sleef source code files
# that are checked in to the JDK repo, and that are actually used when building.
# This target needs to be re-run every time the source code of libsleef is
# updated from upstream.
################################################################################
ifneq ($(COMPILE_TYPE), cross)
$(error Only cross-compilation of libsleef is currently supported)
endif
ifeq ($(CMAKE), )
$(error CMake not found. Please install cmake and rerun configure)
endif
ifneq ($(OPENJDK_BUILD_OS), linux)
$(error This target is only supported on linux)
endif
SLEEF_SUPPORT_DIR := $(MAKESUPPORT_OUTPUTDIR)/sleef
SLEEF_SOURCE_BASE_DIR := $(TOPDIR)/src/jdk.incubator.vector/linux/native/libsleef
SLEEF_SOURCE_DIR := $(SLEEF_SOURCE_BASE_DIR)/upstream
SLEEF_TARGET_DIR := $(SLEEF_SOURCE_BASE_DIR)/generated
SLEEF_NATIVE_BUILD_DIR := $(SLEEF_SUPPORT_DIR)/native
SLEEF_CROSS_BUILD_DIR := $(SLEEF_SUPPORT_DIR)/cross
ifeq ($(OPENJDK_TARGET_CPU), aarch64)
CROSS_COMPILATION_FILENAMES := sleefinline_advsimd.h sleefinline_sve.h
EXTRA_CROSS_OPTIONS := -DSLEEF_ENFORCE_SVE=TRUE
else ifeq ($(OPENJDK_TARGET_CPU), riscv64)
CROSS_COMPILATION_FILENAMES := sleefinline_rvvm1.h
EXTRA_CROSS_OPTIONS := -DSLEEF_ENFORCE_RVVM1=TRUE
else
$(error Unsupported platform)
endif
CROSS_COMPILATION_SRC_FILES := $(addprefix $(SLEEF_CROSS_BUILD_DIR)/include/, \
$(CROSS_COMPILATION_FILENAMES))
ifeq ($(TOOLCHAIN_TYPE), clang)
SLEEF_TOOLCHAIN_TYPE := llvm
else
SLEEF_TOOLCHAIN_TYPE := $(TOOLCHAIN_TYPE)
endif
SLEEF_CMAKE_FILE := toolchains/$(OPENJDK_TARGET_CPU)-$(SLEEF_TOOLCHAIN_TYPE).cmake
# We need to run CMake twice, first using it to configure the build, and then
# to actually build; and we need to do this twice, once for a native build
# and once for the cross-compilation build.
$(eval $(call SetupExecute, sleef_native_config, \
INFO := Configuring native sleef build, \
OUTPUT_DIR := $(SLEEF_NATIVE_BUILD_DIR), \
COMMAND := cd $(SLEEF_SOURCE_DIR) && $(CMAKE) -S . -B \
$(SLEEF_NATIVE_BUILD_DIR), \
))
TARGETS := $(sleef_native_config)
$(eval $(call SetupExecute, sleef_native_build, \
INFO := Building native sleef, \
DEPS := $(sleef_native_config), \
OUTPUT_DIR := $(SLEEF_NATIVE_BUILD_DIR), \
COMMAND := cd $(SLEEF_SOURCE_DIR) && $(CMAKE) --build \
$(SLEEF_NATIVE_BUILD_DIR) -j, \
))
TARGETS := $(sleef_native_build)
$(eval $(call SetupExecute, sleef_cross_config, \
INFO := Configuring cross-compiling sleef build, \
DEPS := $(sleef_native_build), \
OUTPUT_DIR := $(SLEEF_CROSS_BUILD_DIR), \
COMMAND := cd $(SLEEF_SOURCE_DIR) && $(CMAKE) -S . -B \
$(SLEEF_CROSS_BUILD_DIR) \
-DCMAKE_C_COMPILER=$(CC) \
-DCMAKE_TOOLCHAIN_FILE=$(SLEEF_CMAKE_FILE) \
-DNATIVE_BUILD_DIR=$(SLEEF_NATIVE_BUILD_DIR) \
-DSLEEF_BUILD_INLINE_HEADERS=TRUE \
$(EXTRA_CROSS_OPTIONS), \
))
TARGETS := $(sleef_cross_config)
$(eval $(call SetupExecute, sleef_cross_build, \
INFO := Building cross-compiling sleef, \
DEPS := $(sleef_cross_config), \
OUTPUT_DIR := $(SLEEF_NATIVE_BUILD_DIR), \
COMMAND := cd $(SLEEF_SOURCE_DIR) && $(CMAKE) --build \
$(SLEEF_CROSS_BUILD_DIR) -j, \
))
TARGETS := $(sleef_cross_build)
$(CROSS_COMPILATION_SRC_FILES): $(sleef_cross_build)
# Finally, copy the generated files (and one needed static file) into our
# target directory.
$(eval $(call SetupCopyFiles, copy_static_sleef_source, \
FILES := $(SLEEF_SOURCE_DIR)/src/common/misc.h, \
DEST := $(SLEEF_TARGET_DIR), \
))
TARGETS := $(copy_static_sleef_source)
$(eval $(call SetupCopyFiles, copy_generated_sleef_source, \
FILES := $(CROSS_COMPILATION_SRC_FILES), \
DEST := $(SLEEF_TARGET_DIR), \
))
TARGETS := $(copy_generated_sleef_source)
################################################################################
all: $(TARGETS)
.PHONY: all default

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2023, 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
@@ -27,13 +27,13 @@ default: all
include $(SPEC)
include MakeBase.gmk
include ZipArchive.gmk
include JavaCompilation.gmk
################################################################################
##########################################################################################
#
# sec-bin.zip is used by builds where the corresponding sources are not available
#
$(eval $(call SetupZipArchive, BUILD_SEC_BIN_ZIP, \
$(eval $(call SetupZipArchive,BUILD_SEC_BIN_ZIP, \
SRC := $(JDK_OUTPUTDIR), \
INCLUDES := \
modules/java.base/javax/crypto \
@@ -60,22 +60,20 @@ $(eval $(call SetupZipArchive, BUILD_SEC_BIN_ZIP, \
modules/java.security.jgss/sun/security/krb5/internal/util, \
INCLUDE_FILES := modules/java.security.jgss/sun/security/jgss/spi/GSSContextSpi.class, \
EXCLUDES := modules/java.security.jgss/sun/security/krb5/internal/tools, \
ZIP := $(IMAGES_OUTPUTDIR)/sec-bin.zip, \
))
ZIP := $(IMAGES_OUTPUTDIR)/sec-bin.zip))
TARGETS += $(IMAGES_OUTPUTDIR)/sec-bin.zip
################################################################################
##########################################################################################
#
# Windows specific binary security packages.
#
ifeq ($(call isTargetOs, windows), true)
# sec-windows-bin.zip is used by builds where the corresponding sources are not available
$(eval $(call SetupZipArchive, BUILD_SEC_WINDOWS_BIN_ZIP, \
$(eval $(call SetupZipArchive,BUILD_SEC_WINDOWS_BIN_ZIP, \
SRC := $(JDK_OUTPUTDIR), \
INCLUDES := modules/java.security.jgss/sun/security/krb5/internal/tools, \
ZIP := $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip, \
))
ZIP := $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip))
TARGETS += $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip
@@ -86,19 +84,18 @@ ifeq ($(call isTargetOs, windows), true)
JGSS_ZIP_NAME = jgss-windows-i586-bin.zip
endif
$(eval $(call SetupZipArchive, BUILD_JGSS_BIN_ZIP, \
$(eval $(call SetupZipArchive,BUILD_JGSS_BIN_ZIP, \
SRC := $(SUPPORT_OUTPUTDIR), \
INCLUDE_FILES := modules_libs/java.security.jgss/w2k_lsa_auth.dll \
modules_libs/java.security.jgss/w2k_lsa_auth.dll.diz \
modules_libs/java.security.jgss/w2k_lsa_auth.dll.map \
modules_libs/java.security.jgss/w2k_lsa_auth.dll.pdb, \
ZIP := $(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME), \
))
ZIP := $(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME)))
TARGETS += $(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME)
endif
################################################################################
##########################################################################################
all: $(TARGETS)

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2022, 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
@@ -27,8 +27,8 @@ default: all
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include Modules.gmk
include ZipArchive.gmk
SRC_ZIP_WORK_DIR := $(SUPPORT_OUTPUTDIR)/src
$(if $(filter $(TOPDIR)/%, $(SUPPORT_OUTPUTDIR)), $(eval SRC_ZIP_BASE := $(TOPDIR)), $(eval SRC_ZIP_BASE := $(SUPPORT_OUTPUTDIR)))

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, 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
@@ -23,5 +23,5 @@
# This Makefile was generated by configure @DATE_WHEN_CONFIGURED@
# GENERATED FILE, DO NOT EDIT
SPEC := @OUTPUTDIR@/spec.gmk
SPEC:=@OUTPUTDIR@/spec.gmk
include @WORKSPACE_ROOT@/Makefile

View File

@@ -26,7 +26,7 @@
m4_include([basic_tools.m4])
m4_include([basic_windows.m4])
################################################################################
###############################################################################
AC_DEFUN_ONCE([BASIC_INIT],
[
# Save the original command line. This is passed to us by the wrapper configure script.
@@ -46,7 +46,7 @@ AC_DEFUN_ONCE([BASIC_INIT],
AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.])
])
################################################################################
###############################################################################
# Check that there are no unprocessed overridden variables left.
# If so, they are an incorrect argument and we will exit with an error.
AC_DEFUN([BASIC_CHECK_LEFTOVER_OVERRIDDEN],
@@ -58,7 +58,7 @@ AC_DEFUN([BASIC_CHECK_LEFTOVER_OVERRIDDEN],
fi
])
################################################################################
###############################################################################
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
# Make sure to only use tools set up in BASIC_SETUP_FUNDAMENTAL_TOOLS.
AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
@@ -76,9 +76,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
fi
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
AC_MSG_ERROR([32-bit Windows builds are not supported])
fi
BASIC_SETUP_PATHS_WINDOWS
fi
@@ -105,7 +102,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
AUTOCONF_DIR=$TOPDIR/make/autoconf
])
################################################################################
###############################################################################
# Setup what kind of build environment type we have (CI or local developer)
AC_DEFUN_ONCE([BASIC_SETUP_BUILD_ENV],
[
@@ -144,7 +141,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_BUILD_ENV],
AC_SUBST(LOCALE_USED)
])
################################################################################
###############################################################################
# Evaluates platform specific overrides for devkit variables.
# $1: Name of variable
AC_DEFUN([BASIC_EVAL_DEVKIT_VARIABLE],
@@ -154,7 +151,7 @@ AC_DEFUN([BASIC_EVAL_DEVKIT_VARIABLE],
fi
])
################################################################################
###############################################################################
# Evaluates platform specific overrides for build devkit variables.
# $1: Name of variable
AC_DEFUN([BASIC_EVAL_BUILD_DEVKIT_VARIABLE],
@@ -164,7 +161,7 @@ AC_DEFUN([BASIC_EVAL_BUILD_DEVKIT_VARIABLE],
fi
])
################################################################################
###############################################################################
AC_DEFUN([BASIC_SETUP_XCODE_SYSROOT],
[
AC_MSG_CHECKING([for sdk name])
@@ -249,7 +246,7 @@ AC_DEFUN([BASIC_SETUP_XCODE_SYSROOT],
fi
])
################################################################################
###############################################################################
AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
[
AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
@@ -383,7 +380,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
AC_MSG_RESULT([$EXTRA_PATH])
])
################################################################################
###############################################################################
AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
[
@@ -480,7 +477,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
AC_CONFIG_FILES([$OUTPUTDIR/Makefile:$AUTOCONF_DIR/Makefile.template])
])
################################################################################
###############################################################################
# Check if build directory is on local disk. If not possible to determine,
# we prefer to claim it's local.
# Argument 1: directory to test
@@ -517,7 +514,7 @@ AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
fi
])
################################################################################
###############################################################################
# Check that source files have basic read permissions set. This might
# not be the case in cygwin in certain conditions.
AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS],
@@ -532,7 +529,7 @@ AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS],
fi
])
################################################################################
###############################################################################
AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
[
AC_MSG_CHECKING([if build directory is on local disk])
@@ -575,7 +572,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEFAULT_MAKE_TARGET],
AC_SUBST(DEFAULT_MAKE_TARGET)
])
################################################################################
###############################################################################
# Setup the default value for LOG=
#
AC_DEFUN_ONCE([BASIC_SETUP_DEFAULT_LOG],
@@ -594,7 +591,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEFAULT_LOG],
AC_SUBST(DEFAULT_LOG)
])
################################################################################
###############################################################################
# Code to run after AC_OUTPUT
AC_DEFUN_ONCE([BASIC_POST_CONFIG_OUTPUT],
[

View File

@@ -23,12 +23,12 @@
# questions.
#
################################################################################
###############################################################################
# It is recommended to use exactly this version of pandoc, especially for
# re-generating checked in html files
RECOMMENDED_PANDOC_VERSION=2.19.2
################################################################################
###############################################################################
# Setup the most fundamental tools, used for setting up build platform and
# path handling.
AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
@@ -59,7 +59,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
UTIL_LOOKUP_PROGS(CMD, cmd.exe, $PATH:/cygdrive/c/windows/system32:/mnt/c/windows/system32:/c/windows/system32)
])
################################################################################
###############################################################################
# Setup further tools that should be resolved early but after setting up
# build platform and path handling.
AC_DEFUN_ONCE([BASIC_SETUP_TOOLS],
@@ -99,7 +99,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_TOOLS],
UTIL_REQUIRE_SPECIAL(FGREP, [AC_PROG_FGREP])
# Optional tools, we can do without them
UTIL_LOOKUP_PROGS(CMAKE, cmake)
UTIL_LOOKUP_PROGS(DF, df)
UTIL_LOOKUP_PROGS(GIT, git)
UTIL_LOOKUP_PROGS(NICE, nice)
@@ -117,7 +116,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_TOOLS],
RM="$RM -f"
])
################################################################################
###############################################################################
# Check if we have found a usable version of make
# $1: the path to a potential make binary (or empty)
# $2: the description on how we found this
@@ -177,7 +176,7 @@ AC_DEFUN([BASIC_CHECK_MAKE_VERSION],
fi
])
################################################################################
###############################################################################
AC_DEFUN([BASIC_CHECK_MAKE_OUTPUT_SYNC],
[
# Check if make supports the output sync option and if so, setup using it.
@@ -202,7 +201,7 @@ AC_DEFUN([BASIC_CHECK_MAKE_OUTPUT_SYNC],
AC_SUBST(OUTPUT_SYNC)
])
################################################################################
###############################################################################
# Goes looking for a usable version of GNU make.
AC_DEFUN([BASIC_CHECK_GNU_MAKE],
[
@@ -250,7 +249,7 @@ AC_DEFUN([BASIC_CHECK_GNU_MAKE],
BASIC_CHECK_MAKE_OUTPUT_SYNC
])
################################################################################
###############################################################################
AC_DEFUN([BASIC_CHECK_FIND_DELETE],
[
# Test if find supports -delete
@@ -279,7 +278,7 @@ AC_DEFUN([BASIC_CHECK_FIND_DELETE],
AC_SUBST(FIND_DELETE)
])
################################################################################
###############################################################################
AC_DEFUN([BASIC_CHECK_TAR],
[
# Test which kind of tar was found
@@ -317,7 +316,7 @@ AC_DEFUN([BASIC_CHECK_TAR],
AC_SUBST(TAR_SUPPORTS_TRANSFORM)
])
################################################################################
###############################################################################
AC_DEFUN([BASIC_CHECK_GREP],
[
# Test that grep supports -Fx with a list of pattern which includes null pattern.
@@ -341,7 +340,7 @@ AC_DEFUN([BASIC_CHECK_GREP],
fi
])
################################################################################
###############################################################################
AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
[
BASIC_CHECK_GNU_MAKE
@@ -413,7 +412,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
fi
])
################################################################################
###############################################################################
# Check for support for specific options in bash
AC_DEFUN_ONCE([BASIC_CHECK_BASH_OPTIONS],
[

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2023, 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
@@ -23,7 +23,7 @@
# questions.
#
################################################################################
########################################################################
# This file handles detection of the Boot JDK. The Boot JDK detection
# process has been developed as a response to solve a complex real-world
# problem. Initially, it was simple, but it has grown as platform after
@@ -49,7 +49,7 @@
# JDK, and if one is found, check if it is acceptable. If not, we print
# our reasons for rejecting it (useful when debugging non-working
# configure situations) and continue checking the next one.
################################################################################
########################################################################
# Execute the check given as argument, and verify the result
# If the Boot JDK was previously found, do nothing
@@ -322,7 +322,7 @@ AC_DEFUN([BOOTJDK_SETUP_CLASSPATH],
AC_SUBST(CLASSPATH)
])
################################################################################
###############################################################################
#
# We need a Boot JDK to bootstrap the build.
#
@@ -470,7 +470,7 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
# Maximum amount of heap memory.
JVM_HEAP_LIMIT_32="768"
# Running a 64 bit JVM allows for and requires a bigger heap
JVM_HEAP_LIMIT_64="2048"
JVM_HEAP_LIMIT_64="1600"
JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
@@ -606,8 +606,7 @@ AC_DEFUN([BOOTJDK_SETUP_BUILD_JDK],
BUILD_JDK=$with_build_jdk
BUILD_JDK_FOUND=maybe
AC_MSG_NOTICE([Found potential Build JDK using configure arguments])
fi
])
fi])
EXTERNAL_BUILDJDK=true
else
if test "x$COMPILE_TYPE" = "xcross"; then

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2020, 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
@@ -34,10 +34,10 @@ include @SPEC@
BOOT_JDK := $(JDK_IMAGE_DIR)
# The bootcycle build has a different output directory
OLD_OUTPUTDIR := @OUTPUTDIR@
OUTPUTDIR := $(OLD_OUTPUTDIR)/bootcycle-build
OLD_OUTPUTDIR:=@OUTPUTDIR@
OUTPUTDIR:=$(OLD_OUTPUTDIR)/bootcycle-build
# No spaces in patsubst to avoid leading space in variable
JAVAC_SERVER_DIR := $(patsubst $(OLD_OUTPUTDIR)%,$(OUTPUTDIR)%,$(JAVAC_SERVER_DIR))
JAVAC_SERVER_DIR:=$(patsubst $(OLD_OUTPUTDIR)%,$(OUTPUTDIR)%,$(JAVAC_SERVER_DIR))
JAVA_CMD := $(FIXPATH) $(BOOT_JDK)/bin/java
JAVAC_CMD := $(FIXPATH) $(BOOT_JDK)/bin/javac
@@ -48,3 +48,4 @@ JAVA_FLAGS_BIG := @BOOTCYCLE_JVM_ARGS_BIG@
# By filtering out those JVM args, the bootcycle JVM will use its default
# settings for CDS.
JAVA_FLAGS := $(filter-out -XX:SharedArchiveFile% -Xshare%, $(JAVA_FLAGS))

View File

@@ -1,7 +1,7 @@
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
#
# Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 2013, 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

View File

@@ -26,7 +26,7 @@
# the root of the build directory.
################################################################################
##########################################################################################
# Substitutions from autoconf
export LEGACY_BUILD_DIR=@OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU_LEGACY@

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2023, 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
@@ -23,11 +23,11 @@
# questions.
#
################################################################################
###############################################################################
#
# Includes and boilerplate
#
################################################################################
###############################################################################
AC_PREREQ([2.69])
@@ -63,14 +63,14 @@ m4_include([platform.m4])
m4_include([source-dirs.m4])
m4_include([toolchain.m4])
################################################################################
###############################################################################
#
# Initialization / Boot-strapping
#
# The bootstrapping process needs to solve the "chicken or the egg" problem,
# thus it jumps back and forth, each time gaining something needed later on.
#
################################################################################
###############################################################################
# If we are requested to print additional help, do that and then exit.
# This must be the very first call.
@@ -128,51 +128,51 @@ PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION
BASIC_SETUP_DEFAULT_MAKE_TARGET
BASIC_SETUP_DEFAULT_LOG
################################################################################
###############################################################################
#
# Determine OpenJDK variants and version numbers.
#
################################################################################
###############################################################################
# We need build & target for this.
JDKOPT_SETUP_JMOD_OPTIONS
JDKOPT_SETUP_JLINK_OPTIONS
JDKVER_SETUP_JDK_VERSION_NUMBERS
################################################################################
###############################################################################
#
# Setup BootJDK, used to bootstrap the build.
#
################################################################################
###############################################################################
BOOTJDK_SETUP_BOOT_JDK
BOOTJDK_SETUP_BUILD_JDK
BOOTJDK_SETUP_DOCS_REFERENCE_JDK
################################################################################
###############################################################################
#
# Determine JDK specific build time options.
#
################################################################################
###############################################################################
JDKOPT_SETUP_REPRODUCIBLE_BUILD
JDKOPT_SETUP_JDK_OPTIONS
################################################################################
###############################################################################
#
# Configure the sources to use. We can add or override individual directories.
#
################################################################################
###############################################################################
SRCDIRS_SETUP_DIRS
SRCDIRS_SETUP_IMPORT_MODULES
################################################################################
###############################################################################
#
# Setup the toolchain (compilers etc), i.e. tools used to compile and process
# native code.
#
################################################################################
###############################################################################
# See if we are doing a complete static build or not
JDKOPT_SETUP_STATIC_BUILD
@@ -202,7 +202,6 @@ FLAGS_POST_TOOLCHAIN
LIB_TESTS_SETUP_JTREG
LIB_TESTS_SETUP_JMH
LIB_TESTS_SETUP_JIB
LIB_TESTS_SETUP_TIDY
# Now we can test some aspects on the target using configure macros.
PLATFORM_SETUP_OPENJDK_TARGET_BITS
@@ -228,31 +227,31 @@ JDKOPT_SETUP_LEAK_SANITIZER
# This needs to go before 'LIB_DETERMINE_DEPENDENCIES'
JDKOPT_SETUP_FALLBACK_LINKER
################################################################################
###############################################################################
#
# Check dependencies for external and internal libraries.
#
################################################################################
###############################################################################
LIB_DETERMINE_DEPENDENCIES
LIB_SETUP_LIBRARIES
################################################################################
###############################################################################
#
# Setup hotspot and JVM features (needs toolchain).
#
################################################################################
###############################################################################
JVM_FEATURES_PARSE_OPTIONS
JVM_FEATURES_SETUP
HOTSPOT_SETUP_MISC
################################################################################
###############################################################################
#
# We need to do some final tweaking, when everything else is done.
#
################################################################################
###############################################################################
LIB_TESTS_ENABLE_DISABLE_FAILURE_HANDLER
LIB_TESTS_ENABLE_DISABLE_JTREG_TEST_THREAD_FACTORY
@@ -261,16 +260,15 @@ JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST
JDKOPT_EXCLUDE_TRANSLATIONS
JDKOPT_ENABLE_DISABLE_MANPAGES
JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE
JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE_COH
JDKOPT_ENABLE_DISABLE_COMPATIBLE_CDS_ALIGNMENT
JDKOPT_SETUP_MACOSX_SIGNING
################################################################################
###############################################################################
#
# Configure parts of the build that only affect the build performance,
# not the result.
#
################################################################################
###############################################################################
BPERF_SETUP_BUILD_CORES
BPERF_SETUP_BUILD_MEMORY
@@ -290,11 +288,11 @@ BPERF_SETUP_PRECOMPILED_HEADERS
# Setup use of ccache, if available
BPERF_SETUP_CCACHE
################################################################################
###############################################################################
#
# And now the finish...
#
################################################################################
###############################################################################
# Check for some common pitfalls
BASIC_TEST_USABILITY_ISSUES
@@ -315,11 +313,9 @@ AC_OUTPUT
# After AC_OUTPUT, we need to do final work
CUSTOM_CONFIG_OUTPUT_GENERATED_HOOK
BASIC_POST_CONFIG_OUTPUT
# Finally output some useful information to the user
HELP_PRINT_SUMMARY_AND_WARNINGS
CUSTOM_SUMMARY_AND_WARNINGS_HOOK
HELP_REPEAT_WARNINGS
# All output is done. Do the post-config output management.
BASIC_POST_CONFIG_OUTPUT

View File

@@ -235,16 +235,14 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
# Additional warnings that are not activated by -Wall and -Wextra
WARNINGS_ENABLE_ADDITIONAL="-Wpointer-arith -Wreturn-type -Wsign-compare \
-Wtrampolines -Wundef -Wunused-const-variable=1 -Wunused-function \
-Wunused-result -Wunused-value"
WARNINGS_ENABLE_ADDITIONAL="-Wpointer-arith -Wsign-compare \
-Wunused-function -Wundef -Wunused-value -Wreturn-type \
-Wtrampolines"
WARNINGS_ENABLE_ADDITIONAL_CXX="-Woverloaded-virtual -Wreorder"
WARNINGS_ENABLE_ALL_CFLAGS="-Wall -Wextra -Wformat=2 $WARNINGS_ENABLE_ADDITIONAL"
WARNINGS_ENABLE_ALL_CXXFLAGS="$WARNINGS_ENABLE_ALL_CFLAGS $WARNINGS_ENABLE_ADDITIONAL_CXX"
# These warnings will never be turned on, since they generate too many
# false positives.
DISABLED_WARNINGS="unused-parameter"
DISABLED_WARNINGS="unused-parameter unused"
# gcc10/11 on ppc generate lots of abi warnings about layout of aggregates containing vectors
if test "x$OPENJDK_TARGET_CPU_ARCH" = "xppc"; then
DISABLED_WARNINGS="$DISABLED_WARNINGS psabi"
@@ -261,9 +259,7 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
-Wunused-function -Wundef -Wunused-value -Woverloaded-virtual"
WARNINGS_ENABLE_ALL="-Wall -Wextra -Wformat=2 $WARNINGS_ENABLE_ADDITIONAL"
# These warnings will never be turned on, since they generate too many
# false positives.
DISABLED_WARNINGS="unknown-warning-option unused-parameter"
DISABLED_WARNINGS="unknown-warning-option unused-parameter unused"
;;
esac
AC_SUBST(DISABLE_WARNING_PREFIX)
@@ -302,7 +298,7 @@ AC_DEFUN([FLAGS_SETUP_QUALITY_CHECKS],
AC_DEFUN([FLAGS_SETUP_OPTIMIZATION],
[
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
if test "x$TOOLCHAIN_TYPE" = xgcc; then
C_O_FLAG_HIGHEST_JVM="-O3"
C_O_FLAG_HIGHEST="-O3"
C_O_FLAG_HI="-O3"
@@ -311,13 +307,6 @@ AC_DEFUN([FLAGS_SETUP_OPTIMIZATION],
C_O_FLAG_DEBUG="-O0"
C_O_FLAG_DEBUG_JVM="-O0"
C_O_FLAG_NONE="-O0"
if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
C_O_FLAG_HIGHEST_JVM="${C_O_FLAG_HIGHEST_JVM} -finline-functions"
C_O_FLAG_HIGHEST="${C_O_FLAG_HIGHEST} -finline-functions"
C_O_FLAG_HI="${C_O_FLAG_HI} -finline-functions"
fi
# -D_FORTIFY_SOURCE=2 hardening option needs optimization (at least -O1) enabled
# set for lower O-levels -U_FORTIFY_SOURCE to overwrite previous settings
if test "x$OPENJDK_TARGET_OS" = xlinux -a "x$DEBUG_LEVEL" = "xfastdebug"; then
@@ -338,6 +327,21 @@ AC_DEFUN([FLAGS_SETUP_OPTIMIZATION],
C_O_FLAG_DEBUG_JVM="${C_O_FLAG_DEBUG_JVM} ${DISABLE_FORTIFY_CFLAGS}"
C_O_FLAG_NONE="${C_O_FLAG_NONE} ${DISABLE_FORTIFY_CFLAGS}"
fi
elif test "x$TOOLCHAIN_TYPE" = xclang; then
if test "x$OPENJDK_TARGET_OS" = xaix; then
C_O_FLAG_HIGHEST_JVM="-O3 -finline-functions"
C_O_FLAG_HIGHEST="-O3 -finline-functions"
C_O_FLAG_HI="-O3 -finline-functions"
else
C_O_FLAG_HIGHEST_JVM="-O3"
C_O_FLAG_HIGHEST="-O3"
C_O_FLAG_HI="-O3"
fi
C_O_FLAG_NORM="-O2"
C_O_FLAG_DEBUG_JVM="-O0"
C_O_FLAG_SIZE="-Os"
C_O_FLAG_DEBUG="-O0"
C_O_FLAG_NONE="-O0"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
C_O_FLAG_HIGHEST="-O2"
@@ -472,7 +476,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
# Always enable optional macros for VM.
ALWAYS_CFLAGS_JVM="-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS"
##############################################################################
###############################################################################
# Adjust flags according to debug level.
# Setup debug/release defines
@@ -498,15 +502,15 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
elif test "x$TOOLCHAIN_TYPE" = xclang; then
ALWAYS_DEFINES_JVM="-D_GNU_SOURCE"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
# _WIN32_WINNT=0x0602 means access APIs for Windows 8 and above. See
# https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=msvc-170
ALWAYS_DEFINES="-DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0602 \
-D_CRT_DECLARE_NONSTDC_NAMES -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS"
ALWAYS_DEFINES_JDK="$ALWAYS_DEFINES -DWIN32 -DIAL"
ALWAYS_DEFINES_JVM="$ALWAYS_DEFINES -DNOMINMAX"
# Access APIs for Windows 8 and above
# see https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=msvc-170
ALWAYS_DEFINES_JDK="-DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0602 \
-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32 -DIAL"
ALWAYS_DEFINES_JVM="-DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0602 \
-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE"
fi
##############################################################################
###############################################################################
#
#
# CFLAGS BASIC
@@ -640,6 +644,23 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
# Linking is different on macOS
JVM_PICFLAG=""
fi
# Extra flags needed when building optional static versions of certain
# JDK libraries.
STATIC_LIBS_CFLAGS="-DSTATIC_BUILD=1"
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
STATIC_LIBS_CFLAGS="$STATIC_LIBS_CFLAGS -ffunction-sections -fdata-sections \
-DJNIEXPORT='__attribute__((visibility(\"default\")))'"
else
STATIC_LIBS_CFLAGS="$STATIC_LIBS_CFLAGS -DJNIEXPORT="
fi
if test "x$TOOLCHAIN_TYPE" = xgcc; then
# Disable relax-relocation to enable compatibility with older linkers
RELAX_RELOCATIONS_FLAG="-Xassembler -mrelax-relocations=no"
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${RELAX_RELOCATIONS_FLAG}],
IF_TRUE: [STATIC_LIBS_CFLAGS="$STATIC_LIBS_CFLAGS ${RELAX_RELOCATIONS_FLAG}"])
fi
AC_SUBST(STATIC_LIBS_CFLAGS)
])
################################################################################
@@ -887,36 +908,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
IF_FALSE: [$2FDLIBM_CFLAGS=""])
fi
AC_SUBST($2FDLIBM_CFLAGS)
# Check whether the compiler supports the Arm C Language Extensions (ACLE)
# for SVE. Set SVE_CFLAGS to -march=armv8-a+sve if it does.
# ACLE and this flag are required to build the aarch64 SVE related functions in
# libvectormath.
if test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
AC_LANG_PUSH(C)
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -march=armv8-a+sve"
AC_MSG_CHECKING([if Arm SVE ACLE is supported])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <arm_sve.h>],
[
svint32_t r = svdup_n_s32(1);
return 0;
])],
[
AC_MSG_RESULT([yes])
$2SVE_CFLAGS="-march=armv8-a+sve"
],
[
AC_MSG_RESULT([no])
$2SVE_CFLAGS=""
]
)
CFLAGS="$OLD_CFLAGS"
AC_LANG_POP(C)
fi
fi
AC_SUBST($2SVE_CFLAGS)
])
# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
@@ -941,13 +932,15 @@ AC_DEFUN_ONCE([FLAGS_SETUP_BRANCH_PROTECTION],
if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$BRANCH_PROTECTION_FLAG],
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${BRANCH_PROTECTION_FLAG}],
IF_TRUE: [BRANCH_PROTECTION_AVAILABLE=true])
fi
fi
BRANCH_PROTECTION_CFLAGS=""
UTIL_ARG_ENABLE(NAME: branch-protection, DEFAULT: false,
RESULT: BRANCH_PROTECTION_ENABLED, AVAILABLE: $BRANCH_PROTECTION_AVAILABLE,
RESULT: USE_BRANCH_PROTECTION, AVAILABLE: $BRANCH_PROTECTION_AVAILABLE,
DESC: [enable branch protection when compiling C/C++],
IF_ENABLED: [BRANCH_PROTECTION_CFLAGS=$BRANCH_PROTECTION_FLAG])
IF_ENABLED: [ BRANCH_PROTECTION_CFLAGS=${BRANCH_PROTECTION_FLAG}])
AC_SUBST(BRANCH_PROTECTION_CFLAGS)
])

View File

@@ -71,11 +71,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
LDFLAGS_CXX_PARTIAL_LINKING="$MACHINE_FLAG -r"
if test "x$OPENJDK_TARGET_OS" = xlinux; then
# Clang needs the lld linker to work correctly
BASIC_LDFLAGS="-fuse-ld=lld -Wl,--exclude-libs,ALL"
if test "x$CXX_IS_USER_SUPPLIED" = xfalse && test "x$CC_IS_USER_SUPPLIED" = xfalse; then
UTIL_REQUIRE_PROGS(LLD, lld, $TOOLCHAIN_PATH:$PATH)
fi
fi
if test "x$OPENJDK_TARGET_OS" = xaix; then
BASIC_LDFLAGS="-Wl,-b64 -Wl,-brtl -Wl,-bnorwexec -Wl,-bnolibpath -Wl,-bnoexpall \
@@ -192,23 +188,18 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_CPU_DEP],
# Export variables according to old definitions, prefix with $2 if present.
LDFLAGS_JDK_COMMON="$BASIC_LDFLAGS $BASIC_LDFLAGS_JDK_ONLY \
$OS_LDFLAGS $DEBUGLEVEL_LDFLAGS_JDK_ONLY ${$2EXTRA_LDFLAGS}"
$2LDFLAGS_JDKLIB="$LDFLAGS_JDK_COMMON \
$2LDFLAGS_JDKLIB="$LDFLAGS_JDK_COMMON $BASIC_LDFLAGS_JDK_LIB_ONLY \
$SHARED_LIBRARY_FLAGS $REPRODUCIBLE_LDFLAGS $FILE_MACRO_LDFLAGS"
$2LDFLAGS_JDKEXE="$LDFLAGS_JDK_COMMON $EXECUTABLE_LDFLAGS \
${$1_CPU_EXECUTABLE_LDFLAGS} $REPRODUCIBLE_LDFLAGS $FILE_MACRO_LDFLAGS"
$2LDFLAGS_STATIC_JDK="$BASIC_LDFLAGS $BASIC_LDFLAGS_JVM_ONLY \
$OS_LDFLAGS ${$2EXTRA_LDFLAGS} $REPRODUCIBLE_LDFLAGS $FILE_MACRO_LDFLAGS"
$2JVM_LDFLAGS="$BASIC_LDFLAGS $BASIC_LDFLAGS_JVM_ONLY $OS_LDFLAGS $OS_LDFLAGS_JVM_ONLY \
$DEBUGLEVEL_LDFLAGS $DEBUGLEVEL_LDFLAGS_JVM_ONLY \
$DEBUGLEVEL_LDFLAGS $DEBUGLEVEL_LDFLAGS_JVM_ONLY $BASIC_LDFLAGS_ONLYCXX \
${$1_CPU_LDFLAGS} ${$1_CPU_LDFLAGS_JVM_ONLY} ${$2EXTRA_LDFLAGS} \
$REPRODUCIBLE_LDFLAGS $FILE_MACRO_LDFLAGS"
AC_SUBST($2LDFLAGS_JDKLIB)
AC_SUBST($2LDFLAGS_JDKEXE)
AC_SUBST($2LDFLAGS_STATIC_JDK)
AC_SUBST($2JVM_LDFLAGS)
])

View File

@@ -150,9 +150,5 @@ AC_DEFUN([FLAGS_SETUP_ASFLAGS_CPU_DEP],
$2JVM_ASFLAGS="${$2JVM_ASFLAGS} $ARM_ARCH_TYPE_ASFLAGS $ARM_FLOAT_TYPE_ASFLAGS"
fi
if test "x$BRANCH_PROTECTION_ENABLED" = "xtrue"; then
$2JVM_ASFLAGS="${$2JVM_ASFLAGS} $BRANCH_PROTECTION_FLAG"
fi
AC_SUBST($2JVM_ASFLAGS)
])

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2022, 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
@@ -26,7 +26,7 @@
# All valid JVM variants
VALID_JVM_VARIANTS="server client minimal core zero custom"
################################################################################
###############################################################################
# Check if the specified JVM variant should be built. To be used in shell if
# constructs, like this:
# if HOTSPOT_CHECK_JVM_VARIANT(server); then
@@ -38,7 +38,7 @@ VALID_JVM_VARIANTS="server client minimal core zero custom"
AC_DEFUN([HOTSPOT_CHECK_JVM_VARIANT],
[ [ [[ " $JVM_VARIANTS " =~ " $1 " ]] ] ])
################################################################################
###############################################################################
# Check which variants of the JVM that we want to build. Available variants are:
# server: normal interpreter, and a tiered C1/C2 compiler
# client: normal interpreter, and C1 (no C2 compiler)
@@ -102,7 +102,7 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
AC_SUBST(JVM_VARIANT_MAIN)
])
################################################################################
###############################################################################
# Misc hotspot setup that does not fit elsewhere.
#
AC_DEFUN_ONCE([HOTSPOT_SETUP_MISC],

View File

@@ -23,7 +23,7 @@
# questions.
#
################################################################################
###############################################################################
# Set the debug level
# release: no debug information, all optimizations, no asserts.
# optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
@@ -81,7 +81,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL],
AC_SUBST(DEBUG_LEVEL)
])
################################################################################
###############################################################################
#
# Should we build only OpenJDK even if closed sources are present?
#
@@ -121,7 +121,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
if test "x$DOT" != "x"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no, cannot generate full docs or man pages])
AC_MSG_RESULT([no, cannot generate full docs])
FULL_DOCS_AVAILABLE=false
fi
@@ -129,7 +129,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
if test "x$ENABLE_PANDOC" = "xtrue"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no, cannot generate full docs or man pages])
AC_MSG_RESULT([no, cannot generate full docs])
FULL_DOCS_AVAILABLE=false
fi
@@ -197,8 +197,9 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
# three different page sizes: 4K, 64K, and if run on Mac m1 hardware, 16K.
COMPATIBLE_CDS_ALIGNMENT_DEFAULT=false
if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
COMPATIBLE_CDS_ALIGNMENT_DEFAULT=auto
COMPATIBLE_CDS_ALIGNMENT_DEFAULT=true
fi
AC_SUBST(COMPATIBLE_CDS_ALIGNMENT_DEFAULT)
# Compress jars
COMPRESS_JARS=false
@@ -246,7 +247,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
])
################################################################################
###############################################################################
AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
[
@@ -369,7 +370,6 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_CODE_COVERAGE],
CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
LDFLAGS_STATIC_JDK="$LDFLAGS_STATIC_JDK $GCOV_LDFLAGS"
])
AC_SUBST(GCOV_ENABLED)
@@ -411,7 +411,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_CODE_COVERAGE],
AC_SUBST(JCOV_FILTERS)
])
################################################################################
###############################################################################
#
# AddressSanitizer
#
@@ -438,23 +438,12 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER],
# It's harmless to be suppressed in clang as well.
ASAN_CFLAGS="-fsanitize=address -Wno-stringop-truncation -fno-omit-frame-pointer -fno-common -DADDRESS_SANITIZER"
ASAN_LDFLAGS="-fsanitize=address"
# detect_stack_use_after_return causes ASAN to offload stack-local
# variables to c-heap and therefore breaks assumptions in hotspot
# that rely on data (e.g. Marks) living in thread stacks.
if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
ASAN_CFLAGS="$ASAN_CFLAGS --param asan-use-after-return=0"
fi
if test "x$TOOLCHAIN_TYPE" = "xclang"; then
ASAN_CFLAGS="$ASAN_CFLAGS -fsanitize-address-use-after-return=never"
fi
elif test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
# -Oy- is equivalent to -fno-omit-frame-pointer in GCC/Clang.
ASAN_CFLAGS="-fsanitize=address -Oy- -DADDRESS_SANITIZER"
# MSVC produces a warning if you pass -fsanitize=address to the linker. It also complains
$ if -DEBUG is not passed to the linker when building with ASan.
ASAN_LDFLAGS="-debug"
# -fsanitize-address-use-after-return is off by default in MS Visual Studio 22 (19.37.32824).
# cl : Command line warning D9002 : ignoring unknown option '-fno-sanitize-address-use-after-return'
fi
JVM_CFLAGS="$JVM_CFLAGS $ASAN_CFLAGS"
JVM_LDFLAGS="$JVM_LDFLAGS $ASAN_LDFLAGS"
@@ -464,12 +453,11 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER],
CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $ASAN_CFLAGS"
LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $ASAN_LDFLAGS"
LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $ASAN_LDFLAGS"
LDFLAGS_STATIC_JDK="$LDFLAGS_STATIC_JDK $ASAN_LDFLAGS"
])
AC_SUBST(ASAN_ENABLED)
])
################################################################################
###############################################################################
#
# LeakSanitizer
#
@@ -498,26 +486,19 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_LEAK_SANITIZER],
CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $LSAN_CFLAGS"
LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $LSAN_LDFLAGS"
LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $LSAN_LDFLAGS"
LDFLAGS_STATIC_JDK="$LDFLAGS_STATIC_JDK $LSAN_LDFLAGS"
])
AC_SUBST(LSAN_ENABLED)
])
################################################################################
###############################################################################
#
# UndefinedBehaviorSanitizer
#
AC_DEFUN_ONCE([JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER],
[
UTIL_ARG_WITH(NAME: additional-ubsan-checks, TYPE: string,
DEFAULT: [],
DESC: [Customizes the ubsan checks],
OPTIONAL: true)
# GCC reports lots of likely false positives for stringop-truncation and format-overflow.
# Silence them for now.
UBSAN_CHECKS="-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-sanitize=shift-base -fno-sanitize=alignment \
$ADDITIONAL_UBSAN_CHECKS"
UBSAN_CHECKS="-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-sanitize=shift-base -fno-sanitize=alignment"
UBSAN_CFLAGS="$UBSAN_CHECKS -Wno-stringop-truncation -Wno-format-overflow -fno-omit-frame-pointer -DUNDEFINED_BEHAVIOR_SANITIZER"
UBSAN_LDFLAGS="$UBSAN_CHECKS"
UTIL_ARG_ENABLE(NAME: ubsan, DEFAULT: false, RESULT: UBSAN_ENABLED,
@@ -541,7 +522,6 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER],
CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $UBSAN_CFLAGS"
LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $UBSAN_LDFLAGS"
LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $UBSAN_LDFLAGS"
LDFLAGS_STATIC_JDK="$LDFLAGS_STATIC_JDK $UBSAN_LDFLAGS"
])
if test "x$UBSAN_ENABLED" = xfalse; then
UBSAN_CFLAGS=""
@@ -590,42 +570,13 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JMOD_OPTIONS],
################################################################################
#
# jlink options.
# We always keep packaged modules in JDK image.
#
AC_DEFUN_ONCE([JDKOPT_SETUP_JLINK_OPTIONS],
[
################################################################################
#
# Configure option for building a JDK that is suitable for linking from the
# run-time image without JMODs.
#
# Determines whether or not a suitable run-time image is being produced from
# packaged modules. If set to 'true, changes the *default* of packaged
# modules to 'false'.
#
UTIL_ARG_ENABLE(NAME: linkable-runtime, DEFAULT: false,
RESULT: JLINK_PRODUCE_LINKABLE_RUNTIME,
DESC: [enable a JDK build suitable for linking from the run-time image],
CHECKING_MSG: [whether or not a JDK suitable for linking from the run-time image should be produced])
AC_SUBST(JLINK_PRODUCE_LINKABLE_RUNTIME)
if test "x$JLINK_PRODUCE_LINKABLE_RUNTIME" = xtrue; then
DEFAULT_PACKAGED_MODULES=false
else
DEFAULT_PACKAGED_MODULES=true
fi
################################################################################
#
# Configure option for packaged modules
#
# We keep packaged modules in the JDK image unless --enable-linkable-runtime is
# requested.
#
UTIL_ARG_ENABLE(NAME: keep-packaged-modules, DEFAULT: $DEFAULT_PACKAGED_MODULES,
UTIL_ARG_ENABLE(NAME: keep-packaged-modules, DEFAULT: true,
RESULT: JLINK_KEEP_PACKAGED_MODULES,
DESC: [enable keeping of packaged modules in jdk image],
DEFAULT_DESC: [enabled by default unless --enable-linkable-runtime is set],
CHECKING_MSG: [if packaged modules are kept])
AC_SUBST(JLINK_KEEP_PACKAGED_MODULES)
])
@@ -671,11 +622,14 @@ AC_DEFUN([JDKOPT_EXCLUDE_TRANSLATIONS],
################################################################################
#
# Optionally disable man pages (deprecated)
# Optionally disable man pages
#
AC_DEFUN([JDKOPT_ENABLE_DISABLE_MANPAGES],
[
UTIL_DEPRECATED_ARG_ENABLE(manpages)
UTIL_ARG_ENABLE(NAME: manpages, DEFAULT: true, RESULT: BUILD_MANPAGES,
DESC: [enable copying of static man pages],
CHECKING_MSG: [if static man pages should be copied])
AC_SUBST(BUILD_MANPAGES)
])
################################################################################
@@ -703,37 +657,6 @@ AC_DEFUN([JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE],
AC_SUBST(BUILD_CDS_ARCHIVE)
])
################################################################################
#
# Enable or disable the default CDS archive generation for Compact Object Headers
#
AC_DEFUN([JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE_COH],
[
UTIL_ARG_ENABLE(NAME: cds-archive-coh, DEFAULT: auto, RESULT: BUILD_CDS_ARCHIVE_COH,
DESC: [enable generation of default CDS archives for compact object headers (requires --enable-cds-archive)],
DEFAULT_DESC: [auto],
CHECKING_MSG: [if default CDS archives for compact object headers should be generated],
CHECK_AVAILABLE: [
AC_MSG_CHECKING([if CDS archive with compact object headers is available])
if test "x$BUILD_CDS_ARCHIVE" = "xfalse"; then
AC_MSG_RESULT([no (CDS default archive generation is disabled)])
AVAILABLE=false
elif test "x$OPENJDK_TARGET_CPU" != "xx86_64" &&
test "x$OPENJDK_TARGET_CPU" != "xaarch64" &&
test "x$OPENJDK_TARGET_CPU" != "xppc64" &&
test "x$OPENJDK_TARGET_CPU" != "xppc64le" &&
test "x$OPENJDK_TARGET_CPU" != "xriscv64" &&
test "x$OPENJDK_TARGET_CPU" != "xs390x"; then
AC_MSG_RESULT([no (compact object headers not supported for this platform)])
AVAILABLE=false
else
AC_MSG_RESULT([yes])
AVAILABLE=true
fi
])
AC_SUBST(BUILD_CDS_ARCHIVE_COH)
])
################################################################################
#
# Enable the alternative CDS core region alignment
@@ -743,7 +666,7 @@ AC_DEFUN([JDKOPT_ENABLE_DISABLE_COMPATIBLE_CDS_ALIGNMENT],
UTIL_ARG_ENABLE(NAME: compatible-cds-alignment, DEFAULT: $COMPATIBLE_CDS_ALIGNMENT_DEFAULT,
RESULT: ENABLE_COMPATIBLE_CDS_ALIGNMENT,
DESC: [enable use alternative compatible cds core region alignment],
DEFAULT_DESC: [disabled except on linux-aarch64],
DEFAULT_DESC: [disabled],
CHECKING_MSG: [if compatible cds region alignment enabled],
CHECK_AVAILABLE: [
AC_MSG_CHECKING([if CDS archive is available])
@@ -769,7 +692,8 @@ AC_DEFUN([JDKOPT_ALLOW_ABSOLUTE_PATHS_IN_OUTPUT],
AC_ARG_ENABLE([absolute-paths-in-output],
[AS_HELP_STRING([--disable-absolute-paths-in-output],
[Set to disable to prevent any absolute paths from the build to end up in
any of the build output. @<:@disabled in release builds, otherwise enabled@:>@])])
any of the build output. @<:@disabled in release builds, otherwise enabled@:>@])
])
AC_MSG_CHECKING([if absolute paths should be allowed in the build output])
if test "x$enable_absolute_paths_in_output" = "xno"; then

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2023, 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
@@ -23,7 +23,7 @@
# questions.
#
################################################################################
###############################################################################
#
# Setup version numbers
#

View File

@@ -23,7 +23,7 @@
# questions.
#
################################################################################
###############################################################################
# Terminology used in this file:
#
# Valid features == All possible features that the JVM knows about.
@@ -36,7 +36,7 @@
#
# All valid features are considered available, unless listed as unavailable.
# All available features will be turned on as default, unless listed in a filter.
################################################################################
###############################################################################
# We need these as m4 defines to be able to loop over them using m4 later on.
@@ -78,7 +78,7 @@ m4_define(jvm_feature_desc_vm_structs, [export JVM structures to the Serviceabli
m4_define(jvm_feature_desc_zero, [support building variant 'zero'])
m4_define(jvm_feature_desc_zgc, [include the Z garbage collector])
################################################################################
###############################################################################
# Parse command line options for JVM feature selection. After this function
# has run $JVM_FEATURES_ENABLED, $JVM_FEATURES_DISABLED and $JVM_FEATURES_VALID
# can be used.
@@ -199,7 +199,7 @@ AC_DEFUN_ONCE([JVM_FEATURES_PARSE_OPTIONS],
AC_SUBST(VALID_JVM_FEATURES)
])
################################################################################
###############################################################################
# Helper function for the JVM_FEATURES_CHECK_* suite.
# The code in the code block should assign 'false' to the variable AVAILABLE
# if the feature is not available, and this function will handle everything
@@ -225,7 +225,7 @@ AC_DEFUN([JVM_FEATURES_CHECK_AVAILABILITY],
fi
])
################################################################################
###############################################################################
# Check if the feature 'cds' is available on this platform.
#
AC_DEFUN_ONCE([JVM_FEATURES_CHECK_CDS],
@@ -241,7 +241,7 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_CDS],
])
])
################################################################################
###############################################################################
# Check if the feature 'dtrace' is available on this platform.
#
AC_DEFUN_ONCE([JVM_FEATURES_CHECK_DTRACE],
@@ -270,7 +270,7 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_DTRACE],
])
])
################################################################################
###############################################################################
# Check if the feature 'jvmci' is available on this platform.
#
AC_DEFUN_ONCE([JVM_FEATURES_CHECK_JVMCI],
@@ -290,7 +290,7 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_JVMCI],
])
])
################################################################################
###############################################################################
# Check if the feature 'shenandoahgc' is available on this platform.
#
AC_DEFUN_ONCE([JVM_FEATURES_CHECK_SHENANDOAHGC],
@@ -309,7 +309,7 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_SHENANDOAHGC],
])
])
################################################################################
###############################################################################
# Check if the feature 'zgc' is available on this platform.
#
AC_DEFUN_ONCE([JVM_FEATURES_CHECK_ZGC],
@@ -365,7 +365,7 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_ZGC],
])
])
################################################################################
###############################################################################
# Setup JVM_FEATURES_PLATFORM_UNAVAILABLE and JVM_FEATURES_PLATFORM_FILTER
# to contain those features that are unavailable, or should be off by default,
# for this platform, regardless of JVM variant.
@@ -383,7 +383,7 @@ AC_DEFUN_ONCE([JVM_FEATURES_PREPARE_PLATFORM],
])
################################################################################
###############################################################################
# Setup JVM_FEATURES_VARIANT_UNAVAILABLE and JVM_FEATURES_VARIANT_FILTER
# to contain those features that are unavailable, or should be off by default,
# for this particular JVM variant.
@@ -431,7 +431,7 @@ AC_DEFUN([JVM_FEATURES_PREPARE_VARIANT],
fi
])
################################################################################
###############################################################################
# Calculate the actual set of active JVM features for this JVM variant. Store
# the result in JVM_FEATURES_ACTIVE.
#
@@ -479,23 +479,7 @@ AC_DEFUN([JVM_FEATURES_CALCULATE_ACTIVE],
$JVM_FEATURES_ENABLED, $JVM_FEATURES_DISABLED)
])
################################################################################
# Filter the unsupported feature combinations.
# This is called after JVM_FEATURES_ACTIVE are fully populated.
#
AC_DEFUN([JVM_FEATURES_FILTER_UNSUPPORTED],
[
# G1 late barrier expansion in C2 is not implemented for some platforms.
# Choose not to support G1 in this configuration.
if JVM_FEATURES_IS_ACTIVE(compiler2); then
if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
AC_MSG_NOTICE([G1 cannot be used with C2 on this platform, disabling G1])
UTIL_GET_NON_MATCHING_VALUES(JVM_FEATURES_ACTIVE, $JVM_FEATURES_ACTIVE, "g1gc")
fi
fi
])
################################################################################
###############################################################################
# Helper function for JVM_FEATURES_VERIFY. Check if the specified JVM
# feature is active. To be used in shell if constructs, like this:
# 'if JVM_FEATURES_IS_ACTIVE(jvmti); then'
@@ -505,7 +489,7 @@ AC_DEFUN([JVM_FEATURES_FILTER_UNSUPPORTED],
AC_DEFUN([JVM_FEATURES_IS_ACTIVE],
[ [ [[ " $JVM_FEATURES_ACTIVE " =~ ' '$1' ' ]] ] ])
################################################################################
###############################################################################
# Verify that the resulting set of features is consistent and legal.
#
# arg 1: JVM variant
@@ -543,7 +527,7 @@ AC_DEFUN([JVM_FEATURES_VERIFY],
fi
])
################################################################################
###############################################################################
# Set up all JVM features for each enabled JVM variant. Requires that
# JVM_FEATURES_PARSE_OPTIONS has been called.
#
@@ -570,9 +554,6 @@ AC_DEFUN_ONCE([JVM_FEATURES_SETUP],
# The result is stored in JVM_FEATURES_ACTIVE.
JVM_FEATURES_CALCULATE_ACTIVE($variant)
# Filter unsupported feature combinations from JVM_FEATURES_ACTIVE.
JVM_FEATURES_FILTER_UNSUPPORTED
# Verify consistency for JVM_FEATURES_ACTIVE.
JVM_FEATURES_VERIFY($variant)

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2015, 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
@@ -70,25 +70,6 @@ AC_DEFUN_ONCE([LIB_SETUP_ALSA],
PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no])
fi
fi
if test "x$ALSA_FOUND" = xno; then
# If we have sysroot set, and no explicit library location is set,
# look at known locations in sysroot.
if test "x$SYSROOT" != "x" && test "x${with_alsa_lib}" == x; then
if test -f "$SYSROOT/usr/lib64/libasound.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
ALSA_LIBS="-L$SYSROOT/usr/lib64 -lasound"
ALSA_FOUND=yes
elif test -f "$SYSROOT/usr/lib/libasound.so"; then
ALSA_LIBS="-L$SYSROOT/usr/lib -lasound"
ALSA_FOUND=yes
elif test -f "$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libasound.so"; then
ALSA_LIBS="-L$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI -lasound"
ALSA_FOUND=yes
elif test -f "$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU_AUTOCONF-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libasound.so"; then
ALSA_LIBS="-L$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU_AUTOCONF-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI -lasound"
ALSA_FOUND=yes
fi
fi
fi
if test "x$ALSA_FOUND" = xno; then
AC_CHECK_HEADERS([alsa/asoundlib.h],
[

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2022, 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

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2020, 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
@@ -95,10 +95,8 @@ AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
FREETYPE_CFLAGS=
FREETYPE_LIBS=
if (test "x$with_freetype_include" = "x" && \
test "x$with_freetype_lib" != "x") || \
(test "x$with_freetype_include" != "x" && \
test "x$with_freetype_lib" = "x"); then
if (test "x$with_freetype_include" = "x" && test "x$with_freetype_lib" != "x") || \
(test "x$with_freetype_include" != "x" && test "x$with_freetype_lib" = "x"); then
AC_MSG_ERROR([Must specify both or neither of --with-freetype-include and --with-freetype-lib])
fi

View File

@@ -266,30 +266,14 @@ AC_DEFUN([LIB_SETUP_HSDIS_BINUTILS],
HSDIS_CFLAGS="-DLIBARCH_$OPENJDK_TARGET_CPU_LEGACY_LIB"
elif test "x$BINUTILS_INSTALL_DIR" != x; then
disasm_header="\"$BINUTILS_INSTALL_DIR/include/dis-asm.h\""
if (test -e $BINUTILS_INSTALL_DIR/lib/libbfd.a || \
test -e $BINUTILS_INSTALL_DIR/lib64/libbfd.a) && \
(test -e $BINUTILS_INSTALL_DIR/lib/libopcodes.a || \
test -e $BINUTILS_INSTALL_DIR/lib64/libopcodes.a) && \
(test -e $BINUTILS_INSTALL_DIR/lib/libiberty.a || \
test -e $BINUTILS_INSTALL_DIR/lib64/libiberty.a || \
test -e $BINUTILS_INSTALL_DIR/lib32/libiberty.a); then
if test -e $BINUTILS_INSTALL_DIR/lib/libbfd.a && \
test -e $BINUTILS_INSTALL_DIR/lib/libopcodes.a && \
(test -e $BINUTILS_INSTALL_DIR/lib/libiberty.a || test -e $BINUTILS_INSTALL_DIR/lib64/libiberty.a || test -e $BINUTILS_INSTALL_DIR/lib32/libiberty.a); then
HSDIS_CFLAGS="-DLIBARCH_$OPENJDK_TARGET_CPU_LEGACY_LIB -I$BINUTILS_INSTALL_DIR/include"
# libiberty ignores --libdir and may be installed in $BINUTILS_INSTALL_DIR/lib, $BINUTILS_INSTALL_DIR/lib32
# or $BINUTILS_INSTALL_DIR/lib64, depending on system setup
LIBOPCODES_LIB=""
LIBBFD_LIB=""
LIBIBERTY_LIB=""
if test -e $BINUTILS_INSTALL_DIR/lib/libbfd.a; then
LIBBFD_LIB="$BINUTILS_INSTALL_DIR/lib/libbfd.a"
else
LIBBFD_LIB="$BINUTILS_INSTALL_DIR/lib64/libbfd.a"
fi
if test -e $BINUTILS_INSTALL_DIR/lib/libopcodes.a; then
LIBOPCODES_LIB="$BINUTILS_INSTALL_DIR/lib/libopcodes.a"
else
LIBOPCODES_LIB="$BINUTILS_INSTALL_DIR/lib64/libopcodes.a"
fi
if test -e $BINUTILS_INSTALL_DIR/lib/libiberty.a; then
LIBIBERTY_LIB="$BINUTILS_INSTALL_DIR/lib/libiberty.a"
elif test -e $BINUTILS_INSTALL_DIR/lib32/libiberty.a; then
@@ -297,7 +281,7 @@ AC_DEFUN([LIB_SETUP_HSDIS_BINUTILS],
else
LIBIBERTY_LIB="$BINUTILS_INSTALL_DIR/lib64/libiberty.a"
fi
HSDIS_LIBS="$LIBBFD_LIB $LIBOPCODES_LIB $LIBIBERTY_LIB"
HSDIS_LIBS="$BINUTILS_INSTALL_DIR/lib/libbfd.a $BINUTILS_INSTALL_DIR/lib/libopcodes.a $LIBIBERTY_LIB"
# If we have libsframe add it.
if test -e $BINUTILS_INSTALL_DIR/lib/libsframe.a; then
HSDIS_LIBS="$HSDIS_LIBS $BINUTILS_INSTALL_DIR/lib/libsframe.a"

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018, 2023, 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
@@ -28,10 +28,10 @@
################################################################################
# Minimum supported versions
JTREG_MINIMUM_VERSION=7.4
JTREG_MINIMUM_VERSION=7.3.1
GTEST_MINIMUM_VERSION=1.14.0
################################################################################
###############################################################################
#
# Setup and check for gtest framework source files
#
@@ -74,7 +74,7 @@ AC_DEFUN_ONCE([LIB_TESTS_SETUP_GTEST],
AC_SUBST(GTEST_FRAMEWORK_SRC)
])
################################################################################
###############################################################################
#
# Setup and check the Java Microbenchmark Harness
#
@@ -308,32 +308,6 @@ AC_DEFUN_ONCE([LIB_TESTS_SETUP_JIB],
AC_SUBST(JIB_HOME)
])
# Setup the tidy html checker
AC_DEFUN_ONCE([LIB_TESTS_SETUP_TIDY],
[
UTIL_LOOKUP_PROGS(TIDY, tidy)
if test "x$TIDY" != x; then
AC_MSG_CHECKING([if tidy is working properly])
tidy_output=`$TIDY --version 2>&1`
if ! $ECHO "$tidy_output" | $GREP -q "HTML Tidy" 2>&1 > /dev/null; then
AC_MSG_RESULT([no])
AC_MSG_NOTICE([$TIDY is not a valid tidy executable and will be ignored. Output from --version: $tidy_output])
TIDY=
elif ! $ECHO "$tidy_output" | $GREP -q "version" 2>&1 > /dev/null; then
AC_MSG_RESULT([no])
AC_MSG_NOTICE([$TIDY is missing a proper version number and will be ignored. Output from --version: $tidy_output])
TIDY=
else
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([for tidy version])
tidy_version=`$ECHO $tidy_output | $SED -e 's/.*version //g'`
AC_MSG_RESULT([$tidy_version])
fi
fi
AC_SUBST(TIDY)
])
################################################################################
#
# Check if building of the jtreg failure handler should be enabled.

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2023, 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
@@ -71,9 +71,9 @@ AC_DEFUN_ONCE([LIB_SETUP_X11],
elif test -f "$SYSROOT/usr/lib/libX11.so"; then
x_libraries="$SYSROOT/usr/lib"
elif test -f "$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libX11.so"; then
x_libraries="$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI"
x_libraries="$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libX11.so"
elif test -f "$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU_AUTOCONF-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libX11.so"; then
x_libraries="$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU_AUTOCONF-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI"
x_libraries="$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU_AUTOCONF-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libX11.so"
fi
fi
fi

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2023, 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
@@ -666,14 +666,11 @@ AC_DEFUN([PLATFORM_CHECK_DEPRECATION],
[
AC_ARG_ENABLE(deprecated-ports, [AS_HELP_STRING([--enable-deprecated-ports@<:@=yes/no@:>@],
[Suppress the error when configuring for a deprecated port @<:@no@:>@])])
# Unfortunately, variants have not been parsed yet, so we have to check the configure option
# directly. Allow only the directly specified Zero variant, treat any other mix as containing
# something non-Zero.
if test "x$OPENJDK_TARGET_CPU" = xx86 && test "x$with_jvm_variants" != xzero; then
if test "x$OPENJDK_TARGET_OS" = xwindows && test "x$OPENJDK_TARGET_CPU" = xx86; then
if test "x$enable_deprecated_ports" = "xyes"; then
AC_MSG_WARN([The 32-bit x86 port is deprecated and may be removed in a future release.])
AC_MSG_WARN([The Windows 32-bit x86 port is deprecated and may be removed in a future release.])
else
AC_MSG_ERROR(m4_normalize([The 32-bit x86 port is deprecated and may be removed in a future release.
AC_MSG_ERROR(m4_normalize([The Windows 32-bit x86 port is deprecated and may be removed in a future release.
Use --enable-deprecated-ports=yes to suppress this error.]))
fi
fi
@@ -681,7 +678,7 @@ AC_DEFUN([PLATFORM_CHECK_DEPRECATION],
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],
[
##############################################################################
###############################################################################
# Note that this is the build platform OS version!
@@ -696,7 +693,7 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS],
[
##############################################################################
###############################################################################
#
# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
# (The JVM can use 32 or 64 bit Java pointers but that decision
@@ -742,7 +739,7 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS],
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS],
[
##############################################################################
###############################################################################
#
# Is the target little or big endian?
#

View File

@@ -272,7 +272,7 @@ VERSION_CFLAGS = \
-DVERSION_CLASSFILE_MINOR=$(VERSION_CLASSFILE_MINOR) \
#
ifneq ($(COMPANY_NAME), )
ifneq ($(COMPANY_NAME),)
# COMPANY_NAME is set to "N/A" in make/conf/branding.conf by default,
# but can be customized with the '--with-vendor-name' configure option.
# Only export "VENDOR" to the build if COMPANY_NAME contains a real value.
@@ -288,13 +288,13 @@ endif
# Only export VENDOR_URL, VENDOR_URL_BUG and VENDOR_VM_URL_BUG to the build if
# they are not empty. Otherwise, default values which are defined in the sources
# will be used.
ifneq ($(VENDOR_URL), )
ifneq ($(VENDOR_URL),)
VERSION_CFLAGS += -DVENDOR_URL='"$(VENDOR_URL)"'
endif
ifneq ($(VENDOR_URL_BUG), )
ifneq ($(VENDOR_URL_BUG),)
VERSION_CFLAGS += -DVENDOR_URL_BUG='"$(VENDOR_URL_BUG)"'
endif
ifneq ($(VENDOR_URL_VM_BUG), )
ifneq ($(VENDOR_URL_VM_BUG),)
VERSION_CFLAGS += -DVENDOR_URL_VM_BUG='"$(VENDOR_URL_VM_BUG)"'
endif
@@ -367,8 +367,9 @@ ENABLE_GENERATE_CLASSLIST := @ENABLE_GENERATE_CLASSLIST@
EXCLUDE_TRANSLATIONS := @EXCLUDE_TRANSLATIONS@
BUILD_MANPAGES := @BUILD_MANPAGES@
BUILD_CDS_ARCHIVE := @BUILD_CDS_ARCHIVE@
BUILD_CDS_ARCHIVE_COH := @BUILD_CDS_ARCHIVE_COH@
ENABLE_COMPATIBLE_CDS_ALIGNMENT := @ENABLE_COMPATIBLE_CDS_ALIGNMENT@
@@ -428,6 +429,9 @@ ENABLE_LIBFFI_BUNDLING := @ENABLE_LIBFFI_BUNDLING@
LIBFFI_LIB_FILE := @LIBFFI_LIB_FILE@
FILE_MACRO_CFLAGS := @FILE_MACRO_CFLAGS@
REPRODUCIBLE_CFLAGS := @REPRODUCIBLE_CFLAGS@
BRANCH_PROTECTION_CFLAGS := @BRANCH_PROTECTION_CFLAGS@
STATIC_LIBS_CFLAGS := @STATIC_LIBS_CFLAGS@
JMH_CORE_JAR := @JMH_CORE_JAR@
JMH_GENERATOR_JAR := @JMH_GENERATOR_JAR@
@@ -557,9 +561,6 @@ LDFLAGS_JDKLIB := @LDFLAGS_JDKLIB@
# LDFLAGS used to link the jdk native launchers (C-code)
LDFLAGS_JDKEXE := @LDFLAGS_JDKEXE@
# LDFLAGS used to link the static jdk library
LDFLAGS_STATIC_JDK := @LDFLAGS_STATIC_JDK@
# LDFLAGS specific to C++ linking.
LDFLAGS_CXX_JDK := @LDFLAGS_CXX_JDK@
@@ -707,7 +708,6 @@ NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) $(JAVADOC_MAIN_CLASS)
JMOD_COMPRESS := @JMOD_COMPRESS@
JLINK_KEEP_PACKAGED_MODULES := @JLINK_KEEP_PACKAGED_MODULES@
JLINK_PRODUCE_LINKABLE_RUNTIME := @JLINK_PRODUCE_LINKABLE_RUNTIME@
RCFLAGS := @RCFLAGS@
@@ -719,7 +719,6 @@ CCACHE := @CCACHE@
# CD is going away, but remains to cater for legacy makefiles.
CD := cd
CHMOD := @CHMOD@
CMAKE := @CMAKE@
CODESIGN := @CODESIGN@
CP := @CP@
CUT := @CUT@
@@ -744,7 +743,6 @@ MKDIR := @MKDIR@
MV := @MV@
NICE := @NICE@
PANDOC := @PANDOC@
TIDY := @TIDY@
PATCH := @PATCH@
PRINTF := @PRINTF@
READLINK := @READLINK@
@@ -806,7 +804,11 @@ UCRT_DLL_DIR := @UCRT_DLL_DIR@
ENABLE_PANDOC := @ENABLE_PANDOC@
PANDOC_MARKDOWN_FLAG := @PANDOC_MARKDOWN_FLAG@
####################################################
#
# Libraries
#
USE_EXTERNAL_LCMS := @USE_EXTERNAL_LCMS@
LCMS_CFLAGS := @LCMS_CFLAGS@
LCMS_LIBS := @LCMS_LIBS@
@@ -819,7 +821,11 @@ USE_EXTERNAL_LIBPNG := @USE_EXTERNAL_LIBPNG@
PNG_LIBS := @PNG_LIBS@
PNG_CFLAGS := @PNG_CFLAGS@
####################################################
#
# Misc
#
INCLUDE_SA := @INCLUDE_SA@
INCLUDE_JVMCI := @INCLUDE_JVMCI@
INCLUDE_COMPILER2 := @INCLUDE_COMPILER2@
@@ -828,9 +834,6 @@ OS_VERSION_MAJOR := @OS_VERSION_MAJOR@
OS_VERSION_MINOR := @OS_VERSION_MINOR@
OS_VERSION_MICRO := @OS_VERSION_MICRO@
# Arm SVE
SVE_CFLAGS := @SVE_CFLAGS@
# Images directory definitions
JDK_IMAGE_SUBDIR := jdk
JRE_IMAGE_SUBDIR := jre

View File

@@ -23,14 +23,14 @@
# questions.
#
################################################################################
########################################################################
# This file is responsible for detecting, verifying and setting up the
# toolchain, i.e. the compiler, linker and related utilities. It will setup
# proper paths to the binaries, but it will not setup any flags.
#
# The binaries used is determined by the toolchain type, which is the family of
# compilers and related tools that are used.
################################################################################
########################################################################
m4_include([toolchain_microsoft.m4])
@@ -307,7 +307,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_POST_DETECTION],
[
# Restore old path, except for the microsoft toolchain, which requires the
# toolchain path to remain in place. Otherwise the compiler will not work in
# some situations in later configure checks.
# some siutations in later configure checks.
if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
PATH="$OLD_PATH"
fi
@@ -316,6 +316,10 @@ AC_DEFUN_ONCE([TOOLCHAIN_POST_DETECTION],
# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
CFLAGS="$ORG_CFLAGS"
CXXFLAGS="$ORG_CXXFLAGS"
# filter out some unwanted additions autoconf may add to CXX; we saw this on macOS with autoconf 2.72
UTIL_GET_NON_MATCHING_VALUES(cxx_filtered, $CXX, -std=c++11 -std=gnu++11)
CXX="$cxx_filtered"
])
# Check if a compiler is of the toolchain type we expect, and save the version
@@ -354,11 +358,6 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION],
# Copyright (C) 2013 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# or look like
# gcc (GCC) 10.2.1 20200825 (Alibaba 10.2.1-3.8 2.32)
# Copyright (C) 2020 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
# Check that this is likely to be GCC.
$ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
@@ -372,8 +371,7 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION],
COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
$SED -e 's/ *Copyright .*//'`
COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
$AWK -F ')' '{print [$]2}' | \
$AWK '{print [$]1}'`
$SED -e 's/^.* \(@<:@1-9@:>@<:@0-9@:>@*\.@<:@0-9.@:>@*\)@<:@^0-9.@:>@.*$/\1/'`
elif test "x$TOOLCHAIN_TYPE" = xclang; then
# clang --version output typically looks like
# Apple clang version 15.0.0 (clang-1500.3.9.4)
@@ -445,7 +443,6 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
AC_MSG_ERROR([User supplied compiler $1=[$]$1 does not exist])
fi
fi
$1_IS_USER_SUPPLIED=true
else
# No user supplied value. Locate compiler ourselves.
@@ -463,7 +460,6 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
HELP_MSG_MISSING_DEPENDENCY([devkit])
AC_MSG_ERROR([Could not find a $COMPILER_NAME compiler. $HELP_MSG])
fi
$1_IS_USER_SUPPLIED=false
fi
# Now we have a compiler binary in $1. Make sure it's okay.
@@ -682,9 +678,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA],
test_metal=`$METAL --version 2>&1`
if test $? -ne 0; then
AC_MSG_RESULT([no])
AC_MSG_NOTICE([A full XCode is required to build the JDK (not only command line tools)])
AC_MSG_NOTICE([If you have XCode installed, you might need to reset the Xcode active developer directory])
AC_MSG_NOTICE([using 'sudo xcode-select -r'])
AC_MSG_ERROR([XCode tool 'metal' neither found in path nor with xcrun])
else
AC_MSG_RESULT([yes, will be using '$METAL'])

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2022, 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
@@ -82,7 +82,9 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
fi
AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
if test "x$TARGET_CPU" = xx86_64; then
if test "x$TARGET_CPU" = xx86; then
VCVARSFILES="vcvars32.bat vcvarsamd64_x86.bat"
elif test "x$TARGET_CPU" = xx86_64; then
VCVARSFILES="vcvars64.bat vcvarsx86_amd64.bat"
elif test "x$TARGET_CPU" = xaarch64; then
# for host x86-64, target aarch64
@@ -130,7 +132,9 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
elif test -f "$WIN_SDK_BASE/bin/setenv.cmd"; then
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
VS_ENV_CMD="$WIN_SDK_BASE/bin/setenv.cmd"
if test "x$TARGET_CPU" = xx86_64; then
if test "x$TARGET_CPU" = xx86; then
VS_ENV_ARGS="/x86"
elif test "x$TARGET_CPU" = xx86_64; then
VS_ENV_ARGS="/x64"
elif test "x$TARGET_CPU" = xaarch64; then
VS_ENV_ARGS="/arm64"
@@ -434,7 +438,9 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL],
# Need to check if the found msvcr is correct architecture
AC_MSG_CHECKING([found $DLL_NAME architecture])
MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
if test "x$OPENJDK_TARGET_CPU" = xx86; then
CORRECT_MSVCR_ARCH=386
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
CORRECT_MSVCR_ARCH=x86-64
elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
# The cygwin 'file' command only returns "PE32+ executable (DLL) (console), for MS Windows",
@@ -460,7 +466,9 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
DLL_HELP="$2"
MSVC_DLL=
if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
if test "x$OPENJDK_TARGET_CPU" = xx86; then
vs_target_cpu=x86
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
vs_target_cpu=x64
elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
vs_target_cpu=arm64
@@ -514,8 +522,18 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
# Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
# (This was the original behaviour; kept since it might turn something up)
if test "x$VCINSTALLDIR" != x; then
if test "x$OPENJDK_TARGET_CPU" = xx86; then
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
| $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $GREP -v arm64 | $HEAD --lines 1`
if test "x$POSSIBLE_MSVC_DLL" = x; then
# We're grasping at straws now...
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
| $HEAD --lines 1`
fi
else
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
| $GREP x64 | $HEAD --lines 1`
fi
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
[search of VCINSTALLDIR])

View File

@@ -26,70 +26,6 @@
m4_include([util_paths.m4])
###############################################################################
# Overwrite the existing version of AC_PROG_CC with our own custom variant.
# Unlike the regular AC_PROG_CC, the compiler list must always be passed.
AC_DEFUN([AC_PROG_CC],
[
AC_LANG_PUSH(C)
AC_ARG_VAR([CC], [C compiler command])
AC_ARG_VAR([CFLAGS], [C compiler flags])
_AC_ARG_VAR_LDFLAGS()
_AC_ARG_VAR_LIBS()
_AC_ARG_VAR_CPPFLAGS()
AC_CHECK_TOOLS(CC, [$1])
test -z "$CC" && AC_MSG_FAILURE([no acceptable C compiler found in \$PATH])
# Provide some information about the compiler.
_AS_ECHO_LOG([checking for _AC_LANG compiler version])
set X $ac_compile
ac_compiler=$[2]
for ac_option in --version -v -V -qversion -version; do
_AC_DO_LIMIT([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD])
done
m4_expand_once([_AC_COMPILER_EXEEXT])
m4_expand_once([_AC_COMPILER_OBJEXT])
_AC_PROG_CC_G
AC_LANG_POP(C)
])
###############################################################################
# Overwrite the existing version of AC_PROG_CXX with our own custom variant.
# Unlike the regular AC_PROG_CXX, the compiler list must always be passed.
AC_DEFUN([AC_PROG_CXX],
[
AC_LANG_PUSH(C++)
AC_ARG_VAR([CXX], [C++ compiler command])
AC_ARG_VAR([CXXFLAGS], [C++ compiler flags])
_AC_ARG_VAR_LDFLAGS()
_AC_ARG_VAR_LIBS()
_AC_ARG_VAR_CPPFLAGS()
AC_CHECK_TOOLS(CXX, [$1])
# Provide some information about the compiler.
_AS_ECHO_LOG([checking for _AC_LANG compiler version])
set X $ac_compile
ac_compiler=$[2]
for ac_option in --version -v -V -qversion; do
_AC_DO_LIMIT([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD])
done
m4_expand_once([_AC_COMPILER_EXEEXT])
m4_expand_once([_AC_COMPILER_OBJEXT])
_AC_PROG_CXX_G
AC_LANG_POP(C++)
])
################################################################################
# Create a function/macro that takes a series of named arguments. The call is
# similar to AC_DEFUN, but the setup of the function looks like this:
# UTIL_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
@@ -164,7 +100,7 @@ AC_DEFUN([UTIL_DEFUN_NAMED],
])
])
################################################################################
###############################################################################
# Assert that a programmatic condition holds. If not, exit with an error message.
# Check that a shell expression gives return code 0
#
@@ -185,7 +121,7 @@ AC_DEFUN([UTIL_ASSERT_SHELL_TEST],
])
################################################################################
###############################################################################
# Assert that a programmatic condition holds. If not, exit with an error message.
# Check that two strings are equal.
#
@@ -201,7 +137,7 @@ AC_DEFUN([UTIL_ASSERT_STRING_EQUALS],
$3)
])
################################################################################
###############################################################################
# Assert that a programmatic condition holds. If not, exit with an error message.
# Check that two strings not are equal.
#
@@ -217,7 +153,7 @@ AC_DEFUN([UTIL_ASSERT_STRING_NOT_EQUALS],
$3)
])
################################################################################
###############################################################################
# Assert that a programmatic condition holds. If not, exit with an error message.
# Check that the given expression evaluates to the string 'true'
#
@@ -229,7 +165,7 @@ AC_DEFUN([UTIL_ASSERT_TRUE],
UTIL_ASSERT_STRING_EQUALS($1, true, $3)
])
################################################################################
###############################################################################
# Assert that a programmatic condition holds. If not, exit with an error message.
# Check that the given expression does not evaluate to the string 'true'
#
@@ -241,7 +177,7 @@ AC_DEFUN([UTIL_ASSERT_NOT_TRUE],
UTIL_ASSERT_STRING_NOT_EQUALS($1, true, $3)
])
################################################################################
###############################################################################
# Check if a list of space-separated words are selected only from a list of
# space-separated legal words. Typical use is to see if a user-specified
# set of words is selected from a set of legal words.
@@ -268,7 +204,7 @@ AC_DEFUN([UTIL_GET_NON_MATCHING_VALUES],
fi
])
################################################################################
###############################################################################
# Check if a list of space-separated words contains any word(s) from a list of
# space-separated illegal words. Typical use is to see if a user-specified
# set of words contains any from a set of illegal words.
@@ -295,7 +231,7 @@ AC_DEFUN([UTIL_GET_MATCHING_VALUES],
fi
])
################################################################################
###############################################################################
# Converts an ISO-8601 date/time string to a unix epoch timestamp. If no
# suitable conversion method was found, an empty string is returned.
#
@@ -323,7 +259,7 @@ AC_DEFUN([UTIL_GET_EPOCH_TIMESTAMP],
$1=$timestamp
])
################################################################################
###############################################################################
# Sort a space-separated list, and remove duplicates.
#
# Sets the specified variable to the resulting list.
@@ -337,7 +273,7 @@ AC_DEFUN([UTIL_SORT_LIST],
$1=${result//$'\n'/ }
])
################################################################################
###############################################################################
# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
# If so, then append $1 to $2 \
# Also set JVM_ARG_OK to true/false depending on outcome.
@@ -358,7 +294,7 @@ AC_DEFUN([UTIL_ADD_JVM_ARG_IF_OK],
fi
])
################################################################################
###############################################################################
# Register a --with argument but mark it as deprecated
# $1: The name of the with argument to deprecate, not including --with-
AC_DEFUN([UTIL_DEPRECATED_ARG_WITH],
@@ -368,7 +304,7 @@ AC_DEFUN([UTIL_DEPRECATED_ARG_WITH],
[AC_MSG_WARN([Option --with-$1 is deprecated and will be ignored.])])
])
################################################################################
###############################################################################
# Register a --enable argument but mark it as deprecated
# $1: The name of the with argument to deprecate, not including --enable-
AC_DEFUN([UTIL_DEPRECATED_ARG_ENABLE],
@@ -378,7 +314,7 @@ AC_DEFUN([UTIL_DEPRECATED_ARG_ENABLE],
[AC_MSG_WARN([Option --enable-$1 is deprecated and will be ignored.])])
])
################################################################################
###############################################################################
# Register an --enable-* argument as an alias for another argument.
# $1: The name of the enable argument for the new alias, not including --enable-
# $2: The full name of the argument of which to make this an alias, including
@@ -393,7 +329,7 @@ AC_DEFUN([UTIL_ALIASED_ARG_ENABLE],
])
])
################################################################################
###############################################################################
# Creates a command-line option using the --enable-* pattern. Will return a
# value of 'true' or 'false' in the RESULT variable, depending on whether the
# option was enabled or not by the user. The option can not be turned on if it
@@ -535,7 +471,7 @@ UTIL_DEFUN_NAMED([UTIL_ARG_ENABLE],
fi
])
################################################################################
###############################################################################
# Helper functions for ARG_WITH, to validate different types of argument
# Dispatcher to call the correct UTIL_CHECK_TYPE_* function depending on the ARG_TYPE
@@ -575,7 +511,7 @@ AC_DEFUN([UTIL_CHECK_TYPE_directory],
if test "[x]ARG_CHECK_FOR_FILES" != "x:"; then
for file in ARG_CHECK_FOR_FILES; do
found_files=$($ECHO $($LS -d $1/$file 2> /dev/null))
found_files=$($ECHO $(ls $1/$file 2> /dev/null))
if test "x$found_files" = x; then
FAILURE="Directory $1 does not contain $file"
break
@@ -639,7 +575,7 @@ AC_DEFUN([UTIL_CHECK_TYPE_features],
ARG_RESULT=$($ECHO $feature_list)
])
################################################################################
###############################################################################
# Creates a command-line option using the --with-* pattern. Will return a
# string in the RESULT variable with the option provided by the user, or the
# empty string if the --with-* option was not given. The option can not be given
@@ -874,7 +810,7 @@ UTIL_DEFUN_NAMED([UTIL_ARG_WITH],
fi
])
################################################################################
###############################################################################
# Helper functions for CHECK_VALUE in ARG_WITH.
AC_DEFUN([UTIL_CHECK_STRING_NON_EMPTY],
[

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2023, 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
@@ -23,7 +23,7 @@
# questions.
#
################################################################################
###############################################################################
# Appends a string to a path variable, only adding the : when needed.
AC_DEFUN([UTIL_APPEND_TO_PATH],
[
@@ -36,7 +36,7 @@ AC_DEFUN([UTIL_APPEND_TO_PATH],
fi
])
################################################################################
###############################################################################
# Prepends a string to a path variable, only adding the : when needed.
AC_DEFUN([UTIL_PREPEND_TO_PATH],
[
@@ -49,7 +49,7 @@ AC_DEFUN([UTIL_PREPEND_TO_PATH],
fi
])
################################################################################
###############################################################################
# This will make sure the given variable points to a full and proper
# path. This means:
# 1) There will be no spaces in the path. On unix platforms,
@@ -118,7 +118,7 @@ AC_DEFUN([UTIL_FIXUP_PATH],
fi
])
################################################################################
##############################################################################
# Fixup path to be a Windows full long path
# Note: Only supported with cygwin/msys2 (cygpath tool)
AC_DEFUN([UTIL_FIXUP_WIN_LONG_PATH],
@@ -136,7 +136,7 @@ AC_DEFUN([UTIL_FIXUP_WIN_LONG_PATH],
])
################################################################################
###############################################################################
# Check if the given file is a unix-style or windows-style executable, that is,
# if it expects paths in unix-style or windows-style.
# Returns "windows" or "unix" in $RESULT.
@@ -170,7 +170,7 @@ AC_DEFUN([UTIL_CHECK_WINENV_EXEC_TYPE],
fi
])
################################################################################
###############################################################################
# This will make sure the given variable points to a executable
# with a full and proper path. This means:
# 1) There will be no spaces in the path. On unix platforms,
@@ -289,7 +289,7 @@ AC_DEFUN([UTIL_FIXUP_EXECUTABLE],
fi
])
################################################################################
###############################################################################
# Setup a tool for the given variable. If correctly specified by the user,
# use that value, otherwise search for the tool using the supplied code snippet.
# $1: variable to set
@@ -369,7 +369,7 @@ AC_DEFUN([UTIL_SETUP_TOOL],
fi
])
################################################################################
###############################################################################
# Locate a tool using proper methods.
# $1: variable to set
# $2: executable name (or list of names) to look for
@@ -436,7 +436,7 @@ AC_DEFUN([UTIL_LOOKUP_PROGS],
])
])
################################################################################
###############################################################################
# Call UTIL_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool. This will look
# first for cross-compilation tools.
# $1: variable to set
@@ -452,7 +452,7 @@ AC_DEFUN([UTIL_LOOKUP_TOOLCHAIN_PROGS],
fi
])
################################################################################
###############################################################################
# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
# $1: variable to check
AC_DEFUN([UTIL_CHECK_NONEMPTY],
@@ -462,7 +462,7 @@ AC_DEFUN([UTIL_CHECK_NONEMPTY],
fi
])
################################################################################
###############################################################################
# Like UTIL_LOOKUP_PROGS but fails if no tool was found.
# $1: variable to set
# $2: executable name (or list of names) to look for
@@ -473,7 +473,7 @@ AC_DEFUN([UTIL_REQUIRE_PROGS],
UTIL_CHECK_NONEMPTY($1)
])
################################################################################
###############################################################################
# Like UTIL_LOOKUP_PROGS but fails if no tool was found.
# $1: variable to set
# $2: executable name (or list of names) to look for
@@ -485,7 +485,7 @@ AC_DEFUN([UTIL_REQUIRE_TOOLCHAIN_PROGS],
])
################################################################################
###############################################################################
# Like UTIL_SETUP_TOOL but fails if no tool was found.
# $1: variable to set
# $2: autoconf macro to call to look for the special tool
@@ -497,7 +497,7 @@ AC_DEFUN([UTIL_REQUIRE_SPECIAL],
# unix tools. No further processing needed.
])
################################################################################
###############################################################################
# Add FIXPATH prefix to variable. Normally this is done by UTIL_LOOKUP_PROGS
# or UTIL_FIXUP_EXECUTABLE, but in some circumstances this has to be done
# explicitly, such as when the command in question does not exist yet.
@@ -510,7 +510,7 @@ AC_DEFUN([UTIL_ADD_FIXPATH],
fi
])
################################################################################
###############################################################################
AC_DEFUN([UTIL_REMOVE_SYMBOLIC_LINKS],
[
if test "x$OPENJDK_BUILD_OS" != xwindows; then

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2019, 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
@@ -23,7 +23,7 @@
# questions.
#
ifeq ($(_MAKEBASE_GMK), )
ifeq (,$(_MAKEBASE_GMK))
$(error You must include MakeBase.gmk prior to including CopyFiles.gmk)
endif

View File

@@ -1,58 +0,0 @@
#
# Copyright (c) 2024, 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.
#
ifeq ($(_MAKEBASE_GMK), )
$(error You must include MakeBase.gmk prior to including DebugInfoUtils.gmk)
endif
################################################################################
#
# Common debuginfo utility functions
#
################################################################################
################################################################################
# Find native debuginfo files in a directory
#
# Param 1 - dir to find debuginfo files in
FindDebuginfoFiles = \
$(wildcard $(addprefix $1/*, $(DEBUGINFO_SUFFIXES)) \
$(addprefix $1/*/*, $(DEBUGINFO_SUFFIXES)) \
$(addprefix $1/*/*/*, $(DEBUGINFO_SUFFIXES)))
# Pick the correct debug info files to copy, either zipped or not.
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true)
DEBUGINFO_SUFFIXES += .diz
else
DEBUGINFO_SUFFIXES := .debuginfo .pdb .map
# On Macosx, if debug symbols have not been zipped, find all files inside *.dSYM
# dirs.
ifeq ($(call isTargetOs, macosx), true)
$(call FillFindCache, \
$(SUPPORT_OUTPUTDIR)/modules_libs $(SUPPORT_OUTPUTDIR)/modules_cmds)
FindDebuginfoFiles = \
$(if $(wildcard $1), $(call containing, .dSYM/, $(call FindFiles, $1)))
endif
endif

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2019, 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
@@ -23,7 +23,7 @@
# questions.
#
ifeq ($(_MAKEBASE_GMK), )
ifeq (,$(_MAKEBASE_GMK))
$(error You must include MakeBase.gmk prior to including Execute.gmk)
endif

View File

@@ -23,7 +23,7 @@
# questions.
#
ifeq ($(_MAKEBASE_GMK), )
ifeq (,$(_MAKEBASE_GMK))
$(error You must include MakeBase.gmk prior to including FileUtils.gmk)
endif
@@ -136,7 +136,6 @@ ifeq ($(call isTargetOs, macosx), true)
$(CP) -fRP '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'; \
fi
if [ -n "`$(XATTR) -ls '$(call DecodeSpace, $@)'`" ]; then \
$(CHMOD) -h u+w '$(call DecodeSpace, $@)'; \
$(XATTR) -cs '$(call DecodeSpace, $@)'; \
fi
endef
@@ -189,11 +188,6 @@ else
endef
endif
define copy-and-chmod-executable
$(install-file)
$(CHMOD) a+rx $@
endef
################################################################################
# Recursive wildcard function. Walks down directories recursively and matches
@@ -287,7 +281,7 @@ CacheFindFiles = \
#
# $1 - Directories to start search in
FillFindCache = \
$(eval CacheFindFiles_NEW_DIRS := $$(filter-out $$(addsuffix /%, \
$(eval CacheFindFiles_NEW_DIRS := $$(filter-out $$(addsuffix /%,\
$$(CacheFindFiles_CACHED_DIRS)) $$(CacheFindFiles_CACHED_DIRS), $1)) \
$(if $(CacheFindFiles_NEW_DIRS), \
$(eval CacheFindFiles_CACHED_DIRS += $$(patsubst %/,%,$$(CacheFindFiles_NEW_DIRS))) \

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2017, 2019, 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,7 +43,7 @@ $(eval $(call IncludeCustomExtension, common/FindTests.gmk))
TEST_BASEDIRS += $(TOPDIR)/test $(TOPDIR)
# JTREG_TESTROOTS might have been set by a custom extension
JTREG_TESTROOTS += $(addprefix $(TOPDIR)/test/, hotspot/jtreg jdk langtools jaxp lib-test docs)
JTREG_TESTROOTS += $(addprefix $(TOPDIR)/test/, hotspot/jtreg jdk langtools jaxp lib-test)
# Extract the names of the Jtreg group files from the TEST.ROOT files. The
# TEST.ROOT files being properties files can be interpreted as makefiles so

View File

@@ -26,13 +26,13 @@
ifndef _JAR_ARCHIVE_GMK
_JAR_ARCHIVE_GMK := 1
ifeq ($(_MAKEBASE_GMK), )
ifeq (,$(_MAKEBASE_GMK))
$(error You must include MakeBase.gmk prior to including JarArchive.gmk)
endif
include MakeIO.gmk
FALSE_FIND_PATTERN := -name FILE_NAME_THAT_DOESNT_EXIST
FALSE_FIND_PATTERN:=-name FILE_NAME_THAT_DOESNT_EXIST
# Setup make rules for creating a jar archive.
#
@@ -40,81 +40,81 @@ FALSE_FIND_PATTERN := -name FILE_NAME_THAT_DOESNT_EXIST
# and the targets generated are listed in a variable by that name.
#
# Remaining parameters are named arguments. These include:
# DEPENDENCIES List of dependencies for the jar target. If left empty,
# DEPENDENCIES:=List of dependencies for the jar target. If left empty,
# dependencies are calculated automatically from the source files found.
# For this to work, the source files must exist when the makefile is
# parsed.
# SRCS List of directories in where to find files to add to archive
# BIN Directory where to store build control files
# SUFFIXES File suffixes to include in jar
# INCLUDES List of directories/packages in SRCS that should be included
# EXCLUDES List of directories/packages in SRCS that should be excluded
# EXCLUDE_FILES List of files in SRCS that should be excluded
# EXTRA_FILES List of files in SRCS that should be included regardless of suffix match.
# JAR Jar file to create
# MANIFEST Optional manifest file template.
# JARMAIN Optional main class to add to manifest
# JARINDEX true means generate the index in the jar file.
# SKIP_METAINF Set to prevent contents of an META-INF directory to be automatically
# SRCS:=List of directories in where to find files to add to archive
# BIN:=Directory where to store build control files
# SUFFIXES:=File suffixes to include in jar
# INCLUDES:=List of directories/packages in SRCS that should be included
# EXCLUDES:=List of directories/packages in SRCS that should be excluded
# EXCLUDE_FILES:=List of files in SRCS that should be excluded
# EXTRA_FILES:=List of files in SRCS that should be included regardless of suffix match.
# JAR:=Jar file to create
# MANIFEST:=Optional manifest file template.
# JARMAIN:=Optional main class to add to manifest
# JARINDEX:=true means generate the index in the jar file.
# SKIP_METAINF:=Set to prevent contents of an META-INF directory to be automatically
# added to the archive.
# EXTRA_MANIFEST_ATTR Extra attribute to add to manifest.
# EXTRA_MANIFEST_ATTR:=Extra attribute to add to manifest.
# CHECK_COMPRESS_JAR Check the COMPRESS_JAR variable
# JAR_CMD Optionally override the jar command to use when creating the archive.
# JAR_CMD:=Optionally override the jar command to use when creating the archive.
SetupJarArchive = $(NamedParamsMacroTemplate)
define SetupJarArchiveBody
$1_JARMAIN := $(strip $$($1_JARMAIN))
$1_JARNAME := $$(notdir $$($1_JAR))
$1_JARMAIN:=$(strip $$($1_JARMAIN))
$1_JARNAME:=$$(notdir $$($1_JAR))
$1_JAR_OUTPUT_DIR := $$(patsubst %/, %, $$(dir $$($1_JAR)))
$$(call SetIfEmpty, $1_BIN, $$($1_JAR_OUTPUT_DIR))
$1_MANIFEST_FILE := $$($1_BIN)/_the.$$($1_JARNAME)_manifest
$1_DELETESS_FILE := $$($1_BIN)/_the.$$($1_JARNAME)_deletess
$1_DELETES_FILE := $$($1_BIN)/_the.$$($1_JARNAME)_deletes
$1_MANIFEST_FILE:=$$($1_BIN)/_the.$$($1_JARNAME)_manifest
$1_DELETESS_FILE:=$$($1_BIN)/_the.$$($1_JARNAME)_deletess
$1_DELETES_FILE:=$$($1_BIN)/_the.$$($1_JARNAME)_deletes
$$(call SetIfEmpty, $1_JAR_CMD, $$(JAR))
ifeq ($$($1_SUFFIXES), )
ifeq (,$$($1_SUFFIXES))
# No suffix was set, default to classes.
$1_SUFFIXES := .class
$1_SUFFIXES:=.class
endif
# Convert suffixes to a find expression
$1_FIND_PATTERNS := $(FALSE_FIND_PATTERN) $$(patsubst %,$(SPACE)-o$(SPACE)-name$(SPACE)$(DQUOTE)*%$(DQUOTE),$$($1_SUFFIXES))
$1_FIND_PATTERNS:=$(FALSE_FIND_PATTERN) $$(patsubst %,$(SPACE)-o$(SPACE)-name$(SPACE)$(DQUOTE)*%$(DQUOTE),$$($1_SUFFIXES))
# On windows, a lot of includes/excludes risk making the command line too long, so
# writing the grep patterns to files.
# Grep returns 1 if nothing is matched. Do not fail the build for this.
ifneq ($$($1_INCLUDES), )
$1_GREP_INCLUDE_PATTERNS := $$(call EscapeDollar, \
ifneq (,$$($1_INCLUDES))
$1_GREP_INCLUDE_PATTERNS:=$$(call EscapeDollar, \
$$(foreach src,$$($1_SRCS), $$(addprefix $$(src)/,$$($1_INCLUDES))))
# If there are a lot of include patterns, output to file to shorten command lines
ifeq ($$(word 20, $$($1_GREP_INCLUDE_PATTERNS)), )
$1_GREP_INCLUDES := | ( $(GREP) $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_INCLUDE_PATTERNS)) \
ifeq ($$(word 20,$$($1_GREP_INCLUDE_PATTERNS)),)
$1_GREP_INCLUDES:=| ( $(GREP) $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_INCLUDE_PATTERNS)) \
|| test "$$$$?" = "1" )
else
$1_GREP_INCLUDE_OUTPUT = \
$$(eval $$(call ListPathsSafely, $1_GREP_INCLUDE_PATTERNS, \
$$(eval $$(call ListPathsSafely,$1_GREP_INCLUDE_PATTERNS, \
$$($1_BIN)/_the.$$($1_JARNAME)_include))
$1_GREP_INCLUDES := | ( $(GREP) -f $$($1_BIN)/_the.$$($1_JARNAME)_include \
$1_GREP_INCLUDES:=| ( $(GREP) -f $$($1_BIN)/_the.$$($1_JARNAME)_include \
|| test "$$$$?" = "1" )
endif
endif
ifneq ($$($1_EXCLUDES)$$($1_EXCLUDE_FILES), )
$1_GREP_EXCLUDE_PATTERNS := $$(call EscapeDollar, \
$$(foreach src, $$($1_SRCS), $$(addprefix $$(src)/, \
ifneq (,$$($1_EXCLUDES)$$($1_EXCLUDE_FILES))
$1_GREP_EXCLUDE_PATTERNS:=$$(call EscapeDollar, \
$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/, \
$$($1_EXCLUDES) $$($1_EXCLUDE_FILES))))
# If there are a lot of include patterns, output to file to shorten command lines
ifeq ($$(word 20, $$($1_GREP_EXCLUDE_PATTERNS)), )
$1_GREP_EXCLUDES := | ( $(GREP) -v $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_EXCLUDE_PATTERNS)) \
ifeq ($$(word 20,$$($1_GREP_EXCLUDE_PATTERNS)),)
$1_GREP_EXCLUDES:=| ( $(GREP) -v $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_EXCLUDE_PATTERNS)) \
|| test "$$$$?" = "1" )
else
$1_GREP_EXCLUDE_OUTPUT = \
$$(eval $$(call ListPathsSafely, $1_GREP_EXCLUDE_PATTERNS, \
$$(eval $$(call ListPathsSafely,$1_GREP_EXCLUDE_PATTERNS, \
$$($1_BIN)/_the.$$($1_JARNAME)_exclude))
$1_GREP_EXCLUDES := | ( $(GREP) -v -f $$($1_BIN)/_the.$$($1_JARNAME)_exclude \
$1_GREP_EXCLUDES:=| ( $(GREP) -v -f $$($1_BIN)/_the.$$($1_JARNAME)_exclude \
|| test "$$$$?" = "1" )
endif
endif
# Check if this jar needs to have its index generated.
ifneq ($$($1_JARINDEX), )
ifneq (,$$($1_JARINDEX))
$1_JARINDEX = (cd $$(dir $$@) && $$($1_JAR_CMD) -i $$(notdir $$@))
else
$1_JARINDEX = true
@@ -127,19 +127,19 @@ define SetupJarArchiveBody
# Add all source roots to the find cache since we are likely going to run find
# on these more than once. The cache will only be updated if necessary.
$$(call FillFindCache, $$($1_FIND_LIST))
$1_DEPENDENCIES := $$(filter $$(addprefix %, $$($1_SUFFIXES)), \
$$(call FindFiles, $$($1_SRCS)))
ifneq ($$($1_GREP_INCLUDE_PATTERNS), )
$1_DEPENDENCIES := $$(filter $$(addsuffix %, $$($1_GREP_INCLUDE_PATTERNS)), $$($1_DEPENDENCIES))
$1_DEPENDENCIES:=$$(filter $$(addprefix %,$$($1_SUFFIXES)), \
$$(call FindFiles,$$($1_SRCS)))
ifneq (,$$($1_GREP_INCLUDE_PATTERNS))
$1_DEPENDENCIES:=$$(filter $$(addsuffix %,$$($1_GREP_INCLUDE_PATTERNS)),$$($1_DEPENDENCIES))
endif
ifneq ($$($1_GREP_EXCLUDE_PATTERNS), )
$1_DEPENDENCIES := $$(filter-out $$(addsuffix %, $$($1_GREP_EXCLUDE_PATTERNS)), $$($1_DEPENDENCIES))
ifneq (,$$($1_GREP_EXCLUDE_PATTERNS))
$1_DEPENDENCIES:=$$(filter-out $$(addsuffix %,$$($1_GREP_EXCLUDE_PATTERNS)),$$($1_DEPENDENCIES))
endif
# Look for EXTRA_FILES in all SRCS dirs and as absolute paths.
$1_DEPENDENCIES += $$(wildcard $$(foreach src, $$($1_SRCS), \
$1_DEPENDENCIES+=$$(wildcard $$(foreach src, $$($1_SRCS), \
$$(addprefix $$(src)/, $$($1_EXTRA_FILES))) $$($1_EXTRA_FILES))
ifeq ($$($1_SKIP_METAINF), )
$1_DEPENDENCIES += $$(call FindFiles, $$(wildcard $$(addsuffix /META-INF, $$($1_SRCS))))
ifeq (,$$($1_SKIP_METAINF))
$1_DEPENDENCIES+=$$(call FindFiles,$$(wildcard $$(addsuffix /META-INF,$$($1_SRCS))))
endif
endif
# The dependency list should never be empty
@@ -156,23 +156,23 @@ define SetupJarArchiveBody
# into -C <dir> <file> lines.
# The EXTRA_FILES_RESOLVED variable must be set in the macro so that it's evaluated
# in the recipe when the files are guaranteed to exist.
$1_CAPTURE_EXTRA_FILES = \
$$(eval $1_EXTRA_FILES_RESOLVED := $$(call DoubleDollar, \
$1_CAPTURE_EXTRA_FILES=\
$$(eval $1_EXTRA_FILES_RESOLVED:=$$(call DoubleDollar, \
$$(wildcard $$(foreach src, $$($1_SRCS), \
$$(addprefix $$(src)/, $$($1_EXTRA_FILES))) $$($1_EXTRA_FILES)))) \
$$(if $$($1_EXTRA_FILES_RESOLVED), \
$$(eval $$(call ListPathsSafely, $1_EXTRA_FILES_RESOLVED, \
$$(eval $$(call ListPathsSafely,$1_EXTRA_FILES_RESOLVED, \
$$($1_BIN)/_the.$$($1_JARNAME)_contents.extra)) \
$(SED) $$(foreach src, $$($1_SRCS), -e 's|$$(src)/|-C $$(src) |g') \
$(SED) $$(foreach src,$$($1_SRCS), -e 's|$$(src)/|-C $$(src) |g') \
$$($1_BIN)/_the.$$($1_JARNAME)_contents.extra \
>> $$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE))
# The capture contents macro finds all files (matching the patterns, typically
# .class and .prp) that are newer than the jar-file, ie the new content to be put into the jar.
# NOTICE: please leave the parentheses space separated otherwise the AIX build will break!
$1_CAPTURE_CONTENTS = \
$1_CAPTURE_CONTENTS=\
$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE) \
$$(foreach src, $$($1_SRCS), \
$$(foreach src,$$($1_SRCS), \
$(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) -a -newer $$@ $$($1_GREP_INCLUDES) \
$$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/|-C $$(src) |g' \
>> $$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE)) \
@@ -180,19 +180,19 @@ define SetupJarArchiveBody
# The capture metainf macro finds all files below the META-INF directory that are newer than the jar-file.
# Find returns non zero if the META-INF dir does not exist, ignore this.
ifeq ($$($1_SKIP_METAINF), )
$1_CAPTURE_METAINF = $$(foreach src, $$($1_SRCS), \
ifeq (,$$($1_SKIP_METAINF))
$1_CAPTURE_METAINF =$$(foreach src,$$($1_SRCS), \
( ( $(FIND) $$(src)/META-INF -type f -a -newer $$@ 2> /dev/null || true ) \
| $(SED) 's|$$(src)/|-C $$(src) |g' >> \
$$($1_BIN)/_the.$$($1_JARNAME)_contents ) $$(NEWLINE) )
endif
# The capture deletes macro finds all deleted files and concatenates them. The resulting file
# tells us what to remove from the jar-file.
$1_CAPTURE_DELETES = $$(foreach src, $$($1_SRCS), ($(FIND) $$(src) -name _the.package.deleted -newer $$@ \
$1_CAPTURE_DELETES=$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name _the.package.deleted -newer $$@ \
-exec $(SED) 's|$$(src)||g' \{\} >> $$($1_DELETES_FILE) \;) $$(NEWLINE))
# The update contents macro updates the jar file with the previously capture contents.
# Use 'wc -w' to see if the contents file is empty.
$1_UPDATE_CONTENTS = \
$1_UPDATE_CONTENTS=\
if [ "`$(WC) -l $$($1_BIN)/_the.$$($1_JARNAME)_contents | $(AWK) '{ print $$$$1 }'`" -gt "0" ]; then \
$(ECHO) " updating" `$(WC) -l $$($1_BIN)/_the.$$($1_JARNAME)_contents | $(AWK) '{ print $$$$1 }'` files && \
$(SORT) $$($1_BIN)/_the.$$($1_JARNAME)_contents > $$($1_BIN)/_the.$$($1_JARNAME)_contents_sorted && \
@@ -200,27 +200,27 @@ define SetupJarArchiveBody
fi $$(NEWLINE)
# The s-variants of the above macros are used when the jar is created from scratch.
# NOTICE: please leave the parentheses space separated otherwise the AIX build will break!
$1_SCAPTURE_CONTENTS = \
$1_SCAPTURE_CONTENTS=\
$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE) \
$$(foreach src, $$($1_SRCS), \
$$(foreach src,$$($1_SRCS), \
$(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) $$($1_GREP_INCLUDES) \
$$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/|-C $$(src) |g' \
>> $$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE)) \
$$($1_CAPTURE_EXTRA_FILES)
# Find returns non zero if the META-INF dir does not exist, ignore this.
ifeq ($$($1_SKIP_METAINF), )
$1_SCAPTURE_METAINF = $$(foreach src, $$($1_SRCS), \
ifeq (,$$($1_SKIP_METAINF))
$1_SCAPTURE_METAINF=$$(foreach src,$$($1_SRCS), \
( ( $(FIND) $$(src)/META-INF -type f 2> /dev/null || true ) \
| $(SED) 's|$$(src)/|-C $$(src) |g' >> \
$$($1_BIN)/_the.$$($1_JARNAME)_contents) $$(NEWLINE) )
endif
$1_SUPDATE_CONTENTS = \
$1_SUPDATE_CONTENTS=\
$(SORT) $$($1_BIN)/_the.$$($1_JARNAME)_contents > $$($1_BIN)/_the.$$($1_JARNAME)_contents_sorted && \
$$($1_JAR_CMD) --update $$($1_JAR_OPTIONS) --file $$@ @$$($1_BIN)/_the.$$($1_JARNAME)_contents_sorted $$(NEWLINE)
# Use a slightly shorter name for logging, but with enough path to identify this jar.
$1_NAME := $$(subst $$(OUTPUTDIR)/,,$$($1_JAR))
$1_NAME:=$$(subst $$(OUTPUTDIR)/,,$$($1_JAR))
# If reproducible build and the boot jdk jar supports --date option
# then specify the --date using SOURCE_DATE in ISO-8601
@@ -228,7 +228,7 @@ define SetupJarArchiveBody
ifeq ($$(BOOT_JDK_JAR_SUPPORTS_DATE), true)
$1_JAR_OPTIONS += --date $(SOURCE_DATE_ISO_8601)
endif
ifneq ($$($1_CHECK_COMPRESS_JAR), )
ifneq (,$$($1_CHECK_COMPRESS_JAR))
ifneq ($(COMPRESS_JARS), true)
$1_JAR_OPTIONS += --no-compress
endif

View File

@@ -26,7 +26,7 @@
ifndef _JAVA_COMPILATION_GMK
_JAVA_COMPILATION_GMK := 1
ifeq ($(_MAKEBASE_GMK), )
ifeq (,$(_MAKEBASE_GMK))
$(error You must include MakeBase.gmk prior to including JavaCompilation.gmk)
endif
@@ -57,9 +57,9 @@ TARGET_RELEASE_NEWJDK_UPGRADED := $(TARGET_RELEASE_NEWJDK) \
define add_file_to_copy
# param 1 = BUILD_MYPACKAGE
# parma 2 = The source file to copy.
$2_TARGET := $2
$2_TARGET:=$2
# Remove the source prefix.
$$(foreach i, $$($1_SRC), $$(eval $$(call remove_string,$$i,$2_TARGET)))
$$(foreach i,$$($1_SRC),$$(eval $$(call remove_string,$$i,$2_TARGET)))
# To allow for automatic overrides, do not create a rule for a target file that
# already has one
ifneq ($$($1_COPY_$$($2_TARGET)), 1)
@@ -98,9 +98,9 @@ endef
define add_file_to_clean
# param 1 = BUILD_MYPACKAGE
# parma 2 = The source file to copy and clean.
$2_TARGET := $2
$2_TARGET:=$2
# Remove the source prefix.
$$(foreach i, $$($1_SRC), $$(eval $$(call remove_string,$$i,$2_TARGET)))
$$(foreach i,$$($1_SRC),$$(eval $$(call remove_string,$$i,$2_TARGET)))
# Now we can setup the dependency that will trigger the copying.
# To allow for automatic overrides, do not create a rule for a target file that
# already has one
@@ -138,44 +138,44 @@ endef
# The target for public API digest is returned in $1_API_TARGET.
#
# Remaining parameters are named arguments. These include:
# SMALL_JAVA set to false to run javac as a "big" java app
# COMPILER bootjdk or interim, the latter is default
# TARGET_RELEASE javac flags to set the targeted jdk release (-source/-target or --release)
# SMALL_JAVA:=set to false to run javac as a "big" java app
# COMPILER:=bootjdk or interim, the latter is default
# TARGET_RELEASE:=javac flags to set the targeted jdk release (-source/-target or --release)
# Defaults to $(TARGET_RELEASE_NEWJDK).
# JAVAC_FLAGS javac flags to append to the default ones.
# JAVA_FLAGS flags to be appended to the java launching the compiler
# DISABLED_WARNINGS list of Xlint warnings that should be disabled
# SRC one or more directories to search for sources. The order of the source roots
# JAVAC_FLAGS:=javac flags to append to the default ones.
# JAVA_FLAGS:=flags to be appended to the java launching the compiler
# DISABLED_WARNINGS:=list of Xlint warnings that should be disabled
# SRC:=one or more directories to search for sources. The order of the source roots
# is significant. The first found file of a certain name has priority.
# BIN store classes here
# MODULE Name of module being compiled. If set, classes are put in BIN/MODULE.
# CLASSPATH a list of additional entries to set as classpath to javac
# INCLUDES myapp.foo means will only compile java files in myapp.foo or any of its sub-packages.
# EXCLUDES myapp.foo means will do not compile java files in myapp.foo or any of its sub-packages.
# COPY .prp means copy all prp files to the corresponding package in BIN.
# COPY_FILES myapp/foo/setting.txt means copy this file over to the package myapp/foo
# CLEAN .properties means copy and clean all properties file to the corresponding package in BIN.
# CLEAN_FILES myapp/foo/setting.txt means clean this file over to the package myapp/foo
# SRCZIP Create a src.zip based on the found sources and copied files.
# INCLUDE_FILES "com/sun/SolarisFoobar.java" means only compile this file!
# EXCLUDE_FILES "com/sun/SolarisFoobar.java" means do not compile this particular file!
# BIN:=store classes here
# MODULE:=Name of module being compiled. If set, classes are put in BIN/MODULE.
# CLASSPATH:=a list of additional entries to set as classpath to javac
# INCLUDES:=myapp.foo means will only compile java files in myapp.foo or any of its sub-packages.
# EXCLUDES:=myapp.foo means will do not compile java files in myapp.foo or any of its sub-packages.
# COPY:=.prp means copy all prp files to the corresponding package in BIN.
# COPY_FILES:=myapp/foo/setting.txt means copy this file over to the package myapp/foo
# CLEAN:=.properties means copy and clean all properties file to the corresponding package in BIN.
# CLEAN_FILES:=myapp/foo/setting.txt means clean this file over to the package myapp/foo
# SRCZIP:=Create a src.zip based on the found sources and copied files.
# 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.
# EXTRA_FILES List of extra source files to include in compilation. Can be used to
# 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.
# DEPENDS Extra dependency
# KEEP_DUPS Do not remove duplicate file names from different source roots.
# FAIL_NO_SRC Set to false to not fail the build if no source files are found,
# HEADERS:=path to directory where all generated c-headers are written.
# DEPENDS:=Extra dependency
# KEEP_DUPS:=Do not remove duplicate file names from different source roots.
# FAIL_NO_SRC:=Set to false to not fail the build if no source files are found,
# default is true.
# CREATE_API_DIGEST Set to true to use a javac plugin to generate a public API
# CREATE_API_DIGEST:=Set to true to use a javac plugin to generate a public API
# hash which can be used for down stream dependencies to only rebuild
# when the API changes.
# KEEP_ALL_TRANSLATIONS Set to true to skip translation filtering
# KEEP_ALL_TRANSLATIONS:=Set to true to skip translation filtering
SetupJavaCompilation = $(NamedParamsMacroTemplate)
define SetupJavaCompilationBody
# Verify arguments
ifeq ($$($1_BIN), )
ifeq ($$($1_BIN),)
$$(error Must specify BIN (in $1))
endif
@@ -282,26 +282,8 @@ define SetupJavaCompilationBody
$1_FLAGS += -Xlint:$$(call CommaList, $$(addprefix -, $$($1_DISABLED_WARNINGS)))
endif
$1_AUGMENTED_CLASSPATH := $$($1_CLASSPATH)
$1_API_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_pubapi
$1_API_INTERNAL := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_internalapi
ifeq ($$($1_CREATE_API_DIGEST), true)
$1_API_DIGEST_FLAGS := \
-Xplugin:"depend $$($1_API_TARGET)" \
"-XDinternalAPIPath=$$($1_API_INTERNAL)" \
"-XDLOG_LEVEL=$(LOG_LEVEL)" \
#
$1_EXTRA_DEPS := $$(BUILDTOOLS_OUTPUTDIR)/depend/_the.COMPILE_DEPEND_batch
# including the compilation output on the classpath, so that incremental
# compilations in unnamed module can refer to other classes from the same
# source root, which are not being recompiled in this compilation:
$1_AUGMENTED_CLASSPATH += $$(BUILDTOOLS_OUTPUTDIR)/depend $$($1_BIN)
endif
ifneq ($$($1_AUGMENTED_CLASSPATH), )
$1_FLAGS += -cp $$(call PathList, $$($1_AUGMENTED_CLASSPATH))
ifneq ($$($1_CLASSPATH), )
$1_FLAGS += -cp $$(call PathList, $$($1_CLASSPATH))
endif
# Make sure the dirs exist, or that one of the EXTRA_FILES, that may not
@@ -313,7 +295,7 @@ define SetupJavaCompilationBody
) \
) \
)
$$(call MakeDir, $$($1_BIN))
$$(call MakeDir,$$($1_BIN))
# Order src files according to the order of the src dirs. Correct ordering is
# needed for correct overriding between different source roots.
$1_ALL_SRC_RAW := $$(call FindFiles, $$($1_SRC))
@@ -369,69 +351,72 @@ define SetupJavaCompilationBody
endif
else
# All files below META-INF are always copied.
$1_ALL_COPIES := $$(filter $$(addsuffix /META-INF%, $$($1_SRC)), $$($1_ALL_SRCS))
$1_ALL_COPIES := $$(filter $$(addsuffix /META-INF%,$$($1_SRC)),$$($1_ALL_SRCS))
# Find all files to be copied from source to bin.
ifneq ($$($1_COPY)$$($1_COPY_FILES), )
ifneq (,$$($1_COPY)$$($1_COPY_FILES))
# Search for all files to be copied.
$1_ALL_COPIES += $$(filter $$(addprefix %, $$($1_COPY)), $$($1_ALL_SRCS))
$1_ALL_COPIES += $$(filter $$(addprefix %,$$($1_COPY)),$$($1_ALL_SRCS))
# Copy these explicitly
$1_ALL_COPIES += $$($1_COPY_FILES)
endif
# Copy must also respect filters.
ifneq ($$($1_INCLUDE_PATTERN), )
$1_ALL_COPIES := $$(filter $$($1_INCLUDE_PATTERN), $$($1_ALL_COPIES))
ifneq (,$$($1_INCLUDE_PATTERN))
$1_ALL_COPIES := $$(filter $$($1_INCLUDE_PATTERN),$$($1_ALL_COPIES))
endif
ifneq ($$($1_EXCLUDE_PATTERN), )
$1_ALL_COPIES := $$(filter-out $$($1_EXCLUDE_PATTERN), $$($1_ALL_COPIES))
ifneq (,$$($1_EXCLUDE_PATTERN))
$1_ALL_COPIES := $$(filter-out $$($1_EXCLUDE_PATTERN),$$($1_ALL_COPIES))
endif
# Filter out any excluded translations
ifneq ($$($1_KEEP_ALL_TRANSLATIONS), true)
$1_ALL_COPIES := $$(call FilterExcludedTranslations, $$($1_ALL_COPIES), .properties)
endif
ifneq ($$($1_ALL_COPIES), )
ifneq (,$$($1_ALL_COPIES))
# Yep, there are files to be copied!
$1_ALL_COPY_TARGETS :=
$$(foreach i, $$($1_ALL_COPIES), $$(eval $$(call add_file_to_copy,$1,$$i)))
$1_ALL_COPY_TARGETS:=
$$(foreach i,$$($1_ALL_COPIES),$$(eval $$(call add_file_to_copy,$1,$$i)))
# Now we can depend on $$($1_ALL_COPY_TARGETS) to copy all files!
endif
# Find all property files to be copied and cleaned from source to bin.
ifneq ($$($1_CLEAN)$$($1_CLEAN_FILES), )
ifneq (,$$($1_CLEAN)$$($1_CLEAN_FILES))
# Search for all files to be copied.
$1_ALL_CLEANS := $$(filter $$(addprefix %, $$($1_CLEAN)), $$($1_ALL_SRCS))
$1_ALL_CLEANS := $$(filter $$(addprefix %,$$($1_CLEAN)),$$($1_ALL_SRCS))
# Clean these explicitly
$1_ALL_CLEANS += $$($1_CLEAN_FILES)
# Copy and clean must also respect filters.
ifneq ($$($1_INCLUDE_PATTERN), )
$1_ALL_CLEANS := $$(filter $$($1_INCLUDE_PATTERN), $$($1_ALL_CLEANS))
ifneq (,$$($1_INCLUDE_PATTERN))
$1_ALL_CLEANS := $$(filter $$($1_INCLUDE_PATTERN),$$($1_ALL_CLEANS))
endif
ifneq ($$($1_EXCLUDE_PATTERN), )
$1_ALL_CLEANS := $$(filter-out $$($1_EXCLUDE_PATTERN), $$($1_ALL_CLEANS))
ifneq (,$$($1_EXCLUDE_PATTERN))
$1_ALL_CLEANS := $$(filter-out $$($1_EXCLUDE_PATTERN),$$($1_ALL_CLEANS))
endif
# Filter out any excluded translations
ifneq ($$($1_KEEP_ALL_TRANSLATIONS), true)
$1_ALL_CLEANS := $$(call FilterExcludedTranslations, $$($1_ALL_CLEANS), .properties)
endif
ifneq ($$($1_ALL_CLEANS), )
ifneq (,$$($1_ALL_CLEANS))
# Yep, there are files to be copied and cleaned!
$1_ALL_COPY_CLEAN_TARGETS :=
$$(foreach i, $$($1_ALL_CLEANS), $$(eval $$(call add_file_to_clean,$1,$$i)))
$1_ALL_COPY_CLEAN_TARGETS:=
$$(foreach i,$$($1_ALL_CLEANS),$$(eval $$(call add_file_to_clean,$1,$$i)))
# Now we can depend on $$($1_ALL_COPY_CLEAN_TARGETS) to copy all files!
endif
endif
# Create a sed expression to remove the source roots and to replace / with .
# and remove .java at the end.
$1_REWRITE_INTO_CLASSES := $$(foreach i, $$($1_SRC), -e 's|$$i/||g') -e 's|/|.|g' -e 's|.java$$$$||g'
$1_REWRITE_INTO_CLASSES:=$$(foreach i,$$($1_SRC),-e 's|$$i/||g') -e 's|/|.|g' -e 's|.java$$$$||g'
$1_COMPILE_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch
$1_FILELIST := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch.filelist
$1_MODFILELIST := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch.modfiles
$1_MODFILELIST_FIXED := $$($1_MODFILELIST).fixed
$1_API_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_pubapi
$1_API_INTERNAL := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_internalapi
# Put headers in a temp dir to filter out those that actually
# changed before copying them to the real header dir.
ifneq ($$($1_HEADERS), )
ifneq (,$$($1_HEADERS))
$1_HEADERS_ARG := -h $$($1_HEADERS).$1.tmp
$$($1_HEADERS)/_the.$1_headers: $$($1_COMPILE_TARGET)
@@ -457,6 +442,17 @@ define SetupJavaCompilationBody
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
$$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1.vardeps)
ifeq ($$($1_CREATE_API_DIGEST), true)
$1_API_DIGEST_FLAGS := \
-classpath $$(BUILDTOOLS_OUTPUTDIR)/depend \
-Xplugin:"depend $$($1_API_TARGET)" \
"-XDinternalAPIPath=$$($1_API_INTERNAL)" \
"-XDLOG_LEVEL=$(LOG_LEVEL)" \
#
$1_EXTRA_DEPS := $$(BUILDTOOLS_OUTPUTDIR)/depend/_the.COMPILE_DEPEND_batch
endif
# Create a file with all sources, to pass to javac in an @file.
# $$($1_VARDEPS_FILE) is used as dependency to track changes in set of
# list of files.
@@ -503,27 +499,27 @@ define SetupJavaCompilationBody
$$($1_HEADER_TARGETS)
# Check if a jar file was specified, then setup the rules for the jar.
ifneq ($$($1_JAR), )
ifneq (,$$($1_JAR))
# If no suffixes was explicitly set for this jar file.
# Use class and the cleaned/copied properties file suffixes as the default
# for the types of files to be put into the jar.
ifeq ($$($1_SUFFIXES), )
$1_SUFFIXES := .class $$($1_CLEAN) $$($1_COPY)
ifeq (,$$($1_SUFFIXES))
$1_SUFFIXES:=.class $$($1_CLEAN) $$($1_COPY)
endif
$$(eval $$(call SetupJarArchive, ARCHIVE_$1, \
DEPENDENCIES := $$($1), \
SRCS := $$($1_BIN)$$($1_MODULE_SUBDIR), \
SUFFIXES := $$($1_SUFFIXES), \
EXCLUDE := $$($1_EXCLUDES), \
INCLUDES := $$($1_INCLUDES), \
EXTRA_FILES := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS), \
JAR := $$($1_JAR), \
JARMAIN := $$($1_JARMAIN), \
MANIFEST := $$($1_MANIFEST), \
EXTRA_MANIFEST_ATTR := $$($1_EXTRA_MANIFEST_ATTR), \
JARINDEX := $$($1_JARINDEX), \
HEADERS := $$($1_HEADERS), \
DEPENDENCIES:=$$($1), \
SRCS:=$$($1_BIN)$$($1_MODULE_SUBDIR), \
SUFFIXES:=$$($1_SUFFIXES), \
EXCLUDE:=$$($1_EXCLUDES), \
INCLUDES:=$$($1_INCLUDES), \
EXTRA_FILES:=$$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS), \
JAR:=$$($1_JAR), \
JARMAIN:=$$($1_JARMAIN), \
MANIFEST:=$$($1_MANIFEST), \
EXTRA_MANIFEST_ATTR:=$$($1_EXTRA_MANIFEST_ATTR), \
JARINDEX:=$$($1_JARINDEX), \
HEADERS:=$$($1_HEADERS), \
))
# Add jar to target list
@@ -531,13 +527,13 @@ define SetupJavaCompilationBody
endif
# Check if a srczip was specified, then setup the rules for the srczip.
ifneq ($$($1_SRCZIP), )
ifneq (,$$($1_SRCZIP))
$$(eval $$(call SetupZipArchive, ZIP_ARCHIVE_$1, \
SRC := $$($1_SRC), \
ZIP := $$($1_SRCZIP), \
INCLUDES := $$($1_INCLUDES), \
EXCLUDES := $$($1_EXCLUDES), \
EXCLUDE_FILES := $$($1_EXCLUDE_FILES)))
SRC:=$$($1_SRC), \
ZIP:=$$($1_SRCZIP), \
INCLUDES:=$$($1_INCLUDES), \
EXCLUDES:=$$($1_EXCLUDES), \
EXCLUDE_FILES:=$$($1_EXCLUDE_FILES)))
# Add zip to target list
$1 += $$($1_SRCZIP)

View File

@@ -182,12 +182,12 @@ define AddJdkLibrary
$1_$2_NAME := $$(strip $$(lastword $$(subst :, , $3)))
$1_$2_MODULE := $$(strip $$(patsubst %$$($1_$2_NAME), %, $3))
ifeq ($$(filter lib%, $$($1_$2_NAME)), )
ifeq ($$(filter lib%, $$($1_$2_NAME)),)
$$(error Library name $$($1_$2_NAME) missing lib prefix in $1)
endif
$1_$2_NAME := $$(strip $$(patsubst lib%, %, $$($1_$2_NAME)))
ifeq ($$($1_$2_MODULE), )
ifeq ($$($1_$2_MODULE),)
$1_$2_MODULE := $$(MODULE)
else
$1_$2_MODULE := $$(strip $$(patsubst %:, %, $$($1_$2_MODULE)))
@@ -275,8 +275,6 @@ JDK_RCFLAGS=$(RCFLAGS) \
# and EXTRA_HEADER_DIRS will be added.
# JDK_LIBS_<os> or JDK_LIBS_<osType> -- additional JDK_LIBS for the given OS
# or OS type only
# ONLY_EXPORTED -- if true, this library will be flagged as not
# to be included for this module when building static libs
# EXTRA_RCFLAGS -- additional RCFLAGS to append.
# RC_FILEDESC -- override the default FILEDESC for Windows version.rc
# DEFAULT_LIBCXX -- if false, do not add LIBCXX to LIBS for C++ compilations
@@ -305,15 +303,6 @@ define SetupJdkNativeCompilationBody
$1_RC_FTYPE := 0x2L
endif
ifneq ($$(MODULE), )
# Record the fact that this native library is part of the current module
# (unless told otherwise). This variable stores information about all
# created libraries, and is read by ModuleWrapper.
ifneq ($$($1_ONLY_EXPORTED), true)
$$(MODULE)_INCLUDED_LIBS += $$($1_NAME)
endif
endif
ifeq ($$($1_OUTPUT_DIR), )
ifneq ($$(MODULE), )
ifeq ($$($1_TYPE), STATIC_LIBRARY)
@@ -433,10 +422,10 @@ define SetupJdkNativeCompilationBody
ifneq ($$($1_DEFAULT_LDFLAGS), false)
ifeq ($$($1_TYPE), EXECUTABLE)
# Set the default flags first to be able to override
$1_LDFLAGS := $$(filter-out $$($1_LDFLAGS_FILTER_OUT), $$(LDFLAGS_JDKEXE) $$($1_LDFLAGS))
$1_LDFLAGS := $$(filter-out $$($1_LDFLAGS_FILTER_OUT), $$(LDFLAGS_JDKEXE)) $$($1_LDFLAGS)
else
# Set the default flags first to be able to override
$1_LDFLAGS := $$(filter-out $$($1_LDFLAGS_FILTER_OUT), $$(LDFLAGS_JDKLIB) $$($1_LDFLAGS))
$1_LDFLAGS := $$(filter-out $$($1_LDFLAGS_FILTER_OUT), $$(LDFLAGS_JDKLIB)) $$($1_LDFLAGS)
endif
endif

View File

@@ -23,17 +23,17 @@
# questions.
#
################################################################################
################################################################
# MakeBase provides the core functionality needed and used by all makefiles. It
# should be included by all makefiles. MakeBase provides essential
# functionality for named parameter functions, variable dependency, tool
# execution, logging and fixpath functionality.
################################################################################
################################################################
ifndef _MAKEBASE_GMK
_MAKEBASE_GMK := 1
ifeq ($(wildcard $(SPEC)), )
ifeq ($(wildcard $(SPEC)),)
$(error MakeBase.gmk needs SPEC set to a proper spec.gmk)
endif
@@ -49,16 +49,16 @@ endif
# When calling macros, the spaces between arguments are
# often semantically important! Sometimes we need to subst
# spaces and commas, therefore we need the following macros.
X :=
SPACE := $(X) $(X)
COMMA := ,
DOLLAR := $$
HASH := \#
LEFT_PAREN := (
RIGHT_PAREN := )
SQUOTE := '
X:=
SPACE:=$(X) $(X)
COMMA:=,
DOLLAR:=$$
HASH:=\#
LEFT_PAREN:=(
RIGHT_PAREN:=)
SQUOTE:='
#'
DQUOTE := "
DQUOTE:="
#"
define NEWLINE
@@ -99,7 +99,7 @@ define SetupLogging
endif
endif
ifneq ($$(findstring $$(LOG_LEVEL), debug trace), )
ifneq ($$(findstring $$(LOG_LEVEL), debug trace),)
SHELL := $$(SHELL) -x
endif
@@ -117,21 +117,21 @@ define SetupLogging
# The warn level can never be turned off
LogWarn = $$(info $(LOG_PREFIX)$$(strip $$1))
LOG_WARN :=
ifneq ($$(findstring $$(LOG_LEVEL), info debug trace), )
ifneq ($$(findstring $$(LOG_LEVEL), info debug trace),)
LogInfo = $$(info $(LOG_PREFIX)$$(strip $$1))
LOG_INFO :=
else
LogInfo =
LOG_INFO := > /dev/null
endif
ifneq ($$(findstring $$(LOG_LEVEL), debug trace), )
ifneq ($$(findstring $$(LOG_LEVEL), debug trace),)
LogDebug = $$(info $(LOG_PREFIX)$$(strip $$1))
LOG_DEBUG :=
else
LogDebug =
LOG_DEBUG := > /dev/null
endif
ifneq ($$(findstring $$(LOG_LEVEL), trace), )
ifneq ($$(findstring $$(LOG_LEVEL), trace),)
LogTrace = $$(info $(LOG_PREFIX)$$(strip $$1))
LOG_TRACE :=
else
@@ -164,14 +164,14 @@ PARAM_SEQUENCE := $(call sequence, 2, $(MAX_PARAMS))
# BAR := some parameter value, \
# ))
define NamedParamsMacroTemplate
$(if $($(MAX_PARAMS)), $(error Internal makefile error: \
$(if $($(MAX_PARAMS)),$(error Internal makefile error: \
Too many named arguments to macro, please update MAX_PARAMS in MakeBase.gmk))
# Iterate over 2 3 4... and evaluate the named parameters with $1_ as prefix
$(foreach i, $(PARAM_SEQUENCE), $(if $(strip $($i)), \
$(foreach i,$(PARAM_SEQUENCE), $(if $(strip $($i)),\
$(strip $1)_$(strip $(call EscapeHash, $(call DoubleDollar, $($i))))$(NEWLINE)))
# Debug print all named parameter names and values
$(if $(findstring $(LOG_LEVEL), trace), \
$(info $0 $(strip $1) $(foreach i, $(PARAM_SEQUENCE), \
$(info $0 $(strip $1) $(foreach i,$(PARAM_SEQUENCE), \
$(if $(strip $($i)),$(NEWLINE) $(strip [$i] $(if $(filter $(LOG_LEVEL), trace), \
$($i), $(wordlist 1, 20, $($(i))) $(if $(word 21, $($(i))), ...)))))))
@@ -246,7 +246,7 @@ DependOnVariableFileName = \
# Param 1 - Name of variable
DependOnVariableWriteFile = \
$(call MakeDir, $(dir $($1_filename))) \
$(call WriteFile, $1_old := $(call DoubleDollar,$(call EscapeHash,$($1))), \
$(call WriteFile, $1_old:=$(call DoubleDollar,$(call EscapeHash,$($1))), \
$($1_filename)) \
# Does the actual work with parameters stripped.
@@ -260,7 +260,7 @@ DependOnVariableHelper = \
$(eval $1_filename := $(call DependOnVariableFileName, $1, $2)) \
$(if $(wildcard $($1_filename)), \
$(eval include $($1_filename)) \
$(if $(call equals, $(strip $($1)), $(strip $($1_old))),, \
$(if $(call equals, $(strip $($1)), $(strip $($1_old))),,\
$(if $(findstring $(LOG_LEVEL), trace), \
$(info NewVariable $1: >$(strip $($1))<) \
$(info OldVariable $1: >$(strip $($1_old))<) \

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2023, 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
@@ -23,7 +23,7 @@
# questions.
#
ifeq ($(_MAKEBASE_GMK), )
ifeq (,$(_MAKEBASE_GMK))
$(error You must include MakeBase.gmk prior to including MakeIO.gmk)
endif
@@ -67,22 +67,22 @@ else # HAS_FILE_FUNCTION = false
$(eval compress_paths += \
$(strip $(shell $(CAT) $(TOPDIR)/make/common/support/ListPathsSafely-post-compress.incl)))
decompress_paths = $(SED) -f $(TOPDIR)/make/common/support/ListPathsSafely-uncompress.sed \
decompress_paths=$(SED) -f $(TOPDIR)/make/common/support/ListPathsSafely-uncompress.sed \
-e 's|X99|\\n|g' \
-e 's|X98|$(OUTPUTDIR)|g' -e 's|X97|$(TOPDIR)|g' \
-e 's|X00|X|g'
ListPathsSafely_IfPrintf = \
$(if $(word $3, $($(strip $1))), \
$(if $(word $3,$($(strip $1))), \
$(shell $(PRINTF) -- "$(strip $(call EscapeDollar, \
$(call compress_paths, $(wordlist $3, $4, $($(strip $1))))))\n" \
$(call compress_paths, $(wordlist $3,$4,$($(strip $1))))))\n" \
| $(decompress_paths) >> $2))
# Param 1 - Name of variable containing paths/arguments to output
# Param 2 - File to print to
# Param 3 - Set to true to append to file instead of overwriting
define ListPathsSafely
ifneq ($$(word 30001, $$($$(strip $1))), )
ifneq (,$$(word 30001,$$($$(strip $1))))
$$(error Cannot list safely more than 30000 paths. $1 has $$(words $$($$(strip $1))) paths!)
endif
$$(call MakeDir, $$(dir $2))

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2023, 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
@@ -177,8 +177,8 @@ $(MODULE_DEPS_MAKEFILE): $(MODULE_INFOS) \
$(call MakeTargetDir)
$(RM) $@
$(foreach m, $(MODULE_INFOS), \
( $(PRINTF) "DEPS_$(call GetModuleNameFromModuleInfo, $m) := " && \
$(AWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) ' \
( $(PRINTF) "DEPS_$(call GetModuleNameFromModuleInfo, $m) :=" && \
$(AWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) '\
BEGIN { if (MODULE != "java.base") printf(" java.base"); } \
/^ *requires/ { sub(/;/, ""); \
sub(/requires /, " "); \
@@ -191,8 +191,8 @@ $(MODULE_DEPS_MAKEFILE): $(MODULE_INFOS) \
gsub(/\r/, ""); \
printf(" %s", $$0) } \
END { printf("\n") }' $m && \
$(PRINTF) "TRANSITIVE_MODULES_$(call GetModuleNameFromModuleInfo, $m) := " && \
$(AWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) ' \
$(PRINTF) "TRANSITIVE_MODULES_$(call GetModuleNameFromModuleInfo, $m) :=" && \
$(AWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) '\
BEGIN { if (MODULE != "java.base") printf(" java.base"); } \
/^ *requires *transitive/ { \
sub(/;/, ""); \

View File

@@ -182,7 +182,7 @@ define SetupNativeCompilationBody
# Now call CreateCompiledNativeFile for each source file we are going to compile.
$$(foreach file, $$($1_SRCS), \
$$(eval $$(call CreateCompiledNativeFile,$1_$$(notdir $$(file)), \
$$(eval $$(call CreateCompiledNativeFile,$1_$$(notdir $$(file)),\
FILE := $$(file), \
BASE := $1, \
)) \
@@ -222,7 +222,7 @@ define SetupNativeCompilationBody
ifeq ($(GENERATE_COMPILE_COMMANDS_ONLY), true)
# Override all targets (this is a hack)
$1 := $$($1_ALL_OBJS_JSON) $$($1_LDFLAGS_FILE)
$1 := $$($1_ALL_OBJS_JSON)
endif
endef
@@ -292,7 +292,6 @@ define SetupBasicVariables
$1_TARGET := $$($1_OUTPUT_DIR)/$$($1_BASENAME)
$1_NOSUFFIX := $$($1_PREFIX)$$($1_NAME)
$1_SAFE_NAME := $$(strip $$(subst /,_, $1))
$1_UNIQUE_NAME = $$($1_TYPE)_$$(subst /,_,$$(patsubst $$(OUTPUTDIR)/%/,%,$$(dir $$($1_OBJECT_DIR))))_$$($1_NOSUFFIX)
endef
################################################################################

View File

@@ -1,4 +1,4 @@
# Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2017, 2023, 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
@@ -22,7 +22,7 @@
# questions.
#
ifeq ($(_MAKEBASE_GMK), )
ifeq (,$(_MAKEBASE_GMK))
$(error You must include MakeBase.gmk prior to including ProcessMarkdown.gmk)
endif
@@ -92,7 +92,7 @@ define ProcessMarkdown
-t $$($1_FORMAT) --eol=lf --standalone \
$$($1_$2_CSS_OPTION) $$($1_$2_OPTIONS_FROM_SRC) $$($1_$2_OPTIONS) \
'$$($1_$2_PANDOC_INPUT)' -o '$$($1_$2_PANDOC_OUTPUT)')
ifneq ($$(findstring $$(LOG_LEVEL), debug trace), )
ifneq ($$(findstring $$(LOG_LEVEL), debug trace),)
TOO_LONG_LINES=`$$(GREP) -E -e '^.{80}.+$$$$' $$<` || true ; \
if [ "x$$$$TOO_LONG_LINES" != x ]; then \
$$(ECHO) "Warning: Unsuitable markdown in $$<:" ; \

View File

@@ -26,7 +26,7 @@
ifndef _TEST_FILES_COMPILATION_GMK
_TEST_FILES_COMPILATION_GMK := 1
ifeq ($(_MAKEBASE_GMK), )
ifeq (,$(_MAKEBASE_GMK))
$(error You must include MakeBase.gmk prior to including TestFilesCompilation.gmk)
endif
@@ -95,7 +95,7 @@ define SetupTestFilesCompilationBody
TEST_CFLAGS := -I$(TOPDIR)/test/lib/native
# Setup a compilation for each and every one of them
$$(foreach file, $$($1_FILTERED_FILE_LIST), \
$$(foreach file, $$($1_FILTERED_FILE_LIST),\
$$(eval name := $$(strip $$(basename $$(notdir $$(file))))) \
$$(eval unprefixed_name := $$(patsubst $$($1_PREFIX)%, %, $$(name))) \
$$(eval $$(call SetupJdkNativeCompilation, BUILD_TEST_$$(name), \
@@ -112,19 +112,16 @@ define SetupTestFilesCompilationBody
CXXFLAGS := $$(TEST_CFLAGS) $$($1_CFLAGS) $$($1_CFLAGS_$$(name)), \
LD_SET_ORIGIN := $$($1_LD_SET_ORIGIN), \
LDFLAGS := $$($1_LDFLAGS_$$(name)), \
DISABLED_WARNINGS_gcc := format undef unused-but-set-variable \
unused-const-variable unused-function unused-value \
unused-variable, \
DISABLED_WARNINGS_clang := format-nonliteral \
missing-field-initializers sometimes-uninitialized undef \
unused-but-set-variable unused-function unused-variable, \
DISABLED_WARNINGS_gcc := format undef unused-function unused-value, \
DISABLED_WARNINGS_clang := undef format-nonliteral \
missing-field-initializers sometimes-uninitialized, \
DEFAULT_LIBCXX := false, \
JDK_LIBS := $$($1_JDK_LIBS_$$(name)), \
LIBS := $$($1_LIBS_$$(name)), \
DEFAULT_VERSIONINFO_RESOURCE := false, \
OPTIMIZATION := $$(if $$($1_OPTIMIZATION_$$(name)), $$($1_OPTIMIZATION_$$(name)), LOW), \
OPTIMIZATION := $$(if $$($1_OPTIMIZATION_$$(name)),$$($1_OPTIMIZATION_$$(name)),LOW), \
COPY_DEBUG_SYMBOLS := $$($1_COPY_DEBUG_SYMBOLS), \
STRIP_SYMBOLS := $$(if $$($1_STRIP_SYMBOLS_$$(name)), $$($1_STRIP_SYMBOLS_$$(name)), false), \
STRIP_SYMBOLS := $$(if $$($1_STRIP_SYMBOLS_$$(name)),$$($1_STRIP_SYMBOLS_$$(name)),false), \
BUILD_INFO_LOG_MACRO := LogInfo, \
)) \
$$(eval $1 += $$(BUILD_TEST_$$(name)) ) \

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013, 2020, 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
@@ -23,7 +23,7 @@
# questions.
#
ifeq ($(_MAKEBASE_GMK), )
ifeq (,$(_MAKEBASE_GMK))
$(error You must include MakeBase.gmk prior to including TextFileProcessing.gmk)
endif
@@ -80,47 +80,47 @@ endef
SetupTextFileProcessing = $(NamedParamsMacroTemplate)
define SetupTextFileProcessingBody
ifneq ($$($1_SOURCE_FILES), )
ifneq ($$($1_SOURCE_DIRS), )
ifneq ($$($1_SOURCE_FILES),)
ifneq ($$($1_SOURCE_DIRS),)
$$(error Cannot use both SOURCE_FILES and SOURCE_DIRS (in $1))
endif
ifneq ($$($1_EXCLUDE_FILES)$$($1_INCLUDE_FILES), )
ifneq ($$($1_EXCLUDE_FILES)$$($1_INCLUDE_FILES),)
$$(error Cannot INCLUDE/EXCLUDE_FILES with SOURCE_FILES (in $1))
endif
else
ifeq ($$($1_SOURCE_DIRS), )
ifeq ($$($1_SOURCE_DIRS),)
$$(error Must specify either SOURCE_FILES or SOURCE_DIRS (in $1))
endif
# Find all files in the source trees. Sort to remove duplicates.
$$(foreach src, $$($1_SOURCE_DIRS), $$(if $$(wildcard $$(src)), , \
$$(error SOURCE_DIRS contains missing directory $$(src) (in $1))))
ifneq ($$($1_SOURCE_BASE_DIR), )
ifneq ($$($1_SOURCE_BASE_DIR),)
$$(foreach src, $$($1_SOURCE_DIRS), \
$$(if $$(findstring $$($1_SOURCE_BASE_DIR), $$(src)), , \
$$(error SOURCE_DIRS contains directory $$(src) outside \
SOURCE_BASE_DIR $$($1_SOURCE_BASE_DIR) (in $1))))
endif
$1_SOURCE_FILES := $$(sort $$(call FindFiles,$$($1_SOURCE_DIRS)))
$1_EXCLUDE_FILES := $$(foreach i, $$($1_SOURCE_DIRS), $$(addprefix $$i/, $$($1_EXCLUDE_FILES)))
$1_INCLUDE_FILES := $$(foreach i, $$($1_SOURCE_DIRS), $$(addprefix $$i/, $$($1_INCLUDE_FILES)))
$1_SOURCE_FILES := $$(filter-out $$($1_EXCLUDE_FILES), $$($1_SOURCE_FILES))
ifneq ($$(strip $$($1_INCLUDE_FILES)), )
$1_SOURCE_FILES := $$(filter $$($1_INCLUDE_FILES), $$($1_SOURCE_FILES))
$1_EXCLUDE_FILES:=$$(foreach i,$$($1_SOURCE_DIRS),$$(addprefix $$i/,$$($1_EXCLUDE_FILES)))
$1_INCLUDE_FILES:=$$(foreach i,$$($1_SOURCE_DIRS),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
$1_SOURCE_FILES := $$(filter-out $$($1_EXCLUDE_FILES),$$($1_SOURCE_FILES))
ifneq (,$$(strip $$($1_INCLUDE_FILES)))
$1_SOURCE_FILES := $$(filter $$($1_INCLUDE_FILES),$$($1_SOURCE_FILES))
endif
ifeq ($$($1_SOURCE_FILES), )
ifeq (,$$($1_SOURCE_FILES))
$$(info No sources found for $1 when looking inside the dirs $$($1_SRC))
endif
endif
ifneq ($$($1_REPLACEMENTS), )
ifneq ($$($1_REPLACEMENTS),)
# We have a replacement request, prepare it for the recipe
ifneq ($$(findstring /, $$($1_REPLACEMENTS)), )
ifneq ($$(findstring /,$$($1_REPLACEMENTS)),)
# Cannot use / as separator
ifneq ($$(findstring @, $$($1_REPLACEMENTS)), )
ifneq ($$(findstring @,$$($1_REPLACEMENTS)),)
# Cannot use @ as separator
ifneq ($$(findstring |, $$($1_REPLACEMENTS)), )
ifneq ($$(findstring |,$$($1_REPLACEMENTS)),)
# Cannot use | as separator
ifneq ($$(findstring !, $$($1_REPLACEMENTS)), )
ifneq ($$(findstring !,$$($1_REPLACEMENTS)),)
# Cannot use ! as separator. Give up.
$$(error No suitable sed separator can be found for $1. Tested /, @, | and !)
else
@@ -161,7 +161,7 @@ define SetupTextFileProcessingBody
$1_REPLACEMENTS_COMMAND_LINE := $(CAT)
endif
ifneq ($$($1_INCLUDES), )
ifneq ($$($1_INCLUDES),)
# We have a include request, prepare it for the recipe.
# Convert an INCLUDE like this PATTERN_1 => file1 ; PATTERN_2 => file2 ;
# into an awk script fragment like this:
@@ -190,7 +190,7 @@ define SetupTextFileProcessingBody
# Reset target list before populating it
$1 :=
ifneq ($$($1_OUTPUT_FILE), )
ifneq ($$($1_OUTPUT_FILE),)
ifneq ($$(words $$($1_SOURCE_FILES)), 1)
$$(error Cannot use OUTPUT_FILE for more than one source file (in $1))
endif
@@ -199,12 +199,12 @@ define SetupTextFileProcessingBody
$$(eval $$(call SetupSingleTextFileForProcessing,$1, $$($1_SOURCE_FILES), \
$$(patsubst %/, %, $$(dir $$($1_OUTPUT_FILE))), $$(notdir $$($1_OUTPUT_FILE))))
else
ifeq ($$($1_OUTPUT_DIR), )
ifeq ($$($1_OUTPUT_DIR),)
$$(error Neither OUTPUT_FILE nor OUTPUT_DIR was specified (in $1))
endif
# Now call add_native_source for each source file we are going to process.
ifeq ($$($1_SOURCE_BASE_DIR), )
ifeq ($$($1_SOURCE_BASE_DIR),)
# With no base dir specified, put all files in target dir, flattening any
# hierarchies. Note that $1 is space sensitive and must disobey whitespace
# rules.

View File

@@ -23,7 +23,7 @@
# questions.
#
ifeq ($(_MAKEBASE_GMK), )
ifeq (,$(_MAKEBASE_GMK))
$(error You must include MakeBase.gmk prior to including Utils.gmk)
endif
@@ -36,7 +36,7 @@ endif
# String equals
equals = \
$(if $(strip $1)$(strip $2),$(strip \
$(and $(findstring $(strip $1),$(strip $2)), \
$(and $(findstring $(strip $1),$(strip $2)),\
$(findstring $(strip $2),$(strip $1)))), \
true \
)
@@ -64,7 +64,7 @@ uppercase = \
# Param 2 - ending number
sequence = \
$(wordlist $1, $2, $(strip \
$(eval SEQUENCE_COUNT := ) \
$(eval SEQUENCE_COUNT :=) \
$(call _sequence-do,$(strip $2))))
_sequence-do = \
@@ -225,7 +225,7 @@ uniq = \
# whitespace-separated words in $1 is a substring.
containing = \
$(strip \
$(foreach v,$(strip $2), \
$(foreach v,$(strip $2),\
$(call uniq,$(foreach p,$(strip $1),$(if $(findstring $p,$v),$v)))))
# Returns all whitespace-separated words in $2 where none of the
@@ -242,7 +242,7 @@ dups = \
# $1 - List of prefixes
# $2 - List of elements to process
remove-prefixes = \
$(strip $(if $1,$(patsubst $(firstword $1)%,%, \
$(strip $(if $1,$(patsubst $(firstword $1)%,%,\
$(call remove-prefixes,$(filter-out $(firstword $1),$1),$2)),$2))
################################################################################

Some files were not shown because too many files have changed in this diff Show More