mirror of
https://github.com/ceph/ceph
synced 2025-01-14 06:53:11 +00:00
cmake: build liburing with -fPIC
in liburing,75cad68b95
partially reverts4e360f7113
, which builds liburing.a with -fPIC. so we need to pass -fPIC by ourselves. otherwise we'd have /usr/bin/ld: ../../liburing/src/liburing.a(setup.ol): relocation R_X86_64_PC32 against symbol `io_uring_queue_mmap' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status src/test/fio/CMakeFiles/fio_ceph_objectstore.dir/build.make:154: recipe for target 'lib/libfio_ceph_objectstore.so' failed Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
8e7b9f27c6
commit
3510433f9c
@ -18,7 +18,7 @@ function(build_uring)
|
||||
ExternalProject_Add(liburing_ext
|
||||
${source_dir_args}
|
||||
CONFIGURE_COMMAND <SOURCE_DIR>/configure
|
||||
BUILD_COMMAND env CC=${CMAKE_C_COMPILER} ${make_cmd} -C src -s
|
||||
BUILD_COMMAND env CC=${CMAKE_C_COMPILER} "CFLAGS=${CMAKE_C_FLAGS} -fPIC" ${make_cmd} -C src -s
|
||||
BUILD_IN_SOURCE 1
|
||||
BUILD_BYPRODUCTS "<SOURCE_DIR>/src/liburing.a"
|
||||
INSTALL_COMMAND "")
|
||||
|
Loading…
Reference in New Issue
Block a user