jiridanek commented on a change in pull request #1514:
URL: https://github.com/apache/qpid-dispatch/pull/1514#discussion_r804108337



##########
File path: tests/c_unittests/CMakeLists.txt
##########
@@ -20,7 +20,7 @@
 # -fno-inline: just to be extra sure, no particular reason so far
 # -fno-builtin: GCC would optimize e.g. abs() and we would not be able to stub
 # -fno-stack-protector: 
https://stackoverflow.com/questions/12201625/disable-using-sprintf-chk
-# -D_FORTIFY_SOURCE=0: for Ubuntu with -O1+, 
https://stackoverflow.com/questions/34907503/gcc-fread-chk-warn-warning
+# -U_FORTIFY_SOURCE: for Ubuntu with -O1+, 
https://stackoverflow.com/questions/34907503/gcc-fread-chk-warn-warning
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_STANDARD_FLAGS} -fno-inline 
-fno-builtin -fno-stack-protector -U_FORTIFY_SOURCE")

Review comment:
       It tries to do that, for the test binary only. It worked for the Ubuntu 
jobs here in the GHA, but it does not work for RHEL 7. Maybe because the 
`rpmbuild` adds its flags in some very smart way? The compile line on RHEL 7 is
   
   > cd /mnt/build/BUILD/qpid-dispatch-1.19.0/tests/c_unittests && /usr/bin/c++ 
  -D__STDC_NO_ATOMICS__ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 
-mtune=generic  -std=c++11 -fno-inline -fno-builtin -fno-stack-protector 
-U_FORTIFY_SOURCE  -O2 -g -DNDEBUG 
-I/mnt/build/BUILD/qpid-dispatch-1.19.0/include -I/usr/include/python3.6m 
-I/mnt/build/BUILD/qpid-dispatch-1.19.0/src 
-I/mnt/build/BUILD/qpid-dispatch-1.19.0/tests/cpp-stub    -Wall -Wextra -Werror 
-Wpedantic -pedantic-errors -Wno-empty-body -Wno-implicit-fallthrough 
-Wno-unused-parameter -Wno-ignored-qualifiers -Wno-missing-field-initializers 
-Wno-sign-compare -Wno-type-limits -o 
CMakeFiles/c_unittests.dir/test_listener_startup.cpp.o -c 
/mnt/build/BUILD/qpid-dispatch-1.19.0/tests/c_unittests/test_listener_startup.cpp




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to