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

IPHONE: Fix building with recent cross-compiled SDK #2584

Merged
merged 3 commits into from Nov 1, 2020

Conversation

@lephilousophe
Copy link
Member

@lephilousophe lephilousophe commented Oct 30, 2020

This PR contains several little fixes to the Makefile based build system which are needed for my iPhone toolchain.

  • defines are updated to match what's done in create_project for Xcode in ios7 platform
  • When configure script don't find SDL but SDL_Net (when it is patched to not depend on SDL), don't try to link with SDL.
  • Link against Security framework when linking with curl statically, in the case curl uses DarwinSSL.

These changes shouldn't affect existing buildbot toolchain except maybe the first one.

It's what is used in Xcode project files generated by create_project
SDL_Net can be compiled without the need of SDL so avoid linking with
it.
Define WITHOUT_SDL as it's done (for nothing) in create_project
That lets static curl libraries make use of DarwinSSL instead of OpenSSL
@lephilousophe lephilousophe requested a review from criezy Oct 30, 2020
@criezy
criezy approved these changes Oct 30, 2020
Copy link
Member

@criezy criezy left a comment

I always use Xcode to compile the iOS bundle and never tried to do it with the command line. But the changes here seem to make sense and are consistent with changes I needed to make to create_project.

The only change that could maybe be problematic is that this PR seems to also add -framework Security to the macOS build (and not just to the iOS build) when building with libcurl. However I don't think this is an issue. Currently we don't explicitly link with the Security framework for macOS, and it works, but maybe we actually should as libcurl has a dependency to it on macOS as well.

@lephilousophe
Copy link
Member Author

@lephilousophe lephilousophe commented Oct 31, 2020

I suppose -framework Security isn't needed on MacOS today as we link against the dynamic libcurl present in SDK.
As it's dynamic, linking information to Security is in the library and we don't need to provide it.
On iPhone, SDK doesn't provide libcurl and I built a static version (current buildbot doesn't have any library).
I checked that Security framework is present since MacOS 10 and iOS 3 so it should be safe to link with it even if we don't need it. Linker will decide but shouldn't error because it's missing.

@lephilousophe
Copy link
Member Author

@lephilousophe lephilousophe commented Nov 1, 2020

Merging now

@lephilousophe lephilousophe merged commit f3e00fb into scummvm:master Nov 1, 2020
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deepcode-ci-bot Well done, no issues found!
Details
@lephilousophe lephilousophe deleted the lephilousophe:update-iphone branch Nov 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.