pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
wip/hawk-scheme: Fix "hawk --exe" compiler.
Module Name: pkgsrc-wip
Committed By: Yorick Hardy <yorickhardy%gmail.com@localhost>
Pushed By: yhardy
Date: Fri Jul 24 21:48:27 2026 +0000
Changeset: a4efaeda85128a7faaba918a2515a0d29f27dde8
Modified Files:
hawk-scheme/Makefile
hawk-scheme/PLIST
hawk-scheme/distinfo
hawk-scheme/patches/patch-CMakeLists.txt
Log Message:
wip/hawk-scheme: Fix "hawk --exe" compiler.
The compiler needs clang with the correct library paths.
The executable still needs "paxctl +m", which is not
fixed yet.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=a4efaeda85128a7faaba918a2515a0d29f27dde8
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
hawk-scheme/Makefile | 9 +++++++++
hawk-scheme/PLIST | 1 +
hawk-scheme/distinfo | 2 +-
hawk-scheme/patches/patch-CMakeLists.txt | 14 ++++++++++++--
4 files changed, 23 insertions(+), 3 deletions(-)
diffs:
diff --git a/hawk-scheme/Makefile b/hawk-scheme/Makefile
index 46eaaf5ff8..8e25abba7b 100644
--- a/hawk-scheme/Makefile
+++ b/hawk-scheme/Makefile
@@ -20,8 +20,17 @@ PKGSRC_COMPILER= clang
USE_LANGUAGES+= c c++
CMAKE_CONFIGURE_ARGS+= -DBOOTSTRAP=ON
+CMAKE_CONFIGURE_ARGS+= -DPKGSRCLDFLAGS="-L${PREFIX}/lib -Wl,-rpath -Wl,${PREFIX}/lib"
NOT_PAX_MPROTECT_SAFE+= bin/hawk
+INSTALLATION_DIRS+= libexec
+SH_ARG_LIST= $$@
+
+post-install:
+ ${ECHO} "#/bin/sh" > ${WRKSRC}/hawk-cc
+ ${ECHO} >> ${WRKSRC}/hawk-cc
+ ${ECHO} "exec ${PREFIX}/bin/clang -L${PREFIX}/lib -Wl,-rpath -Wl,${PREFIX}/lib \"${SH_ARG_LIST:Q}\"" >> ${WRKSRC}/hawk-cc
+ ${INSTALL_SCRIPT} ${WRKSRC}/hawk-cc ${DESTDIR}${PREFIX}/libexec/hawk-cc
.include "../../archivers/zstd/buildlink3.mk"
.include "../../devel/capstone/buildlink3.mk"
diff --git a/hawk-scheme/PLIST b/hawk-scheme/PLIST
index 97ca13f4a3..e4bd31f816 100644
--- a/hawk-scheme/PLIST
+++ b/hawk-scheme/PLIST
@@ -1,6 +1,7 @@
@comment $NetBSD$
bin/hawk
lib/libhawk_core.so
+libexec/hawk-cc
man/man1/hawk.1
share/hawk/srfi/1.sld
share/hawk/srfi/69.sld
diff --git a/hawk-scheme/distinfo b/hawk-scheme/distinfo
index 917ca01fc0..f998a2d59e 100644
--- a/hawk-scheme/distinfo
+++ b/hawk-scheme/distinfo
@@ -3,6 +3,6 @@ $NetBSD$
BLAKE2s (hawk-v0.9.tar.gz) = f4343e27f91cf99d63c7965e0280657c1f55d7a3c92319daaa08293660f2aa7b
SHA512 (hawk-v0.9.tar.gz) = 5dae5ea680ceef361c0ba9afd07489d390fc06b9717450765aa9c31caf68540e9f58edfc0ea954426750494086f9ef630a46893e5bf6a68ee7ce7d7eb219cc29
Size (hawk-v0.9.tar.gz) = 2789298 bytes
-SHA1 (patch-CMakeLists.txt) = ab59222e3ff2b9cffa2aabea122d05c25384f180
+SHA1 (patch-CMakeLists.txt) = a9fc0a58bbf65f75d292579b190279491f8dcad0
SHA1 (patch-jitdump.c) = acac908df4817cba5acc51801aa2f0e8f4f81d7b
SHA1 (patch-runtime.c) = fcfe2470936847406db3a4fd3e44ed549e4d3476
diff --git a/hawk-scheme/patches/patch-CMakeLists.txt b/hawk-scheme/patches/patch-CMakeLists.txt
index 75ceb08c60..544aa030ad 100644
--- a/hawk-scheme/patches/patch-CMakeLists.txt
+++ b/hawk-scheme/patches/patch-CMakeLists.txt
@@ -7,7 +7,11 @@ bootstrap phase.
The bootstrap JIT needs "paxctl +m", so run the command if paxctl
is found.
---- CMakeLists.txt.orig 2026-07-24 19:38:51.163002743 +0000
+Use the clang as the C compiler, not the build time "cc".
+
+Add library search paths when generating executables.
+
+--- CMakeLists.txt.orig 2026-07-06 21:42:40.000000000 +0000
+++ CMakeLists.txt
@@ -157,8 +157,17 @@ if(BOOTSTRAP)
add_library(hawk_image_bootstrap OBJECT hawk_image.c)
@@ -29,7 +33,7 @@ is found.
endif()
# fold generator
set(gen_fold_target gen_fold)
-@@ -250,8 +259,17 @@ if(BOOTSTRAP)
+@@ -250,13 +259,22 @@ if(BOOTSTRAP)
target_link_libraries(hawk PRIVATE hawk_core)
target_link_options(hawk PRIVATE ${HAWK_EXE_EXPORT_FLAG})
if(BOOTSTRAP)
@@ -48,3 +52,9 @@ is found.
endif()
target_compile_definitions(
+ hawk_core PRIVATE
+- HAWK_CC="${CMAKE_C_COMPILER}"
++ HAWK_CC="${CMAKE_INSTALL_PREFIX}/libexec/hawk-cc"
+ HAWK_CORE_LIB="-lhawk_core"
+ HAWK_EXE_EXPORT_FLAG="${HAWK_EXE_EXPORT_FLAG}"
+ HAWK_DEFAULT_LIBRARY_PATH="${CMAKE_INSTALL_FULL_DATADIR}/hawk"
Home |
Main Index |
Thread Index |
Old Index