From d5397db725175056747e449b39c9fb64a8d031e3 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 29 Jun 2024 11:51:05 +1100 Subject: [PATCH] also look in sysroot --- recipe/meta.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 25e087b..6cae741 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -325,7 +325,10 @@ outputs: - test -f ${PREFIX}/bin/{{ old_triplet }}-g++ - test -f ${PREFIX}/bin/{{ triplet }}-g++ - CXX=$(${PREFIX}/bin/*-gcc -dumpmachine)-g++ - - export LDFLAGS="$LDFLAGS -ldl" # [linux] + - export SYSROOT_LIB="$PREFIX/x86_64-conda-linux-gnu/sysroot/lib64" # [linux64] + - export SYSROOT_LIB="$PREFIX/aarch64-conda-linux-gnu/sysroot/lib64" # [aarch64] + - export SYSROOT_LIB="$PREFIX/powerpc64le-conda-linux-gnu/sysroot/lib64" # [ppc64le] + - export LDFLAGS="$LDFLAGS -L$SYSROOT_LIB -Wl,-rpath,$SYSROOT_LIB -ldl" # [linux] - ${CXX} -Wall tests/aligned_alloc.cpp -c -o cpp_aligned.o --std=c++17 # [cross_target_platform != "win-64"] - ${CXX} -Wall ${LDFLAGS} cpp_aligned.o -o cpp_aligned --std=c++17 && ./cpp_aligned # [cross_target_platform == target_platform and cross_target_platform != "win-64"] - ${CXX} -Wall tests/hello_world.cpp -c -o hello_world.o --std=c++17