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



##########
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:
       > Don't you think that it is strange that the RHEL 7 compile line first 
does -D_FORTIFY_SOURCE=2 and then later on does -U_FORTIFY_SOURCE.
   
   That is the result of line 24 right here in 
`[ests/c_unittests/CMakeLists.txt`. What I find strange is that the 
_FORTIFY_SOURCE is actually not undefined by this. Maybe the `-Wp,` has some 
strange powers?
   
   > In any case, does any of the upstream CI builds use the 
`-D_FORTIFY_SOURCE`?
   
   Ubuntu in Travis CI, because Ubuntu enables _FORTIFY_SOURCE with -O1 or 
higher by default, at least according to 
https://stackoverflow.com/questions/34907503/gcc-fread-chk-warn-warning.




-- 
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