]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cmake: build liburing with -fPIC 37990/head
authorKefu Chai <kchai@redhat.com>
Mon, 9 Nov 2020 09:08:35 +0000 (17:08 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 9 Nov 2020 09:10:59 +0000 (17:10 +0800)
commit3510433f9cf8f9558704ce3db8f4501705bc7675
tree32add4fa80a321317c367c4471e15297e71fb106
parent8e7b9f27c6160cf6e9734729f1753f45737913a4
cmake: build liburing with -fPIC

in liburing,
https://github.com/axboe/liburing/commit/75cad68b953fe0fabbc4b1ced1ab4ba0ed5da18e
partially reverts
https://github.com/axboe/liburing/commit/4e360f71131918c36774f51688e5c65dea8d43f2,
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>
cmake/modules/Builduring.cmake