File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,11 @@ PROTOC := $(shell which protoc 2>/dev/null || echo /tmp/protoc/bin/protoc)
99
1010# Path to GCC's libstdc++ for release linking with Zig.
1111# 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++)
1215GCC_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 ) )
1317
1418# --- Main Targets ---
1519.PHONY : all test test-rust bench bench-rust clean release ensure-protoc fmt
@@ -94,7 +98,7 @@ release: clean
9498 @make release-build TARGET=aarch64-unknown-linux-gnu ZIG_TARGET=aarch64-linux-gnu \
9599 GOOS=linux GOARCH=arm64 \
96100 BUILD_CC="zig cc -target aarch64-linux-gnu" BUILD_CXX="zig c++ -target aarch64-linux-gnu" \
97- CGO_LDFLAGS="-L$(CURDIR)/native/compute/target/aarch64-unknown-linux-gnu/release -lkektordb_compute -ldl -lm -lgcc_s -lc -lpthread -L$(GCC_LIBSTDCPP_DIR ) -lstdc++"
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++"
98102
99103 # Windows AMD64 (cross-compile with Zig)
100104 @make release-build TARGET=x86_64-pc-windows-gnu ZIG_TARGET=x86_64-windows-gnu \
You can’t perform that action at this time.
0 commit comments