Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove -U_FORTIFY_SOURCE from cmake #166

Closed
PetrusZ opened this issue Dec 31, 2022 · 2 comments
Closed

remove -U_FORTIFY_SOURCE from cmake #166

PetrusZ opened this issue Dec 31, 2022 · 2 comments

Comments

@PetrusZ
Copy link

PetrusZ commented Dec 31, 2022

set( CMAKE_C_FLAGS "-DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -Wall ${CMAKE_C_FLAGS}" )

FORTIFY_SOURCE is a GCC and GLIBC security feature that attempts to detect certain classes of buffer overflows. Its enabled by default on most Linux platforms.

It can be turned off with -D_FORTIFY_SOURCE=0 or -U_FORTIFY_SOURCE. However, its usually not appropriate to disable FORTIFY_SOURCE in production software.

I did a basic test, after removing -U_FORTIFY_SOURCE, uxplay builds success and it is running normally too.

See also:

  1. https://bugs.gentoo.org/889044 (detail is in the attachment)
  2. https://stackoverflow.com/tags/fortify-source/info
@fduncanh
Copy link
Collaborator

OK
I removed --U_FORTIFY_SOURCE and re-released 1.61 as 1.61.1

If necessary I'll release it as 1.62 later if 1.61.1 messes up Arch or Debian releases

@PetrusZ
Copy link
Author

PetrusZ commented Jan 1, 2023

Thank you, again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants