From fb4946dcb506f0e8492ef67acf692a6dab5f227e Mon Sep 17 00:00:00 2001 From: Hillwood Yang Date: Fri, 6 Feb 2026 22:28:37 +0800 Subject: [PATCH] fix(cmake): drop -pie from global link options -pie forces building PIE executables and breaks shared library linking on ppc64le, resulting in undefined reference to main. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e31b2bd..3216983 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) # 安全编译选项 add_compile_options(-fstack-protector-strong -D_FORTITY_SOURCE=1) -add_link_options(-z noexecstack -pie -fPIC) +add_link_options(-z noexecstack -fPIC) # 设置安装路径 include(GNUInstallDirs)