Skip to content

cmake flag USE_HARDENING is effectively ignored #1380

Open
@mjstahlberg

Description

@mjstahlberg

I believe

	if (USE_HARDENING OR NOT MINGW)
		# MinGW with _FORTIFY_SOURCE and without -fstack-protector
		# causes unsatisfied dependency on libssp.
		# https://github.com/msys2/MINGW-packages/issues/5868
		set_c_cxx_flag("-D_FORTIFY_SOURCE=2" RELEASE)
		set_c_cxx_flag("-D_FORTIFY_SOURCE=2" RELWITHDEBINFO)
		set_c_cxx_flag("-D_FORTIFY_SOURCE=2" MINSIZEREL)
		# Don't set _FORTIFY_SOURCE in debug builds.
	endif()

should rather begin with if (USE_HARDENING AND NOT MINGW) in DaemonFlags.cmake.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions