From 08b8bdbfed399fbed30ba34d0d34253f8e3120bf Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Mon, 17 Jun 2024 23:46:43 -0400 Subject: [PATCH] fix(pkl) exclude linux/x86-64 for now (PIC/segfault issues) --- projects/pkl-lang.org/package.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/projects/pkl-lang.org/package.yml b/projects/pkl-lang.org/package.yml index 8e55eb08..7bab36f2 100644 --- a/projects/pkl-lang.org/package.yml +++ b/projects/pkl-lang.org/package.yml @@ -5,6 +5,10 @@ distributable: versions: github: apple/pkl +platforms: + - darwin + - linux/aarch64 # can't resolve the segfault on x86-64 (PIC, almost certainly) + companions: openjdk.org: '*' @@ -21,10 +25,15 @@ build: sed -i '/-H:Class=org.pkl.cli.Main/i\ ,"--static"\ ,"--native-compiler-path={{deps.llvm.org.prefix}}/bin/clang"\ - ,"-H:CCompilerOption=-fPIC"\ - ,"-H:CCompilerOption=-Wl,-pie,-L{{deps.zlib.net.prefix}}/lib"\ + ,"-H:CCompilerOption=-Wl,-L{{deps.zlib.net.prefix}}/lib"\ ,"-H:-CheckToolchain"' \ pkl-cli.gradle.kts + if test "{{hw.arch}}" = "x86-64"; then + sed -i '/-H:Class=org.pkl.cli.Main/i\ + ,"-H:CCompilerOption=-fPIC"\ + ,"-H:CCompilerOption=-Wl,-pie"' \ + pkl-cli.gradle.kts + fi fi if: <0.26.0 working-directory: pkl-cli @@ -33,10 +42,15 @@ build: sed -i '/-H:Class=org.pkl.cli.Main/i\ add("--static")\ add("--native-compiler-path={{deps.llvm.org.prefix}}/bin/clang")\ - add("-H:CCompilerOption=-fPIC")\ - add("-H:CCompilerOption=-Wl,-pie,-L{{deps.zlib.net.prefix}}/lib")\ + add("-H:CCompilerOption=-Wl,-L{{deps.zlib.net.prefix}}/lib")\ add("-H:-CheckToolchain")' \ pkl-cli.gradle.kts + if test "{{hw.arch}}" = "x86-64"; then + sed -i '/-H:Class=org.pkl.cli.Main/i\ + add("-H:CCompilerOption=-fPIC")\ + add("-H:CCompilerOption=-Wl,-pie")' \ + pkl-cli.gradle.kts + fi fi if: '>=0.26.0' working-directory: pkl-cli