@@ -7,14 +7,6 @@ RELEASE_DIR=release
77# Searches PATH first, falls back to a manually downloaded binary.
88PROTOC := $(shell which protoc 2>/dev/null || echo /tmp/protoc/bin/protoc)
99
10- # Path to GCC's libstdc++ for release linking with Zig.
11- # Zig's lld doesn't search the system GCC library path by default.
12- # Each target needs its own architecture-specific libstdc++:
13- # - AMD64 uses the host g++ path (native)
14- # - ARM64 uses the cross-compiler g++ path (aarch64-linux-gnu-g++)
15- GCC_LIBSTDCPP_DIR := $(shell dirname $$(g++ --print-file-name=libstdc++.a 2>/dev/null || echo /usr/lib ) )
16- GCC_AARCH64_LIBSTDCPP_DIR := $(shell dirname $$(aarch64-linux-gnu-g++ --print-file-name=libstdc++.a 2>/dev/null || echo /usr/lib ) )
17-
1810# --- Main Targets ---
1911.PHONY : all test test-rust bench bench-rust clean release ensure-protoc fmt
2012
@@ -94,11 +86,11 @@ release: clean
9486 BUILD_CC=" gcc" BUILD_CXX=" g++" \
9587 CGO_LDFLAGS=" -L$( CURDIR) /native/compute/target/x86_64-unknown-linux-gnu/release -lkektordb_compute -ldl -lm -lgcc_s -lc -lpthread -lstdc++"
9688
97- # Linux ARM64 (cross-compile with Zig )
89+ # Linux ARM64 (cross-compile with GNU cross-compiler )
9890 @make release-build TARGET=aarch64-unknown-linux-gnu ZIG_TARGET=aarch64-linux-gnu \
9991 GOOS=linux GOARCH=arm64 \
100- BUILD_CC="zig cc -target aarch64-linux-gnu" BUILD_CXX="zig c++ -target aarch64-linux-gnu" \
101- CGO_LDFLAGS="-L$(CURDIR)/native/compute/target/aarch64-unknown-linux-gnu/release -lkektordb_compute -ldl -lm -lgcc_s -lc -lpthread -L$(GCC_AARCH64_LIBSTDCPP_DIR) - lstdc++"
92+ BUILD_CC="aarch64-linux-gnu-gcc " BUILD_CXX="aarch64-linux-gnu-g++ " \
93+ CGO_LDFLAGS="-L$(CURDIR)/native/compute/target/aarch64-unknown-linux-gnu/release -lkektordb_compute -ldl -lm -lgcc_s -lc -lpthread -lstdc++"
10294
10395 # Windows AMD64 (cross-compile with Zig)
10496 @make release-build TARGET=x86_64-pc-windows-gnu ZIG_TARGET=x86_64-windows-gnu \
0 commit comments