Merge ~vpa1977/ubuntu/+source/openjdk-lts:01_security_release_base into ubuntu/+source/openjdk-lts:ubuntu/devel

Proposed by Vladimir Petko
Status: Merged
Merged at revision: c594505f727eaeef740ab1aceca89c40ac65211c
Proposed branch: ~vpa1977/ubuntu/+source/openjdk-lts:01_security_release_base
Merge into: ubuntu/+source/openjdk-lts:ubuntu/devel
Diff against target: 30861 lines (+13173/-4085)
524 files modified
debian/changelog (+11/-0)
debian/patches/8199220.diff (+1/-1)
debian/patches/Don-t-optimize-fdlibm-fork-for-Zero-on-linux-sparc-Z.patch (+2/-2)
debian/patches/atk-wrapper-security.diff (+1/-3)
debian/patches/default-jvm-cfg.diff (+2/-2)
debian/patches/disable-doclint-by-default.diff (+1/-3)
debian/patches/dnd-files.diff (+1/-3)
debian/patches/hotspot-libpath.diff (+7/-7)
debian/patches/icc_loading_with_symlink.diff (+2/-2)
debian/patches/icedtea-override-redirect-compiz.diff (+1/-3)
debian/patches/jdk-getAccessibleValue.diff (+12/-12)
debian/patches/jdk-i18n-pt_BR.diff (+1/-3)
debian/patches/jexec.diff (+4/-4)
debian/patches/keep-gtk2-as-default.patch (+2/-4)
debian/patches/ldap-timeout-test-use-ip.patch (+1/-1)
debian/patches/libpcsclite-dlopen.diff (+2/-4)
debian/patches/log-generated-classes-test.patch (+1/-1)
debian/patches/multiple-pkcs11-library-init.diff (+1/-1)
debian/patches/reproducible-build-user.diff (+3/-3)
debian/patches/reproducible-character-data.diff (+3/-3)
debian/patches/reproducible-copyright-headers.diff (+3/-3)
debian/patches/reproducible-module-info.diff (+1/-1)
debian/patches/riscv64.diff (+1/-1)
debian/patches/s390x-thread-stack-size.diff (+7/-7)
debian/patches/system-pcsclite.diff (+1/-1)
debian/patches/test-use-ip-address.patch (+1/-1)
debian/patches/update-assertion-for-armhf.patch (+1/-1)
debian/patches/update-permission-test.patch (+2/-2)
dev/null (+0/-10)
doc/building.html (+58/-38)
doc/building.md (+61/-25)
doc/testing.html (+8/-8)
make/Bundles.gmk (+4/-13)
make/CompileDemos.gmk (+1/-1)
make/CompileJavaModules.gmk (+8/-12)
make/CopyImportModules.gmk (+1/-1)
make/CreateJmods.gmk (+1/-1)
make/Images.gmk (+3/-3)
make/Init.gmk (+3/-0)
make/InitSupport.gmk (+10/-1)
make/MacBundles.gmk (+1/-1)
make/Main.gmk (+1/-1)
make/ModuleWrapper.gmk (+1/-1)
make/RunTests.gmk (+4/-4)
make/TestImage.gmk (+2/-2)
make/ZipSecurity.gmk (+2/-2)
make/ZipSource.gmk (+4/-3)
make/autoconf/basic.m4 (+13/-1)
make/autoconf/basic_tools.m4 (+17/-56)
make/autoconf/build-aux/config.guess (+34/-31)
make/autoconf/configure.ac (+4/-1)
make/autoconf/flags-cflags.m4 (+36/-2)
make/autoconf/flags-ldflags.m4 (+13/-3)
make/autoconf/flags.m4 (+4/-4)
make/autoconf/jdk-options.m4 (+175/-0)
make/autoconf/jdk-version.m4 (+1/-1)
make/autoconf/lib-x11.m4 (+20/-14)
make/autoconf/spec.gmk.in (+5/-1)
make/autoconf/util.m4 (+601/-5)
make/autoconf/version-numbers (+3/-3)
make/common/CopyFiles.gmk (+112/-0)
make/common/FindTests.gmk (+1/-0)
make/common/MakeBase.gmk (+35/-597)
make/common/MakeIO.gmk (+272/-0)
make/common/Modules.gmk (+2/-2)
make/common/NativeCompilation.gmk (+20/-14)
make/common/Utils.gmk (+365/-0)
make/conf/github-actions.conf (+11/-13)
make/copy/Copy-java.base.gmk (+4/-4)
make/copy/Copy-jdk.crypto.cryptoki.gmk (+1/-1)
make/copy/Copy-jdk.crypto.ucrypto.gmk (+1/-1)
make/data/cacerts/certignaca (+29/-0)
make/data/lsrdata/language-subtag-registry.txt (+263/-2)
make/data/macosxsigning/default-debug.plist (+18/-0)
make/data/macosxsigning/java-debug.plist (+20/-0)
make/gensrc/Gensrc-java.desktop.gmk (+5/-5)
make/gensrc/Gensrc-jdk.hotspot.agent.gmk (+1/-1)
make/gensrc/GensrcBuffer.gmk (+8/-7)
make/gensrc/GensrcCharsetCoder.gmk (+3/-3)
make/gensrc/GensrcIcons.gmk (+1/-1)
make/gensrc/GensrcMisc.gmk (+2/-2)
make/gensrc/GensrcVarHandles.gmk (+4/-2)
make/hotspot/CopyToExplodedJdk.gmk (+1/-1)
make/hotspot/gensrc/GensrcAdlc.gmk (+10/-10)
make/hotspot/gensrc/GensrcDtrace.gmk (+4/-4)
make/hotspot/ide/CreateVSProject.gmk (+1/-1)
make/hotspot/lib/CompileDtraceLibraries.gmk (+1/-1)
make/hotspot/lib/CompileGtest.gmk (+2/-2)
make/hotspot/lib/CompileJvm.gmk (+14/-14)
make/hotspot/lib/JvmDtraceObjects.gmk (+2/-2)
make/hotspot/lib/JvmFeatures.gmk (+2/-2)
make/hotspot/lib/JvmFlags.gmk (+1/-1)
make/hotspot/lib/JvmMapfile.gmk (+10/-10)
make/hotspot/lib/JvmOverrideFiles.gmk (+8/-8)
make/hotspot/test/GtestImage.gmk (+16/-4)
make/jdk/src/classes/build/tools/spp/Spp.java (+18/-5)
make/launcher/Launcher-java.base.gmk (+3/-3)
make/launcher/Launcher-java.security.jgss.gmk (+1/-1)
make/launcher/Launcher-jdk.accessibility.gmk (+2/-2)
make/launcher/Launcher-jdk.pack.gmk (+1/-1)
make/launcher/LauncherCommon.gmk (+2/-2)
make/lib/Awt2dLibraries.gmk (+50/-44)
make/lib/CoreLibraries.gmk (+6/-6)
make/lib/Lib-java.base.gmk (+2/-2)
make/lib/Lib-java.desktop.gmk (+4/-5)
make/lib/Lib-java.instrument.gmk (+2/-2)
make/lib/Lib-java.management.gmk (+1/-2)
make/lib/Lib-java.prefs.gmk (+1/-1)
make/lib/Lib-java.security.jgss.gmk (+16/-14)
make/lib/Lib-jdk.accessibility.gmk (+2/-2)
make/lib/Lib-jdk.attach.gmk (+1/-1)
make/lib/Lib-jdk.crypto.mscapi.gmk (+1/-1)
make/lib/Lib-jdk.crypto.ucrypto.gmk (+1/-1)
make/lib/Lib-jdk.hotspot.agent.gmk (+5/-5)
make/lib/Lib-jdk.internal.le.gmk (+2/-2)
make/lib/Lib-jdk.jdi.gmk (+2/-2)
make/lib/Lib-jdk.management.gmk (+2/-3)
make/lib/Lib-jdk.net.gmk (+1/-1)
make/lib/Lib-jdk.sctp.gmk (+2/-2)
make/test/BuildFailureHandler.gmk (+2/-2)
make/test/JtregNativeHotspot.gmk (+9/-6)
make/test/JtregNativeJdk.gmk (+4/-4)
src/hotspot/cpu/aarch64/aarch64.ad (+2/-1)
src/hotspot/cpu/x86/nativeInst_x86.cpp (+19/-3)
src/hotspot/cpu/x86/x86_64.ad (+2/-1)
src/hotspot/os/aix/perfMemory_aix.cpp (+49/-54)
src/hotspot/os/bsd/perfMemory_bsd.cpp (+50/-55)
src/hotspot/os/linux/cgroupSubsystem_linux.hpp (+3/-0)
src/hotspot/os/linux/cgroupV1Subsystem_linux.cpp (+33/-1)
src/hotspot/os/linux/cgroupV1Subsystem_linux.hpp (+7/-0)
src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp (+21/-0)
src/hotspot/os/linux/cgroupV2Subsystem_linux.hpp (+5/-1)
src/hotspot/os/linux/osContainer_linux.cpp (+19/-1)
src/hotspot/os/linux/osContainer_linux.hpp (+4/-0)
src/hotspot/os/linux/os_linux.cpp (+7/-18)
src/hotspot/os/linux/perfMemory_linux.cpp (+113/-54)
src/hotspot/share/classfile/classLoader.cpp (+6/-14)
src/hotspot/share/classfile/classLoader.hpp (+5/-1)
src/hotspot/share/classfile/klassFactory.cpp (+1/-1)
src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.cpp (+8/-3)
src/hotspot/share/gc/cms/parNewGeneration.cpp (+5/-2)
src/hotspot/share/gc/g1/dirtyCardQueue.hpp (+0/-1)
src/hotspot/share/gc/g1/g1CollectedHeap.cpp (+30/-2)
src/hotspot/share/gc/g1/g1ConcurrentMark.cpp (+4/-1)
src/hotspot/share/gc/g1/g1FullGCReferenceProcessorExecutor.cpp (+4/-0)
src/hotspot/share/gc/g1/g1ParScanThreadState.hpp (+6/-0)
src/hotspot/share/gc/g1/g1ParScanThreadState.inline.hpp (+8/-3)
src/hotspot/share/gc/g1/ptrQueue.hpp (+1/-1)
src/hotspot/share/gc/parallel/pcTasks.cpp (+2/-1)
src/hotspot/share/gc/parallel/psMarkSweep.cpp (+2/-1)
src/hotspot/share/gc/parallel/psParallelCompact.cpp (+4/-2)
src/hotspot/share/gc/parallel/psScavenge.cpp (+5/-3)
src/hotspot/share/gc/serial/defNewGeneration.cpp (+2/-1)
src/hotspot/share/gc/serial/genMarkSweep.cpp (+2/-1)
src/hotspot/share/gc/shared/collectedHeap.hpp (+2/-2)
src/hotspot/share/gc/shared/referenceProcessor.cpp (+95/-62)
src/hotspot/share/gc/shared/referenceProcessor.hpp (+45/-8)
src/hotspot/share/gc/shared/referenceProcessor.inline.hpp (+9/-2)
src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp (+6/-4)
src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointManager.cpp (+39/-31)
src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp (+2/-2)
src/hotspot/share/jfr/writers/jfrEncoders.hpp (+48/-1)
src/hotspot/share/jfr/writers/jfrEncoding.hpp (+5/-0)
src/hotspot/share/jfr/writers/jfrWriterHost.hpp (+2/-0)
src/hotspot/share/jfr/writers/jfrWriterHost.inline.hpp (+6/-0)
src/hotspot/share/memory/filemap.cpp (+9/-2)
src/hotspot/share/memory/filemap.hpp (+1/-1)
src/hotspot/share/opto/callGenerator.cpp (+1/-2)
src/hotspot/share/opto/cfgnode.cpp (+2/-3)
src/hotspot/share/opto/escape.cpp (+60/-10)
src/hotspot/share/opto/escape.hpp (+8/-0)
src/hotspot/share/opto/ifnode.cpp (+1/-0)
src/hotspot/share/opto/loopPredicate.cpp (+5/-7)
src/hotspot/share/opto/loopTransform.cpp (+13/-21)
src/hotspot/share/opto/loopnode.cpp (+100/-81)
src/hotspot/share/opto/loopnode.hpp (+5/-10)
src/hotspot/share/opto/loopopts.cpp (+39/-20)
src/hotspot/share/opto/phaseX.cpp (+24/-1)
src/hotspot/share/opto/phaseX.hpp (+2/-0)
src/hotspot/share/opto/superword.cpp (+0/-5)
src/hotspot/share/runtime/abstract_vm_version.cpp (+4/-0)
src/hotspot/share/runtime/frame.cpp (+2/-2)
src/hotspot/share/utilities/resourceHash.hpp (+26/-0)
src/java.base/linux/native/libjava/CgroupMetrics.c (+3/-1)
src/java.base/share/classes/java/lang/ProcessBuilder.java (+2/-2)
src/java.base/share/classes/java/lang/ProcessHandleImpl.java (+31/-24)
src/java.base/share/classes/java/net/InetAddress.java (+40/-25)
src/java.base/share/classes/java/net/URLPermission.java (+3/-2)
src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java (+27/-2)
src/java.base/share/classes/sun/security/provider/certpath/AdjacencyList.java (+9/-2)
src/java.base/share/classes/sun/security/provider/certpath/Builder.java (+5/-10)
src/java.base/share/classes/sun/security/provider/certpath/ForwardBuilder.java (+52/-29)
src/java.base/share/classes/sun/security/provider/certpath/ForwardState.java (+8/-26)
src/java.base/share/classes/sun/security/provider/certpath/State.java (+1/-9)
src/java.base/share/classes/sun/security/provider/certpath/SunCertPathBuilder.java (+40/-30)
src/java.base/share/classes/sun/security/ssl/KeyUpdate.java (+4/-2)
src/java.base/share/classes/sun/security/ssl/SSLContextImpl.java (+38/-56)
src/java.base/share/classes/sun/security/ssl/SSLEngineImpl.java (+4/-4)
src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java (+4/-4)
src/java.base/share/classes/sun/security/ssl/TransportContext.java (+10/-3)
src/java.base/share/classes/sun/security/ssl/Utilities.java (+8/-3)
src/java.base/share/classes/sun/security/ssl/X509TrustManagerImpl.java (+6/-0)
src/java.base/share/classes/sun/security/tools/keytool/CertAndKeyGen.java (+4/-4)
src/java.base/share/legal/zlib.md (+2/-2)
src/java.base/share/native/libjava/jni_util.c (+8/-9)
src/java.base/unix/classes/sun/nio/fs/UnixUriUtils.java (+4/-0)
src/java.base/unix/native/libnet/Inet4AddressImpl.c (+3/-3)
src/java.base/unix/native/libnet/Inet6AddressImpl.c (+1/-1)
src/java.base/windows/classes/java/io/WinNTFileSystem.java (+2/-2)
src/java.desktop/macosx/classes/sun/lwawt/macosx/CRobot.java (+5/-6)
src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java (+7/-4)
src/java.desktop/macosx/native/libawt_lwawt/awt/CRobot.m (+6/-1)
src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.m (+0/-157)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/ButtonAccessibility.m (+1/-15)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/CheckboxAccessibility.h (+11/-7)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/CheckboxAccessibility.m (+41/-0)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/CommonComponentAccessibility.h (+8/-0)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/CommonComponentAccessibility.m (+90/-2)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/CommonTextAccessibility.h (+42/-0)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/CommonTextAccessibility.m (+141/-0)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/IgnoreAccessibility.h (+35/-0)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/IgnoreAccessibility.m (+13/-8)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/ImageAccessibility.h (+35/-0)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/ImageAccessibility.m (+37/-0)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/RadiobuttonAccessibility.h (+32/-0)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/RadiobuttonAccessibility.m (+41/-0)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/ScrollAreaAccessibility.h (+41/-0)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/ScrollAreaAccessibility.m (+105/-0)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/ScrollBarAccessibility.h (+36/-0)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/ScrollBarAccessibility.m (+55/-0)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/SpinboxAccessibility.h (+39/-0)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/SpinboxAccessibility.m (+56/-0)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/StaticTextAccessibility.h (+41/-0)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/StaticTextAccessibility.m (+45/-0)
src/java.desktop/macosx/native/libosxapp/AWT_debug.h (+1/-1)
src/java.desktop/share/classes/java/awt/Robot.java (+1/-1)
src/java.desktop/share/classes/javax/swing/JPasswordField.java (+21/-15)
src/java.desktop/share/classes/javax/swing/border/EtchedBorder.java (+69/-13)
src/java.desktop/share/classes/javax/swing/border/LineBorder.java (+51/-6)
src/java.desktop/share/classes/javax/swing/plaf/basic/BasicHTML.java (+25/-3)
src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java (+6/-1)
src/java.desktop/share/classes/javax/swing/text/html/ObjectView.java (+10/-0)
src/java.desktop/share/classes/sun/awt/ComponentFactory.java (+63/-7)
src/java.desktop/share/classes/sun/swing/SwingAccessor.java (+15/-0)
src/java.desktop/share/legal/lcms.md (+96/-16)
src/java.desktop/share/legal/libpng.md (+68/-6)
src/java.desktop/share/native/libawt/awt/image/awt_parseImage.c (+21/-8)
src/java.desktop/share/native/libjavajpeg/imageioJPEG.c (+1/-0)
src/java.desktop/share/native/liblcms/UPDATING.txt (+23/-0)
src/java.desktop/unix/classes/sun/awt/X11/XRobotPeer.java (+6/-12)
src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java (+6/-5)
src/java.desktop/unix/native/common/awt/awt.h (+3/-0)
src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c (+4/-1)
src/java.desktop/windows/classes/sun/awt/windows/WRobotPeer.java (+1/-5)
src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java (+100/-36)
src/java.net.http/share/classes/jdk/internal/net/http/websocket/OpeningHandshake.java (+8/-8)
src/java.security.jgss/share/classes/sun/security/jgss/spnego/SpNegoContext.java (+4/-1)
src/java.security.jgss/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java (+6/-2)
src/java.security.jgss/share/native/libj2gss/NativeUtil.c (+7/-10)
src/java.security.jgss/windows/native/libsspi_bridge/sspi.cpp (+5/-1)
src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle.properties (+1/-2)
src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_de.properties (+1/-2)
src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_es.properties (+1/-2)
src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_fr.properties (+1/-2)
src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_it.properties (+1/-2)
src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_ja.properties (+1/-2)
src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_ko.properties (+1/-2)
src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_pt_BR.properties (+1/-2)
src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_sv.properties (+1/-2)
src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_zh_CN.properties (+1/-2)
src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_zh_TW.properties (+1/-2)
src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantPool.java (+3/-3)
src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ConstantPoolGen.java (+17/-4)
src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java (+16/-4)
src/jdk.attach/aix/classes/sun/tools/attach/VirtualMachineImpl.java (+2/-1)
src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java (+2/-1)
src/jdk.attach/macosx/classes/sun/tools/attach/VirtualMachineImpl.java (+2/-1)
src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java (+12/-1)
src/jdk.attach/solaris/classes/sun/tools/attach/VirtualMachineImpl.java (+2/-1)
src/jdk.attach/windows/classes/sun/tools/attach/VirtualMachineImpl.java (+2/-1)
src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties (+2/-2)
src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_ja.properties (+1/-1)
src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties (+1/-1)
src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/Config.java (+13/-5)
src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11AEADCipher.java (+2/-2)
src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java (+1/-1)
src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11KeyStore.java (+1/-1)
src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11PSSSignature.java (+1/-1)
src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11Signature.java (+2/-2)
src/jdk.hotspot.agent/windows/native/libsaproc/sawindbg.cpp (+3/-5)
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDoclet.java (+1/-1)
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/jquery-3.6.1.js (+121/-93)
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/jquery-3.6.1.min.js (+2/-2)
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets.properties (+1/-1)
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_ja.properties (+1/-1)
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_zh_CN.properties (+1/-1)
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DocPaths.java (+1/-1)
src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc.properties (+1/-1)
src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_ja.properties (+1/-1)
src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_zh_CN.properties (+1/-1)
src/jdk.javadoc/share/legal/jquery.md (+3/-3)
src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/resources/jdeprscan_ja.properties (+1/-1)
src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/resources/jdeprscan_zh_CN.properties (+1/-1)
src/jdk.jfr/share/classes/jdk/jfr/consumer/ChunkParser.java (+2/-2)
src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink.properties (+1/-1)
src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_ja.properties (+1/-1)
src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_zh_CN.properties (+1/-1)
src/jdk.management.agent/unix/classes/jdk/internal/agent/FileSystemImpl.java (+5/-1)
src/jdk.management.agent/windows/classes/jdk/internal/agent/FileSystemImpl.java (+8/-1)
test/hotspot/gtest/utilities/test_resourceHash.cpp (+25/-0)
test/hotspot/jtreg/ProblemList.txt (+7/-6)
test/hotspot/jtreg/TEST.groups (+16/-1)
test/hotspot/jtreg/compiler/c2/TestDeadDataLoop.java (+22/-2)
test/hotspot/jtreg/compiler/ccp/TestCastIIWrongTypeCCP.java (+63/-0)
test/hotspot/jtreg/compiler/ciReplay/TestVMNoCompLevel.java (+2/-1)
test/hotspot/jtreg/compiler/cpuflags/TestSSE4Disabled.java (+1/-1)
test/hotspot/jtreg/compiler/escapeAnalysis/TestBrokenEA.java (+82/-0)
test/hotspot/jtreg/compiler/loopopts/TestMissingSkeletonPredicateForIfNode.java (+78/-0)
test/hotspot/jtreg/compiler/loopopts/TestPartialPeelingSinkNodes.java (+73/-0)
test/hotspot/jtreg/compiler/loopopts/TestRemoveEmptyLoop.java (+35/-6)
test/hotspot/jtreg/compiler/loopstripmining/TestUseFromInnerInOuterUnusedBySfpt.java (+61/-0)
test/hotspot/jtreg/compiler/runtime/cr6891750/Test6891750.java (+2/-2)
test/hotspot/jtreg/compiler/runtime/safepoints/TestRegisterRestoring.java (+1/-1)
test/hotspot/jtreg/compiler/unsafe/TestBadBaseAddress.java (+57/-0)
test/hotspot/jtreg/compiler/unsafe/generate-unsafe-access-tests.sh (+1/-1)
test/hotspot/jtreg/compiler/whitebox/BlockingCompilation.java (+1/-3)
test/hotspot/jtreg/compiler/whitebox/MakeMethodNotCompilableTest.java (+1/-1)
test/hotspot/jtreg/containers/docker/ShareTmpDir.java (+132/-0)
test/hotspot/jtreg/containers/docker/TestMemoryAwareness.java (+1/-2)
test/hotspot/jtreg/containers/docker/TestMisc.java (+13/-0)
test/hotspot/jtreg/containers/docker/WaitForFlagFile.java (+43/-0)
test/hotspot/jtreg/gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java (+8/-3)
test/hotspot/jtreg/gc/stress/gclocker/TestExcessGCLockerCollections.java (+1/-3)
test/hotspot/jtreg/gtest/GTestWrapper.java (+1/-1)
test/hotspot/jtreg/runtime/7162488/TestUnrecognizedVmOption.java (+45/-0)
test/hotspot/jtreg/runtime/StackGap/TestStackGap.java (+53/-0)
test/hotspot/jtreg/runtime/StackGuardPages/TestStackGuardPages.java (+52/-0)
test/hotspot/jtreg/runtime/appcds/TestCommon.java (+25/-0)
test/hotspot/jtreg/runtime/appcds/customLoader/HelloCustom.java (+10/-8)
test/hotspot/jtreg/runtime/appcds/jigsaw/modulepath/ModulePathAndCP.java (+5/-0)
test/hotspot/jtreg/runtime/appcds/jvmti/ClassFileLoadHook.java (+22/-2)
test/hotspot/jtreg/runtime/appcds/jvmti/ClassFileLoadHookTest.java (+3/-5)
test/hotspot/jtreg/runtime/classFileParserBug/TestEmptyBootstrapMethodsAttr.java (+5/-3)
test/hotspot/jtreg/runtime/handshake/HandshakeTransitionTest.java (+2/-8)
test/hotspot/jtreg/runtime/jni/CalleeSavedRegisters/FPRegs.java (+5/-6)
test/hotspot/jtreg/runtime/jni/atExit/TestAtExit.java (+3/-1)
test/hotspot/jtreg/runtime/signal/SigTestDriver.java (+11/-35)
test/hotspot/jtreg/serviceability/dcmd/jvmti/AttachFailed/AttachFailedTestBase.java (+12/-6)
test/hotspot/jtreg/serviceability/jvmti/SuspendWithCurrentThread/SuspendWithCurrentThread.java (+222/-0)
test/hotspot/jtreg/serviceability/jvmti/SuspendWithCurrentThread/libSuspendWithCurrentThread.cpp (+209/-0)
test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java (+2/-2)
test/hotspot/jtreg/serviceability/sa/ClhsdbScanOops.java (+38/-18)
test/hotspot/jtreg/serviceability/tmtools/share/common/ToolRunner.java (+19/-32)
test/hotspot/jtreg/testlibrary_tests/process/Test.java (+6/-2)
test/hotspot/jtreg/testlibrary_tests/process/TestNativeProcessBuilder.java (+44/-0)
test/hotspot/jtreg/testlibrary_tests/process/exejvm-test-launcher.c (+76/-0)
test/hotspot/jtreg/vmTestbase/metaspace/flags/maxMetaspaceSize/TestMaxMetaspaceSize.java (+22/-3)
test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartEvent/thread/thread001.java (+3/-1)
test/hotspot/jtreg/vmTestbase/nsk/jvmti/NativeLibraryCopier.java (+3/-2)
test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass028/redefclass028.cpp (+2/-2)
test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass029/redefclass029.cpp (+2/-2)
test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass030/redefclass030.cpp (+2/-2)
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC04/tc04t001.java (+32/-32)
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC04/tc04t001/tc04t001.cpp (+6/-10)
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS201/hs201t003/hs201t003.cpp (+2/-2)
test/jdk/ProblemList.txt (+16/-7)
test/jdk/build/AbsPathsInImage.java (+7/-5)
test/jdk/java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java (+88/-71)
test/jdk/java/awt/Graphics2D/CopyAreaOOB.java (+1/-1)
test/jdk/java/awt/Robot/CheckCommonColors/CheckCommonColors.java (+2/-0)
test/jdk/java/awt/Robot/CreateRobotCustomGC/CreateRobotCustomGC.java (+66/-0)
test/jdk/java/awt/color/GetInstanceNullData.java (+59/-0)
test/jdk/java/awt/color/GetNameExceptionTest.java (+50/-0)
test/jdk/java/awt/color/GetNameTest.java (+65/-0)
test/jdk/java/awt/color/ICC_ColorSpace/SimpleSRGBConversionQualityTest.java (+51/-0)
test/jdk/java/awt/color/ICC_ProfileSetNullDataTest.java (+51/-0)
test/jdk/java/awt/color/MultiThreadCMMTest.java (+87/-0)
test/jdk/java/awt/color/StandardProfileTest.java (+55/-0)
test/jdk/java/awt/color/StandardProfileTest.policy (+8/-2)
test/jdk/java/awt/color/XYZTest.java (+60/-0)
test/jdk/java/awt/event/ComponentEvent/ComponentItemEventTest.java (+130/-0)
test/jdk/java/awt/event/ComponentEvent/ListItemEventsTest.java (+175/-0)
test/jdk/java/awt/event/ComponentEvent/TextComponentTextEventTest.java (+100/-80)
test/jdk/java/awt/font/TextLayout/TestOldHangul.java (+1/-2)
test/jdk/java/awt/font/TextLayout/TestSinhalaChar.java (+1/-1)
test/jdk/java/awt/font/TextLayout/TestTibetan.java (+1/-2)
test/jdk/java/awt/print/Dialog/DialogCopies.java (+56/-23)
test/jdk/java/io/File/ListRoots.java (+26/-10)
test/jdk/java/lang/ProcessBuilder/Basic.java (+7/-2)
test/jdk/java/lang/String/StringRepeat.java (+2/-1)
test/jdk/java/lang/System/LoggerFinder/internal/BootstrapLogger/BootstrapLoggerTest.java (+59/-30)
test/jdk/java/lang/Thread/UncaughtExceptionsTest.java (+206/-0)
test/jdk/java/lang/annotation/LoaderLeakTest.java (+71/-69)
test/jdk/java/lang/invoke/CompileThresholdBootstrapTest.java (+2/-2)
test/jdk/java/lang/invoke/ConstantIdentityMHTest.java (+4/-6)
test/jdk/java/lang/invoke/FilterArgumentsTest.java (+3/-3)
test/jdk/java/lang/invoke/VarHandles/generate-vh-tests.sh (+12/-4)
test/jdk/java/lang/invoke/lookup/SpecialStatic.java (+4/-4)
test/jdk/java/lang/ref/ReferenceClone.java (+5/-3)
test/jdk/java/math/BigInteger/ModPow.java (+12/-5)
test/jdk/java/net/ServerSocket/AcceptInheritHandle.java (+17/-8)
test/jdk/java/net/Socket/LingerTest.java (+11/-8)
test/jdk/java/net/Socket/ShutdownBoth.java (+3/-2)
test/jdk/java/net/Socks/SocksIPv6Test.java (+31/-9)
test/jdk/java/net/Socks/SocksServer.java (+20/-1)
test/jdk/java/net/URL/HandlerLoop.java (+15/-12)
test/jdk/java/net/URLConnection/ResendPostBody.java (+72/-63)
test/jdk/java/net/URLConnection/Responses.java (+17/-4)
test/jdk/java/net/URLPermission/URLPermissionTest.java (+10/-4)
test/jdk/java/net/httpclient/ConnectExceptionTest.java (+2/-2)
test/jdk/java/net/httpclient/ServerCloseTest.java (+18/-8)
test/jdk/java/net/httpclient/websocket/HandshakeUrlEncodingTest.java (+214/-0)
test/jdk/java/net/ipv6tests/TcpTest.java (+3/-2)
test/jdk/java/nio/Buffer/genBasic.sh (+5/-3)
test/jdk/java/nio/Buffer/genCopyDirectMemory.sh (+5/-3)
test/jdk/java/nio/Buffer/genOrder.sh (+5/-4)
test/jdk/java/nio/channels/DatagramChannel/SRTest.java (+125/-94)
test/jdk/java/nio/file/DirectoryStream/Basic.java (+9/-5)
test/jdk/java/nio/file/Files/probeContentType/Basic.java (+3/-3)
test/jdk/java/security/CodeSource/CertsMatch.java (+102/-0)
test/jdk/java/security/CodeSource/Implies.java (+12/-8)
test/jdk/java/security/CodeSource/certs (+42/-0)
test/jdk/java/security/SignedJar/spi-calendar-provider/TestSPISigned.java (+125/-0)
test/jdk/java/security/SignedJar/spi-calendar-provider/provider/baz/CalendarDataProviderImpl.java (+50/-0)
test/jdk/java/security/SignedJar/spi-calendar-provider/provider/meta/META-INF/services/java.util.spi.CalendarDataProvider (+7/-0)
test/jdk/java/util/DoubleStreamSums/CompensatedSums.java (+8/-2)
test/jdk/java/util/Formatter/genBasic.sh (+6/-4)
test/jdk/java/util/Locale/LanguageSubtagRegistryTest.java (+30/-8)
test/jdk/java/util/TimeZone/CustomTzIDCheckDST.java (+21/-5)
test/jdk/java/util/concurrent/BlockingQueue/DrainToFails.java (+8/-6)
test/jdk/java/util/concurrent/CountDownLatch/Basic.java (+90/-105)
test/jdk/java/util/concurrent/Phaser/Basic.java (+1/-1)
test/jdk/java/util/concurrent/atomic/Serial.java (+4/-4)
test/jdk/java/util/logging/CheckZombieLockTest.java (+10/-13)
test/jdk/java/util/logging/LogManager/Configuration/updateConfiguration/HandlersOnComplexResetUpdate.java (+30/-18)
test/jdk/java/util/logging/LogManager/Configuration/updateConfiguration/HandlersOnComplexUpdate.java (+30/-18)
test/jdk/java/util/prefs/ExportNode.java (+39/-18)
test/jdk/java/util/zip/ZipFile/DeleteTempJar.java (+11/-8)
test/jdk/javax/net/ssl/SSLEngine/NoAuthClientAuth.java (+7/-2)
test/jdk/javax/net/ssl/ServerName/EndingDotHostname.java (+251/-0)
test/jdk/javax/net/ssl/ServerName/SSLEngineExplorer.java (+5/-2)
test/jdk/javax/net/ssl/ServerName/SSLSocketExplorer.java (+5/-2)
test/jdk/javax/net/ssl/sanity/interop/JSSEServer.java (+5/-1)
test/jdk/javax/net/ssl/templates/SSLExampleCert.java (+411/-0)
test/jdk/javax/sound/midi/Synthesizer/Receiver/bug6186488.java (+160/-29)
test/jdk/javax/swing/JPasswordField/OldPasswordInDocumentFilter.java (+69/-0)
test/jdk/javax/swing/Popup/TaskbarPositionTest.java (+127/-93)
test/jdk/javax/swing/border/EtchedBorder/ScaledEtchedBorderTest.java (+236/-0)
test/jdk/javax/swing/border/LineBorder/ScaledLineBorderTest.java (+299/-0)
test/jdk/javax/swing/border/LineBorder/ScaledTextFieldBorderTest.java (+313/-0)
test/jdk/javax/xml/crypto/dsig/LogParameters.java (+15/-5)
test/jdk/javax/xml/jaxp/common/8035437/AbstractMethodErrorTest.java (+22/-7)
test/jdk/jdk/jfr/tool/TestPrintXML.java (+12/-1)
test/jdk/jdk/lambda/TEST.properties (+1/-1)
test/jdk/security/infra/java/security/cert/CertPathValidator/certification/CertignaCA.java (+227/-0)
test/jdk/sun/awt/shell/FileSystemViewMemoryLeak.java (+15/-2)
test/jdk/sun/net/ftp/FtpURL.java (+38/-15)
test/jdk/sun/net/www/http/HttpClient/MultiThreadTest.java (+44/-12)
test/jdk/sun/net/www/http/HttpURLConnection/PostOnDelete.java (+10/-3)
test/jdk/sun/net/www/protocol/file/DirPermissionDenied.java (+7/-3)
test/jdk/sun/net/www/protocol/http/ProtocolRedirect.java (+42/-23)
test/jdk/sun/net/www/protocol/http/StackTraceTest.java (+14/-6)
test/jdk/sun/security/lib/cacerts/VerifyCACerts.java (+6/-4)
test/jdk/sun/security/pkcs11/PKCS11Test.java (+7/-5)
test/jdk/sun/security/pkcs11/Signature/TestDSAKeyLength.java (+2/-2)
test/jdk/sun/security/pkcs11/sslecc/JSSEServer.java (+5/-1)
test/jdk/sun/security/ssl/ProtocolVersion/HttpsProtocols.java (+5/-2)
test/jdk/sun/security/ssl/SSLContextImpl/CustomizedDefaultProtocols.java (+36/-32)
test/jdk/sun/security/ssl/SSLContextImpl/CustomizedServerDefaultProtocols.java (+43/-37)
test/jdk/sun/security/ssl/SSLContextImpl/DefaultEnabledProtocols.java (+38/-34)
test/jdk/sun/security/ssl/SSLContextImpl/NoOldVersionContext.java (+37/-33)
test/jdk/sun/security/ssl/SSLSocketImpl/InvalidateServerSessionRenegotiate.java (+8/-2)
test/jdk/sun/security/ssl/SSLSocketImpl/NoImpactServerRenego.java (+8/-2)
test/jdk/sun/util/resources/cldr/TimeZoneNamesTest.java (+3/-2)
test/jdk/tools/pack200/DeprecatePack200.java (+13/-13)
test/langtools/jdk/javadoc/doclet/DocRootSlash/DocRootSlash.java (+4/-8)
test/langtools/jdk/javadoc/doclet/DocRootSlash/overview.html (+15/-37)
test/langtools/jdk/javadoc/doclet/DocRootSlash/p1/C1.java (+8/-30)
test/langtools/jdk/javadoc/doclet/DocRootSlash/p1/package.html (+14/-36)
test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java (+19/-0)
test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java (+2/-2)
test/langtools/jdk/javadoc/doclet/testSummaryTag/p2/package.html (+1/-1)
test/langtools/jdk/javadoc/tool/6964914/TestStdDoclet.java (+3/-1)
test/langtools/jdk/javadoc/tool/6964914/TestUserDoclet.java (+3/-1)
test/langtools/jdk/javadoc/tool/EnsureNewOldDoclet.java (+7/-4)
test/langtools/jdk/javadoc/tool/api/basic/APITest.java (+1/-1)
test/langtools/tools/javac/T8132562/ClassPathWithDoubleQuotesTest.java (+3/-3)
test/langtools/tools/javac/TryWithResources/WeirdTwr.java (+1/-1)
test/langtools/tools/javac/TryWithResources/WeirdTwr.out (+0/-4)
test/langtools/tools/javac/depDocComment/SuppressDeprecation.java (+1/-1)
test/langtools/tools/javac/depDocComment/SuppressDeprecation8.out (+1/-2)
test/langtools/tools/javac/diags/examples/DiamondAndAnonClass.java (+1/-2)
test/langtools/tools/javac/diags/examples/DirPathElementNotFound.java (+1/-2)
test/langtools/tools/javac/diags/examples/ModulesNotSupportedInSource/module-info.java (+1/-2)
test/langtools/tools/javac/diags/examples/PrivateInterfaceMethodsNotSupported.java (+1/-2)
test/langtools/tools/javac/diags/examples/VarInTryWithResourcesNotSupportedInSource.java (+1/-2)
test/langtools/tools/javac/doctree/dcapi/overview0.html (+1/-1)
test/langtools/tools/javac/doctree/dcapi/overview1.html (+1/-1)
test/langtools/tools/javac/doctree/dcapi/overview2.html (+1/-1)
test/langtools/tools/javac/doctree/dcapi/overview3.html (+1/-1)
test/langtools/tools/javac/doctree/dcapi/overview5.html (+1/-1)
test/langtools/tools/javac/doctree/dcapi/package.html (+1/-1)
test/langtools/tools/javac/doctree/dcapi/pkg/package.html (+1/-1)
test/langtools/tools/javac/generics/diamond/neg/Neg09a.java (+1/-1)
test/langtools/tools/javac/generics/diamond/neg/Neg09a.out (+0/-2)
test/langtools/tools/javac/generics/diamond/neg/Neg09b.java (+1/-1)
test/langtools/tools/javac/generics/diamond/neg/Neg09b.out (+0/-2)
test/langtools/tools/javac/generics/diamond/neg/Neg09c.java (+1/-1)
test/langtools/tools/javac/generics/diamond/neg/Neg09c.out (+0/-2)
test/langtools/tools/javac/generics/diamond/neg/Neg09d.java (+1/-1)
test/langtools/tools/javac/generics/diamond/neg/Neg09d.out (+0/-2)
test/langtools/tools/javac/options/smokeTests/OptionSmokeTest.java (+2/-1)
test/langtools/tools/javac/parser/StringFoldingPosTest.java (+121/-0)
test/langtools/tools/javac/platform/PlatformProviderTest.java (+4/-2)
test/langtools/tools/javac/processing/model/element/TestElementKindPredicates.java (+74/-0)
test/langtools/tools/javadoc/6964914/TestStdDoclet.java (+3/-1)
test/langtools/tools/javadoc/6964914/TestUserDoclet.java (+3/-1)
test/langtools/tools/javadoc/api/basic/APITest.java (+1/-1)
test/langtools/tools/jdeps/MultiReleaseJar.java (+8/-8)
test/lib/jdk/test/lib/Platform.java (+30/-1)
test/lib/jdk/test/lib/Utils.java (+6/-1)
test/lib/jdk/test/lib/process/ProcessTools.java (+118/-70)
test/make/TestMakeBase.gmk (+22/-0)
test/make/UtilsForTests.gmk (+1/-1)
Reviewer Review Type Date Requested Status
Graham Inggs (community) Approve
Matthias Klose Pending
git-ubuntu import Pending
Review via email: mp+442078@code.launchpad.net

Description of the change

Please do not merge, this merge proposal is a part in the series [1][2][3]:

Summary of changes:
 - import new upstream release
 - refresh patches

PPA: ppa:vpa1977/openjdk-11-april[4]

Testing:
 - package builds successfully

[1] https://code.launchpad.net/~vpa1977/ubuntu/+source/openjdk-lts/+git/openjdk-lts/+merge/442078
[2] https://code.launchpad.net/~vpa1977/ubuntu/+source/openjdk-lts/+git/openjdk-lts/+merge/442081
[3] https://code.launchpad.net/~vpa1977/ubuntu/+source/openjdk-lts/+git/openjdk-lts/+merge/442082
[4] https://launchpad.net/~vpa1977/+archive/ubuntu/openjdk-11-april

To post a comment you must log in.
Revision history for this message
Graham Inggs (ginggs) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 9ab7e64..60120cf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
1openjdk-lts (11.0.19+7~us1-0ubuntu1) UNRELEASED; urgency=medium
2
3 * OpenJDK 11.0.19 release, build 7.
4 - CVE-2023-21930, CVE-2023-21967, CVE-2023-21954, CVE-2023-21939,
5 CVE-2023-21938, CVE-2023-21968, CVE-2023-21937.
6 - Release notes:
7 TODO: waiting for announcement
8 - d/p/*: refresh patches.
9
10 -- Vladimir Petko <vladimir.petko@canonical.com> Thu, 20 Apr 2023 14:25:28 +1200
11
1openjdk-lts (11.0.18+10-0ubuntu5) lunar; urgency=medium12openjdk-lts (11.0.18+10-0ubuntu5) lunar; urgency=medium
213
3 * d/control: add jtreg6 dependencies, regenerate control.14 * d/control: add jtreg6 dependencies, regenerate control.
diff --git a/debian/patches/8199220.diff b/debian/patches/8199220.diff
index b92cdee..bc7be6b 100644
--- a/debian/patches/8199220.diff
+++ b/debian/patches/8199220.diff
@@ -9,7 +9,7 @@ Reviewed-by: dholmes, stuefe, eosterlund, glaubitz, coleenp
99
10--- a/src/hotspot/share/utilities/debug.hpp10--- a/src/hotspot/share/utilities/debug.hpp
11+++ b/src/hotspot/share/utilities/debug.hpp11+++ b/src/hotspot/share/utilities/debug.hpp
12@@ -202,6 +202,7 @@ void warning(const char* format, ...) AT12@@ -202,6 +202,7 @@
13 // use of an array type.13 // use of an array type.
14 14
15 template<bool x> struct STATIC_ASSERT_FAILURE;15 template<bool x> struct STATIC_ASSERT_FAILURE;
diff --git a/debian/patches/Don-t-optimize-fdlibm-fork-for-Zero-on-linux-sparc-Z.patch b/debian/patches/Don-t-optimize-fdlibm-fork-for-Zero-on-linux-sparc-Z.patch
index d80f413..6f1d7ee 100644
--- a/debian/patches/Don-t-optimize-fdlibm-fork-for-Zero-on-linux-sparc-Z.patch
+++ b/debian/patches/Don-t-optimize-fdlibm-fork-for-Zero-on-linux-sparc-Z.patch
@@ -9,7 +9,7 @@ Subject: [PATCH] Don't optimize fdlibm-fork for Zero on linux-sparc (Zero)
99
10--- a/make/hotspot/lib/JvmOverrideFiles.gmk10--- a/make/hotspot/lib/JvmOverrideFiles.gmk
11+++ b/make/hotspot/lib/JvmOverrideFiles.gmk11+++ b/make/hotspot/lib/JvmOverrideFiles.gmk
12@@ -48,6 +48,15 @@ LIBJVM_FDLIBM_COPY_OPT_FLAG := $(CXX_O_F12@@ -48,6 +48,15 @@
13 # by using -ffp-contract=off on GCC/Clang platforms.13 # by using -ffp-contract=off on GCC/Clang platforms.
14 ifneq ($(FDLIBM_CFLAGS), )14 ifneq ($(FDLIBM_CFLAGS), )
15 LIBJVM_FDLIBM_COPY_OPT_FLAG := $(CXX_O_FLAG_NORM)15 LIBJVM_FDLIBM_COPY_OPT_FLAG := $(CXX_O_FLAG_NORM)
@@ -24,4 +24,4 @@ Subject: [PATCH] Don't optimize fdlibm-fork for Zero on linux-sparc (Zero)
24+ endif24+ endif
25 endif25 endif
26 26
27 ifeq ($(OPENJDK_TARGET_OS), linux)27 ifeq ($(call isTargetOs, linux), true)
diff --git a/debian/patches/atk-wrapper-security.diff b/debian/patches/atk-wrapper-security.diff
index b12072d..a4e5333 100644
--- a/debian/patches/atk-wrapper-security.diff
+++ b/debian/patches/atk-wrapper-security.diff
@@ -1,8 +1,6 @@
1Index: b/src/java.base/share/conf/security/java.security
2===================================================================
3--- a/src/java.base/share/conf/security/java.security1--- a/src/java.base/share/conf/security/java.security
4+++ b/src/java.base/share/conf/security/java.security2+++ b/src/java.base/share/conf/security/java.security
5@@ -316,6 +316,7 @@ keystore.type.compat=true3@@ -316,6 +316,7 @@
6 #4 #
7 package.access=sun.misc.,\5 package.access=sun.misc.,\
8 sun.reflect.,\6 sun.reflect.,\
diff --git a/debian/patches/default-jvm-cfg.diff b/debian/patches/default-jvm-cfg.diff
index dd2df79..342ce80 100644
--- a/debian/patches/default-jvm-cfg.diff
+++ b/debian/patches/default-jvm-cfg.diff
@@ -1,6 +1,6 @@
1--- a/src/java.base/share/native/libjli/java.c1--- a/src/java.base/share/native/libjli/java.c
2+++ b/src/java.base/share/native/libjli/java.c2+++ b/src/java.base/share/native/libjli/java.c
3@@ -2067,7 +2067,7 @@ jint3@@ -2067,7 +2067,7 @@
4 ReadKnownVMs(const char *jvmCfgName, jboolean speculative)4 ReadKnownVMs(const char *jvmCfgName, jboolean speculative)
5 {5 {
6 FILE *jvmCfg;6 FILE *jvmCfg;
@@ -9,7 +9,7 @@
9 int cnt = 0;9 int cnt = 0;
10 int lineno = 0;10 int lineno = 0;
11 jlong start = 0, end = 0;11 jlong start = 0, end = 0;
12@@ -2082,6 +2082,11 @@ ReadKnownVMs(const char *jvmCfgName, jbo12@@ -2082,6 +2082,11 @@
13 13
14 jvmCfg = fopen(jvmCfgName, "r");14 jvmCfg = fopen(jvmCfgName, "r");
15 if (jvmCfg == NULL) {15 if (jvmCfg == NULL) {
diff --git a/debian/patches/disable-doclint-by-default.diff b/debian/patches/disable-doclint-by-default.diff
index 9813ca8..6f4a737 100644
--- a/debian/patches/disable-doclint-by-default.diff
+++ b/debian/patches/disable-doclint-by-default.diff
@@ -1,8 +1,6 @@
1Index: b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/WorkArounds.java
2===================================================================
3--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/WorkArounds.java1--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/WorkArounds.java
4+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/WorkArounds.java2+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/WorkArounds.java
5@@ -126,7 +126,7 @@ public class WorkArounds {3@@ -126,7 +126,7 @@
6 }4 }
7 5
8 if (!msgOptionSeen) {6 if (!msgOptionSeen) {
diff --git a/debian/patches/dnd-files.diff b/debian/patches/dnd-files.diff
index bbc7b9e..0e6b09b 100644
--- a/debian/patches/dnd-files.diff
+++ b/debian/patches/dnd-files.diff
@@ -1,8 +1,6 @@
1Index: b/src/java.desktop/unix/classes/sun/awt/X11/XDataTransferer.java
2===================================================================
3--- a/src/java.desktop/unix/classes/sun/awt/X11/XDataTransferer.java1--- a/src/java.desktop/unix/classes/sun/awt/X11/XDataTransferer.java
4+++ b/src/java.desktop/unix/classes/sun/awt/X11/XDataTransferer.java2+++ b/src/java.desktop/unix/classes/sun/awt/X11/XDataTransferer.java
5@@ -273,14 +273,14 @@ public class XDataTransferer extends Dat3@@ -273,14 +273,14 @@
6 BufferedReader reader = new BufferedReader(isr)) {4 BufferedReader reader = new BufferedReader(isr)) {
7 String line;5 String line;
8 ArrayList<URI> uriList = new ArrayList<>();6 ArrayList<URI> uriList = new ArrayList<>();
diff --git a/debian/patches/hotspot-libpath.diff b/debian/patches/hotspot-libpath.diff
index caf7616..62690e7 100644
--- a/debian/patches/hotspot-libpath.diff
+++ b/debian/patches/hotspot-libpath.diff
@@ -28,15 +28,15 @@
28 #define SYS_EXT_DIR "/usr/java/packages"28 #define SYS_EXT_DIR "/usr/java/packages"
29--- a/make/hotspot/lib/CompileJvm.gmk29--- a/make/hotspot/lib/CompileJvm.gmk
30+++ b/make/hotspot/lib/CompileJvm.gmk30+++ b/make/hotspot/lib/CompileJvm.gmk
31@@ -131,6 +131,11 @@31@@ -84,6 +84,11 @@
32 endif32 ################################################################################
33 endif33 # Platform specific setup
34 34
35+DEB_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null || true)35+DEB_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null || true)
36+ifneq (,$(DEB_MULTIARCH))36+ifneq (,$(DEB_MULTIARCH))
37+JVM_CFLAGS += -DDEB_MULTIARCH="\"$(DEB_MULTIARCH)\""37+ JVM_CFLAGS += -DDEB_MULTIARCH="\"$(DEB_MULTIARCH)\""
38+endif38+endif
39+39+
40 ifeq ($(OPENJDK_TARGET_OS), windows)40 # ARM source selection
41 ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)41
42 RC_DESC := 64-Bit$(SPACE)42 ifeq ($(call And, $(call isTargetOs, linux) $(call isTargetCpu, arm)), true)
diff --git a/debian/patches/icc_loading_with_symlink.diff b/debian/patches/icc_loading_with_symlink.diff
index 8cb7140..664e0ab 100644
--- a/debian/patches/icc_loading_with_symlink.diff
+++ b/debian/patches/icc_loading_with_symlink.diff
@@ -1,6 +1,6 @@
1--- a/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java1--- a/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java
2+++ b/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java2+++ b/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java
3@@ -1753,9 +1753,6 @@ public class ICC_Profile implements Seri3@@ -1753,9 +1753,6 @@
4 dir = st.nextToken();4 dir = st.nextToken();
5 fullPath = dir + File.separatorChar + fileName;5 fullPath = dir + File.separatorChar + fileName;
6 f = new File(fullPath);6 f = new File(fullPath);
@@ -10,7 +10,7 @@
10 }10 }
11 }11 }
12 12
13@@ -1795,26 +1792,6 @@ public class ICC_Profile implements Seri13@@ -1795,26 +1792,6 @@
14 }14 }
15 15
16 /**16 /**
diff --git a/debian/patches/icedtea-override-redirect-compiz.diff b/debian/patches/icedtea-override-redirect-compiz.diff
index 64f31a6..fe5da60 100644
--- a/debian/patches/icedtea-override-redirect-compiz.diff
+++ b/debian/patches/icedtea-override-redirect-compiz.diff
@@ -1,8 +1,6 @@
1Index: b/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java
2===================================================================
3--- a/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java1--- a/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java
4+++ b/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java2+++ b/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java
5@@ -1260,6 +1260,7 @@ class XWindowPeer extends XPanelPeer imp3@@ -1260,6 +1260,7 @@
6 4
7 boolean isOverrideRedirect() {5 boolean isOverrideRedirect() {
8 return XWM.getWMID() == XWM.OPENLOOK_WM ||6 return XWM.getWMID() == XWM.OPENLOOK_WM ||
diff --git a/debian/patches/jdk-getAccessibleValue.diff b/debian/patches/jdk-getAccessibleValue.diff
index 80b6907..e1daf8f 100644
--- a/debian/patches/jdk-getAccessibleValue.diff
+++ b/debian/patches/jdk-getAccessibleValue.diff
@@ -1,6 +1,6 @@
1--- a/src/java.desktop/share/classes/javax/swing/JTree.java1--- a/src/java.desktop/share/classes/javax/swing/JTree.java
2+++ b/src/java.desktop/share/classes/javax/swing/JTree.java2+++ b/src/java.desktop/share/classes/javax/swing/JTree.java
3@@ -5063,7 +5063,7 @@ public class JTree extends JComponent im3@@ -5063,7 +5063,7 @@
4 public AccessibleSelection getAccessibleSelection() {4 public AccessibleSelection getAccessibleSelection() {
5 AccessibleContext ac = getCurrentAccessibleContext();5 AccessibleContext ac = getCurrentAccessibleContext();
6 if (ac != null && isLeaf) {6 if (ac != null && isLeaf) {
@@ -9,7 +9,7 @@
9 } else {9 } else {
10 return this;10 return this;
11 }11 }
12@@ -5078,7 +5078,7 @@ public class JTree extends JComponent im12@@ -5078,7 +5078,7 @@
13 public AccessibleText getAccessibleText() {13 public AccessibleText getAccessibleText() {
14 AccessibleContext ac = getCurrentAccessibleContext();14 AccessibleContext ac = getCurrentAccessibleContext();
15 if (ac != null) {15 if (ac != null) {
@@ -18,7 +18,7 @@
18 } else {18 } else {
19 return null;19 return null;
20 }20 }
21@@ -5093,7 +5093,7 @@ public class JTree extends JComponent im21@@ -5093,7 +5093,7 @@
22 public AccessibleValue getAccessibleValue() {22 public AccessibleValue getAccessibleValue() {
23 AccessibleContext ac = getCurrentAccessibleContext();23 AccessibleContext ac = getCurrentAccessibleContext();
24 if (ac != null) {24 if (ac != null) {
@@ -29,7 +29,7 @@
29 }29 }
30--- a/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java30--- a/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java
31+++ b/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java31+++ b/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java
32@@ -1114,7 +1114,12 @@ public class JTableHeader extends JCompo32@@ -1114,7 +1114,12 @@
33 }33 }
34 34
35 public AccessibleAction getAccessibleAction() {35 public AccessibleAction getAccessibleAction() {
@@ -43,7 +43,7 @@
43 }43 }
44 44
45 /**45 /**
46@@ -1130,15 +1135,30 @@ public class JTableHeader extends JCompo46@@ -1130,15 +1135,30 @@
47 }47 }
48 48
49 public AccessibleSelection getAccessibleSelection() {49 public AccessibleSelection getAccessibleSelection() {
@@ -79,7 +79,7 @@
79 79
80--- a/src/java.desktop/share/classes/javax/swing/JTable.java80--- a/src/java.desktop/share/classes/javax/swing/JTable.java
81+++ b/src/java.desktop/share/classes/javax/swing/JTable.java81+++ b/src/java.desktop/share/classes/javax/swing/JTable.java
82@@ -9165,7 +9165,12 @@ public class JTable extends JComponent i82@@ -9165,7 +9165,12 @@
83 * @return the <code>AccessibleAction</code>, or <code>null</code>83 * @return the <code>AccessibleAction</code>, or <code>null</code>
84 */84 */
85 public AccessibleAction getAccessibleAction() {85 public AccessibleAction getAccessibleAction() {
@@ -93,7 +93,7 @@
93 }93 }
94 94
95 /**95 /**
96@@ -9187,7 +9192,12 @@ public class JTable extends JComponent i96@@ -9187,7 +9192,12 @@
97 * <code>null</code>97 * <code>null</code>
98 */98 */
99 public AccessibleSelection getAccessibleSelection() {99 public AccessibleSelection getAccessibleSelection() {
@@ -107,7 +107,7 @@
107 }107 }
108 108
109 /**109 /**
110@@ -9197,7 +9207,12 @@ public class JTable extends JComponent i110@@ -9197,7 +9207,12 @@
111 * @return the <code>AccessibleText</code>, or <code>null</code>111 * @return the <code>AccessibleText</code>, or <code>null</code>
112 */112 */
113 public AccessibleText getAccessibleText() {113 public AccessibleText getAccessibleText() {
@@ -121,7 +121,7 @@
121 }121 }
122 122
123 /**123 /**
124@@ -9207,7 +9222,12 @@ public class JTable extends JComponent i124@@ -9207,7 +9222,12 @@
125 * @return the <code>AccessibleValue</code>, or <code>null</code>125 * @return the <code>AccessibleValue</code>, or <code>null</code>
126 */126 */
127 public AccessibleValue getAccessibleValue() {127 public AccessibleValue getAccessibleValue() {
@@ -137,7 +137,7 @@
137 137
138--- a/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java138--- a/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java
139+++ b/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java139+++ b/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java
140@@ -6549,7 +6549,7 @@ final public class AccessBridge {140@@ -6549,7 +6549,7 @@
141 public AccessibleSelection getAccessibleSelection() {141 public AccessibleSelection getAccessibleSelection() {
142 AccessibleContext ac = getCurrentAccessibleContext();142 AccessibleContext ac = getCurrentAccessibleContext();
143 if (ac != null && isLeaf) {143 if (ac != null && isLeaf) {
@@ -146,7 +146,7 @@
146 } else {146 } else {
147 return this;147 return this;
148 }148 }
149@@ -6564,7 +6564,7 @@ final public class AccessBridge {149@@ -6564,7 +6564,7 @@
150 public AccessibleText getAccessibleText() {150 public AccessibleText getAccessibleText() {
151 AccessibleContext ac = getCurrentAccessibleContext();151 AccessibleContext ac = getCurrentAccessibleContext();
152 if (ac != null) {152 if (ac != null) {
@@ -155,7 +155,7 @@
155 } else {155 } else {
156 return null;156 return null;
157 }157 }
158@@ -6579,7 +6579,7 @@ final public class AccessBridge {158@@ -6579,7 +6579,7 @@
159 public AccessibleValue getAccessibleValue() {159 public AccessibleValue getAccessibleValue() {
160 AccessibleContext ac = getCurrentAccessibleContext();160 AccessibleContext ac = getCurrentAccessibleContext();
161 if (ac != null) {161 if (ac != null) {
diff --git a/debian/patches/jdk-i18n-pt_BR.diff b/debian/patches/jdk-i18n-pt_BR.diff
index 7c561f2..fde9fd8 100644
--- a/debian/patches/jdk-i18n-pt_BR.diff
+++ b/debian/patches/jdk-i18n-pt_BR.diff
@@ -1,8 +1,6 @@
1Index: b/src/java.desktop/share/classes/sun/awt/resources/awt_pt_BR.properties
2===================================================================
3--- a/src/java.desktop/share/classes/sun/awt/resources/awt_pt_BR.properties1--- a/src/java.desktop/share/classes/sun/awt/resources/awt_pt_BR.properties
4+++ b/src/java.desktop/share/classes/sun/awt/resources/awt_pt_BR.properties2+++ b/src/java.desktop/share/classes/sun/awt/resources/awt_pt_BR.properties
5@@ -13,7 +13,7 @@ AWT.altGraph=Alt Graph3@@ -13,7 +13,7 @@
6 # Key names4 # Key names
7 AWT.enter=Enter5 AWT.enter=Enter
8 AWT.backSpace=Backspace6 AWT.backSpace=Backspace
diff --git a/debian/patches/jexec.diff b/debian/patches/jexec.diff
index 8f56d30..c160b90 100644
--- a/debian/patches/jexec.diff
+++ b/debian/patches/jexec.diff
@@ -1,6 +1,6 @@
1--- a/src/java.base/unix/native/launcher/jexec.c1--- a/src/java.base/unix/native/launcher/jexec.c
2+++ b/src/java.base/unix/native/launcher/jexec.c2+++ b/src/java.base/unix/native/launcher/jexec.c
3@@ -168,9 +168,10 @@ int main(int argc, const char * argv[])3@@ -168,9 +168,10 @@
4 4
5 /* Get the path to the java binary, which is in a known position relative5 /* Get the path to the java binary, which is in a known position relative
6 * to our current position, which is in argv[0]. */6 * to our current position, which is in argv[0]. */
@@ -14,17 +14,17 @@
14 errorExit(errno, BAD_ARG_MSG);14 errorExit(errno, BAD_ARG_MSG);
15--- a/make/launcher/Launcher-java.base.gmk15--- a/make/launcher/Launcher-java.base.gmk
16+++ b/make/launcher/Launcher-java.base.gmk16+++ b/make/launcher/Launcher-java.base.gmk
17@@ -57,6 +57,9 @@ $(eval $(call SetupBuildLauncher, keytoo17@@ -57,6 +57,9 @@
18 ################################################################################18 ################################################################################
19 19
20 ifeq ($(OPENJDK_TARGET_OS), linux)20 ifeq ($(call isTargetOs, linux), true)
21+ ifeq (,$(DEBIAN_JDK_BASE_DIR))21+ ifeq (,$(DEBIAN_JDK_BASE_DIR))
22+ $(error DEBIAN_JDK_BASE_DIR must be defined for jexec build)22+ $(error DEBIAN_JDK_BASE_DIR must be defined for jexec build)
23+ endif23+ endif
24 $(eval $(call SetupJdkExecutable, BUILD_JEXEC, \24 $(eval $(call SetupJdkExecutable, BUILD_JEXEC, \
25 NAME := jexec, \25 NAME := jexec, \
26 SRC := $(TOPDIR)/src/$(MODULE)/unix/native/launcher, \26 SRC := $(TOPDIR)/src/$(MODULE)/unix/native/launcher, \
27@@ -64,7 +67,7 @@ ifeq ($(OPENJDK_TARGET_OS), linux)27@@ -64,7 +67,7 @@
28 OPTIMIZATION := LOW, \28 OPTIMIZATION := LOW, \
29 CFLAGS := $(CFLAGS_JDKEXE) \29 CFLAGS := $(CFLAGS_JDKEXE) \
30 -I$(TOPDIR)/src/$(MODULE)/share/native/libjli, \30 -I$(TOPDIR)/src/$(MODULE)/share/native/libjli, \
diff --git a/debian/patches/keep-gtk2-as-default.patch b/debian/patches/keep-gtk2-as-default.patch
index 6ed0131..7db75dc 100644
--- a/debian/patches/keep-gtk2-as-default.patch
+++ b/debian/patches/keep-gtk2-as-default.patch
@@ -25,9 +25,8 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
258198649: Switch AWT/Swing's default GTK version to 3258198649: Switch AWT/Swing's default GTK version to 3
26Reviewed-by: psadhukhan, kaddepalli26Reviewed-by: psadhukhan, kaddepalli
2727
28diff -r 79f6a4dc221e -r 3e3696a308e1 src/java.desktop/unix/native/libawt_xawt/awt/gtk_interface.c28--- a/src/java.desktop/unix/native/libawt_xawt/awt/gtk_interface.c
29--- a/src/java.desktop/unix/native/libawt_xawt/awt/gtk_interface.c Mon Mar 19 10:46:31 2018 -070029+++ b/src/java.desktop/unix/native/libawt_xawt/awt/gtk_interface.c
30+++ b/src/java.desktop/unix/native/libawt_xawt/awt/gtk_interface.c Mon Mar 19 11:29:50 2018 -0700
31@@ -45,18 +45,18 @@30@@ -45,18 +45,18 @@
32 31
33 static GtkLib gtk_libs[] = {32 static GtkLib gtk_libs[] = {
@@ -54,4 +53,3 @@ diff -r 79f6a4dc221e -r 3e3696a308e1 src/java.desktop/unix/native/libawt_xawt/aw
54 }53 }
55 };54 };
56 55
57
diff --git a/debian/patches/ldap-timeout-test-use-ip.patch b/debian/patches/ldap-timeout-test-use-ip.patch
index 3e40bd7..fd61a86 100644
--- a/debian/patches/ldap-timeout-test-use-ip.patch
+++ b/debian/patches/ldap-timeout-test-use-ip.patch
@@ -14,6 +14,6 @@ Last-Update: 2023-03-27
14+ // there should not be a LDAP provider on multicast address, but14+ // there should not be a LDAP provider on multicast address, but
15+ // network stack should be able to send to it15+ // network stack should be able to send to it
16+ env.put(Context.PROVIDER_URL, "ldap://224.0.0.0:1234");16+ env.put(Context.PROVIDER_URL, "ldap://224.0.0.0:1234");
1717
18 try {18 try {
19 futures.add(executorService.submit(() -> { attemptConnect(env); return null; }));19 futures.add(executorService.submit(() -> { attemptConnect(env); return null; }));
diff --git a/debian/patches/libpcsclite-dlopen.diff b/debian/patches/libpcsclite-dlopen.diff
index 39261af..06781b2 100644
--- a/debian/patches/libpcsclite-dlopen.diff
+++ b/debian/patches/libpcsclite-dlopen.diff
@@ -1,8 +1,6 @@
1Index: b/src/java.smartcardio/unix/classes/sun/security/smartcardio/PlatformPCSC.java
2===================================================================
3--- a/src/java.smartcardio/unix/classes/sun/security/smartcardio/PlatformPCSC.java1--- a/src/java.smartcardio/unix/classes/sun/security/smartcardio/PlatformPCSC.java
4+++ b/src/java.smartcardio/unix/classes/sun/security/smartcardio/PlatformPCSC.java2+++ b/src/java.smartcardio/unix/classes/sun/security/smartcardio/PlatformPCSC.java
5@@ -48,6 +48,7 @@ class PlatformPCSC {3@@ -48,6 +48,7 @@
6 4
7 private final static String PROP_NAME = "sun.security.smartcardio.library";5 private final static String PROP_NAME = "sun.security.smartcardio.library";
8 6
@@ -10,7 +8,7 @@ Index: b/src/java.smartcardio/unix/classes/sun/security/smartcardio/PlatformPCSC
10 private final static String LIB1 = "/usr/$LIBISA/libpcsclite.so";8 private final static String LIB1 = "/usr/$LIBISA/libpcsclite.so";
11 private final static String LIB2 = "/usr/local/$LIBISA/libpcsclite.so";9 private final static String LIB2 = "/usr/local/$LIBISA/libpcsclite.so";
12 private final static String PCSC_FRAMEWORK = "/System/Library/Frameworks/PCSC.framework/Versions/Current/PCSC";10 private final static String PCSC_FRAMEWORK = "/System/Library/Frameworks/PCSC.framework/Versions/Current/PCSC";
13@@ -104,22 +105,9 @@ class PlatformPCSC {11@@ -104,22 +105,9 @@
14 if (lib.length() != 0) {12 if (lib.length() != 0) {
15 return lib;13 return lib;
16 }14 }
diff --git a/debian/patches/log-generated-classes-test.patch b/debian/patches/log-generated-classes-test.patch
index 849de17..6914651 100644
--- a/debian/patches/log-generated-classes-test.patch
+++ b/debian/patches/log-generated-classes-test.patch
@@ -7,7 +7,7 @@ Forwarded: not-needed
7Last-Update: 2023-03-277Last-Update: 2023-03-27
8--- a/test/jdk/java/lang/invoke/lambda/LogGeneratedClassesTest.java8--- a/test/jdk/java/lang/invoke/lambda/LogGeneratedClassesTest.java
9+++ b/test/jdk/java/lang/invoke/lambda/LogGeneratedClassesTest.java9+++ b/test/jdk/java/lang/invoke/lambda/LogGeneratedClassesTest.java
10@@ -195,14 +195,21 @@10@@ -191,14 +191,21 @@
11 11
12 @Test12 @Test
13 public void testDumpDirNotWritable() throws IOException {13 public void testDumpDirNotWritable() throws IOException {
diff --git a/debian/patches/multiple-pkcs11-library-init.diff b/debian/patches/multiple-pkcs11-library-init.diff
index aec9f96..bd2322b 100644
--- a/debian/patches/multiple-pkcs11-library-init.diff
+++ b/debian/patches/multiple-pkcs11-library-init.diff
@@ -15,7 +15,7 @@ Allow multiple PKCS11 library initialisation to be a non-critical error.
15 15
16 // same as allowSingleThreadedModules but controlled via a system property16 // same as allowSingleThreadedModules but controlled via a system property
17 // and applied to all providers. if set to false, no SunPKCS11 instances17 // and applied to all providers. if set to false, no SunPKCS11 instances
18@@ -1026,6 +1027,8 @@18@@ -1030,6 +1031,8 @@
19 handleStartupErrors = ERR_IGNORE_LIB;19 handleStartupErrors = ERR_IGNORE_LIB;
20 } else if (val.equals("halt")) {20 } else if (val.equals("halt")) {
21 handleStartupErrors = ERR_HALT;21 handleStartupErrors = ERR_HALT;
diff --git a/debian/patches/reproducible-build-user.diff b/debian/patches/reproducible-build-user.diff
index 60c7a7b..6732df5 100644
--- a/debian/patches/reproducible-build-user.diff
+++ b/debian/patches/reproducible-build-user.diff
@@ -3,12 +3,12 @@ Author: Emmanuel Bourg <ebourg@apache.org>
3Forwarded: no3Forwarded: no
4--- a/make/autoconf/basic.m44--- a/make/autoconf/basic.m4
5+++ b/make/autoconf/basic.m45+++ b/make/autoconf/basic.m4
6@@ -100,7 +100,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],6@@ -100,7 +100,7 @@
77
8 # Setup username (for use in adhoc version strings etc)8 # Setup username (for use in adhoc version strings etc)
9 # Outer [ ] to quote m4.9 # Outer [ ] to quote m4.
10- [ USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'` ]10- [ USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'` ]
11+ [ USERNAME="unknown" ]11+ [ USERNAME="unknown" ]
12 AC_SUBST(USERNAME)12 AC_SUBST(USERNAME)
13 ])13 ])
1414
diff --git a/debian/patches/reproducible-character-data.diff b/debian/patches/reproducible-character-data.diff
index 93412a0..c029535 100644
--- a/debian/patches/reproducible-character-data.diff
+++ b/debian/patches/reproducible-character-data.diff
@@ -3,7 +3,7 @@ Author: Emmanuel Bourg <ebourg@apache.org>
3Forwarded: no3Forwarded: no
4--- a/make/jdk/src/classes/build/tools/generatecharacter/GenerateCharacter.java4--- a/make/jdk/src/classes/build/tools/generatecharacter/GenerateCharacter.java
5+++ b/make/jdk/src/classes/build/tools/generatecharacter/GenerateCharacter.java5+++ b/make/jdk/src/classes/build/tools/generatecharacter/GenerateCharacter.java
6@@ -693,7 +693,7 @@ OUTER: for (int i = 0; i < n; i += m) {6@@ -693,7 +693,7 @@
7 PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(theOutputFileName)));7 PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(theOutputFileName)));
8 out.println(commentStart +8 out.println(commentStart +
9 " This file was generated AUTOMATICALLY from a template file " +9 " This file was generated AUTOMATICALLY from a template file " +
@@ -12,7 +12,7 @@ Forwarded: no
12 int marklen = commandMarker.length();12 int marklen = commandMarker.length();
13 LOOP: while(true) {13 LOOP: while(true) {
14 try {14 try {
15@@ -1819,7 +1819,8 @@ OUTER: for (int i = 0; i < n; i += m) {15@@ -1819,7 +1819,8 @@
16 }16 }
17 commentStart = (Csyntax ? "/*" : "//");17 commentStart = (Csyntax ? "/*" : "//");
18 commentEnd = (Csyntax ? " */" : "");18 commentEnd = (Csyntax ? " */" : "");
@@ -20,5 +20,5 @@ Forwarded: no
20+ commandLineDescription = desc.toString().replace("\\", "\\\\")20+ commandLineDescription = desc.toString().replace("\\", "\\\\")
21+ .replace(System.getProperty("user.dir").replace("make/gensrc", ""), "");21+ .replace(System.getProperty("user.dir").replace("make/gensrc", ""), "");
22 }22 }
2323
24 private static void searchBins(long[] map, int binsOccupied) throws Exception {24 private static void searchBins(long[] map, int binsOccupied) throws Exception {
diff --git a/debian/patches/reproducible-copyright-headers.diff b/debian/patches/reproducible-copyright-headers.diff
index 6a91c5a..020e3bf 100644
--- a/debian/patches/reproducible-copyright-headers.diff
+++ b/debian/patches/reproducible-copyright-headers.diff
@@ -11,7 +11,7 @@ Forwarded: no
11 import java.util.GregorianCalendar;11 import java.util.GregorianCalendar;
12 import java.util.Locale;12 import java.util.Locale;
13 import java.util.TimeZone;13 import java.util.TimeZone;
14@@ -150,8 +151,14 @@ class CopyrightHeaders {14@@ -150,8 +151,14 @@
15 }15 }
16 16
17 private static int getYear() {17 private static int getYear() {
@@ -30,7 +30,7 @@ Forwarded: no
30 // no instantiation30 // no instantiation
31--- a/make/jdk/src/classes/build/tools/generatelsrequivmaps/EquivMapsGenerator.java31--- a/make/jdk/src/classes/build/tools/generatelsrequivmaps/EquivMapsGenerator.java
32+++ b/make/jdk/src/classes/build/tools/generatelsrequivmaps/EquivMapsGenerator.java32+++ b/make/jdk/src/classes/build/tools/generatelsrequivmaps/EquivMapsGenerator.java
33@@ -34,9 +34,13 @@ import java.time.ZoneId;33@@ -34,9 +34,13 @@
34 import java.time.ZonedDateTime;34 import java.time.ZonedDateTime;
35 import java.util.ArrayList;35 import java.util.ArrayList;
36 import java.util.Arrays;36 import java.util.Arrays;
@@ -44,7 +44,7 @@ Forwarded: no
44 import java.util.TreeMap;44 import java.util.TreeMap;
45 import java.util.stream.Collectors;45 import java.util.stream.Collectors;
46 46
47@@ -246,8 +250,15 @@ public class EquivMapsGenerator {47@@ -246,8 +250,15 @@
48 + "}";48 + "}";
49 49
50 private static String getOpenJDKCopyright() {50 private static String getOpenJDKCopyright() {
diff --git a/debian/patches/reproducible-module-info.diff b/debian/patches/reproducible-module-info.diff
index 8c85fb1..487acf0 100644
--- a/debian/patches/reproducible-module-info.diff
+++ b/debian/patches/reproducible-module-info.diff
@@ -3,7 +3,7 @@ Author: Emmanuel Bourg <ebourg@apache.org>
3Forwarded: no3Forwarded: no
4--- a/make/jdk/src/classes/build/tools/module/GenModuleInfoSource.java4--- a/make/jdk/src/classes/build/tools/module/GenModuleInfoSource.java
5+++ b/make/jdk/src/classes/build/tools/module/GenModuleInfoSource.java5+++ b/make/jdk/src/classes/build/tools/module/GenModuleInfoSource.java
6@@ -154,9 +154,10 @@ public class GenModuleInfoSource {6@@ -154,9 +154,10 @@
7 if (l.trim().startsWith("module ")) {7 if (l.trim().startsWith("module ")) {
8 if (debug) {8 if (debug) {
9 // print URI rather than file path to avoid escape9 // print URI rather than file path to avoid escape
diff --git a/debian/patches/riscv64.diff b/debian/patches/riscv64.diff
index 218aa5d..1ec5fd8 100644
--- a/debian/patches/riscv64.diff
+++ b/debian/patches/riscv64.diff
@@ -21,7 +21,7 @@ Reviewed-by: aph, erikj, ehelin, ihse
21+fi21+fi
22+22+
23 DIR=`dirname $0`23 DIR=`dirname $0`
24 OUT=`. $DIR/autoconf-config.guess`24 OUT=`. $DIR/autoconf-config.guess 2> /dev/null`
25 25
26--- a/make/autoconf/build-aux/config.sub26--- a/make/autoconf/build-aux/config.sub
27+++ b/make/autoconf/build-aux/config.sub27+++ b/make/autoconf/build-aux/config.sub
diff --git a/debian/patches/s390x-thread-stack-size.diff b/debian/patches/s390x-thread-stack-size.diff
index 6308b10..d7dddb9 100644
--- a/debian/patches/s390x-thread-stack-size.diff
+++ b/debian/patches/s390x-thread-stack-size.diff
@@ -14,17 +14,17 @@
14 #endif // _LP6414 #endif // _LP64
15--- a/make/autoconf/boot-jdk.m415--- a/make/autoconf/boot-jdk.m4
16+++ b/make/autoconf/boot-jdk.m416+++ b/make/autoconf/boot-jdk.m4
17@@ -459,6 +459,9 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],17@@ -459,6 +459,9 @@
18 fi18 fi
19 UTIL_ADD_JVM_ARG_IF_OK([-Xmx${JVM_MAX_HEAP}M],boot_jdk_jvmargs_big,[$JAVA])19 UTIL_ADD_JVM_ARG_IF_OK([-Xmx${JVM_MAX_HEAP}M],boot_jdk_jvmargs_big,[$JAVA])
20 UTIL_ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs_big,[$JAVA])20 UTIL_ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs_big,[$JAVA])
21+ if test "$VAR_CPU" = s390x; then21+ if test "$VAR_CPU" = s390x; then
22+ UTIL_ADD_JVM_ARG_IF_OK([-Xss1600k],boot_jdk_jvmargs_big,[$JAVA])22+ UTIL_ADD_JVM_ARG_IF_OK([-Xss1600k],boot_jdk_jvmargs_big,[$JAVA])
23+ fi23+ fi
2424
25 AC_MSG_RESULT([$boot_jdk_jvmargs_big])25 AC_MSG_RESULT([$boot_jdk_jvmargs_big])
2626
27@@ -488,6 +491,9 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],27@@ -488,6 +491,9 @@
28 UTIL_ADD_JVM_ARG_IF_OK([-XX:+UseSerialGC],boot_jdk_jvmargs_small,[$JAVA])28 UTIL_ADD_JVM_ARG_IF_OK([-XX:+UseSerialGC],boot_jdk_jvmargs_small,[$JAVA])
29 UTIL_ADD_JVM_ARG_IF_OK([-Xms32M],boot_jdk_jvmargs_small,[$JAVA])29 UTIL_ADD_JVM_ARG_IF_OK([-Xms32M],boot_jdk_jvmargs_small,[$JAVA])
30 UTIL_ADD_JVM_ARG_IF_OK([-Xmx512M],boot_jdk_jvmargs_small,[$JAVA])30 UTIL_ADD_JVM_ARG_IF_OK([-Xmx512M],boot_jdk_jvmargs_small,[$JAVA])
@@ -32,11 +32,11 @@
32+ UTIL_ADD_JVM_ARG_IF_OK([-Xss1600k],boot_jdk_jvmargs_small,[$JAVA])32+ UTIL_ADD_JVM_ARG_IF_OK([-Xss1600k],boot_jdk_jvmargs_small,[$JAVA])
33+ fi33+ fi
34 UTIL_ADD_JVM_ARG_IF_OK([-XX:TieredStopAtLevel=1],boot_jdk_jvmargs_small,[$JAVA])34 UTIL_ADD_JVM_ARG_IF_OK([-XX:TieredStopAtLevel=1],boot_jdk_jvmargs_small,[$JAVA])
3535
36 AC_MSG_RESULT([$boot_jdk_jvmargs_small])36 AC_MSG_RESULT([$boot_jdk_jvmargs_small])
37--- a/make/autoconf/build-performance.m437--- a/make/autoconf/build-performance.m4
38+++ b/make/autoconf/build-performance.m438+++ b/make/autoconf/build-performance.m4
39@@ -443,6 +443,9 @@ AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC],39@@ -443,6 +443,9 @@
40 MX_VALUE=51240 MX_VALUE=512
41 fi41 fi
42 UTIL_ADD_JVM_ARG_IF_OK([-Xms${MS_VALUE}M -Xmx${MX_VALUE}M],SJAVAC_SERVER_JAVA_FLAGS,[$SJAVAC_SERVER_JAVA])42 UTIL_ADD_JVM_ARG_IF_OK([-Xms${MS_VALUE}M -Xmx${MX_VALUE}M],SJAVAC_SERVER_JAVA_FLAGS,[$SJAVAC_SERVER_JAVA])
@@ -44,5 +44,5 @@
44+ UTIL_ADD_JVM_ARG_IF_OK([-Xss1600k],SJAVAC_SERVER_JAVA_FLAGS,[$SJAVAC_SERVER_JAVA])44+ UTIL_ADD_JVM_ARG_IF_OK([-Xss1600k],SJAVAC_SERVER_JAVA_FLAGS,[$SJAVAC_SERVER_JAVA])
45+ fi45+ fi
46 AC_SUBST(SJAVAC_SERVER_JAVA_FLAGS)46 AC_SUBST(SJAVAC_SERVER_JAVA_FLAGS)
4747
48 AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac],48 AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac],
diff --git a/debian/patches/system-pcsclite.diff b/debian/patches/system-pcsclite.diff
index 09b4ad8..5b6df31 100644
--- a/debian/patches/system-pcsclite.diff
+++ b/debian/patches/system-pcsclite.diff
@@ -52,7 +52,7 @@
52+])52+])
53--- a/make/autoconf/spec.gmk.in53--- a/make/autoconf/spec.gmk.in
54+++ b/make/autoconf/spec.gmk.in54+++ b/make/autoconf/spec.gmk.in
55@@ -776,6 +776,7 @@55@@ -780,6 +780,7 @@
56 ENABLE_INTREE_EC:=@ENABLE_INTREE_EC@56 ENABLE_INTREE_EC:=@ENABLE_INTREE_EC@
57 USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@57 USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
58 USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@58 USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
diff --git a/debian/patches/test-use-ip-address.patch b/debian/patches/test-use-ip-address.patch
index 02acac7..dbe0843 100644
--- a/debian/patches/test-use-ip-address.patch
+++ b/debian/patches/test-use-ip-address.patch
@@ -17,7 +17,7 @@ Last-Update: 2023-03-27
17 NetworkInterface inf = NetworkInterface.getByInetAddress(addr);17 NetworkInterface inf = NetworkInterface.getByInetAddress(addr);
18--- a/test/jdk/java/net/InetAddress/getOriginalHostName.java18--- a/test/jdk/java/net/InetAddress/getOriginalHostName.java
19+++ b/test/jdk/java/net/InetAddress/getOriginalHostName.java19+++ b/test/jdk/java/net/InetAddress/getOriginalHostName.java
20@@ -39,7 +39,7 @@20@@ -40,7 +40,7 @@
21 SharedSecrets.getJavaNetInetAddressAccess();21 SharedSecrets.getJavaNetInetAddressAccess();
22 22
23 public static void main(String[] args) throws Exception {23 public static void main(String[] args) throws Exception {
diff --git a/debian/patches/update-assertion-for-armhf.patch b/debian/patches/update-assertion-for-armhf.patch
index 582974c..0860a73 100644
--- a/debian/patches/update-assertion-for-armhf.patch
+++ b/debian/patches/update-assertion-for-armhf.patch
@@ -5,7 +5,7 @@ Author: Vladimir Petko <vladimir.petko@canonical.com>
5Bug: https://bugs.openjdk.org/browse/JDK-83054805Bug: https://bugs.openjdk.org/browse/JDK-8305480
6--- a/test/hotspot/jtreg/runtime/NMT/VirtualAllocCommitMerge.java6--- a/test/hotspot/jtreg/runtime/NMT/VirtualAllocCommitMerge.java
7+++ b/test/hotspot/jtreg/runtime/NMT/VirtualAllocCommitMerge.java7+++ b/test/hotspot/jtreg/runtime/NMT/VirtualAllocCommitMerge.java
8@@ -320,6 +320,6 @@8@@ -321,6 +321,6 @@
9 public static void checkCommitted(OutputAnalyzer output, long addr, long size, String sizeString) {9 public static void checkCommitted(OutputAnalyzer output, long addr, long size, String sizeString) {
10 output.shouldMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*"10 output.shouldMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*"
11 + Long.toHexString(addr + size)11 + Long.toHexString(addr + size)
diff --git a/debian/patches/update-permission-test.patch b/debian/patches/update-permission-test.patch
index d1437d5..f7a503c 100644
--- a/debian/patches/update-permission-test.patch
+++ b/debian/patches/update-permission-test.patch
@@ -4,7 +4,7 @@ Author: Vladimir Petko <vladimir.petko@canonical.com>
4Last-Update: 2023-03-244Last-Update: 2023-03-24
5--- a/test/jdk/java/lang/ProcessHandle/PermissionTest.java5--- a/test/jdk/java/lang/ProcessHandle/PermissionTest.java
6+++ b/test/jdk/java/lang/ProcessHandle/PermissionTest.java6+++ b/test/jdk/java/lang/ProcessHandle/PermissionTest.java
7@@ -219,6 +219,7 @@7@@ -216,6 +216,7 @@
8 permissions.add(new PropertyPermission("testng.mode.dryrun", "read"));8 permissions.add(new PropertyPermission("testng.mode.dryrun", "read"));
9 permissions.add(new PropertyPermission("testng.report.xml.name", "read"));9 permissions.add(new PropertyPermission("testng.report.xml.name", "read"));
10 permissions.add(new PropertyPermission("testng.timezone", "read"));10 permissions.add(new PropertyPermission("testng.timezone", "read"));
@@ -14,7 +14,7 @@ Last-Update: 2023-03-24
14 }14 }
15--- a/test/jdk/java/sql/testng/util/TestPolicy.java15--- a/test/jdk/java/sql/testng/util/TestPolicy.java
16+++ b/test/jdk/java/sql/testng/util/TestPolicy.java16+++ b/test/jdk/java/sql/testng/util/TestPolicy.java
17@@ -114,6 +114,8 @@17@@ -113,6 +113,8 @@
18 permissions.add(new PropertyPermission("testng.mode.dryrun", "read"));18 permissions.add(new PropertyPermission("testng.mode.dryrun", "read"));
19 permissions.add(new PropertyPermission("testng.report.xml.name", "read"));19 permissions.add(new PropertyPermission("testng.report.xml.name", "read"));
20 permissions.add(new PropertyPermission("testng.timezone", "read"));20 permissions.add(new PropertyPermission("testng.timezone", "read"));
diff --git a/doc/building.html b/doc/building.html
index 7d6f18c..842e7fa 100644
--- a/doc/building.html
+++ b/doc/building.html
@@ -1,19 +1,24 @@
1<!DOCTYPE html>1<!DOCTYPE html>
2<html>2<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
3<head>3<head>
4 <meta charset="utf-8">4 <meta charset="utf-8" />
5 <meta name="generator" content="pandoc">5 <meta name="generator" content="pandoc" />
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
7 <title>Building the JDK</title>7 <title>Building the JDK</title>
8 <style type="text/css">code{white-space: pre;}</style>8 <style type="text/css">
9 <link rel="stylesheet" href="../make/data/docs-resources/resources/jdk-default.css">9 code{white-space: pre-wrap;}
10 span.smallcaps{font-variant: small-caps;}
11 span.underline{text-decoration: underline;}
12 div.column{display: inline-block; vertical-align: top; width: 50%;}
13 </style>
14 <link rel="stylesheet" href="../make/data/docs-resources/resources/jdk-default.css" />
10 <!--[if lt IE 9]>15 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>16 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->17 <![endif]-->
13 <style type="text/css">pre, code, tt { color: #1d6ae5; }</style>18 <style type="text/css">pre, code, tt { color: #1d6ae5; }</style>
14</head>19</head>
15<body>20<body>
16<header>21<header id="title-block-header">
17<h1 class="title">Building the JDK</h1>22<h1 class="title">Building the JDK</h1>
18</header>23</header>
19<nav id="TOC">24<nav id="TOC">
@@ -67,6 +72,9 @@
67<li><a href="#make-control-variables">Make Control Variables</a></li>72<li><a href="#make-control-variables">Make Control Variables</a></li>
68</ul></li>73</ul></li>
69<li><a href="#running-tests">Running Tests</a></li>74<li><a href="#running-tests">Running Tests</a></li>
75<li><a href="#signing">Signing</a><ul>
76<li><a href="#macos-1">macOS</a></li>
77</ul></li>
70<li><a href="#cross-compiling">Cross-compiling</a><ul>78<li><a href="#cross-compiling">Cross-compiling</a><ul>
71<li><a href="#cross-compiling-the-easy-way-with-openjdk-devkits">Cross compiling the easy way with OpenJDK devkits</a></li>79<li><a href="#cross-compiling-the-easy-way-with-openjdk-devkits">Cross compiling the easy way with OpenJDK devkits</a></li>
72<li><a href="#boot-jdk-and-build-jdk">Boot JDK and Build JDK</a></li>80<li><a href="#boot-jdk-and-build-jdk">Boot JDK and Build JDK</a></li>
@@ -234,30 +242,30 @@
234<table>242<table>
235<thead>243<thead>
236<tr class="header">244<tr class="header">
237<th style="text-align: left;">Operating system</th>245<th>Operating system</th>
238<th style="text-align: left;">Supported toolchain</th>246<th>Supported toolchain</th>
239</tr>247</tr>
240</thead>248</thead>
241<tbody>249<tbody>
242<tr class="odd">250<tr class="odd">
243<td style="text-align: left;">Linux</td>251<td>Linux</td>
244<td style="text-align: left;">gcc, clang</td>252<td>gcc, clang</td>
245</tr>253</tr>
246<tr class="even">254<tr class="even">
247<td style="text-align: left;">macOS</td>255<td>macOS</td>
248<td style="text-align: left;">Apple Xcode (using clang)</td>256<td>Apple Xcode (using clang)</td>
249</tr>257</tr>
250<tr class="odd">258<tr class="odd">
251<td style="text-align: left;">Solaris</td>259<td>Solaris</td>
252<td style="text-align: left;">Oracle Solaris Studio</td>260<td>Oracle Solaris Studio</td>
253</tr>261</tr>
254<tr class="even">262<tr class="even">
255<td style="text-align: left;">AIX</td>263<td>AIX</td>
256<td style="text-align: left;">IBM XL C/C++</td>264<td>IBM XL C/C++</td>
257</tr>265</tr>
258<tr class="odd">266<tr class="odd">
259<td style="text-align: left;">Windows</td>267<td>Windows</td>
260<td style="text-align: left;">Microsoft Visual Studio</td>268<td>Microsoft Visual Studio</td>
261</tr>269</tr>
262</tbody>270</tbody>
263</table>271</table>
@@ -265,26 +273,26 @@
265<table>273<table>
266<thead>274<thead>
267<tr class="header">275<tr class="header">
268<th style="text-align: left;">Operating system</th>276<th>Operating system</th>
269<th style="text-align: left;">Toolchain version</th>277<th>Toolchain version</th>
270</tr>278</tr>
271</thead>279</thead>
272<tbody>280<tbody>
273<tr class="odd">281<tr class="odd">
274<td style="text-align: left;">Linux</td>282<td>Linux</td>
275<td style="text-align: left;">gcc 7.3.0</td>283<td>gcc 7.3.0</td>
276</tr>284</tr>
277<tr class="even">285<tr class="even">
278<td style="text-align: left;">macOS</td>286<td>macOS</td>
279<td style="text-align: left;">Apple Xcode 9.4 (using clang 9.1.0)</td>287<td>Apple Xcode 9.4 (using clang 9.1.0)</td>
280</tr>288</tr>
281<tr class="odd">289<tr class="odd">
282<td style="text-align: left;">Solaris</td>290<td>Solaris</td>
283<td style="text-align: left;">Oracle Solaris Studio 12.4 (with compiler version 5.13)</td>291<td>Oracle Solaris Studio 12.4 (with compiler version 5.13)</td>
284</tr>292</tr>
285<tr class="even">293<tr class="even">
286<td style="text-align: left;">Windows</td>294<td>Windows</td>
287<td style="text-align: left;">Microsoft Visual Studio 2017 update 15.9.16</td>295<td>Microsoft Visual Studio 2017 update 15.9.16</td>
288</tr>296</tr>
289</tbody>297</tbody>
290</table>298</table>
@@ -297,9 +305,13 @@
297<p>To use clang instead of gcc on Linux, use <code>--with-toolchain-type=clang</code>.</p>305<p>To use clang instead of gcc on Linux, use <code>--with-toolchain-type=clang</code>.</p>
298<h3 id="apple-xcode">Apple Xcode</h3>306<h3 id="apple-xcode">Apple Xcode</h3>
299<p>The oldest supported version of Xcode is 8.</p>307<p>The oldest supported version of Xcode is 8.</p>
300<p>You will need the Xcode command lines developers tools to be able to build the JDK. (Actually, <em>only</em> the command lines tools are needed, not the IDE.) The simplest way to install these is to run:</p>308<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>
301<pre><code>xcode-select --install</code></pre>309<pre><code>xcode-select --install</code></pre>
302<p>It is advisable to keep an older version of Xcode for building the JDK when updating Xcode. This <a href="http://iosdevelopertips.com/xcode/install-multiple-versions-of-xcode.html">blog page</a> has good suggestions on managing multiple Xcode versions. To use a specific version of Xcode, use <code>xcode-select -s</code> before running <code>configure</code>, or use <code>--with-toolchain-path</code> to point to the version of Xcode to use, e.g. <code>configure --with-toolchain-path=/Applications/Xcode8.app/Contents/Developer/usr/bin</code></p>310<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>
311<ul>
312<li>Use <code>xcode-select -s</code> before running <code>configure</code>, e.g. <code>xcode-select -s /Applications/Xcode13.1.app</code>. The drawback is that the setting is system wide and you may have to revert it after an OpenJDK build.</li>
313<li>Use configure option <code>--with-xcode-path</code>, e.g. <code>configure --with-xcode-path=/Applications/Xcode13.1.app</code> This allows using a specific Xcode version for an OpenJDK build, independently of the active Xcode version by <code>xcode-select</code>.</li>
314</ul>
303<p>If you have recently (inadvertently) updated your OS and/or Xcode version, and the JDK can no longer be built, please see the section on <a href="#problems-with-the-build-environment">Problems with the Build Environment</a>, and <a href="#getting-help">Getting Help</a> to find out if there are any recent, non-merged patches available for this update.</p>315<p>If you have recently (inadvertently) updated your OS and/or Xcode version, and the JDK can no longer be built, please see the section on <a href="#problems-with-the-build-environment">Problems with the Build Environment</a>, and <a href="#getting-help">Getting Help</a> to find out if there are any recent, non-merged patches available for this update.</p>
304<h3 id="oracle-solaris-studio">Oracle Solaris Studio</h3>316<h3 id="oracle-solaris-studio">Oracle Solaris Studio</h3>
305<p>The minimum accepted version of the Solaris Studio compilers is 5.13 (corresponding to Solaris Studio 12.4). Older versions will not be accepted by configure.</p>317<p>The minimum accepted version of the Solaris Studio compilers is 5.13 (corresponding to Solaris Studio 12.4). Older versions will not be accepted by configure.</p>
@@ -362,8 +374,8 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre>
362<h3 id="microsoft-visual-studio">Microsoft Visual Studio</h3>374<h3 id="microsoft-visual-studio">Microsoft Visual Studio</h3>
363<p>The minimum accepted version of Visual Studio is 2010. Older versions will not be accepted by <code>configure</code>. The maximum accepted version of Visual Studio is 2019. Versions older than 2017 are unlikely to continue working for long.</p>375<p>The minimum accepted version of Visual Studio is 2010. Older versions will not be accepted by <code>configure</code>. The maximum accepted version of Visual Studio is 2019. Versions older than 2017 are unlikely to continue working for long.</p>
364<p>If you have multiple versions of Visual Studio installed, <code>configure</code> will by default pick the latest. You can request a specific version to be used by setting <code>--with-toolchain-version</code>, e.g. <code>--with-toolchain-version=2015</code>.</p>376<p>If you have multiple versions of Visual Studio installed, <code>configure</code> will by default pick the latest. You can request a specific version to be used by setting <code>--with-toolchain-version</code>, e.g. <code>--with-toolchain-version=2015</code>.</p>
365<p>If you have Visual Studio installed but <code>configure</code> fails to detect it, it may be because of <a href="#spaces-in-path">spaces in path</a>.</p>
366<p>If you get <code>LINK: fatal error LNK1123: failure during conversion to COFF: file invalid</code> when building using Visual Studio 2010, you have encountered <a href="http://support.microsoft.com/kb/2757355">KB2757355</a>, a bug triggered by a specific installation order. However, the solution suggested by the KB article does not always resolve the problem. See <a href="https://stackoverflow.com/questions/10888391">this stackoverflow discussion</a> for other suggestions.</p>377<p>If you get <code>LINK: fatal error LNK1123: failure during conversion to COFF: file invalid</code> when building using Visual Studio 2010, you have encountered <a href="http://support.microsoft.com/kb/2757355">KB2757355</a>, a bug triggered by a specific installation order. However, the solution suggested by the KB article does not always resolve the problem. See <a href="https://stackoverflow.com/questions/10888391">this stackoverflow discussion</a> for other suggestions.</p>
378<p>If you have Visual Studio installed but <code>configure</code> fails to detect it, it may be because of <a href="#spaces-in-path">spaces in path</a>.</p>
367<h3 id="ibm-xl-cc">IBM XL C/C++</h3>379<h3 id="ibm-xl-cc">IBM XL C/C++</h3>
368<p>The regular builds by SAP is using version 12.1, described as <code>IBM XL C/C++ for AIX, V12.1 (5765-J02, 5725-C72) Version: 12.01.0000.0017</code>.</p>380<p>The regular builds by SAP is using version 12.1, described as <code>IBM XL C/C++ for AIX, V12.1 (5765-J02, 5725-C72) Version: 12.01.0000.0017</code>.</p>
369<p>See the <a href="http://cr.openjdk.java.net/~simonis/ppc-aix-port">OpenJDK PowerPC Port Status Page</a> for details.</p>381<p>See the <a href="http://cr.openjdk.java.net/~simonis/ppc-aix-port">OpenJDK PowerPC Port Status Page</a> for details.</p>
@@ -403,7 +415,7 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre>
403<ul>415<ul>
404<li>To install on an apt-based Linux, try running <code>sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev</code>.</li>416<li>To install on an apt-based Linux, try running <code>sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev</code>.</li>
405<li>To install on an rpm-based Linux, try running <code>sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel</code>.</li>417<li>To install on an rpm-based Linux, try running <code>sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel</code>.</li>
406<li>To install on Alpine Linux, try running <code>sudo apk add libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev</code>.</li>418<li>To install on Alpine Linux, try running <code>sudo apk add libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev</code>.</li>
407<li>To install on Solaris, try running <code>pkg install x11/header/x11-protocols x11/library/libice x11/library/libpthread-stubs x11/library/libsm x11/library/libx11 x11/library/libxau x11/library/libxcb x11/library/libxdmcp x11/library/libxevie x11/library/libxext x11/library/libxrender x11/library/libxscrnsaver x11/library/libxtst x11/library/toolkit/libxt</code>.</li>419<li>To install on Solaris, try running <code>pkg install x11/header/x11-protocols x11/library/libice x11/library/libpthread-stubs x11/library/libsm x11/library/libx11 x11/library/libxau x11/library/libxcb x11/library/libxdmcp x11/library/libxevie x11/library/libxext x11/library/libxrender x11/library/libxscrnsaver x11/library/libxtst x11/library/toolkit/libxt</code>.</li>
408</ul>420</ul>
409<p>Use <code>--with-x=&lt;path&gt;</code> if <code>configure</code> does not properly locate your X11 files.</p>421<p>Use <code>--with-x=&lt;path&gt;</code> if <code>configure</code> does not properly locate your X11 files.</p>
@@ -553,7 +565,7 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre>
553<li><code>CONF</code> and <code>CONF_NAME</code> - Selecting the configuration(s) to use. See <a href="#using-multiple-configurations">Using Multiple Configurations</a></li>565<li><code>CONF</code> and <code>CONF_NAME</code> - Selecting the configuration(s) to use. See <a href="#using-multiple-configurations">Using Multiple Configurations</a></li>
554</ul>566</ul>
555<h4 id="test-make-control-variables">Test Make Control Variables</h4>567<h4 id="test-make-control-variables">Test Make Control Variables</h4>
556<p>These make control variables only make sense when running tests. Please see <a href="testing.html">Testing the JDK</a> for details.</p>568<p>These make control variables only make sense when running tests. Please see <strong>Testing the JDK</strong> (<a href="testing.html">html</a>, <a href="testing.md">markdown</a>) for details.</p>
557<ul>569<ul>
558<li><code>TEST</code></li>570<li><code>TEST</code></li>
559<li><code>TEST_JOBS</code></li>571<li><code>TEST_JOBS</code></li>
@@ -573,7 +585,13 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre>
573<p>The <a href="https://wiki.openjdk.java.net/display/Adoption">Adoption Group</a> provides recent builds of jtreg <a href="https://adopt-openjdk.ci.cloudbees.com/job/jtreg/lastSuccessfulBuild/artifact">here</a>. Download the latest <code>.tar.gz</code> file, unpack it, and point <code>--with-jtreg</code> to the <code>jtreg</code> directory that you just unpacked.</p>585<p>The <a href="https://wiki.openjdk.java.net/display/Adoption">Adoption Group</a> provides recent builds of jtreg <a href="https://adopt-openjdk.ci.cloudbees.com/job/jtreg/lastSuccessfulBuild/artifact">here</a>. Download the latest <code>.tar.gz</code> file, unpack it, and point <code>--with-jtreg</code> to the <code>jtreg</code> directory that you just unpacked.</p>
574<p>To execute the most basic tests (tier 1), use:</p>586<p>To execute the most basic tests (tier 1), use:</p>
575<pre><code>make run-test-tier1</code></pre>587<pre><code>make run-test-tier1</code></pre>
576<p>For more details on how to run tests, please see the <a href="testing.html">Testing the JDK</a> document.</p>588<p>For more details on how to run tests, please see <strong>Testing the JDK</strong> (<a href="testing.html">html</a>, <a href="testing.md">markdown</a>).</p>
589<h2 id="signing">Signing</h2>
590<h3 id="macos-1">macOS</h3>
591<p>Modern versions of macOS require applications to be signed and notarizied before distribution. See Apple's documentation for more background on what this means and how it works. To help support this, the JDK build can be configured to automatically sign all native binaries, and the JDK bundle, with all the options needed for successful notarization, as well as all the entitlements required by the JDK. To enable <code>hardened</code> signing, use configure parameter <code>--with-macosx-codesign=hardened</code> and configure the signing identity you wish to use with <code>--with-macosx-codesign-identity=&lt;identity&gt;</code>. The identity refers to a signing identity from Apple that needs to be preinstalled on the build host.</p>
592<p>When not signing for distribution with the hardened option, the JDK build will still attempt to perform <code>adhoc</code> signing to add the special entitlement <code>com.apple.security.get-task-allow</code> to each binary. This entitlement is required to be able to dump core files from a process. Note that adding this entitlement makes the build invalid for notarization, so it is only added when signing in <code>debug</code> mode. To explicitly enable this kind of adhoc signing, use configure parameter <code>--with-macosx-codesign=debug</code>. It will be enabled by default in most cases.</p>
593<p>It's also possible to completely disable any explicit codesign operations done by the JDK build using the configure parameter <code>--without-macosx-codesign</code>. The exact behavior then depends on the architecture. For macOS on x64, it (at least at the time of this writing) results in completely unsigned binaries that should still work fine for development and debugging purposes. On aarch64, the Xcode linker will apply a default &quot;adhoc&quot; signing, without any entitlements. Such a build does not allow dumping core files.</p>
594<p>The default mode &quot;auto&quot; will try for <code>hardened</code> signing if the debug level is <code>release</code> and either the default identity or the specified identity is valid. If hardened isn't possible, then <code>debug</code> signing is chosen if it works. If nothing works, the codesign build step is disabled.</p>
577<h2 id="cross-compiling">Cross-compiling</h2>595<h2 id="cross-compiling">Cross-compiling</h2>
578<p>Cross-compiling means using one platform (the <em>build</em> platform) to generate output that can ran on another platform (the <em>target</em> platform).</p>596<p>Cross-compiling means using one platform (the <em>build</em> platform) to generate output that can ran on another platform (the <em>target</em> platform).</p>
579<p>The typical reason for cross-compiling is that the build is performed on a more powerful desktop computer, but the resulting binaries will be able to run on a different, typically low-performing system. Most of the complications that arise when building for embedded is due to this separation of <em>build</em> and <em>target</em> systems.</p>597<p>The typical reason for cross-compiling is that the build is performed on a more powerful desktop computer, but the resulting binaries will be able to run on a different, typically low-performing system. Most of the complications that arise when building for embedded is due to this separation of <em>build</em> and <em>target</em> systems.</p>
@@ -645,11 +663,13 @@ x86_64-linux-gnu-to-ppc64le-linux-gnu</code></pre>
645<p>Note that alsa is needed even if you only want to build a headless JDK.</p>663<p>Note that alsa is needed even if you only want to build a headless JDK.</p>
646<ul>664<ul>
647<li><p>Go to <a href="https://www.debian.org/distrib/packages">Debian Package Search</a> and search for the <code>libasound2</code> and <code>libasound2-dev</code> packages for your <em>target</em> system. Download them to /tmp.</p></li>665<li><p>Go to <a href="https://www.debian.org/distrib/packages">Debian Package Search</a> and search for the <code>libasound2</code> and <code>libasound2-dev</code> packages for your <em>target</em> system. Download them to /tmp.</p></li>
648<li><p>Install the libraries into the cross-compilation toolchain. For instance:</p>666<li>Install the libraries into the cross-compilation toolchain. For instance:</li>
667</ul>
649<pre><code>cd /tools/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux/arm-linux-gnueabihf/libc668<pre><code>cd /tools/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux/arm-linux-gnueabihf/libc
650dpkg-deb -x /tmp/libasound2_1.0.25-4_armhf.deb .669dpkg-deb -x /tmp/libasound2_1.0.25-4_armhf.deb .
651dpkg-deb -x /tmp/libasound2-dev_1.0.25-4_armhf.deb .</code></pre></li>670dpkg-deb -x /tmp/libasound2-dev_1.0.25-4_armhf.deb .</code></pre>
652<li><p>If alsa is not properly detected by <code>configure</code>, you can point it out by <code>--with-alsa</code>.</p></li>671<ul>
672<li>If alsa is not properly detected by <code>configure</code>, you can point it out by <code>--with-alsa</code>.</li>
653</ul>673</ul>
654<h4 id="x11-1">X11</h4>674<h4 id="x11-1">X11</h4>
655<p>You will need X11 libraries suitable for your <em>target</em> system. For most cases, using Debian's pre-built libraries work fine.</p>675<p>You will need X11 libraries suitable for your <em>target</em> system. For most cases, using Debian's pre-built libraries work fine.</p>
diff --git a/doc/building.md b/doc/building.md
index 55cd791..60d4d73 100644
--- a/doc/building.md
+++ b/doc/building.md
@@ -291,13 +291,13 @@ be able to run on the target platform. In theory, toolchain and operating
291system should be independent factors, but in practice there's more or less a291system should be independent factors, but in practice there's more or less a
292one-to-one correlation between target operating system and toolchain.292one-to-one correlation between target operating system and toolchain.
293293
294 Operating system Supported toolchain294| Operating system | Supported toolchain |
295 ------------------ -------------------------295| ------------------ | ------------------------- |
296 Linux gcc, clang296| Linux | gcc, clang |
297 macOS Apple Xcode (using clang)297| macOS | Apple Xcode (using clang) |
298 Solaris Oracle Solaris Studio298| Solaris | Oracle Solaris Studio |
299 AIX IBM XL C/C++299| AIX | IBM XL C/C++ |
300 Windows Microsoft Visual Studio300| Windows | Microsoft Visual Studio |
301301
302Please see the individual sections on the toolchains for version302Please see the individual sections on the toolchains for version
303recommendations. As a reference, these versions of the toolchains are used, at303recommendations. As a reference, these versions of the toolchains are used, at
@@ -306,12 +306,12 @@ possible to compile the JDK with both older and newer versions, but the closer
306you stay to this list, the more likely you are to compile successfully without306you stay to this list, the more likely you are to compile successfully without
307issues.307issues.
308308
309 Operating system Toolchain version309| Operating system | Toolchain version |
310 ------------------ -------------------------------------------------------310| ------------------ | ------------------------------------------------------- |
311 Linux gcc 7.3.0311| Linux | gcc 7.3.0 |
312 macOS Apple Xcode 9.4 (using clang 9.1.0)312| macOS | Apple Xcode 9.4 (using clang 9.1.0) |
313 Solaris Oracle Solaris Studio 12.4 (with compiler version 5.13)313| Solaris | Oracle Solaris Studio 12.4 (with compiler version 5.13) |
314 Windows Microsoft Visual Studio 2017 update 15.9.16314| Windows | Microsoft Visual Studio 2017 update 15.9.16 |
315315
316### gcc316### gcc
317317
@@ -334,20 +334,20 @@ To use clang instead of gcc on Linux, use `--with-toolchain-type=clang`.
334334
335The oldest supported version of Xcode is 8.335The oldest supported version of Xcode is 8.
336336
337You will need the Xcode command lines developers tools to be able to build337You will need the Xcode command line developer tools to be able to build
338the JDK. (Actually, *only* the command lines tools are needed, not the IDE.)338the JDK. (Actually, *only* the command line tools are needed, not the IDE.)
339The simplest way to install these is to run:339The simplest way to install these is to run:
340```340```
341xcode-select --install341xcode-select --install
342```342```
343343
344It is advisable to keep an older version of Xcode for building the JDK when344When updating Xcode, it is advisable to keep an older version for building the JDK.
345updating Xcode. This [blog page](345To use a specific version of Xcode you have multiple options:
346http://iosdevelopertips.com/xcode/install-multiple-versions-of-xcode.html) has346
347good suggestions on managing multiple Xcode versions. To use a specific version347 * Use `xcode-select -s` before running `configure`, e.g. `xcode-select -s /Applications/Xcode13.1.app`. The drawback is that the setting
348of Xcode, use `xcode-select -s` before running `configure`, or use348 is system wide and you may have to revert it after an OpenJDK build.
349`--with-toolchain-path` to point to the version of Xcode to use, e.g.349 * Use configure option `--with-xcode-path`, e.g. `configure --with-xcode-path=/Applications/Xcode13.1.app`
350`configure --with-toolchain-path=/Applications/Xcode8.app/Contents/Developer/usr/bin`350 This allows using a specific Xcode version for an OpenJDK build, independently of the active Xcode version by `xcode-select`.
351351
352If you have recently (inadvertently) updated your OS and/or Xcode version, and352If you have recently (inadvertently) updated your OS and/or Xcode version, and
353the JDK can no longer be built, please see the section on [Problems with the353the JDK can no longer be built, please see the section on [Problems with the
@@ -835,7 +835,7 @@ configuration, as opposed to the "configure time" configuration.
835#### Test Make Control Variables835#### Test Make Control Variables
836836
837These make control variables only make sense when running tests. Please see837These make control variables only make sense when running tests. Please see
838[Testing the JDK](testing.html) for details.838**Testing the JDK** ([html](testing.html), [markdown](testing.md)) for details.
839839
840 * `TEST`840 * `TEST`
841 * `TEST_JOBS`841 * `TEST_JOBS`
@@ -873,8 +873,44 @@ To execute the most basic tests (tier 1), use:
873make run-test-tier1873make run-test-tier1
874```874```
875875
876For more details on how to run tests, please see the [Testing876For more details on how to run tests, please see **Testing the JDK**
877the JDK](testing.html) document.877([html](testing.html), [markdown](testing.md)).
878
879## Signing
880
881### macOS
882
883Modern versions of macOS require applications to be signed and notarizied before
884distribution. See Apple's documentation for more background on what this means
885and how it works. To help support this, the JDK build can be configured to
886automatically sign all native binaries, and the JDK bundle, with all the options
887needed for successful notarization, as well as all the entitlements required by
888the JDK. To enable `hardened` signing, use configure parameter
889`--with-macosx-codesign=hardened` and configure the signing identity you wish to
890use with `--with-macosx-codesign-identity=<identity>`. The identity refers to a
891signing identity from Apple that needs to be preinstalled on the build host.
892
893When not signing for distribution with the hardened option, the JDK build will
894still attempt to perform `adhoc` signing to add the special entitlement
895`com.apple.security.get-task-allow` to each binary. This entitlement is required
896to be able to dump core files from a process. Note that adding this entitlement
897makes the build invalid for notarization, so it is only added when signing in
898`debug` mode. To explicitly enable this kind of adhoc signing, use configure
899parameter `--with-macosx-codesign=debug`. It will be enabled by default in most
900cases.
901
902It's also possible to completely disable any explicit codesign operations done
903by the JDK build using the configure parameter `--without-macosx-codesign`.
904The exact behavior then depends on the architecture. For macOS on x64, it (at
905least at the time of this writing) results in completely unsigned binaries that
906should still work fine for development and debugging purposes. On aarch64, the
907Xcode linker will apply a default "adhoc" signing, without any entitlements.
908Such a build does not allow dumping core files.
909
910The default mode "auto" will try for `hardened` signing if the debug level is
911`release` and either the default identity or the specified identity is valid.
912If hardened isn't possible, then `debug` signing is chosen if it works. If
913nothing works, the codesign build step is disabled.
878914
879## Cross-compiling915## Cross-compiling
880916
diff --git a/doc/testing.html b/doc/testing.html
index 5943753..96f7408 100644
--- a/doc/testing.html
+++ b/doc/testing.html
@@ -45,7 +45,7 @@
45</nav>45</nav>
46<h2 id="using-the-run-test-framework">Using the run-test framework</h2>46<h2 id="using-the-run-test-framework">Using the run-test framework</h2>
47<p>This new way of running tests is developer-centric. It assumes that you have built a JDK locally and want to test it. Running common test targets is simple, and more complex ad-hoc combination of tests is possible. The user interface is forgiving, and clearly report errors it cannot resolve.</p>47<p>This new way of running tests is developer-centric. It assumes that you have built a JDK locally and want to test it. Running common test targets is simple, and more complex ad-hoc combination of tests is possible. The user interface is forgiving, and clearly report errors it cannot resolve.</p>
48<p>The main target “run-test” uses the jdk-image as the tested product. There is also an alternate target “exploded-run-test” that uses the exploded image instead. Not all tests will run successfully on the exploded image, but using this target can greatly improve rebuild times for certain workflows.</p>48<p>The main target &quot;run-test&quot; uses the jdk-image as the tested product. There is also an alternate target &quot;exploded-run-test&quot; that uses the exploded image instead. Not all tests will run successfully on the exploded image, but using this target can greatly improve rebuild times for certain workflows.</p>
49<p>Some example command-lines:</p>49<p>Some example command-lines:</p>
50<pre><code>$ make run-test-tier150<pre><code>$ make run-test-tier1
51$ make run-test-jdk_lang JTREG=&quot;JOBS=8&quot;51$ make run-test-jdk_lang JTREG=&quot;JOBS=8&quot;
@@ -55,7 +55,7 @@ $ make run-test TEST=&quot;hotspot:hotspot_gc&quot; JTREG=&quot;JOBS=1;TIMEOUT=8
55$ make run-test TEST=&quot;jtreg:test/hotspot:hotspot_gc test/hotspot/jtreg/native_sanity/JniVersion.java&quot;55$ make run-test TEST=&quot;jtreg:test/hotspot:hotspot_gc test/hotspot/jtreg/native_sanity/JniVersion.java&quot;
56$ make exploded-run-test TEST=tier2</code></pre>56$ make exploded-run-test TEST=tier2</code></pre>
57<h3 id="configuration">Configuration</h3>57<h3 id="configuration">Configuration</h3>
58<p>To be able to run JTReg tests, <code>configure</code> needs to know where to find the JTReg test framework. If it is not picked up automatically by configure, use the <code>--with-jtreg=&lt;path to jtreg home&gt;</code> option to point to the JTReg framework. Note that this option should point to the JTReg home, i.e. the top directory, containing <code>lib/jtreg.jar</code> etc. (An alternative is to set the <code>JT_HOME</code> environment variable to point to the JTReg home before running <code>configure</code>.)</p>58<p>To be able to run JTReg tests, <code>configure</code> needs to know where to find the JTReg test framework. If it is not picked up automatically by configure, use the <code>--with-jtreg=&lt;path to jtreg home&gt;</code> option to point to the JTReg framework. Note that this option should point to the JTReg home, i.e. the top directory, containing <code>lib/jtreg.jar</code> etc. (An alternative is to set the <code>JT_HOME</code> environment variable to point to the JTReg home before running <code>configure</code>.)</p>
59<h2 id="test-selection">Test selection</h2>59<h2 id="test-selection">Test selection</h2>
60<p>All functionality is available using the run-test make target. In this use case, the test or tests to be executed is controlled using the <code>TEST</code> variable. To speed up subsequent test runs with no source code changes, run-test-only can be used instead, which do not depend on the source and test image build.</p>60<p>All functionality is available using the run-test make target. In this use case, the test or tests to be executed is controlled using the <code>TEST</code> variable. To speed up subsequent test runs with no source code changes, run-test-only can be used instead, which do not depend on the source and test image build.</p>
61<p>For some common top-level tests, direct make targets have been generated. This includes all JTReg test groups, the hotspot gtest, and custom tests (if present). This means that <code>make run-test-tier1</code> is equivalent to <code>make run-test TEST=&quot;tier1&quot;</code>, but the latter is more tab-completion friendly. For more complex test runs, the <code>run-test TEST=&quot;x&quot;</code> solution needs to be used.</p>61<p>For some common top-level tests, direct make targets have been generated. This includes all JTReg test groups, the hotspot gtest, and custom tests (if present). This means that <code>make run-test-tier1</code> is equivalent to <code>make run-test TEST=&quot;tier1&quot;</code>, but the latter is more tab-completion friendly. For more complex test runs, the <code>run-test TEST=&quot;x&quot;</code> solution needs to be used.</p>
@@ -82,7 +82,7 @@ $ make exploded-run-test TEST=tier2</code></pre>
82<h3 id="gtest">Gtest</h3>82<h3 id="gtest">Gtest</h3>
83<p>Since the Hotspot Gtest suite is so quick, the default is to run all tests. This is specified by just <code>gtest</code>, or as a fully qualified test descriptor <code>gtest:all</code>.</p>83<p>Since the Hotspot Gtest suite is so quick, the default is to run all tests. This is specified by just <code>gtest</code>, or as a fully qualified test descriptor <code>gtest:all</code>.</p>
84<p>If you want, you can single out an individual test or a group of tests, for instance <code>gtest:LogDecorations</code> or <code>gtest:LogDecorations.level_test_vm</code>. This can be particularly useful if you want to run a shaky test repeatedly.</p>84<p>If you want, you can single out an individual test or a group of tests, for instance <code>gtest:LogDecorations</code> or <code>gtest:LogDecorations.level_test_vm</code>. This can be particularly useful if you want to run a shaky test repeatedly.</p>
85<p>For Gtest, there is a separate test suite for each JVM variant. The JVM variant is defined by adding <code>/&lt;variant&gt;</code> to the test descriptor, e.g. <code>gtest:Log/client</code>. If you specify no variant, gtest will run once for each JVM variant present (e.g. server, client). So if you only have the server JVM present, then <code>gtest:all</code> will be equivalent to <code>gtest:all/server</code>.</p>85<p>For Gtest, there is a separate test suite for each JVM variant. The JVM variant is defined by adding <code>/&lt;variant&gt;</code> to the test descriptor, e.g. <code>gtest:Log/client</code>. If you specify no variant, gtest will run once for each JVM variant present (e.g. server, client). So if you only have the server JVM present, then <code>gtest:all</code> will be equivalent to <code>gtest:all/server</code>.</p>
86<h2 id="test-results-and-summary">Test results and summary</h2>86<h2 id="test-results-and-summary">Test results and summary</h2>
87<p>At the end of the test run, a summary of all tests run will be presented. This will have a consistent look, regardless of what test suites were used. This is a sample summary:</p>87<p>At the end of the test run, a summary of all tests run will be presented. This will have a consistent look, regardless of what test suites were used. This is a sample summary:</p>
88<pre><code>==============================88<pre><code>==============================
@@ -97,16 +97,16 @@ TEST FAILURE</code></pre>
97<p>Tests where the number of TOTAL tests does not equal the number of PASSed tests will be considered a test failure. These are marked with the <code>&gt;&gt; ... &lt;&lt;</code> marker for easy identification.</p>97<p>Tests where the number of TOTAL tests does not equal the number of PASSed tests will be considered a test failure. These are marked with the <code>&gt;&gt; ... &lt;&lt;</code> marker for easy identification.</p>
98<p>The classification of non-passed tests differs a bit between test suites. In the summary, ERROR is used as a catch-all for tests that neither passed nor are classified as failed by the framework. This might indicate test framework error, timeout or other problems.</p>98<p>The classification of non-passed tests differs a bit between test suites. In the summary, ERROR is used as a catch-all for tests that neither passed nor are classified as failed by the framework. This might indicate test framework error, timeout or other problems.</p>
99<p>In case of test failures, <code>make run-test</code> will exit with a non-zero exit value.</p>99<p>In case of test failures, <code>make run-test</code> will exit with a non-zero exit value.</p>
100<p>All tests have their result stored in <code>build/$BUILD/test-results/$TEST_ID</code>, where TEST_ID is a path-safe conversion from the fully qualified test descriptor, e.g. for <code>jtreg:jdk/test:tier1</code> the TEST_ID is <code>jtreg_jdk_test_tier1</code>. This path is also printed in the log at the end of the test run.</p>100<p>All tests have their result stored in <code>build/$BUILD/test-results/$TEST_ID</code>, where TEST_ID is a path-safe conversion from the fully qualified test descriptor, e.g. for <code>jtreg:jdk/test:tier1</code> the TEST_ID is <code>jtreg_jdk_test_tier1</code>. This path is also printed in the log at the end of the test run.</p>
101<p>Additional work data is stored in <code>build/$BUILD/test-support/$TEST_ID</code>. For some frameworks, this directory might contain information that is useful in determining the cause of a failed test.</p>101<p>Additional work data is stored in <code>build/$BUILD/test-support/$TEST_ID</code>. For some frameworks, this directory might contain information that is useful in determining the cause of a failed test.</p>
102<h2 id="test-suite-control">Test suite control</h2>102<h2 id="test-suite-control">Test suite control</h2>
103<p>It is possible to control various aspects of the test suites using make control variables.</p>103<p>It is possible to control various aspects of the test suites using make control variables.</p>
104<p>These variables use a keyword=value approach to allow multiple values to be set. So, for instance, <code>JTREG=&quot;JOBS=1;TIMEOUT=8&quot;</code> will set the JTReg concurrency level to 1 and the timeout factor to 8. This is equivalent to setting <code>JTREG_JOBS=1 JTREG_TIMEOUT=8</code>, but using the keyword format means that the <code>JTREG</code> variable is parsed and verified for correctness, so <code>JTREG=&quot;TMIEOUT=8&quot;</code> would give an error, while <code>JTREG_TMIEOUT=8</code> would just pass unnoticed.</p>104<p>These variables use a keyword=value approach to allow multiple values to be set. So, for instance, <code>JTREG=&quot;JOBS=1;TIMEOUT=8&quot;</code> will set the JTReg concurrency level to 1 and the timeout factor to 8. This is equivalent to setting <code>JTREG_JOBS=1 JTREG_TIMEOUT=8</code>, but using the keyword format means that the <code>JTREG</code> variable is parsed and verified for correctness, so <code>JTREG=&quot;TMIEOUT=8&quot;</code> would give an error, while <code>JTREG_TMIEOUT=8</code> would just pass unnoticed.</p>
105<p>To separate multiple keyword=value pairs, use <code>;</code> (semicolon). Since the shell normally eats <code>;</code>, the recommended usage is to write the assignment inside qoutes, e.g. <code>JTREG=&quot;...;...&quot;</code>. This will also make sure spaces are preserved, as in <code>JTREG=&quot;VM_OPTIONS=-XshowSettings -Xlog:gc+ref=debug&quot;</code>.</p>105<p>To separate multiple keyword=value pairs, use <code>;</code> (semicolon). Since the shell normally eats <code>;</code>, the recommended usage is to write the assignment inside qoutes, e.g. <code>JTREG=&quot;...;...&quot;</code>. This will also make sure spaces are preserved, as in <code>JTREG=&quot;VM_OPTIONS=-XshowSettings -Xlog:gc+ref=debug&quot;</code>.</p>
106<p>(Other ways are possible, e.g. using backslash: <code>JTREG=JOBS=1\;TIMEOUT=8</code>. Also, as a special technique, the string <code>%20</code> will be replaced with space for certain options, e.g. <code>JTREG=VM_OPTIONS=-XshowSettings%20-Xlog:gc+ref=debug</code>. This can be useful if you have layers of scripts and have trouble getting proper quoting of command line arguments through.)</p>106<p>(Other ways are possible, e.g. using backslash: <code>JTREG=JOBS=1\;TIMEOUT=8</code>. Also, as a special technique, the string <code>%20</code> will be replaced with space for certain options, e.g. <code>JTREG=VM_OPTIONS=-XshowSettings%20-Xlog:gc+ref=debug</code>. This can be useful if you have layers of scripts and have trouble getting proper quoting of command line arguments through.)</p>
107<p>As far as possible, the names of the keywords have been standardized between test suites.</p>107<p>As far as possible, the names of the keywords have been standardized between test suites.</p>
108<h3 id="general-keywords-test_opts">General keywords (TEST_OPTS)</h3>108<h3 id="general-keywords-test_opts">General keywords (TEST_OPTS)</h3>
109<p>Some keywords are valid across different test suites. If you want to run tests from multiple test suites, or just don’t want to care which test suite specific control variable to use, then you can use the general TEST_OPTS control variable.</p>109<p>Some keywords are valid across different test suites. If you want to run tests from multiple test suites, or just don't want to care which test suite specific control variable to use, then you can use the general TEST_OPTS control variable.</p>
110<p>There are also some keywords that applies globally to the test runner system, not to any specific test suites. These are also available as TEST_OPTS keywords.</p>110<p>There are also some keywords that applies globally to the test runner system, not to any specific test suites. These are also available as TEST_OPTS keywords.</p>
111<h4 id="jobs">JOBS</h4>111<h4 id="jobs">JOBS</h4>
112<p>Currently only applies to JTReg.</p>112<p>Currently only applies to JTReg.</p>
@@ -179,11 +179,11 @@ TEST FAILURE</code></pre>
179<p>Some Client UI tests use key sequences which may be reserved by the operating system. Usually that causes the test failure. So it is highly recommended to disable system key shortcuts prior testing. The steps to access and disable system key shortcuts for various platforms are provided below.</p>179<p>Some Client UI tests use key sequences which may be reserved by the operating system. Usually that causes the test failure. So it is highly recommended to disable system key shortcuts prior testing. The steps to access and disable system key shortcuts for various platforms are provided below.</p>
180<h4 id="macos">MacOS</h4>180<h4 id="macos">MacOS</h4>
181<p>Choose Apple menu; System Preferences, click Keyboard, then click Shortcuts; select or deselect desired shortcut.</p>181<p>Choose Apple menu; System Preferences, click Keyboard, then click Shortcuts; select or deselect desired shortcut.</p>
182<p>For example, test/jdk/javax/swing/TooltipManager/JMenuItemToolTipKeyBindingsTest/JMenuItemToolTipKeyBindingsTest.java fails on MacOS because it uses <code>CTRL + F1</code> key sequence to show or hide tooltip message but the key combination is reserved by the operating system. To run the test correctly the default global key shortcut should be disabled using the steps described above, and then deselect “Turn keyboard access on or off” option which is responsible for <code>CTRL + F1</code> combination.</p>182<p>For example, test/jdk/javax/swing/TooltipManager/JMenuItemToolTipKeyBindingsTest/JMenuItemToolTipKeyBindingsTest.java fails on MacOS because it uses <code>CTRL + F1</code> key sequence to show or hide tooltip message but the key combination is reserved by the operating system. To run the test correctly the default global key shortcut should be disabled using the steps described above, and then deselect &quot;Turn keyboard access on or off&quot; option which is responsible for <code>CTRL + F1</code> combination.</p>
183<h4 id="linux">Linux</h4>183<h4 id="linux">Linux</h4>
184<p>Open the Activities overview and start typing Settings; Choose Settings, click Devices, then click Keyboard; set or override desired shortcut.</p>184<p>Open the Activities overview and start typing Settings; Choose Settings, click Devices, then click Keyboard; set or override desired shortcut.</p>
185<h4 id="windows">Windows</h4>185<h4 id="windows">Windows</h4>
186<p>Type <code>gpedit</code> in the Search and then click Edit group policy; navigate to User Configuration -&gt; Administrative Templates -&gt; Windows Components -&gt; File Explorer; in the right-side pane look for “Turn off Windows key hotkeys” and double click on it; enable or disable hotkeys.</p>186<p>Type <code>gpedit</code> in the Search and then click Edit group policy; navigate to User Configuration -&gt; Administrative Templates -&gt; Windows Components -&gt; File Explorer; in the right-side pane look for &quot;Turn off Windows key hotkeys&quot; and double click on it; enable or disable hotkeys.</p>
187<p>Note: restart is required to make the settings take effect.</p>187<p>Note: restart is required to make the settings take effect.</p>
188</body>188</body>
189</html>189</html>
diff --git a/make/Bundles.gmk b/make/Bundles.gmk
index 56d7dc8..81a1688 100644
--- a/make/Bundles.gmk
+++ b/make/Bundles.gmk
@@ -36,7 +36,7 @@ DOCS_TARGETS :=
36# On Windows tar frequently complains that "file changed as we read it" for36# On Windows tar frequently complains that "file changed as we read it" for
37# some random source files. This seems to be cause by anti virus scanners and37# some random source files. This seems to be cause by anti virus scanners and
38# is most likely safe to ignore. When it happens, tar returns '1'.38# is most likely safe to ignore. When it happens, tar returns '1'.
39ifeq ($(OPENJDK_BUILD_OS), windows)39ifeq ($(call isBuildOs, windows), true)
40 TAR_IGNORE_EXIT_VALUE := || test "$$$$?" = "1"40 TAR_IGNORE_EXIT_VALUE := || test "$$$$?" = "1"
41endif41endif
4242
@@ -156,7 +156,7 @@ endef
156156
157# On Macosx, we bundle up the macosx specific images which already have the157# On Macosx, we bundle up the macosx specific images which already have the
158# correct base directories.158# correct base directories.
159ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release)159ifeq ($(call isTargetOs, macosx)+$(DEBUG_LEVEL), true+release)
160 JDK_IMAGE_DIR := $(JDK_MACOSX_BUNDLE_DIR)160 JDK_IMAGE_DIR := $(JDK_MACOSX_BUNDLE_DIR)
161 JRE_IMAGE_DIR := $(JRE_MACOSX_BUNDLE_DIR)161 JRE_IMAGE_DIR := $(JRE_MACOSX_BUNDLE_DIR)
162 JDK_IMAGE_HOMEDIR := $(JDK_MACOSX_CONTENTS_DIR)/Home162 JDK_IMAGE_HOMEDIR := $(JDK_MACOSX_CONTENTS_DIR)/Home
@@ -208,7 +208,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
208208
209 # Create special filter rules when dealing with unzipped .dSYM directories on209 # Create special filter rules when dealing with unzipped .dSYM directories on
210 # macosx210 # macosx
211 ifeq ($(OPENJDK_TARGET_OS), macosx)211 ifeq ($(call isTargetOs, macosx), true)
212 ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false)212 ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
213 JDK_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \213 JDK_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
214 $(call containing, .dSYM/, $(patsubst $(JDK_IMAGE_DIR)/%, %, \214 $(call containing, .dSYM/, $(patsubst $(JDK_IMAGE_DIR)/%, %, \
@@ -288,16 +288,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
288 $(SYMBOLS_EXCLUDE_PATTERN), \288 $(SYMBOLS_EXCLUDE_PATTERN), \
289 $(ALL_JRE_FILES))289 $(ALL_JRE_FILES))
290290
291 # On Macosx release builds, when there is a code signing certificate available,291 ifeq ($(MACOSX_CODESIGN_MODE), hardened)
292 # the final bundle layout can be signed.
293 SIGN_BUNDLE := false
294 ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release)
295 ifneq ($(CODESIGN), )
296 SIGN_BUNDLE := true
297 endif
298 endif
299
300 ifeq ($(SIGN_BUNDLE), true)
301 # Macosx release build and code signing available.292 # Macosx release build and code signing available.
302293
303 ################################################################################294 ################################################################################
diff --git a/make/CompileDemos.gmk b/make/CompileDemos.gmk
index 64ecf48..74c54ce 100644
--- a/make/CompileDemos.gmk
+++ b/make/CompileDemos.gmk
@@ -234,7 +234,7 @@ $(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%: $(DEMO_SHARE_SRC)/nbproject/%
234 $(call install-file)234 $(call install-file)
235 $(CHMOD) -f ug+w $@235 $(CHMOD) -f ug+w $@
236236
237ifeq ($(OPENJDK_TARGET_OS), solaris)237ifeq ($(call isTargetOs, solaris), true)
238 TARGETS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \238 TARGETS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
239 $(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%, \239 $(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%, \
240 $(call FindFiles, $(DEMO_SHARE_SRC)/nbproject))240 $(call FindFiles, $(DEMO_SHARE_SRC)/nbproject))
diff --git a/make/CompileJavaModules.gmk b/make/CompileJavaModules.gmk
index 40c7e06..46fb9b4 100644
--- a/make/CompileJavaModules.gmk
+++ b/make/CompileJavaModules.gmk
@@ -51,21 +51,18 @@ java.base_EXCLUDES += java/lang/doc-files
51# data files and shouldn't go in the product51# data files and shouldn't go in the product
52java.base_EXCLUDE_FILES += sun/text/resources/BreakIteratorRules.java52java.base_EXCLUDE_FILES += sun/text/resources/BreakIteratorRules.java
5353
54ifneq ($(OPENJDK_TARGET_OS), solaris)54ifeq ($(call isTargetOs, solaris), false)
55 java.base_EXCLUDE_FILES += \55 java.base_EXCLUDE_FILES += \
56 SolarisLoginModule.java \56 SolarisLoginModule.java \
57 SolarisSystem.java \57 SolarisSystem.java \
58 #58 #
59endif59endif
6060
61ifeq ($(filter $(OPENJDK_TARGET_OS), solaris macosx aix), )61ifeq ($(call isTargetOs, solaris macosx aix), false)
62 #
63 # only solaris, macosx and aix
64 #
65 java.base_EXCLUDE_FILES += sun/nio/fs/PollingWatchService.java62 java.base_EXCLUDE_FILES += sun/nio/fs/PollingWatchService.java
66endif63endif
6764
68ifeq ($(OPENJDK_TARGET_OS), windows)65ifeq ($(call isTargetOs, windows), true)
69 java.base_EXCLUDE_FILES += \66 java.base_EXCLUDE_FILES += \
70 sun/nio/ch/SimpleAsynchronousFileChannelImpl.java \67 sun/nio/ch/SimpleAsynchronousFileChannelImpl.java \
71 #68 #
@@ -124,7 +121,7 @@ java.desktop_EXCLUDE_FILES += \
124 .template \121 .template \
125 #122 #
126123
127ifeq ($(OPENJDK_TARGET_OS), macosx)124ifeq ($(call isTargetOs, macosx), true)
128 # exclude all X11 on Mac.125 # exclude all X11 on Mac.
129 java.desktop_EXCLUDES += \126 java.desktop_EXCLUDES += \
130 sun/awt/X11 \127 sun/awt/X11 \
@@ -186,7 +183,7 @@ else
186 sun/awt/X11/XwcTextItem.java183 sun/awt/X11/XwcTextItem.java
187endif184endif
188185
189ifeq ($(OPENJDK_TARGET_OS), windows)186ifeq ($(call isTargetOs, windows), true)
190 java.desktop_EXCLUDES += com/sun/java/swing/plaf/gtk187 java.desktop_EXCLUDES += com/sun/java/swing/plaf/gtk
191endif188endif
192189
@@ -194,8 +191,7 @@ ifdef BUILD_HEADLESS_ONLY
194 java.desktop_EXCLUDES += sun/applet191 java.desktop_EXCLUDES += sun/applet
195endif192endif
196193
197# Used on windows and macosx194ifeq ($(call isTargetOs, windows macosx), false)
198ifeq ($(filter $(OPENJDK_TARGET_OS), windows macosx), )
199 java.desktop_EXCLUDE_FILES += sun/awt/AWTCharset.java195 java.desktop_EXCLUDE_FILES += sun/awt/AWTCharset.java
200endif196endif
201197
@@ -374,11 +370,11 @@ SCTP_IMPL_CLASSES = \
374 $(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SendFailed.java \370 $(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SendFailed.java \
375 $(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/Shutdown.java371 $(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/Shutdown.java
376372
377ifeq ($(OPENJDK_TARGET_OS), macosx)373ifeq ($(call isTargetOs, macosx), true)
378 jdk.sctp_EXCLUDE_FILES += $(SCTP_IMPL_CLASSES)374 jdk.sctp_EXCLUDE_FILES += $(SCTP_IMPL_CLASSES)
379endif375endif
380376
381ifeq ($(OPENJDK_TARGET_OS),aix)377ifeq ($(call isTargetOs, aix), true)
382 jdk.sctp_EXCLUDE_FILES += $(SCTP_IMPL_CLASSES)378 jdk.sctp_EXCLUDE_FILES += $(SCTP_IMPL_CLASSES)
383endif379endif
384380
diff --git a/make/CopyImportModules.gmk b/make/CopyImportModules.gmk
index e71d29c..34baaf9 100644
--- a/make/CopyImportModules.gmk
+++ b/make/CopyImportModules.gmk
@@ -38,7 +38,7 @@ CONF_DIR := $(wildcard $(addsuffix /$(MODULE), $(IMPORT_MODULES_CONF)))
38$(call FillFindCache, $(LIBS_DIR) $(CMDS_DIR) $(CONF_DIR))38$(call FillFindCache, $(LIBS_DIR) $(CMDS_DIR) $(CONF_DIR))
3939
40ifneq ($(LIBS_DIR), )40ifneq ($(LIBS_DIR), )
41 ifeq ($(OPENJDK_TARGET_OS), windows)41 ifeq ($(call isTargetOs, windows), true)
42 TO_BIN_FILTER := %$(SHARED_LIBRARY_SUFFIX) %.diz %.pdb %.map42 TO_BIN_FILTER := %$(SHARED_LIBRARY_SUFFIX) %.diz %.pdb %.map
4343
44 $(eval $(call SetupCopyFiles, COPY_LIBS_TO_BIN, \44 $(eval $(call SetupCopyFiles, COPY_LIBS_TO_BIN, \
diff --git a/make/CreateJmods.gmk b/make/CreateJmods.gmk
index de068ec..f0e152b 100644
--- a/make/CreateJmods.gmk
+++ b/make/CreateJmods.gmk
@@ -165,7 +165,7 @@ ifeq ($(MODULE), java.base)
165 endif165 endif
166 endif166 endif
167else # not java.base167else # not java.base
168 ifeq ($(OPENJDK_TARGET_OS), windows)168 ifeq ($(call isTargetOs, windows), true)
169 # Only java.base needs to include the MSVC*_DLLs. Make sure no other module169 # Only java.base needs to include the MSVC*_DLLs. Make sure no other module
170 # tries to include them (typically imported ones).170 # tries to include them (typically imported ones).
171 ifneq ($(MSVCR_DLL), )171 ifneq ($(MSVCR_DLL), )
diff --git a/make/Images.gmk b/make/Images.gmk
index 524f76d..2c9f0b8 100644
--- a/make/Images.gmk
+++ b/make/Images.gmk
@@ -255,7 +255,7 @@ ifneq ($(filter jdk, $(MAKECMDGOALS)), )
255 )255 )
256256
257 ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true)257 ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true)
258 ifeq ($(OPENJDK_TARGET_OS), macosx)258 ifeq ($(call isTargetOs, macosx), true)
259 DEMO_FILES := $(call not-containing, .dSYM, $(DEMO_FILES))259 DEMO_FILES := $(call not-containing, .dSYM, $(DEMO_FILES))
260 else260 else
261 DEMO_FILES := $(filter-out %.debuginfo %.pdb %.map, $(DEMO_FILES))261 DEMO_FILES := $(filter-out %.debuginfo %.pdb %.map, $(DEMO_FILES))
@@ -296,7 +296,7 @@ ALL_JDK_MODULES := $(JDK_MODULES)
296ALL_JRE_MODULES := $(sort $(JRE_MODULES), $(foreach m, $(JRE_MODULES), \296ALL_JRE_MODULES := $(sort $(JRE_MODULES), $(foreach m, $(JRE_MODULES), \
297 $(call FindTransitiveDepsForModule, $m)))297 $(call FindTransitiveDepsForModule, $m)))
298298
299ifeq ($(OPENJDK_TARGET_OS), windows)299ifeq ($(call isTargetOs, windows), true)
300 LIBS_TARGET_SUBDIR := bin300 LIBS_TARGET_SUBDIR := bin
301else301else
302 LIBS_TARGET_SUBDIR := lib302 LIBS_TARGET_SUBDIR := lib
@@ -316,7 +316,7 @@ else
316 DEBUGINFO_SUFFIXES := .debuginfo .pdb .map316 DEBUGINFO_SUFFIXES := .debuginfo .pdb .map
317 # On Macosx, if debug symbols have not been zipped, find all files inside *.dSYM317 # On Macosx, if debug symbols have not been zipped, find all files inside *.dSYM
318 # dirs.318 # dirs.
319 ifeq ($(OPENJDK_TARGET_OS), macosx)319 ifeq ($(call isTargetOs, macosx), true)
320 $(call FillFindCache, \320 $(call FillFindCache, \
321 $(SUPPORT_OUTPUTDIR)/modules_libs $(SUPPORT_OUTPUTDIR)/modules_cmds)321 $(SUPPORT_OUTPUTDIR)/modules_libs $(SUPPORT_OUTPUTDIR)/modules_cmds)
322 FindDebuginfoFiles = \322 FindDebuginfoFiles = \
diff --git a/make/Init.gmk b/make/Init.gmk
index 6897c34..3ed4678 100644
--- a/make/Init.gmk
+++ b/make/Init.gmk
@@ -226,6 +226,9 @@ else # HAS_SPEC=true
226 # Parse COMPARE_BUILD (for makefile development)226 # Parse COMPARE_BUILD (for makefile development)
227 $(eval $(call ParseCompareBuild))227 $(eval $(call ParseCompareBuild))
228228
229 # Setup reproducible build environment
230 $(eval $(call SetupReproducibleBuild))
231
229 # If no LOG= was given on command line, but we have a non-standard default232 # If no LOG= was given on command line, but we have a non-standard default
230 # value, use that instead and re-parse log level.233 # value, use that instead and re-parse log level.
231 ifeq ($(LOG), )234 ifeq ($(LOG), )
diff --git a/make/InitSupport.gmk b/make/InitSupport.gmk
index baefc89..df175a1 100644
--- a/make/InitSupport.gmk
+++ b/make/InitSupport.gmk
@@ -303,6 +303,15 @@ else # $(HAS_SPEC)=true
303 topdir=$(TOPDIR)303 topdir=$(TOPDIR)
304 endif304 endif
305305
306 # Setup the build environment to match the requested specification on
307 # level of reproducible builds
308 define SetupReproducibleBuild
309 ifeq ($$(SOURCE_DATE), updated)
310 SOURCE_DATE := $$(shell $$(DATE) +"%s")
311 endif
312 export SOURCE_DATE_EPOCH := $$(SOURCE_DATE)
313 endef
314
306 # Parse COMPARE_BUILD into COMPARE_BUILD_*315 # Parse COMPARE_BUILD into COMPARE_BUILD_*
307 # Syntax: COMPARE_BUILD=CONF=<configure options>:PATCH=<patch file>:316 # Syntax: COMPARE_BUILD=CONF=<configure options>:PATCH=<patch file>:
308 # MAKE=<make targets>:COMP_OPTS=<compare script options>:317 # MAKE=<make targets>:COMP_OPTS=<compare script options>:
@@ -479,7 +488,7 @@ else # $(HAS_SPEC)=true
479 $(TOUCH) $(SJAVAC_SERVER_DIR)/server.port.stop; true488 $(TOUCH) $(SJAVAC_SERVER_DIR)/server.port.stop; true
480 endef489 endef
481490
482 ifeq ($(OPENJDK_BUILD_OS), windows)491 ifeq ($(call isBuildOs, windows), true)
483 # On windows we need to synchronize with the javac server to be able to492 # On windows we need to synchronize with the javac server to be able to
484 # move or remove the build output directory. Since we have no proper493 # move or remove the build output directory. Since we have no proper
485 # synchronization process, wait for a while and hope it helps. This is only494 # synchronization process, wait for a while and hope it helps. This is only
diff --git a/make/MacBundles.gmk b/make/MacBundles.gmk
index 5a5394d..45d0c78 100644
--- a/make/MacBundles.gmk
+++ b/make/MacBundles.gmk
@@ -30,7 +30,7 @@ include TextFileProcessing.gmk
30default: bundles30default: bundles
3131
32# Only macosx has bundles defined.32# Only macosx has bundles defined.
33ifeq ($(OPENJDK_TARGET_OS), macosx)33ifeq ($(call isTargetOs, macosx), true)
3434
35 bundles: jre-bundle jdk-bundle35 bundles: jre-bundle jdk-bundle
3636
diff --git a/make/Main.gmk b/make/Main.gmk
index 6b4b0ac..5a48954 100644
--- a/make/Main.gmk
+++ b/make/Main.gmk
@@ -1123,7 +1123,7 @@ ifneq ($(CREATE_BUILDJDK), true)
1123 endif1123 endif
1124endif1124endif
11251125
1126ifeq ($(OPENJDK_TARGET_OS), macosx)1126ifeq ($(call isTargetOs, macosx), true)
1127 product-images: mac-jdk-bundle1127 product-images: mac-jdk-bundle
11281128
1129 legacy-images: mac-legacy-jre-bundle1129 legacy-images: mac-legacy-jre-bundle
diff --git a/make/ModuleWrapper.gmk b/make/ModuleWrapper.gmk
index 5f9c5fc..54bf26e 100644
--- a/make/ModuleWrapper.gmk
+++ b/make/ModuleWrapper.gmk
@@ -42,7 +42,7 @@ TARGETS :=
42include $(MAKEFILE_PREFIX)-$(MODULE).gmk42include $(MAKEFILE_PREFIX)-$(MODULE).gmk
4343
44# Setup copy rules from the modules directories to the jdk image directory.44# Setup copy rules from the modules directories to the jdk image directory.
45ifeq ($(OPENJDK_TARGET_OS), windows)45ifeq ($(call isTargetOs, windows), true)
46 TO_BIN_FILTER := %$(SHARED_LIBRARY_SUFFIX) %.diz %.pdb %.map46 TO_BIN_FILTER := %$(SHARED_LIBRARY_SUFFIX) %.diz %.pdb %.map
4747
48 $(eval $(call SetupCopyFiles, COPY_LIBS_TO_BIN, \48 $(eval $(call SetupCopyFiles, COPY_LIBS_TO_BIN, \
diff --git a/make/RunTests.gmk b/make/RunTests.gmk
index 0c998c2..1c9778e 100644
--- a/make/RunTests.gmk
+++ b/make/RunTests.gmk
@@ -61,7 +61,7 @@ define SetTestOpt
61endef61endef
6262
63# Setup _NT_SYMBOL_PATH on Windows, which points to our pdb files.63# Setup _NT_SYMBOL_PATH on Windows, which points to our pdb files.
64ifeq ($(OPENJDK_TARGET_OS), windows)64ifeq ($(call isTargetOs, windows), true)
65 ifndef _NT_SYMBOL_PATH65 ifndef _NT_SYMBOL_PATH
66 SYMBOL_PATH := $(call PathList, $(sort $(patsubst %/, %, $(dir $(wildcard \66 SYMBOL_PATH := $(call PathList, $(sort $(patsubst %/, %, $(dir $(wildcard \
67 $(addprefix $(SYMBOLS_IMAGE_DIR)/bin/, *.pdb */*.pdb))))))67 $(addprefix $(SYMBOLS_IMAGE_DIR)/bin/, *.pdb */*.pdb))))))
@@ -200,7 +200,7 @@ TEST_JOBS_FACTOR_MACHINE ?= 1
200200
201ifeq ($(TEST_JOBS), 0)201ifeq ($(TEST_JOBS), 0)
202 CORES_DIVIDER := 2202 CORES_DIVIDER := 2
203 ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)203 ifeq ($(call isTargetCpuArch, sparc), true)
204 # For smaller SPARC machines we see reasonable scaling of throughput up to204 # For smaller SPARC machines we see reasonable scaling of throughput up to
205 # cpus/4 without affecting test reliability. On the bigger machines, cpus/4205 # cpus/4 without affecting test reliability. On the bigger machines, cpus/4
206 # causes intermittent timeouts.206 # causes intermittent timeouts.
@@ -632,7 +632,7 @@ define SetupRunJtregTestBody
632 $1_JTREG_MAX_RAM_PERCENTAGE := $$(shell $(AWK) 'BEGIN { print 25 / $$($1_JTREG_JOBS); }')632 $1_JTREG_MAX_RAM_PERCENTAGE := $$(shell $(AWK) 'BEGIN { print 25 / $$($1_JTREG_JOBS); }')
633633
634 # SPARC is in general slower per core so need to scale up timeouts a bit.634 # SPARC is in general slower per core so need to scale up timeouts a bit.
635 ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)635 ifeq ($(call isTargetCpuArch, sparc), true)
636 JTREG_TIMEOUT_FACTOR ?= 8636 JTREG_TIMEOUT_FACTOR ?= 8
637 else637 else
638 JTREG_TIMEOUT_FACTOR ?= 4638 JTREG_TIMEOUT_FACTOR ?= 4
@@ -673,7 +673,7 @@ define SetupRunJtregTestBody
673 $1_JTREG_BASIC_OPTIONS += -e:JDK8_HOME=$$(BOOT_JDK)673 $1_JTREG_BASIC_OPTIONS += -e:JDK8_HOME=$$(BOOT_JDK)
674 # If running on Windows, propagate the _NT_SYMBOL_PATH to enable674 # If running on Windows, propagate the _NT_SYMBOL_PATH to enable
675 # symbol lookup in hserr files675 # symbol lookup in hserr files
676 ifeq ($$(OPENJDK_TARGET_OS), windows)676 ifeq ($$(call isTargetOs, windows), true)
677 $1_JTREG_BASIC_OPTIONS += -e:_NT_SYMBOL_PATH677 $1_JTREG_BASIC_OPTIONS += -e:_NT_SYMBOL_PATH
678 endif678 endif
679679
diff --git a/make/TestImage.gmk b/make/TestImage.gmk
index d5ef69f..552dce0 100644
--- a/make/TestImage.gmk
+++ b/make/TestImage.gmk
@@ -37,8 +37,8 @@ FIXPATH_ECHO := $(FIXPATH) $(call FixPath, $(ECHO))
37$(BUILD_INFO_PROPERTIES):37$(BUILD_INFO_PROPERTIES):
38 $(call MakeTargetDir)38 $(call MakeTargetDir)
39 $(ECHO) "# Build info properties for JDK tests" > $@39 $(ECHO) "# Build info properties for JDK tests" > $@
40 $(ECHO) "build.workspace.root=$(call FixPath, $(WORKSPACE_ROOT))" >> $@40 $(ECHO) 'build.workspace.root=$(call FixPath, $(WORKSPACE_ROOT))' >> $@
41 $(ECHO) "build.output.root=$(call FixPath, $(OUTPUTDIR))" >> $@41 $(ECHO) 'build.output.root=$(call FixPath, $(OUTPUTDIR))' >> $@
4242
43prepare-test-image: $(BUILD_INFO_PROPERTIES)43prepare-test-image: $(BUILD_INFO_PROPERTIES)
44 $(call MakeDir, $(TEST_IMAGE_DIR))44 $(call MakeDir, $(TEST_IMAGE_DIR))
diff --git a/make/ZipSecurity.gmk b/make/ZipSecurity.gmk
index ba56641..cbe1e21 100644
--- a/make/ZipSecurity.gmk
+++ b/make/ZipSecurity.gmk
@@ -70,7 +70,7 @@ TARGETS += $(IMAGES_OUTPUTDIR)/sec-bin.zip
70#70#
71# Windows specific binary security packages.71# Windows specific binary security packages.
72#72#
73ifeq ($(OPENJDK_TARGET_OS), windows)73ifeq ($(call isTargetOs, windows), true)
74 # sec-windows-bin.zip is used by builds where the corresponding sources are not available74 # sec-windows-bin.zip is used by builds where the corresponding sources are not available
75 $(eval $(call SetupZipArchive,BUILD_SEC_WINDOWS_BIN_ZIP, \75 $(eval $(call SetupZipArchive,BUILD_SEC_WINDOWS_BIN_ZIP, \
76 SRC := $(JDK_OUTPUTDIR), \76 SRC := $(JDK_OUTPUTDIR), \
@@ -80,7 +80,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
80 TARGETS += $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip80 TARGETS += $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip
8181
82 # JGSS files contain the native Kerberos library82 # JGSS files contain the native Kerberos library
83 ifeq ($(OPENJDK_TARGET_CPU), x86_64)83 ifeq ($(call isTargetCpu, x86_64), true)
84 JGSS_ZIP_NAME = jgss-windows-x64-bin.zip84 JGSS_ZIP_NAME = jgss-windows-x64-bin.zip
85 else85 else
86 JGSS_ZIP_NAME = jgss-windows-i586-bin.zip86 JGSS_ZIP_NAME = jgss-windows-i586-bin.zip
diff --git a/make/ZipSource.gmk b/make/ZipSource.gmk
index b4aabda..ff29a05 100644
--- a/make/ZipSource.gmk
+++ b/make/ZipSource.gmk
@@ -1,5 +1,5 @@
1#1#
2# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.2# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#4#
5# This code is free software; you can redistribute it and/or modify it5# This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,7 @@ include JavaCompilation.gmk
31include Modules.gmk31include Modules.gmk
3232
33SRC_ZIP_WORK_DIR := $(SUPPORT_OUTPUTDIR)/src33SRC_ZIP_WORK_DIR := $(SUPPORT_OUTPUTDIR)/src
34$(if $(filter $(TOPDIR)/%, $(SUPPORT_OUTPUTDIR)), $(eval SRC_ZIP_BASE := $(TOPDIR)), $(eval SRC_ZIP_BASE := $(SUPPORT_OUTPUTDIR)))
3435
35# Hook to include the corresponding custom file, if present.36# Hook to include the corresponding custom file, if present.
36$(eval $(call IncludeCustomExtension, ZipSource.gmk))37$(eval $(call IncludeCustomExtension, ZipSource.gmk))
@@ -51,10 +52,10 @@ ALL_MODULES := $(FindAllModules)
51# again to create src.zip.52# again to create src.zip.
52$(foreach m, $(ALL_MODULES), \53$(foreach m, $(ALL_MODULES), \
53 $(foreach d, $(call FindModuleSrcDirs, $m) $(call ExtraSrcDirs, $m), \54 $(foreach d, $(call FindModuleSrcDirs, $m) $(call ExtraSrcDirs, $m), \
54 $(eval $d_TARGET := $(SRC_ZIP_WORK_DIR)/$(patsubst $(TOPDIR)/%,%,$d)/$m) \55 $(eval $d_TARGET := $(SRC_ZIP_WORK_DIR)/$(patsubst $(TOPDIR)/%,%,$(patsubst $(SUPPORT_OUTPUTDIR)/%,%,$d))/$m) \
55 $(if $(SRC_GENERATED), , \56 $(if $(SRC_GENERATED), , \
56 $(eval $$($d_TARGET): $d ; \57 $(eval $$($d_TARGET): $d ; \
57 $$(if $(filter $(TOPDIR)/%, $d), $$(link-file-relative), $$(link-file-absolute)) \58 $$(if $(filter $(SRC_ZIP_BASE)/%, $d), $$(link-file-relative), $$(link-file-absolute)) \
58 ) \59 ) \
59 ) \60 ) \
60 $(eval SRC_ZIP_SRCS += $$($d_TARGET)) \61 $(eval SRC_ZIP_SRCS += $$($d_TARGET)) \
diff --git a/make/autoconf/basic.m4 b/make/autoconf/basic.m4
index a3a4e13..dc02d44 100644
--- a/make/autoconf/basic.m4
+++ b/make/autoconf/basic.m4
@@ -220,6 +220,18 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
220 [UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],$with_toolchain_path)]220 [UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],$with_toolchain_path)]
221 )221 )
222222
223 AC_ARG_WITH([xcode-path], [AS_HELP_STRING([--with-xcode-path],
224 [set up toolchain on Mac OS using a path to an Xcode installation])])
225
226 if test "x$with_xcode_path" != x; then
227 if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
228 UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],
229 $with_xcode_path/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:$with_xcode_path/Contents/Developer/usr/bin)
230 else
231 AC_MSG_WARN([Option --with-xcode-path is only valid on Mac OS, ignoring.])
232 fi
233 fi
234
223 AC_ARG_WITH([extra-path], [AS_HELP_STRING([--with-extra-path],235 AC_ARG_WITH([extra-path], [AS_HELP_STRING([--with-extra-path],
224 [prepend these directories to the default path])],236 [prepend these directories to the default path])],
225 [UTIL_PREPEND_TO_PATH([EXTRA_PATH],$with_extra_path)]237 [UTIL_PREPEND_TO_PATH([EXTRA_PATH],$with_extra_path)]
@@ -230,7 +242,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
230 # If not, detect if Xcode is installed by running xcodebuild -version242 # If not, detect if Xcode is installed by running xcodebuild -version
231 # if no Xcode installed, xcodebuild exits with 1243 # if no Xcode installed, xcodebuild exits with 1
232 # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0244 # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
233 if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then245 if test "x$DEVKIT_ROOT" != x || test "x$TOOLCHAIN_PATH" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
234 # We need to use xcodebuild in the toolchain dir provided by the user246 # We need to use xcodebuild in the toolchain dir provided by the user
235 UTIL_LOOKUP_PROGS(XCODEBUILD, xcodebuild, $TOOLCHAIN_PATH)247 UTIL_LOOKUP_PROGS(XCODEBUILD, xcodebuild, $TOOLCHAIN_PATH)
236 if test x$XCODEBUILD = x; then248 if test x$XCODEBUILD = x; then
diff --git a/make/autoconf/basic_tools.m4 b/make/autoconf/basic_tools.m4
index c39b87d..c3c48f8 100644
--- a/make/autoconf/basic_tools.m4
+++ b/make/autoconf/basic_tools.m4
@@ -156,25 +156,23 @@ AC_DEFUN([BASIC_CHECK_MAKE_VERSION],
156AC_DEFUN([BASIC_CHECK_MAKE_OUTPUT_SYNC],156AC_DEFUN([BASIC_CHECK_MAKE_OUTPUT_SYNC],
157[157[
158 # Check if make supports the output sync option and if so, setup using it.158 # Check if make supports the output sync option and if so, setup using it.
159 AC_MSG_CHECKING([if make --output-sync is supported])159 UTIL_ARG_WITH(NAME: output-sync, TYPE: literal,
160 if $MAKE --version -O > /dev/null 2>&1; then160 VALID_VALUES: [none recurse line target], DEFAULT: none,
161 OUTPUT_SYNC_SUPPORTED=true161 OPTIONAL: true, ENABLED_DEFAULT: true,
162 AC_MSG_RESULT([yes])162 ENABLED_RESULT: OUTPUT_SYNC_SUPPORTED,
163 AC_MSG_CHECKING([for output-sync value])163 CHECKING_MSG: [for make --output-sync value],
164 AC_ARG_WITH([output-sync], [AS_HELP_STRING([--with-output-sync],164 DESC: [set make --output-sync type if supported by make],
165 [set make output sync type if supported by make. @<:@recurse@:>@])],165 CHECK_AVAILABLE:
166 [OUTPUT_SYNC=$with_output_sync])166 [
167 if test "x$OUTPUT_SYNC" = "x"; then167 AC_MSG_CHECKING([if make --output-sync is supported])
168 OUTPUT_SYNC=none168 if ! $MAKE --version -O > /dev/null 2>&1; then
169 fi169 AC_MSG_RESULT([no])
170 AC_MSG_RESULT([$OUTPUT_SYNC])170 AVAILABLE=false
171 if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then171 else
172 AC_MSG_ERROR([Make did not the support the value $OUTPUT_SYNC as output sync type.])172 AC_MSG_RESULT([yes])
173 fi173 fi
174 else174 ]
175 OUTPUT_SYNC_SUPPORTED=false175 )
176 AC_MSG_RESULT([no])
177 fi
178 AC_SUBST(OUTPUT_SYNC_SUPPORTED)176 AC_SUBST(OUTPUT_SYNC_SUPPORTED)
179 AC_SUBST(OUTPUT_SYNC)177 AC_SUBST(OUTPUT_SYNC)
180])178])
@@ -371,43 +369,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
371 UTIL_REQUIRE_PROGS(MIG, mig)369 UTIL_REQUIRE_PROGS(MIG, mig)
372 UTIL_REQUIRE_PROGS(XATTR, xattr)370 UTIL_REQUIRE_PROGS(XATTR, xattr)
373 UTIL_LOOKUP_PROGS(CODESIGN, codesign)371 UTIL_LOOKUP_PROGS(CODESIGN, codesign)
374
375 if test "x$CODESIGN" != "x"; then
376 # Check for user provided code signing identity.
377 # If no identity was provided, fall back to "openjdk_codesign".
378 AC_ARG_WITH([macosx-codesign-identity], [AS_HELP_STRING([--with-macosx-codesign-identity],
379 [specify the code signing identity])],
380 [MACOSX_CODESIGN_IDENTITY=$with_macosx_codesign_identity],
381 [MACOSX_CODESIGN_IDENTITY=openjdk_codesign]
382 )
383
384 AC_SUBST(MACOSX_CODESIGN_IDENTITY)
385
386 # Verify that the codesign certificate is present
387 AC_MSG_CHECKING([if codesign certificate is present])
388 $RM codesign-testfile
389 $TOUCH codesign-testfile
390 $CODESIGN -s "$MACOSX_CODESIGN_IDENTITY" codesign-testfile 2>&AS_MESSAGE_LOG_FD \
391 >&AS_MESSAGE_LOG_FD || CODESIGN=
392 $RM codesign-testfile
393 if test "x$CODESIGN" = x; then
394 AC_MSG_RESULT([no])
395 else
396 AC_MSG_RESULT([yes])
397 # Verify that the codesign has --option runtime
398 AC_MSG_CHECKING([if codesign has --option runtime])
399 $RM codesign-testfile
400 $TOUCH codesign-testfile
401 $CODESIGN --option runtime -s "$MACOSX_CODESIGN_IDENTITY" codesign-testfile \
402 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD || CODESIGN=
403 $RM codesign-testfile
404 if test "x$CODESIGN" = x; then
405 AC_MSG_ERROR([codesign does not have --option runtime. macOS 10.13.6 and above is required.])
406 else
407 AC_MSG_RESULT([yes])
408 fi
409 fi
410 fi
411 UTIL_REQUIRE_PROGS(SETFILE, SetFile)372 UTIL_REQUIRE_PROGS(SETFILE, SetFile)
412 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then373 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
413 UTIL_REQUIRE_PROGS(ELFEDIT, elfedit)374 UTIL_REQUIRE_PROGS(ELFEDIT, elfedit)
diff --git a/make/autoconf/build-aux/config.guess b/make/autoconf/build-aux/config.guess
index 7a31eb2..a88a9ad 100644
--- a/make/autoconf/build-aux/config.guess
+++ b/make/autoconf/build-aux/config.guess
@@ -29,7 +29,40 @@
29# and fix the broken property, if needed.29# and fix the broken property, if needed.
3030
31DIR=`dirname $0`31DIR=`dirname $0`
32OUT=`. $DIR/autoconf-config.guess`32OUT=`. $DIR/autoconf-config.guess 2> /dev/null`
33
34# Handle some cases that autoconf-config.guess is not capable of
35if [ "x$OUT" = x ]; then
36 if [ `uname -s` = Linux ]; then
37 # Test and fix little endian MIPS.
38 if [ `uname -m` = mipsel ]; then
39 OUT=mipsel-unknown-linux-gnu
40 elif [ `uname -m` = mips64el ]; then
41 OUT=mips64el-unknown-linux-gnu
42 # Test and fix little endian PowerPC64.
43 elif [ `uname -m` = ppc64le ]; then
44 OUT=powerpc64le-unknown-linux-gnu
45 # Test and fix LoongArch64.
46 elif [ `uname -m` = loongarch64 ]; then
47 OUT=loongarch64-unknown-linux-gnu
48 # Test and fix RISC-V.
49 elif [ `uname -m` = riscv64 ]; then
50 OUT=riscv64-unknown-linux-gnu
51 fi
52 # Test and fix cygwin machine arch .x86_64
53 elif [[ `uname -s` = CYGWIN* ]]; then
54 if [ `uname -m` = ".x86_64" ]; then
55 OUT=x86_64-unknown-cygwin
56 fi
57 fi
58
59 if [ "x$OUT" = x ]; then
60 # Run autoconf-config.guess again to get the error message.
61 . $DIR/autoconf-config.guess > /dev/null
62 else
63 printf "guessed by custom config.guess... " >&2
64 fi
65fi
3366
34# Test and fix solaris on x86_6467# Test and fix solaris on x86_64
35echo $OUT | grep i386-pc-solaris > /dev/null 2> /dev/null68echo $OUT | grep i386-pc-solaris > /dev/null 2> /dev/null
@@ -88,36 +121,6 @@ if test $? = 0; then
88 OUT=powerpc$KERNEL_BITMODE`echo $OUT | sed -e 's/[^-]*//'`121 OUT=powerpc$KERNEL_BITMODE`echo $OUT | sed -e 's/[^-]*//'`
89fi122fi
90123
91# Test and fix little endian PowerPC64.
92# TODO: should be handled by autoconf-config.guess.
93if [ "x$OUT" = x ]; then
94 if [ `uname -m` = ppc64le ]; then
95 if [ `uname -s` = Linux ]; then
96 OUT=powerpc64le-unknown-linux-gnu
97 fi
98 fi
99fi
100
101# Test and fix little endian MIPS.
102if [ "x$OUT" = x ]; then
103 if [ `uname -s` = Linux ]; then
104 if [ `uname -m` = mipsel ]; then
105 OUT=mipsel-unknown-linux-gnu
106 elif [ `uname -m` = mips64el ]; then
107 OUT=mips64el-unknown-linux-gnu
108 fi
109 fi
110fi
111
112# Test and fix LoongArch64.
113if [ "x$OUT" = x ]; then
114 if [ `uname -s` = Linux ]; then
115 if [ `uname -m` = loongarch64 ]; then
116 OUT=loongarch64-unknown-linux-gnu
117 fi
118 fi
119fi
120
121# Test and fix cpu on macos-aarch64, uname -p reports arm, buildsys expects aarch64124# Test and fix cpu on macos-aarch64, uname -p reports arm, buildsys expects aarch64
122echo $OUT | grep arm-apple-darwin > /dev/null 2> /dev/null125echo $OUT | grep arm-apple-darwin > /dev/null 2> /dev/null
123if test $? = 0; then126if test $? = 0; then
diff --git a/make/autoconf/configure.ac b/make/autoconf/configure.ac
index c015f73..a2c0c1a 100644
--- a/make/autoconf/configure.ac
+++ b/make/autoconf/configure.ac
@@ -195,7 +195,8 @@ FLAGS_POST_TOOLCHAIN
195PLATFORM_SETUP_OPENJDK_TARGET_BITS195PLATFORM_SETUP_OPENJDK_TARGET_BITS
196PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS196PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS
197197
198# Configure flags for the tools198# Configure flags for the tools. Need to know if we should build reproducible.
199JDKOPT_SETUP_REPRODUCIBLE_BUILD
199FLAGS_SETUP_FLAGS200FLAGS_SETUP_FLAGS
200201
201# Setup debug symbols (need objcopy from the toolchain for that)202# Setup debug symbols (need objcopy from the toolchain for that)
@@ -235,6 +236,8 @@ JDKOPT_ENABLE_DISABLE_FAILURE_HANDLER
235JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST236JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST
236JDKOPT_EXCLUDE_TRANSLATIONS237JDKOPT_EXCLUDE_TRANSLATIONS
237JDKOPT_ENABLE_DISABLE_MANPAGES238JDKOPT_ENABLE_DISABLE_MANPAGES
239JDKOPT_SETUP_REPRODUCIBLE_BUILD
240JDKOPT_SETUP_MACOSX_SIGNING
238241
239###############################################################################242###############################################################################
240#243#
diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4
index 49a7c68..3c5ba9c 100644
--- a/make/autoconf/flags-cflags.m4
+++ b/make/autoconf/flags-cflags.m4
@@ -813,6 +813,18 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
813 $1_WARNING_CFLAGS_JVM="-Wno-format-zero-length -Wtype-limits -Wuninitialized"813 $1_WARNING_CFLAGS_JVM="-Wno-format-zero-length -Wtype-limits -Wuninitialized"
814 fi814 fi
815815
816 if test "x$TOOLCHAIN_TYPE" = xmicrosoft && test "x$ENABLE_REPRODUCIBLE_BUILD" = xtrue; then
817 # Enabling deterministic creates warnings if __DATE__ or __TIME__ are
818 # used, and since we are, silence that warning.
819 REPRODUCIBLE_CFLAGS="-experimental:deterministic -wd5048"
820 FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${REPRODUCIBLE_CFLAGS}],
821 PREFIX: $3,
822 IF_FALSE: [
823 REPRODUCIBLE_CFLAGS=
824 ]
825 )
826 fi
827
816 # Prevent the __FILE__ macro from generating absolute paths into the built828 # Prevent the __FILE__ macro from generating absolute paths into the built
817 # binaries. Depending on toolchain, different mitigations are possible.829 # binaries. Depending on toolchain, different mitigations are possible.
818 # * GCC and Clang of new enough versions have -fmacro-prefix-map.830 # * GCC and Clang of new enough versions have -fmacro-prefix-map.
@@ -831,6 +843,27 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
831 FILE_MACRO_CFLAGS=843 FILE_MACRO_CFLAGS=
832 ]844 ]
833 )845 )
846 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft &&
847 test "x$ENABLE_REPRODUCIBLE_BUILD" = xtrue; then
848 # There is a known issue with the pathmap if the mapping is made to the
849 # empty string. Add a minimal string "s" as prefix to work around this.
850 # PATHMAP_FLAGS is also added to LDFLAGS in flags-ldflags.m4.
851 PATHMAP_FLAGS="-pathmap:${WORKSPACE_ROOT}=s"
852 FILE_MACRO_CFLAGS="$PATHMAP_FLAGS"
853 FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${FILE_MACRO_CFLAGS}],
854 PREFIX: $3,
855 IF_FALSE: [
856 PATHMAP_FLAGS=
857 FILE_MACRO_CFLAGS=
858 ]
859 )
860 fi
861
862 AC_MSG_CHECKING([how to prevent absolute paths in output])
863 if test "x$FILE_MACRO_CFLAGS" != x; then
864 AC_MSG_RESULT([using compiler options])
865 else
866 AC_MSG_RESULT([using relative paths])
834 fi867 fi
835 fi868 fi
836 AC_SUBST(FILE_MACRO_CFLAGS)869 AC_SUBST(FILE_MACRO_CFLAGS)
@@ -839,12 +872,13 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
839 CFLAGS_JVM_COMMON="$ALWAYS_CFLAGS_JVM $ALWAYS_DEFINES_JVM \872 CFLAGS_JVM_COMMON="$ALWAYS_CFLAGS_JVM $ALWAYS_DEFINES_JVM \
840 $TOOLCHAIN_CFLAGS_JVM ${$1_TOOLCHAIN_CFLAGS_JVM} \873 $TOOLCHAIN_CFLAGS_JVM ${$1_TOOLCHAIN_CFLAGS_JVM} \
841 $OS_CFLAGS $OS_CFLAGS_JVM $CFLAGS_OS_DEF_JVM $DEBUG_CFLAGS_JVM \874 $OS_CFLAGS $OS_CFLAGS_JVM $CFLAGS_OS_DEF_JVM $DEBUG_CFLAGS_JVM \
842 $WARNING_CFLAGS $WARNING_CFLAGS_JVM $JVM_PICFLAG $FILE_MACRO_CFLAGS"875 $WARNING_CFLAGS $WARNING_CFLAGS_JVM $JVM_PICFLAG $FILE_MACRO_CFLAGS \
876 $REPRODUCIBLE_CFLAGS"
843877
844 CFLAGS_JDK_COMMON="$ALWAYS_CFLAGS_JDK $ALWAYS_DEFINES_JDK $TOOLCHAIN_CFLAGS_JDK \878 CFLAGS_JDK_COMMON="$ALWAYS_CFLAGS_JDK $ALWAYS_DEFINES_JDK $TOOLCHAIN_CFLAGS_JDK \
845 $OS_CFLAGS $CFLAGS_OS_DEF_JDK $DEBUG_CFLAGS_JDK $DEBUG_OPTIONS_FLAGS_JDK \879 $OS_CFLAGS $CFLAGS_OS_DEF_JDK $DEBUG_CFLAGS_JDK $DEBUG_OPTIONS_FLAGS_JDK \
846 $WARNING_CFLAGS $WARNING_CFLAGS_JDK $DEBUG_SYMBOLS_CFLAGS_JDK \880 $WARNING_CFLAGS $WARNING_CFLAGS_JDK $DEBUG_SYMBOLS_CFLAGS_JDK \
847 $FILE_MACRO_CFLAGS"881 $FILE_MACRO_CFLAGS $REPRODUCIBLE_CFLAGS"
848882
849 # Use ${$2EXTRA_CFLAGS} to block EXTRA_CFLAGS to be added to build flags.883 # Use ${$2EXTRA_CFLAGS} to block EXTRA_CFLAGS to be added to build flags.
850 # (Currently we don't have any OPENJDK_BUILD_EXTRA_CFLAGS, but that might884 # (Currently we don't have any OPENJDK_BUILD_EXTRA_CFLAGS, but that might
diff --git a/make/autoconf/flags-ldflags.m4 b/make/autoconf/flags-ldflags.m4
index 7d511ca..2202bb6 100644
--- a/make/autoconf/flags-ldflags.m4
+++ b/make/autoconf/flags-ldflags.m4
@@ -147,9 +147,17 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
147 fi147 fi
148 fi148 fi
149149
150 if test "x$ENABLE_REPRODUCIBLE_BUILD" = "xtrue"; then
151 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
152 REPRODUCIBLE_LDFLAGS="-experimental:deterministic"
153 fi
154 fi
155
150 if test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = "xfalse"; then156 if test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = "xfalse"; then
151 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then157 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
152 BASIC_LDFLAGS="$BASIC_LDFLAGS -pdbaltpath:%_PDB%"158 BASIC_LDFLAGS="$BASIC_LDFLAGS -pdbaltpath:%_PDB%"
159 # PATHMAP_FLAGS is setup in flags-cflags.m4.
160 FILE_MACRO_LDFLAGS="${PATHMAP_FLAGS}"
153 fi161 fi
154 fi162 fi
155163
@@ -211,13 +219,15 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_CPU_DEP],
211 LDFLAGS_JDK_COMMON="$BASIC_LDFLAGS $BASIC_LDFLAGS_JDK_ONLY \219 LDFLAGS_JDK_COMMON="$BASIC_LDFLAGS $BASIC_LDFLAGS_JDK_ONLY \
212 $OS_LDFLAGS $DEBUGLEVEL_LDFLAGS_JDK_ONLY ${$2EXTRA_LDFLAGS}"220 $OS_LDFLAGS $DEBUGLEVEL_LDFLAGS_JDK_ONLY ${$2EXTRA_LDFLAGS}"
213 $2LDFLAGS_JDKLIB="$LDFLAGS_JDK_COMMON $BASIC_LDFLAGS_JDK_LIB_ONLY \221 $2LDFLAGS_JDKLIB="$LDFLAGS_JDK_COMMON $BASIC_LDFLAGS_JDK_LIB_ONLY \
214 ${$1_LDFLAGS_JDK_LIBPATH} $SHARED_LIBRARY_FLAGS"222 ${$1_LDFLAGS_JDK_LIBPATH} $SHARED_LIBRARY_FLAGS \
223 $REPRODUCIBLE_LDFLAGS $FILE_MACRO_LDFLAGS"
215 $2LDFLAGS_JDKEXE="$LDFLAGS_JDK_COMMON $EXECUTABLE_LDFLAGS \224 $2LDFLAGS_JDKEXE="$LDFLAGS_JDK_COMMON $EXECUTABLE_LDFLAGS \
216 ${$1_CPU_EXECUTABLE_LDFLAGS}"225 ${$1_CPU_EXECUTABLE_LDFLAGS} $REPRODUCIBLE_LDFLAGS $FILE_MACRO_LDFLAGS"
217226
218 $2JVM_LDFLAGS="$BASIC_LDFLAGS $BASIC_LDFLAGS_JVM_ONLY $OS_LDFLAGS $OS_LDFLAGS_JVM_ONLY \227 $2JVM_LDFLAGS="$BASIC_LDFLAGS $BASIC_LDFLAGS_JVM_ONLY $OS_LDFLAGS $OS_LDFLAGS_JVM_ONLY \
219 $DEBUGLEVEL_LDFLAGS $DEBUGLEVEL_LDFLAGS_JVM_ONLY $BASIC_LDFLAGS_ONLYCXX \228 $DEBUGLEVEL_LDFLAGS $DEBUGLEVEL_LDFLAGS_JVM_ONLY $BASIC_LDFLAGS_ONLYCXX \
220 ${$1_CPU_LDFLAGS} ${$1_CPU_LDFLAGS_JVM_ONLY} ${$2EXTRA_LDFLAGS}"229 ${$1_CPU_LDFLAGS} ${$1_CPU_LDFLAGS_JVM_ONLY} ${$2EXTRA_LDFLAGS} \
230 $REPRODUCIBLE_LDFLAGS $FILE_MACRO_LDFLAGS"
221231
222 AC_SUBST($2LDFLAGS_JDKLIB)232 AC_SUBST($2LDFLAGS_JDKLIB)
223 AC_SUBST($2LDFLAGS_JDKEXE)233 AC_SUBST($2LDFLAGS_JDKEXE)
diff --git a/make/autoconf/flags.m4 b/make/autoconf/flags.m4
index a5b4afd..5a3ea96 100644
--- a/make/autoconf/flags.m4
+++ b/make/autoconf/flags.m4
@@ -506,14 +506,14 @@ UTIL_DEFUN_NAMED([FLAGS_CXX_COMPILER_CHECK_ARGUMENTS],
506UTIL_DEFUN_NAMED([FLAGS_COMPILER_CHECK_ARGUMENTS],506UTIL_DEFUN_NAMED([FLAGS_COMPILER_CHECK_ARGUMENTS],
507 [*ARGUMENT IF_TRUE IF_FALSE PREFIX], [$@],507 [*ARGUMENT IF_TRUE IF_FALSE PREFIX], [$@],
508[508[
509 FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARG_ARGUMENT],509 FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: ARG_ARGUMENT,
510 IF_TRUE: [C_COMP_SUPPORTS="yes"],510 IF_TRUE: [C_COMP_SUPPORTS="yes"],
511 IF_FALSE: [C_COMP_SUPPORTS="no"],511 IF_FALSE: [C_COMP_SUPPORTS="no"],
512 PREFIX: [ARG_PREFIX])512 PREFIX: ARG_PREFIX)
513 FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARG_ARGUMENT],513 FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: ARG_ARGUMENT,
514 IF_TRUE: [CXX_COMP_SUPPORTS="yes"],514 IF_TRUE: [CXX_COMP_SUPPORTS="yes"],
515 IF_FALSE: [CXX_COMP_SUPPORTS="no"],515 IF_FALSE: [CXX_COMP_SUPPORTS="no"],
516 PREFIX: [ARG_PREFIX])516 PREFIX: ARG_PREFIX)
517517
518 AC_MSG_CHECKING([if both ARG_PREFIX[CC] and ARG_PREFIX[CXX] support "ARG_ARGUMENT"])518 AC_MSG_CHECKING([if both ARG_PREFIX[CC] and ARG_PREFIX[CXX] support "ARG_ARGUMENT"])
519 supports=no519 supports=no
diff --git a/make/autoconf/jdk-options.m4 b/make/autoconf/jdk-options.m4
index 43a7b56..e67ffd4 100644
--- a/make/autoconf/jdk-options.m4
+++ b/make/autoconf/jdk-options.m4
@@ -683,3 +683,178 @@ AC_DEFUN([JDKOPT_ALLOW_ABSOLUTE_PATHS_IN_OUTPUT],
683683
684 AC_SUBST(ALLOW_ABSOLUTE_PATHS_IN_OUTPUT)684 AC_SUBST(ALLOW_ABSOLUTE_PATHS_IN_OUTPUT)
685])685])
686
687################################################################################
688#
689# Check and set options related to reproducible builds.
690#
691AC_DEFUN_ONCE([JDKOPT_SETUP_REPRODUCIBLE_BUILD],
692[
693 AC_ARG_WITH([source-date], [AS_HELP_STRING([--with-source-date],
694 [how to set SOURCE_DATE_EPOCH ('updated', 'current', 'version' a timestamp or an ISO-8601 date) @<:@updated@:>@])],
695 [with_source_date_present=true], [with_source_date_present=false])
696
697 AC_MSG_CHECKING([what source date to use])
698
699 if test "x$with_source_date" = xyes; then
700 AC_MSG_ERROR([--with-source-date must have a value])
701 elif test "x$with_source_date" = xupdated || test "x$with_source_date" = x; then
702 # Tell the makefiles to update at each build
703 SOURCE_DATE=updated
704 AC_MSG_RESULT([determined at build time, from 'updated'])
705 elif test "x$with_source_date" = xcurrent; then
706 # Set the current time
707 SOURCE_DATE=$($DATE +"%s")
708 AC_MSG_RESULT([$SOURCE_DATE, from 'current'])
709 elif test "x$with_source_date" = xversion; then
710 # Use the date from version-numbers
711 UTIL_GET_EPOCH_TIMESTAMP(SOURCE_DATE, $DEFAULT_VERSION_DATE)
712 if test "x$SOURCE_DATE" = x; then
713 AC_MSG_RESULT([unavailable])
714 AC_MSG_ERROR([Cannot convert DEFAULT_VERSION_DATE to timestamp])
715 fi
716 AC_MSG_RESULT([$SOURCE_DATE, from 'version'])
717 else
718 # It's a timestamp, an ISO-8601 date, or an invalid string
719 # Additional [] needed to keep m4 from mangling shell constructs.
720 if [ [[ "$with_source_date" =~ ^[0-9][0-9]*$ ]] ] ; then
721 SOURCE_DATE=$with_source_date
722 AC_MSG_RESULT([$SOURCE_DATE, from timestamp on command line])
723 else
724 UTIL_GET_EPOCH_TIMESTAMP(SOURCE_DATE, $with_source_date)
725 if test "x$SOURCE_DATE" != x; then
726 AC_MSG_RESULT([$SOURCE_DATE, from ISO-8601 date on command line])
727 else
728 AC_MSG_RESULT([unavailable])
729 AC_MSG_ERROR([Cannot parse date string "$with_source_date"])
730 fi
731 fi
732 fi
733
734 REPRODUCIBLE_BUILD_DEFAULT=$with_source_date_present
735
736 if test "x$OPENJDK_BUILD_OS" = xwindows && \
737 test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = xfalse; then
738 # To support banning absolute paths on Windows, we must use the -pathmap
739 # method, which requires reproducible builds.
740 REPRODUCIBLE_BUILD_DEFAULT=true
741 fi
742
743 UTIL_ARG_ENABLE(NAME: reproducible-build, DEFAULT: $REPRODUCIBLE_BUILD_DEFAULT,
744 RESULT: ENABLE_REPRODUCIBLE_BUILD,
745 DESC: [enable reproducible builds (not yet fully functional)],
746 DEFAULT_DESC: [enabled if --with-source-date is given or on Windows without absolute paths])
747
748 if test "x$OPENJDK_BUILD_OS" = xwindows && \
749 test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = xfalse && \
750 test "x$ENABLE_REPRODUCIBLE_BUILD" = xfalse; then
751 AC_MSG_NOTICE([On Windows it is not possible to combine --disable-reproducible-builds])
752 AC_MSG_NOTICE([with --disable-absolute-paths-in-output.])
753 AC_MSG_ERROR([Cannot continue])
754 fi
755
756 AC_SUBST(SOURCE_DATE)
757 AC_SUBST(ENABLE_REPRODUCIBLE_BUILD)
758])
759
760################################################################################
761#
762# Setup signing on macOS. This can either be setup to sign with a real identity
763# and enabling the hardened runtime, or it can simply add the debug entitlement
764# com.apple.security.get-task-allow without actually signing any binaries. The
765# latter is needed to be able to debug processes and dump core files on modern
766# versions of macOS. It can also be skipped completely.
767#
768# Check if codesign will run with the given parameters
769# $1: Parameters to run with
770# $2: Checking message
771# Sets CODESIGN_SUCCESS=true/false
772AC_DEFUN([JDKOPT_CHECK_CODESIGN_PARAMS],
773[
774 PARAMS="$1"
775 MESSAGE="$2"
776 CODESIGN_TESTFILE="$CONFIGURESUPPORT_OUTPUTDIR/codesign-testfile"
777 $RM "$CODESIGN_TESTFILE"
778 $TOUCH "$CODESIGN_TESTFILE"
779 CODESIGN_SUCCESS=false
780 $CODESIGN $PARAMS "$CODESIGN_TESTFILE" 2>&AS_MESSAGE_LOG_FD \
781 >&AS_MESSAGE_LOG_FD && CODESIGN_SUCCESS=true
782 $RM "$CODESIGN_TESTFILE"
783 AC_MSG_CHECKING([$MESSAGE])
784 if test "x$CODESIGN_SUCCESS" = "xtrue"; then
785 AC_MSG_RESULT([yes])
786 else
787 AC_MSG_RESULT([no])
788 fi
789])
790
791AC_DEFUN([JDKOPT_CHECK_CODESIGN_HARDENED],
792[
793 JDKOPT_CHECK_CODESIGN_PARAMS([-s "$MACOSX_CODESIGN_IDENTITY" --option runtime],
794 [if codesign with hardened runtime is possible])
795])
796
797AC_DEFUN([JDKOPT_CHECK_CODESIGN_DEBUG],
798[
799 JDKOPT_CHECK_CODESIGN_PARAMS([-s -], [if debug mode codesign is possible])
800])
801
802AC_DEFUN([JDKOPT_SETUP_MACOSX_SIGNING],
803[
804 ENABLE_CODESIGN=false
805 if test "x$OPENJDK_TARGET_OS" = "xmacosx" && test "x$CODESIGN" != "x"; then
806
807 UTIL_ARG_WITH(NAME: macosx-codesign, TYPE: literal, OPTIONAL: true,
808 VALID_VALUES: [hardened debug auto], DEFAULT: auto,
809 ENABLED_DEFAULT: true,
810 CHECKING_MSG: [for macosx code signing mode],
811 DESC: [set the macosx code signing mode (hardened, debug, auto)]
812 )
813
814 MACOSX_CODESIGN_MODE=disabled
815 if test "x$MACOSX_CODESIGN_ENABLED" = "xtrue"; then
816
817 # Check for user provided code signing identity.
818 UTIL_ARG_WITH(NAME: macosx-codesign-identity, TYPE: string,
819 DEFAULT: openjdk_codesign, CHECK_VALUE: UTIL_CHECK_STRING_NON_EMPTY,
820 DESC: [specify the macosx code signing identity],
821 CHECKING_MSG: [for macosx code signing identity]
822 )
823 AC_SUBST(MACOSX_CODESIGN_IDENTITY)
824
825 if test "x$MACOSX_CODESIGN" = "xauto"; then
826 # Only try to default to hardened signing on release builds
827 if test "x$DEBUG_LEVEL" = "xrelease"; then
828 JDKOPT_CHECK_CODESIGN_HARDENED
829 if test "x$CODESIGN_SUCCESS" = "xtrue"; then
830 MACOSX_CODESIGN_MODE=hardened
831 fi
832 fi
833 if test "x$MACOSX_CODESIGN_MODE" = "xdisabled"; then
834 JDKOPT_CHECK_CODESIGN_DEBUG
835 if test "x$CODESIGN_SUCCESS" = "xtrue"; then
836 MACOSX_CODESIGN_MODE=debug
837 fi
838 fi
839 AC_MSG_CHECKING([for macosx code signing mode])
840 AC_MSG_RESULT([$MACOSX_CODESIGN_MODE])
841 elif test "x$MACOSX_CODESIGN" = "xhardened"; then
842 JDKOPT_CHECK_CODESIGN_HARDENED
843 if test "x$CODESIGN_SUCCESS" = "xfalse"; then
844 AC_MSG_ERROR([Signing with hardened runtime is not possible])
845 fi
846 MACOSX_CODESIGN_MODE=hardened
847 elif test "x$MACOSX_CODESIGN" = "xdebug"; then
848 JDKOPT_CHECK_CODESIGN_DEBUG
849 if test "x$CODESIGN_SUCCESS" = "xfalse"; then
850 AC_MSG_ERROR([Signing in debug mode is not possible])
851 fi
852 MACOSX_CODESIGN_MODE=debug
853 else
854 AC_MSG_ERROR([unknown value for --with-macosx-codesign: $MACOSX_CODESIGN])
855 fi
856 fi
857 AC_SUBST(MACOSX_CODESIGN_IDENTITY)
858 AC_SUBST(MACOSX_CODESIGN_MODE)
859 fi
860])
diff --git a/make/autoconf/jdk-version.m4 b/make/autoconf/jdk-version.m4
index 2620b01..f0d1edf 100644
--- a/make/autoconf/jdk-version.m4
+++ b/make/autoconf/jdk-version.m4
@@ -36,7 +36,7 @@
36AC_DEFUN([JDKVER_CHECK_AND_SET_NUMBER],36AC_DEFUN([JDKVER_CHECK_AND_SET_NUMBER],
37[37[
38 # Additional [] needed to keep m4 from mangling shell constructs.38 # Additional [] needed to keep m4 from mangling shell constructs.
39 if [ ! [[ "$2" =~ ^0*([1-9][0-9]*)|(0)$ ]] ] ; then39 if [ ! [[ "$2" =~ ^0*([1-9][0-9]*)$|^0*(0)$ ]] ] ; then
40 AC_MSG_ERROR(["$2" is not a valid numerical value for $1])40 AC_MSG_ERROR(["$2" is not a valid numerical value for $1])
41 fi41 fi
42 # Extract the version number without leading zeros.42 # Extract the version number without leading zeros.
diff --git a/make/autoconf/lib-x11.m4 b/make/autoconf/lib-x11.m4
index d862c02..6ba668e 100644
--- a/make/autoconf/lib-x11.m4
+++ b/make/autoconf/lib-x11.m4
@@ -1,5 +1,5 @@
1#1#
2# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.2# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#4#
5# This code is free software; you can redistribute it and/or modify it5# This code is free software; you can redistribute it and/or modify it
@@ -103,22 +103,28 @@ AC_DEFUN_ONCE([LIB_SETUP_X11],
103 OLD_CFLAGS="$CFLAGS"103 OLD_CFLAGS="$CFLAGS"
104 CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"104 CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
105105
106 HEADERS_TO_CHECK="X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h"
107 # There is no Xrandr extension on AIX
108 if test "x$OPENJDK_TARGET_OS" != xaix; then106 if test "x$OPENJDK_TARGET_OS" != xaix; then
109 HEADERS_TO_CHECK="$HEADERS_TO_CHECK X11/extensions/Xrandr.h"107 AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h X11/extensions/Xrandr.h],
108 [X11_HEADERS_OK=yes],
109 [X11_HEADERS_OK=no; break],
110 [
111 # include <X11/Xlib.h>
112 # include <X11/Xutil.h>
113 ]
114 )
115 else
116 # There is no Xrandr extension on AIX. Code is duplicated to avoid autoconf
117 # 2.71+ warning "AC_CHECK_HEADERS: you should use literals"
118 AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h],
119 [X11_HEADERS_OK=yes],
120 [X11_HEADERS_OK=no; break],
121 [
122 # include <X11/Xlib.h>
123 # include <X11/Xutil.h>
124 ]
125 )
110 fi126 fi
111127
112 # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
113 AC_CHECK_HEADERS([$HEADERS_TO_CHECK],
114 [X11_HEADERS_OK=yes],
115 [X11_HEADERS_OK=no; break],
116 [
117 # include <X11/Xlib.h>
118 # include <X11/Xutil.h>
119 ]
120 )
121
122 if test "x$X11_HEADERS_OK" = xno; then128 if test "x$X11_HEADERS_OK" = xno; then
123 HELP_MSG_MISSING_DEPENDENCY([x11])129 HELP_MSG_MISSING_DEPENDENCY([x11])
124 AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h Xrandr.h XTest.h Intrinsic.h). $HELP_MSG])130 AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h Xrandr.h XTest.h Intrinsic.h). $HELP_MSG])
diff --git a/make/autoconf/spec.gmk.in b/make/autoconf/spec.gmk.in
index 1746be3..3787b12 100644
--- a/make/autoconf/spec.gmk.in
+++ b/make/autoconf/spec.gmk.in
@@ -126,6 +126,9 @@ RELEASE_FILE_OS_NAME:=@RELEASE_FILE_OS_NAME@
126RELEASE_FILE_OS_ARCH:=@RELEASE_FILE_OS_ARCH@126RELEASE_FILE_OS_ARCH:=@RELEASE_FILE_OS_ARCH@
127RELEASE_FILE_LIBC:=@RELEASE_FILE_LIBC@127RELEASE_FILE_LIBC:=@RELEASE_FILE_LIBC@
128128
129SOURCE_DATE := @SOURCE_DATE@
130ENABLE_REPRODUCIBLE_BUILD := @ENABLE_REPRODUCIBLE_BUILD@
131
129LIBM:=@LIBM@132LIBM:=@LIBM@
130LIBDL:=@LIBDL@133LIBDL:=@LIBDL@
131134
@@ -419,7 +422,8 @@ MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
419# The highest allowed version of macosx422# The highest allowed version of macosx
420MACOSX_VERSION_MAX=@MACOSX_VERSION_MAX@423MACOSX_VERSION_MAX=@MACOSX_VERSION_MAX@
421424
422# The macosx code signing identity to use425# The macosx code signing configuration
426MACOSX_CODESIGN_MODE:=@MACOSX_CODESIGN_MODE@
423MACOSX_CODESIGN_IDENTITY=@MACOSX_CODESIGN_IDENTITY@427MACOSX_CODESIGN_IDENTITY=@MACOSX_CODESIGN_IDENTITY@
424428
425# Toolchain type: gcc, clang, solstudio, lxc, microsoft...429# Toolchain type: gcc, clang, solstudio, lxc, microsoft...
diff --git a/make/autoconf/util.m4 b/make/autoconf/util.m4
index c768e42..7be5d52 100644
--- a/make/autoconf/util.m4
+++ b/make/autoconf/util.m4
@@ -52,7 +52,7 @@ m4_include([util_paths.m4])
52AC_DEFUN([UTIL_DEFUN_NAMED],52AC_DEFUN([UTIL_DEFUN_NAMED],
53[53[
54 AC_DEFUN($1, [54 AC_DEFUN($1, [
55 m4_foreach(arg, m4_split($2), [55 m4_foreach([arg], m4_split(m4_normalize($2)), [
56 m4_if(m4_bregexp(arg, [^\*]), -1,56 m4_if(m4_bregexp(arg, [^\*]), -1,
57 [57 [
58 m4_set_add(legal_named_args, arg)58 m4_set_add(legal_named_args, arg)
@@ -64,12 +64,18 @@ AC_DEFUN([UTIL_DEFUN_NAMED],
64 )64 )
65 ])65 ])
6666
67 m4_foreach([arg], [$3], [67 # Delicate quoting and unquoting sequence to ensure the actual value is passed along unchanged
68 m4_define(arg_name, m4_substr(arg, 0, m4_bregexp(arg, [: ])))68 # For details on how this works, see https://git.openjdk.org/jdk/pull/11458#discussion_r1038173051
69 m4_set_contains(legal_named_args, arg_name, [],[AC_MSG_ERROR([Internal error: arg_name is not a valid named argument to [$1]. Valid arguments are 'm4_set_contents(legal_named_args, [ ])'.])])69 # WARNING: Proceed at the risk of your own sanity, getting this to work has made me completely
70 # incapable of feeling love or any other positive emotion
71 # ~Julian
72 m4_foreach([arg], m4_dquote(m4_dquote_elt($3)), [
73 m4_if(m4_index(arg, [: ]), -1, [m4_define([arg], m4_dquote(m4_bpatsubst(m4_dquote(arg), [:], [: ])))])
74 m4_define(arg_name, m4_substr(arg, 0, m4_index(arg, [: ])))
75 m4_set_contains(legal_named_args, arg_name, [],[AC_MSG_ERROR([Internal error: m4_if(arg_name, , arg, arg_name) is not a valid named argument to [$1]. Valid arguments are 'm4_set_contents(defined_args, [ ]) m4_set_contents(legal_named_args, [ ])'.])])
70 m4_set_remove(required_named_args, arg_name)76 m4_set_remove(required_named_args, arg_name)
71 m4_set_remove(legal_named_args, arg_name)77 m4_set_remove(legal_named_args, arg_name)
72 m4_pushdef([ARG_][]arg_name, m4_substr(arg, m4_incr(m4_incr(m4_bregexp(arg, [: ])))))78 m4_pushdef([ARG_][]arg_name, m4_bpatsubst(m4_bpatsubst(m4_dquote(m4_dquote(arg)), arg_name[: ]), [^\s*]))
73 m4_set_add(defined_args, arg_name)79 m4_set_add(defined_args, arg_name)
74 m4_undefine([arg_name])80 m4_undefine([arg_name])
75 ])81 ])
@@ -95,6 +101,83 @@ AC_DEFUN([UTIL_DEFUN_NAMED],
95])101])
96102
97###############################################################################103###############################################################################
104# Assert that a programmatic condition holds. If not, exit with an error message.
105# Check that a shell expression gives return code 0
106#
107# $1: The shell expression to evaluate
108# $2: A message to describe the expression in case of failure
109# $2: An message to print in case of failure [optional]
110#
111AC_DEFUN([UTIL_ASSERT_SHELL_TEST],
112[
113 ASSERTION_MSG="m4_normalize([$3])"
114 if $1; then
115 $ECHO Assertion failed: $2
116 if test "x$3" != x; then
117 $ECHO Assertion message: "$3"
118 fi
119 exit 1
120 fi
121])
122
123
124###############################################################################
125# Assert that a programmatic condition holds. If not, exit with an error message.
126# Check that two strings are equal.
127#
128# $1: The actual string found
129# $2: The expected string
130# $3: An message to print in case of failure [optional]
131#
132AC_DEFUN([UTIL_ASSERT_STRING_EQUALS],
133[
134 UTIL_ASSERT_SHELL_TEST(
135 [test "x[$1]" != "x[$2]"],
136 [Actual value '[$1]' \("[$1]"\) did not match expected value '[$2]' \("[$2]"\)],
137 $3)
138])
139
140###############################################################################
141# Assert that a programmatic condition holds. If not, exit with an error message.
142# Check that two strings not are equal.
143#
144# $1: The actual string found
145# $2: The expected string
146# $3: An message to print in case of failure [optional]
147#
148AC_DEFUN([UTIL_ASSERT_STRING_NOT_EQUALS],
149[
150 UTIL_ASSERT_SHELL_TEST(
151 [test "x[$1]" = "x[$2]"],
152 [Actual value '[$1]' \("[$1]"\) unexpectedly matched '[$2]' \("[$2]"\)],
153 $3)
154])
155
156###############################################################################
157# Assert that a programmatic condition holds. If not, exit with an error message.
158# Check that the given expression evaluates to the string 'true'
159#
160# $1: The expression to evaluate
161# $2: An message to print in case of failure [optional]
162#
163AC_DEFUN([UTIL_ASSERT_TRUE],
164[
165 UTIL_ASSERT_STRING_EQUALS($1, true, $3)
166])
167
168###############################################################################
169# Assert that a programmatic condition holds. If not, exit with an error message.
170# Check that the given expression does not evaluate to the string 'true'
171#
172# $1: The expression to evaluate
173# $2: An message to print in case of failure [optional]
174#
175AC_DEFUN([UTIL_ASSERT_NOT_TRUE],
176[
177 UTIL_ASSERT_STRING_NOT_EQUALS($1, true, $3)
178])
179
180###############################################################################
98# Check if a list of space-separated words are selected only from a list of181# Check if a list of space-separated words are selected only from a list of
99# space-separated legal words. Typical use is to see if a user-specified182# space-separated legal words. Typical use is to see if a user-specified
100# set of words is selected from a set of legal words.183# set of words is selected from a set of legal words.
@@ -149,6 +232,29 @@ AC_DEFUN([UTIL_GET_MATCHING_VALUES],
149])232])
150233
151###############################################################################234###############################################################################
235# Converts an ISO-8601 date/time string to a unix epoch timestamp. If no
236# suitable conversion method was found, an empty string is returned.
237#
238# Sets the specified variable to the resulting list.
239#
240# $1: result variable name
241# $2: input date/time string
242AC_DEFUN([UTIL_GET_EPOCH_TIMESTAMP],
243[
244 timestamp=$($DATE --utc --date=$2 +"%s" 2> /dev/null)
245 if test "x$timestamp" = x; then
246 # GNU date format did not work, try BSD date options
247 timestamp=$($DATE -j -f "%F %T" "$2" "+%s" 2> /dev/null)
248 if test "x$timestamp" = x; then
249 # Perhaps the time was missing
250 timestamp=$($DATE -j -f "%F %T" "$2 00:00:00" "+%s" 2> /dev/null)
251 # If this did not work, we give up and return the empty string
252 fi
253 fi
254 $1=$timestamp
255])
256
257###############################################################################
152# Sort a space-separated list, and remove duplicates.258# Sort a space-separated list, and remove duplicates.
153#259#
154# Sets the specified variable to the resulting list.260# Sets the specified variable to the resulting list.
@@ -226,3 +332,493 @@ AC_DEFUN([UTIL_ALIASED_ARG_ENABLE],
226 translit(patsubst($2, --), -, _)="$[enable_]translit($1, -, _)"332 translit(patsubst($2, --), -, _)="$[enable_]translit($1, -, _)"
227 ])333 ])
228])334])
335
336###############################################################################
337# Creates a command-line option using the --enable-* pattern. Will return a
338# value of 'true' or 'false' in the RESULT variable, depending on whether the
339# option was enabled or not by the user. The option can not be turned on if it
340# is not available, as specified by AVAILABLE and/or CHECK_AVAILABLE.
341#
342# Arguments:
343# NAME: The base name of this option (i.e. what follows --enable-). Required.
344# RESULT: The name of the variable to set to the result. Defaults to
345# <NAME in uppercase>_ENABLED.
346# DEFAULT: The default value for this option. Can be true, false or auto.
347# Defaults to true.
348# AVAILABLE: If true, this option is allowed to be selected. Defaults to true.
349# DESC: A description of this option. Defaults to a generic and unhelpful
350# string.
351# DEFAULT_DESC: A message describing the default value, for the help. Defaults
352# to the literal value of DEFAULT.
353# CHECKING_MSG: The message to present to user when checking this option.
354# Defaults to a generic message.
355# CHECK_AVAILABLE: An optional code block to execute to determine if the
356# option should be available. Must set AVAILABLE to 'false' if not.
357# IF_GIVEN: An optional code block to execute if the option was given on the
358# command line (regardless of the value).
359# IF_NOT_GIVEN: An optional code block to execute if the option was not given
360# on the command line (regardless of the value).
361# IF_ENABLED: An optional code block to execute if the option is turned on.
362# IF_DISABLED: An optional code block to execute if the option is turned off.
363#
364UTIL_DEFUN_NAMED([UTIL_ARG_ENABLE],
365 [*NAME RESULT DEFAULT AVAILABLE DESC DEFAULT_DESC CHECKING_MSG
366 CHECK_AVAILABLE IF_GIVEN IF_NOT_GIVEN IF_ENABLED IF_DISABLED], [$@],
367[
368 ##########################
369 # Part 1: Set up m4 macros
370 ##########################
371
372 # If DEFAULT is not specified, set it to 'true'.
373 m4_define([ARG_DEFAULT], m4_if(ARG_DEFAULT, , true, ARG_DEFAULT))
374
375 # If AVAILABLE is not specified, set it to 'true'.
376 m4_define([ARG_AVAILABLE], m4_if(ARG_AVAILABLE, , true, ARG_AVAILABLE))
377
378 # If DEFAULT_DESC is not specified, calculate it from DEFAULT.
379 m4_define([ARG_DEFAULT_DESC], m4_if(ARG_DEFAULT_DESC, , m4_if(ARG_DEFAULT, true, enabled, m4_if(ARG_DEFAULT, false, disabled, ARG_DEFAULT)), ARG_DEFAULT_DESC))
380
381 # If RESULT is not specified, set it to 'ARG_NAME[_ENABLED]'.
382 m4_define([ARG_RESULT], m4_if(ARG_RESULT, , m4_translit(ARG_NAME, [a-z-], [A-Z_])[_ENABLED], ARG_RESULT))
383 # Construct shell variable names for the option
384 m4_define(ARG_OPTION, [enable_]m4_translit(ARG_NAME, [-], [_]))
385 m4_define(ARG_GIVEN, m4_translit(ARG_NAME, [a-z-], [A-Z_])[_GIVEN])
386
387 # If DESC is not specified, set it to a generic description.
388 m4_define([ARG_DESC], m4_if(m4_quote(ARG_DESC), , [[Enable the ARG_NAME feature]], [m4_normalize(ARG_DESC)]))
389
390 # If CHECKING_MSG is not specified, set it to a generic description.
391 m4_define([ARG_CHECKING_MSG], m4_if(m4_quote(ARG_CHECKING_MSG), , [[for --enable-ARG_NAME]], [m4_normalize(ARG_CHECKING_MSG)]))
392
393 # If the code blocks are not given, set them to the empty statements to avoid
394 # tripping up bash.
395 m4_if(ARG_CHECK_AVAILABLE, , [m4_define([ARG_CHECK_AVAILABLE], [:])])
396 m4_if(ARG_IF_GIVEN, , [m4_define([ARG_IF_GIVEN], [:])])
397 m4_if(ARG_IF_NOT_GIVEN, , [m4_define([ARG_IF_NOT_GIVEN], [:])])
398 m4_if(ARG_IF_ENABLED, , [m4_define([ARG_IF_ENABLED], [:])])
399 m4_if(ARG_IF_DISABLED, , [m4_define([ARG_IF_DISABLED], [:])])
400
401 ##########################
402 # Part 2: Set up autoconf shell code
403 ##########################
404
405 # Check that DEFAULT has a valid value
406 if test "[x]ARG_DEFAULT" != xtrue && test "[x]ARG_DEFAULT" != xfalse && \
407 test "[x]ARG_DEFAULT" != xauto ; then
408 AC_MSG_ERROR([Internal error: Argument DEFAULT to [UTIL_ARG_ENABLE] can only be true, false or auto, was: 'ARG_DEFAULT'])
409 fi
410
411 # Check that AVAILABLE has a valid value
412 if test "[x]ARG_AVAILABLE" != xtrue && test "[x]ARG_AVAILABLE" != xfalse; then
413 AC_MSG_ERROR([Internal error: Argument AVAILABLE to [UTIL_ARG_ENABLE] can only be true or false, was: 'ARG_AVAILABLE'])
414 fi
415
416 AC_ARG_ENABLE(ARG_NAME, AS_HELP_STRING([--enable-]ARG_NAME,
417 [ARG_DESC [ARG_DEFAULT_DESC]]), [ARG_GIVEN=true], [ARG_GIVEN=false])
418
419 # Check if the option is available
420 AVAILABLE=ARG_AVAILABLE
421 # Run the available check block (if any), which can overwrite AVAILABLE.
422 ARG_CHECK_AVAILABLE
423
424 # Check if the option should be turned on
425 AC_MSG_CHECKING(ARG_CHECKING_MSG)
426 if test x$ARG_GIVEN = xfalse; then
427 if test ARG_DEFAULT = auto; then
428 # If not given, and default is auto, set it to true iff it's available.
429 ARG_RESULT=$AVAILABLE
430 REASON="from default 'auto'"
431 else
432 ARG_RESULT=ARG_DEFAULT
433 REASON="default"
434 fi
435 else
436 if test x$ARG_OPTION = xyes; then
437 ARG_RESULT=true
438 REASON="from command line"
439 elif test x$ARG_OPTION = xno; then
440 ARG_RESULT=false
441 REASON="from command line"
442 elif test x$ARG_OPTION = xauto; then
443 if test ARG_DEFAULT = auto; then
444 # If both given and default is auto, set it to true iff it's available.
445 ARG_RESULT=$AVAILABLE
446 else
447 ARG_RESULT=ARG_DEFAULT
448 fi
449 REASON="from command line 'auto'"
450 else
451 AC_MSG_ERROR([Option [--enable-]ARG_NAME can only be 'yes', 'no' or 'auto'])
452 fi
453 fi
454
455 if test x$ARG_RESULT = xtrue; then
456 AC_MSG_RESULT([enabled, $REASON])
457 if test x$AVAILABLE = xfalse; then
458 AC_MSG_ERROR([Option [--enable-]ARG_NAME is not available])
459 fi
460 else
461 AC_MSG_RESULT([disabled, $REASON])
462 fi
463
464 # Execute result payloads, if present
465 if test x$ARG_GIVEN = xtrue; then
466 ARG_IF_GIVEN
467 else
468 ARG_IF_NOT_GIVEN
469 fi
470
471 if test x$ARG_RESULT = xtrue; then
472 ARG_IF_ENABLED
473 else
474 ARG_IF_DISABLED
475 fi
476])
477
478###############################################################################
479# Helper functions for ARG_WITH, to validate different types of argument
480
481# Dispatcher to call the correct UTIL_CHECK_TYPE_* function depending on the ARG_TYPE
482AC_DEFUN([UTIL_CHECK_TYPE],
483[
484 UTIL_CHECK_TYPE_$1($2)
485])
486
487AC_DEFUN([UTIL_CHECK_TYPE_string],
488[
489 # All strings always passes
490])
491
492AC_DEFUN([UTIL_CHECK_TYPE_integer],
493[
494 # Check that the argument is an integer
495 # Additional [] needed to keep m4 from mangling shell constructs.
496 [ if [[ ! "$1" =~ ^[0-9]+$ ]] ; then ]
497 FAILURE="Not an integer: $1"
498 fi
499])
500
501AC_DEFUN([UTIL_CHECK_TYPE_file],
502[
503 # Check that the argument is an existing file
504 if test ! -f "$1" ; then
505 FAILURE="File $1 does not exist or is not readable"
506 fi
507])
508
509AC_DEFUN([UTIL_CHECK_TYPE_directory],
510[
511 # Check that the argument is an existing directory
512 if test ! -d "$1" ; then
513 FAILURE="Directory $1 does not exist or is not readable"
514 fi
515
516 if test "[x]ARG_CHECK_FOR_FILES" != x; then
517 for file in ARG_CHECK_FOR_FILES; do
518 found_files=$($ECHO $(ls $1/$file 2> /dev/null))
519 if test "x$found_files" = x; then
520 FAILURE="Directory $1 does not contain $file"
521 break
522 elif ! test -e "$found_files"; then
523 FAILURE="Directory $1 contains multiple $file: $found_files"
524 break
525 fi
526 done
527 fi
528])
529
530AC_DEFUN([UTIL_CHECK_TYPE_literal],
531[
532 # Check if it contains a space between non-space characters
533 # Additional [] needed to keep m4 from mangling shell constructs.
534 [ if [[ "$1" =~ [^' ']' '+[^' '] ]] ; then ]
535 FAILURE="Multiple words: $1"
536 fi
537
538 # Check that the selected variants are valid
539 UTIL_GET_NON_MATCHING_VALUES(invalid_value, $1, \
540 ARG_VALID_VALUES)
541 if test "x$invalid_value" != x; then
542 FAILURE="Invalid value: $invalid_value. Valid values are: ARG_VALID_VALUES"
543 fi
544])
545
546AC_DEFUN([UTIL_CHECK_TYPE_multivalue],
547[
548 # We accept either space or comma as separator, but use space internally
549 values=`$ECHO $1 | $SED -e 's/,/ /g'`
550
551 # Check that the selected variants are valid
552 UTIL_GET_NON_MATCHING_VALUES(invalid_value, $values, \
553 ARG_VALID_VALUES)
554 if test "x$invalid_value" != x; then
555 FAILURE="Invalid value(s): $invalid_value. Valid values are: ARG_VALID_VALUES"
556 fi
557
558 # Update to version without comma
559 ARG_RESULT=$($ECHO $values)
560])
561
562AC_DEFUN([UTIL_CHECK_TYPE_features],
563[
564 # We accept either space or comma as separator, but use space internally
565 feature_list=`$ECHO $1 | $SED -e 's/,/ /g'`
566 features_enabled=`$ECHO $feature_list | \
567 $AWK '{ for (i=1; i<=NF; i++) if (!match($i, /^-.*/)) printf("%s ", $i) }'`
568 features_disabled=`$ECHO $feature_list | \
569 $AWK '{ for (i=1; i<=NF; i++) if (match($i, /^-.*/)) printf("%s ", substr($i, 2))}'`
570
571 # Check that the selected features are valid
572 UTIL_GET_NON_MATCHING_VALUES(invalid_features, $features_enabled \
573 $features_disabled, ARG_VALID_VALUES)
574 if test "x$invalid_features" != x; then
575 FAILURE="Invalid feature(s): $invalid_features. Valid values are: ARG_VALID_VALUES"
576 fi
577
578 # Update to version without comma
579 ARG_RESULT=$($ECHO $feature_list)
580])
581
582###############################################################################
583# Creates a command-line option using the --with-* pattern. Will return a
584# string in the RESULT variable with the option provided by the user, or the
585# empty string if the --with-* option was not given. The option can not be given
586# if it is not available, as specified by AVAILABLE and/or CHECK_AVAILABLE.
587#
588# Arguments:
589# NAME: The base name of this option (i.e. what follows --with-). Required.
590# TYPE: The type of the value. Can be one of "string", "integer", "file",
591# "directory", "literal", "multivalue" or "features". Required.
592# DEFAULT: The default value for this option. Can be any valid string.
593# Required.
594# OPTIONAL: If this feature can be disabled. Defaults to false. If true,
595# the feature can be disabled using --without-FOO, --with-FOO=no, or
596# --with-FOO=. Check the ENABLED_RESULT variable for the enabled/disabled
597# state.
598# RESULT: The name of the variable to set to the result. Defaults to
599# <NAME in uppercase>. Set to empty if ENABLED_RESULT is false.
600# ENABLED_DEFAULT: If the value is enabled by default. Defaults to false. Only
601# relevant if OPTIONAL is true.
602# ENABLED_RESULT: The name of the variable to set to the enabled/disabled
603# result state. Defaults to <NAME in uppercase>_ENABLED.
604# AVAILABLE: If true, this option is allowed to be selected. Defaults to true.
605# DESC: A description of this option. Defaults to a generic and unhelpful
606# string.
607# DEFAULT_DESC: A message describing the default value, for the help. Defaults
608# to the literal value of DEFAULT, or "<none>" if DEFAULT is empty.
609# CHECKING_MSG: The message to present to user when checking this option.
610# Defaults to a generic message.
611# CHECK_AVAILABLE: An optional code block to execute to determine if the
612# option should be available. Must set AVAILABLE to 'false' if not.
613# VALID_VALUES: A list of literals that are the allowed values. Only valid if
614# TYPE is "literal", "multivalue" or "features".
615# CHECK_VALUE: An optional code block to execute to determine if the value
616# is correct. Must set FAILURE to a non-empty string if not. This string
617# will be displayed. The value is given in $RESULT.
618# CHECK_FOR_FILES: A list of files to verify the presence for. Only valid if
619# TYPE is "directory". Paths are relative the directory given as value.
620# Wildcards are accepted. Exactly one matching file must be found, for each
621# listed file, or FAILURE is set.
622# IF_AUTO: An optional code block to execute if the value is "auto", either by
623# default or given by the command line. Must set RESULT to the calculated
624# value.
625# IF_GIVEN: An optional code block to execute if the option was given on the
626# command line (regardless of the value).
627# IF_NOT_GIVEN: An optional code block to execute if the option was not given
628# on the command line (regardless of the value).
629#
630UTIL_DEFUN_NAMED([UTIL_ARG_WITH],
631 [*NAME *TYPE *DEFAULT OPTIONAL RESULT ENABLED_DEFAULT ENABLED_RESULT
632 AVAILABLE DESC DEFAULT_DESC CHECKING_MSG CHECK_AVAILABLE VALID_VALUES
633 CHECK_VALUE CHECK_FOR_FILES IF_AUTO IF_GIVEN IF_NOT_GIVEN], [$@],
634[
635 ##########################
636 # Part 1: Set up m4 macros
637 ##########################
638
639 # If ENABLED_DEFAULT is not specified, set it to 'false'.
640 m4_define([ARG_ENABLED_DEFAULT], m4_if(ARG_ENABLED_DEFAULT, , false, ARG_ENABLED_DEFAULT))
641
642 # If AVAILABLE is not specified, set it to 'true'.
643 m4_define([ARG_AVAILABLE], m4_if(ARG_AVAILABLE, , true, ARG_AVAILABLE))
644
645 # If OPTIONAL is not specified, set it to 'false'.
646 m4_define([ARG_OPTIONAL], m4_if(ARG_OPTIONAL, , false, ARG_OPTIONAL))
647
648 # If DEFAULT_DESC is not specified, calculate it from DEFAULT.
649 m4_define([ARG_DEFAULT_DESC], m4_if(ARG_DEFAULT_DESC, , m4_if(ARG_DEFAULT, , <none>, ARG_DEFAULT), ARG_DEFAULT_DESC))
650
651 # If RESULT is not specified, set it to 'ARG_NAME'.
652 m4_define([ARG_RESULT], m4_if(ARG_RESULT, , m4_translit(ARG_NAME, [a-z-], [A-Z_]), ARG_RESULT))
653
654 # If ENABLED_RESULT is not specified, set it to 'ARG_NAME[_ENABLED]'.
655 m4_define([ARG_ENABLED_RESULT], m4_if(ARG_ENABLED_RESULT, , m4_translit(ARG_NAME, [a-z-], [A-Z_])[_ENABLED], ARG_ENABLED_RESULT))
656
657 # Construct shell variable names for the option
658 m4_define(ARG_OPTION, [with_]m4_translit(ARG_NAME, [-], [_]))
659 m4_define(ARG_GIVEN, m4_translit(ARG_NAME, [a-z-], [A-Z_])[_GIVEN])
660
661 # If DESC is not specified, set it to a generic description.
662 m4_define([ARG_DESC], m4_if(m4_quote(ARG_DESC), , [[Give a value for the ARG_NAME feature]], [m4_normalize(ARG_DESC)]))
663
664 # If CHECKING_MSG is not specified, set it to a generic description.
665 m4_define([ARG_CHECKING_MSG], m4_if(m4_quote(ARG_CHECKING_MSG), , [[for --with-ARG_NAME]], [m4_normalize(ARG_CHECKING_MSG)]))
666
667 m4_define([ARG_HAS_AUTO_BLOCK], m4_if(ARG_IF_AUTO, , false, true))
668
669 # If the code blocks are not given, set them to the empty statements to avoid
670 # tripping up bash.
671 m4_if(ARG_CHECK_AVAILABLE, , [m4_define([ARG_CHECK_AVAILABLE], [:])])
672 m4_if(ARG_CHECK_VALUE, , [m4_define([ARG_CHECK_VALUE], [:])])
673 m4_if(ARG_CHECK_FOR_FILES, , [m4_define([ARG_CHECK_FOR_FILES], [:])])
674 m4_if(ARG_IF_AUTO, , [m4_define([ARG_IF_AUTO], [:])])
675 m4_if(ARG_IF_GIVEN, , [m4_define([ARG_IF_GIVEN], [:])])
676 m4_if(ARG_IF_NOT_GIVEN, , [m4_define([ARG_IF_NOT_GIVEN], [:])])
677
678 ##########################
679 # Part 2: Set up autoconf shell code
680 ##########################
681
682 # Check that OPTIONAL has a valid value
683 if test "[x]ARG_OPTIONAL" != xtrue && test "[x]ARG_OPTIONAL" != xfalse ; then
684 AC_MSG_ERROR([Internal error: Argument OPTIONAL to [UTIL_ARG_WITH] can only be true or false, was: 'ARG_OPTIONAL'])
685 fi
686
687 # Check that ENABLED_DEFAULT has a valid value
688 if test "[x]ARG_ENABLED_DEFAULT" != xtrue && test "[x]ARG_ENABLED_DEFAULT" != xfalse ; then
689 AC_MSG_ERROR([Internal error: Argument ENABLED_DEFAULT to [UTIL_ARG_WITH] can only be true or false, was: 'ARG_ENABLED_DEFAULT'])
690 fi
691
692 # Check that AVAILABLE has a valid value
693 if test "[x]ARG_AVAILABLE" != xtrue && test "[x]ARG_AVAILABLE" != xfalse; then
694 AC_MSG_ERROR([Internal error: Argument AVAILABLE to [UTIL_ARG_WITH] can only be true or false, was: 'ARG_AVAILABLE'])
695 fi
696
697 # Check that TYPE has a valid value
698 # Need to assign since we can't expand ARG TYPE inside the m4 quoted if statement
699 TEST_TYPE="ARG_TYPE"
700 # Additional [] needed to keep m4 from mangling shell constructs.
701 [ if [[ ! "$TEST_TYPE" =~ ^(string|integer|file|directory|literal|multivalue|features)$ ]] ; then ]
702 AC_MSG_ERROR([Internal error: Argument TYPE to [UTIL_ARG_WITH] must be a valid type, was: 'ARG_TYPE'])
703 fi
704
705 AC_ARG_WITH(ARG_NAME, AS_HELP_STRING([--with-]ARG_NAME,
706 [ARG_DESC [ARG_DEFAULT_DESC]]), [ARG_GIVEN=true], [ARG_GIVEN=false])
707
708 # Check if the option is available
709 AVAILABLE=ARG_AVAILABLE
710 # Run the available check block (if any), which can overwrite AVAILABLE.
711 ARG_CHECK_AVAILABLE
712
713 # Check if the option should be turned on
714 AC_MSG_CHECKING(ARG_CHECKING_MSG)
715
716 if test x$AVAILABLE = xfalse; then
717 ARG_RESULT="$ARG_OPTION"
718 ARG_ENABLED_RESULT=false
719 REASON="not available"
720 else
721 if test x$ARG_GIVEN = xfalse; then
722 ARG_RESULT="ARG_DEFAULT"
723 if test "[x]ARG_OPTIONAL" = xtrue; then
724 ARG_ENABLED_RESULT=ARG_ENABLED_DEFAULT
725 else
726 ARG_ENABLED_RESULT=true
727 fi
728 REASON="default"
729
730 else # ARG_GIVEN is true
731 # Special treatment of "yes" and "no" for "--with-ARG" and "--without-ARG"
732 if test "x$ARG_OPTION" = xyes || test "x$ARG_OPTION" = xno || test "x$ARG_OPTION" = x ; then
733 if test "[x]ARG_OPTIONAL" = xfalse; then
734 if test "x$ARG_OPTION" = x; then
735 # If not optional, the empty string is a valid value
736 ARG_RESULT=""
737 ARG_ENABLED_RESULT=true
738 REASON="from command line"
739 else
740 AC_MSG_RESULT([invalid])
741 AC_MSG_ERROR([Option [--with-]ARG_NAME must have a specified value])
742 fi
743 else
744 if test "x$ARG_OPTION" = xyes; then
745 ARG_RESULT="ARG_DEFAULT"
746 ARG_ENABLED_RESULT=true
747 REASON="default as enabled from command line"
748 else
749 # For optional values, both --without-FOO and --with-FOO= disables
750 ARG_RESULT=""
751 ARG_ENABLED_RESULT=false
752 REASON="from command line"
753 fi
754 fi
755 else
756 # The most common case -- the user gives a value for the option.
757 ARG_RESULT="$ARG_OPTION"
758 ARG_ENABLED_RESULT=true
759 REASON="from command line"
760 fi
761 fi
762 fi
763
764 if test "x$ARG_ENABLED_RESULT" = xfalse; then
765 if test "x$REASON" = "xnot available"; then
766 AC_MSG_RESULT([<invalid>, $REASON])
767 if test "x$ARG_RESULT" != "x" && test "x$ARG_RESULT" != "xno" ; then
768 AC_MSG_WARN([Option [--with-]ARG_NAME is not available for this configuration])
769 fi
770 else
771 AC_MSG_RESULT([<disabled>, $REASON])
772 fi
773 ARG_RESULT=""
774 else
775 if test [x]ARG_HAS_AUTO_BLOCK = xtrue && test "x$ARG_RESULT" = xauto; then
776 # Execute "auto" payload
777 ARG_IF_AUTO
778
779 ARG_RESULT="$RESULT"
780 REASON="$REASON (calculated from 'auto')"
781 fi
782
783 if test "x$ARG_RESULT" = x; then
784 AC_MSG_RESULT([<none>, $REASON])
785 else
786 AC_MSG_RESULT([$ARG_RESULT, $REASON])
787 fi
788 fi
789
790 # Verify value
791 # First use our dispatcher to verify that type requirements are satisfied
792 UTIL_CHECK_TYPE(ARG_TYPE, $ARG_RESULT)
793
794 if test "x$FAILURE" = x; then
795 # Execute custom verification payload, if present
796 RESULT="$ARG_RESULT"
797
798 ARG_CHECK_VALUE
799
800 ARG_RESULT="$RESULT"
801 fi
802
803 if test "x$FAILURE" != x; then
804 AC_MSG_NOTICE([Invalid value for [--with-]ARG_NAME: "$ARG_RESULT"])
805 AC_MSG_NOTICE([$FAILURE])
806 AC_MSG_ERROR([Cannot continue])
807 fi
808
809 # Execute result payloads, if present
810 if test x$ARG_GIVEN = xtrue; then
811 ARG_IF_GIVEN
812 else
813 ARG_IF_NOT_GIVEN
814 fi
815])
816
817###############################################################################
818# Helper functions for CHECK_VALUE in ARG_WITH.
819AC_DEFUN([UTIL_CHECK_STRING_NON_EMPTY],
820[
821 if test "x$RESULT" = "x"; then
822 FAILURE="Value cannot be empty"
823 fi
824])
diff --git a/make/autoconf/version-numbers b/make/autoconf/version-numbers
index 83fe092..64bc19b 100644
--- a/make/autoconf/version-numbers
+++ b/make/autoconf/version-numbers
@@ -1,5 +1,5 @@
1#1#
2# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.2# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#4#
5# This code is free software; you can redistribute it and/or modify it5# This code is free software; you can redistribute it and/or modify it
@@ -28,12 +28,12 @@
2828
29DEFAULT_VERSION_FEATURE=1129DEFAULT_VERSION_FEATURE=11
30DEFAULT_VERSION_INTERIM=030DEFAULT_VERSION_INTERIM=0
31DEFAULT_VERSION_UPDATE=1831DEFAULT_VERSION_UPDATE=19
32DEFAULT_VERSION_PATCH=032DEFAULT_VERSION_PATCH=0
33DEFAULT_VERSION_EXTRA1=033DEFAULT_VERSION_EXTRA1=0
34DEFAULT_VERSION_EXTRA2=034DEFAULT_VERSION_EXTRA2=0
35DEFAULT_VERSION_EXTRA3=035DEFAULT_VERSION_EXTRA3=0
36DEFAULT_VERSION_DATE=2023-01-1736DEFAULT_VERSION_DATE=2023-04-18
37DEFAULT_VERSION_CLASSFILE_MAJOR=55 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"37DEFAULT_VERSION_CLASSFILE_MAJOR=55 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
38DEFAULT_VERSION_CLASSFILE_MINOR=038DEFAULT_VERSION_CLASSFILE_MINOR=0
39DEFAULT_ACCEPTABLE_BOOT_VERSIONS="10 11"39DEFAULT_ACCEPTABLE_BOOT_VERSIONS="10 11"
diff --git a/make/common/CopyFiles.gmk b/make/common/CopyFiles.gmk
40new file mode 10064440new file mode 100644
index 0000000..ac2ef69
--- /dev/null
+++ b/make/common/CopyFiles.gmk
@@ -0,0 +1,112 @@
1#
2# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# This code is free software; you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 2 only, as
7# published by the Free Software Foundation. Oracle designates this
8# particular file as subject to the "Classpath" exception as provided
9# by Oracle in the LICENSE file that accompanied this code.
10#
11# This code is distributed in the hope that it will be useful, but WITHOUT
12# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14# version 2 for more details (a copy is included in the LICENSE file that
15# accompanied this code).
16#
17# You should have received a copy of the GNU General Public License version
18# 2 along with this work; if not, write to the Free Software Foundation,
19# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20#
21# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22# or visit www.oracle.com if you need additional information or have any
23# questions.
24#
25
26ifeq (,$(_MAKEBASE_GMK))
27 $(error You must include MakeBase.gmk prior to including CopyFiles.gmk)
28endif
29
30################################################################################
31#
32# Code for handling the SetupCopyFiles macro.
33#
34################################################################################
35
36define AddFileToCopy
37 # Helper macro for SetupCopyFiles
38 # 1 : Source file
39 # 2 : Dest file
40 # 3 : Variable to add targets to
41 # 4 : Macro to call for copy operation
42 # 5 : Action text to log
43 $2: $1
44 $$(call LogInfo, $(strip $5) $$(patsubst $(OUTPUTDIR)/%,%,$$(call DecodeSpace, $$@)))
45 $$($$(strip $4))
46
47 $3 += $2
48 $3_SOURCES += $1
49endef
50
51# Returns the value of the first argument
52identity = \
53 $(strip $1)
54
55# Setup make rules for copying files, with an option to do more complex
56# processing instead of copying.
57#
58# Parameter 1 is the name of the rule. This name is used as variable prefix,
59# and the targets generated are listed in a variable by that name.
60#
61# The list of all source files is returned in $1_SOURCES.
62#
63# Remaining parameters are named arguments. These include:
64# SRC : Source root dir (defaults to dir of first file)
65# DEST : Dest root dir
66# FILES : List of files to copy with absolute paths, or path relative to SRC.
67# Must be in SRC.
68# FLATTEN : Set to flatten the directory structure in the DEST dir.
69# MACRO : Optionally override the default macro used for making the copy.
70# Default is 'install-file'
71# NAME_MACRO : Optionally supply a macro that rewrites the target file name
72# based on the source file name
73# LOG_ACTION : Optionally specify a different action text for log messages
74SetupCopyFiles = $(NamedParamsMacroTemplate)
75define SetupCopyFilesBody
76
77 ifeq ($$($1_MACRO), )
78 $1_MACRO := install-file
79 endif
80
81 # Default SRC to the dir of the first file.
82 ifeq ($$($1_SRC), )
83 $1_SRC := $$(dir $$(firstword $$($1_FILES)))
84 endif
85
86 ifeq ($$($1_NAME_MACRO), )
87 $1_NAME_MACRO := identity
88 endif
89
90 ifeq ($$($1_LOG_ACTION), )
91 $1_LOG_ACTION := Copying
92 endif
93
94 # Remove any trailing slash from SRC and DEST
95 $1_SRC := $$(patsubst %/,%,$$($1_SRC))
96 $1_DEST := $$(patsubst %/,%,$$($1_DEST))
97
98 # Need to wrap arguments in DoubleDollar because of the eval nested inside an
99 # eval macro body.
100 $$(foreach f, $$(patsubst $$($1_SRC)/%,%,$$($1_FILES)), \
101 $$(eval $$(call AddFileToCopy, \
102 $$(call DoubleDollar, $$($1_SRC)/$$f), \
103 $$(call DoubleDollar, \
104 $$($1_DEST)/$$(call $$(strip $$($1_NAME_MACRO)),$$(if $$($1_FLATTEN),$$(notdir $$f),$$f)) \
105 ), \
106 $1, \
107 $$($1_MACRO), \
108 $$($1_LOG_ACTION) \
109 )) \
110 )
111
112endef
diff --git a/make/common/FindTests.gmk b/make/common/FindTests.gmk
index 35a9e20..283f93e 100644
--- a/make/common/FindTests.gmk
+++ b/make/common/FindTests.gmk
@@ -53,6 +53,7 @@ define FindJtregGroupsBody
53 -e 's/^groups\w*=//p' $1/TEST.ROOT)53 -e 's/^groups\w*=//p' $1/TEST.ROOT)
54 $1_JTREG_GROUP_FILES := $$(addprefix $1/, $$($1_JTREG_GROUP_FILENAMES))54 $1_JTREG_GROUP_FILES := $$(addprefix $1/, $$($1_JTREG_GROUP_FILENAMES))
55 $1_JTREG_TEST_GROUPS := $$(strip $$(shell $$(SED) -n \55 $1_JTREG_TEST_GROUPS := $$(strip $$(shell $$(SED) -n \
56 -e 's/^\#.*//g' \
56 -e 's/\([^ ]*\)\w*=.*/\1/gp' $$(wildcard $$($1_JTREG_GROUP_FILES)) \57 -e 's/\([^ ]*\)\w*=.*/\1/gp' $$(wildcard $$($1_JTREG_GROUP_FILES)) \
57 | $$(SORT) -u))58 | $$(SORT) -u))
58 endif59 endif
diff --git a/make/common/MakeBase.gmk b/make/common/MakeBase.gmk
index a96edc2..dd81ba3 100644
--- a/make/common/MakeBase.gmk
+++ b/make/common/MakeBase.gmk
@@ -1,5 +1,5 @@
1#1#
2# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.2# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#4#
5# This code is free software; you can redistribute it and/or modify it5# This code is free software; you can redistribute it and/or modify it
@@ -75,17 +75,17 @@ ifeq (4.0, $(firstword $(sort 4.0 $(MAKE_VERSION))))
75 RWILDCARD_WORKS := true75 RWILDCARD_WORKS := true
76endif76endif
7777
78##############################
79# Functions
80##############################
8178
82### Debug functions79# For convenience, MakeBase.gmk continues to include these separate files, at
80# least for now.
8381
84# Prints the name and value of a variable82include $(TOPDIR)/make/common/Utils.gmk
85PrintVar = \83include $(TOPDIR)/make/common/MakeIO.gmk
86 $(info $(strip $1) >$($(strip $1))<)84include $(TOPDIR)/make/common/CopyFiles.gmk
8785
88### Functions for timers86################################################################################
87# Functions for timers
88################################################################################
8989
90# Store the build times in this directory.90# Store the build times in this directory.
91BUILDTIMESDIR=$(OUTPUTDIR)/make-support/build-times91BUILDTIMESDIR=$(OUTPUTDIR)/make-support/build-times
@@ -122,227 +122,6 @@ define TargetExit
122endef122endef
123123
124################################################################################124################################################################################
125# This macro translates $ into \$ to protect the $ from expansion in the shell.
126# To make this macro resilient against already escaped strings, first remove
127# any present escapes before escaping so that no double escapes are added.
128EscapeDollar = $(subst $$,\$$,$(subst \$$,$$,$(strip $1)))
129
130################################################################################
131# This macro works just like EscapeDollar above, but for #.
132EscapeHash = $(subst \#,\\\#,$(subst \\\#,\#,$(strip $1)))
133
134################################################################################
135# This macro translates $ into $$ to protect the string from make itself.
136DoubleDollar = $(subst $$,$$$$,$(strip $1))
137
138################################################################################
139# ListPathsSafely can be used to print command parameters to a file. This is
140# typically done if the command line lenght risk being too long for the
141# OS/shell. In later make versions, the file function can be used for this
142# purpose. For earlier versions, a more complex implementation is provided.
143#
144# The function ListPathsSafely can be called either directly or, more commonly
145# from a recipe line. If called from a recipe, it will be executed in the
146# evaluation phase of that recipe, which means that it will write to the file
147# before any other line in the recipe has been run.
148ifeq ($(HAS_FILE_FUNCTION), true)
149 # Param 1 - Name of variable containing paths/arguments to output
150 # Param 2 - File to print to
151 # Param 3 - Set to true to append to file instead of overwriting
152 define ListPathsSafely
153 $$(call MakeDir, $$(dir $$(strip $2)))
154 $$(file $$(if $$(filter true, $$(strip $3)),>>,>) \
155 $$(strip $2),$$(subst $$(SPACE),$$(NEWLINE),$$(strip $$($$(strip $1)))))
156 endef
157
158else # HAS_FILE_FUNCTION = false
159
160 $(eval compress_paths = \
161 $(strip $(shell $(CAT) $(TOPDIR)/make/common/support/ListPathsSafely-pre-compress.incl)))
162 compress_paths += \
163 $(subst $(TOPDIR),X97, \
164 $(subst $(OUTPUTDIR),X98, \
165 $(subst X,X00, \
166 $(subst $(SPACE),\n,$(strip $1)))))
167 $(eval compress_paths += \
168 $(strip $(shell $(CAT) $(TOPDIR)/make/common/support/ListPathsSafely-post-compress.incl)))
169
170 decompress_paths=$(SED) -f $(TOPDIR)/make/common/support/ListPathsSafely-uncompress.sed \
171 -e 's|X99|\\n|g' \
172 -e 's|X98|$(OUTPUTDIR)|g' -e 's|X97|$(TOPDIR)|g' \
173 -e 's|X00|X|g'
174
175 ListPathsSafely_IfPrintf = \
176 $(if $(word $3,$($(strip $1))), \
177 $(shell $(PRINTF) -- "$(strip $(call EscapeDollar, \
178 $(call compress_paths, $(wordlist $3,$4,$($(strip $1))))))\n" \
179 | $(decompress_paths) >> $2))
180
181 # Param 1 - Name of variable containing paths/arguments to output
182 # Param 2 - File to print to
183 # Param 3 - Set to true to append to file instead of overwriting
184 define ListPathsSafely
185 ifneq (,$$(word 30001,$$($$(strip $1))))
186 $$(error Cannot list safely more than 30000 paths. $1 has $$(words $$($$(strip $1))) paths!)
187 endif
188 $$(call MakeDir, $$(dir $2))
189 ifneq ($$(strip $3), true)
190 $$(shell $(RM) $$(strip $2))
191 endif
192
193 $$(call ListPathsSafely_IfPrintf,$1,$2,1,250)
194 $$(call ListPathsSafely_IfPrintf,$1,$2,251,500)
195 $$(call ListPathsSafely_IfPrintf,$1,$2,501,750)
196 $$(call ListPathsSafely_IfPrintf,$1,$2,751,1000)
197
198 $$(call ListPathsSafely_IfPrintf,$1,$2,1001,1250)
199 $$(call ListPathsSafely_IfPrintf,$1,$2,1251,1500)
200 $$(call ListPathsSafely_IfPrintf,$1,$2,1501,1750)
201 $$(call ListPathsSafely_IfPrintf,$1,$2,1751,2000)
202
203 $$(call ListPathsSafely_IfPrintf,$1,$2,2001,2250)
204 $$(call ListPathsSafely_IfPrintf,$1,$2,2251,2500)
205 $$(call ListPathsSafely_IfPrintf,$1,$2,2501,2750)
206 $$(call ListPathsSafely_IfPrintf,$1,$2,2751,3000)
207
208 $$(call ListPathsSafely_IfPrintf,$1,$2,3001,3250)
209 $$(call ListPathsSafely_IfPrintf,$1,$2,3251,3500)
210 $$(call ListPathsSafely_IfPrintf,$1,$2,3501,3750)
211 $$(call ListPathsSafely_IfPrintf,$1,$2,3751,4000)
212
213 $$(call ListPathsSafely_IfPrintf,$1,$2,4001,4250)
214 $$(call ListPathsSafely_IfPrintf,$1,$2,4251,4500)
215 $$(call ListPathsSafely_IfPrintf,$1,$2,4501,4750)
216 $$(call ListPathsSafely_IfPrintf,$1,$2,4751,5000)
217
218 $$(call ListPathsSafely_IfPrintf,$1,$2,5001,5250)
219 $$(call ListPathsSafely_IfPrintf,$1,$2,5251,5500)
220 $$(call ListPathsSafely_IfPrintf,$1,$2,5501,5750)
221 $$(call ListPathsSafely_IfPrintf,$1,$2,5751,6000)
222
223 $$(call ListPathsSafely_IfPrintf,$1,$2,6001,6250)
224 $$(call ListPathsSafely_IfPrintf,$1,$2,6251,6500)
225 $$(call ListPathsSafely_IfPrintf,$1,$2,6501,6750)
226 $$(call ListPathsSafely_IfPrintf,$1,$2,6751,7000)
227
228 $$(call ListPathsSafely_IfPrintf,$1,$2,7001,7250)
229 $$(call ListPathsSafely_IfPrintf,$1,$2,7251,7500)
230 $$(call ListPathsSafely_IfPrintf,$1,$2,7501,7750)
231 $$(call ListPathsSafely_IfPrintf,$1,$2,7751,8000)
232
233 $$(call ListPathsSafely_IfPrintf,$1,$2,8001,8250)
234 $$(call ListPathsSafely_IfPrintf,$1,$2,8251,8500)
235 $$(call ListPathsSafely_IfPrintf,$1,$2,8501,8750)
236 $$(call ListPathsSafely_IfPrintf,$1,$2,8751,9000)
237
238 $$(call ListPathsSafely_IfPrintf,$1,$2,9001,9250)
239 $$(call ListPathsSafely_IfPrintf,$1,$2,9251,9500)
240 $$(call ListPathsSafely_IfPrintf,$1,$2,9501,9750)
241 $$(call ListPathsSafely_IfPrintf,$1,$2,9751,10000)
242
243 $$(call ListPathsSafely_IfPrintf,$1,$2,10001,10250)
244 $$(call ListPathsSafely_IfPrintf,$1,$2,10251,10500)
245 $$(call ListPathsSafely_IfPrintf,$1,$2,10501,10750)
246 $$(call ListPathsSafely_IfPrintf,$1,$2,10751,11000)
247
248 $$(call ListPathsSafely_IfPrintf,$1,$2,11001,11250)
249 $$(call ListPathsSafely_IfPrintf,$1,$2,11251,11500)
250 $$(call ListPathsSafely_IfPrintf,$1,$2,11501,11750)
251 $$(call ListPathsSafely_IfPrintf,$1,$2,11751,12000)
252
253 $$(call ListPathsSafely_IfPrintf,$1,$2,12001,12250)
254 $$(call ListPathsSafely_IfPrintf,$1,$2,12251,12500)
255 $$(call ListPathsSafely_IfPrintf,$1,$2,12501,12750)
256 $$(call ListPathsSafely_IfPrintf,$1,$2,12751,13000)
257
258 $$(call ListPathsSafely_IfPrintf,$1,$2,13001,13250)
259 $$(call ListPathsSafely_IfPrintf,$1,$2,13251,13500)
260 $$(call ListPathsSafely_IfPrintf,$1,$2,13501,13750)
261 $$(call ListPathsSafely_IfPrintf,$1,$2,13751,14000)
262
263 $$(call ListPathsSafely_IfPrintf,$1,$2,14001,14250)
264 $$(call ListPathsSafely_IfPrintf,$1,$2,14251,14500)
265 $$(call ListPathsSafely_IfPrintf,$1,$2,14501,14750)
266 $$(call ListPathsSafely_IfPrintf,$1,$2,14751,15000)
267
268 $$(call ListPathsSafely_IfPrintf,$1,$2,15001,15250)
269 $$(call ListPathsSafely_IfPrintf,$1,$2,15251,15500)
270 $$(call ListPathsSafely_IfPrintf,$1,$2,15501,15750)
271 $$(call ListPathsSafely_IfPrintf,$1,$2,15751,16000)
272
273 $$(call ListPathsSafely_IfPrintf,$1,$2,16001,16250)
274 $$(call ListPathsSafely_IfPrintf,$1,$2,16251,16500)
275 $$(call ListPathsSafely_IfPrintf,$1,$2,16501,16750)
276 $$(call ListPathsSafely_IfPrintf,$1,$2,16751,17000)
277
278 $$(call ListPathsSafely_IfPrintf,$1,$2,17001,17250)
279 $$(call ListPathsSafely_IfPrintf,$1,$2,17251,17500)
280 $$(call ListPathsSafely_IfPrintf,$1,$2,17501,17750)
281 $$(call ListPathsSafely_IfPrintf,$1,$2,17751,18000)
282
283 $$(call ListPathsSafely_IfPrintf,$1,$2,18001,18250)
284 $$(call ListPathsSafely_IfPrintf,$1,$2,18251,18500)
285 $$(call ListPathsSafely_IfPrintf,$1,$2,18501,18750)
286 $$(call ListPathsSafely_IfPrintf,$1,$2,18751,19000)
287
288 $$(call ListPathsSafely_IfPrintf,$1,$2,19001,19250)
289 $$(call ListPathsSafely_IfPrintf,$1,$2,19251,19500)
290 $$(call ListPathsSafely_IfPrintf,$1,$2,19501,19750)
291 $$(call ListPathsSafely_IfPrintf,$1,$2,19751,20000)
292
293 $$(call ListPathsSafely_IfPrintf,$1,$2,20001,20250)
294 $$(call ListPathsSafely_IfPrintf,$1,$2,20251,20500)
295 $$(call ListPathsSafely_IfPrintf,$1,$2,20501,20750)
296 $$(call ListPathsSafely_IfPrintf,$1,$2,20751,21000)
297
298 $$(call ListPathsSafely_IfPrintf,$1,$2,21001,21250)
299 $$(call ListPathsSafely_IfPrintf,$1,$2,21251,21500)
300 $$(call ListPathsSafely_IfPrintf,$1,$2,21501,21750)
301 $$(call ListPathsSafely_IfPrintf,$1,$2,21751,22000)
302
303 $$(call ListPathsSafely_IfPrintf,$1,$2,22001,22250)
304 $$(call ListPathsSafely_IfPrintf,$1,$2,22251,22500)
305 $$(call ListPathsSafely_IfPrintf,$1,$2,22501,22750)
306 $$(call ListPathsSafely_IfPrintf,$1,$2,22751,23000)
307
308 $$(call ListPathsSafely_IfPrintf,$1,$2,23001,23250)
309 $$(call ListPathsSafely_IfPrintf,$1,$2,23251,23500)
310 $$(call ListPathsSafely_IfPrintf,$1,$2,23501,23750)
311 $$(call ListPathsSafely_IfPrintf,$1,$2,23751,24000)
312
313 $$(call ListPathsSafely_IfPrintf,$1,$2,24001,24250)
314 $$(call ListPathsSafely_IfPrintf,$1,$2,24251,24500)
315 $$(call ListPathsSafely_IfPrintf,$1,$2,24501,24750)
316 $$(call ListPathsSafely_IfPrintf,$1,$2,24751,25000)
317
318 $$(call ListPathsSafely_IfPrintf,$1,$2,25001,25250)
319 $$(call ListPathsSafely_IfPrintf,$1,$2,25251,25500)
320 $$(call ListPathsSafely_IfPrintf,$1,$2,25501,25750)
321 $$(call ListPathsSafely_IfPrintf,$1,$2,25751,26000)
322
323 $$(call ListPathsSafely_IfPrintf,$1,$2,26001,26250)
324 $$(call ListPathsSafely_IfPrintf,$1,$2,26251,26500)
325 $$(call ListPathsSafely_IfPrintf,$1,$2,26501,26750)
326 $$(call ListPathsSafely_IfPrintf,$1,$2,26751,27000)
327
328 $$(call ListPathsSafely_IfPrintf,$1,$2,27001,27250)
329 $$(call ListPathsSafely_IfPrintf,$1,$2,27251,27500)
330 $$(call ListPathsSafely_IfPrintf,$1,$2,27501,27750)
331 $$(call ListPathsSafely_IfPrintf,$1,$2,27751,28000)
332
333 $$(call ListPathsSafely_IfPrintf,$1,$2,28001,28250)
334 $$(call ListPathsSafely_IfPrintf,$1,$2,28251,28500)
335 $$(call ListPathsSafely_IfPrintf,$1,$2,28501,28750)
336 $$(call ListPathsSafely_IfPrintf,$1,$2,28751,29000)
337
338 $$(call ListPathsSafely_IfPrintf,$1,$2,29001,29250)
339 $$(call ListPathsSafely_IfPrintf,$1,$2,29251,29500)
340 $$(call ListPathsSafely_IfPrintf,$1,$2,29501,29750)
341 $$(call ListPathsSafely_IfPrintf,$1,$2,29751,30000)
342 endef
343endif # HAS_FILE_FUNCTION
344
345################################################################################
346125
347# A file containing a way to uniquely identify the source code revision that126# A file containing a way to uniquely identify the source code revision that
348# the build was created from127# the build was created from
@@ -414,21 +193,6 @@ endef
414$(eval $(call SetupLogging))193$(eval $(call SetupLogging))
415194
416################################################################################195################################################################################
417# Creates a sequence of increasing numbers (inclusive).
418# Param 1 - starting number
419# Param 2 - ending number
420sequence = \
421 $(wordlist $1, $2, $(strip \
422 $(eval SEQUENCE_COUNT :=) \
423 $(call _sequence-do,$(strip $2))))
424
425_sequence-do = \
426 $(if $(word $1, $(SEQUENCE_COUNT)),, \
427 $(eval SEQUENCE_COUNT += .) \
428 $(words $(SEQUENCE_COUNT)) \
429 $(call _sequence-do,$1))
430
431################################################################################
432196
433MAX_PARAMS := 36197MAX_PARAMS := 36
434PARAM_SEQUENCE := $(call sequence, 2, $(MAX_PARAMS))198PARAM_SEQUENCE := $(call sequence, 2, $(MAX_PARAMS))
@@ -470,16 +234,6 @@ define NamedParamsMacroTemplate
470endef234endef
471235
472################################################################################236################################################################################
473# Replace question marks with space in string. This macro needs to be called on
474# files from FindFiles in case any of them contains space in their file name,
475# since FindFiles replaces space with ?.
476# Param 1 - String to replace in
477DecodeSpace = \
478 $(subst ?,$(SPACE),$(strip $1))
479EncodeSpace = \
480 $(subst $(SPACE),?,$(strip $1))
481
482################################################################################
483# Make directory without forking mkdir if not needed.237# Make directory without forking mkdir if not needed.
484#238#
485# If a directory with an encoded space is provided, the wildcard function239# If a directory with an encoded space is provided, the wildcard function
@@ -507,16 +261,9 @@ MakeTargetDir = \
507 $(call MakeDir, $(dir $(call EncodeSpace, $@)))261 $(call MakeDir, $(dir $(call EncodeSpace, $@)))
508262
509################################################################################263################################################################################
510# Assign a variable only if it is empty
511# Param 1 - Variable to assign
512# Param 2 - Value to assign
513SetIfEmpty = \
514 $(if $($(strip $1)),,$(eval $(strip $1) := $2))
515
516################################################################################
517# All install-file and related macros automatically call DecodeSpace when needed.264# All install-file and related macros automatically call DecodeSpace when needed.
518265
519ifeq ($(OPENJDK_TARGET_OS),solaris)266ifeq ($(call isTargetOs, solaris), true)
520 # On Solaris, if the target is a symlink and exists, cp won't overwrite.267 # On Solaris, if the target is a symlink and exists, cp won't overwrite.
521 # Cp has to operate in recursive mode to allow for -P flag, to preserve soft links. If the268 # Cp has to operate in recursive mode to allow for -P flag, to preserve soft links. If the
522 # name of the target file differs from the source file, rename after copy.269 # name of the target file differs from the source file, rename after copy.
@@ -542,7 +289,7 @@ ifeq ($(OPENJDK_TARGET_OS),solaris)
542 $(CP) -f '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'; \289 $(CP) -f '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'; \
543 fi290 fi
544 endef291 endef
545else ifeq ($(OPENJDK_TARGET_OS),macosx)292else ifeq ($(call isTargetOs, macosx), true)
546 # On mac, extended attributes sometimes creep into the source files, which may later293 # On mac, extended attributes sometimes creep into the source files, which may later
547 # cause the creation of ._* files which confuses testing. Clear these with xattr if294 # cause the creation of ._* files which confuses testing. Clear these with xattr if
548 # set. Some files get their write permissions removed after being copied to the295 # set. Some files get their write permissions removed after being copied to the
@@ -581,113 +328,40 @@ define install-file-nolink
581endef328endef
582329
583################################################################################330################################################################################
584# Take two paths and return the path of the last common directory.
585# Ex: /foo/bar/baz, /foo/bar/banan -> /foo/bar
586# foo/bar/baz, /foo/bar -> <empty>
587#
588# The x prefix is used to preserve the presence of the initial slash
589#
590# $1 - Path to compare
591# $2 - Other path to compare
592FindCommonPathPrefix = \
593 $(patsubst x%,%,$(subst $(SPACE),/,$(strip \
594 $(call FindCommonPathPrefixHelper, \
595 $(subst /,$(SPACE),x$(strip $1)), $(subst /,$(SPACE),x$(strip $2))) \
596 )))
597
598FindCommonPathPrefixHelper = \
599 $(if $(call equals, $(firstword $1), $(firstword $2)), \
600 $(firstword $1) \
601 $(call FindCommonPathPrefixHelper, \
602 $(wordlist 2, $(words $1), $1), $(wordlist 2, $(words $2), $2) \
603 ) \
604 )
605
606# Convert a partial path into as many directory levels of ../, removing
607# leading and following /.
608# Ex: foo/bar/baz/ -> ../../..
609# foo/bar -> ../..
610# /foo -> ..
611DirToDotDot = \
612 $(subst $(SPACE),/,$(foreach d, $(subst /,$(SPACE),$1),..))
613
614# Computes the relative path from a directory to a file
615# $1 - File to compute the relative path to
616# $2 - Directory to compute the relative path from
617RelativePath = \
618 $(eval $1_prefix := $(call FindCommonPathPrefix, $1, $2)) \
619 $(eval $1_dotdots := $(call DirToDotDot, $(patsubst $($(strip $1)_prefix)%, %, $2))) \
620 $(eval $1_dotdots := $(if $($(strip $1)_dotdots),$($(strip $1)_dotdots),.)) \
621 $(eval $1_suffix := $(patsubst $($(strip $1)_prefix)/%, %, $1)) \
622 $($(strip $1)_dotdots)/$($(strip $1)_suffix)
623
624################################################################################
625# link-file-* works similarly to install-file but creates a symlink instead.331# link-file-* works similarly to install-file but creates a symlink instead.
626# There are two versions, either creating a relative or an absolute link. Be332# There are two versions, either creating a relative or an absolute link. Be
627# careful when using this on Windows since the symlink created is only valid in333# careful when using this on Windows since the symlink created is only valid in
628# the unix emulation environment.334# the unix emulation environment.
629define link-file-relative335# In msys2 we use mklink /J because its ln would perform a deep copy of the target.
336# This inhibits performance and can lead to issues with long paths. With mklink /J
337# relative linking does not work, so we handle the link as absolute path.
338ifeq ($(OPENJDK_BUILD_OS_ENV), windows.msys2)
339 define link-file-relative
340 $(call MakeTargetDir)
341 $(RM) '$(call DecodeSpace, $@)'
342 cmd //c "mklink /J $(call FixPath, $(call DecodeSpace, $@)) $(call FixPath, $(call DecodeSpace, $<))"
343 endef
344else
345 define link-file-relative
630 $(call MakeTargetDir)346 $(call MakeTargetDir)
631 $(RM) '$(call DecodeSpace, $@)'347 $(RM) '$(call DecodeSpace, $@)'
632 $(LN) -s '$(call DecodeSpace, $(call RelativePath, $<, $(@D)))' '$(call DecodeSpace, $@)'348 $(LN) -s '$(call DecodeSpace, $(call RelativePath, $<, $(@D)))' '$(call DecodeSpace, $@)'
633endef349 endef
350endif
634351
635define link-file-absolute352ifeq ($(OPENJDK_BUILD_OS_ENV), windows.msys2)
353 define link-file-absolute
354 $(call MakeTargetDir)
355 $(RM) '$(call DecodeSpace, $@)'
356 cmd //c "mklink /J $(call FixPath, $(call DecodeSpace, $@)) $(call FixPath, $(call DecodeSpace, $<))"
357 endef
358else
359 define link-file-absolute
636 $(call MakeTargetDir)360 $(call MakeTargetDir)
637 $(RM) '$(call DecodeSpace, $@)'361 $(RM) '$(call DecodeSpace, $@)'
638 $(LN) -s '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'362 $(LN) -s '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'
639endef363 endef
640364endif
641################################################################################
642# Filter out duplicate sub strings while preserving order. Keeps the first occurance.
643uniq = \
644 $(strip $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1))))
645
646# Returns all whitespace-separated words in $2 where at least one of the
647# whitespace-separated words in $1 is a substring.
648containing = \
649 $(strip \
650 $(foreach v,$(strip $2),\
651 $(call uniq,$(foreach p,$(strip $1),$(if $(findstring $p,$v),$v)))))
652
653# Returns all whitespace-separated words in $2 where none of the
654# whitespace-separated words in $1 is a substring.
655not-containing = \
656 $(strip $(filter-out $(call containing,$1,$2),$2))
657
658# Return a list of all string elements that are duplicated in $1.
659dups = \
660 $(strip $(foreach v, $(sort $1), $(if $(filter-out 1, \
661 $(words $(filter $v, $1))), $v)))
662
663# String equals
664equals = \
665 $(and $(findstring $(strip $1),$(strip $2)),\
666 $(findstring $(strip $2),$(strip $1)))
667
668# Remove a whole list of prefixes
669# $1 - List of prefixes
670# $2 - List of elements to process
671remove-prefixes = \
672 $(strip $(if $1,$(patsubst $(firstword $1)%,%,\
673 $(call remove-prefixes,$(filter-out $(firstword $1),$1),$2)),$2))
674
675# Convert the string given to upper case, without any $(shell)
676# Inspired by http://lists.gnu.org/archive/html/help-make/2013-09/msg00009.html
677uppercase_table := a,A b,B c,C d,D e,E f,F g,G h,H i,I j,J k,K l,L m,M n,N o,O \
678 p,P q,Q r,R s,S t,T u,U v,V w,W x,X y,Y z,Z
679
680uppercase_internal = \
681 $(if $(strip $1), $$(subst $(firstword $1), $(call uppercase_internal, \
682 $(wordlist 2, $(words $1), $1), $2)), $2)
683
684# Convert a string to upper case. Works only on a-z.
685# $1 - The string to convert
686uppercase = \
687 $(strip \
688 $(eval uppercase_result := $(call uppercase_internal, $(uppercase_table), $1)) \
689 $(uppercase_result) \
690 )
691365
692################################################################################366################################################################################
693367
@@ -804,144 +478,6 @@ else
804endif478endif
805479
806################################################################################480################################################################################
807
808define AddFileToCopy
809 # Helper macro for SetupCopyFiles
810 # 1 : Source file
811 # 2 : Dest file
812 # 3 : Variable to add targets to
813 # 4 : Macro to call for copy operation
814 # 5 : Action text to log
815 $2: $1
816 $$(call LogInfo, $(strip $5) $$(patsubst $(OUTPUTDIR)/%,%,$$(call DecodeSpace, $$@)))
817 $$($$(strip $4))
818
819 $3 += $2
820 $3_SOURCES += $1
821endef
822
823# Returns the value of the first argument
824identity = \
825 $(strip $1)
826
827# Setup make rules for copying files, with an option to do more complex
828# processing instead of copying.
829#
830# Parameter 1 is the name of the rule. This name is used as variable prefix,
831# and the targets generated are listed in a variable by that name.
832#
833# The list of all source files is returned in $1_SOURCES.
834#
835# Remaining parameters are named arguments. These include:
836# SRC : Source root dir (defaults to dir of first file)
837# DEST : Dest root dir
838# FILES : List of files to copy with absolute paths, or path relative to SRC.
839# Must be in SRC.
840# FLATTEN : Set to flatten the directory structure in the DEST dir.
841# MACRO : Optionally override the default macro used for making the copy.
842# Default is 'install-file'
843# NAME_MACRO : Optionally supply a macro that rewrites the target file name
844# based on the source file name
845# LOG_ACTION : Optionally specify a different action text for log messages
846SetupCopyFiles = $(NamedParamsMacroTemplate)
847define SetupCopyFilesBody
848
849 ifeq ($$($1_MACRO), )
850 $1_MACRO := install-file
851 endif
852
853 # Default SRC to the dir of the first file.
854 ifeq ($$($1_SRC), )
855 $1_SRC := $$(dir $$(firstword $$($1_FILES)))
856 endif
857
858 ifeq ($$($1_NAME_MACRO), )
859 $1_NAME_MACRO := identity
860 endif
861
862 ifeq ($$($1_LOG_ACTION), )
863 $1_LOG_ACTION := Copying
864 endif
865
866 # Remove any trailing slash from SRC and DEST
867 $1_SRC := $$(patsubst %/,%,$$($1_SRC))
868 $1_DEST := $$(patsubst %/,%,$$($1_DEST))
869
870 # Need to wrap arguments in DoubleDollar because of the eval nested inside an
871 # eval macro body.
872 $$(foreach f, $$(patsubst $$($1_SRC)/%,%,$$($1_FILES)), \
873 $$(eval $$(call AddFileToCopy, \
874 $$(call DoubleDollar, $$($1_SRC)/$$f), \
875 $$(call DoubleDollar, \
876 $$($1_DEST)/$$(call $$(strip $$($1_NAME_MACRO)),$$(if $$($1_FLATTEN),$$(notdir $$f),$$f)) \
877 ), \
878 $1, \
879 $$($1_MACRO), \
880 $$($1_LOG_ACTION) \
881 )) \
882 )
883
884endef
885
886################################################################################
887# Parse a multiple-keyword variable, like FOO="KEYWORD1=val1;KEYWORD2=val2;..."
888# These will be converted into a series of variables like FOO_KEYWORD1=val1,
889# FOO_KEYWORD2=val2, etc. Unknown keywords will cause an error.
890#
891# Parameter 1 is the name of the rule, and is also the name of the variable.
892#
893# Remaining parameters are named arguments. These include:
894# SINGLE_KEYWORDS A list of valid keywords with single string values
895# STRING_KEYWORDS A list of valid keywords, processed as string. This means
896# that '%20' will be replaced by ' ' to allow for multi-word strings.
897#
898ParseKeywordVariable = $(NamedParamsMacroTemplate)
899define ParseKeywordVariableBody
900 ifneq ($$($1), )
901 # To preserve spaces, substitute them with a hopefully unique pattern
902 # before splitting and then re-substitute spaces back.
903 $1_MANGLED := $$(subst $$(SPACE),||||,$$($1))
904 $$(foreach mangled_part, $$(subst ;, , $$($1_MANGLED)), \
905 $$(eval mangled_part_eval := $$(call DoubleDollar, $$(mangled_part))) \
906 $$(eval part := $$$$(subst ||||,$$$$(SPACE),$$$$(mangled_part_eval))) \
907 $$(eval $1_NO_MATCH := true) \
908 $$(foreach keyword, $$($1_SINGLE_KEYWORDS), \
909 $$(eval keyword_eval := $$(call DoubleDollar, $$(keyword))) \
910 $$(if $$(filter $$(keyword)=%, $$(part)), \
911 $$(eval $(strip $1)_$$$$(keyword_eval) := $$$$(strip $$$$(patsubst $$$$(keyword_eval)=%, %, $$$$(part)))) \
912 $$(eval $1_NO_MATCH := ) \
913 ) \
914 ) \
915 $$(foreach keyword, $$($1_STRING_KEYWORDS), \
916 $$(eval keyword_eval := $$(call DoubleDollar, $$(keyword))) \
917 $$(if $$(filter $$(keyword)=%, $$(part)), \
918 $$(eval $(strip $1)_$$$$(keyword_eval) := $$$$(strip $$$$(subst %20, , $$$$(patsubst $$$$(keyword_eval)=%, %, $$$$(part))))) \
919 $$(eval $1_NO_MATCH := ) \
920 ) \
921 ) \
922 $$(if $$($1_NO_MATCH), \
923 $$(if $$(filter $$(part), $$($1_SINGLE_KEYWORDS) $$($1_STRING_KEYWORDS)), \
924 $$(info Keyword $$(part) for $1 needs to be assigned a value.) \
925 , \
926 $$(info $$(part) is not a valid keyword for $1.) \
927 $$(info Valid keywords: $$($1_SINGLE_KEYWORDS) $$($1_STRING_KEYWORDS).) \
928 ) \
929 $$(error Cannot continue) \
930 ) \
931 )
932 endif
933endef
934
935################################################################################
936# ShellQuote
937#
938# Quotes a string with single quotes and replaces single quotes with '\'' so
939# that the contents survives being given to the shell.
940
941ShellQuote = \
942 $(SQUOTE)$(subst $(SQUOTE),$(SQUOTE)\$(SQUOTE)$(SQUOTE),$(strip $1))$(SQUOTE)
943
944################################################################################
945# FixPath481# FixPath
946#482#
947# On Windows, converts a path from cygwin/unix style (e.g. /bin/foo) into483# On Windows, converts a path from cygwin/unix style (e.g. /bin/foo) into
@@ -951,7 +487,7 @@ ShellQuote = \
951# list.487# list.
952# This is normally not needed since we use the FIXPATH prefix for command lines,488# This is normally not needed since we use the FIXPATH prefix for command lines,
953# but might be needed in certain circumstances.489# but might be needed in certain circumstances.
954ifeq ($(OPENJDK_TARGET_OS), windows)490ifeq ($(call isTargetOs, windows), true)
955 FixPath = \491 FixPath = \
956 $(strip $(subst \,\\, $(shell $(FIXPATH_BASE) print $(patsubst $(FIXPATH), , $1))))492 $(strip $(subst \,\\, $(shell $(FIXPATH_BASE) print $(patsubst $(FIXPATH), , $1))))
957else493else
@@ -960,35 +496,6 @@ else
960endif496endif
961497
962################################################################################498################################################################################
963# Write to and read from file
964
965# Param 1 - File to read
966ReadFile = \
967 $(shell $(CAT) $1)
968
969# Param 1 - Text to write
970# Param 2 - File to write to
971ifeq ($(HAS_FILE_FUNCTION), true)
972 WriteFile = \
973 $(file >$2,$(strip $1))
974else
975 # Use printf to get consistent behavior on all platforms.
976 WriteFile = \
977 $(shell $(PRINTF) "%s" $(call ShellQuote, $1) > $2)
978endif
979
980# Param 1 - Text to write
981# Param 2 - File to write to
982ifeq ($(HAS_FILE_FUNCTION), true)
983 AppendFile = \
984 $(file >>$2,$(strip $1))
985else
986 # Use printf to get consistent behavior on all platforms.
987 AppendFile = \
988 $(shell $(PRINTF) "%s" $(call ShellQuote, $1) >> $2)
989endif
990
991################################################################################
992# DependOnVariable499# DependOnVariable
993#500#
994# This macro takes a variable name and puts the value in a file only if the501# This macro takes a variable name and puts the value in a file only if the
@@ -1075,75 +582,6 @@ ExecuteWithLog = \
1075 exit $(DOLLAR)exitcode ) )582 exit $(DOLLAR)exitcode ) )
1076583
1077################################################################################584################################################################################
1078# Find lib dir for module
1079# Param 1 - module name
1080FindLibDirForModule = \
1081 $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
1082
1083################################################################################
1084# Find executable dir for module
1085# Param 1 - module name
1086FindExecutableDirForModule = \
1087 $(SUPPORT_OUTPUTDIR)/modules_cmds/$(strip $1)
1088
1089################################################################################
1090# Return a string suitable for use after a -classpath or --module-path option. It
1091# will be correct and safe to use on all platforms. Arguments are given as space
1092# separate classpath entries. Safe for multiple nested calls.
1093# param 1 : A space separated list of classpath entries
1094# The surrounding strip is needed to keep additional whitespace out
1095PathList = \
1096 "$(subst $(SPACE),:,$(strip $(subst $(DQUOTE),,$1)))"
1097
1098################################################################################
1099# Check if a specified hotspot variant is being built, or at least one of a
1100# list of variants. Will return 'true' or 'false'.
1101# $1 - the variant to test for
1102check-jvm-variant = \
1103 $(strip \
1104 $(if $(filter-out $(VALID_JVM_VARIANTS), $1), \
1105 $(error Internal error: Invalid variant tested: $1)) \
1106 $(if $(filter $1, $(JVM_VARIANTS)), true, false))
1107
1108################################################################################
1109# Converts a space separated list to a comma separated list.
1110#
1111# Replacing double-comma with a single comma is to workaround the issue with
1112# some version of make on windows that doesn't substitute spaces with one comma
1113# properly.
1114CommaList = \
1115 $(strip \
1116 $(subst $(COMMA)$(COMMA),$(COMMA),$(subst $(SPACE),$(COMMA),$(strip $1))) \
1117 )
1118
1119################################################################################
1120# Converts a space separated list to a colon separated list.
1121#
1122# Replacing double-colon with a single colon is to workaround the issue with
1123# some version of make on windows that doesn't substitute spaces with one colon
1124# properly.
1125ColonList = \
1126 $(strip \
1127 $(subst ::,:,$(subst $(SPACE),:,$(strip $1))) \
1128 )
1129
1130################################################################################
1131# Given a list of files, filters out locale specific files for translations
1132# that should be excluded from this build.
1133# $1 - The list of files to filter
1134# $2 - The suffix of the files that should be considered (.java or .properties)
1135FilterExcludedTranslations = \
1136 $(strip $(if $(EXCLUDE_TRANSLATIONS), \
1137 $(filter-out \
1138 $(foreach suffix, $2, \
1139 $(addprefix %_, $(addsuffix $(suffix), $(EXCLUDE_TRANSLATIONS))) \
1140 ), \
1141 $1 \
1142 ), \
1143 $1 \
1144 ))
1145
1146################################################################################
1147585
1148# Hook to include the corresponding custom file, if present.586# Hook to include the corresponding custom file, if present.
1149$(eval $(call IncludeCustomExtension, common/MakeBase.gmk))587$(eval $(call IncludeCustomExtension, common/MakeBase.gmk))
diff --git a/make/common/MakeIO.gmk b/make/common/MakeIO.gmk
1150new file mode 100644588new file mode 100644
index 0000000..342e4f5
--- /dev/null
+++ b/make/common/MakeIO.gmk
@@ -0,0 +1,272 @@
1#
2# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# This code is free software; you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 2 only, as
7# published by the Free Software Foundation. Oracle designates this
8# particular file as subject to the "Classpath" exception as provided
9# by Oracle in the LICENSE file that accompanied this code.
10#
11# This code is distributed in the hope that it will be useful, but WITHOUT
12# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14# version 2 for more details (a copy is included in the LICENSE file that
15# accompanied this code).
16#
17# You should have received a copy of the GNU General Public License version
18# 2 along with this work; if not, write to the Free Software Foundation,
19# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20#
21# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22# or visit www.oracle.com if you need additional information or have any
23# questions.
24#
25
26ifeq (,$(_MAKEBASE_GMK))
27 $(error You must include MakeBase.gmk prior to including MakeIO.gmk)
28endif
29
30################################################################################
31#
32# Functions for dealing with reading and writing from makefiles. Prior to GNU
33# Make 4.0, this was tricky business.
34#
35################################################################################
36
37
38################################################################################
39# ListPathsSafely can be used to print command parameters to a file. This is
40# typically done if the command line lenght risk being too long for the
41# OS/shell. In later make versions, the file function can be used for this
42# purpose. For earlier versions, a more complex implementation is provided.
43#
44# The function ListPathsSafely can be called either directly or, more commonly
45# from a recipe line. If called from a recipe, it will be executed in the
46# evaluation phase of that recipe, which means that it will write to the file
47# before any other line in the recipe has been run.
48ifeq ($(HAS_FILE_FUNCTION), true)
49 # Param 1 - Name of variable containing paths/arguments to output
50 # Param 2 - File to print to
51 # Param 3 - Set to true to append to file instead of overwriting
52 define ListPathsSafely
53 $$(call MakeDir, $$(dir $$(strip $2)))
54 $$(file $$(if $$(filter true, $$(strip $3)),>>,>) \
55 $$(strip $2),$$(subst $$(SPACE),$$(NEWLINE),$$(strip $$($$(strip $1)))))
56 endef
57
58else # HAS_FILE_FUNCTION = false
59
60 $(eval compress_paths = \
61 $(strip $(shell $(CAT) $(TOPDIR)/make/common/support/ListPathsSafely-pre-compress.incl)))
62 compress_paths += \
63 $(subst $(TOPDIR),X97, \
64 $(subst $(OUTPUTDIR),X98, \
65 $(subst X,X00, \
66 $(subst $(SPACE),\n,$(strip $1)))))
67 $(eval compress_paths += \
68 $(strip $(shell $(CAT) $(TOPDIR)/make/common/support/ListPathsSafely-post-compress.incl)))
69
70 decompress_paths=$(SED) -f $(TOPDIR)/make/common/support/ListPathsSafely-uncompress.sed \
71 -e 's|X99|\\n|g' \
72 -e 's|X98|$(OUTPUTDIR)|g' -e 's|X97|$(TOPDIR)|g' \
73 -e 's|X00|X|g'
74
75 ListPathsSafely_IfPrintf = \
76 $(if $(word $3,$($(strip $1))), \
77 $(shell $(PRINTF) -- "$(strip $(call EscapeDollar, \
78 $(call compress_paths, $(wordlist $3,$4,$($(strip $1))))))\n" \
79 | $(decompress_paths) >> $2))
80
81 # Param 1 - Name of variable containing paths/arguments to output
82 # Param 2 - File to print to
83 # Param 3 - Set to true to append to file instead of overwriting
84 define ListPathsSafely
85 ifneq (,$$(word 30001,$$($$(strip $1))))
86 $$(error Cannot list safely more than 30000 paths. $1 has $$(words $$($$(strip $1))) paths!)
87 endif
88 $$(call MakeDir, $$(dir $2))
89 ifneq ($$(strip $3), true)
90 $$(shell $(RM) $$(strip $2))
91 endif
92
93 $$(call ListPathsSafely_IfPrintf,$1,$2,1,250)
94 $$(call ListPathsSafely_IfPrintf,$1,$2,251,500)
95 $$(call ListPathsSafely_IfPrintf,$1,$2,501,750)
96 $$(call ListPathsSafely_IfPrintf,$1,$2,751,1000)
97
98 $$(call ListPathsSafely_IfPrintf,$1,$2,1001,1250)
99 $$(call ListPathsSafely_IfPrintf,$1,$2,1251,1500)
100 $$(call ListPathsSafely_IfPrintf,$1,$2,1501,1750)
101 $$(call ListPathsSafely_IfPrintf,$1,$2,1751,2000)
102
103 $$(call ListPathsSafely_IfPrintf,$1,$2,2001,2250)
104 $$(call ListPathsSafely_IfPrintf,$1,$2,2251,2500)
105 $$(call ListPathsSafely_IfPrintf,$1,$2,2501,2750)
106 $$(call ListPathsSafely_IfPrintf,$1,$2,2751,3000)
107
108 $$(call ListPathsSafely_IfPrintf,$1,$2,3001,3250)
109 $$(call ListPathsSafely_IfPrintf,$1,$2,3251,3500)
110 $$(call ListPathsSafely_IfPrintf,$1,$2,3501,3750)
111 $$(call ListPathsSafely_IfPrintf,$1,$2,3751,4000)
112
113 $$(call ListPathsSafely_IfPrintf,$1,$2,4001,4250)
114 $$(call ListPathsSafely_IfPrintf,$1,$2,4251,4500)
115 $$(call ListPathsSafely_IfPrintf,$1,$2,4501,4750)
116 $$(call ListPathsSafely_IfPrintf,$1,$2,4751,5000)
117
118 $$(call ListPathsSafely_IfPrintf,$1,$2,5001,5250)
119 $$(call ListPathsSafely_IfPrintf,$1,$2,5251,5500)
120 $$(call ListPathsSafely_IfPrintf,$1,$2,5501,5750)
121 $$(call ListPathsSafely_IfPrintf,$1,$2,5751,6000)
122
123 $$(call ListPathsSafely_IfPrintf,$1,$2,6001,6250)
124 $$(call ListPathsSafely_IfPrintf,$1,$2,6251,6500)
125 $$(call ListPathsSafely_IfPrintf,$1,$2,6501,6750)
126 $$(call ListPathsSafely_IfPrintf,$1,$2,6751,7000)
127
128 $$(call ListPathsSafely_IfPrintf,$1,$2,7001,7250)
129 $$(call ListPathsSafely_IfPrintf,$1,$2,7251,7500)
130 $$(call ListPathsSafely_IfPrintf,$1,$2,7501,7750)
131 $$(call ListPathsSafely_IfPrintf,$1,$2,7751,8000)
132
133 $$(call ListPathsSafely_IfPrintf,$1,$2,8001,8250)
134 $$(call ListPathsSafely_IfPrintf,$1,$2,8251,8500)
135 $$(call ListPathsSafely_IfPrintf,$1,$2,8501,8750)
136 $$(call ListPathsSafely_IfPrintf,$1,$2,8751,9000)
137
138 $$(call ListPathsSafely_IfPrintf,$1,$2,9001,9250)
139 $$(call ListPathsSafely_IfPrintf,$1,$2,9251,9500)
140 $$(call ListPathsSafely_IfPrintf,$1,$2,9501,9750)
141 $$(call ListPathsSafely_IfPrintf,$1,$2,9751,10000)
142
143 $$(call ListPathsSafely_IfPrintf,$1,$2,10001,10250)
144 $$(call ListPathsSafely_IfPrintf,$1,$2,10251,10500)
145 $$(call ListPathsSafely_IfPrintf,$1,$2,10501,10750)
146 $$(call ListPathsSafely_IfPrintf,$1,$2,10751,11000)
147
148 $$(call ListPathsSafely_IfPrintf,$1,$2,11001,11250)
149 $$(call ListPathsSafely_IfPrintf,$1,$2,11251,11500)
150 $$(call ListPathsSafely_IfPrintf,$1,$2,11501,11750)
151 $$(call ListPathsSafely_IfPrintf,$1,$2,11751,12000)
152
153 $$(call ListPathsSafely_IfPrintf,$1,$2,12001,12250)
154 $$(call ListPathsSafely_IfPrintf,$1,$2,12251,12500)
155 $$(call ListPathsSafely_IfPrintf,$1,$2,12501,12750)
156 $$(call ListPathsSafely_IfPrintf,$1,$2,12751,13000)
157
158 $$(call ListPathsSafely_IfPrintf,$1,$2,13001,13250)
159 $$(call ListPathsSafely_IfPrintf,$1,$2,13251,13500)
160 $$(call ListPathsSafely_IfPrintf,$1,$2,13501,13750)
161 $$(call ListPathsSafely_IfPrintf,$1,$2,13751,14000)
162
163 $$(call ListPathsSafely_IfPrintf,$1,$2,14001,14250)
164 $$(call ListPathsSafely_IfPrintf,$1,$2,14251,14500)
165 $$(call ListPathsSafely_IfPrintf,$1,$2,14501,14750)
166 $$(call ListPathsSafely_IfPrintf,$1,$2,14751,15000)
167
168 $$(call ListPathsSafely_IfPrintf,$1,$2,15001,15250)
169 $$(call ListPathsSafely_IfPrintf,$1,$2,15251,15500)
170 $$(call ListPathsSafely_IfPrintf,$1,$2,15501,15750)
171 $$(call ListPathsSafely_IfPrintf,$1,$2,15751,16000)
172
173 $$(call ListPathsSafely_IfPrintf,$1,$2,16001,16250)
174 $$(call ListPathsSafely_IfPrintf,$1,$2,16251,16500)
175 $$(call ListPathsSafely_IfPrintf,$1,$2,16501,16750)
176 $$(call ListPathsSafely_IfPrintf,$1,$2,16751,17000)
177
178 $$(call ListPathsSafely_IfPrintf,$1,$2,17001,17250)
179 $$(call ListPathsSafely_IfPrintf,$1,$2,17251,17500)
180 $$(call ListPathsSafely_IfPrintf,$1,$2,17501,17750)
181 $$(call ListPathsSafely_IfPrintf,$1,$2,17751,18000)
182
183 $$(call ListPathsSafely_IfPrintf,$1,$2,18001,18250)
184 $$(call ListPathsSafely_IfPrintf,$1,$2,18251,18500)
185 $$(call ListPathsSafely_IfPrintf,$1,$2,18501,18750)
186 $$(call ListPathsSafely_IfPrintf,$1,$2,18751,19000)
187
188 $$(call ListPathsSafely_IfPrintf,$1,$2,19001,19250)
189 $$(call ListPathsSafely_IfPrintf,$1,$2,19251,19500)
190 $$(call ListPathsSafely_IfPrintf,$1,$2,19501,19750)
191 $$(call ListPathsSafely_IfPrintf,$1,$2,19751,20000)
192
193 $$(call ListPathsSafely_IfPrintf,$1,$2,20001,20250)
194 $$(call ListPathsSafely_IfPrintf,$1,$2,20251,20500)
195 $$(call ListPathsSafely_IfPrintf,$1,$2,20501,20750)
196 $$(call ListPathsSafely_IfPrintf,$1,$2,20751,21000)
197
198 $$(call ListPathsSafely_IfPrintf,$1,$2,21001,21250)
199 $$(call ListPathsSafely_IfPrintf,$1,$2,21251,21500)
200 $$(call ListPathsSafely_IfPrintf,$1,$2,21501,21750)
201 $$(call ListPathsSafely_IfPrintf,$1,$2,21751,22000)
202
203 $$(call ListPathsSafely_IfPrintf,$1,$2,22001,22250)
204 $$(call ListPathsSafely_IfPrintf,$1,$2,22251,22500)
205 $$(call ListPathsSafely_IfPrintf,$1,$2,22501,22750)
206 $$(call ListPathsSafely_IfPrintf,$1,$2,22751,23000)
207
208 $$(call ListPathsSafely_IfPrintf,$1,$2,23001,23250)
209 $$(call ListPathsSafely_IfPrintf,$1,$2,23251,23500)
210 $$(call ListPathsSafely_IfPrintf,$1,$2,23501,23750)
211 $$(call ListPathsSafely_IfPrintf,$1,$2,23751,24000)
212
213 $$(call ListPathsSafely_IfPrintf,$1,$2,24001,24250)
214 $$(call ListPathsSafely_IfPrintf,$1,$2,24251,24500)
215 $$(call ListPathsSafely_IfPrintf,$1,$2,24501,24750)
216 $$(call ListPathsSafely_IfPrintf,$1,$2,24751,25000)
217
218 $$(call ListPathsSafely_IfPrintf,$1,$2,25001,25250)
219 $$(call ListPathsSafely_IfPrintf,$1,$2,25251,25500)
220 $$(call ListPathsSafely_IfPrintf,$1,$2,25501,25750)
221 $$(call ListPathsSafely_IfPrintf,$1,$2,25751,26000)
222
223 $$(call ListPathsSafely_IfPrintf,$1,$2,26001,26250)
224 $$(call ListPathsSafely_IfPrintf,$1,$2,26251,26500)
225 $$(call ListPathsSafely_IfPrintf,$1,$2,26501,26750)
226 $$(call ListPathsSafely_IfPrintf,$1,$2,26751,27000)
227
228 $$(call ListPathsSafely_IfPrintf,$1,$2,27001,27250)
229 $$(call ListPathsSafely_IfPrintf,$1,$2,27251,27500)
230 $$(call ListPathsSafely_IfPrintf,$1,$2,27501,27750)
231 $$(call ListPathsSafely_IfPrintf,$1,$2,27751,28000)
232
233 $$(call ListPathsSafely_IfPrintf,$1,$2,28001,28250)
234 $$(call ListPathsSafely_IfPrintf,$1,$2,28251,28500)
235 $$(call ListPathsSafely_IfPrintf,$1,$2,28501,28750)
236 $$(call ListPathsSafely_IfPrintf,$1,$2,28751,29000)
237
238 $$(call ListPathsSafely_IfPrintf,$1,$2,29001,29250)
239 $$(call ListPathsSafely_IfPrintf,$1,$2,29251,29500)
240 $$(call ListPathsSafely_IfPrintf,$1,$2,29501,29750)
241 $$(call ListPathsSafely_IfPrintf,$1,$2,29751,30000)
242 endef
243endif # HAS_FILE_FUNCTION
244
245################################################################################
246# Write to and read from file
247
248# Param 1 - File to read
249ReadFile = \
250 $(shell $(CAT) $1)
251
252# Param 1 - Text to write
253# Param 2 - File to write to
254ifeq ($(HAS_FILE_FUNCTION), true)
255 WriteFile = \
256 $(file >$2,$(strip $1))
257else
258 # Use printf to get consistent behavior on all platforms.
259 WriteFile = \
260 $(shell $(PRINTF) "%s" $(call ShellQuote, $1) > $2)
261endif
262
263# Param 1 - Text to write
264# Param 2 - File to write to
265ifeq ($(HAS_FILE_FUNCTION), true)
266 AppendFile = \
267 $(file >>$2,$(strip $1))
268else
269 # Use printf to get consistent behavior on all platforms.
270 AppendFile = \
271 $(shell $(PRINTF) "%s" $(call ShellQuote, $1) >> $2)
272endif
diff --git a/make/common/Modules.gmk b/make/common/Modules.gmk
index 41533e5..4f846c7 100644
--- a/make/common/Modules.gmk
+++ b/make/common/Modules.gmk
@@ -118,11 +118,11 @@ PLATFORM_MODULES += \
118 jdk.zipfs \118 jdk.zipfs \
119 #119 #
120120
121ifeq ($(OPENJDK_TARGET_OS), windows)121ifeq ($(call isTargetOs, windows), true)
122 PLATFORM_MODULES += jdk.crypto.mscapi122 PLATFORM_MODULES += jdk.crypto.mscapi
123endif123endif
124124
125ifeq ($(OPENJDK_TARGET_OS), solaris)125ifeq ($(call isTargetOs, solaris), true)
126 PLATFORM_MODULES += jdk.crypto.ucrypto126 PLATFORM_MODULES += jdk.crypto.ucrypto
127endif127endif
128128
diff --git a/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk
index bc297fb..6189810 100644
--- a/make/common/NativeCompilation.gmk
+++ b/make/common/NativeCompilation.gmk
@@ -283,10 +283,15 @@ endif
283# specialized file is found, returns the default file.283# specialized file is found, returns the default file.
284# $1 Executable to find entitlements file for.284# $1 Executable to find entitlements file for.
285ENTITLEMENTS_DIR := $(TOPDIR)/make/data/macosxsigning285ENTITLEMENTS_DIR := $(TOPDIR)/make/data/macosxsigning
286DEFAULT_ENTITLEMENTS_FILE := $(ENTITLEMENTS_DIR)/default.plist286ifeq ($(MACOSX_CODESIGN_MODE), debug)
287 CODESIGN_PLIST_SUFFIX := -debug
288else
289 CODESIGN_PLIST_SUFFIX :=
290endif
291DEFAULT_ENTITLEMENTS_FILE := $(ENTITLEMENTS_DIR)/default$(CODESIGN_PLIST_SUFFIX).plist
287292
288GetEntitlementsFile = \293GetEntitlementsFile = \
289 $(foreach f, $(ENTITLEMENTS_DIR)/$(strip $(notdir $1)).plist, \294 $(foreach f, $(ENTITLEMENTS_DIR)/$(strip $(notdir $1))$(CODESIGN_PLIST_SUFFIX).plist, \
290 $(if $(wildcard $f), $f, $(DEFAULT_ENTITLEMENTS_FILE)) \295 $(if $(wildcard $f), $f, $(DEFAULT_ENTITLEMENTS_FILE)) \
291 )296 )
292297
@@ -909,7 +914,7 @@ define SetupNativeCompilationBody
909 $(TOUCH) $$@914 $(TOUCH) $$@
910915
911 # On windows we need to create a resource file916 # On windows we need to create a resource file
912 ifeq ($(OPENJDK_TARGET_OS), windows)917 ifeq ($(call isTargetOs, windows), true)
913 ifneq ($$($1_VERSIONINFO_RESOURCE), )918 ifneq ($$($1_VERSIONINFO_RESOURCE), )
914 $1_RES := $$($1_OBJECT_DIR)/$$($1_BASENAME).res919 $1_RES := $$($1_OBJECT_DIR)/$$($1_BASENAME).res
915 $1_RES_DEPS_FILE := $$($1_RES).d920 $1_RES_DEPS_FILE := $$($1_RES).d
@@ -950,7 +955,7 @@ define SetupNativeCompilationBody
950955
951 ifneq ($(DISABLE_MAPFILES), true)956 ifneq ($(DISABLE_MAPFILES), true)
952 $1_REAL_MAPFILE := $$($1_MAPFILE)957 $1_REAL_MAPFILE := $$($1_MAPFILE)
953 ifneq ($(OPENJDK_TARGET_OS), windows)958 ifeq ($(call isTargetOs, windows), false)
954 ifneq ($$($1_REORDER), )959 ifneq ($$($1_REORDER), )
955 $1_REAL_MAPFILE := $$($1_OBJECT_DIR)/mapfile960 $1_REAL_MAPFILE := $$($1_OBJECT_DIR)/mapfile
956961
@@ -984,7 +989,7 @@ define SetupNativeCompilationBody
984 # Only copy debug symbols for dynamic libraries and programs.989 # Only copy debug symbols for dynamic libraries and programs.
985 ifneq ($$($1_TYPE), STATIC_LIBRARY)990 ifneq ($$($1_TYPE), STATIC_LIBRARY)
986 # Generate debuginfo files.991 # Generate debuginfo files.
987 ifeq ($(OPENJDK_TARGET_OS), windows)992 ifeq ($(call isTargetOs, windows), true)
988 $1_EXTRA_LDFLAGS += -debug "-pdb:$$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).pdb" \993 $1_EXTRA_LDFLAGS += -debug "-pdb:$$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).pdb" \
989 "-map:$$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).map"994 "-map:$$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).map"
990 ifeq ($(SHIP_DEBUG_SYMBOLS), public)995 ifeq ($(SHIP_DEBUG_SYMBOLS), public)
@@ -993,7 +998,7 @@ define SetupNativeCompilationBody
993 $1_DEBUGINFO_FILES := $$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).pdb \998 $1_DEBUGINFO_FILES := $$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).pdb \
994 $$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).map999 $$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).map
9951000
996 else ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris), )1001 else ifeq ($(call isTargetOs, linux solaris), true)
997 $1_DEBUGINFO_FILES := $$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).debuginfo1002 $1_DEBUGINFO_FILES := $$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).debuginfo
998 # Setup the command line creating debuginfo files, to be run after linking.1003 # Setup the command line creating debuginfo files, to be run after linking.
999 # It cannot be run separately since it updates the original target file1004 # It cannot be run separately since it updates the original target file
@@ -1009,13 +1014,13 @@ define SetupNativeCompilationBody
1009 $1_DEBUGINFO_FILES := $$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).debuginfo 1014 $1_DEBUGINFO_FILES := $$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).debuginfo
1010 $1_CREATE_DEBUGINFO_CMDS := $(CP) $$($1_TARGET) $$($1_DEBUGINFO_FILES)1015 $1_CREATE_DEBUGINFO_CMDS := $(CP) $$($1_TARGET) $$($1_DEBUGINFO_FILES)
10111016
1012 else ifeq ($(OPENJDK_TARGET_OS), macosx)1017 else ifeq ($(call isTargetOs, macosx), true)
1013 $1_DEBUGINFO_FILES := \1018 $1_DEBUGINFO_FILES := \
1014 $$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM/Contents/Info.plist \1019 $$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM/Contents/Info.plist \
1015 $$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM/Contents/Resources/DWARF/$$($1_BASENAME)1020 $$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM/Contents/Resources/DWARF/$$($1_BASENAME)
1016 $1_CREATE_DEBUGINFO_CMDS := \1021 $1_CREATE_DEBUGINFO_CMDS := \
1017 $(DSYMUTIL) --out $$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM $$($1_TARGET)1022 $(DSYMUTIL) --out $$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM $$($1_TARGET)
1018 endif # OPENJDK_TARGET_OS1023 endif
10191024
1020 # Since the link rule creates more than one file that we want to track,1025 # Since the link rule creates more than one file that we want to track,
1021 # we have to use some tricks to get make to cooperate. To properly1026 # we have to use some tricks to get make to cooperate. To properly
@@ -1101,7 +1106,7 @@ define SetupNativeCompilationBody
1101 endif1106 endif
1102 endif1107 endif
11031108
1104 ifeq ($(OPENJDK_TARGET_OS), windows)1109 ifeq ($(call isTargetOs, windows), true)
1105 ifeq ($$($1_EMBED_MANIFEST), true)1110 ifeq ($$($1_EMBED_MANIFEST), true)
1106 $1_EXTRA_LDFLAGS += -manifest:embed1111 $1_EXTRA_LDFLAGS += -manifest:embed
1107 endif1112 endif
@@ -1181,7 +1186,7 @@ define SetupNativeCompilationBody
1181 # Keep as much as possible on one execution line for best performance1186 # Keep as much as possible on one execution line for best performance
1182 # on Windows1187 # on Windows
1183 $$(call LogInfo, Linking $$($1_BASENAME))1188 $$(call LogInfo, Linking $$($1_BASENAME))
1184 ifeq ($(OPENJDK_TARGET_OS), windows)1189 ifeq ($(call isTargetOs, windows), true)
1185 $$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \1190 $$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
1186 $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \1191 $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
1187 $(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \1192 $(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \
@@ -1199,16 +1204,17 @@ define SetupNativeCompilationBody
1199 $$($1_CREATE_DEBUGINFO_CMDS)1204 $$($1_CREATE_DEBUGINFO_CMDS)
1200 $$($1_STRIP_CMD)1205 $$($1_STRIP_CMD)
1201 endif1206 endif
1202 ifeq ($(OPENJDK_TARGET_OS), windows)1207 ifeq ($(call isTargetOs, windows), true)
1203 ifneq ($$($1_MANIFEST), )1208 ifneq ($$($1_MANIFEST), )
1204 $$($1_MT) -nologo -manifest $$($1_MANIFEST) -identity:"$$($1_NAME).exe, version=$$($1_MANIFEST_VERSION)" -outputresource:$$@;#11209 $$($1_MT) -nologo -manifest $$($1_MANIFEST) -identity:"$$($1_NAME).exe, version=$$($1_MANIFEST_VERSION)" -outputresource:$$@;#1
1205 endif1210 endif
1206 endif1211 endif
1207 # This only works if the openjdk_codesign identity is present on the system. Let1212 # On macosx, optionally run codesign on every binary
1208 # silently fail otherwise.1213 ifeq ($(MACOSX_CODESIGN_MODE), hardened)
1209 ifneq ($(CODESIGN), )
1210 $(CODESIGN) -f -s "$(MACOSX_CODESIGN_IDENTITY)" --timestamp --options runtime \1214 $(CODESIGN) -f -s "$(MACOSX_CODESIGN_IDENTITY)" --timestamp --options runtime \
1211 --entitlements $$(call GetEntitlementsFile, $$@) $$@1215 --entitlements $$(call GetEntitlementsFile, $$@) $$@
1216 else ifeq ($(MACOSX_CODESIGN_MODE), debug)
1217 $(CODESIGN) -f -s - --entitlements $$(call GetEntitlementsFile, $$@) $$@
1212 endif1218 endif
1213 endif1219 endif
12141220
diff --git a/make/common/Utils.gmk b/make/common/Utils.gmk
1215new file mode 1006441221new file mode 100644
index 0000000..acb6a30
--- /dev/null
+++ b/make/common/Utils.gmk
@@ -0,0 +1,365 @@
1#
2# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# This code is free software; you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 2 only, as
7# published by the Free Software Foundation. Oracle designates this
8# particular file as subject to the "Classpath" exception as provided
9# by Oracle in the LICENSE file that accompanied this code.
10#
11# This code is distributed in the hope that it will be useful, but WITHOUT
12# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14# version 2 for more details (a copy is included in the LICENSE file that
15# accompanied this code).
16#
17# You should have received a copy of the GNU General Public License version
18# 2 along with this work; if not, write to the Free Software Foundation,
19# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20#
21# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22# or visit www.oracle.com if you need additional information or have any
23# questions.
24#
25
26ifeq (,$(_MAKEBASE_GMK))
27 $(error You must include MakeBase.gmk prior to including Utils.gmk)
28endif
29
30################################################################################
31#
32# Common utility functions
33#
34################################################################################
35
36### Debug functions
37
38# Prints the name and value of a variable
39PrintVar = \
40 $(info $(strip $1) >$($(strip $1))<)
41
42################################################################################
43# This macro translates $ into \$ to protect the $ from expansion in the shell.
44# To make this macro resilient against already escaped strings, first remove
45# any present escapes before escaping so that no double escapes are added.
46EscapeDollar = $(subst $$,\$$,$(subst \$$,$$,$(strip $1)))
47
48################################################################################
49# This macro works just like EscapeDollar above, but for #.
50EscapeHash = $(subst \#,\\\#,$(subst \\\#,\#,$(strip $1)))
51
52################################################################################
53# This macro translates $ into $$ to protect the string from make itself.
54DoubleDollar = $(subst $$,$$$$,$(strip $1))
55
56################################################################################
57# Creates a sequence of increasing numbers (inclusive).
58# Param 1 - starting number
59# Param 2 - ending number
60sequence = \
61 $(wordlist $1, $2, $(strip \
62 $(eval SEQUENCE_COUNT :=) \
63 $(call _sequence-do,$(strip $2))))
64
65_sequence-do = \
66 $(if $(word $1, $(SEQUENCE_COUNT)),, \
67 $(eval SEQUENCE_COUNT += .) \
68 $(words $(SEQUENCE_COUNT)) \
69 $(call _sequence-do,$1))
70
71################################################################################
72# Replace question marks with space in string. This macro needs to be called on
73# files from FindFiles in case any of them contains space in their file name,
74# since FindFiles replaces space with ?.
75# Param 1 - String to replace in
76DecodeSpace = \
77 $(subst ?,$(SPACE),$(strip $1))
78EncodeSpace = \
79 $(subst $(SPACE),?,$(strip $1))
80
81################################################################################
82# Assign a variable only if it is empty
83# Param 1 - Variable to assign
84# Param 2 - Value to assign
85SetIfEmpty = \
86 $(if $($(strip $1)),,$(eval $(strip $1) := $2))
87
88################################################################################
89# Take two paths and return the path of the last common directory.
90# Ex: /foo/bar/baz, /foo/bar/banan -> /foo/bar
91# foo/bar/baz, /foo/bar -> <empty>
92#
93# The x prefix is used to preserve the presence of the initial slash
94#
95# $1 - Path to compare
96# $2 - Other path to compare
97FindCommonPathPrefix = \
98 $(patsubst x%,%,$(subst $(SPACE),/,$(strip \
99 $(call FindCommonPathPrefixHelper, \
100 $(subst /,$(SPACE),x$(strip $1)), $(subst /,$(SPACE),x$(strip $2))) \
101 )))
102
103FindCommonPathPrefixHelper = \
104 $(if $(call equals, $(firstword $1), $(firstword $2)), \
105 $(firstword $1) \
106 $(call FindCommonPathPrefixHelper, \
107 $(wordlist 2, $(words $1), $1), $(wordlist 2, $(words $2), $2) \
108 ) \
109 )
110
111# Convert a partial path into as many directory levels of ../, removing
112# leading and following /.
113# Ex: foo/bar/baz/ -> ../../..
114# foo/bar -> ../..
115# /foo -> ..
116DirToDotDot = \
117 $(subst $(SPACE),/,$(foreach d, $(subst /,$(SPACE),$1),..))
118
119# Computes the relative path from a directory to a file
120# $1 - File to compute the relative path to
121# $2 - Directory to compute the relative path from
122RelativePath = \
123 $(eval $1_prefix := $(call FindCommonPathPrefix, $1, $2)) \
124 $(eval $1_dotdots := $(call DirToDotDot, $(patsubst $($(strip $1)_prefix)%, %, $2))) \
125 $(eval $1_dotdots := $(if $($(strip $1)_dotdots),$($(strip $1)_dotdots),.)) \
126 $(eval $1_suffix := $(patsubst $($(strip $1)_prefix)/%, %, $1)) \
127 $($(strip $1)_dotdots)/$($(strip $1)_suffix)
128
129################################################################################
130# Filter out duplicate sub strings while preserving order. Keeps the first occurance.
131uniq = \
132 $(strip $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1))))
133
134# Returns all whitespace-separated words in $2 where at least one of the
135# whitespace-separated words in $1 is a substring.
136containing = \
137 $(strip \
138 $(foreach v,$(strip $2),\
139 $(call uniq,$(foreach p,$(strip $1),$(if $(findstring $p,$v),$v)))))
140
141# Returns all whitespace-separated words in $2 where none of the
142# whitespace-separated words in $1 is a substring.
143not-containing = \
144 $(strip $(filter-out $(call containing,$1,$2),$2))
145
146# Return a list of all string elements that are duplicated in $1.
147dups = \
148 $(strip $(foreach v, $(sort $1), $(if $(filter-out 1, \
149 $(words $(filter $v, $1))), $v)))
150
151# String equals
152equals = \
153 $(and $(findstring $(strip $1),$(strip $2)),\
154 $(findstring $(strip $2),$(strip $1)))
155
156# Remove a whole list of prefixes
157# $1 - List of prefixes
158# $2 - List of elements to process
159remove-prefixes = \
160 $(strip $(if $1,$(patsubst $(firstword $1)%,%,\
161 $(call remove-prefixes,$(filter-out $(firstword $1),$1),$2)),$2))
162
163# Convert the string given to upper case, without any $(shell)
164# Inspired by http://lists.gnu.org/archive/html/help-make/2013-09/msg00009.html
165uppercase_table := a,A b,B c,C d,D e,E f,F g,G h,H i,I j,J k,K l,L m,M n,N o,O \
166 p,P q,Q r,R s,S t,T u,U v,V w,W x,X y,Y z,Z
167
168uppercase_internal = \
169 $(if $(strip $1), $$(subst $(firstword $1), $(call uppercase_internal, \
170 $(wordlist 2, $(words $1), $1), $2)), $2)
171
172# Convert a string to upper case. Works only on a-z.
173# $1 - The string to convert
174uppercase = \
175 $(strip \
176 $(eval uppercase_result := $(call uppercase_internal, $(uppercase_table), $1)) \
177 $(uppercase_result) \
178 )
179
180################################################################################
181# Boolean operators.
182
183# Return the word "true" if all the boolean words given as argument is "true",
184# and returns "false" otherwise. Boolean words must be "true" or "false". It is
185# an error to supply a non-boolean word. An empty string is considered "true".
186And = \
187 $(strip $(if $(filter-out true false, $1), $(error Non-boolean values: $1)) \
188 $(if $(strip $(filter-out true, $1)), false, true))
189
190# Return the word "false" if all the boolean words given as argument is "false",
191# and returns "true" otherwise. Boolean words must be "true" or "false". It is
192# an error to supply a non-boolean word. An empty string is considered "false".
193Or = \
194 $(strip $(if $(filter-out true false, $1), $(error Non-boolean values: $1)) \
195 $(if $(strip $(filter-out false, $1)), true, false))
196
197################################################################################
198# Parse a multiple-keyword variable, like FOO="KEYWORD1=val1;KEYWORD2=val2;..."
199# These will be converted into a series of variables like FOO_KEYWORD1=val1,
200# FOO_KEYWORD2=val2, etc. Unknown keywords will cause an error.
201#
202# Parameter 1 is the name of the rule, and is also the name of the variable.
203#
204# Remaining parameters are named arguments. These include:
205# SINGLE_KEYWORDS A list of valid keywords with single string values
206# STRING_KEYWORDS A list of valid keywords, processed as string. This means
207# that '%20' will be replaced by ' ' to allow for multi-word strings.
208#
209ParseKeywordVariable = $(NamedParamsMacroTemplate)
210define ParseKeywordVariableBody
211 ifneq ($$($1), )
212 # To preserve spaces, substitute them with a hopefully unique pattern
213 # before splitting and then re-substitute spaces back.
214 $1_MANGLED := $$(subst $$(SPACE),||||,$$($1))
215 $$(foreach mangled_part, $$(subst ;, , $$($1_MANGLED)), \
216 $$(eval mangled_part_eval := $$(call DoubleDollar, $$(mangled_part))) \
217 $$(eval part := $$$$(subst ||||,$$$$(SPACE),$$$$(mangled_part_eval))) \
218 $$(eval $1_NO_MATCH := true) \
219 $$(foreach keyword, $$($1_SINGLE_KEYWORDS), \
220 $$(eval keyword_eval := $$(call DoubleDollar, $$(keyword))) \
221 $$(if $$(filter $$(keyword)=%, $$(part)), \
222 $$(eval $(strip $1)_$$$$(keyword_eval) := $$$$(strip $$$$(patsubst $$$$(keyword_eval)=%, %, $$$$(part)))) \
223 $$(eval $1_NO_MATCH := ) \
224 ) \
225 ) \
226 $$(foreach keyword, $$($1_STRING_KEYWORDS), \
227 $$(eval keyword_eval := $$(call DoubleDollar, $$(keyword))) \
228 $$(if $$(filter $$(keyword)=%, $$(part)), \
229 $$(eval $(strip $1)_$$$$(keyword_eval) := $$$$(strip $$$$(subst %20, , $$$$(patsubst $$$$(keyword_eval)=%, %, $$$$(part))))) \
230 $$(eval $1_NO_MATCH := ) \
231 ) \
232 ) \
233 $$(if $$($1_NO_MATCH), \
234 $$(if $$(filter $$(part), $$($1_SINGLE_KEYWORDS) $$($1_STRING_KEYWORDS)), \
235 $$(info Keyword $$(part) for $1 needs to be assigned a value.) \
236 , \
237 $$(info $$(part) is not a valid keyword for $1.) \
238 $$(info Valid keywords: $$($1_SINGLE_KEYWORDS) $$($1_STRING_KEYWORDS).) \
239 ) \
240 $$(error Cannot continue) \
241 ) \
242 )
243 endif
244endef
245
246################################################################################
247# ShellQuote
248#
249# Quotes a string with single quotes and replaces single quotes with '\'' so
250# that the contents survives being given to the shell.
251ShellQuote = \
252 $(SQUOTE)$(subst $(SQUOTE),$(SQUOTE)\$(SQUOTE)$(SQUOTE),$(strip $1))$(SQUOTE)
253
254################################################################################
255# Find lib dir for module
256# Param 1 - module name
257FindLibDirForModule = \
258 $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
259
260################################################################################
261# Find executable dir for module
262# Param 1 - module name
263FindExecutableDirForModule = \
264 $(SUPPORT_OUTPUTDIR)/modules_cmds/$(strip $1)
265
266################################################################################
267# Return a string suitable for use after a -classpath or --module-path option. It
268# will be correct and safe to use on all platforms. Arguments are given as space
269# separate classpath entries. Safe for multiple nested calls.
270# param 1 : A space separated list of classpath entries
271# The surrounding strip is needed to keep additional whitespace out
272PathList = \
273 "$(subst $(SPACE),:,$(strip $(subst $(DQUOTE),,$1)))"
274
275################################################################################
276# Check if a specified hotspot variant is being built, or at least one of a
277# list of variants. Will return 'true' or 'false'.
278# $1 - the variant to test for
279check-jvm-variant = \
280 $(strip \
281 $(if $(filter-out $(VALID_JVM_VARIANTS), $1), \
282 $(error Internal error: Invalid variant tested: $1)) \
283 $(if $(filter $1, $(JVM_VARIANTS)), true, false))
284
285################################################################################
286# Check if our build or target conforms to certain restrictions. This set of
287# functions all work in similar ways, testing the property that the name
288# implies, so e.g. isTargetCpu test the CPU of the target system.
289#
290# $1 - A property, or a space separated list of properties to test for.
291#
292# Returns true if the actual property matches one of the properties in the list,
293# and false otherwise.
294#
295# Examples: $(call isTargetOs, linux solaris) will return true when executed
296# on either linux or solaris, and false otherwise.
297# $(call isBuildCpuArch, x86) will return true iff the build CPU Arch is x86.
298
299isTargetOs = \
300 $(strip $(if $(filter $(OPENJDK_TARGET_OS), $1), true, false))
301
302isTargetOsType = \
303 $(strip $(if $(filter $(OPENJDK_TARGET_OS_TYPE), $1), true, false))
304
305isTargetCpu = \
306 $(strip $(if $(filter $(OPENJDK_TARGET_CPU), $1), true, false))
307
308isTargetCpuArch = \
309 $(strip $(if $(filter $(OPENJDK_TARGET_CPU_ARCH), $1), true, false))
310
311isTargetCpuBits = \
312 $(strip $(if $(filter $(OPENJDK_TARGET_CPU_BITS), $1), true, false))
313
314isBuildOs = \
315 $(strip $(if $(filter $(OPENJDK_BUILD_OS), $1), true, false))
316
317isBuildOsType = \
318 $(strip $(if $(filter $(OPENJDK_BUILD_OS_TYPE), $1), true, false))
319
320isBuildOsEnv = \
321 $(strip $(if $(filter $(OPENJDK_BUILD_OS_ENV), $1), true, false))
322
323isBuildCpu = \
324 $(strip $(if $(filter $(OPENJDK_BUILD_CPU), $1), true, false))
325
326isBuildCpuArch = \
327 $(strip $(if $(filter $(OPENJDK_BUILD_CPU_ARCH), $1), true, false))
328
329################################################################################
330# Converts a space separated list to a comma separated list.
331#
332# Replacing double-comma with a single comma is to workaround the issue with
333# some version of make on windows that doesn't substitute spaces with one comma
334# properly.
335CommaList = \
336 $(strip \
337 $(subst $(COMMA)$(COMMA),$(COMMA),$(subst $(SPACE),$(COMMA),$(strip $1))) \
338 )
339
340################################################################################
341# Converts a space separated list to a colon separated list.
342#
343# Replacing double-colon with a single colon is to workaround the issue with
344# some version of make on windows that doesn't substitute spaces with one colon
345# properly.
346ColonList = \
347 $(strip \
348 $(subst ::,:,$(subst $(SPACE),:,$(strip $1))) \
349 )
350
351################################################################################
352# Given a list of files, filters out locale specific files for translations
353# that should be excluded from this build.
354# $1 - The list of files to filter
355# $2 - The suffix of the files that should be considered (.java or .properties)
356FilterExcludedTranslations = \
357 $(strip $(if $(EXCLUDE_TRANSLATIONS), \
358 $(filter-out \
359 $(foreach suffix, $2, \
360 $(addprefix %_, $(addsuffix $(suffix), $(EXCLUDE_TRANSLATIONS))) \
361 ), \
362 $1 \
363 ), \
364 $1 \
365 ))
diff --git a/make/conf/test-dependencies b/make/conf/github-actions.conf
0similarity index 65%366similarity index 65%
1rename from make/conf/test-dependencies367rename from make/conf/test-dependencies
2rename to make/conf/github-actions.conf368rename to make/conf/github-actions.conf
index 0b6c913..40dd3b5 100644
--- a/make/conf/test-dependencies
+++ b/make/conf/github-actions.conf
@@ -23,21 +23,19 @@
23# questions.23# questions.
24#24#
2525
26# Versions and download locations for dependencies used by pre-submit testing.26# Versions and download locations for dependencies used by GitHub Actions (GHA)
2727
28BOOT_JDK_VERSION=11
29JTREG_VERSION=6
30JTREG_BUILD=1
31GTEST_VERSION=1.8.128GTEST_VERSION=1.8.1
29JTREG_VERSION=6.1+3
3230
33LINUX_X64_BOOT_JDK_FILENAME=openjdk-11.0.14.1_linux-x64_bin.tar.gz31LINUX_X64_BOOT_JDK_EXT=tar.gz
34LINUX_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14.1%2B1/OpenJDK11U-jdk_x64_linux_hotspot_11.0.14.1_1.tar.gz32LINUX_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.18%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.18_10.tar.gz
35LINUX_X64_BOOT_JDK_SHA256=43fb84f8063ad9bf6b6d694a67b8f64c8827552b920ec5ce794dfe5602edffe733LINUX_X64_BOOT_JDK_SHA256=4a29efda1d702b8ff38e554cf932051f40ec70006caed5c4857a8cbc7a0b7db7
3634
37WINDOWS_X64_BOOT_JDK_FILENAME=openjdk-11.0.14.1_windows-x64_bin.zip35WINDOWS_X64_BOOT_JDK_EXT=zip
38WINDOWS_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14.1%2B1/OpenJDK11U-jdk_x64_windows_hotspot_11.0.14.1_1.zip36WINDOWS_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.18%2B10/OpenJDK11U-jdk_x64_windows_hotspot_11.0.18_10.zip
39WINDOWS_X64_BOOT_JDK_SHA256=3e7da701aa92e441418299714f0ed6db10c3bb1e2db625c35a2c2cd9cc61973137WINDOWS_X64_BOOT_JDK_SHA256=0cfa5991a8e372b3f8eacacbb2a336663ead0cc6ec9c9ab6cd53206602fb0062
4038
41MACOS_X64_BOOT_JDK_FILENAME=openjdk-11.0.14.1_osx-x64_bin.tar.gz39MACOS_X64_BOOT_JDK_EXT=tar.gz
42MACOS_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14.1%2B1/OpenJDK11U-jdk_x64_mac_hotspot_11.0.14.1_1.tar.gz40MACOS_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.18%2B10/OpenJDK11U-jdk_x64_mac_hotspot_11.0.18_10.tar.gz
43MACOS_X64_BOOT_JDK_SHA256=8c69808f5d9d209b195575e979de0e43cdf5d0f1acec1853a569601fe2c1f74341MACOS_X64_BOOT_JDK_SHA256=75d79315d7265cc4b89fd9e844161ff90798bc6482ace8c1ac75f862a5b3b565
diff --git a/make/copy/Copy-java.base.gmk b/make/copy/Copy-java.base.gmk
index 4734d3f..8fb59d2 100644
--- a/make/copy/Copy-java.base.gmk
+++ b/make/copy/Copy-java.base.gmk
@@ -31,7 +31,7 @@ $(eval $(call IncludeCustomExtension, copy/Copy-java.base.gmk))
3131
32################################################################################32################################################################################
3333
34ifneq ($(findstring $(OPENJDK_TARGET_OS), windows aix),)34ifeq ($(call isTargetOs, windows aix), true)
3535
36 TZMAPPINGS_SRC := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf36 TZMAPPINGS_SRC := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf
3737
@@ -89,7 +89,7 @@ endif
89################################################################################89################################################################################
90# In jvm.cfg, the first listed KNOWN variant is the default. On most build90# In jvm.cfg, the first listed KNOWN variant is the default. On most build
91# configurations, that is the server variant.91# configurations, that is the server variant.
92ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), windows-x86)92ifeq ($(call And, $(call isTargetOs, windows) $(call isTargetCpu, x86)), true)
93 DEFAULT_CFG_VARIANT ?= client93 DEFAULT_CFG_VARIANT ?= client
94endif94endif
95DEFAULT_CFG_VARIANT ?= server95DEFAULT_CFG_VARIANT ?= server
@@ -151,7 +151,7 @@ DEF_POLICY_DST := $(LIB_DST_DIR)/security/default.policy
151DEF_POLICY_SRC_LIST := $(DEF_POLICY_SRC)151DEF_POLICY_SRC_LIST := $(DEF_POLICY_SRC)
152DEF_POLICY_SRC_LIST += $(CUSTOM_POLICY_SRC_LIST)152DEF_POLICY_SRC_LIST += $(CUSTOM_POLICY_SRC_LIST)
153153
154ifneq ($(filter $(OPENJDK_TARGET_OS), windows solaris), )154ifeq ($(call isTargetOs, windows solaris), true)
155 DEF_POLICY_SRC_LIST += $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/lib/security/default.policy155 DEF_POLICY_SRC_LIST += $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/lib/security/default.policy
156endif156endif
157157
@@ -191,7 +191,7 @@ $(eval $(call SetupCopyFiles, COPY_NET_PROPERTIES, \
191191
192TARGETS += $(COPY_NET_PROPERTIES)192TARGETS += $(COPY_NET_PROPERTIES)
193193
194ifeq ($(OPENJDK_TARGET_OS), solaris)194ifeq ($(call isTargetOs, solaris), true)
195 $(eval $(call SetupCopyFiles, COPY_SDP_CONF, \195 $(eval $(call SetupCopyFiles, COPY_SDP_CONF, \
196 FILES := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/conf/sdp/sdp.conf.template, \196 FILES := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/conf/sdp/sdp.conf.template, \
197 DEST := $(CONF_DST_DIR)/sdp, \197 DEST := $(CONF_DST_DIR)/sdp, \
diff --git a/make/copy/Copy-jdk.crypto.cryptoki.gmk b/make/copy/Copy-jdk.crypto.cryptoki.gmk
index 7965c56..f5d1632 100644
--- a/make/copy/Copy-jdk.crypto.cryptoki.gmk
+++ b/make/copy/Copy-jdk.crypto.cryptoki.gmk
@@ -27,7 +27,7 @@ include CopyCommon.gmk
2727
28################################################################################28################################################################################
2929
30ifeq ($(OPENJDK_TARGET_OS), solaris)30ifeq ($(call isTargetOs, solaris), true)
3131
32 SUNPKCS11_CFG_SRC := \32 SUNPKCS11_CFG_SRC := \
33 $(TOPDIR)/src/jdk.crypto.cryptoki/solaris/conf/security/sunpkcs11-solaris.cfg33 $(TOPDIR)/src/jdk.crypto.cryptoki/solaris/conf/security/sunpkcs11-solaris.cfg
diff --git a/make/copy/Copy-jdk.crypto.ucrypto.gmk b/make/copy/Copy-jdk.crypto.ucrypto.gmk
index 0007e44..a9320e8 100644
--- a/make/copy/Copy-jdk.crypto.ucrypto.gmk
+++ b/make/copy/Copy-jdk.crypto.ucrypto.gmk
@@ -27,7 +27,7 @@ include CopyCommon.gmk
2727
28################################################################################28################################################################################
2929
30ifeq ($(OPENJDK_TARGET_OS), solaris)30ifeq ($(call isTargetOs, solaris), true)
3131
32 UCRYPTO_CFG_SRC := $(TOPDIR)/src/jdk.crypto.ucrypto/solaris/conf/security/ucrypto-solaris.cfg32 UCRYPTO_CFG_SRC := $(TOPDIR)/src/jdk.crypto.ucrypto/solaris/conf/security/ucrypto-solaris.cfg
33 UCRYPTO_CFG_DST := $(CONF_DST_DIR)/security/ucrypto-solaris.cfg33 UCRYPTO_CFG_DST := $(CONF_DST_DIR)/security/ucrypto-solaris.cfg
diff --git a/make/data/cacerts/certignaca b/make/data/cacerts/certignaca
34new file mode 10064434new file mode 100644
index 0000000..9e50633
--- /dev/null
+++ b/make/data/cacerts/certignaca
@@ -0,0 +1,29 @@
1Owner: CN=Certigna, O=Dhimyotis, C=FR
2Issuer: CN=Certigna, O=Dhimyotis, C=FR
3Serial number: fedce3010fc948ff
4Valid from: Fri Jun 29 15:13:05 GMT 2007 until: Tue Jun 29 15:13:05 GMT 2027
5Signature algorithm name: SHA1withRSA
6Subject Public Key Algorithm: 2048-bit RSA key
7Version: 3
8-----BEGIN CERTIFICATE-----
9MIIDqDCCApCgAwIBAgIJAP7c4wEPyUj/MA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNV
10BAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hMB4X
11DTA3MDYyOTE1MTMwNVoXDTI3MDYyOTE1MTMwNVowNDELMAkGA1UEBhMCRlIxEjAQ
12BgNVBAoMCURoaW15b3RpczERMA8GA1UEAwwIQ2VydGlnbmEwggEiMA0GCSqGSIb3
13DQEBAQUAA4IBDwAwggEKAoIBAQDIaPHJ1tazNHUmgh7stL7qXOEm7RFHYeGifBZ4
14QCHkYJ5ayGPhxLGWkv8YbWkj4Sti993iNi+RB7lIzw7sebYs5zRLcAglozyHGxny
15gQcPOJAZ0xH+hrTy0V4eHpbNgGzOOzGTtvKg0KmVEn2lmsxryIRWijOp5yIVUxbw
16zBfsV1/pogqYCd7jX5xv3EjjhQsVWqa6n6xI4wmy9/Qy3l40vhx4XUJbzg4ij02Q
17130yGLMLLGq/jj8UEYkgDncUtT2UCIf3JR7VsmAA7G8qKCVuKj4YYxclPz5EIBb2
18JsglrgVKtOdjLPOMFlN+XPsRGgjBRmKfIrjxwo1p3Po6WAbfAgMBAAGjgbwwgbkw
19DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUGu3+QTmQtCRZvgHyUtVF9lo53BEw
20ZAYDVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF9lo53BGhOKQ2MDQxCzAJBgNVBAYT
21AkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hggkA/tzj
22AQ/JSP8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG
239w0BAQUFAAOCAQEAhQMeknH2Qq/ho2Ge6/PAD/Kl1NqV5ta+aDY9fm4fTIrv0Q8h
24bV6lUmPOEvjvKtpv6zf+EwLHyzs+ImvaYS5/1HI93TDhHkxAGYwP15zRgzB7mFnc
25fca5DClMoTOi62c6ZYTTluLtdkVwj7Ur3vkj1kluPBS1xp81HlDQwY9qcEQCYsuu
26HWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY1gkIl2PlwS6w
27t0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw
28WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg==
29-----END CERTIFICATE-----
diff --git a/make/data/lsrdata/language-subtag-registry.txt b/make/data/lsrdata/language-subtag-registry.txt
index 3ce374c..92e0a26 100644
--- a/make/data/lsrdata/language-subtag-registry.txt
+++ b/make/data/lsrdata/language-subtag-registry.txt
@@ -1,4 +1,4 @@
1File-Date: 2021-05-111File-Date: 2022-08-08
2%%2%%
3Type: language3Type: language
4Subtag: aa4Subtag: aa
@@ -2146,9 +2146,16 @@ Added: 2009-07-29
2146Macrolanguage: ar2146Macrolanguage: ar
2147%%2147%%
2148Type: language2148Type: language
2149Subtag: ajs
2150Description: Algerian Jewish Sign Language
2151Added: 2022-02-25
2152%%
2153Type: language
2149Subtag: ajt2154Subtag: ajt
2150Description: Judeo-Tunisian Arabic2155Description: Judeo-Tunisian Arabic
2151Added: 2009-07-292156Added: 2009-07-29
2157Deprecated: 2022-02-25
2158Preferred-Value: aeb
2152Macrolanguage: jrb2159Macrolanguage: jrb
2153%%2160%%
2154Type: language2161Type: language
@@ -5772,6 +5779,11 @@ Added: 2009-07-29
5772Deprecated: 2020-03-285779Deprecated: 2020-03-28
5773%%5780%%
5774Type: language5781Type: language
5782Subtag: bpc
5783Description: Mbuk
5784Added: 2022-02-25
5785%%
5786Type: language
5775Subtag: bpd5787Subtag: bpd
5776Description: Banda-Banda5788Description: Banda-Banda
5777Added: 2009-07-295789Added: 2009-07-29
@@ -6016,6 +6028,7 @@ Added: 2005-10-16
6016%%6028%%
6017Type: language6029Type: language
6018Subtag: brb6030Subtag: brb
6031Description: Brao
6019Description: Lave6032Description: Lave
6020Added: 2009-07-296033Added: 2009-07-29
6021%%6034%%
@@ -8155,6 +8168,11 @@ Added: 2020-03-28
8155Macrolanguage: zh8168Macrolanguage: zh
8156%%8169%%
8157Type: language8170Type: language
8171Subtag: cnq
8172Description: Chung
8173Added: 2022-02-25
8174%%
8175Type: language
8158Subtag: cnr8176Subtag: cnr
8159Description: Montenegrin8177Description: Montenegrin
8160Added: 2018-01-238178Added: 2018-01-23
@@ -8757,6 +8775,8 @@ Subtag: cug
8757Description: Chungmboko8775Description: Chungmboko
8758Description: Cung8776Description: Cung
8759Added: 2009-07-298777Added: 2009-07-29
8778Deprecated: 2022-02-25
8779Comments: see bpc, cnq
8760%%8780%%
8761Type: language8781Type: language
8762Subtag: cuh8782Subtag: cuh
@@ -10176,6 +10196,11 @@ Description: Tadaksahak
10176Added: 2009-07-2910196Added: 2009-07-29
10177%%10197%%
10178Type: language10198Type: language
10199Subtag: dsz
10200Description: Mardin Sign Language
10201Added: 2022-02-25
10202%%
10203Type: language
10179Subtag: dta10204Subtag: dta
10180Description: Daur10205Description: Daur
10181Added: 2009-07-2910206Added: 2009-07-29
@@ -10602,6 +10627,11 @@ Description: Emilian
10602Added: 2009-07-2910627Added: 2009-07-29
10603%%10628%%
10604Type: language10629Type: language
10630Subtag: egm
10631Description: Benamanga
10632Added: 2022-02-25
10633%%
10634Type: language
10605Subtag: ego10635Subtag: ego
10606Description: Eggon10636Description: Eggon
10607Added: 2009-07-2910637Added: 2009-07-29
@@ -10913,7 +10943,7 @@ Added: 2009-07-29
10913%%10943%%
10914Type: language10944Type: language
10915Subtag: env10945Subtag: env
10916Description: Enwan (Edu State)10946Description: Enwan (Edo State)
10917Added: 2009-07-2910947Added: 2009-07-29
10918%%10948%%
10919Type: language10949Type: language
@@ -11329,6 +11359,7 @@ Added: 2009-07-29
11329Type: language11359Type: language
11330Subtag: fit11360Subtag: fit
11331Description: Tornedalen Finnish11361Description: Tornedalen Finnish
11362Description: Meänkieli
11332Added: 2009-07-2911363Added: 2009-07-29
11333%%11364%%
11334Type: language11365Type: language
@@ -12838,6 +12869,11 @@ Description: Gavar
12838Added: 2009-07-2912869Added: 2009-07-29
12839%%12870%%
12840Type: language12871Type: language
12872Subtag: gov
12873Description: Goo
12874Added: 2022-02-25
12875%%
12876Type: language
12841Subtag: gow12877Subtag: gow
12842Description: Gorowa12878Description: Gorowa
12843Added: 2009-07-2912879Added: 2009-07-29
@@ -14941,6 +14977,11 @@ Description: Marsian
14941Added: 2009-07-2914977Added: 2009-07-29
14942%%14978%%
14943Type: language14979Type: language
14980Subtag: imt
14981Description: Imotong
14982Added: 2022-02-25
14983%%
14984Type: language
14944Subtag: imy14985Subtag: imy
14945Description: Milyan14986Description: Milyan
14946Added: 2009-07-2914987Added: 2009-07-29
@@ -19458,6 +19499,8 @@ Type: language
19458Subtag: lak19499Subtag: lak
19459Description: Laka (Nigeria)19500Description: Laka (Nigeria)
19460Added: 2009-07-2919501Added: 2009-07-29
19502Deprecated: 2022-02-25
19503Preferred-Value: ksp
19461%%19504%%
19462Type: language19505Type: language
19463Subtag: lal19506Subtag: lal
@@ -19953,6 +19996,11 @@ Description: Opuuo
19953Added: 2009-07-2919996Added: 2009-07-29
19954%%19997%%
19955Type: language19998Type: language
19999Subtag: lgo
20000Description: Lango (South Sudan)
20001Added: 2022-02-25
20002%%
20003Type: language
19956Subtag: lgq20004Subtag: lgq
19957Description: Logba20005Description: Logba
19958Added: 2009-07-2920006Added: 2009-07-29
@@ -20552,6 +20600,8 @@ Type: language
20552Subtag: lno20600Subtag: lno
20553Description: Lango (South Sudan)20601Description: Lango (South Sudan)
20554Added: 2009-07-2920602Added: 2009-07-29
20603Deprecated: 2022-02-25
20604Comments: see imt, lgo, lqr, oie
20555%%20605%%
20556Type: language20606Type: language
20557Subtag: lns20607Subtag: lns
@@ -20724,6 +20774,11 @@ Description: Lopit
20724Added: 2009-07-2920774Added: 2009-07-29
20725%%20775%%
20726Type: language20776Type: language
20777Subtag: lqr
20778Description: Logir
20779Added: 2022-02-25
20780%%
20781Type: language
20727Subtag: lra20782Subtag: lra
20728Description: Rara Bakati'20783Description: Rara Bakati'
20729Added: 2009-07-2920784Added: 2009-07-29
@@ -20809,6 +20864,12 @@ Description: Langue des Signes Burundaise
20809Added: 2021-02-2020864Added: 2021-02-20
20810%%20865%%
20811Type: language20866Type: language
20867Subtag: lsc
20868Description: Albarradas Sign Language
20869Description: Lengua de señas Albarradas
20870Added: 2022-02-25
20871%%
20872Type: language
20812Subtag: lsd20873Subtag: lsd
20813Description: Lishana Deni20874Description: Lishana Deni
20814Added: 2009-07-2920875Added: 2009-07-29
@@ -20883,6 +20944,13 @@ Description: Sivia Sign Language
20883Added: 2019-04-1620944Added: 2019-04-16
20884%%20945%%
20885Type: language20946Type: language
20947Subtag: lsw
20948Description: Seychelles Sign Language
20949Description: Lalang Siny Seselwa
20950Description: Langue des Signes Seychelloise
20951Added: 2022-02-25
20952%%
20953Type: language
20886Subtag: lsy20954Subtag: lsy
20887Description: Mauritian Sign Language20955Description: Mauritian Sign Language
20888Added: 2010-03-1120956Added: 2010-03-11
@@ -26779,6 +26847,11 @@ Description: Nawaru
26779Added: 2009-07-2926847Added: 2009-07-29
26780%%26848%%
26781Type: language26849Type: language
26850Subtag: nww
26851Description: Ndwewe
26852Added: 2022-02-25
26853%%
26854Type: language
26782Subtag: nwx26855Subtag: nwx
26783Description: Middle Newar26856Description: Middle Newar
26784Added: 2009-07-2926857Added: 2009-07-29
@@ -27201,6 +27274,11 @@ Description: Oirata
27201Added: 2009-07-2927274Added: 2009-07-29
27202%%27275%%
27203Type: language27276Type: language
27277Subtag: oie
27278Description: Okolie
27279Added: 2022-02-25
27280%%
27281Type: language
27204Subtag: oin27282Subtag: oin
27205Description: Inebu One27283Description: Inebu One
27206Added: 2009-07-2927284Added: 2009-07-29
@@ -28472,6 +28550,11 @@ Added: 2005-10-16
28472Scope: collection28550Scope: collection
28473%%28551%%
28474Type: language28552Type: language
28553Subtag: phj
28554Description: Pahari
28555Added: 2022-02-25
28556%%
28557Type: language
28475Subtag: phk28558Subtag: phk
28476Description: Phake28559Description: Phake
28477Added: 2009-07-2928560Added: 2009-07-29
@@ -28572,6 +28655,7 @@ Type: language
28572Subtag: pii28655Subtag: pii
28573Description: Pini28656Description: Pini
28574Added: 2009-07-2928657Added: 2009-07-29
28658Deprecated: 2022-02-25
28575%%28659%%
28576Type: language28660Type: language
28577Subtag: pij28661Subtag: pij
@@ -29419,6 +29503,7 @@ Added: 2009-07-29
29419%%29503%%
29420Type: language29504Type: language
29421Subtag: psc29505Subtag: psc
29506Description: Iranian Sign Language
29422Description: Persian Sign Language29507Description: Persian Sign Language
29423Added: 2009-07-2929508Added: 2009-07-29
29424%%29509%%
@@ -29772,7 +29857,13 @@ Description: Pyen
29772Added: 2009-07-2929857Added: 2009-07-29
29773%%29858%%
29774Type: language29859Type: language
29860Subtag: pzh
29861Description: Pazeh
29862Added: 2022-02-25
29863%%
29864Type: language
29775Subtag: pzn29865Subtag: pzn
29866Description: Jejara Naga
29776Description: Para Naga29867Description: Para Naga
29777Added: 2009-07-2929868Added: 2009-07-29
29778%%29869%%
@@ -30394,6 +30485,11 @@ Description: Riang (India)
30394Added: 2009-07-2930485Added: 2009-07-29
30395%%30486%%
30396Type: language30487Type: language
30488Subtag: rib
30489Description: Bribri Sign Language
30490Added: 2022-02-25
30491%%
30492Type: language
30397Subtag: rie30493Subtag: rie
30398Description: Rien30494Description: Rien
30399Added: 2009-07-2930495Added: 2009-07-29
@@ -30627,6 +30723,11 @@ Added: 2009-07-29
30627Deprecated: 2016-05-3030723Deprecated: 2016-05-30
30628%%30724%%
30629Type: language30725Type: language
30726Subtag: rnb
30727Description: Brunca Sign Language
30728Added: 2022-02-25
30729%%
30730Type: language
30630Subtag: rnd30731Subtag: rnd
30631Description: Ruund30732Description: Ruund
30632Added: 2009-07-2930733Added: 2009-07-29
@@ -30770,6 +30871,12 @@ Added: 2009-07-29
30770Deprecated: 2017-02-2330871Deprecated: 2017-02-23
30771%%30872%%
30772Type: language30873Type: language
30874Subtag: rsk
30875Description: Ruthenian
30876Description: Rusyn
30877Added: 2022-02-25
30878%%
30879Type: language
30773Subtag: rsl30880Subtag: rsl
30774Description: Russian Sign Language30881Description: Russian Sign Language
30775Added: 2009-07-2930882Added: 2009-07-29
@@ -30780,6 +30887,11 @@ Description: Miriwoong Sign Language
30780Added: 2016-05-3030887Added: 2016-05-30
30781%%30888%%
30782Type: language30889Type: language
30890Subtag: rsn
30891Description: Rwandan Sign Language
30892Added: 2022-02-25
30893%%
30894Type: language
30783Subtag: rtc30895Subtag: rtc
30784Description: Rungtu Chin30896Description: Rungtu Chin
30785Added: 2012-08-1230897Added: 2012-08-12
@@ -32276,6 +32388,8 @@ Type: language
32276Subtag: smd32388Subtag: smd
32277Description: Sama32389Description: Sama
32278Added: 2009-07-2932390Added: 2009-07-29
32391Deprecated: 2022-02-25
32392Preferred-Value: kmb
32279%%32393%%
32280Type: language32394Type: language
32281Subtag: smf32395Subtag: smf
@@ -32382,6 +32496,8 @@ Type: language
32382Subtag: snb32496Subtag: snb
32383Description: Sebuyau32497Description: Sebuyau
32384Added: 2009-07-2932498Added: 2009-07-29
32499Deprecated: 2022-02-25
32500Preferred-Value: iba
32385%%32501%%
32386Type: language32502Type: language
32387Subtag: snc32503Subtag: snc
@@ -35199,6 +35315,11 @@ Description: Tojolabal
35199Added: 2009-07-2935315Added: 2009-07-29
35200%%35316%%
35201Type: language35317Type: language
35318Subtag: tok
35319Description: Toki Pona
35320Added: 2022-02-25
35321%%
35322Type: language
35202Subtag: tol35323Subtag: tol
35203Description: Tolowa35324Description: Tolowa
35204Added: 2009-07-2935325Added: 2009-07-29
@@ -35541,6 +35662,8 @@ Added: 2009-07-29
35541%%35662%%
35542Type: language35663Type: language
35543Subtag: trv35664Subtag: trv
35665Description: Sediq
35666Description: Seediq
35544Description: Taroko35667Description: Taroko
35545Added: 2009-07-2935668Added: 2009-07-29
35546%%35669%%
@@ -36432,6 +36555,11 @@ Description: Ughele
36432Added: 2009-07-2936555Added: 2009-07-29
36433%%36556%%
36434Type: language36557Type: language
36558Subtag: ugh
36559Description: Kubachi
36560Added: 2022-02-25
36561%%
36562Type: language
36435Subtag: ugn36563Subtag: ugn
36436Description: Ugandan Sign Language36564Description: Ugandan Sign Language
36437Added: 2009-07-2936565Added: 2009-07-29
@@ -36742,6 +36870,11 @@ Deprecated: 2015-02-12
36742Preferred-Value: ema36870Preferred-Value: ema
36743%%36871%%
36744Type: language36872Type: language
36873Subtag: uon
36874Description: Kulon
36875Added: 2022-02-25
36876%%
36877Type: language
36745Subtag: upi36878Subtag: upi
36746Description: Umeda36879Description: Umeda
36747Added: 2009-07-2936880Added: 2009-07-29
@@ -36944,6 +37077,8 @@ Type: language
36944Subtag: uun37077Subtag: uun
36945Description: Kulon-Pazeh37078Description: Kulon-Pazeh
36946Added: 2009-07-2937079Added: 2009-07-29
37080Deprecated: 2022-02-25
37081Comments: see pzh, uon
36947%%37082%%
36948Type: language37083Type: language
36949Subtag: uur37084Subtag: uur
@@ -37714,6 +37849,11 @@ Description: Wadikali
37714Added: 2013-09-1037849Added: 2013-09-10
37715%%37850%%
37716Type: language37851Type: language
37852Subtag: wdt
37853Description: Wendat
37854Added: 2022-02-25
37855%%
37856Type: language
37717Subtag: wdu37857Subtag: wdu
37718Description: Wadjigu37858Description: Wadjigu
37719Added: 2009-07-2937859Added: 2009-07-29
@@ -38348,6 +38488,7 @@ Type: language
38348Subtag: wrd38488Subtag: wrd
38349Description: Warduji38489Description: Warduji
38350Added: 2009-07-2938490Added: 2009-07-29
38491Deprecated: 2022-02-25
38351%%38492%%
38352Type: language38493Type: language
38353Subtag: wrg38494Subtag: wrg
@@ -38613,6 +38754,8 @@ Type: language
38613Subtag: wya38754Subtag: wya
38614Description: Wyandot38755Description: Wyandot
38615Added: 2009-07-2938756Added: 2009-07-29
38757Deprecated: 2022-02-25
38758Comments: see wdt, wyn
38616%%38759%%
38617Type: language38760Type: language
38618Subtag: wyb38761Subtag: wyb
@@ -38630,6 +38773,11 @@ Description: Wymysorys
38630Added: 2009-07-2938773Added: 2009-07-29
38631%%38774%%
38632Type: language38775Type: language
38776Subtag: wyn
38777Description: Wyandot
38778Added: 2022-02-25
38779%%
38780Type: language
38633Subtag: wyr38781Subtag: wyr
38634Description: Wayoró38782Description: Wayoró
38635Added: 2009-07-2938783Added: 2009-07-29
@@ -38936,6 +39084,11 @@ Description: Kwandu
38936Added: 2017-02-2339084Added: 2017-02-23
38937%%39085%%
38938Type: language39086Type: language
39087Subtag: xdq
39088Description: Kaitag
39089Added: 2022-02-25
39090%%
39091Type: language
38939Subtag: xdy39092Subtag: xdy
38940Description: Malayic Dayak39093Description: Malayic Dayak
38941Added: 2009-07-2939094Added: 2009-07-29
@@ -39079,6 +39232,11 @@ Added: 2009-07-29
39079Macrolanguage: lah39232Macrolanguage: lah
39080%%39233%%
39081Type: language39234Type: language
39235Subtag: xhm
39236Description: Middle Khmer (1400 to 1850 CE)
39237Added: 2022-02-25
39238%%
39239Type: language
39082Subtag: xhr39240Subtag: xhr
39083Description: Hernican39241Description: Hernican
39084Added: 2009-07-2939242Added: 2009-07-29
@@ -39215,6 +39373,7 @@ Added: 2009-07-29
39215%%39373%%
39216Type: language39374Type: language
39217Subtag: xkk39375Subtag: xkk
39376Description: Kachok
39218Description: Kaco'39377Description: Kaco'
39219Added: 2009-07-2939378Added: 2009-07-29
39220%%39379%%
@@ -39469,6 +39628,7 @@ Macrolanguage: mg
39469%%39628%%
39470Type: language39629Type: language
39471Subtag: xmx39630Subtag: xmx
39631Description: Salawati
39472Description: Maden39632Description: Maden
39473Added: 2009-07-2939633Added: 2009-07-29
39474%%39634%%
@@ -41728,6 +41888,12 @@ Added: 2009-07-29
41728Macrolanguage: zap41888Macrolanguage: zap
41729%%41889%%
41730Type: language41890Type: language
41891Subtag: zcd
41892Description: Las Delicias Zapotec
41893Added: 2022-02-25
41894Macrolanguage: zap
41895%%
41896Type: language
41731Subtag: zch41897Subtag: zch
41732Description: Central Hongshuihe Zhuang41898Description: Central Hongshuihe Zhuang
41733Added: 2009-07-2941899Added: 2009-07-29
@@ -42700,6 +42866,13 @@ Prefix: ar
42700Macrolanguage: ar42866Macrolanguage: ar
42701%%42867%%
42702Type: extlang42868Type: extlang
42869Subtag: ajs
42870Description: Algerian Jewish Sign Language
42871Added: 2022-02-25
42872Preferred-Value: ajs
42873Prefix: sgn
42874%%
42875Type: extlang
42703Subtag: apc42876Subtag: apc
42704Description: North Levantine Arabic42877Description: North Levantine Arabic
42705Added: 2009-07-2942878Added: 2009-07-29
@@ -43104,6 +43277,13 @@ Preferred-Value: dsl
43104Prefix: sgn43277Prefix: sgn
43105%%43278%%
43106Type: extlang43279Type: extlang
43280Subtag: dsz
43281Description: Mardin Sign Language
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches