From c2b9a63fc966db2d1a5199ab779a4e79f7d9f50f Mon Sep 17 00:00:00 2001 From: Stewart X Addison Date: Thu, 5 Oct 2023 18:15:11 +0100 Subject: [PATCH] Move capstone detection and configargs back to linux.sh Signed-off-by: Stewart X Addison --- .../platform-specific-configurations/linux.sh | 4 ++-- sbin/build.sh | 15 --------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/build-farm/platform-specific-configurations/linux.sh b/build-farm/platform-specific-configurations/linux.sh index a7215aa02..fb80fc020 100755 --- a/build-farm/platform-specific-configurations/linux.sh +++ b/build-farm/platform-specific-configurations/linux.sh @@ -338,9 +338,9 @@ elif [ -r /usr/bin/gcc-7 ]; then [ -r /usr/bin/g++-7 ] && export CXX=/usr/bin/g++-7 fi -if [ "$JAVA_FEATURE_VERSION" -ge 20 ]; then +if [ "$JAVA_FEATURE_VERSION" -ge 20 -a "${ARCHITECTURE}" = "x64" -o "${ARCHITECTURE}" = "aarch64" -a "${VARIANT}" == "${BUILD_VARIANT_TEMURIN}" ]; then if [ -r /usr/local/lib/libcapstone.so.4 ]; then - export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --with-capstone=/usr/local" + export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --enable-hsdis-bundling --with-hsdis=capstone --with-capstone=/usr/local" fi fi diff --git a/sbin/build.sh b/sbin/build.sh index d4cd3d445..64dc87e38 100755 --- a/sbin/build.sh +++ b/sbin/build.sh @@ -90,20 +90,6 @@ configureShenandoahBuildParameter() { fi } -# capstone disassembler support is available in JDK19+ -configureCapstoneBuildParameter() { - if [[ "${BUILD_CONFIG[OPENJDK_FEATURE_NUMBER]}" -ge 19 && "${BUILD_CONFIG[OS_KERNEL_NAME]}" = "linux" ]]; then - # Ref: https://github.com/adoptium/jdk21/blob/c86f4dea9529640cd3234c5cad2f36f3201b1385/make/Hsdis.gmk#L45 - if [ "${ARCHITECTURE}" = "x64" -o "${ARCHITECTURE}" = "aarch64" ]; then - echo Configuring with hsdis capstone bundling support - addConfigureArg "--enable-hsdis-bundling" "" - addConfigureArg "--with-hsdis=" "capstone" - addConfigureArg "--with-capstone=" "/usr/local" - else - echo Not configuring with hsdis/capstone support as we are not building on x64 or aarch64 - fi - fi -} # Configure reproducible build # jdk-17 and jdk-19+ support reproducible builds configureReproducibleBuildParameter() { @@ -577,7 +563,6 @@ configureZlibLocation() { configureCommandParameters() { configureVersionStringParameter configureBootJDKConfigureParameter - configureCapstoneBuildParameter configureShenandoahBuildParameter configureMacOSCodesignParameter configureDebugParameters