From: Casey Bodley Date: Fri, 4 Feb 2022 14:51:24 +0000 (-0500) Subject: ceph.spec.in: seastar drops _FORTIFY_SOURCE from CFLAGS also X-Git-Tag: v17.2.0~18^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9be2e210384d073a9032a548ade4e1ce236b5cd8;p=ceph.git ceph.spec.in: seastar drops _FORTIFY_SOURCE from CFLAGS also the arrow submodule builds some C sources that trip up on _FORTIFY_SOURCE in debug builds [ 79%] Building C object src/arrow/CMakeFiles/arrow_objlib.dir/vendored/musl/strptime.c.o In file included from /usr/include/time.h:25, from /home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/17.0.0-10531-gc73e1fda/rpm/el8/BUILD/ceph-17.0.0-10531-gc73e1fda/src/arrow/cpp/src/arrow/vendored/strptime.h:20, from /home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/17.0.0-10531-gc73e1fda/rpm/el8/BUILD/ceph-17.0.0-10531-gc73e1fda/src/arrow/cpp/src/arrow/vendored/musl/strptime.c:4: /usr/include/features.h:381:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp] 381 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O) | ^~~~~~~ cc1: all warnings being treated as errors make[5]: *** [src/arrow/CMakeFiles/arrow_objlib.dir/build.make:2543: src/arrow/CMakeFiles/arrow_objlib.dir/vendored/musl/strptime.c.o] Error 1 Signed-off-by: Casey Bodley (cherry picked from commit 2d80f0cd258df65cdba6f1bb4115f7797e9e5677) --- diff --git a/ceph.spec.in b/ceph.spec.in index d1e221709897..bc2c9a8e08fc 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -1247,6 +1247,9 @@ export LDFLAGS="$RPM_LD_FLAGS" %if 0%{with seastar} # seastar uses longjmp() to implement coroutine. and this annoys longjmp_chk() export CXXFLAGS=$(echo $RPM_OPT_FLAGS | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//g') +# remove from CFLAGS too because it causes the arrow submodule to fail with: +# warning _FORTIFY_SOURCE requires compiling with optimization (-O) +export CFLAGS=$(echo $RPM_OPT_FLAGS | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//g') %endif env | sort