Conversation
There was a problem hiding this comment.
Is it possible to move this somewhere else to avoid polluting the root directory?
There was a problem hiding this comment.
Sure thing! I'd go for either the .github folder if GitHub doesn't mind or some other folder like .ci or something in that spirit.
Do you have a place in mind for it?
|
Nice work ! With your modifications I've been able to build Also I'm looking at how to build a linux arm64 version that uses SDL2 + OpenGLES2 without GLEW instead of SDL2 + OpenGL + GLEW. I'm thinking of that because I contribute a lot in PortMaster, a project where we port games to linux arm device (console mostly) which don't have a display manager (we use SDL2 KMS/DRM with GLES). Any tip on this will be highly welcome :) Again thanks @k8ieone for your work ! |
| add(Linux, x64){ | ||
| cppFlags += " " + execCmd("sdl2-config --cflags") | ||
| cFlags = cppFlags | ||
| //NOTE: for this to statically link properly, you need to add -L/path/to/folder/with/custom/libSDL2.a | ||
| //where this folder contains a custom build of SDL2 with the -fPIC flag (added to the makefile in the cflags section after configure) | ||
| //--static-libs and ?.replace("-lSDL2", "-l:libSDL2.a") | ||
| libraries = execCmd("sdl2-config --libs") + " -Wl,-Bdynamic -lGL " | ||
| linkerFlags = "-shared -m64" | ||
| } |
There was a problem hiding this comment.
Hey @k8ieone! I am looking into syncing your PR with upstream, and found this strange diff: you seem to have moved this gradle job lower in the file.
I just wanted to know if it is deliberate or just a mistake
There was a problem hiding this comment.
Yes, I think it was intentional. It looks like I reused the if(System.getProperty("os.arch") != "aarch64") condition that already existed for MacOS.
This PR adds support for building ARM64 Linux natives. All of the libraries except SDL2 are cross-compiled. SDL2 is built in an ARM Docker container emulated using QEMU user-mode emulation.
I made sure the changes won't interfere with compiling on x86. When compiling on x86 the SDL2 build is skipped.