From bf694b3085fa97c2f7f94473b652f84f28048d52 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Sun, 3 Mar 2019 13:00:27 +1100 Subject: [PATCH] cxx: use PIC by default so we can produce dynamic libraries --- nc_cxx.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/nc_cxx.cmake b/nc_cxx.cmake index 99575fa..b41d1a7 100644 --- a/nc_cxx.cmake +++ b/nc_cxx.cmake @@ -76,6 +76,7 @@ add_definitions("-Drestrict=${RESTRICT_KEYWORD}") append_compile_flag("-pipe") append_compile_flag("-fno-deduce-init-list") append_compile_flag("-fvisibility=hidden") +append_compile_flag("-fPIC") append_compile_flag("-D__STDC_FORMAT_MACROS")