Fix x64_86 build which exits with
authorKlaus Kaempf <kkaempf@suse.de>
Fri, 9 Nov 2007 12:38:15 +0000 (12:38 +0000)
committerKlaus Kaempf <kkaempf@suse.de>
Fri, 9 Nov 2007 12:38:15 +0000 (12:38 +0000)
 /usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../x86_64-suse-linux/bin/ld:
 /usr/local/src/svn/zypp/trunk/sat-solver/build/src/libsatsolver.a(bitmap.o):
 relocation R_X86_64_32 against a local symbol' can not be used when
 making a shared object; recompile with -fPIC
 /usr/local/src/svn/zypp/trunk/sat-solver/build/src/libsatsolver.a:
 could not read symbols: Bad value

src/CMakeLists.txt

index 6a908c1..6d8aec1 100644 (file)
@@ -6,7 +6,7 @@ ADD_LIBRARY(satsolver STATIC ${libsatsolver_SRCS})
 
 SET(libsatsolver_HEADERS bitmap.h evr.h hash.h policy.h poolarch.h poolvendor.h pool.h poolid.h pooltypes.h queue.h solvable.h solver.h repo.h repo_solv.h util.h )
 
-SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 -Wall" )
+SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 -Wall -fPIC" )
 
 INSTALL(  FILES ${libsatsolver_HEADERS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/satsolver" )
 INSTALL(TARGETS satsolver LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR})