--- src/lib/arch/CMakeLists.txt.orig	2018-02-25 02:17:23 UTC
+++ src/lib/arch/CMakeLists.txt
@@ -40,5 +40,5 @@ endif()
 add_library(arch STATIC ${sources})
 
 if (UNIX)
-    target_link_libraries(arch dl ${libs})
+    target_link_libraries(arch ${CMAKE_DL_LIBS} ${libs})
 endif()
