Bump to 0.7.27
[platform/upstream/libsolv.git] / packaging / add_pie_compile_option.patch
1 diff --git a/examples/solv/CMakeLists.txt b/examples/solv/CMakeLists.txt
2 index 0f3bd47..e360f2d 100644
3 --- a/examples/solv/CMakeLists.txt
4 +++ b/examples/solv/CMakeLists.txt
5 @@ -1,3 +1,5 @@
6 +SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
7 +SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
8
9  ADD_EXECUTABLE (solv solv.c
10  checksig.c
11 diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
12 index f19030e..93632e3 100644
13 --- a/tools/CMakeLists.txt
14 +++ b/tools/CMakeLists.txt
15 @@ -10,6 +10,9 @@ ENDIF ()
16
17  SET (tools_list testsolv mergesolv dumpsolv installcheck testsolv)
18
19 +SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
20 +SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
21 +
22  IF (ENABLE_RPMDB)
23  ADD_EXECUTABLE (rpmdb2solv rpmdb2solv.c)
24  TARGET_LINK_LIBRARIES (rpmdb2solv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES})