premake: add glibc detect and add dl back#2823
Conversation
|
I prefer the easy way since newer glibc provide empty libpthread.a and so on. |
always make |
| end | ||
|
|
||
| GLIBC_VERSION=0 | ||
| if os.ishost("linux") then |
There was a problem hiding this comment.
istarget may not work, because there may not be getconf GNU_LIBC_VERSION on non-Linux OSes. WIndows / Mac generating Linux would still not call this method.
if Linux generating other OSes, this function still works.
| if os.ishost("linux") then | ||
| GLIBC_VERSION = getGlibcVersion() | ||
| if GLIBC_VERSION>0 then | ||
| print("Detected glibc version: " .. string.format("%d.%d.%d", GLIBC_VERSION >> 16, (GLIBC_VERSION >> 8) & 0xFF, GLIBC_VERSION & 0xFF)) |
There was a problem hiding this comment.
2.34.0 is not actual version, it should be 2.34. btw I don't think it is necessary to print this.
There was a problem hiding this comment.
Not interested in detailed format, and this is for debugging only, just as the Rosetta thing.
You can do that when you distribute YGOPro. I think it is better to keep the code clean. |
#2815
broke on glibc < 2.34, so we have to detect glibc version