draios / sysdig

Linux system exploration and troubleshooting tool with first class support for containers
http://www.sysdig.com/
Other
7.8k stars 728 forks source link

Remove `-pagezero_size 10000 -image_base 100000000` for Apple Silicon or LuaJIT 2.1 #1875

Closed cho-m closed 1 year ago

cho-m commented 2 years ago

https://github.com/draios/sysdig/blob/ba2ed7dfaf69b9f061c25c040b0a5c4df94b468a/CMakeLists.txt#L137-L139

These flags are not compatible with ARM64 and create non-functioning binaries on Apple Silicon. Originally seen when fixing Apple Silicon build in Homebrew (https://github.com/Homebrew/homebrew-core/pull/95846)

Also, the flags are not needed when using LuaJIT 2.1. Since only LuaJIT 2.1+ supports Apple Silicon that could be used as condition on whether flags should be added.


Not sure if there is an easy way to express in CMake scripts. If possible can try checking target architecture (x86_64 vs arm64) or check LuaJIT version (2.0 vs 2.1).

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

therealbobo commented 1 year ago

Thanks a lot! Closed with #1962 😄