Re: [hatari-devel] Enabling _FORTIFY_SOURCE for Debug builds?

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


On 05/04/2024 10.12, Thorsten Otto wrote:
Hi,


there was a change some months ago enabling _FORTIFY_SOURCE also for debug builds. That now gives *lots* of warnings:


/usr/include/features.h:414:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]

   414 | #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)

       |    ^~~~~~~

Hatari debug builds should still use at least -O1, we've got this in the main CMakeLists.txt:

# Building Hatari w/o optimization is no fun...
IF (CMAKE_BUILD_TYPE STREQUAL "Debug")
        set(CMAKE_C_FLAGS "-O ${CMAKE_C_FLAGS}")
ENDIF (CMAKE_BUILD_TYPE STREQUAL "Debug")

So why does this not apply to your build?

 Thomas




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/