Re: [hatari-devel] Enabling _FORTIFY_SOURCE for Debug builds? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Enabling _FORTIFY_SOURCE for Debug builds?
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Fri, 12 Apr 2024 18:17:47 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1712945869; bh=7Z0u5ePwJJ3/nLxOPOWeW1q0/6Hf97JybCpq+T4Lgfg=; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type: Content-Transfer-Encoding:From; b=iEvMl6KgoBvB+aqTlgm25k1Z423lvlj6Lh5FxmTCUjO9O1PrP2TIbm/QO0Q3xZgNc b4poW3w8/fmyaCYed/dotF22RBNPKgRcv6l55SxS+zfyE2EjzR5e9YTifhmCQukrYn wlhQOadiYkW/elDB+OmrsD4t8pnR1putW+zE0bYJHjtrY00dBWAvssnJ6i4m0E4Ieu b6f99ChvDiWiVBrOHRYV8yCmCbjde30LSapjQO2AlYe1bNm57bueYj81bbbowllxow 66kIEBLJTf/nlwIQoIOmEgiYju8cku3M0kw2A9cl9gAHXkfCG5nFlHtqHyn7qsj0lb mZ2lgatDwDVaA==
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