Merge ~vpa1977/ubuntu/+source/openjdk-lts:01_security_release_base into ubuntu/+source/openjdk-lts:ubuntu/devel
- Git
- lp:~vpa1977/ubuntu/+source/openjdk-lts
- 01_security_release_base
- Merge into 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) |
||||
Related bugs: |
|
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 |
Commit message
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/
Testing:
- package builds successfully
[1] https:/
[2] https:/
[3] https:/
[4] https:/
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
1 | diff --git a/debian/changelog b/debian/changelog |
2 | index 9ab7e64..60120cf 100644 |
3 | --- a/debian/changelog |
4 | +++ b/debian/changelog |
5 | @@ -1,3 +1,14 @@ |
6 | +openjdk-lts (11.0.19+7~us1-0ubuntu1) UNRELEASED; urgency=medium |
7 | + |
8 | + * OpenJDK 11.0.19 release, build 7. |
9 | + - CVE-2023-21930, CVE-2023-21967, CVE-2023-21954, CVE-2023-21939, |
10 | + CVE-2023-21938, CVE-2023-21968, CVE-2023-21937. |
11 | + - Release notes: |
12 | + TODO: waiting for announcement |
13 | + - d/p/*: refresh patches. |
14 | + |
15 | + -- Vladimir Petko <vladimir.petko@canonical.com> Thu, 20 Apr 2023 14:25:28 +1200 |
16 | + |
17 | openjdk-lts (11.0.18+10-0ubuntu5) lunar; urgency=medium |
18 | |
19 | * d/control: add jtreg6 dependencies, regenerate control. |
20 | diff --git a/debian/patches/8199220.diff b/debian/patches/8199220.diff |
21 | index b92cdee..bc7be6b 100644 |
22 | --- a/debian/patches/8199220.diff |
23 | +++ b/debian/patches/8199220.diff |
24 | @@ -9,7 +9,7 @@ Reviewed-by: dholmes, stuefe, eosterlund, glaubitz, coleenp |
25 | |
26 | --- a/src/hotspot/share/utilities/debug.hpp |
27 | +++ b/src/hotspot/share/utilities/debug.hpp |
28 | -@@ -202,6 +202,7 @@ void warning(const char* format, ...) AT |
29 | +@@ -202,6 +202,7 @@ |
30 | // use of an array type. |
31 | |
32 | template<bool x> struct STATIC_ASSERT_FAILURE; |
33 | 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 |
34 | index d80f413..6f1d7ee 100644 |
35 | --- a/debian/patches/Don-t-optimize-fdlibm-fork-for-Zero-on-linux-sparc-Z.patch |
36 | +++ b/debian/patches/Don-t-optimize-fdlibm-fork-for-Zero-on-linux-sparc-Z.patch |
37 | @@ -9,7 +9,7 @@ Subject: [PATCH] Don't optimize fdlibm-fork for Zero on linux-sparc (Zero) |
38 | |
39 | --- a/make/hotspot/lib/JvmOverrideFiles.gmk |
40 | +++ b/make/hotspot/lib/JvmOverrideFiles.gmk |
41 | -@@ -48,6 +48,15 @@ LIBJVM_FDLIBM_COPY_OPT_FLAG := $(CXX_O_F |
42 | +@@ -48,6 +48,15 @@ |
43 | # by using -ffp-contract=off on GCC/Clang platforms. |
44 | ifneq ($(FDLIBM_CFLAGS), ) |
45 | LIBJVM_FDLIBM_COPY_OPT_FLAG := $(CXX_O_FLAG_NORM) |
46 | @@ -24,4 +24,4 @@ Subject: [PATCH] Don't optimize fdlibm-fork for Zero on linux-sparc (Zero) |
47 | + endif |
48 | endif |
49 | |
50 | - ifeq ($(OPENJDK_TARGET_OS), linux) |
51 | + ifeq ($(call isTargetOs, linux), true) |
52 | diff --git a/debian/patches/atk-wrapper-security.diff b/debian/patches/atk-wrapper-security.diff |
53 | index b12072d..a4e5333 100644 |
54 | --- a/debian/patches/atk-wrapper-security.diff |
55 | +++ b/debian/patches/atk-wrapper-security.diff |
56 | @@ -1,8 +1,6 @@ |
57 | -Index: b/src/java.base/share/conf/security/java.security |
58 | -=================================================================== |
59 | --- a/src/java.base/share/conf/security/java.security |
60 | +++ b/src/java.base/share/conf/security/java.security |
61 | -@@ -316,6 +316,7 @@ keystore.type.compat=true |
62 | +@@ -316,6 +316,7 @@ |
63 | # |
64 | package.access=sun.misc.,\ |
65 | sun.reflect.,\ |
66 | diff --git a/debian/patches/default-jvm-cfg.diff b/debian/patches/default-jvm-cfg.diff |
67 | index dd2df79..342ce80 100644 |
68 | --- a/debian/patches/default-jvm-cfg.diff |
69 | +++ b/debian/patches/default-jvm-cfg.diff |
70 | @@ -1,6 +1,6 @@ |
71 | --- a/src/java.base/share/native/libjli/java.c |
72 | +++ b/src/java.base/share/native/libjli/java.c |
73 | -@@ -2067,7 +2067,7 @@ jint |
74 | +@@ -2067,7 +2067,7 @@ |
75 | ReadKnownVMs(const char *jvmCfgName, jboolean speculative) |
76 | { |
77 | FILE *jvmCfg; |
78 | @@ -9,7 +9,7 @@ |
79 | int cnt = 0; |
80 | int lineno = 0; |
81 | jlong start = 0, end = 0; |
82 | -@@ -2082,6 +2082,11 @@ ReadKnownVMs(const char *jvmCfgName, jbo |
83 | +@@ -2082,6 +2082,11 @@ |
84 | |
85 | jvmCfg = fopen(jvmCfgName, "r"); |
86 | if (jvmCfg == NULL) { |
87 | diff --git a/debian/patches/disable-doclint-by-default.diff b/debian/patches/disable-doclint-by-default.diff |
88 | index 9813ca8..6f4a737 100644 |
89 | --- a/debian/patches/disable-doclint-by-default.diff |
90 | +++ b/debian/patches/disable-doclint-by-default.diff |
91 | @@ -1,8 +1,6 @@ |
92 | -Index: b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/WorkArounds.java |
93 | -=================================================================== |
94 | --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/WorkArounds.java |
95 | +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/WorkArounds.java |
96 | -@@ -126,7 +126,7 @@ public class WorkArounds { |
97 | +@@ -126,7 +126,7 @@ |
98 | } |
99 | |
100 | if (!msgOptionSeen) { |
101 | diff --git a/debian/patches/dnd-files.diff b/debian/patches/dnd-files.diff |
102 | index bbc7b9e..0e6b09b 100644 |
103 | --- a/debian/patches/dnd-files.diff |
104 | +++ b/debian/patches/dnd-files.diff |
105 | @@ -1,8 +1,6 @@ |
106 | -Index: b/src/java.desktop/unix/classes/sun/awt/X11/XDataTransferer.java |
107 | -=================================================================== |
108 | --- a/src/java.desktop/unix/classes/sun/awt/X11/XDataTransferer.java |
109 | +++ b/src/java.desktop/unix/classes/sun/awt/X11/XDataTransferer.java |
110 | -@@ -273,14 +273,14 @@ public class XDataTransferer extends Dat |
111 | +@@ -273,14 +273,14 @@ |
112 | BufferedReader reader = new BufferedReader(isr)) { |
113 | String line; |
114 | ArrayList<URI> uriList = new ArrayList<>(); |
115 | diff --git a/debian/patches/hotspot-libpath.diff b/debian/patches/hotspot-libpath.diff |
116 | index caf7616..62690e7 100644 |
117 | --- a/debian/patches/hotspot-libpath.diff |
118 | +++ b/debian/patches/hotspot-libpath.diff |
119 | @@ -28,15 +28,15 @@ |
120 | #define SYS_EXT_DIR "/usr/java/packages" |
121 | --- a/make/hotspot/lib/CompileJvm.gmk |
122 | +++ b/make/hotspot/lib/CompileJvm.gmk |
123 | -@@ -131,6 +131,11 @@ |
124 | - endif |
125 | - endif |
126 | +@@ -84,6 +84,11 @@ |
127 | + ################################################################################ |
128 | + # Platform specific setup |
129 | |
130 | +DEB_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null || true) |
131 | +ifneq (,$(DEB_MULTIARCH)) |
132 | -+JVM_CFLAGS += -DDEB_MULTIARCH="\"$(DEB_MULTIARCH)\"" |
133 | ++ JVM_CFLAGS += -DDEB_MULTIARCH="\"$(DEB_MULTIARCH)\"" |
134 | +endif |
135 | + |
136 | - ifeq ($(OPENJDK_TARGET_OS), windows) |
137 | - ifeq ($(OPENJDK_TARGET_CPU_BITS), 64) |
138 | - RC_DESC := 64-Bit$(SPACE) |
139 | + # ARM source selection |
140 | + |
141 | + ifeq ($(call And, $(call isTargetOs, linux) $(call isTargetCpu, arm)), true) |
142 | diff --git a/debian/patches/icc_loading_with_symlink.diff b/debian/patches/icc_loading_with_symlink.diff |
143 | index 8cb7140..664e0ab 100644 |
144 | --- a/debian/patches/icc_loading_with_symlink.diff |
145 | +++ b/debian/patches/icc_loading_with_symlink.diff |
146 | @@ -1,6 +1,6 @@ |
147 | --- a/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java |
148 | +++ b/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java |
149 | -@@ -1753,9 +1753,6 @@ public class ICC_Profile implements Seri |
150 | +@@ -1753,9 +1753,6 @@ |
151 | dir = st.nextToken(); |
152 | fullPath = dir + File.separatorChar + fileName; |
153 | f = new File(fullPath); |
154 | @@ -10,7 +10,7 @@ |
155 | } |
156 | } |
157 | |
158 | -@@ -1795,26 +1792,6 @@ public class ICC_Profile implements Seri |
159 | +@@ -1795,26 +1792,6 @@ |
160 | } |
161 | |
162 | /** |
163 | diff --git a/debian/patches/icedtea-override-redirect-compiz.diff b/debian/patches/icedtea-override-redirect-compiz.diff |
164 | index 64f31a6..fe5da60 100644 |
165 | --- a/debian/patches/icedtea-override-redirect-compiz.diff |
166 | +++ b/debian/patches/icedtea-override-redirect-compiz.diff |
167 | @@ -1,8 +1,6 @@ |
168 | -Index: b/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java |
169 | -=================================================================== |
170 | --- a/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java |
171 | +++ b/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java |
172 | -@@ -1260,6 +1260,7 @@ class XWindowPeer extends XPanelPeer imp |
173 | +@@ -1260,6 +1260,7 @@ |
174 | |
175 | boolean isOverrideRedirect() { |
176 | return XWM.getWMID() == XWM.OPENLOOK_WM || |
177 | diff --git a/debian/patches/jdk-getAccessibleValue.diff b/debian/patches/jdk-getAccessibleValue.diff |
178 | index 80b6907..e1daf8f 100644 |
179 | --- a/debian/patches/jdk-getAccessibleValue.diff |
180 | +++ b/debian/patches/jdk-getAccessibleValue.diff |
181 | @@ -1,6 +1,6 @@ |
182 | --- a/src/java.desktop/share/classes/javax/swing/JTree.java |
183 | +++ b/src/java.desktop/share/classes/javax/swing/JTree.java |
184 | -@@ -5063,7 +5063,7 @@ public class JTree extends JComponent im |
185 | +@@ -5063,7 +5063,7 @@ |
186 | public AccessibleSelection getAccessibleSelection() { |
187 | AccessibleContext ac = getCurrentAccessibleContext(); |
188 | if (ac != null && isLeaf) { |
189 | @@ -9,7 +9,7 @@ |
190 | } else { |
191 | return this; |
192 | } |
193 | -@@ -5078,7 +5078,7 @@ public class JTree extends JComponent im |
194 | +@@ -5078,7 +5078,7 @@ |
195 | public AccessibleText getAccessibleText() { |
196 | AccessibleContext ac = getCurrentAccessibleContext(); |
197 | if (ac != null) { |
198 | @@ -18,7 +18,7 @@ |
199 | } else { |
200 | return null; |
201 | } |
202 | -@@ -5093,7 +5093,7 @@ public class JTree extends JComponent im |
203 | +@@ -5093,7 +5093,7 @@ |
204 | public AccessibleValue getAccessibleValue() { |
205 | AccessibleContext ac = getCurrentAccessibleContext(); |
206 | if (ac != null) { |
207 | @@ -29,7 +29,7 @@ |
208 | } |
209 | --- a/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java |
210 | +++ b/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java |
211 | -@@ -1114,7 +1114,12 @@ public class JTableHeader extends JCompo |
212 | +@@ -1114,7 +1114,12 @@ |
213 | } |
214 | |
215 | public AccessibleAction getAccessibleAction() { |
216 | @@ -43,7 +43,7 @@ |
217 | } |
218 | |
219 | /** |
220 | -@@ -1130,15 +1135,30 @@ public class JTableHeader extends JCompo |
221 | +@@ -1130,15 +1135,30 @@ |
222 | } |
223 | |
224 | public AccessibleSelection getAccessibleSelection() { |
225 | @@ -79,7 +79,7 @@ |
226 | |
227 | --- a/src/java.desktop/share/classes/javax/swing/JTable.java |
228 | +++ b/src/java.desktop/share/classes/javax/swing/JTable.java |
229 | -@@ -9165,7 +9165,12 @@ public class JTable extends JComponent i |
230 | +@@ -9165,7 +9165,12 @@ |
231 | * @return the <code>AccessibleAction</code>, or <code>null</code> |
232 | */ |
233 | public AccessibleAction getAccessibleAction() { |
234 | @@ -93,7 +93,7 @@ |
235 | } |
236 | |
237 | /** |
238 | -@@ -9187,7 +9192,12 @@ public class JTable extends JComponent i |
239 | +@@ -9187,7 +9192,12 @@ |
240 | * <code>null</code> |
241 | */ |
242 | public AccessibleSelection getAccessibleSelection() { |
243 | @@ -107,7 +107,7 @@ |
244 | } |
245 | |
246 | /** |
247 | -@@ -9197,7 +9207,12 @@ public class JTable extends JComponent i |
248 | +@@ -9197,7 +9207,12 @@ |
249 | * @return the <code>AccessibleText</code>, or <code>null</code> |
250 | */ |
251 | public AccessibleText getAccessibleText() { |
252 | @@ -121,7 +121,7 @@ |
253 | } |
254 | |
255 | /** |
256 | -@@ -9207,7 +9222,12 @@ public class JTable extends JComponent i |
257 | +@@ -9207,7 +9222,12 @@ |
258 | * @return the <code>AccessibleValue</code>, or <code>null</code> |
259 | */ |
260 | public AccessibleValue getAccessibleValue() { |
261 | @@ -137,7 +137,7 @@ |
262 | |
263 | --- a/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java |
264 | +++ b/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java |
265 | -@@ -6549,7 +6549,7 @@ final public class AccessBridge { |
266 | +@@ -6549,7 +6549,7 @@ |
267 | public AccessibleSelection getAccessibleSelection() { |
268 | AccessibleContext ac = getCurrentAccessibleContext(); |
269 | if (ac != null && isLeaf) { |
270 | @@ -146,7 +146,7 @@ |
271 | } else { |
272 | return this; |
273 | } |
274 | -@@ -6564,7 +6564,7 @@ final public class AccessBridge { |
275 | +@@ -6564,7 +6564,7 @@ |
276 | public AccessibleText getAccessibleText() { |
277 | AccessibleContext ac = getCurrentAccessibleContext(); |
278 | if (ac != null) { |
279 | @@ -155,7 +155,7 @@ |
280 | } else { |
281 | return null; |
282 | } |
283 | -@@ -6579,7 +6579,7 @@ final public class AccessBridge { |
284 | +@@ -6579,7 +6579,7 @@ |
285 | public AccessibleValue getAccessibleValue() { |
286 | AccessibleContext ac = getCurrentAccessibleContext(); |
287 | if (ac != null) { |
288 | diff --git a/debian/patches/jdk-i18n-pt_BR.diff b/debian/patches/jdk-i18n-pt_BR.diff |
289 | index 7c561f2..fde9fd8 100644 |
290 | --- a/debian/patches/jdk-i18n-pt_BR.diff |
291 | +++ b/debian/patches/jdk-i18n-pt_BR.diff |
292 | @@ -1,8 +1,6 @@ |
293 | -Index: b/src/java.desktop/share/classes/sun/awt/resources/awt_pt_BR.properties |
294 | -=================================================================== |
295 | --- a/src/java.desktop/share/classes/sun/awt/resources/awt_pt_BR.properties |
296 | +++ b/src/java.desktop/share/classes/sun/awt/resources/awt_pt_BR.properties |
297 | -@@ -13,7 +13,7 @@ AWT.altGraph=Alt Graph |
298 | +@@ -13,7 +13,7 @@ |
299 | # Key names |
300 | AWT.enter=Enter |
301 | AWT.backSpace=Backspace |
302 | diff --git a/debian/patches/jexec.diff b/debian/patches/jexec.diff |
303 | index 8f56d30..c160b90 100644 |
304 | --- a/debian/patches/jexec.diff |
305 | +++ b/debian/patches/jexec.diff |
306 | @@ -1,6 +1,6 @@ |
307 | --- a/src/java.base/unix/native/launcher/jexec.c |
308 | +++ b/src/java.base/unix/native/launcher/jexec.c |
309 | -@@ -168,9 +168,10 @@ int main(int argc, const char * argv[]) |
310 | +@@ -168,9 +168,10 @@ |
311 | |
312 | /* Get the path to the java binary, which is in a known position relative |
313 | * to our current position, which is in argv[0]. */ |
314 | @@ -14,17 +14,17 @@ |
315 | errorExit(errno, BAD_ARG_MSG); |
316 | --- a/make/launcher/Launcher-java.base.gmk |
317 | +++ b/make/launcher/Launcher-java.base.gmk |
318 | -@@ -57,6 +57,9 @@ $(eval $(call SetupBuildLauncher, keytoo |
319 | +@@ -57,6 +57,9 @@ |
320 | ################################################################################ |
321 | |
322 | - ifeq ($(OPENJDK_TARGET_OS), linux) |
323 | + ifeq ($(call isTargetOs, linux), true) |
324 | + ifeq (,$(DEBIAN_JDK_BASE_DIR)) |
325 | + $(error DEBIAN_JDK_BASE_DIR must be defined for jexec build) |
326 | + endif |
327 | $(eval $(call SetupJdkExecutable, BUILD_JEXEC, \ |
328 | NAME := jexec, \ |
329 | SRC := $(TOPDIR)/src/$(MODULE)/unix/native/launcher, \ |
330 | -@@ -64,7 +67,7 @@ ifeq ($(OPENJDK_TARGET_OS), linux) |
331 | +@@ -64,7 +67,7 @@ |
332 | OPTIMIZATION := LOW, \ |
333 | CFLAGS := $(CFLAGS_JDKEXE) \ |
334 | -I$(TOPDIR)/src/$(MODULE)/share/native/libjli, \ |
335 | diff --git a/debian/patches/keep-gtk2-as-default.patch b/debian/patches/keep-gtk2-as-default.patch |
336 | index 6ed0131..7db75dc 100644 |
337 | --- a/debian/patches/keep-gtk2-as-default.patch |
338 | +++ b/debian/patches/keep-gtk2-as-default.patch |
339 | @@ -25,9 +25,8 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ |
340 | 8198649: Switch AWT/Swing's default GTK version to 3 |
341 | Reviewed-by: psadhukhan, kaddepalli |
342 | |
343 | -diff -r 79f6a4dc221e -r 3e3696a308e1 src/java.desktop/unix/native/libawt_xawt/awt/gtk_interface.c |
344 | ---- a/src/java.desktop/unix/native/libawt_xawt/awt/gtk_interface.c Mon Mar 19 10:46:31 2018 -0700 |
345 | -+++ b/src/java.desktop/unix/native/libawt_xawt/awt/gtk_interface.c Mon Mar 19 11:29:50 2018 -0700 |
346 | +--- a/src/java.desktop/unix/native/libawt_xawt/awt/gtk_interface.c |
347 | ++++ b/src/java.desktop/unix/native/libawt_xawt/awt/gtk_interface.c |
348 | @@ -45,18 +45,18 @@ |
349 | |
350 | static GtkLib gtk_libs[] = { |
351 | @@ -54,4 +53,3 @@ diff -r 79f6a4dc221e -r 3e3696a308e1 src/java.desktop/unix/native/libawt_xawt/aw |
352 | } |
353 | }; |
354 | |
355 | - |
356 | diff --git a/debian/patches/ldap-timeout-test-use-ip.patch b/debian/patches/ldap-timeout-test-use-ip.patch |
357 | index 3e40bd7..fd61a86 100644 |
358 | --- a/debian/patches/ldap-timeout-test-use-ip.patch |
359 | +++ b/debian/patches/ldap-timeout-test-use-ip.patch |
360 | @@ -14,6 +14,6 @@ Last-Update: 2023-03-27 |
361 | + // there should not be a LDAP provider on multicast address, but |
362 | + // network stack should be able to send to it |
363 | + env.put(Context.PROVIDER_URL, "ldap://224.0.0.0:1234"); |
364 | - |
365 | + |
366 | try { |
367 | futures.add(executorService.submit(() -> { attemptConnect(env); return null; })); |
368 | diff --git a/debian/patches/libpcsclite-dlopen.diff b/debian/patches/libpcsclite-dlopen.diff |
369 | index 39261af..06781b2 100644 |
370 | --- a/debian/patches/libpcsclite-dlopen.diff |
371 | +++ b/debian/patches/libpcsclite-dlopen.diff |
372 | @@ -1,8 +1,6 @@ |
373 | -Index: b/src/java.smartcardio/unix/classes/sun/security/smartcardio/PlatformPCSC.java |
374 | -=================================================================== |
375 | --- a/src/java.smartcardio/unix/classes/sun/security/smartcardio/PlatformPCSC.java |
376 | +++ b/src/java.smartcardio/unix/classes/sun/security/smartcardio/PlatformPCSC.java |
377 | -@@ -48,6 +48,7 @@ class PlatformPCSC { |
378 | +@@ -48,6 +48,7 @@ |
379 | |
380 | private final static String PROP_NAME = "sun.security.smartcardio.library"; |
381 | |
382 | @@ -10,7 +8,7 @@ Index: b/src/java.smartcardio/unix/classes/sun/security/smartcardio/PlatformPCSC |
383 | private final static String LIB1 = "/usr/$LIBISA/libpcsclite.so"; |
384 | private final static String LIB2 = "/usr/local/$LIBISA/libpcsclite.so"; |
385 | private final static String PCSC_FRAMEWORK = "/System/Library/Frameworks/PCSC.framework/Versions/Current/PCSC"; |
386 | -@@ -104,22 +105,9 @@ class PlatformPCSC { |
387 | +@@ -104,22 +105,9 @@ |
388 | if (lib.length() != 0) { |
389 | return lib; |
390 | } |
391 | diff --git a/debian/patches/log-generated-classes-test.patch b/debian/patches/log-generated-classes-test.patch |
392 | index 849de17..6914651 100644 |
393 | --- a/debian/patches/log-generated-classes-test.patch |
394 | +++ b/debian/patches/log-generated-classes-test.patch |
395 | @@ -7,7 +7,7 @@ Forwarded: not-needed |
396 | Last-Update: 2023-03-27 |
397 | --- a/test/jdk/java/lang/invoke/lambda/LogGeneratedClassesTest.java |
398 | +++ b/test/jdk/java/lang/invoke/lambda/LogGeneratedClassesTest.java |
399 | -@@ -195,14 +195,21 @@ |
400 | +@@ -191,14 +191,21 @@ |
401 | |
402 | @Test |
403 | public void testDumpDirNotWritable() throws IOException { |
404 | diff --git a/debian/patches/multiple-pkcs11-library-init.diff b/debian/patches/multiple-pkcs11-library-init.diff |
405 | index aec9f96..bd2322b 100644 |
406 | --- a/debian/patches/multiple-pkcs11-library-init.diff |
407 | +++ b/debian/patches/multiple-pkcs11-library-init.diff |
408 | @@ -15,7 +15,7 @@ Allow multiple PKCS11 library initialisation to be a non-critical error. |
409 | |
410 | // same as allowSingleThreadedModules but controlled via a system property |
411 | // and applied to all providers. if set to false, no SunPKCS11 instances |
412 | -@@ -1026,6 +1027,8 @@ |
413 | +@@ -1030,6 +1031,8 @@ |
414 | handleStartupErrors = ERR_IGNORE_LIB; |
415 | } else if (val.equals("halt")) { |
416 | handleStartupErrors = ERR_HALT; |
417 | diff --git a/debian/patches/reproducible-build-user.diff b/debian/patches/reproducible-build-user.diff |
418 | index 60c7a7b..6732df5 100644 |
419 | --- a/debian/patches/reproducible-build-user.diff |
420 | +++ b/debian/patches/reproducible-build-user.diff |
421 | @@ -3,12 +3,12 @@ Author: Emmanuel Bourg <ebourg@apache.org> |
422 | Forwarded: no |
423 | --- a/make/autoconf/basic.m4 |
424 | +++ b/make/autoconf/basic.m4 |
425 | -@@ -100,7 +100,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS], |
426 | - |
427 | +@@ -100,7 +100,7 @@ |
428 | + |
429 | # Setup username (for use in adhoc version strings etc) |
430 | # Outer [ ] to quote m4. |
431 | - [ USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'` ] |
432 | + [ USERNAME="unknown" ] |
433 | AC_SUBST(USERNAME) |
434 | ]) |
435 | - |
436 | + |
437 | diff --git a/debian/patches/reproducible-character-data.diff b/debian/patches/reproducible-character-data.diff |
438 | index 93412a0..c029535 100644 |
439 | --- a/debian/patches/reproducible-character-data.diff |
440 | +++ b/debian/patches/reproducible-character-data.diff |
441 | @@ -3,7 +3,7 @@ Author: Emmanuel Bourg <ebourg@apache.org> |
442 | Forwarded: no |
443 | --- a/make/jdk/src/classes/build/tools/generatecharacter/GenerateCharacter.java |
444 | +++ b/make/jdk/src/classes/build/tools/generatecharacter/GenerateCharacter.java |
445 | -@@ -693,7 +693,7 @@ OUTER: for (int i = 0; i < n; i += m) { |
446 | +@@ -693,7 +693,7 @@ |
447 | PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(theOutputFileName))); |
448 | out.println(commentStart + |
449 | " This file was generated AUTOMATICALLY from a template file " + |
450 | @@ -12,7 +12,7 @@ Forwarded: no |
451 | int marklen = commandMarker.length(); |
452 | LOOP: while(true) { |
453 | try { |
454 | -@@ -1819,7 +1819,8 @@ OUTER: for (int i = 0; i < n; i += m) { |
455 | +@@ -1819,7 +1819,8 @@ |
456 | } |
457 | commentStart = (Csyntax ? "/*" : "//"); |
458 | commentEnd = (Csyntax ? " */" : ""); |
459 | @@ -20,5 +20,5 @@ Forwarded: no |
460 | + commandLineDescription = desc.toString().replace("\\", "\\\\") |
461 | + .replace(System.getProperty("user.dir").replace("make/gensrc", ""), ""); |
462 | } |
463 | - |
464 | + |
465 | private static void searchBins(long[] map, int binsOccupied) throws Exception { |
466 | diff --git a/debian/patches/reproducible-copyright-headers.diff b/debian/patches/reproducible-copyright-headers.diff |
467 | index 6a91c5a..020e3bf 100644 |
468 | --- a/debian/patches/reproducible-copyright-headers.diff |
469 | +++ b/debian/patches/reproducible-copyright-headers.diff |
470 | @@ -11,7 +11,7 @@ Forwarded: no |
471 | import java.util.GregorianCalendar; |
472 | import java.util.Locale; |
473 | import java.util.TimeZone; |
474 | -@@ -150,8 +151,14 @@ class CopyrightHeaders { |
475 | +@@ -150,8 +151,14 @@ |
476 | } |
477 | |
478 | private static int getYear() { |
479 | @@ -30,7 +30,7 @@ Forwarded: no |
480 | // no instantiation |
481 | --- a/make/jdk/src/classes/build/tools/generatelsrequivmaps/EquivMapsGenerator.java |
482 | +++ b/make/jdk/src/classes/build/tools/generatelsrequivmaps/EquivMapsGenerator.java |
483 | -@@ -34,9 +34,13 @@ import java.time.ZoneId; |
484 | +@@ -34,9 +34,13 @@ |
485 | import java.time.ZonedDateTime; |
486 | import java.util.ArrayList; |
487 | import java.util.Arrays; |
488 | @@ -44,7 +44,7 @@ Forwarded: no |
489 | import java.util.TreeMap; |
490 | import java.util.stream.Collectors; |
491 | |
492 | -@@ -246,8 +250,15 @@ public class EquivMapsGenerator { |
493 | +@@ -246,8 +250,15 @@ |
494 | + "}"; |
495 | |
496 | private static String getOpenJDKCopyright() { |
497 | diff --git a/debian/patches/reproducible-module-info.diff b/debian/patches/reproducible-module-info.diff |
498 | index 8c85fb1..487acf0 100644 |
499 | --- a/debian/patches/reproducible-module-info.diff |
500 | +++ b/debian/patches/reproducible-module-info.diff |
501 | @@ -3,7 +3,7 @@ Author: Emmanuel Bourg <ebourg@apache.org> |
502 | Forwarded: no |
503 | --- a/make/jdk/src/classes/build/tools/module/GenModuleInfoSource.java |
504 | +++ b/make/jdk/src/classes/build/tools/module/GenModuleInfoSource.java |
505 | -@@ -154,9 +154,10 @@ public class GenModuleInfoSource { |
506 | +@@ -154,9 +154,10 @@ |
507 | if (l.trim().startsWith("module ")) { |
508 | if (debug) { |
509 | // print URI rather than file path to avoid escape |
510 | diff --git a/debian/patches/riscv64.diff b/debian/patches/riscv64.diff |
511 | index 218aa5d..1ec5fd8 100644 |
512 | --- a/debian/patches/riscv64.diff |
513 | +++ b/debian/patches/riscv64.diff |
514 | @@ -21,7 +21,7 @@ Reviewed-by: aph, erikj, ehelin, ihse |
515 | +fi |
516 | + |
517 | DIR=`dirname $0` |
518 | - OUT=`. $DIR/autoconf-config.guess` |
519 | + OUT=`. $DIR/autoconf-config.guess 2> /dev/null` |
520 | |
521 | --- a/make/autoconf/build-aux/config.sub |
522 | +++ b/make/autoconf/build-aux/config.sub |
523 | diff --git a/debian/patches/s390x-thread-stack-size.diff b/debian/patches/s390x-thread-stack-size.diff |
524 | index 6308b10..d7dddb9 100644 |
525 | --- a/debian/patches/s390x-thread-stack-size.diff |
526 | +++ b/debian/patches/s390x-thread-stack-size.diff |
527 | @@ -14,17 +14,17 @@ |
528 | #endif // _LP64 |
529 | --- a/make/autoconf/boot-jdk.m4 |
530 | +++ b/make/autoconf/boot-jdk.m4 |
531 | -@@ -459,6 +459,9 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS], |
532 | +@@ -459,6 +459,9 @@ |
533 | fi |
534 | UTIL_ADD_JVM_ARG_IF_OK([-Xmx${JVM_MAX_HEAP}M],boot_jdk_jvmargs_big,[$JAVA]) |
535 | UTIL_ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs_big,[$JAVA]) |
536 | + if test "$VAR_CPU" = s390x; then |
537 | + UTIL_ADD_JVM_ARG_IF_OK([-Xss1600k],boot_jdk_jvmargs_big,[$JAVA]) |
538 | + fi |
539 | - |
540 | + |
541 | AC_MSG_RESULT([$boot_jdk_jvmargs_big]) |
542 | - |
543 | -@@ -488,6 +491,9 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS], |
544 | + |
545 | +@@ -488,6 +491,9 @@ |
546 | UTIL_ADD_JVM_ARG_IF_OK([-XX:+UseSerialGC],boot_jdk_jvmargs_small,[$JAVA]) |
547 | UTIL_ADD_JVM_ARG_IF_OK([-Xms32M],boot_jdk_jvmargs_small,[$JAVA]) |
548 | UTIL_ADD_JVM_ARG_IF_OK([-Xmx512M],boot_jdk_jvmargs_small,[$JAVA]) |
549 | @@ -32,11 +32,11 @@ |
550 | + UTIL_ADD_JVM_ARG_IF_OK([-Xss1600k],boot_jdk_jvmargs_small,[$JAVA]) |
551 | + fi |
552 | UTIL_ADD_JVM_ARG_IF_OK([-XX:TieredStopAtLevel=1],boot_jdk_jvmargs_small,[$JAVA]) |
553 | - |
554 | + |
555 | AC_MSG_RESULT([$boot_jdk_jvmargs_small]) |
556 | --- a/make/autoconf/build-performance.m4 |
557 | +++ b/make/autoconf/build-performance.m4 |
558 | -@@ -443,6 +443,9 @@ AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC], |
559 | +@@ -443,6 +443,9 @@ |
560 | MX_VALUE=512 |
561 | fi |
562 | UTIL_ADD_JVM_ARG_IF_OK([-Xms${MS_VALUE}M -Xmx${MX_VALUE}M],SJAVAC_SERVER_JAVA_FLAGS,[$SJAVAC_SERVER_JAVA]) |
563 | @@ -44,5 +44,5 @@ |
564 | + UTIL_ADD_JVM_ARG_IF_OK([-Xss1600k],SJAVAC_SERVER_JAVA_FLAGS,[$SJAVAC_SERVER_JAVA]) |
565 | + fi |
566 | AC_SUBST(SJAVAC_SERVER_JAVA_FLAGS) |
567 | - |
568 | + |
569 | AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac], |
570 | diff --git a/debian/patches/system-pcsclite.diff b/debian/patches/system-pcsclite.diff |
571 | index 09b4ad8..5b6df31 100644 |
572 | --- a/debian/patches/system-pcsclite.diff |
573 | +++ b/debian/patches/system-pcsclite.diff |
574 | @@ -52,7 +52,7 @@ |
575 | +]) |
576 | --- a/make/autoconf/spec.gmk.in |
577 | +++ b/make/autoconf/spec.gmk.in |
578 | -@@ -776,6 +776,7 @@ |
579 | +@@ -780,6 +780,7 @@ |
580 | ENABLE_INTREE_EC:=@ENABLE_INTREE_EC@ |
581 | USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@ |
582 | USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@ |
583 | diff --git a/debian/patches/test-use-ip-address.patch b/debian/patches/test-use-ip-address.patch |
584 | index 02acac7..dbe0843 100644 |
585 | --- a/debian/patches/test-use-ip-address.patch |
586 | +++ b/debian/patches/test-use-ip-address.patch |
587 | @@ -17,7 +17,7 @@ Last-Update: 2023-03-27 |
588 | NetworkInterface inf = NetworkInterface.getByInetAddress(addr); |
589 | --- a/test/jdk/java/net/InetAddress/getOriginalHostName.java |
590 | +++ b/test/jdk/java/net/InetAddress/getOriginalHostName.java |
591 | -@@ -39,7 +39,7 @@ |
592 | +@@ -40,7 +40,7 @@ |
593 | SharedSecrets.getJavaNetInetAddressAccess(); |
594 | |
595 | public static void main(String[] args) throws Exception { |
596 | diff --git a/debian/patches/update-assertion-for-armhf.patch b/debian/patches/update-assertion-for-armhf.patch |
597 | index 582974c..0860a73 100644 |
598 | --- a/debian/patches/update-assertion-for-armhf.patch |
599 | +++ b/debian/patches/update-assertion-for-armhf.patch |
600 | @@ -5,7 +5,7 @@ Author: Vladimir Petko <vladimir.petko@canonical.com> |
601 | Bug: https://bugs.openjdk.org/browse/JDK-8305480 |
602 | --- a/test/hotspot/jtreg/runtime/NMT/VirtualAllocCommitMerge.java |
603 | +++ b/test/hotspot/jtreg/runtime/NMT/VirtualAllocCommitMerge.java |
604 | -@@ -320,6 +320,6 @@ |
605 | +@@ -321,6 +321,6 @@ |
606 | public static void checkCommitted(OutputAnalyzer output, long addr, long size, String sizeString) { |
607 | output.shouldMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*" |
608 | + Long.toHexString(addr + size) |
609 | diff --git a/debian/patches/update-permission-test.patch b/debian/patches/update-permission-test.patch |
610 | index d1437d5..f7a503c 100644 |
611 | --- a/debian/patches/update-permission-test.patch |
612 | +++ b/debian/patches/update-permission-test.patch |
613 | @@ -4,7 +4,7 @@ Author: Vladimir Petko <vladimir.petko@canonical.com> |
614 | Last-Update: 2023-03-24 |
615 | --- a/test/jdk/java/lang/ProcessHandle/PermissionTest.java |
616 | +++ b/test/jdk/java/lang/ProcessHandle/PermissionTest.java |
617 | -@@ -219,6 +219,7 @@ |
618 | +@@ -216,6 +216,7 @@ |
619 | permissions.add(new PropertyPermission("testng.mode.dryrun", "read")); |
620 | permissions.add(new PropertyPermission("testng.report.xml.name", "read")); |
621 | permissions.add(new PropertyPermission("testng.timezone", "read")); |
622 | @@ -14,7 +14,7 @@ Last-Update: 2023-03-24 |
623 | } |
624 | --- a/test/jdk/java/sql/testng/util/TestPolicy.java |
625 | +++ b/test/jdk/java/sql/testng/util/TestPolicy.java |
626 | -@@ -114,6 +114,8 @@ |
627 | +@@ -113,6 +113,8 @@ |
628 | permissions.add(new PropertyPermission("testng.mode.dryrun", "read")); |
629 | permissions.add(new PropertyPermission("testng.report.xml.name", "read")); |
630 | permissions.add(new PropertyPermission("testng.timezone", "read")); |
631 | diff --git a/doc/building.html b/doc/building.html |
632 | index 7d6f18c..842e7fa 100644 |
633 | --- a/doc/building.html |
634 | +++ b/doc/building.html |
635 | @@ -1,19 +1,24 @@ |
636 | <!DOCTYPE html> |
637 | -<html> |
638 | +<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang=""> |
639 | <head> |
640 | - <meta charset="utf-8"> |
641 | - <meta name="generator" content="pandoc"> |
642 | - <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> |
643 | + <meta charset="utf-8" /> |
644 | + <meta name="generator" content="pandoc" /> |
645 | + <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> |
646 | <title>Building the JDK</title> |
647 | - <style type="text/css">code{white-space: pre;}</style> |
648 | - <link rel="stylesheet" href="../make/data/docs-resources/resources/jdk-default.css"> |
649 | + <style type="text/css"> |
650 | + code{white-space: pre-wrap;} |
651 | + span.smallcaps{font-variant: small-caps;} |
652 | + span.underline{text-decoration: underline;} |
653 | + div.column{display: inline-block; vertical-align: top; width: 50%;} |
654 | + </style> |
655 | + <link rel="stylesheet" href="../make/data/docs-resources/resources/jdk-default.css" /> |
656 | <!--[if lt IE 9]> |
657 | <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script> |
658 | <![endif]--> |
659 | <style type="text/css">pre, code, tt { color: #1d6ae5; }</style> |
660 | </head> |
661 | <body> |
662 | -<header> |
663 | +<header id="title-block-header"> |
664 | <h1 class="title">Building the JDK</h1> |
665 | </header> |
666 | <nav id="TOC"> |
667 | @@ -67,6 +72,9 @@ |
668 | <li><a href="#make-control-variables">Make Control Variables</a></li> |
669 | </ul></li> |
670 | <li><a href="#running-tests">Running Tests</a></li> |
671 | +<li><a href="#signing">Signing</a><ul> |
672 | +<li><a href="#macos-1">macOS</a></li> |
673 | +</ul></li> |
674 | <li><a href="#cross-compiling">Cross-compiling</a><ul> |
675 | <li><a href="#cross-compiling-the-easy-way-with-openjdk-devkits">Cross compiling the easy way with OpenJDK devkits</a></li> |
676 | <li><a href="#boot-jdk-and-build-jdk">Boot JDK and Build JDK</a></li> |
677 | @@ -234,30 +242,30 @@ |
678 | <table> |
679 | <thead> |
680 | <tr class="header"> |
681 | -<th style="text-align: left;">Operating system</th> |
682 | -<th style="text-align: left;">Supported toolchain</th> |
683 | +<th>Operating system</th> |
684 | +<th>Supported toolchain</th> |
685 | </tr> |
686 | </thead> |
687 | <tbody> |
688 | <tr class="odd"> |
689 | -<td style="text-align: left;">Linux</td> |
690 | -<td style="text-align: left;">gcc, clang</td> |
691 | +<td>Linux</td> |
692 | +<td>gcc, clang</td> |
693 | </tr> |
694 | <tr class="even"> |
695 | -<td style="text-align: left;">macOS</td> |
696 | -<td style="text-align: left;">Apple Xcode (using clang)</td> |
697 | +<td>macOS</td> |
698 | +<td>Apple Xcode (using clang)</td> |
699 | </tr> |
700 | <tr class="odd"> |
701 | -<td style="text-align: left;">Solaris</td> |
702 | -<td style="text-align: left;">Oracle Solaris Studio</td> |
703 | +<td>Solaris</td> |
704 | +<td>Oracle Solaris Studio</td> |
705 | </tr> |
706 | <tr class="even"> |
707 | -<td style="text-align: left;">AIX</td> |
708 | -<td style="text-align: left;">IBM XL C/C++</td> |
709 | +<td>AIX</td> |
710 | +<td>IBM XL C/C++</td> |
711 | </tr> |
712 | <tr class="odd"> |
713 | -<td style="text-align: left;">Windows</td> |
714 | -<td style="text-align: left;">Microsoft Visual Studio</td> |
715 | +<td>Windows</td> |
716 | +<td>Microsoft Visual Studio</td> |
717 | </tr> |
718 | </tbody> |
719 | </table> |
720 | @@ -265,26 +273,26 @@ |
721 | <table> |
722 | <thead> |
723 | <tr class="header"> |
724 | -<th style="text-align: left;">Operating system</th> |
725 | -<th style="text-align: left;">Toolchain version</th> |
726 | +<th>Operating system</th> |
727 | +<th>Toolchain version</th> |
728 | </tr> |
729 | </thead> |
730 | <tbody> |
731 | <tr class="odd"> |
732 | -<td style="text-align: left;">Linux</td> |
733 | -<td style="text-align: left;">gcc 7.3.0</td> |
734 | +<td>Linux</td> |
735 | +<td>gcc 7.3.0</td> |
736 | </tr> |
737 | <tr class="even"> |
738 | -<td style="text-align: left;">macOS</td> |
739 | -<td style="text-align: left;">Apple Xcode 9.4 (using clang 9.1.0)</td> |
740 | +<td>macOS</td> |
741 | +<td>Apple Xcode 9.4 (using clang 9.1.0)</td> |
742 | </tr> |
743 | <tr class="odd"> |
744 | -<td style="text-align: left;">Solaris</td> |
745 | -<td style="text-align: left;">Oracle Solaris Studio 12.4 (with compiler version 5.13)</td> |
746 | +<td>Solaris</td> |
747 | +<td>Oracle Solaris Studio 12.4 (with compiler version 5.13)</td> |
748 | </tr> |
749 | <tr class="even"> |
750 | -<td style="text-align: left;">Windows</td> |
751 | -<td style="text-align: left;">Microsoft Visual Studio 2017 update 15.9.16</td> |
752 | +<td>Windows</td> |
753 | +<td>Microsoft Visual Studio 2017 update 15.9.16</td> |
754 | </tr> |
755 | </tbody> |
756 | </table> |
757 | @@ -297,9 +305,13 @@ |
758 | <p>To use clang instead of gcc on Linux, use <code>--with-toolchain-type=clang</code>.</p> |
759 | <h3 id="apple-xcode">Apple Xcode</h3> |
760 | <p>The oldest supported version of Xcode is 8.</p> |
761 | -<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> |
762 | +<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> |
763 | <pre><code>xcode-select --install</code></pre> |
764 | -<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> |
765 | +<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> |
766 | +<ul> |
767 | +<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> |
768 | +<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> |
769 | +</ul> |
770 | <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> |
771 | <h3 id="oracle-solaris-studio">Oracle Solaris Studio</h3> |
772 | <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> |
773 | @@ -362,8 +374,8 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre> |
774 | <h3 id="microsoft-visual-studio">Microsoft Visual Studio</h3> |
775 | <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> |
776 | <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> |
777 | -<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> |
778 | <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> |
779 | +<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> |
780 | <h3 id="ibm-xl-cc">IBM XL C/C++</h3> |
781 | <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> |
782 | <p>See the <a href="http://cr.openjdk.java.net/~simonis/ppc-aix-port">OpenJDK PowerPC Port Status Page</a> for details.</p> |
783 | @@ -403,7 +415,7 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre> |
784 | <ul> |
785 | <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> |
786 | <li>To install on an rpm-based Linux, try running <code>sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel</code>.</li> |
787 | -<li>To install on Alpine Linux, try running <code>sudo apk add libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev</code>.</li> |
788 | +<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> |
789 | <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> |
790 | </ul> |
791 | <p>Use <code>--with-x=<path></code> if <code>configure</code> does not properly locate your X11 files.</p> |
792 | @@ -553,7 +565,7 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre> |
793 | <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> |
794 | </ul> |
795 | <h4 id="test-make-control-variables">Test Make Control Variables</h4> |
796 | -<p>These make control variables only make sense when running tests. Please see <a href="testing.html">Testing the JDK</a> for details.</p> |
797 | +<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> |
798 | <ul> |
799 | <li><code>TEST</code></li> |
800 | <li><code>TEST_JOBS</code></li> |
801 | @@ -573,7 +585,13 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre> |
802 | <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> |
803 | <p>To execute the most basic tests (tier 1), use:</p> |
804 | <pre><code>make run-test-tier1</code></pre> |
805 | -<p>For more details on how to run tests, please see the <a href="testing.html">Testing the JDK</a> document.</p> |
806 | +<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> |
807 | +<h2 id="signing">Signing</h2> |
808 | +<h3 id="macos-1">macOS</h3> |
809 | +<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=<identity></code>. The identity refers to a signing identity from Apple that needs to be preinstalled on the build host.</p> |
810 | +<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> |
811 | +<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 "adhoc" signing, without any entitlements. Such a build does not allow dumping core files.</p> |
812 | +<p>The default mode "auto" 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> |
813 | <h2 id="cross-compiling">Cross-compiling</h2> |
814 | <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> |
815 | <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> |
816 | @@ -645,11 +663,13 @@ x86_64-linux-gnu-to-ppc64le-linux-gnu</code></pre> |
817 | <p>Note that alsa is needed even if you only want to build a headless JDK.</p> |
818 | <ul> |
819 | <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> |
820 | -<li><p>Install the libraries into the cross-compilation toolchain. For instance:</p> |
821 | +<li>Install the libraries into the cross-compilation toolchain. For instance:</li> |
822 | +</ul> |
823 | <pre><code>cd /tools/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux/arm-linux-gnueabihf/libc |
824 | dpkg-deb -x /tmp/libasound2_1.0.25-4_armhf.deb . |
825 | -dpkg-deb -x /tmp/libasound2-dev_1.0.25-4_armhf.deb .</code></pre></li> |
826 | -<li><p>If alsa is not properly detected by <code>configure</code>, you can point it out by <code>--with-alsa</code>.</p></li> |
827 | +dpkg-deb -x /tmp/libasound2-dev_1.0.25-4_armhf.deb .</code></pre> |
828 | +<ul> |
829 | +<li>If alsa is not properly detected by <code>configure</code>, you can point it out by <code>--with-alsa</code>.</li> |
830 | </ul> |
831 | <h4 id="x11-1">X11</h4> |
832 | <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> |
833 | diff --git a/doc/building.md b/doc/building.md |
834 | index 55cd791..60d4d73 100644 |
835 | --- a/doc/building.md |
836 | +++ b/doc/building.md |
837 | @@ -291,13 +291,13 @@ be able to run on the target platform. In theory, toolchain and operating |
838 | system should be independent factors, but in practice there's more or less a |
839 | one-to-one correlation between target operating system and toolchain. |
840 | |
841 | - Operating system Supported toolchain |
842 | - ------------------ ------------------------- |
843 | - Linux gcc, clang |
844 | - macOS Apple Xcode (using clang) |
845 | - Solaris Oracle Solaris Studio |
846 | - AIX IBM XL C/C++ |
847 | - Windows Microsoft Visual Studio |
848 | +| Operating system | Supported toolchain | |
849 | +| ------------------ | ------------------------- | |
850 | +| Linux | gcc, clang | |
851 | +| macOS | Apple Xcode (using clang) | |
852 | +| Solaris | Oracle Solaris Studio | |
853 | +| AIX | IBM XL C/C++ | |
854 | +| Windows | Microsoft Visual Studio | |
855 | |
856 | Please see the individual sections on the toolchains for version |
857 | recommendations. As a reference, these versions of the toolchains are used, at |
858 | @@ -306,12 +306,12 @@ possible to compile the JDK with both older and newer versions, but the closer |
859 | you stay to this list, the more likely you are to compile successfully without |
860 | issues. |
861 | |
862 | - Operating system Toolchain version |
863 | - ------------------ ------------------------------------------------------- |
864 | - Linux gcc 7.3.0 |
865 | - macOS Apple Xcode 9.4 (using clang 9.1.0) |
866 | - Solaris Oracle Solaris Studio 12.4 (with compiler version 5.13) |
867 | - Windows Microsoft Visual Studio 2017 update 15.9.16 |
868 | +| Operating system | Toolchain version | |
869 | +| ------------------ | ------------------------------------------------------- | |
870 | +| Linux | gcc 7.3.0 | |
871 | +| macOS | Apple Xcode 9.4 (using clang 9.1.0) | |
872 | +| Solaris | Oracle Solaris Studio 12.4 (with compiler version 5.13) | |
873 | +| Windows | Microsoft Visual Studio 2017 update 15.9.16 | |
874 | |
875 | ### gcc |
876 | |
877 | @@ -334,20 +334,20 @@ To use clang instead of gcc on Linux, use `--with-toolchain-type=clang`. |
878 | |
879 | The oldest supported version of Xcode is 8. |
880 | |
881 | -You will need the Xcode command lines developers tools to be able to build |
882 | -the JDK. (Actually, *only* the command lines tools are needed, not the IDE.) |
883 | +You will need the Xcode command line developer tools to be able to build |
884 | +the JDK. (Actually, *only* the command line tools are needed, not the IDE.) |
885 | The simplest way to install these is to run: |
886 | ``` |
887 | xcode-select --install |
888 | ``` |
889 | |
890 | -It is advisable to keep an older version of Xcode for building the JDK when |
891 | -updating Xcode. This [blog page]( |
892 | -http://iosdevelopertips.com/xcode/install-multiple-versions-of-xcode.html) has |
893 | -good suggestions on managing multiple Xcode versions. To use a specific version |
894 | -of Xcode, use `xcode-select -s` before running `configure`, or use |
895 | -`--with-toolchain-path` to point to the version of Xcode to use, e.g. |
896 | -`configure --with-toolchain-path=/Applications/Xcode8.app/Contents/Developer/usr/bin` |
897 | +When updating Xcode, it is advisable to keep an older version for building the JDK. |
898 | +To use a specific version of Xcode you have multiple options: |
899 | + |
900 | + * Use `xcode-select -s` before running `configure`, e.g. `xcode-select -s /Applications/Xcode13.1.app`. The drawback is that the setting |
901 | + is system wide and you may have to revert it after an OpenJDK build. |
902 | + * Use configure option `--with-xcode-path`, e.g. `configure --with-xcode-path=/Applications/Xcode13.1.app` |
903 | + This allows using a specific Xcode version for an OpenJDK build, independently of the active Xcode version by `xcode-select`. |
904 | |
905 | If you have recently (inadvertently) updated your OS and/or Xcode version, and |
906 | the JDK can no longer be built, please see the section on [Problems with the |
907 | @@ -835,7 +835,7 @@ configuration, as opposed to the "configure time" configuration. |
908 | #### Test Make Control Variables |
909 | |
910 | These make control variables only make sense when running tests. Please see |
911 | -[Testing the JDK](testing.html) for details. |
912 | +**Testing the JDK** ([html](testing.html), [markdown](testing.md)) for details. |
913 | |
914 | * `TEST` |
915 | * `TEST_JOBS` |
916 | @@ -873,8 +873,44 @@ To execute the most basic tests (tier 1), use: |
917 | make run-test-tier1 |
918 | ``` |
919 | |
920 | -For more details on how to run tests, please see the [Testing |
921 | -the JDK](testing.html) document. |
922 | +For more details on how to run tests, please see **Testing the JDK** |
923 | +([html](testing.html), [markdown](testing.md)). |
924 | + |
925 | +## Signing |
926 | + |
927 | +### macOS |
928 | + |
929 | +Modern versions of macOS require applications to be signed and notarizied before |
930 | +distribution. See Apple's documentation for more background on what this means |
931 | +and how it works. To help support this, the JDK build can be configured to |
932 | +automatically sign all native binaries, and the JDK bundle, with all the options |
933 | +needed for successful notarization, as well as all the entitlements required by |
934 | +the JDK. To enable `hardened` signing, use configure parameter |
935 | +`--with-macosx-codesign=hardened` and configure the signing identity you wish to |
936 | +use with `--with-macosx-codesign-identity=<identity>`. The identity refers to a |
937 | +signing identity from Apple that needs to be preinstalled on the build host. |
938 | + |
939 | +When not signing for distribution with the hardened option, the JDK build will |
940 | +still attempt to perform `adhoc` signing to add the special entitlement |
941 | +`com.apple.security.get-task-allow` to each binary. This entitlement is required |
942 | +to be able to dump core files from a process. Note that adding this entitlement |
943 | +makes the build invalid for notarization, so it is only added when signing in |
944 | +`debug` mode. To explicitly enable this kind of adhoc signing, use configure |
945 | +parameter `--with-macosx-codesign=debug`. It will be enabled by default in most |
946 | +cases. |
947 | + |
948 | +It's also possible to completely disable any explicit codesign operations done |
949 | +by the JDK build using the configure parameter `--without-macosx-codesign`. |
950 | +The exact behavior then depends on the architecture. For macOS on x64, it (at |
951 | +least at the time of this writing) results in completely unsigned binaries that |
952 | +should still work fine for development and debugging purposes. On aarch64, the |
953 | +Xcode linker will apply a default "adhoc" signing, without any entitlements. |
954 | +Such a build does not allow dumping core files. |
955 | + |
956 | +The default mode "auto" will try for `hardened` signing if the debug level is |
957 | +`release` and either the default identity or the specified identity is valid. |
958 | +If hardened isn't possible, then `debug` signing is chosen if it works. If |
959 | +nothing works, the codesign build step is disabled. |
960 | |
961 | ## Cross-compiling |
962 | |
963 | diff --git a/doc/testing.html b/doc/testing.html |
964 | index 5943753..96f7408 100644 |
965 | --- a/doc/testing.html |
966 | +++ b/doc/testing.html |
967 | @@ -45,7 +45,7 @@ |
968 | </nav> |
969 | <h2 id="using-the-run-test-framework">Using the run-test framework</h2> |
970 | <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> |
971 | -<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> |
972 | +<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> |
973 | <p>Some example command-lines:</p> |
974 | <pre><code>$ make run-test-tier1 |
975 | $ make run-test-jdk_lang JTREG="JOBS=8" |
976 | @@ -55,7 +55,7 @@ $ make run-test TEST="hotspot:hotspot_gc" JTREG="JOBS=1;TIMEOUT=8 |
977 | $ make run-test TEST="jtreg:test/hotspot:hotspot_gc test/hotspot/jtreg/native_sanity/JniVersion.java" |
978 | $ make exploded-run-test TEST=tier2</code></pre> |
979 | <h3 id="configuration">Configuration</h3> |
980 | -<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=<path to jtreg home></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> |
981 | +<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=<path to jtreg home></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> |
982 | <h2 id="test-selection">Test selection</h2> |
983 | <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> |
984 | <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="tier1"</code>, but the latter is more tab-completion friendly. For more complex test runs, the <code>run-test TEST="x"</code> solution needs to be used.</p> |
985 | @@ -82,7 +82,7 @@ $ make exploded-run-test TEST=tier2</code></pre> |
986 | <h3 id="gtest">Gtest</h3> |
987 | <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> |
988 | <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> |
989 | -<p>For Gtest, there is a separate test suite for each JVM variant. The JVM variant is defined by adding <code>/<variant></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> |
990 | +<p>For Gtest, there is a separate test suite for each JVM variant. The JVM variant is defined by adding <code>/<variant></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> |
991 | <h2 id="test-results-and-summary">Test results and summary</h2> |
992 | <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> |
993 | <pre><code>============================== |
994 | @@ -97,16 +97,16 @@ TEST FAILURE</code></pre> |
995 | <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>>> ... <<</code> marker for easy identification.</p> |
996 | <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> |
997 | <p>In case of test failures, <code>make run-test</code> will exit with a non-zero exit value.</p> |
998 | -<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> |
999 | +<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> |
1000 | <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> |
1001 | <h2 id="test-suite-control">Test suite control</h2> |
1002 | <p>It is possible to control various aspects of the test suites using make control variables.</p> |
1003 | <p>These variables use a keyword=value approach to allow multiple values to be set. So, for instance, <code>JTREG="JOBS=1;TIMEOUT=8"</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="TMIEOUT=8"</code> would give an error, while <code>JTREG_TMIEOUT=8</code> would just pass unnoticed.</p> |
1004 | <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="...;..."</code>. This will also make sure spaces are preserved, as in <code>JTREG="VM_OPTIONS=-XshowSettings -Xlog:gc+ref=debug"</code>.</p> |
1005 | -<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> |
1006 | +<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> |
1007 | <p>As far as possible, the names of the keywords have been standardized between test suites.</p> |
1008 | <h3 id="general-keywords-test_opts">General keywords (TEST_OPTS)</h3> |
1009 | -<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> |
1010 | +<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> |
1011 | <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> |
1012 | <h4 id="jobs">JOBS</h4> |
1013 | <p>Currently only applies to JTReg.</p> |
1014 | @@ -179,11 +179,11 @@ TEST FAILURE</code></pre> |
1015 | <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> |
1016 | <h4 id="macos">MacOS</h4> |
1017 | <p>Choose Apple menu; System Preferences, click Keyboard, then click Shortcuts; select or deselect desired shortcut.</p> |
1018 | -<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> |
1019 | +<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> |
1020 | <h4 id="linux">Linux</h4> |
1021 | <p>Open the Activities overview and start typing Settings; Choose Settings, click Devices, then click Keyboard; set or override desired shortcut.</p> |
1022 | <h4 id="windows">Windows</h4> |
1023 | -<p>Type <code>gpedit</code> in the Search and then click Edit group policy; navigate to User Configuration -> Administrative Templates -> Windows Components -> File Explorer; in the right-side pane look for “Turn off Windows key hotkeys” and double click on it; enable or disable hotkeys.</p> |
1024 | +<p>Type <code>gpedit</code> in the Search and then click Edit group policy; navigate to User Configuration -> Administrative Templates -> Windows Components -> File Explorer; in the right-side pane look for "Turn off Windows key hotkeys" and double click on it; enable or disable hotkeys.</p> |
1025 | <p>Note: restart is required to make the settings take effect.</p> |
1026 | </body> |
1027 | </html> |
1028 | diff --git a/make/Bundles.gmk b/make/Bundles.gmk |
1029 | index 56d7dc8..81a1688 100644 |
1030 | --- a/make/Bundles.gmk |
1031 | +++ b/make/Bundles.gmk |
1032 | @@ -36,7 +36,7 @@ DOCS_TARGETS := |
1033 | # On Windows tar frequently complains that "file changed as we read it" for |
1034 | # some random source files. This seems to be cause by anti virus scanners and |
1035 | # is most likely safe to ignore. When it happens, tar returns '1'. |
1036 | -ifeq ($(OPENJDK_BUILD_OS), windows) |
1037 | +ifeq ($(call isBuildOs, windows), true) |
1038 | TAR_IGNORE_EXIT_VALUE := || test "$$$$?" = "1" |
1039 | endif |
1040 | |
1041 | @@ -156,7 +156,7 @@ endef |
1042 | |
1043 | # On Macosx, we bundle up the macosx specific images which already have the |
1044 | # correct base directories. |
1045 | -ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release) |
1046 | +ifeq ($(call isTargetOs, macosx)+$(DEBUG_LEVEL), true+release) |
1047 | JDK_IMAGE_DIR := $(JDK_MACOSX_BUNDLE_DIR) |
1048 | JRE_IMAGE_DIR := $(JRE_MACOSX_BUNDLE_DIR) |
1049 | JDK_IMAGE_HOMEDIR := $(JDK_MACOSX_CONTENTS_DIR)/Home |
1050 | @@ -208,7 +208,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), ) |
1051 | |
1052 | # Create special filter rules when dealing with unzipped .dSYM directories on |
1053 | # macosx |
1054 | - ifeq ($(OPENJDK_TARGET_OS), macosx) |
1055 | + ifeq ($(call isTargetOs, macosx), true) |
1056 | ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false) |
1057 | JDK_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \ |
1058 | $(call containing, .dSYM/, $(patsubst $(JDK_IMAGE_DIR)/%, %, \ |
1059 | @@ -288,16 +288,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), ) |
1060 | $(SYMBOLS_EXCLUDE_PATTERN), \ |
1061 | $(ALL_JRE_FILES)) |
1062 | |
1063 | - # On Macosx release builds, when there is a code signing certificate available, |
1064 | - # the final bundle layout can be signed. |
1065 | - SIGN_BUNDLE := false |
1066 | - ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release) |
1067 | - ifneq ($(CODESIGN), ) |
1068 | - SIGN_BUNDLE := true |
1069 | - endif |
1070 | - endif |
1071 | - |
1072 | - ifeq ($(SIGN_BUNDLE), true) |
1073 | + ifeq ($(MACOSX_CODESIGN_MODE), hardened) |
1074 | # Macosx release build and code signing available. |
1075 | |
1076 | ################################################################################ |
1077 | diff --git a/make/CompileDemos.gmk b/make/CompileDemos.gmk |
1078 | index 64ecf48..74c54ce 100644 |
1079 | --- a/make/CompileDemos.gmk |
1080 | +++ b/make/CompileDemos.gmk |
1081 | @@ -234,7 +234,7 @@ $(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%: $(DEMO_SHARE_SRC)/nbproject/% |
1082 | $(call install-file) |
1083 | $(CHMOD) -f ug+w $@ |
1084 | |
1085 | -ifeq ($(OPENJDK_TARGET_OS), solaris) |
1086 | +ifeq ($(call isTargetOs, solaris), true) |
1087 | TARGETS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \ |
1088 | $(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%, \ |
1089 | $(call FindFiles, $(DEMO_SHARE_SRC)/nbproject)) |
1090 | diff --git a/make/CompileJavaModules.gmk b/make/CompileJavaModules.gmk |
1091 | index 40c7e06..46fb9b4 100644 |
1092 | --- a/make/CompileJavaModules.gmk |
1093 | +++ b/make/CompileJavaModules.gmk |
1094 | @@ -51,21 +51,18 @@ java.base_EXCLUDES += java/lang/doc-files |
1095 | # data files and shouldn't go in the product |
1096 | java.base_EXCLUDE_FILES += sun/text/resources/BreakIteratorRules.java |
1097 | |
1098 | -ifneq ($(OPENJDK_TARGET_OS), solaris) |
1099 | +ifeq ($(call isTargetOs, solaris), false) |
1100 | java.base_EXCLUDE_FILES += \ |
1101 | SolarisLoginModule.java \ |
1102 | SolarisSystem.java \ |
1103 | # |
1104 | endif |
1105 | |
1106 | -ifeq ($(filter $(OPENJDK_TARGET_OS), solaris macosx aix), ) |
1107 | - # |
1108 | - # only solaris, macosx and aix |
1109 | - # |
1110 | +ifeq ($(call isTargetOs, solaris macosx aix), false) |
1111 | java.base_EXCLUDE_FILES += sun/nio/fs/PollingWatchService.java |
1112 | endif |
1113 | |
1114 | -ifeq ($(OPENJDK_TARGET_OS), windows) |
1115 | +ifeq ($(call isTargetOs, windows), true) |
1116 | java.base_EXCLUDE_FILES += \ |
1117 | sun/nio/ch/SimpleAsynchronousFileChannelImpl.java \ |
1118 | # |
1119 | @@ -124,7 +121,7 @@ java.desktop_EXCLUDE_FILES += \ |
1120 | .template \ |
1121 | # |
1122 | |
1123 | -ifeq ($(OPENJDK_TARGET_OS), macosx) |
1124 | +ifeq ($(call isTargetOs, macosx), true) |
1125 | # exclude all X11 on Mac. |
1126 | java.desktop_EXCLUDES += \ |
1127 | sun/awt/X11 \ |
1128 | @@ -186,7 +183,7 @@ else |
1129 | sun/awt/X11/XwcTextItem.java |
1130 | endif |
1131 | |
1132 | -ifeq ($(OPENJDK_TARGET_OS), windows) |
1133 | +ifeq ($(call isTargetOs, windows), true) |
1134 | java.desktop_EXCLUDES += com/sun/java/swing/plaf/gtk |
1135 | endif |
1136 | |
1137 | @@ -194,8 +191,7 @@ ifdef BUILD_HEADLESS_ONLY |
1138 | java.desktop_EXCLUDES += sun/applet |
1139 | endif |
1140 | |
1141 | -# Used on windows and macosx |
1142 | -ifeq ($(filter $(OPENJDK_TARGET_OS), windows macosx), ) |
1143 | +ifeq ($(call isTargetOs, windows macosx), false) |
1144 | java.desktop_EXCLUDE_FILES += sun/awt/AWTCharset.java |
1145 | endif |
1146 | |
1147 | @@ -374,11 +370,11 @@ SCTP_IMPL_CLASSES = \ |
1148 | $(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SendFailed.java \ |
1149 | $(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/Shutdown.java |
1150 | |
1151 | -ifeq ($(OPENJDK_TARGET_OS), macosx) |
1152 | +ifeq ($(call isTargetOs, macosx), true) |
1153 | jdk.sctp_EXCLUDE_FILES += $(SCTP_IMPL_CLASSES) |
1154 | endif |
1155 | |
1156 | -ifeq ($(OPENJDK_TARGET_OS),aix) |
1157 | +ifeq ($(call isTargetOs, aix), true) |
1158 | jdk.sctp_EXCLUDE_FILES += $(SCTP_IMPL_CLASSES) |
1159 | endif |
1160 | |
1161 | diff --git a/make/CopyImportModules.gmk b/make/CopyImportModules.gmk |
1162 | index e71d29c..34baaf9 100644 |
1163 | --- a/make/CopyImportModules.gmk |
1164 | +++ b/make/CopyImportModules.gmk |
1165 | @@ -38,7 +38,7 @@ CONF_DIR := $(wildcard $(addsuffix /$(MODULE), $(IMPORT_MODULES_CONF))) |
1166 | $(call FillFindCache, $(LIBS_DIR) $(CMDS_DIR) $(CONF_DIR)) |
1167 | |
1168 | ifneq ($(LIBS_DIR), ) |
1169 | - ifeq ($(OPENJDK_TARGET_OS), windows) |
1170 | + ifeq ($(call isTargetOs, windows), true) |
1171 | TO_BIN_FILTER := %$(SHARED_LIBRARY_SUFFIX) %.diz %.pdb %.map |
1172 | |
1173 | $(eval $(call SetupCopyFiles, COPY_LIBS_TO_BIN, \ |
1174 | diff --git a/make/CreateJmods.gmk b/make/CreateJmods.gmk |
1175 | index de068ec..f0e152b 100644 |
1176 | --- a/make/CreateJmods.gmk |
1177 | +++ b/make/CreateJmods.gmk |
1178 | @@ -165,7 +165,7 @@ ifeq ($(MODULE), java.base) |
1179 | endif |
1180 | endif |
1181 | else # not java.base |
1182 | - ifeq ($(OPENJDK_TARGET_OS), windows) |
1183 | + ifeq ($(call isTargetOs, windows), true) |
1184 | # Only java.base needs to include the MSVC*_DLLs. Make sure no other module |
1185 | # tries to include them (typically imported ones). |
1186 | ifneq ($(MSVCR_DLL), ) |
1187 | diff --git a/make/Images.gmk b/make/Images.gmk |
1188 | index 524f76d..2c9f0b8 100644 |
1189 | --- a/make/Images.gmk |
1190 | +++ b/make/Images.gmk |
1191 | @@ -255,7 +255,7 @@ ifneq ($(filter jdk, $(MAKECMDGOALS)), ) |
1192 | ) |
1193 | |
1194 | ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true) |
1195 | - ifeq ($(OPENJDK_TARGET_OS), macosx) |
1196 | + ifeq ($(call isTargetOs, macosx), true) |
1197 | DEMO_FILES := $(call not-containing, .dSYM, $(DEMO_FILES)) |
1198 | else |
1199 | DEMO_FILES := $(filter-out %.debuginfo %.pdb %.map, $(DEMO_FILES)) |
1200 | @@ -296,7 +296,7 @@ ALL_JDK_MODULES := $(JDK_MODULES) |
1201 | ALL_JRE_MODULES := $(sort $(JRE_MODULES), $(foreach m, $(JRE_MODULES), \ |
1202 | $(call FindTransitiveDepsForModule, $m))) |
1203 | |
1204 | -ifeq ($(OPENJDK_TARGET_OS), windows) |
1205 | +ifeq ($(call isTargetOs, windows), true) |
1206 | LIBS_TARGET_SUBDIR := bin |
1207 | else |
1208 | LIBS_TARGET_SUBDIR := lib |
1209 | @@ -316,7 +316,7 @@ else |
1210 | DEBUGINFO_SUFFIXES := .debuginfo .pdb .map |
1211 | # On Macosx, if debug symbols have not been zipped, find all files inside *.dSYM |
1212 | # dirs. |
1213 | - ifeq ($(OPENJDK_TARGET_OS), macosx) |
1214 | + ifeq ($(call isTargetOs, macosx), true) |
1215 | $(call FillFindCache, \ |
1216 | $(SUPPORT_OUTPUTDIR)/modules_libs $(SUPPORT_OUTPUTDIR)/modules_cmds) |
1217 | FindDebuginfoFiles = \ |
1218 | diff --git a/make/Init.gmk b/make/Init.gmk |
1219 | index 6897c34..3ed4678 100644 |
1220 | --- a/make/Init.gmk |
1221 | +++ b/make/Init.gmk |
1222 | @@ -226,6 +226,9 @@ else # HAS_SPEC=true |
1223 | # Parse COMPARE_BUILD (for makefile development) |
1224 | $(eval $(call ParseCompareBuild)) |
1225 | |
1226 | + # Setup reproducible build environment |
1227 | + $(eval $(call SetupReproducibleBuild)) |
1228 | + |
1229 | # If no LOG= was given on command line, but we have a non-standard default |
1230 | # value, use that instead and re-parse log level. |
1231 | ifeq ($(LOG), ) |
1232 | diff --git a/make/InitSupport.gmk b/make/InitSupport.gmk |
1233 | index baefc89..df175a1 100644 |
1234 | --- a/make/InitSupport.gmk |
1235 | +++ b/make/InitSupport.gmk |
1236 | @@ -303,6 +303,15 @@ else # $(HAS_SPEC)=true |
1237 | topdir=$(TOPDIR) |
1238 | endif |
1239 | |
1240 | + # Setup the build environment to match the requested specification on |
1241 | + # level of reproducible builds |
1242 | + define SetupReproducibleBuild |
1243 | + ifeq ($$(SOURCE_DATE), updated) |
1244 | + SOURCE_DATE := $$(shell $$(DATE) +"%s") |
1245 | + endif |
1246 | + export SOURCE_DATE_EPOCH := $$(SOURCE_DATE) |
1247 | + endef |
1248 | + |
1249 | # Parse COMPARE_BUILD into COMPARE_BUILD_* |
1250 | # Syntax: COMPARE_BUILD=CONF=<configure options>:PATCH=<patch file>: |
1251 | # MAKE=<make targets>:COMP_OPTS=<compare script options>: |
1252 | @@ -479,7 +488,7 @@ else # $(HAS_SPEC)=true |
1253 | $(TOUCH) $(SJAVAC_SERVER_DIR)/server.port.stop; true |
1254 | endef |
1255 | |
1256 | - ifeq ($(OPENJDK_BUILD_OS), windows) |
1257 | + ifeq ($(call isBuildOs, windows), true) |
1258 | # On windows we need to synchronize with the javac server to be able to |
1259 | # move or remove the build output directory. Since we have no proper |
1260 | # synchronization process, wait for a while and hope it helps. This is only |
1261 | diff --git a/make/MacBundles.gmk b/make/MacBundles.gmk |
1262 | index 5a5394d..45d0c78 100644 |
1263 | --- a/make/MacBundles.gmk |
1264 | +++ b/make/MacBundles.gmk |
1265 | @@ -30,7 +30,7 @@ include TextFileProcessing.gmk |
1266 | default: bundles |
1267 | |
1268 | # Only macosx has bundles defined. |
1269 | -ifeq ($(OPENJDK_TARGET_OS), macosx) |
1270 | +ifeq ($(call isTargetOs, macosx), true) |
1271 | |
1272 | bundles: jre-bundle jdk-bundle |
1273 | |
1274 | diff --git a/make/Main.gmk b/make/Main.gmk |
1275 | index 6b4b0ac..5a48954 100644 |
1276 | --- a/make/Main.gmk |
1277 | +++ b/make/Main.gmk |
1278 | @@ -1123,7 +1123,7 @@ ifneq ($(CREATE_BUILDJDK), true) |
1279 | endif |
1280 | endif |
1281 | |
1282 | -ifeq ($(OPENJDK_TARGET_OS), macosx) |
1283 | +ifeq ($(call isTargetOs, macosx), true) |
1284 | product-images: mac-jdk-bundle |
1285 | |
1286 | legacy-images: mac-legacy-jre-bundle |
1287 | diff --git a/make/ModuleWrapper.gmk b/make/ModuleWrapper.gmk |
1288 | index 5f9c5fc..54bf26e 100644 |
1289 | --- a/make/ModuleWrapper.gmk |
1290 | +++ b/make/ModuleWrapper.gmk |
1291 | @@ -42,7 +42,7 @@ TARGETS := |
1292 | include $(MAKEFILE_PREFIX)-$(MODULE).gmk |
1293 | |
1294 | # Setup copy rules from the modules directories to the jdk image directory. |
1295 | -ifeq ($(OPENJDK_TARGET_OS), windows) |
1296 | +ifeq ($(call isTargetOs, windows), true) |
1297 | TO_BIN_FILTER := %$(SHARED_LIBRARY_SUFFIX) %.diz %.pdb %.map |
1298 | |
1299 | $(eval $(call SetupCopyFiles, COPY_LIBS_TO_BIN, \ |
1300 | diff --git a/make/RunTests.gmk b/make/RunTests.gmk |
1301 | index 0c998c2..1c9778e 100644 |
1302 | --- a/make/RunTests.gmk |
1303 | +++ b/make/RunTests.gmk |
1304 | @@ -61,7 +61,7 @@ define SetTestOpt |
1305 | endef |
1306 | |
1307 | # Setup _NT_SYMBOL_PATH on Windows, which points to our pdb files. |
1308 | -ifeq ($(OPENJDK_TARGET_OS), windows) |
1309 | +ifeq ($(call isTargetOs, windows), true) |
1310 | ifndef _NT_SYMBOL_PATH |
1311 | SYMBOL_PATH := $(call PathList, $(sort $(patsubst %/, %, $(dir $(wildcard \ |
1312 | $(addprefix $(SYMBOLS_IMAGE_DIR)/bin/, *.pdb */*.pdb)))))) |
1313 | @@ -200,7 +200,7 @@ TEST_JOBS_FACTOR_MACHINE ?= 1 |
1314 | |
1315 | ifeq ($(TEST_JOBS), 0) |
1316 | CORES_DIVIDER := 2 |
1317 | - ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc) |
1318 | + ifeq ($(call isTargetCpuArch, sparc), true) |
1319 | # For smaller SPARC machines we see reasonable scaling of throughput up to |
1320 | # cpus/4 without affecting test reliability. On the bigger machines, cpus/4 |
1321 | # causes intermittent timeouts. |
1322 | @@ -632,7 +632,7 @@ define SetupRunJtregTestBody |
1323 | $1_JTREG_MAX_RAM_PERCENTAGE := $$(shell $(AWK) 'BEGIN { print 25 / $$($1_JTREG_JOBS); }') |
1324 | |
1325 | # SPARC is in general slower per core so need to scale up timeouts a bit. |
1326 | - ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc) |
1327 | + ifeq ($(call isTargetCpuArch, sparc), true) |
1328 | JTREG_TIMEOUT_FACTOR ?= 8 |
1329 | else |
1330 | JTREG_TIMEOUT_FACTOR ?= 4 |
1331 | @@ -673,7 +673,7 @@ define SetupRunJtregTestBody |
1332 | $1_JTREG_BASIC_OPTIONS += -e:JDK8_HOME=$$(BOOT_JDK) |
1333 | # If running on Windows, propagate the _NT_SYMBOL_PATH to enable |
1334 | # symbol lookup in hserr files |
1335 | - ifeq ($$(OPENJDK_TARGET_OS), windows) |
1336 | + ifeq ($$(call isTargetOs, windows), true) |
1337 | $1_JTREG_BASIC_OPTIONS += -e:_NT_SYMBOL_PATH |
1338 | endif |
1339 | |
1340 | diff --git a/make/TestImage.gmk b/make/TestImage.gmk |
1341 | index d5ef69f..552dce0 100644 |
1342 | --- a/make/TestImage.gmk |
1343 | +++ b/make/TestImage.gmk |
1344 | @@ -37,8 +37,8 @@ FIXPATH_ECHO := $(FIXPATH) $(call FixPath, $(ECHO)) |
1345 | $(BUILD_INFO_PROPERTIES): |
1346 | $(call MakeTargetDir) |
1347 | $(ECHO) "# Build info properties for JDK tests" > $@ |
1348 | - $(ECHO) "build.workspace.root=$(call FixPath, $(WORKSPACE_ROOT))" >> $@ |
1349 | - $(ECHO) "build.output.root=$(call FixPath, $(OUTPUTDIR))" >> $@ |
1350 | + $(ECHO) 'build.workspace.root=$(call FixPath, $(WORKSPACE_ROOT))' >> $@ |
1351 | + $(ECHO) 'build.output.root=$(call FixPath, $(OUTPUTDIR))' >> $@ |
1352 | |
1353 | prepare-test-image: $(BUILD_INFO_PROPERTIES) |
1354 | $(call MakeDir, $(TEST_IMAGE_DIR)) |
1355 | diff --git a/make/ZipSecurity.gmk b/make/ZipSecurity.gmk |
1356 | index ba56641..cbe1e21 100644 |
1357 | --- a/make/ZipSecurity.gmk |
1358 | +++ b/make/ZipSecurity.gmk |
1359 | @@ -70,7 +70,7 @@ TARGETS += $(IMAGES_OUTPUTDIR)/sec-bin.zip |
1360 | # |
1361 | # Windows specific binary security packages. |
1362 | # |
1363 | -ifeq ($(OPENJDK_TARGET_OS), windows) |
1364 | +ifeq ($(call isTargetOs, windows), true) |
1365 | # sec-windows-bin.zip is used by builds where the corresponding sources are not available |
1366 | $(eval $(call SetupZipArchive,BUILD_SEC_WINDOWS_BIN_ZIP, \ |
1367 | SRC := $(JDK_OUTPUTDIR), \ |
1368 | @@ -80,7 +80,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows) |
1369 | TARGETS += $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip |
1370 | |
1371 | # JGSS files contain the native Kerberos library |
1372 | - ifeq ($(OPENJDK_TARGET_CPU), x86_64) |
1373 | + ifeq ($(call isTargetCpu, x86_64), true) |
1374 | JGSS_ZIP_NAME = jgss-windows-x64-bin.zip |
1375 | else |
1376 | JGSS_ZIP_NAME = jgss-windows-i586-bin.zip |
1377 | diff --git a/make/ZipSource.gmk b/make/ZipSource.gmk |
1378 | index b4aabda..ff29a05 100644 |
1379 | --- a/make/ZipSource.gmk |
1380 | +++ b/make/ZipSource.gmk |
1381 | @@ -1,5 +1,5 @@ |
1382 | # |
1383 | -# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. |
1384 | +# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. |
1385 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
1386 | # |
1387 | # This code is free software; you can redistribute it and/or modify it |
1388 | @@ -31,6 +31,7 @@ include JavaCompilation.gmk |
1389 | include Modules.gmk |
1390 | |
1391 | SRC_ZIP_WORK_DIR := $(SUPPORT_OUTPUTDIR)/src |
1392 | +$(if $(filter $(TOPDIR)/%, $(SUPPORT_OUTPUTDIR)), $(eval SRC_ZIP_BASE := $(TOPDIR)), $(eval SRC_ZIP_BASE := $(SUPPORT_OUTPUTDIR))) |
1393 | |
1394 | # Hook to include the corresponding custom file, if present. |
1395 | $(eval $(call IncludeCustomExtension, ZipSource.gmk)) |
1396 | @@ -51,10 +52,10 @@ ALL_MODULES := $(FindAllModules) |
1397 | # again to create src.zip. |
1398 | $(foreach m, $(ALL_MODULES), \ |
1399 | $(foreach d, $(call FindModuleSrcDirs, $m) $(call ExtraSrcDirs, $m), \ |
1400 | - $(eval $d_TARGET := $(SRC_ZIP_WORK_DIR)/$(patsubst $(TOPDIR)/%,%,$d)/$m) \ |
1401 | + $(eval $d_TARGET := $(SRC_ZIP_WORK_DIR)/$(patsubst $(TOPDIR)/%,%,$(patsubst $(SUPPORT_OUTPUTDIR)/%,%,$d))/$m) \ |
1402 | $(if $(SRC_GENERATED), , \ |
1403 | $(eval $$($d_TARGET): $d ; \ |
1404 | - $$(if $(filter $(TOPDIR)/%, $d), $$(link-file-relative), $$(link-file-absolute)) \ |
1405 | + $$(if $(filter $(SRC_ZIP_BASE)/%, $d), $$(link-file-relative), $$(link-file-absolute)) \ |
1406 | ) \ |
1407 | ) \ |
1408 | $(eval SRC_ZIP_SRCS += $$($d_TARGET)) \ |
1409 | diff --git a/make/autoconf/basic.m4 b/make/autoconf/basic.m4 |
1410 | index a3a4e13..dc02d44 100644 |
1411 | --- a/make/autoconf/basic.m4 |
1412 | +++ b/make/autoconf/basic.m4 |
1413 | @@ -220,6 +220,18 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT], |
1414 | [UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],$with_toolchain_path)] |
1415 | ) |
1416 | |
1417 | + AC_ARG_WITH([xcode-path], [AS_HELP_STRING([--with-xcode-path], |
1418 | + [set up toolchain on Mac OS using a path to an Xcode installation])]) |
1419 | + |
1420 | + if test "x$with_xcode_path" != x; then |
1421 | + if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then |
1422 | + UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH], |
1423 | + $with_xcode_path/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:$with_xcode_path/Contents/Developer/usr/bin) |
1424 | + else |
1425 | + AC_MSG_WARN([Option --with-xcode-path is only valid on Mac OS, ignoring.]) |
1426 | + fi |
1427 | + fi |
1428 | + |
1429 | AC_ARG_WITH([extra-path], [AS_HELP_STRING([--with-extra-path], |
1430 | [prepend these directories to the default path])], |
1431 | [UTIL_PREPEND_TO_PATH([EXTRA_PATH],$with_extra_path)] |
1432 | @@ -230,7 +242,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT], |
1433 | # If not, detect if Xcode is installed by running xcodebuild -version |
1434 | # if no Xcode installed, xcodebuild exits with 1 |
1435 | # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0 |
1436 | - if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then |
1437 | + if test "x$DEVKIT_ROOT" != x || test "x$TOOLCHAIN_PATH" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then |
1438 | # We need to use xcodebuild in the toolchain dir provided by the user |
1439 | UTIL_LOOKUP_PROGS(XCODEBUILD, xcodebuild, $TOOLCHAIN_PATH) |
1440 | if test x$XCODEBUILD = x; then |
1441 | diff --git a/make/autoconf/basic_tools.m4 b/make/autoconf/basic_tools.m4 |
1442 | index c39b87d..c3c48f8 100644 |
1443 | --- a/make/autoconf/basic_tools.m4 |
1444 | +++ b/make/autoconf/basic_tools.m4 |
1445 | @@ -156,25 +156,23 @@ AC_DEFUN([BASIC_CHECK_MAKE_VERSION], |
1446 | AC_DEFUN([BASIC_CHECK_MAKE_OUTPUT_SYNC], |
1447 | [ |
1448 | # Check if make supports the output sync option and if so, setup using it. |
1449 | - AC_MSG_CHECKING([if make --output-sync is supported]) |
1450 | - if $MAKE --version -O > /dev/null 2>&1; then |
1451 | - OUTPUT_SYNC_SUPPORTED=true |
1452 | - AC_MSG_RESULT([yes]) |
1453 | - AC_MSG_CHECKING([for output-sync value]) |
1454 | - AC_ARG_WITH([output-sync], [AS_HELP_STRING([--with-output-sync], |
1455 | - [set make output sync type if supported by make. @<:@recurse@:>@])], |
1456 | - [OUTPUT_SYNC=$with_output_sync]) |
1457 | - if test "x$OUTPUT_SYNC" = "x"; then |
1458 | - OUTPUT_SYNC=none |
1459 | - fi |
1460 | - AC_MSG_RESULT([$OUTPUT_SYNC]) |
1461 | - if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then |
1462 | - AC_MSG_ERROR([Make did not the support the value $OUTPUT_SYNC as output sync type.]) |
1463 | - fi |
1464 | - else |
1465 | - OUTPUT_SYNC_SUPPORTED=false |
1466 | - AC_MSG_RESULT([no]) |
1467 | - fi |
1468 | + UTIL_ARG_WITH(NAME: output-sync, TYPE: literal, |
1469 | + VALID_VALUES: [none recurse line target], DEFAULT: none, |
1470 | + OPTIONAL: true, ENABLED_DEFAULT: true, |
1471 | + ENABLED_RESULT: OUTPUT_SYNC_SUPPORTED, |
1472 | + CHECKING_MSG: [for make --output-sync value], |
1473 | + DESC: [set make --output-sync type if supported by make], |
1474 | + CHECK_AVAILABLE: |
1475 | + [ |
1476 | + AC_MSG_CHECKING([if make --output-sync is supported]) |
1477 | + if ! $MAKE --version -O > /dev/null 2>&1; then |
1478 | + AC_MSG_RESULT([no]) |
1479 | + AVAILABLE=false |
1480 | + else |
1481 | + AC_MSG_RESULT([yes]) |
1482 | + fi |
1483 | + ] |
1484 | + ) |
1485 | AC_SUBST(OUTPUT_SYNC_SUPPORTED) |
1486 | AC_SUBST(OUTPUT_SYNC) |
1487 | ]) |
1488 | @@ -371,43 +369,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS], |
1489 | UTIL_REQUIRE_PROGS(MIG, mig) |
1490 | UTIL_REQUIRE_PROGS(XATTR, xattr) |
1491 | UTIL_LOOKUP_PROGS(CODESIGN, codesign) |
1492 | - |
1493 | - if test "x$CODESIGN" != "x"; then |
1494 | - # Check for user provided code signing identity. |
1495 | - # If no identity was provided, fall back to "openjdk_codesign". |
1496 | - AC_ARG_WITH([macosx-codesign-identity], [AS_HELP_STRING([--with-macosx-codesign-identity], |
1497 | - [specify the code signing identity])], |
1498 | - [MACOSX_CODESIGN_IDENTITY=$with_macosx_codesign_identity], |
1499 | - [MACOSX_CODESIGN_IDENTITY=openjdk_codesign] |
1500 | - ) |
1501 | - |
1502 | - AC_SUBST(MACOSX_CODESIGN_IDENTITY) |
1503 | - |
1504 | - # Verify that the codesign certificate is present |
1505 | - AC_MSG_CHECKING([if codesign certificate is present]) |
1506 | - $RM codesign-testfile |
1507 | - $TOUCH codesign-testfile |
1508 | - $CODESIGN -s "$MACOSX_CODESIGN_IDENTITY" codesign-testfile 2>&AS_MESSAGE_LOG_FD \ |
1509 | - >&AS_MESSAGE_LOG_FD || CODESIGN= |
1510 | - $RM codesign-testfile |
1511 | - if test "x$CODESIGN" = x; then |
1512 | - AC_MSG_RESULT([no]) |
1513 | - else |
1514 | - AC_MSG_RESULT([yes]) |
1515 | - # Verify that the codesign has --option runtime |
1516 | - AC_MSG_CHECKING([if codesign has --option runtime]) |
1517 | - $RM codesign-testfile |
1518 | - $TOUCH codesign-testfile |
1519 | - $CODESIGN --option runtime -s "$MACOSX_CODESIGN_IDENTITY" codesign-testfile \ |
1520 | - 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD || CODESIGN= |
1521 | - $RM codesign-testfile |
1522 | - if test "x$CODESIGN" = x; then |
1523 | - AC_MSG_ERROR([codesign does not have --option runtime. macOS 10.13.6 and above is required.]) |
1524 | - else |
1525 | - AC_MSG_RESULT([yes]) |
1526 | - fi |
1527 | - fi |
1528 | - fi |
1529 | UTIL_REQUIRE_PROGS(SETFILE, SetFile) |
1530 | elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then |
1531 | UTIL_REQUIRE_PROGS(ELFEDIT, elfedit) |
1532 | diff --git a/make/autoconf/build-aux/config.guess b/make/autoconf/build-aux/config.guess |
1533 | index 7a31eb2..a88a9ad 100644 |
1534 | --- a/make/autoconf/build-aux/config.guess |
1535 | +++ b/make/autoconf/build-aux/config.guess |
1536 | @@ -29,7 +29,40 @@ |
1537 | # and fix the broken property, if needed. |
1538 | |
1539 | DIR=`dirname $0` |
1540 | -OUT=`. $DIR/autoconf-config.guess` |
1541 | +OUT=`. $DIR/autoconf-config.guess 2> /dev/null` |
1542 | + |
1543 | +# Handle some cases that autoconf-config.guess is not capable of |
1544 | +if [ "x$OUT" = x ]; then |
1545 | + if [ `uname -s` = Linux ]; then |
1546 | + # Test and fix little endian MIPS. |
1547 | + if [ `uname -m` = mipsel ]; then |
1548 | + OUT=mipsel-unknown-linux-gnu |
1549 | + elif [ `uname -m` = mips64el ]; then |
1550 | + OUT=mips64el-unknown-linux-gnu |
1551 | + # Test and fix little endian PowerPC64. |
1552 | + elif [ `uname -m` = ppc64le ]; then |
1553 | + OUT=powerpc64le-unknown-linux-gnu |
1554 | + # Test and fix LoongArch64. |
1555 | + elif [ `uname -m` = loongarch64 ]; then |
1556 | + OUT=loongarch64-unknown-linux-gnu |
1557 | + # Test and fix RISC-V. |
1558 | + elif [ `uname -m` = riscv64 ]; then |
1559 | + OUT=riscv64-unknown-linux-gnu |
1560 | + fi |
1561 | + # Test and fix cygwin machine arch .x86_64 |
1562 | + elif [[ `uname -s` = CYGWIN* ]]; then |
1563 | + if [ `uname -m` = ".x86_64" ]; then |
1564 | + OUT=x86_64-unknown-cygwin |
1565 | + fi |
1566 | + fi |
1567 | + |
1568 | + if [ "x$OUT" = x ]; then |
1569 | + # Run autoconf-config.guess again to get the error message. |
1570 | + . $DIR/autoconf-config.guess > /dev/null |
1571 | + else |
1572 | + printf "guessed by custom config.guess... " >&2 |
1573 | + fi |
1574 | +fi |
1575 | |
1576 | # Test and fix solaris on x86_64 |
1577 | echo $OUT | grep i386-pc-solaris > /dev/null 2> /dev/null |
1578 | @@ -88,36 +121,6 @@ if test $? = 0; then |
1579 | OUT=powerpc$KERNEL_BITMODE`echo $OUT | sed -e 's/[^-]*//'` |
1580 | fi |
1581 | |
1582 | -# Test and fix little endian PowerPC64. |
1583 | -# TODO: should be handled by autoconf-config.guess. |
1584 | -if [ "x$OUT" = x ]; then |
1585 | - if [ `uname -m` = ppc64le ]; then |
1586 | - if [ `uname -s` = Linux ]; then |
1587 | - OUT=powerpc64le-unknown-linux-gnu |
1588 | - fi |
1589 | - fi |
1590 | -fi |
1591 | - |
1592 | -# Test and fix little endian MIPS. |
1593 | -if [ "x$OUT" = x ]; then |
1594 | - if [ `uname -s` = Linux ]; then |
1595 | - if [ `uname -m` = mipsel ]; then |
1596 | - OUT=mipsel-unknown-linux-gnu |
1597 | - elif [ `uname -m` = mips64el ]; then |
1598 | - OUT=mips64el-unknown-linux-gnu |
1599 | - fi |
1600 | - fi |
1601 | -fi |
1602 | - |
1603 | -# Test and fix LoongArch64. |
1604 | -if [ "x$OUT" = x ]; then |
1605 | - if [ `uname -s` = Linux ]; then |
1606 | - if [ `uname -m` = loongarch64 ]; then |
1607 | - OUT=loongarch64-unknown-linux-gnu |
1608 | - fi |
1609 | - fi |
1610 | -fi |
1611 | - |
1612 | # Test and fix cpu on macos-aarch64, uname -p reports arm, buildsys expects aarch64 |
1613 | echo $OUT | grep arm-apple-darwin > /dev/null 2> /dev/null |
1614 | if test $? = 0; then |
1615 | diff --git a/make/autoconf/configure.ac b/make/autoconf/configure.ac |
1616 | index c015f73..a2c0c1a 100644 |
1617 | --- a/make/autoconf/configure.ac |
1618 | +++ b/make/autoconf/configure.ac |
1619 | @@ -195,7 +195,8 @@ FLAGS_POST_TOOLCHAIN |
1620 | PLATFORM_SETUP_OPENJDK_TARGET_BITS |
1621 | PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS |
1622 | |
1623 | -# Configure flags for the tools |
1624 | +# Configure flags for the tools. Need to know if we should build reproducible. |
1625 | +JDKOPT_SETUP_REPRODUCIBLE_BUILD |
1626 | FLAGS_SETUP_FLAGS |
1627 | |
1628 | # Setup debug symbols (need objcopy from the toolchain for that) |
1629 | @@ -235,6 +236,8 @@ JDKOPT_ENABLE_DISABLE_FAILURE_HANDLER |
1630 | JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST |
1631 | JDKOPT_EXCLUDE_TRANSLATIONS |
1632 | JDKOPT_ENABLE_DISABLE_MANPAGES |
1633 | +JDKOPT_SETUP_REPRODUCIBLE_BUILD |
1634 | +JDKOPT_SETUP_MACOSX_SIGNING |
1635 | |
1636 | ############################################################################### |
1637 | # |
1638 | diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4 |
1639 | index 49a7c68..3c5ba9c 100644 |
1640 | --- a/make/autoconf/flags-cflags.m4 |
1641 | +++ b/make/autoconf/flags-cflags.m4 |
1642 | @@ -813,6 +813,18 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP], |
1643 | $1_WARNING_CFLAGS_JVM="-Wno-format-zero-length -Wtype-limits -Wuninitialized" |
1644 | fi |
1645 | |
1646 | + if test "x$TOOLCHAIN_TYPE" = xmicrosoft && test "x$ENABLE_REPRODUCIBLE_BUILD" = xtrue; then |
1647 | + # Enabling deterministic creates warnings if __DATE__ or __TIME__ are |
1648 | + # used, and since we are, silence that warning. |
1649 | + REPRODUCIBLE_CFLAGS="-experimental:deterministic -wd5048" |
1650 | + FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${REPRODUCIBLE_CFLAGS}], |
1651 | + PREFIX: $3, |
1652 | + IF_FALSE: [ |
1653 | + REPRODUCIBLE_CFLAGS= |
1654 | + ] |
1655 | + ) |
1656 | + fi |
1657 | + |
1658 | # Prevent the __FILE__ macro from generating absolute paths into the built |
1659 | # binaries. Depending on toolchain, different mitigations are possible. |
1660 | # * GCC and Clang of new enough versions have -fmacro-prefix-map. |
1661 | @@ -831,6 +843,27 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP], |
1662 | FILE_MACRO_CFLAGS= |
1663 | ] |
1664 | ) |
1665 | + elif test "x$TOOLCHAIN_TYPE" = xmicrosoft && |
1666 | + test "x$ENABLE_REPRODUCIBLE_BUILD" = xtrue; then |
1667 | + # There is a known issue with the pathmap if the mapping is made to the |
1668 | + # empty string. Add a minimal string "s" as prefix to work around this. |
1669 | + # PATHMAP_FLAGS is also added to LDFLAGS in flags-ldflags.m4. |
1670 | + PATHMAP_FLAGS="-pathmap:${WORKSPACE_ROOT}=s" |
1671 | + FILE_MACRO_CFLAGS="$PATHMAP_FLAGS" |
1672 | + FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${FILE_MACRO_CFLAGS}], |
1673 | + PREFIX: $3, |
1674 | + IF_FALSE: [ |
1675 | + PATHMAP_FLAGS= |
1676 | + FILE_MACRO_CFLAGS= |
1677 | + ] |
1678 | + ) |
1679 | + fi |
1680 | + |
1681 | + AC_MSG_CHECKING([how to prevent absolute paths in output]) |
1682 | + if test "x$FILE_MACRO_CFLAGS" != x; then |
1683 | + AC_MSG_RESULT([using compiler options]) |
1684 | + else |
1685 | + AC_MSG_RESULT([using relative paths]) |
1686 | fi |
1687 | fi |
1688 | AC_SUBST(FILE_MACRO_CFLAGS) |
1689 | @@ -839,12 +872,13 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP], |
1690 | CFLAGS_JVM_COMMON="$ALWAYS_CFLAGS_JVM $ALWAYS_DEFINES_JVM \ |
1691 | $TOOLCHAIN_CFLAGS_JVM ${$1_TOOLCHAIN_CFLAGS_JVM} \ |
1692 | $OS_CFLAGS $OS_CFLAGS_JVM $CFLAGS_OS_DEF_JVM $DEBUG_CFLAGS_JVM \ |
1693 | - $WARNING_CFLAGS $WARNING_CFLAGS_JVM $JVM_PICFLAG $FILE_MACRO_CFLAGS" |
1694 | + $WARNING_CFLAGS $WARNING_CFLAGS_JVM $JVM_PICFLAG $FILE_MACRO_CFLAGS \ |
1695 | + $REPRODUCIBLE_CFLAGS" |
1696 | |
1697 | CFLAGS_JDK_COMMON="$ALWAYS_CFLAGS_JDK $ALWAYS_DEFINES_JDK $TOOLCHAIN_CFLAGS_JDK \ |
1698 | $OS_CFLAGS $CFLAGS_OS_DEF_JDK $DEBUG_CFLAGS_JDK $DEBUG_OPTIONS_FLAGS_JDK \ |
1699 | $WARNING_CFLAGS $WARNING_CFLAGS_JDK $DEBUG_SYMBOLS_CFLAGS_JDK \ |
1700 | - $FILE_MACRO_CFLAGS" |
1701 | + $FILE_MACRO_CFLAGS $REPRODUCIBLE_CFLAGS" |
1702 | |
1703 | # Use ${$2EXTRA_CFLAGS} to block EXTRA_CFLAGS to be added to build flags. |
1704 | # (Currently we don't have any OPENJDK_BUILD_EXTRA_CFLAGS, but that might |
1705 | diff --git a/make/autoconf/flags-ldflags.m4 b/make/autoconf/flags-ldflags.m4 |
1706 | index 7d511ca..2202bb6 100644 |
1707 | --- a/make/autoconf/flags-ldflags.m4 |
1708 | +++ b/make/autoconf/flags-ldflags.m4 |
1709 | @@ -147,9 +147,17 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER], |
1710 | fi |
1711 | fi |
1712 | |
1713 | + if test "x$ENABLE_REPRODUCIBLE_BUILD" = "xtrue"; then |
1714 | + if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then |
1715 | + REPRODUCIBLE_LDFLAGS="-experimental:deterministic" |
1716 | + fi |
1717 | + fi |
1718 | + |
1719 | if test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = "xfalse"; then |
1720 | if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then |
1721 | BASIC_LDFLAGS="$BASIC_LDFLAGS -pdbaltpath:%_PDB%" |
1722 | + # PATHMAP_FLAGS is setup in flags-cflags.m4. |
1723 | + FILE_MACRO_LDFLAGS="${PATHMAP_FLAGS}" |
1724 | fi |
1725 | fi |
1726 | |
1727 | @@ -211,13 +219,15 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_CPU_DEP], |
1728 | LDFLAGS_JDK_COMMON="$BASIC_LDFLAGS $BASIC_LDFLAGS_JDK_ONLY \ |
1729 | $OS_LDFLAGS $DEBUGLEVEL_LDFLAGS_JDK_ONLY ${$2EXTRA_LDFLAGS}" |
1730 | $2LDFLAGS_JDKLIB="$LDFLAGS_JDK_COMMON $BASIC_LDFLAGS_JDK_LIB_ONLY \ |
1731 | - ${$1_LDFLAGS_JDK_LIBPATH} $SHARED_LIBRARY_FLAGS" |
1732 | + ${$1_LDFLAGS_JDK_LIBPATH} $SHARED_LIBRARY_FLAGS \ |
1733 | + $REPRODUCIBLE_LDFLAGS $FILE_MACRO_LDFLAGS" |
1734 | $2LDFLAGS_JDKEXE="$LDFLAGS_JDK_COMMON $EXECUTABLE_LDFLAGS \ |
1735 | - ${$1_CPU_EXECUTABLE_LDFLAGS}" |
1736 | + ${$1_CPU_EXECUTABLE_LDFLAGS} $REPRODUCIBLE_LDFLAGS $FILE_MACRO_LDFLAGS" |
1737 | |
1738 | $2JVM_LDFLAGS="$BASIC_LDFLAGS $BASIC_LDFLAGS_JVM_ONLY $OS_LDFLAGS $OS_LDFLAGS_JVM_ONLY \ |
1739 | $DEBUGLEVEL_LDFLAGS $DEBUGLEVEL_LDFLAGS_JVM_ONLY $BASIC_LDFLAGS_ONLYCXX \ |
1740 | - ${$1_CPU_LDFLAGS} ${$1_CPU_LDFLAGS_JVM_ONLY} ${$2EXTRA_LDFLAGS}" |
1741 | + ${$1_CPU_LDFLAGS} ${$1_CPU_LDFLAGS_JVM_ONLY} ${$2EXTRA_LDFLAGS} \ |
1742 | + $REPRODUCIBLE_LDFLAGS $FILE_MACRO_LDFLAGS" |
1743 | |
1744 | AC_SUBST($2LDFLAGS_JDKLIB) |
1745 | AC_SUBST($2LDFLAGS_JDKEXE) |
1746 | diff --git a/make/autoconf/flags.m4 b/make/autoconf/flags.m4 |
1747 | index a5b4afd..5a3ea96 100644 |
1748 | --- a/make/autoconf/flags.m4 |
1749 | +++ b/make/autoconf/flags.m4 |
1750 | @@ -506,14 +506,14 @@ UTIL_DEFUN_NAMED([FLAGS_CXX_COMPILER_CHECK_ARGUMENTS], |
1751 | UTIL_DEFUN_NAMED([FLAGS_COMPILER_CHECK_ARGUMENTS], |
1752 | [*ARGUMENT IF_TRUE IF_FALSE PREFIX], [$@], |
1753 | [ |
1754 | - FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARG_ARGUMENT], |
1755 | + FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: ARG_ARGUMENT, |
1756 | IF_TRUE: [C_COMP_SUPPORTS="yes"], |
1757 | IF_FALSE: [C_COMP_SUPPORTS="no"], |
1758 | - PREFIX: [ARG_PREFIX]) |
1759 | - FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARG_ARGUMENT], |
1760 | + PREFIX: ARG_PREFIX) |
1761 | + FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: ARG_ARGUMENT, |
1762 | IF_TRUE: [CXX_COMP_SUPPORTS="yes"], |
1763 | IF_FALSE: [CXX_COMP_SUPPORTS="no"], |
1764 | - PREFIX: [ARG_PREFIX]) |
1765 | + PREFIX: ARG_PREFIX) |
1766 | |
1767 | AC_MSG_CHECKING([if both ARG_PREFIX[CC] and ARG_PREFIX[CXX] support "ARG_ARGUMENT"]) |
1768 | supports=no |
1769 | diff --git a/make/autoconf/jdk-options.m4 b/make/autoconf/jdk-options.m4 |
1770 | index 43a7b56..e67ffd4 100644 |
1771 | --- a/make/autoconf/jdk-options.m4 |
1772 | +++ b/make/autoconf/jdk-options.m4 |
1773 | @@ -683,3 +683,178 @@ AC_DEFUN([JDKOPT_ALLOW_ABSOLUTE_PATHS_IN_OUTPUT], |
1774 | |
1775 | AC_SUBST(ALLOW_ABSOLUTE_PATHS_IN_OUTPUT) |
1776 | ]) |
1777 | + |
1778 | +################################################################################ |
1779 | +# |
1780 | +# Check and set options related to reproducible builds. |
1781 | +# |
1782 | +AC_DEFUN_ONCE([JDKOPT_SETUP_REPRODUCIBLE_BUILD], |
1783 | +[ |
1784 | + AC_ARG_WITH([source-date], [AS_HELP_STRING([--with-source-date], |
1785 | + [how to set SOURCE_DATE_EPOCH ('updated', 'current', 'version' a timestamp or an ISO-8601 date) @<:@updated@:>@])], |
1786 | + [with_source_date_present=true], [with_source_date_present=false]) |
1787 | + |
1788 | + AC_MSG_CHECKING([what source date to use]) |
1789 | + |
1790 | + if test "x$with_source_date" = xyes; then |
1791 | + AC_MSG_ERROR([--with-source-date must have a value]) |
1792 | + elif test "x$with_source_date" = xupdated || test "x$with_source_date" = x; then |
1793 | + # Tell the makefiles to update at each build |
1794 | + SOURCE_DATE=updated |
1795 | + AC_MSG_RESULT([determined at build time, from 'updated']) |
1796 | + elif test "x$with_source_date" = xcurrent; then |
1797 | + # Set the current time |
1798 | + SOURCE_DATE=$($DATE +"%s") |
1799 | + AC_MSG_RESULT([$SOURCE_DATE, from 'current']) |
1800 | + elif test "x$with_source_date" = xversion; then |
1801 | + # Use the date from version-numbers |
1802 | + UTIL_GET_EPOCH_TIMESTAMP(SOURCE_DATE, $DEFAULT_VERSION_DATE) |
1803 | + if test "x$SOURCE_DATE" = x; then |
1804 | + AC_MSG_RESULT([unavailable]) |
1805 | + AC_MSG_ERROR([Cannot convert DEFAULT_VERSION_DATE to timestamp]) |
1806 | + fi |
1807 | + AC_MSG_RESULT([$SOURCE_DATE, from 'version']) |
1808 | + else |
1809 | + # It's a timestamp, an ISO-8601 date, or an invalid string |
1810 | + # Additional [] needed to keep m4 from mangling shell constructs. |
1811 | + if [ [[ "$with_source_date" =~ ^[0-9][0-9]*$ ]] ] ; then |
1812 | + SOURCE_DATE=$with_source_date |
1813 | + AC_MSG_RESULT([$SOURCE_DATE, from timestamp on command line]) |
1814 | + else |
1815 | + UTIL_GET_EPOCH_TIMESTAMP(SOURCE_DATE, $with_source_date) |
1816 | + if test "x$SOURCE_DATE" != x; then |
1817 | + AC_MSG_RESULT([$SOURCE_DATE, from ISO-8601 date on command line]) |
1818 | + else |
1819 | + AC_MSG_RESULT([unavailable]) |
1820 | + AC_MSG_ERROR([Cannot parse date string "$with_source_date"]) |
1821 | + fi |
1822 | + fi |
1823 | + fi |
1824 | + |
1825 | + REPRODUCIBLE_BUILD_DEFAULT=$with_source_date_present |
1826 | + |
1827 | + if test "x$OPENJDK_BUILD_OS" = xwindows && \ |
1828 | + test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = xfalse; then |
1829 | + # To support banning absolute paths on Windows, we must use the -pathmap |
1830 | + # method, which requires reproducible builds. |
1831 | + REPRODUCIBLE_BUILD_DEFAULT=true |
1832 | + fi |
1833 | + |
1834 | + UTIL_ARG_ENABLE(NAME: reproducible-build, DEFAULT: $REPRODUCIBLE_BUILD_DEFAULT, |
1835 | + RESULT: ENABLE_REPRODUCIBLE_BUILD, |
1836 | + DESC: [enable reproducible builds (not yet fully functional)], |
1837 | + DEFAULT_DESC: [enabled if --with-source-date is given or on Windows without absolute paths]) |
1838 | + |
1839 | + if test "x$OPENJDK_BUILD_OS" = xwindows && \ |
1840 | + test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = xfalse && \ |
1841 | + test "x$ENABLE_REPRODUCIBLE_BUILD" = xfalse; then |
1842 | + AC_MSG_NOTICE([On Windows it is not possible to combine --disable-reproducible-builds]) |
1843 | + AC_MSG_NOTICE([with --disable-absolute-paths-in-output.]) |
1844 | + AC_MSG_ERROR([Cannot continue]) |
1845 | + fi |
1846 | + |
1847 | + AC_SUBST(SOURCE_DATE) |
1848 | + AC_SUBST(ENABLE_REPRODUCIBLE_BUILD) |
1849 | +]) |
1850 | + |
1851 | +################################################################################ |
1852 | +# |
1853 | +# Setup signing on macOS. This can either be setup to sign with a real identity |
1854 | +# and enabling the hardened runtime, or it can simply add the debug entitlement |
1855 | +# com.apple.security.get-task-allow without actually signing any binaries. The |
1856 | +# latter is needed to be able to debug processes and dump core files on modern |
1857 | +# versions of macOS. It can also be skipped completely. |
1858 | +# |
1859 | +# Check if codesign will run with the given parameters |
1860 | +# $1: Parameters to run with |
1861 | +# $2: Checking message |
1862 | +# Sets CODESIGN_SUCCESS=true/false |
1863 | +AC_DEFUN([JDKOPT_CHECK_CODESIGN_PARAMS], |
1864 | +[ |
1865 | + PARAMS="$1" |
1866 | + MESSAGE="$2" |
1867 | + CODESIGN_TESTFILE="$CONFIGURESUPPORT_OUTPUTDIR/codesign-testfile" |
1868 | + $RM "$CODESIGN_TESTFILE" |
1869 | + $TOUCH "$CODESIGN_TESTFILE" |
1870 | + CODESIGN_SUCCESS=false |
1871 | + $CODESIGN $PARAMS "$CODESIGN_TESTFILE" 2>&AS_MESSAGE_LOG_FD \ |
1872 | + >&AS_MESSAGE_LOG_FD && CODESIGN_SUCCESS=true |
1873 | + $RM "$CODESIGN_TESTFILE" |
1874 | + AC_MSG_CHECKING([$MESSAGE]) |
1875 | + if test "x$CODESIGN_SUCCESS" = "xtrue"; then |
1876 | + AC_MSG_RESULT([yes]) |
1877 | + else |
1878 | + AC_MSG_RESULT([no]) |
1879 | + fi |
1880 | +]) |
1881 | + |
1882 | +AC_DEFUN([JDKOPT_CHECK_CODESIGN_HARDENED], |
1883 | +[ |
1884 | + JDKOPT_CHECK_CODESIGN_PARAMS([-s "$MACOSX_CODESIGN_IDENTITY" --option runtime], |
1885 | + [if codesign with hardened runtime is possible]) |
1886 | +]) |
1887 | + |
1888 | +AC_DEFUN([JDKOPT_CHECK_CODESIGN_DEBUG], |
1889 | +[ |
1890 | + JDKOPT_CHECK_CODESIGN_PARAMS([-s -], [if debug mode codesign is possible]) |
1891 | +]) |
1892 | + |
1893 | +AC_DEFUN([JDKOPT_SETUP_MACOSX_SIGNING], |
1894 | +[ |
1895 | + ENABLE_CODESIGN=false |
1896 | + if test "x$OPENJDK_TARGET_OS" = "xmacosx" && test "x$CODESIGN" != "x"; then |
1897 | + |
1898 | + UTIL_ARG_WITH(NAME: macosx-codesign, TYPE: literal, OPTIONAL: true, |
1899 | + VALID_VALUES: [hardened debug auto], DEFAULT: auto, |
1900 | + ENABLED_DEFAULT: true, |
1901 | + CHECKING_MSG: [for macosx code signing mode], |
1902 | + DESC: [set the macosx code signing mode (hardened, debug, auto)] |
1903 | + ) |
1904 | + |
1905 | + MACOSX_CODESIGN_MODE=disabled |
1906 | + if test "x$MACOSX_CODESIGN_ENABLED" = "xtrue"; then |
1907 | + |
1908 | + # Check for user provided code signing identity. |
1909 | + UTIL_ARG_WITH(NAME: macosx-codesign-identity, TYPE: string, |
1910 | + DEFAULT: openjdk_codesign, CHECK_VALUE: UTIL_CHECK_STRING_NON_EMPTY, |
1911 | + DESC: [specify the macosx code signing identity], |
1912 | + CHECKING_MSG: [for macosx code signing identity] |
1913 | + ) |
1914 | + AC_SUBST(MACOSX_CODESIGN_IDENTITY) |
1915 | + |
1916 | + if test "x$MACOSX_CODESIGN" = "xauto"; then |
1917 | + # Only try to default to hardened signing on release builds |
1918 | + if test "x$DEBUG_LEVEL" = "xrelease"; then |
1919 | + JDKOPT_CHECK_CODESIGN_HARDENED |
1920 | + if test "x$CODESIGN_SUCCESS" = "xtrue"; then |
1921 | + MACOSX_CODESIGN_MODE=hardened |
1922 | + fi |
1923 | + fi |
1924 | + if test "x$MACOSX_CODESIGN_MODE" = "xdisabled"; then |
1925 | + JDKOPT_CHECK_CODESIGN_DEBUG |
1926 | + if test "x$CODESIGN_SUCCESS" = "xtrue"; then |
1927 | + MACOSX_CODESIGN_MODE=debug |
1928 | + fi |
1929 | + fi |
1930 | + AC_MSG_CHECKING([for macosx code signing mode]) |
1931 | + AC_MSG_RESULT([$MACOSX_CODESIGN_MODE]) |
1932 | + elif test "x$MACOSX_CODESIGN" = "xhardened"; then |
1933 | + JDKOPT_CHECK_CODESIGN_HARDENED |
1934 | + if test "x$CODESIGN_SUCCESS" = "xfalse"; then |
1935 | + AC_MSG_ERROR([Signing with hardened runtime is not possible]) |
1936 | + fi |
1937 | + MACOSX_CODESIGN_MODE=hardened |
1938 | + elif test "x$MACOSX_CODESIGN" = "xdebug"; then |
1939 | + JDKOPT_CHECK_CODESIGN_DEBUG |
1940 | + if test "x$CODESIGN_SUCCESS" = "xfalse"; then |
1941 | + AC_MSG_ERROR([Signing in debug mode is not possible]) |
1942 | + fi |
1943 | + MACOSX_CODESIGN_MODE=debug |
1944 | + else |
1945 | + AC_MSG_ERROR([unknown value for --with-macosx-codesign: $MACOSX_CODESIGN]) |
1946 | + fi |
1947 | + fi |
1948 | + AC_SUBST(MACOSX_CODESIGN_IDENTITY) |
1949 | + AC_SUBST(MACOSX_CODESIGN_MODE) |
1950 | + fi |
1951 | +]) |
1952 | diff --git a/make/autoconf/jdk-version.m4 b/make/autoconf/jdk-version.m4 |
1953 | index 2620b01..f0d1edf 100644 |
1954 | --- a/make/autoconf/jdk-version.m4 |
1955 | +++ b/make/autoconf/jdk-version.m4 |
1956 | @@ -36,7 +36,7 @@ |
1957 | AC_DEFUN([JDKVER_CHECK_AND_SET_NUMBER], |
1958 | [ |
1959 | # Additional [] needed to keep m4 from mangling shell constructs. |
1960 | - if [ ! [[ "$2" =~ ^0*([1-9][0-9]*)|(0)$ ]] ] ; then |
1961 | + if [ ! [[ "$2" =~ ^0*([1-9][0-9]*)$|^0*(0)$ ]] ] ; then |
1962 | AC_MSG_ERROR(["$2" is not a valid numerical value for $1]) |
1963 | fi |
1964 | # Extract the version number without leading zeros. |
1965 | diff --git a/make/autoconf/lib-x11.m4 b/make/autoconf/lib-x11.m4 |
1966 | index d862c02..6ba668e 100644 |
1967 | --- a/make/autoconf/lib-x11.m4 |
1968 | +++ b/make/autoconf/lib-x11.m4 |
1969 | @@ -1,5 +1,5 @@ |
1970 | # |
1971 | -# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. |
1972 | +# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. |
1973 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
1974 | # |
1975 | # This code is free software; you can redistribute it and/or modify it |
1976 | @@ -103,22 +103,28 @@ AC_DEFUN_ONCE([LIB_SETUP_X11], |
1977 | OLD_CFLAGS="$CFLAGS" |
1978 | CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS" |
1979 | |
1980 | - HEADERS_TO_CHECK="X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h" |
1981 | - # There is no Xrandr extension on AIX |
1982 | if test "x$OPENJDK_TARGET_OS" != xaix; then |
1983 | - HEADERS_TO_CHECK="$HEADERS_TO_CHECK X11/extensions/Xrandr.h" |
1984 | + AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h X11/extensions/Xrandr.h], |
1985 | + [X11_HEADERS_OK=yes], |
1986 | + [X11_HEADERS_OK=no; break], |
1987 | + [ |
1988 | + # include <X11/Xlib.h> |
1989 | + # include <X11/Xutil.h> |
1990 | + ] |
1991 | + ) |
1992 | + else |
1993 | + # There is no Xrandr extension on AIX. Code is duplicated to avoid autoconf |
1994 | + # 2.71+ warning "AC_CHECK_HEADERS: you should use literals" |
1995 | + AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h], |
1996 | + [X11_HEADERS_OK=yes], |
1997 | + [X11_HEADERS_OK=no; break], |
1998 | + [ |
1999 | + # include <X11/Xlib.h> |
2000 | + # include <X11/Xutil.h> |
2001 | + ] |
2002 | + ) |
2003 | fi |
2004 | |
2005 | - # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10 |
2006 | - AC_CHECK_HEADERS([$HEADERS_TO_CHECK], |
2007 | - [X11_HEADERS_OK=yes], |
2008 | - [X11_HEADERS_OK=no; break], |
2009 | - [ |
2010 | - # include <X11/Xlib.h> |
2011 | - # include <X11/Xutil.h> |
2012 | - ] |
2013 | - ) |
2014 | - |
2015 | if test "x$X11_HEADERS_OK" = xno; then |
2016 | HELP_MSG_MISSING_DEPENDENCY([x11]) |
2017 | AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h Xrandr.h XTest.h Intrinsic.h). $HELP_MSG]) |
2018 | diff --git a/make/autoconf/spec.gmk.in b/make/autoconf/spec.gmk.in |
2019 | index 1746be3..3787b12 100644 |
2020 | --- a/make/autoconf/spec.gmk.in |
2021 | +++ b/make/autoconf/spec.gmk.in |
2022 | @@ -126,6 +126,9 @@ RELEASE_FILE_OS_NAME:=@RELEASE_FILE_OS_NAME@ |
2023 | RELEASE_FILE_OS_ARCH:=@RELEASE_FILE_OS_ARCH@ |
2024 | RELEASE_FILE_LIBC:=@RELEASE_FILE_LIBC@ |
2025 | |
2026 | +SOURCE_DATE := @SOURCE_DATE@ |
2027 | +ENABLE_REPRODUCIBLE_BUILD := @ENABLE_REPRODUCIBLE_BUILD@ |
2028 | + |
2029 | LIBM:=@LIBM@ |
2030 | LIBDL:=@LIBDL@ |
2031 | |
2032 | @@ -419,7 +422,8 @@ MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@ |
2033 | # The highest allowed version of macosx |
2034 | MACOSX_VERSION_MAX=@MACOSX_VERSION_MAX@ |
2035 | |
2036 | -# The macosx code signing identity to use |
2037 | +# The macosx code signing configuration |
2038 | +MACOSX_CODESIGN_MODE:=@MACOSX_CODESIGN_MODE@ |
2039 | MACOSX_CODESIGN_IDENTITY=@MACOSX_CODESIGN_IDENTITY@ |
2040 | |
2041 | # Toolchain type: gcc, clang, solstudio, lxc, microsoft... |
2042 | diff --git a/make/autoconf/util.m4 b/make/autoconf/util.m4 |
2043 | index c768e42..7be5d52 100644 |
2044 | --- a/make/autoconf/util.m4 |
2045 | +++ b/make/autoconf/util.m4 |
2046 | @@ -52,7 +52,7 @@ m4_include([util_paths.m4]) |
2047 | AC_DEFUN([UTIL_DEFUN_NAMED], |
2048 | [ |
2049 | AC_DEFUN($1, [ |
2050 | - m4_foreach(arg, m4_split($2), [ |
2051 | + m4_foreach([arg], m4_split(m4_normalize($2)), [ |
2052 | m4_if(m4_bregexp(arg, [^\*]), -1, |
2053 | [ |
2054 | m4_set_add(legal_named_args, arg) |
2055 | @@ -64,12 +64,18 @@ AC_DEFUN([UTIL_DEFUN_NAMED], |
2056 | ) |
2057 | ]) |
2058 | |
2059 | - m4_foreach([arg], [$3], [ |
2060 | - m4_define(arg_name, m4_substr(arg, 0, m4_bregexp(arg, [: ]))) |
2061 | - 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, [ ])'.])]) |
2062 | + # Delicate quoting and unquoting sequence to ensure the actual value is passed along unchanged |
2063 | + # For details on how this works, see https://git.openjdk.org/jdk/pull/11458#discussion_r1038173051 |
2064 | + # WARNING: Proceed at the risk of your own sanity, getting this to work has made me completely |
2065 | + # incapable of feeling love or any other positive emotion |
2066 | + # ~Julian |
2067 | + m4_foreach([arg], m4_dquote(m4_dquote_elt($3)), [ |
2068 | + m4_if(m4_index(arg, [: ]), -1, [m4_define([arg], m4_dquote(m4_bpatsubst(m4_dquote(arg), [:], [: ])))]) |
2069 | + m4_define(arg_name, m4_substr(arg, 0, m4_index(arg, [: ]))) |
2070 | + 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, [ ])'.])]) |
2071 | m4_set_remove(required_named_args, arg_name) |
2072 | m4_set_remove(legal_named_args, arg_name) |
2073 | - m4_pushdef([ARG_][]arg_name, m4_substr(arg, m4_incr(m4_incr(m4_bregexp(arg, [: ]))))) |
2074 | + m4_pushdef([ARG_][]arg_name, m4_bpatsubst(m4_bpatsubst(m4_dquote(m4_dquote(arg)), arg_name[: ]), [^\s*])) |
2075 | m4_set_add(defined_args, arg_name) |
2076 | m4_undefine([arg_name]) |
2077 | ]) |
2078 | @@ -95,6 +101,83 @@ AC_DEFUN([UTIL_DEFUN_NAMED], |
2079 | ]) |
2080 | |
2081 | ############################################################################### |
2082 | +# Assert that a programmatic condition holds. If not, exit with an error message. |
2083 | +# Check that a shell expression gives return code 0 |
2084 | +# |
2085 | +# $1: The shell expression to evaluate |
2086 | +# $2: A message to describe the expression in case of failure |
2087 | +# $2: An message to print in case of failure [optional] |
2088 | +# |
2089 | +AC_DEFUN([UTIL_ASSERT_SHELL_TEST], |
2090 | +[ |
2091 | + ASSERTION_MSG="m4_normalize([$3])" |
2092 | + if $1; then |
2093 | + $ECHO Assertion failed: $2 |
2094 | + if test "x$3" != x; then |
2095 | + $ECHO Assertion message: "$3" |
2096 | + fi |
2097 | + exit 1 |
2098 | + fi |
2099 | +]) |
2100 | + |
2101 | + |
2102 | +############################################################################### |
2103 | +# Assert that a programmatic condition holds. If not, exit with an error message. |
2104 | +# Check that two strings are equal. |
2105 | +# |
2106 | +# $1: The actual string found |
2107 | +# $2: The expected string |
2108 | +# $3: An message to print in case of failure [optional] |
2109 | +# |
2110 | +AC_DEFUN([UTIL_ASSERT_STRING_EQUALS], |
2111 | +[ |
2112 | + UTIL_ASSERT_SHELL_TEST( |
2113 | + [test "x[$1]" != "x[$2]"], |
2114 | + [Actual value '[$1]' \("[$1]"\) did not match expected value '[$2]' \("[$2]"\)], |
2115 | + $3) |
2116 | +]) |
2117 | + |
2118 | +############################################################################### |
2119 | +# Assert that a programmatic condition holds. If not, exit with an error message. |
2120 | +# Check that two strings not are equal. |
2121 | +# |
2122 | +# $1: The actual string found |
2123 | +# $2: The expected string |
2124 | +# $3: An message to print in case of failure [optional] |
2125 | +# |
2126 | +AC_DEFUN([UTIL_ASSERT_STRING_NOT_EQUALS], |
2127 | +[ |
2128 | + UTIL_ASSERT_SHELL_TEST( |
2129 | + [test "x[$1]" = "x[$2]"], |
2130 | + [Actual value '[$1]' \("[$1]"\) unexpectedly matched '[$2]' \("[$2]"\)], |
2131 | + $3) |
2132 | +]) |
2133 | + |
2134 | +############################################################################### |
2135 | +# Assert that a programmatic condition holds. If not, exit with an error message. |
2136 | +# Check that the given expression evaluates to the string 'true' |
2137 | +# |
2138 | +# $1: The expression to evaluate |
2139 | +# $2: An message to print in case of failure [optional] |
2140 | +# |
2141 | +AC_DEFUN([UTIL_ASSERT_TRUE], |
2142 | +[ |
2143 | + UTIL_ASSERT_STRING_EQUALS($1, true, $3) |
2144 | +]) |
2145 | + |
2146 | +############################################################################### |
2147 | +# Assert that a programmatic condition holds. If not, exit with an error message. |
2148 | +# Check that the given expression does not evaluate to the string 'true' |
2149 | +# |
2150 | +# $1: The expression to evaluate |
2151 | +# $2: An message to print in case of failure [optional] |
2152 | +# |
2153 | +AC_DEFUN([UTIL_ASSERT_NOT_TRUE], |
2154 | +[ |
2155 | + UTIL_ASSERT_STRING_NOT_EQUALS($1, true, $3) |
2156 | +]) |
2157 | + |
2158 | +############################################################################### |
2159 | # Check if a list of space-separated words are selected only from a list of |
2160 | # space-separated legal words. Typical use is to see if a user-specified |
2161 | # set of words is selected from a set of legal words. |
2162 | @@ -149,6 +232,29 @@ AC_DEFUN([UTIL_GET_MATCHING_VALUES], |
2163 | ]) |
2164 | |
2165 | ############################################################################### |
2166 | +# Converts an ISO-8601 date/time string to a unix epoch timestamp. If no |
2167 | +# suitable conversion method was found, an empty string is returned. |
2168 | +# |
2169 | +# Sets the specified variable to the resulting list. |
2170 | +# |
2171 | +# $1: result variable name |
2172 | +# $2: input date/time string |
2173 | +AC_DEFUN([UTIL_GET_EPOCH_TIMESTAMP], |
2174 | +[ |
2175 | + timestamp=$($DATE --utc --date=$2 +"%s" 2> /dev/null) |
2176 | + if test "x$timestamp" = x; then |
2177 | + # GNU date format did not work, try BSD date options |
2178 | + timestamp=$($DATE -j -f "%F %T" "$2" "+%s" 2> /dev/null) |
2179 | + if test "x$timestamp" = x; then |
2180 | + # Perhaps the time was missing |
2181 | + timestamp=$($DATE -j -f "%F %T" "$2 00:00:00" "+%s" 2> /dev/null) |
2182 | + # If this did not work, we give up and return the empty string |
2183 | + fi |
2184 | + fi |
2185 | + $1=$timestamp |
2186 | +]) |
2187 | + |
2188 | +############################################################################### |
2189 | # Sort a space-separated list, and remove duplicates. |
2190 | # |
2191 | # Sets the specified variable to the resulting list. |
2192 | @@ -226,3 +332,493 @@ AC_DEFUN([UTIL_ALIASED_ARG_ENABLE], |
2193 | translit(patsubst($2, --), -, _)="$[enable_]translit($1, -, _)" |
2194 | ]) |
2195 | ]) |
2196 | + |
2197 | +############################################################################### |
2198 | +# Creates a command-line option using the --enable-* pattern. Will return a |
2199 | +# value of 'true' or 'false' in the RESULT variable, depending on whether the |
2200 | +# option was enabled or not by the user. The option can not be turned on if it |
2201 | +# is not available, as specified by AVAILABLE and/or CHECK_AVAILABLE. |
2202 | +# |
2203 | +# Arguments: |
2204 | +# NAME: The base name of this option (i.e. what follows --enable-). Required. |
2205 | +# RESULT: The name of the variable to set to the result. Defaults to |
2206 | +# <NAME in uppercase>_ENABLED. |
2207 | +# DEFAULT: The default value for this option. Can be true, false or auto. |
2208 | +# Defaults to true. |
2209 | +# AVAILABLE: If true, this option is allowed to be selected. Defaults to true. |
2210 | +# DESC: A description of this option. Defaults to a generic and unhelpful |
2211 | +# string. |
2212 | +# DEFAULT_DESC: A message describing the default value, for the help. Defaults |
2213 | +# to the literal value of DEFAULT. |
2214 | +# CHECKING_MSG: The message to present to user when checking this option. |
2215 | +# Defaults to a generic message. |
2216 | +# CHECK_AVAILABLE: An optional code block to execute to determine if the |
2217 | +# option should be available. Must set AVAILABLE to 'false' if not. |
2218 | +# IF_GIVEN: An optional code block to execute if the option was given on the |
2219 | +# command line (regardless of the value). |
2220 | +# IF_NOT_GIVEN: An optional code block to execute if the option was not given |
2221 | +# on the command line (regardless of the value). |
2222 | +# IF_ENABLED: An optional code block to execute if the option is turned on. |
2223 | +# IF_DISABLED: An optional code block to execute if the option is turned off. |
2224 | +# |
2225 | +UTIL_DEFUN_NAMED([UTIL_ARG_ENABLE], |
2226 | + [*NAME RESULT DEFAULT AVAILABLE DESC DEFAULT_DESC CHECKING_MSG |
2227 | + CHECK_AVAILABLE IF_GIVEN IF_NOT_GIVEN IF_ENABLED IF_DISABLED], [$@], |
2228 | +[ |
2229 | + ########################## |
2230 | + # Part 1: Set up m4 macros |
2231 | + ########################## |
2232 | + |
2233 | + # If DEFAULT is not specified, set it to 'true'. |
2234 | + m4_define([ARG_DEFAULT], m4_if(ARG_DEFAULT, , true, ARG_DEFAULT)) |
2235 | + |
2236 | + # If AVAILABLE is not specified, set it to 'true'. |
2237 | + m4_define([ARG_AVAILABLE], m4_if(ARG_AVAILABLE, , true, ARG_AVAILABLE)) |
2238 | + |
2239 | + # If DEFAULT_DESC is not specified, calculate it from DEFAULT. |
2240 | + 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)) |
2241 | + |
2242 | + # If RESULT is not specified, set it to 'ARG_NAME[_ENABLED]'. |
2243 | + m4_define([ARG_RESULT], m4_if(ARG_RESULT, , m4_translit(ARG_NAME, [a-z-], [A-Z_])[_ENABLED], ARG_RESULT)) |
2244 | + # Construct shell variable names for the option |
2245 | + m4_define(ARG_OPTION, [enable_]m4_translit(ARG_NAME, [-], [_])) |
2246 | + m4_define(ARG_GIVEN, m4_translit(ARG_NAME, [a-z-], [A-Z_])[_GIVEN]) |
2247 | + |
2248 | + # If DESC is not specified, set it to a generic description. |
2249 | + m4_define([ARG_DESC], m4_if(m4_quote(ARG_DESC), , [[Enable the ARG_NAME feature]], [m4_normalize(ARG_DESC)])) |
2250 | + |
2251 | + # If CHECKING_MSG is not specified, set it to a generic description. |
2252 | + m4_define([ARG_CHECKING_MSG], m4_if(m4_quote(ARG_CHECKING_MSG), , [[for --enable-ARG_NAME]], [m4_normalize(ARG_CHECKING_MSG)])) |
2253 | + |
2254 | + # If the code blocks are not given, set them to the empty statements to avoid |
2255 | + # tripping up bash. |
2256 | + m4_if(ARG_CHECK_AVAILABLE, , [m4_define([ARG_CHECK_AVAILABLE], [:])]) |
2257 | + m4_if(ARG_IF_GIVEN, , [m4_define([ARG_IF_GIVEN], [:])]) |
2258 | + m4_if(ARG_IF_NOT_GIVEN, , [m4_define([ARG_IF_NOT_GIVEN], [:])]) |
2259 | + m4_if(ARG_IF_ENABLED, , [m4_define([ARG_IF_ENABLED], [:])]) |
2260 | + m4_if(ARG_IF_DISABLED, , [m4_define([ARG_IF_DISABLED], [:])]) |
2261 | + |
2262 | + ########################## |
2263 | + # Part 2: Set up autoconf shell code |
2264 | + ########################## |
2265 | + |
2266 | + # Check that DEFAULT has a valid value |
2267 | + if test "[x]ARG_DEFAULT" != xtrue && test "[x]ARG_DEFAULT" != xfalse && \ |
2268 | + test "[x]ARG_DEFAULT" != xauto ; then |
2269 | + AC_MSG_ERROR([Internal error: Argument DEFAULT to [UTIL_ARG_ENABLE] can only be true, false or auto, was: 'ARG_DEFAULT']) |
2270 | + fi |
2271 | + |
2272 | + # Check that AVAILABLE has a valid value |
2273 | + if test "[x]ARG_AVAILABLE" != xtrue && test "[x]ARG_AVAILABLE" != xfalse; then |
2274 | + AC_MSG_ERROR([Internal error: Argument AVAILABLE to [UTIL_ARG_ENABLE] can only be true or false, was: 'ARG_AVAILABLE']) |
2275 | + fi |
2276 | + |
2277 | + AC_ARG_ENABLE(ARG_NAME, AS_HELP_STRING([--enable-]ARG_NAME, |
2278 | + [ARG_DESC [ARG_DEFAULT_DESC]]), [ARG_GIVEN=true], [ARG_GIVEN=false]) |
2279 | + |
2280 | + # Check if the option is available |
2281 | + AVAILABLE=ARG_AVAILABLE |
2282 | + # Run the available check block (if any), which can overwrite AVAILABLE. |
2283 | + ARG_CHECK_AVAILABLE |
2284 | + |
2285 | + # Check if the option should be turned on |
2286 | + AC_MSG_CHECKING(ARG_CHECKING_MSG) |
2287 | + if test x$ARG_GIVEN = xfalse; then |
2288 | + if test ARG_DEFAULT = auto; then |
2289 | + # If not given, and default is auto, set it to true iff it's available. |
2290 | + ARG_RESULT=$AVAILABLE |
2291 | + REASON="from default 'auto'" |
2292 | + else |
2293 | + ARG_RESULT=ARG_DEFAULT |
2294 | + REASON="default" |
2295 | + fi |
2296 | + else |
2297 | + if test x$ARG_OPTION = xyes; then |
2298 | + ARG_RESULT=true |
2299 | + REASON="from command line" |
2300 | + elif test x$ARG_OPTION = xno; then |
2301 | + ARG_RESULT=false |
2302 | + REASON="from command line" |
2303 | + elif test x$ARG_OPTION = xauto; then |
2304 | + if test ARG_DEFAULT = auto; then |
2305 | + # If both given and default is auto, set it to true iff it's available. |
2306 | + ARG_RESULT=$AVAILABLE |
2307 | + else |
2308 | + ARG_RESULT=ARG_DEFAULT |
2309 | + fi |
2310 | + REASON="from command line 'auto'" |
2311 | + else |
2312 | + AC_MSG_ERROR([Option [--enable-]ARG_NAME can only be 'yes', 'no' or 'auto']) |
2313 | + fi |
2314 | + fi |
2315 | + |
2316 | + if test x$ARG_RESULT = xtrue; then |
2317 | + AC_MSG_RESULT([enabled, $REASON]) |
2318 | + if test x$AVAILABLE = xfalse; then |
2319 | + AC_MSG_ERROR([Option [--enable-]ARG_NAME is not available]) |
2320 | + fi |
2321 | + else |
2322 | + AC_MSG_RESULT([disabled, $REASON]) |
2323 | + fi |
2324 | + |
2325 | + # Execute result payloads, if present |
2326 | + if test x$ARG_GIVEN = xtrue; then |
2327 | + ARG_IF_GIVEN |
2328 | + else |
2329 | + ARG_IF_NOT_GIVEN |
2330 | + fi |
2331 | + |
2332 | + if test x$ARG_RESULT = xtrue; then |
2333 | + ARG_IF_ENABLED |
2334 | + else |
2335 | + ARG_IF_DISABLED |
2336 | + fi |
2337 | +]) |
2338 | + |
2339 | +############################################################################### |
2340 | +# Helper functions for ARG_WITH, to validate different types of argument |
2341 | + |
2342 | +# Dispatcher to call the correct UTIL_CHECK_TYPE_* function depending on the ARG_TYPE |
2343 | +AC_DEFUN([UTIL_CHECK_TYPE], |
2344 | +[ |
2345 | + UTIL_CHECK_TYPE_$1($2) |
2346 | +]) |
2347 | + |
2348 | +AC_DEFUN([UTIL_CHECK_TYPE_string], |
2349 | +[ |
2350 | + # All strings always passes |
2351 | +]) |
2352 | + |
2353 | +AC_DEFUN([UTIL_CHECK_TYPE_integer], |
2354 | +[ |
2355 | + # Check that the argument is an integer |
2356 | + # Additional [] needed to keep m4 from mangling shell constructs. |
2357 | + [ if [[ ! "$1" =~ ^[0-9]+$ ]] ; then ] |
2358 | + FAILURE="Not an integer: $1" |
2359 | + fi |
2360 | +]) |
2361 | + |
2362 | +AC_DEFUN([UTIL_CHECK_TYPE_file], |
2363 | +[ |
2364 | + # Check that the argument is an existing file |
2365 | + if test ! -f "$1" ; then |
2366 | + FAILURE="File $1 does not exist or is not readable" |
2367 | + fi |
2368 | +]) |
2369 | + |
2370 | +AC_DEFUN([UTIL_CHECK_TYPE_directory], |
2371 | +[ |
2372 | + # Check that the argument is an existing directory |
2373 | + if test ! -d "$1" ; then |
2374 | + FAILURE="Directory $1 does not exist or is not readable" |
2375 | + fi |
2376 | + |
2377 | + if test "[x]ARG_CHECK_FOR_FILES" != x; then |
2378 | + for file in ARG_CHECK_FOR_FILES; do |
2379 | + found_files=$($ECHO $(ls $1/$file 2> /dev/null)) |
2380 | + if test "x$found_files" = x; then |
2381 | + FAILURE="Directory $1 does not contain $file" |
2382 | + break |
2383 | + elif ! test -e "$found_files"; then |
2384 | + FAILURE="Directory $1 contains multiple $file: $found_files" |
2385 | + break |
2386 | + fi |
2387 | + done |
2388 | + fi |
2389 | +]) |
2390 | + |
2391 | +AC_DEFUN([UTIL_CHECK_TYPE_literal], |
2392 | +[ |
2393 | + # Check if it contains a space between non-space characters |
2394 | + # Additional [] needed to keep m4 from mangling shell constructs. |
2395 | + [ if [[ "$1" =~ [^' ']' '+[^' '] ]] ; then ] |
2396 | + FAILURE="Multiple words: $1" |
2397 | + fi |
2398 | + |
2399 | + # Check that the selected variants are valid |
2400 | + UTIL_GET_NON_MATCHING_VALUES(invalid_value, $1, \ |
2401 | + ARG_VALID_VALUES) |
2402 | + if test "x$invalid_value" != x; then |
2403 | + FAILURE="Invalid value: $invalid_value. Valid values are: ARG_VALID_VALUES" |
2404 | + fi |
2405 | +]) |
2406 | + |
2407 | +AC_DEFUN([UTIL_CHECK_TYPE_multivalue], |
2408 | +[ |
2409 | + # We accept either space or comma as separator, but use space internally |
2410 | + values=`$ECHO $1 | $SED -e 's/,/ /g'` |
2411 | + |
2412 | + # Check that the selected variants are valid |
2413 | + UTIL_GET_NON_MATCHING_VALUES(invalid_value, $values, \ |
2414 | + ARG_VALID_VALUES) |
2415 | + if test "x$invalid_value" != x; then |
2416 | + FAILURE="Invalid value(s): $invalid_value. Valid values are: ARG_VALID_VALUES" |
2417 | + fi |
2418 | + |
2419 | + # Update to version without comma |
2420 | + ARG_RESULT=$($ECHO $values) |
2421 | +]) |
2422 | + |
2423 | +AC_DEFUN([UTIL_CHECK_TYPE_features], |
2424 | +[ |
2425 | + # We accept either space or comma as separator, but use space internally |
2426 | + feature_list=`$ECHO $1 | $SED -e 's/,/ /g'` |
2427 | + features_enabled=`$ECHO $feature_list | \ |
2428 | + $AWK '{ for (i=1; i<=NF; i++) if (!match($i, /^-.*/)) printf("%s ", $i) }'` |
2429 | + features_disabled=`$ECHO $feature_list | \ |
2430 | + $AWK '{ for (i=1; i<=NF; i++) if (match($i, /^-.*/)) printf("%s ", substr($i, 2))}'` |
2431 | + |
2432 | + # Check that the selected features are valid |
2433 | + UTIL_GET_NON_MATCHING_VALUES(invalid_features, $features_enabled \ |
2434 | + $features_disabled, ARG_VALID_VALUES) |
2435 | + if test "x$invalid_features" != x; then |
2436 | + FAILURE="Invalid feature(s): $invalid_features. Valid values are: ARG_VALID_VALUES" |
2437 | + fi |
2438 | + |
2439 | + # Update to version without comma |
2440 | + ARG_RESULT=$($ECHO $feature_list) |
2441 | +]) |
2442 | + |
2443 | +############################################################################### |
2444 | +# Creates a command-line option using the --with-* pattern. Will return a |
2445 | +# string in the RESULT variable with the option provided by the user, or the |
2446 | +# empty string if the --with-* option was not given. The option can not be given |
2447 | +# if it is not available, as specified by AVAILABLE and/or CHECK_AVAILABLE. |
2448 | +# |
2449 | +# Arguments: |
2450 | +# NAME: The base name of this option (i.e. what follows --with-). Required. |
2451 | +# TYPE: The type of the value. Can be one of "string", "integer", "file", |
2452 | +# "directory", "literal", "multivalue" or "features". Required. |
2453 | +# DEFAULT: The default value for this option. Can be any valid string. |
2454 | +# Required. |
2455 | +# OPTIONAL: If this feature can be disabled. Defaults to false. If true, |
2456 | +# the feature can be disabled using --without-FOO, --with-FOO=no, or |
2457 | +# --with-FOO=. Check the ENABLED_RESULT variable for the enabled/disabled |
2458 | +# state. |
2459 | +# RESULT: The name of the variable to set to the result. Defaults to |
2460 | +# <NAME in uppercase>. Set to empty if ENABLED_RESULT is false. |
2461 | +# ENABLED_DEFAULT: If the value is enabled by default. Defaults to false. Only |
2462 | +# relevant if OPTIONAL is true. |
2463 | +# ENABLED_RESULT: The name of the variable to set to the enabled/disabled |
2464 | +# result state. Defaults to <NAME in uppercase>_ENABLED. |
2465 | +# AVAILABLE: If true, this option is allowed to be selected. Defaults to true. |
2466 | +# DESC: A description of this option. Defaults to a generic and unhelpful |
2467 | +# string. |
2468 | +# DEFAULT_DESC: A message describing the default value, for the help. Defaults |
2469 | +# to the literal value of DEFAULT, or "<none>" if DEFAULT is empty. |
2470 | +# CHECKING_MSG: The message to present to user when checking this option. |
2471 | +# Defaults to a generic message. |
2472 | +# CHECK_AVAILABLE: An optional code block to execute to determine if the |
2473 | +# option should be available. Must set AVAILABLE to 'false' if not. |
2474 | +# VALID_VALUES: A list of literals that are the allowed values. Only valid if |
2475 | +# TYPE is "literal", "multivalue" or "features". |
2476 | +# CHECK_VALUE: An optional code block to execute to determine if the value |
2477 | +# is correct. Must set FAILURE to a non-empty string if not. This string |
2478 | +# will be displayed. The value is given in $RESULT. |
2479 | +# CHECK_FOR_FILES: A list of files to verify the presence for. Only valid if |
2480 | +# TYPE is "directory". Paths are relative the directory given as value. |
2481 | +# Wildcards are accepted. Exactly one matching file must be found, for each |
2482 | +# listed file, or FAILURE is set. |
2483 | +# IF_AUTO: An optional code block to execute if the value is "auto", either by |
2484 | +# default or given by the command line. Must set RESULT to the calculated |
2485 | +# value. |
2486 | +# IF_GIVEN: An optional code block to execute if the option was given on the |
2487 | +# command line (regardless of the value). |
2488 | +# IF_NOT_GIVEN: An optional code block to execute if the option was not given |
2489 | +# on the command line (regardless of the value). |
2490 | +# |
2491 | +UTIL_DEFUN_NAMED([UTIL_ARG_WITH], |
2492 | + [*NAME *TYPE *DEFAULT OPTIONAL RESULT ENABLED_DEFAULT ENABLED_RESULT |
2493 | + AVAILABLE DESC DEFAULT_DESC CHECKING_MSG CHECK_AVAILABLE VALID_VALUES |
2494 | + CHECK_VALUE CHECK_FOR_FILES IF_AUTO IF_GIVEN IF_NOT_GIVEN], [$@], |
2495 | +[ |
2496 | + ########################## |
2497 | + # Part 1: Set up m4 macros |
2498 | + ########################## |
2499 | + |
2500 | + # If ENABLED_DEFAULT is not specified, set it to 'false'. |
2501 | + m4_define([ARG_ENABLED_DEFAULT], m4_if(ARG_ENABLED_DEFAULT, , false, ARG_ENABLED_DEFAULT)) |
2502 | + |
2503 | + # If AVAILABLE is not specified, set it to 'true'. |
2504 | + m4_define([ARG_AVAILABLE], m4_if(ARG_AVAILABLE, , true, ARG_AVAILABLE)) |
2505 | + |
2506 | + # If OPTIONAL is not specified, set it to 'false'. |
2507 | + m4_define([ARG_OPTIONAL], m4_if(ARG_OPTIONAL, , false, ARG_OPTIONAL)) |
2508 | + |
2509 | + # If DEFAULT_DESC is not specified, calculate it from DEFAULT. |
2510 | + m4_define([ARG_DEFAULT_DESC], m4_if(ARG_DEFAULT_DESC, , m4_if(ARG_DEFAULT, , <none>, ARG_DEFAULT), ARG_DEFAULT_DESC)) |
2511 | + |
2512 | + # If RESULT is not specified, set it to 'ARG_NAME'. |
2513 | + m4_define([ARG_RESULT], m4_if(ARG_RESULT, , m4_translit(ARG_NAME, [a-z-], [A-Z_]), ARG_RESULT)) |
2514 | + |
2515 | + # If ENABLED_RESULT is not specified, set it to 'ARG_NAME[_ENABLED]'. |
2516 | + m4_define([ARG_ENABLED_RESULT], m4_if(ARG_ENABLED_RESULT, , m4_translit(ARG_NAME, [a-z-], [A-Z_])[_ENABLED], ARG_ENABLED_RESULT)) |
2517 | + |
2518 | + # Construct shell variable names for the option |
2519 | + m4_define(ARG_OPTION, [with_]m4_translit(ARG_NAME, [-], [_])) |
2520 | + m4_define(ARG_GIVEN, m4_translit(ARG_NAME, [a-z-], [A-Z_])[_GIVEN]) |
2521 | + |
2522 | + # If DESC is not specified, set it to a generic description. |
2523 | + m4_define([ARG_DESC], m4_if(m4_quote(ARG_DESC), , [[Give a value for the ARG_NAME feature]], [m4_normalize(ARG_DESC)])) |
2524 | + |
2525 | + # If CHECKING_MSG is not specified, set it to a generic description. |
2526 | + m4_define([ARG_CHECKING_MSG], m4_if(m4_quote(ARG_CHECKING_MSG), , [[for --with-ARG_NAME]], [m4_normalize(ARG_CHECKING_MSG)])) |
2527 | + |
2528 | + m4_define([ARG_HAS_AUTO_BLOCK], m4_if(ARG_IF_AUTO, , false, true)) |
2529 | + |
2530 | + # If the code blocks are not given, set them to the empty statements to avoid |
2531 | + # tripping up bash. |
2532 | + m4_if(ARG_CHECK_AVAILABLE, , [m4_define([ARG_CHECK_AVAILABLE], [:])]) |
2533 | + m4_if(ARG_CHECK_VALUE, , [m4_define([ARG_CHECK_VALUE], [:])]) |
2534 | + m4_if(ARG_CHECK_FOR_FILES, , [m4_define([ARG_CHECK_FOR_FILES], [:])]) |
2535 | + m4_if(ARG_IF_AUTO, , [m4_define([ARG_IF_AUTO], [:])]) |
2536 | + m4_if(ARG_IF_GIVEN, , [m4_define([ARG_IF_GIVEN], [:])]) |
2537 | + m4_if(ARG_IF_NOT_GIVEN, , [m4_define([ARG_IF_NOT_GIVEN], [:])]) |
2538 | + |
2539 | + ########################## |
2540 | + # Part 2: Set up autoconf shell code |
2541 | + ########################## |
2542 | + |
2543 | + # Check that OPTIONAL has a valid value |
2544 | + if test "[x]ARG_OPTIONAL" != xtrue && test "[x]ARG_OPTIONAL" != xfalse ; then |
2545 | + AC_MSG_ERROR([Internal error: Argument OPTIONAL to [UTIL_ARG_WITH] can only be true or false, was: 'ARG_OPTIONAL']) |
2546 | + fi |
2547 | + |
2548 | + # Check that ENABLED_DEFAULT has a valid value |
2549 | + if test "[x]ARG_ENABLED_DEFAULT" != xtrue && test "[x]ARG_ENABLED_DEFAULT" != xfalse ; then |
2550 | + AC_MSG_ERROR([Internal error: Argument ENABLED_DEFAULT to [UTIL_ARG_WITH] can only be true or false, was: 'ARG_ENABLED_DEFAULT']) |
2551 | + fi |
2552 | + |
2553 | + # Check that AVAILABLE has a valid value |
2554 | + if test "[x]ARG_AVAILABLE" != xtrue && test "[x]ARG_AVAILABLE" != xfalse; then |
2555 | + AC_MSG_ERROR([Internal error: Argument AVAILABLE to [UTIL_ARG_WITH] can only be true or false, was: 'ARG_AVAILABLE']) |
2556 | + fi |
2557 | + |
2558 | + # Check that TYPE has a valid value |
2559 | + # Need to assign since we can't expand ARG TYPE inside the m4 quoted if statement |
2560 | + TEST_TYPE="ARG_TYPE" |
2561 | + # Additional [] needed to keep m4 from mangling shell constructs. |
2562 | + [ if [[ ! "$TEST_TYPE" =~ ^(string|integer|file|directory|literal|multivalue|features)$ ]] ; then ] |
2563 | + AC_MSG_ERROR([Internal error: Argument TYPE to [UTIL_ARG_WITH] must be a valid type, was: 'ARG_TYPE']) |
2564 | + fi |
2565 | + |
2566 | + AC_ARG_WITH(ARG_NAME, AS_HELP_STRING([--with-]ARG_NAME, |
2567 | + [ARG_DESC [ARG_DEFAULT_DESC]]), [ARG_GIVEN=true], [ARG_GIVEN=false]) |
2568 | + |
2569 | + # Check if the option is available |
2570 | + AVAILABLE=ARG_AVAILABLE |
2571 | + # Run the available check block (if any), which can overwrite AVAILABLE. |
2572 | + ARG_CHECK_AVAILABLE |
2573 | + |
2574 | + # Check if the option should be turned on |
2575 | + AC_MSG_CHECKING(ARG_CHECKING_MSG) |
2576 | + |
2577 | + if test x$AVAILABLE = xfalse; then |
2578 | + ARG_RESULT="$ARG_OPTION" |
2579 | + ARG_ENABLED_RESULT=false |
2580 | + REASON="not available" |
2581 | + else |
2582 | + if test x$ARG_GIVEN = xfalse; then |
2583 | + ARG_RESULT="ARG_DEFAULT" |
2584 | + if test "[x]ARG_OPTIONAL" = xtrue; then |
2585 | + ARG_ENABLED_RESULT=ARG_ENABLED_DEFAULT |
2586 | + else |
2587 | + ARG_ENABLED_RESULT=true |
2588 | + fi |
2589 | + REASON="default" |
2590 | + |
2591 | + else # ARG_GIVEN is true |
2592 | + # Special treatment of "yes" and "no" for "--with-ARG" and "--without-ARG" |
2593 | + if test "x$ARG_OPTION" = xyes || test "x$ARG_OPTION" = xno || test "x$ARG_OPTION" = x ; then |
2594 | + if test "[x]ARG_OPTIONAL" = xfalse; then |
2595 | + if test "x$ARG_OPTION" = x; then |
2596 | + # If not optional, the empty string is a valid value |
2597 | + ARG_RESULT="" |
2598 | + ARG_ENABLED_RESULT=true |
2599 | + REASON="from command line" |
2600 | + else |
2601 | + AC_MSG_RESULT([invalid]) |
2602 | + AC_MSG_ERROR([Option [--with-]ARG_NAME must have a specified value]) |
2603 | + fi |
2604 | + else |
2605 | + if test "x$ARG_OPTION" = xyes; then |
2606 | + ARG_RESULT="ARG_DEFAULT" |
2607 | + ARG_ENABLED_RESULT=true |
2608 | + REASON="default as enabled from command line" |
2609 | + else |
2610 | + # For optional values, both --without-FOO and --with-FOO= disables |
2611 | + ARG_RESULT="" |
2612 | + ARG_ENABLED_RESULT=false |
2613 | + REASON="from command line" |
2614 | + fi |
2615 | + fi |
2616 | + else |
2617 | + # The most common case -- the user gives a value for the option. |
2618 | + ARG_RESULT="$ARG_OPTION" |
2619 | + ARG_ENABLED_RESULT=true |
2620 | + REASON="from command line" |
2621 | + fi |
2622 | + fi |
2623 | + fi |
2624 | + |
2625 | + if test "x$ARG_ENABLED_RESULT" = xfalse; then |
2626 | + if test "x$REASON" = "xnot available"; then |
2627 | + AC_MSG_RESULT([<invalid>, $REASON]) |
2628 | + if test "x$ARG_RESULT" != "x" && test "x$ARG_RESULT" != "xno" ; then |
2629 | + AC_MSG_WARN([Option [--with-]ARG_NAME is not available for this configuration]) |
2630 | + fi |
2631 | + else |
2632 | + AC_MSG_RESULT([<disabled>, $REASON]) |
2633 | + fi |
2634 | + ARG_RESULT="" |
2635 | + else |
2636 | + if test [x]ARG_HAS_AUTO_BLOCK = xtrue && test "x$ARG_RESULT" = xauto; then |
2637 | + # Execute "auto" payload |
2638 | + ARG_IF_AUTO |
2639 | + |
2640 | + ARG_RESULT="$RESULT" |
2641 | + REASON="$REASON (calculated from 'auto')" |
2642 | + fi |
2643 | + |
2644 | + if test "x$ARG_RESULT" = x; then |
2645 | + AC_MSG_RESULT([<none>, $REASON]) |
2646 | + else |
2647 | + AC_MSG_RESULT([$ARG_RESULT, $REASON]) |
2648 | + fi |
2649 | + fi |
2650 | + |
2651 | + # Verify value |
2652 | + # First use our dispatcher to verify that type requirements are satisfied |
2653 | + UTIL_CHECK_TYPE(ARG_TYPE, $ARG_RESULT) |
2654 | + |
2655 | + if test "x$FAILURE" = x; then |
2656 | + # Execute custom verification payload, if present |
2657 | + RESULT="$ARG_RESULT" |
2658 | + |
2659 | + ARG_CHECK_VALUE |
2660 | + |
2661 | + ARG_RESULT="$RESULT" |
2662 | + fi |
2663 | + |
2664 | + if test "x$FAILURE" != x; then |
2665 | + AC_MSG_NOTICE([Invalid value for [--with-]ARG_NAME: "$ARG_RESULT"]) |
2666 | + AC_MSG_NOTICE([$FAILURE]) |
2667 | + AC_MSG_ERROR([Cannot continue]) |
2668 | + fi |
2669 | + |
2670 | + # Execute result payloads, if present |
2671 | + if test x$ARG_GIVEN = xtrue; then |
2672 | + ARG_IF_GIVEN |
2673 | + else |
2674 | + ARG_IF_NOT_GIVEN |
2675 | + fi |
2676 | +]) |
2677 | + |
2678 | +############################################################################### |
2679 | +# Helper functions for CHECK_VALUE in ARG_WITH. |
2680 | +AC_DEFUN([UTIL_CHECK_STRING_NON_EMPTY], |
2681 | +[ |
2682 | + if test "x$RESULT" = "x"; then |
2683 | + FAILURE="Value cannot be empty" |
2684 | + fi |
2685 | +]) |
2686 | diff --git a/make/autoconf/version-numbers b/make/autoconf/version-numbers |
2687 | index 83fe092..64bc19b 100644 |
2688 | --- a/make/autoconf/version-numbers |
2689 | +++ b/make/autoconf/version-numbers |
2690 | @@ -1,5 +1,5 @@ |
2691 | # |
2692 | -# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved. |
2693 | +# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved. |
2694 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
2695 | # |
2696 | # This code is free software; you can redistribute it and/or modify it |
2697 | @@ -28,12 +28,12 @@ |
2698 | |
2699 | DEFAULT_VERSION_FEATURE=11 |
2700 | DEFAULT_VERSION_INTERIM=0 |
2701 | -DEFAULT_VERSION_UPDATE=18 |
2702 | +DEFAULT_VERSION_UPDATE=19 |
2703 | DEFAULT_VERSION_PATCH=0 |
2704 | DEFAULT_VERSION_EXTRA1=0 |
2705 | DEFAULT_VERSION_EXTRA2=0 |
2706 | DEFAULT_VERSION_EXTRA3=0 |
2707 | -DEFAULT_VERSION_DATE=2023-01-17 |
2708 | +DEFAULT_VERSION_DATE=2023-04-18 |
2709 | DEFAULT_VERSION_CLASSFILE_MAJOR=55 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`" |
2710 | DEFAULT_VERSION_CLASSFILE_MINOR=0 |
2711 | DEFAULT_ACCEPTABLE_BOOT_VERSIONS="10 11" |
2712 | diff --git a/make/common/CopyFiles.gmk b/make/common/CopyFiles.gmk |
2713 | new file mode 100644 |
2714 | index 0000000..ac2ef69 |
2715 | --- /dev/null |
2716 | +++ b/make/common/CopyFiles.gmk |
2717 | @@ -0,0 +1,112 @@ |
2718 | +# |
2719 | +# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. |
2720 | +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
2721 | +# |
2722 | +# This code is free software; you can redistribute it and/or modify it |
2723 | +# under the terms of the GNU General Public License version 2 only, as |
2724 | +# published by the Free Software Foundation. Oracle designates this |
2725 | +# particular file as subject to the "Classpath" exception as provided |
2726 | +# by Oracle in the LICENSE file that accompanied this code. |
2727 | +# |
2728 | +# This code is distributed in the hope that it will be useful, but WITHOUT |
2729 | +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
2730 | +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
2731 | +# version 2 for more details (a copy is included in the LICENSE file that |
2732 | +# accompanied this code). |
2733 | +# |
2734 | +# You should have received a copy of the GNU General Public License version |
2735 | +# 2 along with this work; if not, write to the Free Software Foundation, |
2736 | +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
2737 | +# |
2738 | +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
2739 | +# or visit www.oracle.com if you need additional information or have any |
2740 | +# questions. |
2741 | +# |
2742 | + |
2743 | +ifeq (,$(_MAKEBASE_GMK)) |
2744 | + $(error You must include MakeBase.gmk prior to including CopyFiles.gmk) |
2745 | +endif |
2746 | + |
2747 | +################################################################################ |
2748 | +# |
2749 | +# Code for handling the SetupCopyFiles macro. |
2750 | +# |
2751 | +################################################################################ |
2752 | + |
2753 | +define AddFileToCopy |
2754 | + # Helper macro for SetupCopyFiles |
2755 | + # 1 : Source file |
2756 | + # 2 : Dest file |
2757 | + # 3 : Variable to add targets to |
2758 | + # 4 : Macro to call for copy operation |
2759 | + # 5 : Action text to log |
2760 | + $2: $1 |
2761 | + $$(call LogInfo, $(strip $5) $$(patsubst $(OUTPUTDIR)/%,%,$$(call DecodeSpace, $$@))) |
2762 | + $$($$(strip $4)) |
2763 | + |
2764 | + $3 += $2 |
2765 | + $3_SOURCES += $1 |
2766 | +endef |
2767 | + |
2768 | +# Returns the value of the first argument |
2769 | +identity = \ |
2770 | + $(strip $1) |
2771 | + |
2772 | +# Setup make rules for copying files, with an option to do more complex |
2773 | +# processing instead of copying. |
2774 | +# |
2775 | +# Parameter 1 is the name of the rule. This name is used as variable prefix, |
2776 | +# and the targets generated are listed in a variable by that name. |
2777 | +# |
2778 | +# The list of all source files is returned in $1_SOURCES. |
2779 | +# |
2780 | +# Remaining parameters are named arguments. These include: |
2781 | +# SRC : Source root dir (defaults to dir of first file) |
2782 | +# DEST : Dest root dir |
2783 | +# FILES : List of files to copy with absolute paths, or path relative to SRC. |
2784 | +# Must be in SRC. |
2785 | +# FLATTEN : Set to flatten the directory structure in the DEST dir. |
2786 | +# MACRO : Optionally override the default macro used for making the copy. |
2787 | +# Default is 'install-file' |
2788 | +# NAME_MACRO : Optionally supply a macro that rewrites the target file name |
2789 | +# based on the source file name |
2790 | +# LOG_ACTION : Optionally specify a different action text for log messages |
2791 | +SetupCopyFiles = $(NamedParamsMacroTemplate) |
2792 | +define SetupCopyFilesBody |
2793 | + |
2794 | + ifeq ($$($1_MACRO), ) |
2795 | + $1_MACRO := install-file |
2796 | + endif |
2797 | + |
2798 | + # Default SRC to the dir of the first file. |
2799 | + ifeq ($$($1_SRC), ) |
2800 | + $1_SRC := $$(dir $$(firstword $$($1_FILES))) |
2801 | + endif |
2802 | + |
2803 | + ifeq ($$($1_NAME_MACRO), ) |
2804 | + $1_NAME_MACRO := identity |
2805 | + endif |
2806 | + |
2807 | + ifeq ($$($1_LOG_ACTION), ) |
2808 | + $1_LOG_ACTION := Copying |
2809 | + endif |
2810 | + |
2811 | + # Remove any trailing slash from SRC and DEST |
2812 | + $1_SRC := $$(patsubst %/,%,$$($1_SRC)) |
2813 | + $1_DEST := $$(patsubst %/,%,$$($1_DEST)) |
2814 | + |
2815 | + # Need to wrap arguments in DoubleDollar because of the eval nested inside an |
2816 | + # eval macro body. |
2817 | + $$(foreach f, $$(patsubst $$($1_SRC)/%,%,$$($1_FILES)), \ |
2818 | + $$(eval $$(call AddFileToCopy, \ |
2819 | + $$(call DoubleDollar, $$($1_SRC)/$$f), \ |
2820 | + $$(call DoubleDollar, \ |
2821 | + $$($1_DEST)/$$(call $$(strip $$($1_NAME_MACRO)),$$(if $$($1_FLATTEN),$$(notdir $$f),$$f)) \ |
2822 | + ), \ |
2823 | + $1, \ |
2824 | + $$($1_MACRO), \ |
2825 | + $$($1_LOG_ACTION) \ |
2826 | + )) \ |
2827 | + ) |
2828 | + |
2829 | +endef |
2830 | diff --git a/make/common/FindTests.gmk b/make/common/FindTests.gmk |
2831 | index 35a9e20..283f93e 100644 |
2832 | --- a/make/common/FindTests.gmk |
2833 | +++ b/make/common/FindTests.gmk |
2834 | @@ -53,6 +53,7 @@ define FindJtregGroupsBody |
2835 | -e 's/^groups\w*=//p' $1/TEST.ROOT) |
2836 | $1_JTREG_GROUP_FILES := $$(addprefix $1/, $$($1_JTREG_GROUP_FILENAMES)) |
2837 | $1_JTREG_TEST_GROUPS := $$(strip $$(shell $$(SED) -n \ |
2838 | + -e 's/^\#.*//g' \ |
2839 | -e 's/\([^ ]*\)\w*=.*/\1/gp' $$(wildcard $$($1_JTREG_GROUP_FILES)) \ |
2840 | | $$(SORT) -u)) |
2841 | endif |
2842 | diff --git a/make/common/MakeBase.gmk b/make/common/MakeBase.gmk |
2843 | index a96edc2..dd81ba3 100644 |
2844 | --- a/make/common/MakeBase.gmk |
2845 | +++ b/make/common/MakeBase.gmk |
2846 | @@ -1,5 +1,5 @@ |
2847 | # |
2848 | -# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. |
2849 | +# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. |
2850 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
2851 | # |
2852 | # This code is free software; you can redistribute it and/or modify it |
2853 | @@ -75,17 +75,17 @@ ifeq (4.0, $(firstword $(sort 4.0 $(MAKE_VERSION)))) |
2854 | RWILDCARD_WORKS := true |
2855 | endif |
2856 | |
2857 | -############################## |
2858 | -# Functions |
2859 | -############################## |
2860 | |
2861 | -### Debug functions |
2862 | +# For convenience, MakeBase.gmk continues to include these separate files, at |
2863 | +# least for now. |
2864 | |
2865 | -# Prints the name and value of a variable |
2866 | -PrintVar = \ |
2867 | - $(info $(strip $1) >$($(strip $1))<) |
2868 | +include $(TOPDIR)/make/common/Utils.gmk |
2869 | +include $(TOPDIR)/make/common/MakeIO.gmk |
2870 | +include $(TOPDIR)/make/common/CopyFiles.gmk |
2871 | |
2872 | -### Functions for timers |
2873 | +################################################################################ |
2874 | +# Functions for timers |
2875 | +################################################################################ |
2876 | |
2877 | # Store the build times in this directory. |
2878 | BUILDTIMESDIR=$(OUTPUTDIR)/make-support/build-times |
2879 | @@ -122,227 +122,6 @@ define TargetExit |
2880 | endef |
2881 | |
2882 | ################################################################################ |
2883 | -# This macro translates $ into \$ to protect the $ from expansion in the shell. |
2884 | -# To make this macro resilient against already escaped strings, first remove |
2885 | -# any present escapes before escaping so that no double escapes are added. |
2886 | -EscapeDollar = $(subst $$,\$$,$(subst \$$,$$,$(strip $1))) |
2887 | - |
2888 | -################################################################################ |
2889 | -# This macro works just like EscapeDollar above, but for #. |
2890 | -EscapeHash = $(subst \#,\\\#,$(subst \\\#,\#,$(strip $1))) |
2891 | - |
2892 | -################################################################################ |
2893 | -# This macro translates $ into $$ to protect the string from make itself. |
2894 | -DoubleDollar = $(subst $$,$$$$,$(strip $1)) |
2895 | - |
2896 | -################################################################################ |
2897 | -# ListPathsSafely can be used to print command parameters to a file. This is |
2898 | -# typically done if the command line lenght risk being too long for the |
2899 | -# OS/shell. In later make versions, the file function can be used for this |
2900 | -# purpose. For earlier versions, a more complex implementation is provided. |
2901 | -# |
2902 | -# The function ListPathsSafely can be called either directly or, more commonly |
2903 | -# from a recipe line. If called from a recipe, it will be executed in the |
2904 | -# evaluation phase of that recipe, which means that it will write to the file |
2905 | -# before any other line in the recipe has been run. |
2906 | -ifeq ($(HAS_FILE_FUNCTION), true) |
2907 | - # Param 1 - Name of variable containing paths/arguments to output |
2908 | - # Param 2 - File to print to |
2909 | - # Param 3 - Set to true to append to file instead of overwriting |
2910 | - define ListPathsSafely |
2911 | - $$(call MakeDir, $$(dir $$(strip $2))) |
2912 | - $$(file $$(if $$(filter true, $$(strip $3)),>>,>) \ |
2913 | - $$(strip $2),$$(subst $$(SPACE),$$(NEWLINE),$$(strip $$($$(strip $1))))) |
2914 | - endef |
2915 | - |
2916 | -else # HAS_FILE_FUNCTION = false |
2917 | - |
2918 | - $(eval compress_paths = \ |
2919 | - $(strip $(shell $(CAT) $(TOPDIR)/make/common/support/ListPathsSafely-pre-compress.incl))) |
2920 | - compress_paths += \ |
2921 | - $(subst $(TOPDIR),X97, \ |
2922 | - $(subst $(OUTPUTDIR),X98, \ |
2923 | - $(subst X,X00, \ |
2924 | - $(subst $(SPACE),\n,$(strip $1))))) |
2925 | - $(eval compress_paths += \ |
2926 | - $(strip $(shell $(CAT) $(TOPDIR)/make/common/support/ListPathsSafely-post-compress.incl))) |
2927 | - |
2928 | - decompress_paths=$(SED) -f $(TOPDIR)/make/common/support/ListPathsSafely-uncompress.sed \ |
2929 | - -e 's|X99|\\n|g' \ |
2930 | - -e 's|X98|$(OUTPUTDIR)|g' -e 's|X97|$(TOPDIR)|g' \ |
2931 | - -e 's|X00|X|g' |
2932 | - |
2933 | - ListPathsSafely_IfPrintf = \ |
2934 | - $(if $(word $3,$($(strip $1))), \ |
2935 | - $(shell $(PRINTF) -- "$(strip $(call EscapeDollar, \ |
2936 | - $(call compress_paths, $(wordlist $3,$4,$($(strip $1))))))\n" \ |
2937 | - | $(decompress_paths) >> $2)) |
2938 | - |
2939 | - # Param 1 - Name of variable containing paths/arguments to output |
2940 | - # Param 2 - File to print to |
2941 | - # Param 3 - Set to true to append to file instead of overwriting |
2942 | - define ListPathsSafely |
2943 | - ifneq (,$$(word 30001,$$($$(strip $1)))) |
2944 | - $$(error Cannot list safely more than 30000 paths. $1 has $$(words $$($$(strip $1))) paths!) |
2945 | - endif |
2946 | - $$(call MakeDir, $$(dir $2)) |
2947 | - ifneq ($$(strip $3), true) |
2948 | - $$(shell $(RM) $$(strip $2)) |
2949 | - endif |
2950 | - |
2951 | - $$(call ListPathsSafely_IfPrintf,$1,$2,1,250) |
2952 | - $$(call ListPathsSafely_IfPrintf,$1,$2,251,500) |
2953 | - $$(call ListPathsSafely_IfPrintf,$1,$2,501,750) |
2954 | - $$(call ListPathsSafely_IfPrintf,$1,$2,751,1000) |
2955 | - |
2956 | - $$(call ListPathsSafely_IfPrintf,$1,$2,1001,1250) |
2957 | - $$(call ListPathsSafely_IfPrintf,$1,$2,1251,1500) |
2958 | - $$(call ListPathsSafely_IfPrintf,$1,$2,1501,1750) |
2959 | - $$(call ListPathsSafely_IfPrintf,$1,$2,1751,2000) |
2960 | - |
2961 | - $$(call ListPathsSafely_IfPrintf,$1,$2,2001,2250) |
2962 | - $$(call ListPathsSafely_IfPrintf,$1,$2,2251,2500) |
2963 | - $$(call ListPathsSafely_IfPrintf,$1,$2,2501,2750) |
2964 | - $$(call ListPathsSafely_IfPrintf,$1,$2,2751,3000) |
2965 | - |
2966 | - $$(call ListPathsSafely_IfPrintf,$1,$2,3001,3250) |
2967 | - $$(call ListPathsSafely_IfPrintf,$1,$2,3251,3500) |
2968 | - $$(call ListPathsSafely_IfPrintf,$1,$2,3501,3750) |
2969 | - $$(call ListPathsSafely_IfPrintf,$1,$2,3751,4000) |
2970 | - |
2971 | - $$(call ListPathsSafely_IfPrintf,$1,$2,4001,4250) |
2972 | - $$(call ListPathsSafely_IfPrintf,$1,$2,4251,4500) |
2973 | - $$(call ListPathsSafely_IfPrintf,$1,$2,4501,4750) |
2974 | - $$(call ListPathsSafely_IfPrintf,$1,$2,4751,5000) |
2975 | - |
2976 | - $$(call ListPathsSafely_IfPrintf,$1,$2,5001,5250) |
2977 | - $$(call ListPathsSafely_IfPrintf,$1,$2,5251,5500) |
2978 | - $$(call ListPathsSafely_IfPrintf,$1,$2,5501,5750) |
2979 | - $$(call ListPathsSafely_IfPrintf,$1,$2,5751,6000) |
2980 | - |
2981 | - $$(call ListPathsSafely_IfPrintf,$1,$2,6001,6250) |
2982 | - $$(call ListPathsSafely_IfPrintf,$1,$2,6251,6500) |
2983 | - $$(call ListPathsSafely_IfPrintf,$1,$2,6501,6750) |
2984 | - $$(call ListPathsSafely_IfPrintf,$1,$2,6751,7000) |
2985 | - |
2986 | - $$(call ListPathsSafely_IfPrintf,$1,$2,7001,7250) |
2987 | - $$(call ListPathsSafely_IfPrintf,$1,$2,7251,7500) |
2988 | - $$(call ListPathsSafely_IfPrintf,$1,$2,7501,7750) |
2989 | - $$(call ListPathsSafely_IfPrintf,$1,$2,7751,8000) |
2990 | - |
2991 | - $$(call ListPathsSafely_IfPrintf,$1,$2,8001,8250) |
2992 | - $$(call ListPathsSafely_IfPrintf,$1,$2,8251,8500) |
2993 | - $$(call ListPathsSafely_IfPrintf,$1,$2,8501,8750) |
2994 | - $$(call ListPathsSafely_IfPrintf,$1,$2,8751,9000) |
2995 | - |
2996 | - $$(call ListPathsSafely_IfPrintf,$1,$2,9001,9250) |
2997 | - $$(call ListPathsSafely_IfPrintf,$1,$2,9251,9500) |
2998 | - $$(call ListPathsSafely_IfPrintf,$1,$2,9501,9750) |
2999 | - $$(call ListPathsSafely_IfPrintf,$1,$2,9751,10000) |
3000 | - |
3001 | - $$(call ListPathsSafely_IfPrintf,$1,$2,10001,10250) |
3002 | - $$(call ListPathsSafely_IfPrintf,$1,$2,10251,10500) |
3003 | - $$(call ListPathsSafely_IfPrintf,$1,$2,10501,10750) |
3004 | - $$(call ListPathsSafely_IfPrintf,$1,$2,10751,11000) |
3005 | - |
3006 | - $$(call ListPathsSafely_IfPrintf,$1,$2,11001,11250) |
3007 | - $$(call ListPathsSafely_IfPrintf,$1,$2,11251,11500) |
3008 | - $$(call ListPathsSafely_IfPrintf,$1,$2,11501,11750) |
3009 | - $$(call ListPathsSafely_IfPrintf,$1,$2,11751,12000) |
3010 | - |
3011 | - $$(call ListPathsSafely_IfPrintf,$1,$2,12001,12250) |
3012 | - $$(call ListPathsSafely_IfPrintf,$1,$2,12251,12500) |
3013 | - $$(call ListPathsSafely_IfPrintf,$1,$2,12501,12750) |
3014 | - $$(call ListPathsSafely_IfPrintf,$1,$2,12751,13000) |
3015 | - |
3016 | - $$(call ListPathsSafely_IfPrintf,$1,$2,13001,13250) |
3017 | - $$(call ListPathsSafely_IfPrintf,$1,$2,13251,13500) |
3018 | - $$(call ListPathsSafely_IfPrintf,$1,$2,13501,13750) |
3019 | - $$(call ListPathsSafely_IfPrintf,$1,$2,13751,14000) |
3020 | - |
3021 | - $$(call ListPathsSafely_IfPrintf,$1,$2,14001,14250) |
3022 | - $$(call ListPathsSafely_IfPrintf,$1,$2,14251,14500) |
3023 | - $$(call ListPathsSafely_IfPrintf,$1,$2,14501,14750) |
3024 | - $$(call ListPathsSafely_IfPrintf,$1,$2,14751,15000) |
3025 | - |
3026 | - $$(call ListPathsSafely_IfPrintf,$1,$2,15001,15250) |
3027 | - $$(call ListPathsSafely_IfPrintf,$1,$2,15251,15500) |
3028 | - $$(call ListPathsSafely_IfPrintf,$1,$2,15501,15750) |
3029 | - $$(call ListPathsSafely_IfPrintf,$1,$2,15751,16000) |
3030 | - |
3031 | - $$(call ListPathsSafely_IfPrintf,$1,$2,16001,16250) |
3032 | - $$(call ListPathsSafely_IfPrintf,$1,$2,16251,16500) |
3033 | - $$(call ListPathsSafely_IfPrintf,$1,$2,16501,16750) |
3034 | - $$(call ListPathsSafely_IfPrintf,$1,$2,16751,17000) |
3035 | - |
3036 | - $$(call ListPathsSafely_IfPrintf,$1,$2,17001,17250) |
3037 | - $$(call ListPathsSafely_IfPrintf,$1,$2,17251,17500) |
3038 | - $$(call ListPathsSafely_IfPrintf,$1,$2,17501,17750) |
3039 | - $$(call ListPathsSafely_IfPrintf,$1,$2,17751,18000) |
3040 | - |
3041 | - $$(call ListPathsSafely_IfPrintf,$1,$2,18001,18250) |
3042 | - $$(call ListPathsSafely_IfPrintf,$1,$2,18251,18500) |
3043 | - $$(call ListPathsSafely_IfPrintf,$1,$2,18501,18750) |
3044 | - $$(call ListPathsSafely_IfPrintf,$1,$2,18751,19000) |
3045 | - |
3046 | - $$(call ListPathsSafely_IfPrintf,$1,$2,19001,19250) |
3047 | - $$(call ListPathsSafely_IfPrintf,$1,$2,19251,19500) |
3048 | - $$(call ListPathsSafely_IfPrintf,$1,$2,19501,19750) |
3049 | - $$(call ListPathsSafely_IfPrintf,$1,$2,19751,20000) |
3050 | - |
3051 | - $$(call ListPathsSafely_IfPrintf,$1,$2,20001,20250) |
3052 | - $$(call ListPathsSafely_IfPrintf,$1,$2,20251,20500) |
3053 | - $$(call ListPathsSafely_IfPrintf,$1,$2,20501,20750) |
3054 | - $$(call ListPathsSafely_IfPrintf,$1,$2,20751,21000) |
3055 | - |
3056 | - $$(call ListPathsSafely_IfPrintf,$1,$2,21001,21250) |
3057 | - $$(call ListPathsSafely_IfPrintf,$1,$2,21251,21500) |
3058 | - $$(call ListPathsSafely_IfPrintf,$1,$2,21501,21750) |
3059 | - $$(call ListPathsSafely_IfPrintf,$1,$2,21751,22000) |
3060 | - |
3061 | - $$(call ListPathsSafely_IfPrintf,$1,$2,22001,22250) |
3062 | - $$(call ListPathsSafely_IfPrintf,$1,$2,22251,22500) |
3063 | - $$(call ListPathsSafely_IfPrintf,$1,$2,22501,22750) |
3064 | - $$(call ListPathsSafely_IfPrintf,$1,$2,22751,23000) |
3065 | - |
3066 | - $$(call ListPathsSafely_IfPrintf,$1,$2,23001,23250) |
3067 | - $$(call ListPathsSafely_IfPrintf,$1,$2,23251,23500) |
3068 | - $$(call ListPathsSafely_IfPrintf,$1,$2,23501,23750) |
3069 | - $$(call ListPathsSafely_IfPrintf,$1,$2,23751,24000) |
3070 | - |
3071 | - $$(call ListPathsSafely_IfPrintf,$1,$2,24001,24250) |
3072 | - $$(call ListPathsSafely_IfPrintf,$1,$2,24251,24500) |
3073 | - $$(call ListPathsSafely_IfPrintf,$1,$2,24501,24750) |
3074 | - $$(call ListPathsSafely_IfPrintf,$1,$2,24751,25000) |
3075 | - |
3076 | - $$(call ListPathsSafely_IfPrintf,$1,$2,25001,25250) |
3077 | - $$(call ListPathsSafely_IfPrintf,$1,$2,25251,25500) |
3078 | - $$(call ListPathsSafely_IfPrintf,$1,$2,25501,25750) |
3079 | - $$(call ListPathsSafely_IfPrintf,$1,$2,25751,26000) |
3080 | - |
3081 | - $$(call ListPathsSafely_IfPrintf,$1,$2,26001,26250) |
3082 | - $$(call ListPathsSafely_IfPrintf,$1,$2,26251,26500) |
3083 | - $$(call ListPathsSafely_IfPrintf,$1,$2,26501,26750) |
3084 | - $$(call ListPathsSafely_IfPrintf,$1,$2,26751,27000) |
3085 | - |
3086 | - $$(call ListPathsSafely_IfPrintf,$1,$2,27001,27250) |
3087 | - $$(call ListPathsSafely_IfPrintf,$1,$2,27251,27500) |
3088 | - $$(call ListPathsSafely_IfPrintf,$1,$2,27501,27750) |
3089 | - $$(call ListPathsSafely_IfPrintf,$1,$2,27751,28000) |
3090 | - |
3091 | - $$(call ListPathsSafely_IfPrintf,$1,$2,28001,28250) |
3092 | - $$(call ListPathsSafely_IfPrintf,$1,$2,28251,28500) |
3093 | - $$(call ListPathsSafely_IfPrintf,$1,$2,28501,28750) |
3094 | - $$(call ListPathsSafely_IfPrintf,$1,$2,28751,29000) |
3095 | - |
3096 | - $$(call ListPathsSafely_IfPrintf,$1,$2,29001,29250) |
3097 | - $$(call ListPathsSafely_IfPrintf,$1,$2,29251,29500) |
3098 | - $$(call ListPathsSafely_IfPrintf,$1,$2,29501,29750) |
3099 | - $$(call ListPathsSafely_IfPrintf,$1,$2,29751,30000) |
3100 | - endef |
3101 | -endif # HAS_FILE_FUNCTION |
3102 | - |
3103 | -################################################################################ |
3104 | |
3105 | # A file containing a way to uniquely identify the source code revision that |
3106 | # the build was created from |
3107 | @@ -414,21 +193,6 @@ endef |
3108 | $(eval $(call SetupLogging)) |
3109 | |
3110 | ################################################################################ |
3111 | -# Creates a sequence of increasing numbers (inclusive). |
3112 | -# Param 1 - starting number |
3113 | -# Param 2 - ending number |
3114 | -sequence = \ |
3115 | - $(wordlist $1, $2, $(strip \ |
3116 | - $(eval SEQUENCE_COUNT :=) \ |
3117 | - $(call _sequence-do,$(strip $2)))) |
3118 | - |
3119 | -_sequence-do = \ |
3120 | - $(if $(word $1, $(SEQUENCE_COUNT)),, \ |
3121 | - $(eval SEQUENCE_COUNT += .) \ |
3122 | - $(words $(SEQUENCE_COUNT)) \ |
3123 | - $(call _sequence-do,$1)) |
3124 | - |
3125 | -################################################################################ |
3126 | |
3127 | MAX_PARAMS := 36 |
3128 | PARAM_SEQUENCE := $(call sequence, 2, $(MAX_PARAMS)) |
3129 | @@ -470,16 +234,6 @@ define NamedParamsMacroTemplate |
3130 | endef |
3131 | |
3132 | ################################################################################ |
3133 | -# Replace question marks with space in string. This macro needs to be called on |
3134 | -# files from FindFiles in case any of them contains space in their file name, |
3135 | -# since FindFiles replaces space with ?. |
3136 | -# Param 1 - String to replace in |
3137 | -DecodeSpace = \ |
3138 | - $(subst ?,$(SPACE),$(strip $1)) |
3139 | -EncodeSpace = \ |
3140 | - $(subst $(SPACE),?,$(strip $1)) |
3141 | - |
3142 | -################################################################################ |
3143 | # Make directory without forking mkdir if not needed. |
3144 | # |
3145 | # If a directory with an encoded space is provided, the wildcard function |
3146 | @@ -507,16 +261,9 @@ MakeTargetDir = \ |
3147 | $(call MakeDir, $(dir $(call EncodeSpace, $@))) |
3148 | |
3149 | ################################################################################ |
3150 | -# Assign a variable only if it is empty |
3151 | -# Param 1 - Variable to assign |
3152 | -# Param 2 - Value to assign |
3153 | -SetIfEmpty = \ |
3154 | - $(if $($(strip $1)),,$(eval $(strip $1) := $2)) |
3155 | - |
3156 | -################################################################################ |
3157 | # All install-file and related macros automatically call DecodeSpace when needed. |
3158 | |
3159 | -ifeq ($(OPENJDK_TARGET_OS),solaris) |
3160 | +ifeq ($(call isTargetOs, solaris), true) |
3161 | # On Solaris, if the target is a symlink and exists, cp won't overwrite. |
3162 | # Cp has to operate in recursive mode to allow for -P flag, to preserve soft links. If the |
3163 | # name of the target file differs from the source file, rename after copy. |
3164 | @@ -542,7 +289,7 @@ ifeq ($(OPENJDK_TARGET_OS),solaris) |
3165 | $(CP) -f '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'; \ |
3166 | fi |
3167 | endef |
3168 | -else ifeq ($(OPENJDK_TARGET_OS),macosx) |
3169 | +else ifeq ($(call isTargetOs, macosx), true) |
3170 | # On mac, extended attributes sometimes creep into the source files, which may later |
3171 | # cause the creation of ._* files which confuses testing. Clear these with xattr if |
3172 | # set. Some files get their write permissions removed after being copied to the |
3173 | @@ -581,113 +328,40 @@ define install-file-nolink |
3174 | endef |
3175 | |
3176 | ################################################################################ |
3177 | -# Take two paths and return the path of the last common directory. |
3178 | -# Ex: /foo/bar/baz, /foo/bar/banan -> /foo/bar |
3179 | -# foo/bar/baz, /foo/bar -> <empty> |
3180 | -# |
3181 | -# The x prefix is used to preserve the presence of the initial slash |
3182 | -# |
3183 | -# $1 - Path to compare |
3184 | -# $2 - Other path to compare |
3185 | -FindCommonPathPrefix = \ |
3186 | - $(patsubst x%,%,$(subst $(SPACE),/,$(strip \ |
3187 | - $(call FindCommonPathPrefixHelper, \ |
3188 | - $(subst /,$(SPACE),x$(strip $1)), $(subst /,$(SPACE),x$(strip $2))) \ |
3189 | - ))) |
3190 | - |
3191 | -FindCommonPathPrefixHelper = \ |
3192 | - $(if $(call equals, $(firstword $1), $(firstword $2)), \ |
3193 | - $(firstword $1) \ |
3194 | - $(call FindCommonPathPrefixHelper, \ |
3195 | - $(wordlist 2, $(words $1), $1), $(wordlist 2, $(words $2), $2) \ |
3196 | - ) \ |
3197 | - ) |
3198 | - |
3199 | -# Convert a partial path into as many directory levels of ../, removing |
3200 | -# leading and following /. |
3201 | -# Ex: foo/bar/baz/ -> ../../.. |
3202 | -# foo/bar -> ../.. |
3203 | -# /foo -> .. |
3204 | -DirToDotDot = \ |
3205 | - $(subst $(SPACE),/,$(foreach d, $(subst /,$(SPACE),$1),..)) |
3206 | - |
3207 | -# Computes the relative path from a directory to a file |
3208 | -# $1 - File to compute the relative path to |
3209 | -# $2 - Directory to compute the relative path from |
3210 | -RelativePath = \ |
3211 | - $(eval $1_prefix := $(call FindCommonPathPrefix, $1, $2)) \ |
3212 | - $(eval $1_dotdots := $(call DirToDotDot, $(patsubst $($(strip $1)_prefix)%, %, $2))) \ |
3213 | - $(eval $1_dotdots := $(if $($(strip $1)_dotdots),$($(strip $1)_dotdots),.)) \ |
3214 | - $(eval $1_suffix := $(patsubst $($(strip $1)_prefix)/%, %, $1)) \ |
3215 | - $($(strip $1)_dotdots)/$($(strip $1)_suffix) |
3216 | - |
3217 | -################################################################################ |
3218 | # link-file-* works similarly to install-file but creates a symlink instead. |
3219 | # There are two versions, either creating a relative or an absolute link. Be |
3220 | # careful when using this on Windows since the symlink created is only valid in |
3221 | # the unix emulation environment. |
3222 | -define link-file-relative |
3223 | +# In msys2 we use mklink /J because its ln would perform a deep copy of the target. |
3224 | +# This inhibits performance and can lead to issues with long paths. With mklink /J |
3225 | +# relative linking does not work, so we handle the link as absolute path. |
3226 | +ifeq ($(OPENJDK_BUILD_OS_ENV), windows.msys2) |
3227 | + define link-file-relative |
3228 | + $(call MakeTargetDir) |
3229 | + $(RM) '$(call DecodeSpace, $@)' |
3230 | + cmd //c "mklink /J $(call FixPath, $(call DecodeSpace, $@)) $(call FixPath, $(call DecodeSpace, $<))" |
3231 | + endef |
3232 | +else |
3233 | + define link-file-relative |
3234 | $(call MakeTargetDir) |
3235 | $(RM) '$(call DecodeSpace, $@)' |
3236 | $(LN) -s '$(call DecodeSpace, $(call RelativePath, $<, $(@D)))' '$(call DecodeSpace, $@)' |
3237 | -endef |
3238 | + endef |
3239 | +endif |
3240 | |
3241 | -define link-file-absolute |
3242 | +ifeq ($(OPENJDK_BUILD_OS_ENV), windows.msys2) |
3243 | + define link-file-absolute |
3244 | + $(call MakeTargetDir) |
3245 | + $(RM) '$(call DecodeSpace, $@)' |
3246 | + cmd //c "mklink /J $(call FixPath, $(call DecodeSpace, $@)) $(call FixPath, $(call DecodeSpace, $<))" |
3247 | + endef |
3248 | +else |
3249 | + define link-file-absolute |
3250 | $(call MakeTargetDir) |
3251 | $(RM) '$(call DecodeSpace, $@)' |
3252 | $(LN) -s '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)' |
3253 | -endef |
3254 | - |
3255 | -################################################################################ |
3256 | -# Filter out duplicate sub strings while preserving order. Keeps the first occurance. |
3257 | -uniq = \ |
3258 | - $(strip $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1)))) |
3259 | - |
3260 | -# Returns all whitespace-separated words in $2 where at least one of the |
3261 | -# whitespace-separated words in $1 is a substring. |
3262 | -containing = \ |
3263 | - $(strip \ |
3264 | - $(foreach v,$(strip $2),\ |
3265 | - $(call uniq,$(foreach p,$(strip $1),$(if $(findstring $p,$v),$v))))) |
3266 | - |
3267 | -# Returns all whitespace-separated words in $2 where none of the |
3268 | -# whitespace-separated words in $1 is a substring. |
3269 | -not-containing = \ |
3270 | - $(strip $(filter-out $(call containing,$1,$2),$2)) |
3271 | - |
3272 | -# Return a list of all string elements that are duplicated in $1. |
3273 | -dups = \ |
3274 | - $(strip $(foreach v, $(sort $1), $(if $(filter-out 1, \ |
3275 | - $(words $(filter $v, $1))), $v))) |
3276 | - |
3277 | -# String equals |
3278 | -equals = \ |
3279 | - $(and $(findstring $(strip $1),$(strip $2)),\ |
3280 | - $(findstring $(strip $2),$(strip $1))) |
3281 | - |
3282 | -# Remove a whole list of prefixes |
3283 | -# $1 - List of prefixes |
3284 | -# $2 - List of elements to process |
3285 | -remove-prefixes = \ |
3286 | - $(strip $(if $1,$(patsubst $(firstword $1)%,%,\ |
3287 | - $(call remove-prefixes,$(filter-out $(firstword $1),$1),$2)),$2)) |
3288 | - |
3289 | -# Convert the string given to upper case, without any $(shell) |
3290 | -# Inspired by http://lists.gnu.org/archive/html/help-make/2013-09/msg00009.html |
3291 | -uppercase_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 \ |
3292 | - p,P q,Q r,R s,S t,T u,U v,V w,W x,X y,Y z,Z |
3293 | - |
3294 | -uppercase_internal = \ |
3295 | - $(if $(strip $1), $$(subst $(firstword $1), $(call uppercase_internal, \ |
3296 | - $(wordlist 2, $(words $1), $1), $2)), $2) |
3297 | - |
3298 | -# Convert a string to upper case. Works only on a-z. |
3299 | -# $1 - The string to convert |
3300 | -uppercase = \ |
3301 | - $(strip \ |
3302 | - $(eval uppercase_result := $(call uppercase_internal, $(uppercase_table), $1)) \ |
3303 | - $(uppercase_result) \ |
3304 | - ) |
3305 | + endef |
3306 | +endif |
3307 | |
3308 | ################################################################################ |
3309 | |
3310 | @@ -804,144 +478,6 @@ else |
3311 | endif |
3312 | |
3313 | ################################################################################ |
3314 | - |
3315 | -define AddFileToCopy |
3316 | - # Helper macro for SetupCopyFiles |
3317 | - # 1 : Source file |
3318 | - # 2 : Dest file |
3319 | - # 3 : Variable to add targets to |
3320 | - # 4 : Macro to call for copy operation |
3321 | - # 5 : Action text to log |
3322 | - $2: $1 |
3323 | - $$(call LogInfo, $(strip $5) $$(patsubst $(OUTPUTDIR)/%,%,$$(call DecodeSpace, $$@))) |
3324 | - $$($$(strip $4)) |
3325 | - |
3326 | - $3 += $2 |
3327 | - $3_SOURCES += $1 |
3328 | -endef |
3329 | - |
3330 | -# Returns the value of the first argument |
3331 | -identity = \ |
3332 | - $(strip $1) |
3333 | - |
3334 | -# Setup make rules for copying files, with an option to do more complex |
3335 | -# processing instead of copying. |
3336 | -# |
3337 | -# Parameter 1 is the name of the rule. This name is used as variable prefix, |
3338 | -# and the targets generated are listed in a variable by that name. |
3339 | -# |
3340 | -# The list of all source files is returned in $1_SOURCES. |
3341 | -# |
3342 | -# Remaining parameters are named arguments. These include: |
3343 | -# SRC : Source root dir (defaults to dir of first file) |
3344 | -# DEST : Dest root dir |
3345 | -# FILES : List of files to copy with absolute paths, or path relative to SRC. |
3346 | -# Must be in SRC. |
3347 | -# FLATTEN : Set to flatten the directory structure in the DEST dir. |
3348 | -# MACRO : Optionally override the default macro used for making the copy. |
3349 | -# Default is 'install-file' |
3350 | -# NAME_MACRO : Optionally supply a macro that rewrites the target file name |
3351 | -# based on the source file name |
3352 | -# LOG_ACTION : Optionally specify a different action text for log messages |
3353 | -SetupCopyFiles = $(NamedParamsMacroTemplate) |
3354 | -define SetupCopyFilesBody |
3355 | - |
3356 | - ifeq ($$($1_MACRO), ) |
3357 | - $1_MACRO := install-file |
3358 | - endif |
3359 | - |
3360 | - # Default SRC to the dir of the first file. |
3361 | - ifeq ($$($1_SRC), ) |
3362 | - $1_SRC := $$(dir $$(firstword $$($1_FILES))) |
3363 | - endif |
3364 | - |
3365 | - ifeq ($$($1_NAME_MACRO), ) |
3366 | - $1_NAME_MACRO := identity |
3367 | - endif |
3368 | - |
3369 | - ifeq ($$($1_LOG_ACTION), ) |
3370 | - $1_LOG_ACTION := Copying |
3371 | - endif |
3372 | - |
3373 | - # Remove any trailing slash from SRC and DEST |
3374 | - $1_SRC := $$(patsubst %/,%,$$($1_SRC)) |
3375 | - $1_DEST := $$(patsubst %/,%,$$($1_DEST)) |
3376 | - |
3377 | - # Need to wrap arguments in DoubleDollar because of the eval nested inside an |
3378 | - # eval macro body. |
3379 | - $$(foreach f, $$(patsubst $$($1_SRC)/%,%,$$($1_FILES)), \ |
3380 | - $$(eval $$(call AddFileToCopy, \ |
3381 | - $$(call DoubleDollar, $$($1_SRC)/$$f), \ |
3382 | - $$(call DoubleDollar, \ |
3383 | - $$($1_DEST)/$$(call $$(strip $$($1_NAME_MACRO)),$$(if $$($1_FLATTEN),$$(notdir $$f),$$f)) \ |
3384 | - ), \ |
3385 | - $1, \ |
3386 | - $$($1_MACRO), \ |
3387 | - $$($1_LOG_ACTION) \ |
3388 | - )) \ |
3389 | - ) |
3390 | - |
3391 | -endef |
3392 | - |
3393 | -################################################################################ |
3394 | -# Parse a multiple-keyword variable, like FOO="KEYWORD1=val1;KEYWORD2=val2;..." |
3395 | -# These will be converted into a series of variables like FOO_KEYWORD1=val1, |
3396 | -# FOO_KEYWORD2=val2, etc. Unknown keywords will cause an error. |
3397 | -# |
3398 | -# Parameter 1 is the name of the rule, and is also the name of the variable. |
3399 | -# |
3400 | -# Remaining parameters are named arguments. These include: |
3401 | -# SINGLE_KEYWORDS A list of valid keywords with single string values |
3402 | -# STRING_KEYWORDS A list of valid keywords, processed as string. This means |
3403 | -# that '%20' will be replaced by ' ' to allow for multi-word strings. |
3404 | -# |
3405 | -ParseKeywordVariable = $(NamedParamsMacroTemplate) |
3406 | -define ParseKeywordVariableBody |
3407 | - ifneq ($$($1), ) |
3408 | - # To preserve spaces, substitute them with a hopefully unique pattern |
3409 | - # before splitting and then re-substitute spaces back. |
3410 | - $1_MANGLED := $$(subst $$(SPACE),||||,$$($1)) |
3411 | - $$(foreach mangled_part, $$(subst ;, , $$($1_MANGLED)), \ |
3412 | - $$(eval mangled_part_eval := $$(call DoubleDollar, $$(mangled_part))) \ |
3413 | - $$(eval part := $$$$(subst ||||,$$$$(SPACE),$$$$(mangled_part_eval))) \ |
3414 | - $$(eval $1_NO_MATCH := true) \ |
3415 | - $$(foreach keyword, $$($1_SINGLE_KEYWORDS), \ |
3416 | - $$(eval keyword_eval := $$(call DoubleDollar, $$(keyword))) \ |
3417 | - $$(if $$(filter $$(keyword)=%, $$(part)), \ |
3418 | - $$(eval $(strip $1)_$$$$(keyword_eval) := $$$$(strip $$$$(patsubst $$$$(keyword_eval)=%, %, $$$$(part)))) \ |
3419 | - $$(eval $1_NO_MATCH := ) \ |
3420 | - ) \ |
3421 | - ) \ |
3422 | - $$(foreach keyword, $$($1_STRING_KEYWORDS), \ |
3423 | - $$(eval keyword_eval := $$(call DoubleDollar, $$(keyword))) \ |
3424 | - $$(if $$(filter $$(keyword)=%, $$(part)), \ |
3425 | - $$(eval $(strip $1)_$$$$(keyword_eval) := $$$$(strip $$$$(subst %20, , $$$$(patsubst $$$$(keyword_eval)=%, %, $$$$(part))))) \ |
3426 | - $$(eval $1_NO_MATCH := ) \ |
3427 | - ) \ |
3428 | - ) \ |
3429 | - $$(if $$($1_NO_MATCH), \ |
3430 | - $$(if $$(filter $$(part), $$($1_SINGLE_KEYWORDS) $$($1_STRING_KEYWORDS)), \ |
3431 | - $$(info Keyword $$(part) for $1 needs to be assigned a value.) \ |
3432 | - , \ |
3433 | - $$(info $$(part) is not a valid keyword for $1.) \ |
3434 | - $$(info Valid keywords: $$($1_SINGLE_KEYWORDS) $$($1_STRING_KEYWORDS).) \ |
3435 | - ) \ |
3436 | - $$(error Cannot continue) \ |
3437 | - ) \ |
3438 | - ) |
3439 | - endif |
3440 | -endef |
3441 | - |
3442 | -################################################################################ |
3443 | -# ShellQuote |
3444 | -# |
3445 | -# Quotes a string with single quotes and replaces single quotes with '\'' so |
3446 | -# that the contents survives being given to the shell. |
3447 | - |
3448 | -ShellQuote = \ |
3449 | - $(SQUOTE)$(subst $(SQUOTE),$(SQUOTE)\$(SQUOTE)$(SQUOTE),$(strip $1))$(SQUOTE) |
3450 | - |
3451 | -################################################################################ |
3452 | # FixPath |
3453 | # |
3454 | # On Windows, converts a path from cygwin/unix style (e.g. /bin/foo) into |
3455 | @@ -951,7 +487,7 @@ ShellQuote = \ |
3456 | # list. |
3457 | # This is normally not needed since we use the FIXPATH prefix for command lines, |
3458 | # but might be needed in certain circumstances. |
3459 | -ifeq ($(OPENJDK_TARGET_OS), windows) |
3460 | +ifeq ($(call isTargetOs, windows), true) |
3461 | FixPath = \ |
3462 | $(strip $(subst \,\\, $(shell $(FIXPATH_BASE) print $(patsubst $(FIXPATH), , $1)))) |
3463 | else |
3464 | @@ -960,35 +496,6 @@ else |
3465 | endif |
3466 | |
3467 | ################################################################################ |
3468 | -# Write to and read from file |
3469 | - |
3470 | -# Param 1 - File to read |
3471 | -ReadFile = \ |
3472 | - $(shell $(CAT) $1) |
3473 | - |
3474 | -# Param 1 - Text to write |
3475 | -# Param 2 - File to write to |
3476 | -ifeq ($(HAS_FILE_FUNCTION), true) |
3477 | - WriteFile = \ |
3478 | - $(file >$2,$(strip $1)) |
3479 | -else |
3480 | - # Use printf to get consistent behavior on all platforms. |
3481 | - WriteFile = \ |
3482 | - $(shell $(PRINTF) "%s" $(call ShellQuote, $1) > $2) |
3483 | -endif |
3484 | - |
3485 | -# Param 1 - Text to write |
3486 | -# Param 2 - File to write to |
3487 | -ifeq ($(HAS_FILE_FUNCTION), true) |
3488 | - AppendFile = \ |
3489 | - $(file >>$2,$(strip $1)) |
3490 | -else |
3491 | - # Use printf to get consistent behavior on all platforms. |
3492 | - AppendFile = \ |
3493 | - $(shell $(PRINTF) "%s" $(call ShellQuote, $1) >> $2) |
3494 | -endif |
3495 | - |
3496 | -################################################################################ |
3497 | # DependOnVariable |
3498 | # |
3499 | # This macro takes a variable name and puts the value in a file only if the |
3500 | @@ -1075,75 +582,6 @@ ExecuteWithLog = \ |
3501 | exit $(DOLLAR)exitcode ) ) |
3502 | |
3503 | ################################################################################ |
3504 | -# Find lib dir for module |
3505 | -# Param 1 - module name |
3506 | -FindLibDirForModule = \ |
3507 | - $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1) |
3508 | - |
3509 | -################################################################################ |
3510 | -# Find executable dir for module |
3511 | -# Param 1 - module name |
3512 | -FindExecutableDirForModule = \ |
3513 | - $(SUPPORT_OUTPUTDIR)/modules_cmds/$(strip $1) |
3514 | - |
3515 | -################################################################################ |
3516 | -# Return a string suitable for use after a -classpath or --module-path option. It |
3517 | -# will be correct and safe to use on all platforms. Arguments are given as space |
3518 | -# separate classpath entries. Safe for multiple nested calls. |
3519 | -# param 1 : A space separated list of classpath entries |
3520 | -# The surrounding strip is needed to keep additional whitespace out |
3521 | -PathList = \ |
3522 | - "$(subst $(SPACE),:,$(strip $(subst $(DQUOTE),,$1)))" |
3523 | - |
3524 | -################################################################################ |
3525 | -# Check if a specified hotspot variant is being built, or at least one of a |
3526 | -# list of variants. Will return 'true' or 'false'. |
3527 | -# $1 - the variant to test for |
3528 | -check-jvm-variant = \ |
3529 | - $(strip \ |
3530 | - $(if $(filter-out $(VALID_JVM_VARIANTS), $1), \ |
3531 | - $(error Internal error: Invalid variant tested: $1)) \ |
3532 | - $(if $(filter $1, $(JVM_VARIANTS)), true, false)) |
3533 | - |
3534 | -################################################################################ |
3535 | -# Converts a space separated list to a comma separated list. |
3536 | -# |
3537 | -# Replacing double-comma with a single comma is to workaround the issue with |
3538 | -# some version of make on windows that doesn't substitute spaces with one comma |
3539 | -# properly. |
3540 | -CommaList = \ |
3541 | - $(strip \ |
3542 | - $(subst $(COMMA)$(COMMA),$(COMMA),$(subst $(SPACE),$(COMMA),$(strip $1))) \ |
3543 | - ) |
3544 | - |
3545 | -################################################################################ |
3546 | -# Converts a space separated list to a colon separated list. |
3547 | -# |
3548 | -# Replacing double-colon with a single colon is to workaround the issue with |
3549 | -# some version of make on windows that doesn't substitute spaces with one colon |
3550 | -# properly. |
3551 | -ColonList = \ |
3552 | - $(strip \ |
3553 | - $(subst ::,:,$(subst $(SPACE),:,$(strip $1))) \ |
3554 | - ) |
3555 | - |
3556 | -################################################################################ |
3557 | -# Given a list of files, filters out locale specific files for translations |
3558 | -# that should be excluded from this build. |
3559 | -# $1 - The list of files to filter |
3560 | -# $2 - The suffix of the files that should be considered (.java or .properties) |
3561 | -FilterExcludedTranslations = \ |
3562 | - $(strip $(if $(EXCLUDE_TRANSLATIONS), \ |
3563 | - $(filter-out \ |
3564 | - $(foreach suffix, $2, \ |
3565 | - $(addprefix %_, $(addsuffix $(suffix), $(EXCLUDE_TRANSLATIONS))) \ |
3566 | - ), \ |
3567 | - $1 \ |
3568 | - ), \ |
3569 | - $1 \ |
3570 | - )) |
3571 | - |
3572 | -################################################################################ |
3573 | |
3574 | # Hook to include the corresponding custom file, if present. |
3575 | $(eval $(call IncludeCustomExtension, common/MakeBase.gmk)) |
3576 | diff --git a/make/common/MakeIO.gmk b/make/common/MakeIO.gmk |
3577 | new file mode 100644 |
3578 | index 0000000..342e4f5 |
3579 | --- /dev/null |
3580 | +++ b/make/common/MakeIO.gmk |
3581 | @@ -0,0 +1,272 @@ |
3582 | +# |
3583 | +# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. |
3584 | +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3585 | +# |
3586 | +# This code is free software; you can redistribute it and/or modify it |
3587 | +# under the terms of the GNU General Public License version 2 only, as |
3588 | +# published by the Free Software Foundation. Oracle designates this |
3589 | +# particular file as subject to the "Classpath" exception as provided |
3590 | +# by Oracle in the LICENSE file that accompanied this code. |
3591 | +# |
3592 | +# This code is distributed in the hope that it will be useful, but WITHOUT |
3593 | +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
3594 | +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
3595 | +# version 2 for more details (a copy is included in the LICENSE file that |
3596 | +# accompanied this code). |
3597 | +# |
3598 | +# You should have received a copy of the GNU General Public License version |
3599 | +# 2 along with this work; if not, write to the Free Software Foundation, |
3600 | +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
3601 | +# |
3602 | +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
3603 | +# or visit www.oracle.com if you need additional information or have any |
3604 | +# questions. |
3605 | +# |
3606 | + |
3607 | +ifeq (,$(_MAKEBASE_GMK)) |
3608 | + $(error You must include MakeBase.gmk prior to including MakeIO.gmk) |
3609 | +endif |
3610 | + |
3611 | +################################################################################ |
3612 | +# |
3613 | +# Functions for dealing with reading and writing from makefiles. Prior to GNU |
3614 | +# Make 4.0, this was tricky business. |
3615 | +# |
3616 | +################################################################################ |
3617 | + |
3618 | + |
3619 | +################################################################################ |
3620 | +# ListPathsSafely can be used to print command parameters to a file. This is |
3621 | +# typically done if the command line lenght risk being too long for the |
3622 | +# OS/shell. In later make versions, the file function can be used for this |
3623 | +# purpose. For earlier versions, a more complex implementation is provided. |
3624 | +# |
3625 | +# The function ListPathsSafely can be called either directly or, more commonly |
3626 | +# from a recipe line. If called from a recipe, it will be executed in the |
3627 | +# evaluation phase of that recipe, which means that it will write to the file |
3628 | +# before any other line in the recipe has been run. |
3629 | +ifeq ($(HAS_FILE_FUNCTION), true) |
3630 | + # Param 1 - Name of variable containing paths/arguments to output |
3631 | + # Param 2 - File to print to |
3632 | + # Param 3 - Set to true to append to file instead of overwriting |
3633 | + define ListPathsSafely |
3634 | + $$(call MakeDir, $$(dir $$(strip $2))) |
3635 | + $$(file $$(if $$(filter true, $$(strip $3)),>>,>) \ |
3636 | + $$(strip $2),$$(subst $$(SPACE),$$(NEWLINE),$$(strip $$($$(strip $1))))) |
3637 | + endef |
3638 | + |
3639 | +else # HAS_FILE_FUNCTION = false |
3640 | + |
3641 | + $(eval compress_paths = \ |
3642 | + $(strip $(shell $(CAT) $(TOPDIR)/make/common/support/ListPathsSafely-pre-compress.incl))) |
3643 | + compress_paths += \ |
3644 | + $(subst $(TOPDIR),X97, \ |
3645 | + $(subst $(OUTPUTDIR),X98, \ |
3646 | + $(subst X,X00, \ |
3647 | + $(subst $(SPACE),\n,$(strip $1))))) |
3648 | + $(eval compress_paths += \ |
3649 | + $(strip $(shell $(CAT) $(TOPDIR)/make/common/support/ListPathsSafely-post-compress.incl))) |
3650 | + |
3651 | + decompress_paths=$(SED) -f $(TOPDIR)/make/common/support/ListPathsSafely-uncompress.sed \ |
3652 | + -e 's|X99|\\n|g' \ |
3653 | + -e 's|X98|$(OUTPUTDIR)|g' -e 's|X97|$(TOPDIR)|g' \ |
3654 | + -e 's|X00|X|g' |
3655 | + |
3656 | + ListPathsSafely_IfPrintf = \ |
3657 | + $(if $(word $3,$($(strip $1))), \ |
3658 | + $(shell $(PRINTF) -- "$(strip $(call EscapeDollar, \ |
3659 | + $(call compress_paths, $(wordlist $3,$4,$($(strip $1))))))\n" \ |
3660 | + | $(decompress_paths) >> $2)) |
3661 | + |
3662 | + # Param 1 - Name of variable containing paths/arguments to output |
3663 | + # Param 2 - File to print to |
3664 | + # Param 3 - Set to true to append to file instead of overwriting |
3665 | + define ListPathsSafely |
3666 | + ifneq (,$$(word 30001,$$($$(strip $1)))) |
3667 | + $$(error Cannot list safely more than 30000 paths. $1 has $$(words $$($$(strip $1))) paths!) |
3668 | + endif |
3669 | + $$(call MakeDir, $$(dir $2)) |
3670 | + ifneq ($$(strip $3), true) |
3671 | + $$(shell $(RM) $$(strip $2)) |
3672 | + endif |
3673 | + |
3674 | + $$(call ListPathsSafely_IfPrintf,$1,$2,1,250) |
3675 | + $$(call ListPathsSafely_IfPrintf,$1,$2,251,500) |
3676 | + $$(call ListPathsSafely_IfPrintf,$1,$2,501,750) |
3677 | + $$(call ListPathsSafely_IfPrintf,$1,$2,751,1000) |
3678 | + |
3679 | + $$(call ListPathsSafely_IfPrintf,$1,$2,1001,1250) |
3680 | + $$(call ListPathsSafely_IfPrintf,$1,$2,1251,1500) |
3681 | + $$(call ListPathsSafely_IfPrintf,$1,$2,1501,1750) |
3682 | + $$(call ListPathsSafely_IfPrintf,$1,$2,1751,2000) |
3683 | + |
3684 | + $$(call ListPathsSafely_IfPrintf,$1,$2,2001,2250) |
3685 | + $$(call ListPathsSafely_IfPrintf,$1,$2,2251,2500) |
3686 | + $$(call ListPathsSafely_IfPrintf,$1,$2,2501,2750) |
3687 | + $$(call ListPathsSafely_IfPrintf,$1,$2,2751,3000) |
3688 | + |
3689 | + $$(call ListPathsSafely_IfPrintf,$1,$2,3001,3250) |
3690 | + $$(call ListPathsSafely_IfPrintf,$1,$2,3251,3500) |
3691 | + $$(call ListPathsSafely_IfPrintf,$1,$2,3501,3750) |
3692 | + $$(call ListPathsSafely_IfPrintf,$1,$2,3751,4000) |
3693 | + |
3694 | + $$(call ListPathsSafely_IfPrintf,$1,$2,4001,4250) |
3695 | + $$(call ListPathsSafely_IfPrintf,$1,$2,4251,4500) |
3696 | + $$(call ListPathsSafely_IfPrintf,$1,$2,4501,4750) |
3697 | + $$(call ListPathsSafely_IfPrintf,$1,$2,4751,5000) |
3698 | + |
3699 | + $$(call ListPathsSafely_IfPrintf,$1,$2,5001,5250) |
3700 | + $$(call ListPathsSafely_IfPrintf,$1,$2,5251,5500) |
3701 | + $$(call ListPathsSafely_IfPrintf,$1,$2,5501,5750) |
3702 | + $$(call ListPathsSafely_IfPrintf,$1,$2,5751,6000) |
3703 | + |
3704 | + $$(call ListPathsSafely_IfPrintf,$1,$2,6001,6250) |
3705 | + $$(call ListPathsSafely_IfPrintf,$1,$2,6251,6500) |
3706 | + $$(call ListPathsSafely_IfPrintf,$1,$2,6501,6750) |
3707 | + $$(call ListPathsSafely_IfPrintf,$1,$2,6751,7000) |
3708 | + |
3709 | + $$(call ListPathsSafely_IfPrintf,$1,$2,7001,7250) |
3710 | + $$(call ListPathsSafely_IfPrintf,$1,$2,7251,7500) |
3711 | + $$(call ListPathsSafely_IfPrintf,$1,$2,7501,7750) |
3712 | + $$(call ListPathsSafely_IfPrintf,$1,$2,7751,8000) |
3713 | + |
3714 | + $$(call ListPathsSafely_IfPrintf,$1,$2,8001,8250) |
3715 | + $$(call ListPathsSafely_IfPrintf,$1,$2,8251,8500) |
3716 | + $$(call ListPathsSafely_IfPrintf,$1,$2,8501,8750) |
3717 | + $$(call ListPathsSafely_IfPrintf,$1,$2,8751,9000) |
3718 | + |
3719 | + $$(call ListPathsSafely_IfPrintf,$1,$2,9001,9250) |
3720 | + $$(call ListPathsSafely_IfPrintf,$1,$2,9251,9500) |
3721 | + $$(call ListPathsSafely_IfPrintf,$1,$2,9501,9750) |
3722 | + $$(call ListPathsSafely_IfPrintf,$1,$2,9751,10000) |
3723 | + |
3724 | + $$(call ListPathsSafely_IfPrintf,$1,$2,10001,10250) |
3725 | + $$(call ListPathsSafely_IfPrintf,$1,$2,10251,10500) |
3726 | + $$(call ListPathsSafely_IfPrintf,$1,$2,10501,10750) |
3727 | + $$(call ListPathsSafely_IfPrintf,$1,$2,10751,11000) |
3728 | + |
3729 | + $$(call ListPathsSafely_IfPrintf,$1,$2,11001,11250) |
3730 | + $$(call ListPathsSafely_IfPrintf,$1,$2,11251,11500) |
3731 | + $$(call ListPathsSafely_IfPrintf,$1,$2,11501,11750) |
3732 | + $$(call ListPathsSafely_IfPrintf,$1,$2,11751,12000) |
3733 | + |
3734 | + $$(call ListPathsSafely_IfPrintf,$1,$2,12001,12250) |
3735 | + $$(call ListPathsSafely_IfPrintf,$1,$2,12251,12500) |
3736 | + $$(call ListPathsSafely_IfPrintf,$1,$2,12501,12750) |
3737 | + $$(call ListPathsSafely_IfPrintf,$1,$2,12751,13000) |
3738 | + |
3739 | + $$(call ListPathsSafely_IfPrintf,$1,$2,13001,13250) |
3740 | + $$(call ListPathsSafely_IfPrintf,$1,$2,13251,13500) |
3741 | + $$(call ListPathsSafely_IfPrintf,$1,$2,13501,13750) |
3742 | + $$(call ListPathsSafely_IfPrintf,$1,$2,13751,14000) |
3743 | + |
3744 | + $$(call ListPathsSafely_IfPrintf,$1,$2,14001,14250) |
3745 | + $$(call ListPathsSafely_IfPrintf,$1,$2,14251,14500) |
3746 | + $$(call ListPathsSafely_IfPrintf,$1,$2,14501,14750) |
3747 | + $$(call ListPathsSafely_IfPrintf,$1,$2,14751,15000) |
3748 | + |
3749 | + $$(call ListPathsSafely_IfPrintf,$1,$2,15001,15250) |
3750 | + $$(call ListPathsSafely_IfPrintf,$1,$2,15251,15500) |
3751 | + $$(call ListPathsSafely_IfPrintf,$1,$2,15501,15750) |
3752 | + $$(call ListPathsSafely_IfPrintf,$1,$2,15751,16000) |
3753 | + |
3754 | + $$(call ListPathsSafely_IfPrintf,$1,$2,16001,16250) |
3755 | + $$(call ListPathsSafely_IfPrintf,$1,$2,16251,16500) |
3756 | + $$(call ListPathsSafely_IfPrintf,$1,$2,16501,16750) |
3757 | + $$(call ListPathsSafely_IfPrintf,$1,$2,16751,17000) |
3758 | + |
3759 | + $$(call ListPathsSafely_IfPrintf,$1,$2,17001,17250) |
3760 | + $$(call ListPathsSafely_IfPrintf,$1,$2,17251,17500) |
3761 | + $$(call ListPathsSafely_IfPrintf,$1,$2,17501,17750) |
3762 | + $$(call ListPathsSafely_IfPrintf,$1,$2,17751,18000) |
3763 | + |
3764 | + $$(call ListPathsSafely_IfPrintf,$1,$2,18001,18250) |
3765 | + $$(call ListPathsSafely_IfPrintf,$1,$2,18251,18500) |
3766 | + $$(call ListPathsSafely_IfPrintf,$1,$2,18501,18750) |
3767 | + $$(call ListPathsSafely_IfPrintf,$1,$2,18751,19000) |
3768 | + |
3769 | + $$(call ListPathsSafely_IfPrintf,$1,$2,19001,19250) |
3770 | + $$(call ListPathsSafely_IfPrintf,$1,$2,19251,19500) |
3771 | + $$(call ListPathsSafely_IfPrintf,$1,$2,19501,19750) |
3772 | + $$(call ListPathsSafely_IfPrintf,$1,$2,19751,20000) |
3773 | + |
3774 | + $$(call ListPathsSafely_IfPrintf,$1,$2,20001,20250) |
3775 | + $$(call ListPathsSafely_IfPrintf,$1,$2,20251,20500) |
3776 | + $$(call ListPathsSafely_IfPrintf,$1,$2,20501,20750) |
3777 | + $$(call ListPathsSafely_IfPrintf,$1,$2,20751,21000) |
3778 | + |
3779 | + $$(call ListPathsSafely_IfPrintf,$1,$2,21001,21250) |
3780 | + $$(call ListPathsSafely_IfPrintf,$1,$2,21251,21500) |
3781 | + $$(call ListPathsSafely_IfPrintf,$1,$2,21501,21750) |
3782 | + $$(call ListPathsSafely_IfPrintf,$1,$2,21751,22000) |
3783 | + |
3784 | + $$(call ListPathsSafely_IfPrintf,$1,$2,22001,22250) |
3785 | + $$(call ListPathsSafely_IfPrintf,$1,$2,22251,22500) |
3786 | + $$(call ListPathsSafely_IfPrintf,$1,$2,22501,22750) |
3787 | + $$(call ListPathsSafely_IfPrintf,$1,$2,22751,23000) |
3788 | + |
3789 | + $$(call ListPathsSafely_IfPrintf,$1,$2,23001,23250) |
3790 | + $$(call ListPathsSafely_IfPrintf,$1,$2,23251,23500) |
3791 | + $$(call ListPathsSafely_IfPrintf,$1,$2,23501,23750) |
3792 | + $$(call ListPathsSafely_IfPrintf,$1,$2,23751,24000) |
3793 | + |
3794 | + $$(call ListPathsSafely_IfPrintf,$1,$2,24001,24250) |
3795 | + $$(call ListPathsSafely_IfPrintf,$1,$2,24251,24500) |
3796 | + $$(call ListPathsSafely_IfPrintf,$1,$2,24501,24750) |
3797 | + $$(call ListPathsSafely_IfPrintf,$1,$2,24751,25000) |
3798 | + |
3799 | + $$(call ListPathsSafely_IfPrintf,$1,$2,25001,25250) |
3800 | + $$(call ListPathsSafely_IfPrintf,$1,$2,25251,25500) |
3801 | + $$(call ListPathsSafely_IfPrintf,$1,$2,25501,25750) |
3802 | + $$(call ListPathsSafely_IfPrintf,$1,$2,25751,26000) |
3803 | + |
3804 | + $$(call ListPathsSafely_IfPrintf,$1,$2,26001,26250) |
3805 | + $$(call ListPathsSafely_IfPrintf,$1,$2,26251,26500) |
3806 | + $$(call ListPathsSafely_IfPrintf,$1,$2,26501,26750) |
3807 | + $$(call ListPathsSafely_IfPrintf,$1,$2,26751,27000) |
3808 | + |
3809 | + $$(call ListPathsSafely_IfPrintf,$1,$2,27001,27250) |
3810 | + $$(call ListPathsSafely_IfPrintf,$1,$2,27251,27500) |
3811 | + $$(call ListPathsSafely_IfPrintf,$1,$2,27501,27750) |
3812 | + $$(call ListPathsSafely_IfPrintf,$1,$2,27751,28000) |
3813 | + |
3814 | + $$(call ListPathsSafely_IfPrintf,$1,$2,28001,28250) |
3815 | + $$(call ListPathsSafely_IfPrintf,$1,$2,28251,28500) |
3816 | + $$(call ListPathsSafely_IfPrintf,$1,$2,28501,28750) |
3817 | + $$(call ListPathsSafely_IfPrintf,$1,$2,28751,29000) |
3818 | + |
3819 | + $$(call ListPathsSafely_IfPrintf,$1,$2,29001,29250) |
3820 | + $$(call ListPathsSafely_IfPrintf,$1,$2,29251,29500) |
3821 | + $$(call ListPathsSafely_IfPrintf,$1,$2,29501,29750) |
3822 | + $$(call ListPathsSafely_IfPrintf,$1,$2,29751,30000) |
3823 | + endef |
3824 | +endif # HAS_FILE_FUNCTION |
3825 | + |
3826 | +################################################################################ |
3827 | +# Write to and read from file |
3828 | + |
3829 | +# Param 1 - File to read |
3830 | +ReadFile = \ |
3831 | + $(shell $(CAT) $1) |
3832 | + |
3833 | +# Param 1 - Text to write |
3834 | +# Param 2 - File to write to |
3835 | +ifeq ($(HAS_FILE_FUNCTION), true) |
3836 | + WriteFile = \ |
3837 | + $(file >$2,$(strip $1)) |
3838 | +else |
3839 | + # Use printf to get consistent behavior on all platforms. |
3840 | + WriteFile = \ |
3841 | + $(shell $(PRINTF) "%s" $(call ShellQuote, $1) > $2) |
3842 | +endif |
3843 | + |
3844 | +# Param 1 - Text to write |
3845 | +# Param 2 - File to write to |
3846 | +ifeq ($(HAS_FILE_FUNCTION), true) |
3847 | + AppendFile = \ |
3848 | + $(file >>$2,$(strip $1)) |
3849 | +else |
3850 | + # Use printf to get consistent behavior on all platforms. |
3851 | + AppendFile = \ |
3852 | + $(shell $(PRINTF) "%s" $(call ShellQuote, $1) >> $2) |
3853 | +endif |
3854 | diff --git a/make/common/Modules.gmk b/make/common/Modules.gmk |
3855 | index 41533e5..4f846c7 100644 |
3856 | --- a/make/common/Modules.gmk |
3857 | +++ b/make/common/Modules.gmk |
3858 | @@ -118,11 +118,11 @@ PLATFORM_MODULES += \ |
3859 | jdk.zipfs \ |
3860 | # |
3861 | |
3862 | -ifeq ($(OPENJDK_TARGET_OS), windows) |
3863 | +ifeq ($(call isTargetOs, windows), true) |
3864 | PLATFORM_MODULES += jdk.crypto.mscapi |
3865 | endif |
3866 | |
3867 | -ifeq ($(OPENJDK_TARGET_OS), solaris) |
3868 | +ifeq ($(call isTargetOs, solaris), true) |
3869 | PLATFORM_MODULES += jdk.crypto.ucrypto |
3870 | endif |
3871 | |
3872 | diff --git a/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk |
3873 | index bc297fb..6189810 100644 |
3874 | --- a/make/common/NativeCompilation.gmk |
3875 | +++ b/make/common/NativeCompilation.gmk |
3876 | @@ -283,10 +283,15 @@ endif |
3877 | # specialized file is found, returns the default file. |
3878 | # $1 Executable to find entitlements file for. |
3879 | ENTITLEMENTS_DIR := $(TOPDIR)/make/data/macosxsigning |
3880 | -DEFAULT_ENTITLEMENTS_FILE := $(ENTITLEMENTS_DIR)/default.plist |
3881 | +ifeq ($(MACOSX_CODESIGN_MODE), debug) |
3882 | + CODESIGN_PLIST_SUFFIX := -debug |
3883 | +else |
3884 | + CODESIGN_PLIST_SUFFIX := |
3885 | +endif |
3886 | +DEFAULT_ENTITLEMENTS_FILE := $(ENTITLEMENTS_DIR)/default$(CODESIGN_PLIST_SUFFIX).plist |
3887 | |
3888 | GetEntitlementsFile = \ |
3889 | - $(foreach f, $(ENTITLEMENTS_DIR)/$(strip $(notdir $1)).plist, \ |
3890 | + $(foreach f, $(ENTITLEMENTS_DIR)/$(strip $(notdir $1))$(CODESIGN_PLIST_SUFFIX).plist, \ |
3891 | $(if $(wildcard $f), $f, $(DEFAULT_ENTITLEMENTS_FILE)) \ |
3892 | ) |
3893 | |
3894 | @@ -909,7 +914,7 @@ define SetupNativeCompilationBody |
3895 | $(TOUCH) $$@ |
3896 | |
3897 | # On windows we need to create a resource file |
3898 | - ifeq ($(OPENJDK_TARGET_OS), windows) |
3899 | + ifeq ($(call isTargetOs, windows), true) |
3900 | ifneq ($$($1_VERSIONINFO_RESOURCE), ) |
3901 | $1_RES := $$($1_OBJECT_DIR)/$$($1_BASENAME).res |
3902 | $1_RES_DEPS_FILE := $$($1_RES).d |
3903 | @@ -950,7 +955,7 @@ define SetupNativeCompilationBody |
3904 | |
3905 | ifneq ($(DISABLE_MAPFILES), true) |
3906 | $1_REAL_MAPFILE := $$($1_MAPFILE) |
3907 | - ifneq ($(OPENJDK_TARGET_OS), windows) |
3908 | + ifeq ($(call isTargetOs, windows), false) |
3909 | ifneq ($$($1_REORDER), ) |
3910 | $1_REAL_MAPFILE := $$($1_OBJECT_DIR)/mapfile |
3911 | |
3912 | @@ -984,7 +989,7 @@ define SetupNativeCompilationBody |
3913 | # Only copy debug symbols for dynamic libraries and programs. |
3914 | ifneq ($$($1_TYPE), STATIC_LIBRARY) |
3915 | # Generate debuginfo files. |
3916 | - ifeq ($(OPENJDK_TARGET_OS), windows) |
3917 | + ifeq ($(call isTargetOs, windows), true) |
3918 | $1_EXTRA_LDFLAGS += -debug "-pdb:$$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).pdb" \ |
3919 | "-map:$$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).map" |
3920 | ifeq ($(SHIP_DEBUG_SYMBOLS), public) |
3921 | @@ -993,7 +998,7 @@ define SetupNativeCompilationBody |
3922 | $1_DEBUGINFO_FILES := $$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).pdb \ |
3923 | $$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).map |
3924 | |
3925 | - else ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris), ) |
3926 | + else ifeq ($(call isTargetOs, linux solaris), true) |
3927 | $1_DEBUGINFO_FILES := $$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).debuginfo |
3928 | # Setup the command line creating debuginfo files, to be run after linking. |
3929 | # It cannot be run separately since it updates the original target file |
3930 | @@ -1009,13 +1014,13 @@ define SetupNativeCompilationBody |
3931 | $1_DEBUGINFO_FILES := $$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).debuginfo |
3932 | $1_CREATE_DEBUGINFO_CMDS := $(CP) $$($1_TARGET) $$($1_DEBUGINFO_FILES) |
3933 | |
3934 | - else ifeq ($(OPENJDK_TARGET_OS), macosx) |
3935 | + else ifeq ($(call isTargetOs, macosx), true) |
3936 | $1_DEBUGINFO_FILES := \ |
3937 | $$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM/Contents/Info.plist \ |
3938 | $$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM/Contents/Resources/DWARF/$$($1_BASENAME) |
3939 | $1_CREATE_DEBUGINFO_CMDS := \ |
3940 | $(DSYMUTIL) --out $$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM $$($1_TARGET) |
3941 | - endif # OPENJDK_TARGET_OS |
3942 | + endif |
3943 | |
3944 | # Since the link rule creates more than one file that we want to track, |
3945 | # we have to use some tricks to get make to cooperate. To properly |
3946 | @@ -1101,7 +1106,7 @@ define SetupNativeCompilationBody |
3947 | endif |
3948 | endif |
3949 | |
3950 | - ifeq ($(OPENJDK_TARGET_OS), windows) |
3951 | + ifeq ($(call isTargetOs, windows), true) |
3952 | ifeq ($$($1_EMBED_MANIFEST), true) |
3953 | $1_EXTRA_LDFLAGS += -manifest:embed |
3954 | endif |
3955 | @@ -1181,7 +1186,7 @@ define SetupNativeCompilationBody |
3956 | # Keep as much as possible on one execution line for best performance |
3957 | # on Windows |
3958 | $$(call LogInfo, Linking $$($1_BASENAME)) |
3959 | - ifeq ($(OPENJDK_TARGET_OS), windows) |
3960 | + ifeq ($(call isTargetOs, windows), true) |
3961 | $$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \ |
3962 | $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \ |
3963 | $(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \ |
3964 | @@ -1199,16 +1204,17 @@ define SetupNativeCompilationBody |
3965 | $$($1_CREATE_DEBUGINFO_CMDS) |
3966 | $$($1_STRIP_CMD) |
3967 | endif |
3968 | - ifeq ($(OPENJDK_TARGET_OS), windows) |
3969 | + ifeq ($(call isTargetOs, windows), true) |
3970 | ifneq ($$($1_MANIFEST), ) |
3971 | $$($1_MT) -nologo -manifest $$($1_MANIFEST) -identity:"$$($1_NAME).exe, version=$$($1_MANIFEST_VERSION)" -outputresource:$$@;#1 |
3972 | endif |
3973 | endif |
3974 | - # This only works if the openjdk_codesign identity is present on the system. Let |
3975 | - # silently fail otherwise. |
3976 | - ifneq ($(CODESIGN), ) |
3977 | + # On macosx, optionally run codesign on every binary |
3978 | + ifeq ($(MACOSX_CODESIGN_MODE), hardened) |
3979 | $(CODESIGN) -f -s "$(MACOSX_CODESIGN_IDENTITY)" --timestamp --options runtime \ |
3980 | --entitlements $$(call GetEntitlementsFile, $$@) $$@ |
3981 | + else ifeq ($(MACOSX_CODESIGN_MODE), debug) |
3982 | + $(CODESIGN) -f -s - --entitlements $$(call GetEntitlementsFile, $$@) $$@ |
3983 | endif |
3984 | endif |
3985 | |
3986 | diff --git a/make/common/Utils.gmk b/make/common/Utils.gmk |
3987 | new file mode 100644 |
3988 | index 0000000..acb6a30 |
3989 | --- /dev/null |
3990 | +++ b/make/common/Utils.gmk |
3991 | @@ -0,0 +1,365 @@ |
3992 | +# |
3993 | +# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. |
3994 | +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3995 | +# |
3996 | +# This code is free software; you can redistribute it and/or modify it |
3997 | +# under the terms of the GNU General Public License version 2 only, as |
3998 | +# published by the Free Software Foundation. Oracle designates this |
3999 | +# particular file as subject to the "Classpath" exception as provided |
4000 | +# by Oracle in the LICENSE file that accompanied this code. |
4001 | +# |
4002 | +# This code is distributed in the hope that it will be useful, but WITHOUT |
4003 | +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
4004 | +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
4005 | +# version 2 for more details (a copy is included in the LICENSE file that |
4006 | +# accompanied this code). |
4007 | +# |
4008 | +# You should have received a copy of the GNU General Public License version |
4009 | +# 2 along with this work; if not, write to the Free Software Foundation, |
4010 | +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
4011 | +# |
4012 | +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
4013 | +# or visit www.oracle.com if you need additional information or have any |
4014 | +# questions. |
4015 | +# |
4016 | + |
4017 | +ifeq (,$(_MAKEBASE_GMK)) |
4018 | + $(error You must include MakeBase.gmk prior to including Utils.gmk) |
4019 | +endif |
4020 | + |
4021 | +################################################################################ |
4022 | +# |
4023 | +# Common utility functions |
4024 | +# |
4025 | +################################################################################ |
4026 | + |
4027 | +### Debug functions |
4028 | + |
4029 | +# Prints the name and value of a variable |
4030 | +PrintVar = \ |
4031 | + $(info $(strip $1) >$($(strip $1))<) |
4032 | + |
4033 | +################################################################################ |
4034 | +# This macro translates $ into \$ to protect the $ from expansion in the shell. |
4035 | +# To make this macro resilient against already escaped strings, first remove |
4036 | +# any present escapes before escaping so that no double escapes are added. |
4037 | +EscapeDollar = $(subst $$,\$$,$(subst \$$,$$,$(strip $1))) |
4038 | + |
4039 | +################################################################################ |
4040 | +# This macro works just like EscapeDollar above, but for #. |
4041 | +EscapeHash = $(subst \#,\\\#,$(subst \\\#,\#,$(strip $1))) |
4042 | + |
4043 | +################################################################################ |
4044 | +# This macro translates $ into $$ to protect the string from make itself. |
4045 | +DoubleDollar = $(subst $$,$$$$,$(strip $1)) |
4046 | + |
4047 | +################################################################################ |
4048 | +# Creates a sequence of increasing numbers (inclusive). |
4049 | +# Param 1 - starting number |
4050 | +# Param 2 - ending number |
4051 | +sequence = \ |
4052 | + $(wordlist $1, $2, $(strip \ |
4053 | + $(eval SEQUENCE_COUNT :=) \ |
4054 | + $(call _sequence-do,$(strip $2)))) |
4055 | + |
4056 | +_sequence-do = \ |
4057 | + $(if $(word $1, $(SEQUENCE_COUNT)),, \ |
4058 | + $(eval SEQUENCE_COUNT += .) \ |
4059 | + $(words $(SEQUENCE_COUNT)) \ |
4060 | + $(call _sequence-do,$1)) |
4061 | + |
4062 | +################################################################################ |
4063 | +# Replace question marks with space in string. This macro needs to be called on |
4064 | +# files from FindFiles in case any of them contains space in their file name, |
4065 | +# since FindFiles replaces space with ?. |
4066 | +# Param 1 - String to replace in |
4067 | +DecodeSpace = \ |
4068 | + $(subst ?,$(SPACE),$(strip $1)) |
4069 | +EncodeSpace = \ |
4070 | + $(subst $(SPACE),?,$(strip $1)) |
4071 | + |
4072 | +################################################################################ |
4073 | +# Assign a variable only if it is empty |
4074 | +# Param 1 - Variable to assign |
4075 | +# Param 2 - Value to assign |
4076 | +SetIfEmpty = \ |
4077 | + $(if $($(strip $1)),,$(eval $(strip $1) := $2)) |
4078 | + |
4079 | +################################################################################ |
4080 | +# Take two paths and return the path of the last common directory. |
4081 | +# Ex: /foo/bar/baz, /foo/bar/banan -> /foo/bar |
4082 | +# foo/bar/baz, /foo/bar -> <empty> |
4083 | +# |
4084 | +# The x prefix is used to preserve the presence of the initial slash |
4085 | +# |
4086 | +# $1 - Path to compare |
4087 | +# $2 - Other path to compare |
4088 | +FindCommonPathPrefix = \ |
4089 | + $(patsubst x%,%,$(subst $(SPACE),/,$(strip \ |
4090 | + $(call FindCommonPathPrefixHelper, \ |
4091 | + $(subst /,$(SPACE),x$(strip $1)), $(subst /,$(SPACE),x$(strip $2))) \ |
4092 | + ))) |
4093 | + |
4094 | +FindCommonPathPrefixHelper = \ |
4095 | + $(if $(call equals, $(firstword $1), $(firstword $2)), \ |
4096 | + $(firstword $1) \ |
4097 | + $(call FindCommonPathPrefixHelper, \ |
4098 | + $(wordlist 2, $(words $1), $1), $(wordlist 2, $(words $2), $2) \ |
4099 | + ) \ |
4100 | + ) |
4101 | + |
4102 | +# Convert a partial path into as many directory levels of ../, removing |
4103 | +# leading and following /. |
4104 | +# Ex: foo/bar/baz/ -> ../../.. |
4105 | +# foo/bar -> ../.. |
4106 | +# /foo -> .. |
4107 | +DirToDotDot = \ |
4108 | + $(subst $(SPACE),/,$(foreach d, $(subst /,$(SPACE),$1),..)) |
4109 | + |
4110 | +# Computes the relative path from a directory to a file |
4111 | +# $1 - File to compute the relative path to |
4112 | +# $2 - Directory to compute the relative path from |
4113 | +RelativePath = \ |
4114 | + $(eval $1_prefix := $(call FindCommonPathPrefix, $1, $2)) \ |
4115 | + $(eval $1_dotdots := $(call DirToDotDot, $(patsubst $($(strip $1)_prefix)%, %, $2))) \ |
4116 | + $(eval $1_dotdots := $(if $($(strip $1)_dotdots),$($(strip $1)_dotdots),.)) \ |
4117 | + $(eval $1_suffix := $(patsubst $($(strip $1)_prefix)/%, %, $1)) \ |
4118 | + $($(strip $1)_dotdots)/$($(strip $1)_suffix) |
4119 | + |
4120 | +################################################################################ |
4121 | +# Filter out duplicate sub strings while preserving order. Keeps the first occurance. |
4122 | +uniq = \ |
4123 | + $(strip $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1)))) |
4124 | + |
4125 | +# Returns all whitespace-separated words in $2 where at least one of the |
4126 | +# whitespace-separated words in $1 is a substring. |
4127 | +containing = \ |
4128 | + $(strip \ |
4129 | + $(foreach v,$(strip $2),\ |
4130 | + $(call uniq,$(foreach p,$(strip $1),$(if $(findstring $p,$v),$v))))) |
4131 | + |
4132 | +# Returns all whitespace-separated words in $2 where none of the |
4133 | +# whitespace-separated words in $1 is a substring. |
4134 | +not-containing = \ |
4135 | + $(strip $(filter-out $(call containing,$1,$2),$2)) |
4136 | + |
4137 | +# Return a list of all string elements that are duplicated in $1. |
4138 | +dups = \ |
4139 | + $(strip $(foreach v, $(sort $1), $(if $(filter-out 1, \ |
4140 | + $(words $(filter $v, $1))), $v))) |
4141 | + |
4142 | +# String equals |
4143 | +equals = \ |
4144 | + $(and $(findstring $(strip $1),$(strip $2)),\ |
4145 | + $(findstring $(strip $2),$(strip $1))) |
4146 | + |
4147 | +# Remove a whole list of prefixes |
4148 | +# $1 - List of prefixes |
4149 | +# $2 - List of elements to process |
4150 | +remove-prefixes = \ |
4151 | + $(strip $(if $1,$(patsubst $(firstword $1)%,%,\ |
4152 | + $(call remove-prefixes,$(filter-out $(firstword $1),$1),$2)),$2)) |
4153 | + |
4154 | +# Convert the string given to upper case, without any $(shell) |
4155 | +# Inspired by http://lists.gnu.org/archive/html/help-make/2013-09/msg00009.html |
4156 | +uppercase_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 \ |
4157 | + p,P q,Q r,R s,S t,T u,U v,V w,W x,X y,Y z,Z |
4158 | + |
4159 | +uppercase_internal = \ |
4160 | + $(if $(strip $1), $$(subst $(firstword $1), $(call uppercase_internal, \ |
4161 | + $(wordlist 2, $(words $1), $1), $2)), $2) |
4162 | + |
4163 | +# Convert a string to upper case. Works only on a-z. |
4164 | +# $1 - The string to convert |
4165 | +uppercase = \ |
4166 | + $(strip \ |
4167 | + $(eval uppercase_result := $(call uppercase_internal, $(uppercase_table), $1)) \ |
4168 | + $(uppercase_result) \ |
4169 | + ) |
4170 | + |
4171 | +################################################################################ |
4172 | +# Boolean operators. |
4173 | + |
4174 | +# Return the word "true" if all the boolean words given as argument is "true", |
4175 | +# and returns "false" otherwise. Boolean words must be "true" or "false". It is |
4176 | +# an error to supply a non-boolean word. An empty string is considered "true". |
4177 | +And = \ |
4178 | + $(strip $(if $(filter-out true false, $1), $(error Non-boolean values: $1)) \ |
4179 | + $(if $(strip $(filter-out true, $1)), false, true)) |
4180 | + |
4181 | +# Return the word "false" if all the boolean words given as argument is "false", |
4182 | +# and returns "true" otherwise. Boolean words must be "true" or "false". It is |
4183 | +# an error to supply a non-boolean word. An empty string is considered "false". |
4184 | +Or = \ |
4185 | + $(strip $(if $(filter-out true false, $1), $(error Non-boolean values: $1)) \ |
4186 | + $(if $(strip $(filter-out false, $1)), true, false)) |
4187 | + |
4188 | +################################################################################ |
4189 | +# Parse a multiple-keyword variable, like FOO="KEYWORD1=val1;KEYWORD2=val2;..." |
4190 | +# These will be converted into a series of variables like FOO_KEYWORD1=val1, |
4191 | +# FOO_KEYWORD2=val2, etc. Unknown keywords will cause an error. |
4192 | +# |
4193 | +# Parameter 1 is the name of the rule, and is also the name of the variable. |
4194 | +# |
4195 | +# Remaining parameters are named arguments. These include: |
4196 | +# SINGLE_KEYWORDS A list of valid keywords with single string values |
4197 | +# STRING_KEYWORDS A list of valid keywords, processed as string. This means |
4198 | +# that '%20' will be replaced by ' ' to allow for multi-word strings. |
4199 | +# |
4200 | +ParseKeywordVariable = $(NamedParamsMacroTemplate) |
4201 | +define ParseKeywordVariableBody |
4202 | + ifneq ($$($1), ) |
4203 | + # To preserve spaces, substitute them with a hopefully unique pattern |
4204 | + # before splitting and then re-substitute spaces back. |
4205 | + $1_MANGLED := $$(subst $$(SPACE),||||,$$($1)) |
4206 | + $$(foreach mangled_part, $$(subst ;, , $$($1_MANGLED)), \ |
4207 | + $$(eval mangled_part_eval := $$(call DoubleDollar, $$(mangled_part))) \ |
4208 | + $$(eval part := $$$$(subst ||||,$$$$(SPACE),$$$$(mangled_part_eval))) \ |
4209 | + $$(eval $1_NO_MATCH := true) \ |
4210 | + $$(foreach keyword, $$($1_SINGLE_KEYWORDS), \ |
4211 | + $$(eval keyword_eval := $$(call DoubleDollar, $$(keyword))) \ |
4212 | + $$(if $$(filter $$(keyword)=%, $$(part)), \ |
4213 | + $$(eval $(strip $1)_$$$$(keyword_eval) := $$$$(strip $$$$(patsubst $$$$(keyword_eval)=%, %, $$$$(part)))) \ |
4214 | + $$(eval $1_NO_MATCH := ) \ |
4215 | + ) \ |
4216 | + ) \ |
4217 | + $$(foreach keyword, $$($1_STRING_KEYWORDS), \ |
4218 | + $$(eval keyword_eval := $$(call DoubleDollar, $$(keyword))) \ |
4219 | + $$(if $$(filter $$(keyword)=%, $$(part)), \ |
4220 | + $$(eval $(strip $1)_$$$$(keyword_eval) := $$$$(strip $$$$(subst %20, , $$$$(patsubst $$$$(keyword_eval)=%, %, $$$$(part))))) \ |
4221 | + $$(eval $1_NO_MATCH := ) \ |
4222 | + ) \ |
4223 | + ) \ |
4224 | + $$(if $$($1_NO_MATCH), \ |
4225 | + $$(if $$(filter $$(part), $$($1_SINGLE_KEYWORDS) $$($1_STRING_KEYWORDS)), \ |
4226 | + $$(info Keyword $$(part) for $1 needs to be assigned a value.) \ |
4227 | + , \ |
4228 | + $$(info $$(part) is not a valid keyword for $1.) \ |
4229 | + $$(info Valid keywords: $$($1_SINGLE_KEYWORDS) $$($1_STRING_KEYWORDS).) \ |
4230 | + ) \ |
4231 | + $$(error Cannot continue) \ |
4232 | + ) \ |
4233 | + ) |
4234 | + endif |
4235 | +endef |
4236 | + |
4237 | +################################################################################ |
4238 | +# ShellQuote |
4239 | +# |
4240 | +# Quotes a string with single quotes and replaces single quotes with '\'' so |
4241 | +# that the contents survives being given to the shell. |
4242 | +ShellQuote = \ |
4243 | + $(SQUOTE)$(subst $(SQUOTE),$(SQUOTE)\$(SQUOTE)$(SQUOTE),$(strip $1))$(SQUOTE) |
4244 | + |
4245 | +################################################################################ |
4246 | +# Find lib dir for module |
4247 | +# Param 1 - module name |
4248 | +FindLibDirForModule = \ |
4249 | + $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1) |
4250 | + |
4251 | +################################################################################ |
4252 | +# Find executable dir for module |
4253 | +# Param 1 - module name |
4254 | +FindExecutableDirForModule = \ |
4255 | + $(SUPPORT_OUTPUTDIR)/modules_cmds/$(strip $1) |
4256 | + |
4257 | +################################################################################ |
4258 | +# Return a string suitable for use after a -classpath or --module-path option. It |
4259 | +# will be correct and safe to use on all platforms. Arguments are given as space |
4260 | +# separate classpath entries. Safe for multiple nested calls. |
4261 | +# param 1 : A space separated list of classpath entries |
4262 | +# The surrounding strip is needed to keep additional whitespace out |
4263 | +PathList = \ |
4264 | + "$(subst $(SPACE),:,$(strip $(subst $(DQUOTE),,$1)))" |
4265 | + |
4266 | +################################################################################ |
4267 | +# Check if a specified hotspot variant is being built, or at least one of a |
4268 | +# list of variants. Will return 'true' or 'false'. |
4269 | +# $1 - the variant to test for |
4270 | +check-jvm-variant = \ |
4271 | + $(strip \ |
4272 | + $(if $(filter-out $(VALID_JVM_VARIANTS), $1), \ |
4273 | + $(error Internal error: Invalid variant tested: $1)) \ |
4274 | + $(if $(filter $1, $(JVM_VARIANTS)), true, false)) |
4275 | + |
4276 | +################################################################################ |
4277 | +# Check if our build or target conforms to certain restrictions. This set of |
4278 | +# functions all work in similar ways, testing the property that the name |
4279 | +# implies, so e.g. isTargetCpu test the CPU of the target system. |
4280 | +# |
4281 | +# $1 - A property, or a space separated list of properties to test for. |
4282 | +# |
4283 | +# Returns true if the actual property matches one of the properties in the list, |
4284 | +# and false otherwise. |
4285 | +# |
4286 | +# Examples: $(call isTargetOs, linux solaris) will return true when executed |
4287 | +# on either linux or solaris, and false otherwise. |
4288 | +# $(call isBuildCpuArch, x86) will return true iff the build CPU Arch is x86. |
4289 | + |
4290 | +isTargetOs = \ |
4291 | + $(strip $(if $(filter $(OPENJDK_TARGET_OS), $1), true, false)) |
4292 | + |
4293 | +isTargetOsType = \ |
4294 | + $(strip $(if $(filter $(OPENJDK_TARGET_OS_TYPE), $1), true, false)) |
4295 | + |
4296 | +isTargetCpu = \ |
4297 | + $(strip $(if $(filter $(OPENJDK_TARGET_CPU), $1), true, false)) |
4298 | + |
4299 | +isTargetCpuArch = \ |
4300 | + $(strip $(if $(filter $(OPENJDK_TARGET_CPU_ARCH), $1), true, false)) |
4301 | + |
4302 | +isTargetCpuBits = \ |
4303 | + $(strip $(if $(filter $(OPENJDK_TARGET_CPU_BITS), $1), true, false)) |
4304 | + |
4305 | +isBuildOs = \ |
4306 | + $(strip $(if $(filter $(OPENJDK_BUILD_OS), $1), true, false)) |
4307 | + |
4308 | +isBuildOsType = \ |
4309 | + $(strip $(if $(filter $(OPENJDK_BUILD_OS_TYPE), $1), true, false)) |
4310 | + |
4311 | +isBuildOsEnv = \ |
4312 | + $(strip $(if $(filter $(OPENJDK_BUILD_OS_ENV), $1), true, false)) |
4313 | + |
4314 | +isBuildCpu = \ |
4315 | + $(strip $(if $(filter $(OPENJDK_BUILD_CPU), $1), true, false)) |
4316 | + |
4317 | +isBuildCpuArch = \ |
4318 | + $(strip $(if $(filter $(OPENJDK_BUILD_CPU_ARCH), $1), true, false)) |
4319 | + |
4320 | +################################################################################ |
4321 | +# Converts a space separated list to a comma separated list. |
4322 | +# |
4323 | +# Replacing double-comma with a single comma is to workaround the issue with |
4324 | +# some version of make on windows that doesn't substitute spaces with one comma |
4325 | +# properly. |
4326 | +CommaList = \ |
4327 | + $(strip \ |
4328 | + $(subst $(COMMA)$(COMMA),$(COMMA),$(subst $(SPACE),$(COMMA),$(strip $1))) \ |
4329 | + ) |
4330 | + |
4331 | +################################################################################ |
4332 | +# Converts a space separated list to a colon separated list. |
4333 | +# |
4334 | +# Replacing double-colon with a single colon is to workaround the issue with |
4335 | +# some version of make on windows that doesn't substitute spaces with one colon |
4336 | +# properly. |
4337 | +ColonList = \ |
4338 | + $(strip \ |
4339 | + $(subst ::,:,$(subst $(SPACE),:,$(strip $1))) \ |
4340 | + ) |
4341 | + |
4342 | +################################################################################ |
4343 | +# Given a list of files, filters out locale specific files for translations |
4344 | +# that should be excluded from this build. |
4345 | +# $1 - The list of files to filter |
4346 | +# $2 - The suffix of the files that should be considered (.java or .properties) |
4347 | +FilterExcludedTranslations = \ |
4348 | + $(strip $(if $(EXCLUDE_TRANSLATIONS), \ |
4349 | + $(filter-out \ |
4350 | + $(foreach suffix, $2, \ |
4351 | + $(addprefix %_, $(addsuffix $(suffix), $(EXCLUDE_TRANSLATIONS))) \ |
4352 | + ), \ |
4353 | + $1 \ |
4354 | + ), \ |
4355 | + $1 \ |
4356 | + )) |
4357 | diff --git a/make/conf/test-dependencies b/make/conf/github-actions.conf |
4358 | similarity index 65% |
4359 | rename from make/conf/test-dependencies |
4360 | rename to make/conf/github-actions.conf |
4361 | index 0b6c913..40dd3b5 100644 |
4362 | --- a/make/conf/test-dependencies |
4363 | +++ b/make/conf/github-actions.conf |
4364 | @@ -23,21 +23,19 @@ |
4365 | # questions. |
4366 | # |
4367 | |
4368 | -# Versions and download locations for dependencies used by pre-submit testing. |
4369 | +# Versions and download locations for dependencies used by GitHub Actions (GHA) |
4370 | |
4371 | -BOOT_JDK_VERSION=11 |
4372 | -JTREG_VERSION=6 |
4373 | -JTREG_BUILD=1 |
4374 | GTEST_VERSION=1.8.1 |
4375 | +JTREG_VERSION=6.1+3 |
4376 | |
4377 | -LINUX_X64_BOOT_JDK_FILENAME=openjdk-11.0.14.1_linux-x64_bin.tar.gz |
4378 | -LINUX_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.gz |
4379 | -LINUX_X64_BOOT_JDK_SHA256=43fb84f8063ad9bf6b6d694a67b8f64c8827552b920ec5ce794dfe5602edffe7 |
4380 | +LINUX_X64_BOOT_JDK_EXT=tar.gz |
4381 | +LINUX_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 |
4382 | +LINUX_X64_BOOT_JDK_SHA256=4a29efda1d702b8ff38e554cf932051f40ec70006caed5c4857a8cbc7a0b7db7 |
4383 | |
4384 | -WINDOWS_X64_BOOT_JDK_FILENAME=openjdk-11.0.14.1_windows-x64_bin.zip |
4385 | -WINDOWS_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.zip |
4386 | -WINDOWS_X64_BOOT_JDK_SHA256=3e7da701aa92e441418299714f0ed6db10c3bb1e2db625c35a2c2cd9cc619731 |
4387 | +WINDOWS_X64_BOOT_JDK_EXT=zip |
4388 | +WINDOWS_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 |
4389 | +WINDOWS_X64_BOOT_JDK_SHA256=0cfa5991a8e372b3f8eacacbb2a336663ead0cc6ec9c9ab6cd53206602fb0062 |
4390 | |
4391 | -MACOS_X64_BOOT_JDK_FILENAME=openjdk-11.0.14.1_osx-x64_bin.tar.gz |
4392 | -MACOS_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.gz |
4393 | -MACOS_X64_BOOT_JDK_SHA256=8c69808f5d9d209b195575e979de0e43cdf5d0f1acec1853a569601fe2c1f743 |
4394 | +MACOS_X64_BOOT_JDK_EXT=tar.gz |
4395 | +MACOS_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 |
4396 | +MACOS_X64_BOOT_JDK_SHA256=75d79315d7265cc4b89fd9e844161ff90798bc6482ace8c1ac75f862a5b3b565 |
4397 | diff --git a/make/copy/Copy-java.base.gmk b/make/copy/Copy-java.base.gmk |
4398 | index 4734d3f..8fb59d2 100644 |
4399 | --- a/make/copy/Copy-java.base.gmk |
4400 | +++ b/make/copy/Copy-java.base.gmk |
4401 | @@ -31,7 +31,7 @@ $(eval $(call IncludeCustomExtension, copy/Copy-java.base.gmk)) |
4402 | |
4403 | ################################################################################ |
4404 | |
4405 | -ifneq ($(findstring $(OPENJDK_TARGET_OS), windows aix),) |
4406 | +ifeq ($(call isTargetOs, windows aix), true) |
4407 | |
4408 | TZMAPPINGS_SRC := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf |
4409 | |
4410 | @@ -89,7 +89,7 @@ endif |
4411 | ################################################################################ |
4412 | # In jvm.cfg, the first listed KNOWN variant is the default. On most build |
4413 | # configurations, that is the server variant. |
4414 | -ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), windows-x86) |
4415 | +ifeq ($(call And, $(call isTargetOs, windows) $(call isTargetCpu, x86)), true) |
4416 | DEFAULT_CFG_VARIANT ?= client |
4417 | endif |
4418 | DEFAULT_CFG_VARIANT ?= server |
4419 | @@ -151,7 +151,7 @@ DEF_POLICY_DST := $(LIB_DST_DIR)/security/default.policy |
4420 | DEF_POLICY_SRC_LIST := $(DEF_POLICY_SRC) |
4421 | DEF_POLICY_SRC_LIST += $(CUSTOM_POLICY_SRC_LIST) |
4422 | |
4423 | -ifneq ($(filter $(OPENJDK_TARGET_OS), windows solaris), ) |
4424 | +ifeq ($(call isTargetOs, windows solaris), true) |
4425 | DEF_POLICY_SRC_LIST += $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/lib/security/default.policy |
4426 | endif |
4427 | |
4428 | @@ -191,7 +191,7 @@ $(eval $(call SetupCopyFiles, COPY_NET_PROPERTIES, \ |
4429 | |
4430 | TARGETS += $(COPY_NET_PROPERTIES) |
4431 | |
4432 | -ifeq ($(OPENJDK_TARGET_OS), solaris) |
4433 | +ifeq ($(call isTargetOs, solaris), true) |
4434 | $(eval $(call SetupCopyFiles, COPY_SDP_CONF, \ |
4435 | FILES := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/conf/sdp/sdp.conf.template, \ |
4436 | DEST := $(CONF_DST_DIR)/sdp, \ |
4437 | diff --git a/make/copy/Copy-jdk.crypto.cryptoki.gmk b/make/copy/Copy-jdk.crypto.cryptoki.gmk |
4438 | index 7965c56..f5d1632 100644 |
4439 | --- a/make/copy/Copy-jdk.crypto.cryptoki.gmk |
4440 | +++ b/make/copy/Copy-jdk.crypto.cryptoki.gmk |
4441 | @@ -27,7 +27,7 @@ include CopyCommon.gmk |
4442 | |
4443 | ################################################################################ |
4444 | |
4445 | -ifeq ($(OPENJDK_TARGET_OS), solaris) |
4446 | +ifeq ($(call isTargetOs, solaris), true) |
4447 | |
4448 | SUNPKCS11_CFG_SRC := \ |
4449 | $(TOPDIR)/src/jdk.crypto.cryptoki/solaris/conf/security/sunpkcs11-solaris.cfg |
4450 | diff --git a/make/copy/Copy-jdk.crypto.ucrypto.gmk b/make/copy/Copy-jdk.crypto.ucrypto.gmk |
4451 | index 0007e44..a9320e8 100644 |
4452 | --- a/make/copy/Copy-jdk.crypto.ucrypto.gmk |
4453 | +++ b/make/copy/Copy-jdk.crypto.ucrypto.gmk |
4454 | @@ -27,7 +27,7 @@ include CopyCommon.gmk |
4455 | |
4456 | ################################################################################ |
4457 | |
4458 | -ifeq ($(OPENJDK_TARGET_OS), solaris) |
4459 | +ifeq ($(call isTargetOs, solaris), true) |
4460 | |
4461 | UCRYPTO_CFG_SRC := $(TOPDIR)/src/jdk.crypto.ucrypto/solaris/conf/security/ucrypto-solaris.cfg |
4462 | UCRYPTO_CFG_DST := $(CONF_DST_DIR)/security/ucrypto-solaris.cfg |
4463 | diff --git a/make/data/cacerts/certignaca b/make/data/cacerts/certignaca |
4464 | new file mode 100644 |
4465 | index 0000000..9e50633 |
4466 | --- /dev/null |
4467 | +++ b/make/data/cacerts/certignaca |
4468 | @@ -0,0 +1,29 @@ |
4469 | +Owner: CN=Certigna, O=Dhimyotis, C=FR |
4470 | +Issuer: CN=Certigna, O=Dhimyotis, C=FR |
4471 | +Serial number: fedce3010fc948ff |
4472 | +Valid from: Fri Jun 29 15:13:05 GMT 2007 until: Tue Jun 29 15:13:05 GMT 2027 |
4473 | +Signature algorithm name: SHA1withRSA |
4474 | +Subject Public Key Algorithm: 2048-bit RSA key |
4475 | +Version: 3 |
4476 | +-----BEGIN CERTIFICATE----- |
4477 | +MIIDqDCCApCgAwIBAgIJAP7c4wEPyUj/MA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNV |
4478 | +BAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hMB4X |
4479 | +DTA3MDYyOTE1MTMwNVoXDTI3MDYyOTE1MTMwNVowNDELMAkGA1UEBhMCRlIxEjAQ |
4480 | +BgNVBAoMCURoaW15b3RpczERMA8GA1UEAwwIQ2VydGlnbmEwggEiMA0GCSqGSIb3 |
4481 | +DQEBAQUAA4IBDwAwggEKAoIBAQDIaPHJ1tazNHUmgh7stL7qXOEm7RFHYeGifBZ4 |
4482 | +QCHkYJ5ayGPhxLGWkv8YbWkj4Sti993iNi+RB7lIzw7sebYs5zRLcAglozyHGxny |
4483 | +gQcPOJAZ0xH+hrTy0V4eHpbNgGzOOzGTtvKg0KmVEn2lmsxryIRWijOp5yIVUxbw |
4484 | +zBfsV1/pogqYCd7jX5xv3EjjhQsVWqa6n6xI4wmy9/Qy3l40vhx4XUJbzg4ij02Q |
4485 | +130yGLMLLGq/jj8UEYkgDncUtT2UCIf3JR7VsmAA7G8qKCVuKj4YYxclPz5EIBb2 |
4486 | +JsglrgVKtOdjLPOMFlN+XPsRGgjBRmKfIrjxwo1p3Po6WAbfAgMBAAGjgbwwgbkw |
4487 | +DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUGu3+QTmQtCRZvgHyUtVF9lo53BEw |
4488 | +ZAYDVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF9lo53BGhOKQ2MDQxCzAJBgNVBAYT |
4489 | +AkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hggkA/tzj |
4490 | +AQ/JSP8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG |
4491 | +9w0BAQUFAAOCAQEAhQMeknH2Qq/ho2Ge6/PAD/Kl1NqV5ta+aDY9fm4fTIrv0Q8h |
4492 | +bV6lUmPOEvjvKtpv6zf+EwLHyzs+ImvaYS5/1HI93TDhHkxAGYwP15zRgzB7mFnc |
4493 | +fca5DClMoTOi62c6ZYTTluLtdkVwj7Ur3vkj1kluPBS1xp81HlDQwY9qcEQCYsuu |
4494 | +HWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY1gkIl2PlwS6w |
4495 | +t0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw |
4496 | +WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg== |
4497 | +-----END CERTIFICATE----- |
4498 | diff --git a/make/data/lsrdata/language-subtag-registry.txt b/make/data/lsrdata/language-subtag-registry.txt |
4499 | index 3ce374c..92e0a26 100644 |
4500 | --- a/make/data/lsrdata/language-subtag-registry.txt |
4501 | +++ b/make/data/lsrdata/language-subtag-registry.txt |
4502 | @@ -1,4 +1,4 @@ |
4503 | -File-Date: 2021-05-11 |
4504 | +File-Date: 2022-08-08 |
4505 | %% |
4506 | Type: language |
4507 | Subtag: aa |
4508 | @@ -2146,9 +2146,16 @@ Added: 2009-07-29 |
4509 | Macrolanguage: ar |
4510 | %% |
4511 | Type: language |
4512 | +Subtag: ajs |
4513 | +Description: Algerian Jewish Sign Language |
4514 | +Added: 2022-02-25 |
4515 | +%% |
4516 | +Type: language |
4517 | Subtag: ajt |
4518 | Description: Judeo-Tunisian Arabic |
4519 | Added: 2009-07-29 |
4520 | +Deprecated: 2022-02-25 |
4521 | +Preferred-Value: aeb |
4522 | Macrolanguage: jrb |
4523 | %% |
4524 | Type: language |
4525 | @@ -5772,6 +5779,11 @@ Added: 2009-07-29 |
4526 | Deprecated: 2020-03-28 |
4527 | %% |
4528 | Type: language |
4529 | +Subtag: bpc |
4530 | +Description: Mbuk |
4531 | +Added: 2022-02-25 |
4532 | +%% |
4533 | +Type: language |
4534 | Subtag: bpd |
4535 | Description: Banda-Banda |
4536 | Added: 2009-07-29 |
4537 | @@ -6016,6 +6028,7 @@ Added: 2005-10-16 |
4538 | %% |
4539 | Type: language |
4540 | Subtag: brb |
4541 | +Description: Brao |
4542 | Description: Lave |
4543 | Added: 2009-07-29 |
4544 | %% |
4545 | @@ -8155,6 +8168,11 @@ Added: 2020-03-28 |
4546 | Macrolanguage: zh |
4547 | %% |
4548 | Type: language |
4549 | +Subtag: cnq |
4550 | +Description: Chung |
4551 | +Added: 2022-02-25 |
4552 | +%% |
4553 | +Type: language |
4554 | Subtag: cnr |
4555 | Description: Montenegrin |
4556 | Added: 2018-01-23 |
4557 | @@ -8757,6 +8775,8 @@ Subtag: cug |
4558 | Description: Chungmboko |
4559 | Description: Cung |
4560 | Added: 2009-07-29 |
4561 | +Deprecated: 2022-02-25 |
4562 | +Comments: see bpc, cnq |
4563 | %% |
4564 | Type: language |
4565 | Subtag: cuh |
4566 | @@ -10176,6 +10196,11 @@ Description: Tadaksahak |
4567 | Added: 2009-07-29 |
4568 | %% |
4569 | Type: language |
4570 | +Subtag: dsz |
4571 | +Description: Mardin Sign Language |
4572 | +Added: 2022-02-25 |
4573 | +%% |
4574 | +Type: language |
4575 | Subtag: dta |
4576 | Description: Daur |
4577 | Added: 2009-07-29 |
4578 | @@ -10602,6 +10627,11 @@ Description: Emilian |
4579 | Added: 2009-07-29 |
4580 | %% |
4581 | Type: language |
4582 | +Subtag: egm |
4583 | +Description: Benamanga |
4584 | +Added: 2022-02-25 |
4585 | +%% |
4586 | +Type: language |
4587 | Subtag: ego |
4588 | Description: Eggon |
4589 | Added: 2009-07-29 |
4590 | @@ -10913,7 +10943,7 @@ Added: 2009-07-29 |
4591 | %% |
4592 | Type: language |
4593 | Subtag: env |
4594 | -Description: Enwan (Edu State) |
4595 | +Description: Enwan (Edo State) |
4596 | Added: 2009-07-29 |
4597 | %% |
4598 | Type: language |
4599 | @@ -11329,6 +11359,7 @@ Added: 2009-07-29 |
4600 | Type: language |
4601 | Subtag: fit |
4602 | Description: Tornedalen Finnish |
4603 | +Description: Meänkieli |
4604 | Added: 2009-07-29 |
4605 | %% |
4606 | Type: language |
4607 | @@ -12838,6 +12869,11 @@ Description: Gavar |
4608 | Added: 2009-07-29 |
4609 | %% |
4610 | Type: language |
4611 | +Subtag: gov |
4612 | +Description: Goo |
4613 | +Added: 2022-02-25 |
4614 | +%% |
4615 | +Type: language |
4616 | Subtag: gow |
4617 | Description: Gorowa |
4618 | Added: 2009-07-29 |
4619 | @@ -14941,6 +14977,11 @@ Description: Marsian |
4620 | Added: 2009-07-29 |
4621 | %% |
4622 | Type: language |
4623 | +Subtag: imt |
4624 | +Description: Imotong |
4625 | +Added: 2022-02-25 |
4626 | +%% |
4627 | +Type: language |
4628 | Subtag: imy |
4629 | Description: Milyan |
4630 | Added: 2009-07-29 |
4631 | @@ -19458,6 +19499,8 @@ Type: language |
4632 | Subtag: lak |
4633 | Description: Laka (Nigeria) |
4634 | Added: 2009-07-29 |
4635 | +Deprecated: 2022-02-25 |
4636 | +Preferred-Value: ksp |
4637 | %% |
4638 | Type: language |
4639 | Subtag: lal |
4640 | @@ -19953,6 +19996,11 @@ Description: Opuuo |
4641 | Added: 2009-07-29 |
4642 | %% |
4643 | Type: language |
4644 | +Subtag: lgo |
4645 | +Description: Lango (South Sudan) |
4646 | +Added: 2022-02-25 |
4647 | +%% |
4648 | +Type: language |
4649 | Subtag: lgq |
4650 | Description: Logba |
4651 | Added: 2009-07-29 |
4652 | @@ -20552,6 +20600,8 @@ Type: language |
4653 | Subtag: lno |
4654 | Description: Lango (South Sudan) |
4655 | Added: 2009-07-29 |
4656 | +Deprecated: 2022-02-25 |
4657 | +Comments: see imt, lgo, lqr, oie |
4658 | %% |
4659 | Type: language |
4660 | Subtag: lns |
4661 | @@ -20724,6 +20774,11 @@ Description: Lopit |
4662 | Added: 2009-07-29 |
4663 | %% |
4664 | Type: language |
4665 | +Subtag: lqr |
4666 | +Description: Logir |
4667 | +Added: 2022-02-25 |
4668 | +%% |
4669 | +Type: language |
4670 | Subtag: lra |
4671 | Description: Rara Bakati' |
4672 | Added: 2009-07-29 |
4673 | @@ -20809,6 +20864,12 @@ Description: Langue des Signes Burundaise |
4674 | Added: 2021-02-20 |
4675 | %% |
4676 | Type: language |
4677 | +Subtag: lsc |
4678 | +Description: Albarradas Sign Language |
4679 | +Description: Lengua de señas Albarradas |
4680 | +Added: 2022-02-25 |
4681 | +%% |
4682 | +Type: language |
4683 | Subtag: lsd |
4684 | Description: Lishana Deni |
4685 | Added: 2009-07-29 |
4686 | @@ -20883,6 +20944,13 @@ Description: Sivia Sign Language |
4687 | Added: 2019-04-16 |
4688 | %% |
4689 | Type: language |
4690 | +Subtag: lsw |
4691 | +Description: Seychelles Sign Language |
4692 | +Description: Lalang Siny Seselwa |
4693 | +Description: Langue des Signes Seychelloise |
4694 | +Added: 2022-02-25 |
4695 | +%% |
4696 | +Type: language |
4697 | Subtag: lsy |
4698 | Description: Mauritian Sign Language |
4699 | Added: 2010-03-11 |
4700 | @@ -26779,6 +26847,11 @@ Description: Nawaru |
4701 | Added: 2009-07-29 |
4702 | %% |
4703 | Type: language |
4704 | +Subtag: nww |
4705 | +Description: Ndwewe |
4706 | +Added: 2022-02-25 |
4707 | +%% |
4708 | +Type: language |
4709 | Subtag: nwx |
4710 | Description: Middle Newar |
4711 | Added: 2009-07-29 |
4712 | @@ -27201,6 +27274,11 @@ Description: Oirata |
4713 | Added: 2009-07-29 |
4714 | %% |
4715 | Type: language |
4716 | +Subtag: oie |
4717 | +Description: Okolie |
4718 | +Added: 2022-02-25 |
4719 | +%% |
4720 | +Type: language |
4721 | Subtag: oin |
4722 | Description: Inebu One |
4723 | Added: 2009-07-29 |
4724 | @@ -28472,6 +28550,11 @@ Added: 2005-10-16 |
4725 | Scope: collection |
4726 | %% |
4727 | Type: language |
4728 | +Subtag: phj |
4729 | +Description: Pahari |
4730 | +Added: 2022-02-25 |
4731 | +%% |
4732 | +Type: language |
4733 | Subtag: phk |
4734 | Description: Phake |
4735 | Added: 2009-07-29 |
4736 | @@ -28572,6 +28655,7 @@ Type: language |
4737 | Subtag: pii |
4738 | Description: Pini |
4739 | Added: 2009-07-29 |
4740 | +Deprecated: 2022-02-25 |
4741 | %% |
4742 | Type: language |
4743 | Subtag: pij |
4744 | @@ -29419,6 +29503,7 @@ Added: 2009-07-29 |
4745 | %% |
4746 | Type: language |
4747 | Subtag: psc |
4748 | +Description: Iranian Sign Language |
4749 | Description: Persian Sign Language |
4750 | Added: 2009-07-29 |
4751 | %% |
4752 | @@ -29772,7 +29857,13 @@ Description: Pyen |
4753 | Added: 2009-07-29 |
4754 | %% |
4755 | Type: language |
4756 | +Subtag: pzh |
4757 | +Description: Pazeh |
4758 | +Added: 2022-02-25 |
4759 | +%% |
4760 | +Type: language |
4761 | Subtag: pzn |
4762 | +Description: Jejara Naga |
4763 | Description: Para Naga |
4764 | Added: 2009-07-29 |
4765 | %% |
4766 | @@ -30394,6 +30485,11 @@ Description: Riang (India) |
4767 | Added: 2009-07-29 |
4768 | %% |
4769 | Type: language |
4770 | +Subtag: rib |
4771 | +Description: Bribri Sign Language |
4772 | +Added: 2022-02-25 |
4773 | +%% |
4774 | +Type: language |
4775 | Subtag: rie |
4776 | Description: Rien |
4777 | Added: 2009-07-29 |
4778 | @@ -30627,6 +30723,11 @@ Added: 2009-07-29 |
4779 | Deprecated: 2016-05-30 |
4780 | %% |
4781 | Type: language |
4782 | +Subtag: rnb |
4783 | +Description: Brunca Sign Language |
4784 | +Added: 2022-02-25 |
4785 | +%% |
4786 | +Type: language |
4787 | Subtag: rnd |
4788 | Description: Ruund |
4789 | Added: 2009-07-29 |
4790 | @@ -30770,6 +30871,12 @@ Added: 2009-07-29 |
4791 | Deprecated: 2017-02-23 |
4792 | %% |
4793 | Type: language |
4794 | +Subtag: rsk |
4795 | +Description: Ruthenian |
4796 | +Description: Rusyn |
4797 | +Added: 2022-02-25 |
4798 | +%% |
4799 | +Type: language |
4800 | Subtag: rsl |
4801 | Description: Russian Sign Language |
4802 | Added: 2009-07-29 |
4803 | @@ -30780,6 +30887,11 @@ Description: Miriwoong Sign Language |
4804 | Added: 2016-05-30 |
4805 | %% |
4806 | Type: language |
4807 | +Subtag: rsn |
4808 | +Description: Rwandan Sign Language |
4809 | +Added: 2022-02-25 |
4810 | +%% |
4811 | +Type: language |
4812 | Subtag: rtc |
4813 | Description: Rungtu Chin |
4814 | Added: 2012-08-12 |
4815 | @@ -32276,6 +32388,8 @@ Type: language |
4816 | Subtag: smd |
4817 | Description: Sama |
4818 | Added: 2009-07-29 |
4819 | +Deprecated: 2022-02-25 |
4820 | +Preferred-Value: kmb |
4821 | %% |
4822 | Type: language |
4823 | Subtag: smf |
4824 | @@ -32382,6 +32496,8 @@ Type: language |
4825 | Subtag: snb |
4826 | Description: Sebuyau |
4827 | Added: 2009-07-29 |
4828 | +Deprecated: 2022-02-25 |
4829 | +Preferred-Value: iba |
4830 | %% |
4831 | Type: language |
4832 | Subtag: snc |
4833 | @@ -35199,6 +35315,11 @@ Description: Tojolabal |
4834 | Added: 2009-07-29 |
4835 | %% |
4836 | Type: language |
4837 | +Subtag: tok |
4838 | +Description: Toki Pona |
4839 | +Added: 2022-02-25 |
4840 | +%% |
4841 | +Type: language |
4842 | Subtag: tol |
4843 | Description: Tolowa |
4844 | Added: 2009-07-29 |
4845 | @@ -35541,6 +35662,8 @@ Added: 2009-07-29 |
4846 | %% |
4847 | Type: language |
4848 | Subtag: trv |
4849 | +Description: Sediq |
4850 | +Description: Seediq |
4851 | Description: Taroko |
4852 | Added: 2009-07-29 |
4853 | %% |
4854 | @@ -36432,6 +36555,11 @@ Description: Ughele |
4855 | Added: 2009-07-29 |
4856 | %% |
4857 | Type: language |
4858 | +Subtag: ugh |
4859 | +Description: Kubachi |
4860 | +Added: 2022-02-25 |
4861 | +%% |
4862 | +Type: language |
4863 | Subtag: ugn |
4864 | Description: Ugandan Sign Language |
4865 | Added: 2009-07-29 |
4866 | @@ -36742,6 +36870,11 @@ Deprecated: 2015-02-12 |
4867 | Preferred-Value: ema |
4868 | %% |
4869 | Type: language |
4870 | +Subtag: uon |
4871 | +Description: Kulon |
4872 | +Added: 2022-02-25 |
4873 | +%% |
4874 | +Type: language |
4875 | Subtag: upi |
4876 | Description: Umeda |
4877 | Added: 2009-07-29 |
4878 | @@ -36944,6 +37077,8 @@ Type: language |
4879 | Subtag: uun |
4880 | Description: Kulon-Pazeh |
4881 | Added: 2009-07-29 |
4882 | +Deprecated: 2022-02-25 |
4883 | +Comments: see pzh, uon |
4884 | %% |
4885 | Type: language |
4886 | Subtag: uur |
4887 | @@ -37714,6 +37849,11 @@ Description: Wadikali |
4888 | Added: 2013-09-10 |
4889 | %% |
4890 | Type: language |
4891 | +Subtag: wdt |
4892 | +Description: Wendat |
4893 | +Added: 2022-02-25 |
4894 | +%% |
4895 | +Type: language |
4896 | Subtag: wdu |
4897 | Description: Wadjigu |
4898 | Added: 2009-07-29 |
4899 | @@ -38348,6 +38488,7 @@ Type: language |
4900 | Subtag: wrd |
4901 | Description: Warduji |
4902 | Added: 2009-07-29 |
4903 | +Deprecated: 2022-02-25 |
4904 | %% |
4905 | Type: language |
4906 | Subtag: wrg |
4907 | @@ -38613,6 +38754,8 @@ Type: language |
4908 | Subtag: wya |
4909 | Description: Wyandot |
4910 | Added: 2009-07-29 |
4911 | +Deprecated: 2022-02-25 |
4912 | +Comments: see wdt, wyn |
4913 | %% |
4914 | Type: language |
4915 | Subtag: wyb |
4916 | @@ -38630,6 +38773,11 @@ Description: Wymysorys |
4917 | Added: 2009-07-29 |
4918 | %% |
4919 | Type: language |
4920 | +Subtag: wyn |
4921 | +Description: Wyandot |
4922 | +Added: 2022-02-25 |
4923 | +%% |
4924 | +Type: language |
4925 | Subtag: wyr |
4926 | Description: Wayoró |
4927 | Added: 2009-07-29 |
4928 | @@ -38936,6 +39084,11 @@ Description: Kwandu |
4929 | Added: 2017-02-23 |
4930 | %% |
4931 | Type: language |
4932 | +Subtag: xdq |
4933 | +Description: Kaitag |
4934 | +Added: 2022-02-25 |
4935 | +%% |
4936 | +Type: language |
4937 | Subtag: xdy |
4938 | Description: Malayic Dayak |
4939 | Added: 2009-07-29 |
4940 | @@ -39079,6 +39232,11 @@ Added: 2009-07-29 |
4941 | Macrolanguage: lah |
4942 | %% |
4943 | Type: language |
4944 | +Subtag: xhm |
4945 | +Description: Middle Khmer (1400 to 1850 CE) |
4946 | +Added: 2022-02-25 |
4947 | +%% |
4948 | +Type: language |
4949 | Subtag: xhr |
4950 | Description: Hernican |
4951 | Added: 2009-07-29 |
4952 | @@ -39215,6 +39373,7 @@ Added: 2009-07-29 |
4953 | %% |
4954 | Type: language |
4955 | Subtag: xkk |
4956 | +Description: Kachok |
4957 | Description: Kaco' |
4958 | Added: 2009-07-29 |
4959 | %% |
4960 | @@ -39469,6 +39628,7 @@ Macrolanguage: mg |
4961 | %% |
4962 | Type: language |
4963 | Subtag: xmx |
4964 | +Description: Salawati |
4965 | Description: Maden |
4966 | Added: 2009-07-29 |
4967 | %% |
4968 | @@ -41728,6 +41888,12 @@ Added: 2009-07-29 |
4969 | Macrolanguage: zap |
4970 | %% |
4971 | Type: language |
4972 | +Subtag: zcd |
4973 | +Description: Las Delicias Zapotec |
4974 | +Added: 2022-02-25 |
4975 | +Macrolanguage: zap |
4976 | +%% |
4977 | +Type: language |
4978 | Subtag: zch |
4979 | Description: Central Hongshuihe Zhuang |
4980 | Added: 2009-07-29 |
4981 | @@ -42700,6 +42866,13 @@ Prefix: ar |
4982 | Macrolanguage: ar |
4983 | %% |
4984 | Type: extlang |
4985 | +Subtag: ajs |
4986 | +Description: Algerian Jewish Sign Language |
4987 | +Added: 2022-02-25 |
4988 | +Preferred-Value: ajs |
4989 | +Prefix: sgn |
4990 | +%% |
4991 | +Type: extlang |
4992 | Subtag: apc |
4993 | Description: North Levantine Arabic |
4994 | Added: 2009-07-29 |
4995 | @@ -43104,6 +43277,13 @@ Preferred-Value: dsl |
4996 | Prefix: sgn |
4997 | %% |
4998 | Type: extlang |
4999 | +Subtag: dsz |
5000 | +Description: Mardin Sign Language |
The diff has been truncated for viewing.