Skip to content

Commit

Permalink
fix: recompile with fPIC for libgrand-search-daemon
Browse files Browse the repository at this point in the history
Fix build on 64bit arch

Log: The compiler may report an error and exit, the error is like this:
 /usr/lib64/gcc/aarch64-suse-linux/13/../../../../aarch64-suse-linux/bin/ld: /tmp/ccNUyrNk.ltrans0.ltrans.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `db_list_insert_node' which may bind externally can not be used when making a shared object; recompile with -fPIC
  • Loading branch information
hillwoodroc committed Nov 19, 2023
1 parent f66f34a commit a480003
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libgrand-search-daemon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set(CMAKE_CXX_STANDARD 14)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE -pie")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE -pie -fPIC")

# 设置库名
set(LIB_NAME ${DAEMON_LIB_NAME})
Expand Down

0 comments on commit a480003

Please sign in to comment.