depot/third_party/nixpkgs/pkgs/development/compilers/ponyc/fix-libstdcpp-path.patch

15 lines
775 B
Diff
Raw Normal View History

diff --git a/src/libponyc/CMakeLists.txt b/src/libponyc/CMakeLists.txt
index bf2c385e..11d0d619 100644
--- a/src/libponyc/CMakeLists.txt
+++ b/src/libponyc/CMakeLists.txt
@@ -136,7 +136,7 @@ elseif(${CMAKE_HOST_SYSTEM_NAME} MATCHES "DragonFly")
else()
# add a rule to generate the standalone library if needed
add_custom_command(OUTPUT libponyc-standalone.a
- COMMAND cp `find /usr/lib/ -name 'libstdc++.a' -print -quit` libstdcpp.a
+ COMMAND cp `${CMAKE_CXX_COMPILER} --print-file-name='libstdc++.a'` libstdcpp.a
COMMAND echo "create libponyc-standalone.a" > standalone.mri
COMMAND echo "addlib ${PROJECT_SOURCE_DIR}/../../build/libs/lib/libblake2.a" >> standalone.mri
COMMAND echo "addlib libstdcpp.a" >> standalone.mri