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

WII: Fix compilation and runtime with latest version of devkitPPC #1872

Merged
merged 5 commits into from Oct 9, 2019

Conversation

@lephilousophe
Copy link
Member

commented Oct 2, 2019

This pull request lets ScummVM compile and run with the latest version of devkitPPC.
There are various fixes :

  • paths to portlibs directory are added as it's where 3rd party libraries are expected to be installed
  • -fpermissive is needed because reset_cb hasn't the expected signature. The proper way would be to fix the callback signature but I don't know how it would behave with an old toolchain.
  • time.h is included in recent versions of network.h and must be excluded from forbidden symbols list
  • Recent versions of GCC emits NONE relocations which prevents plugins to be loaded. Adding handling of them to elf-loader code make them work (and as it's a no-op it's easy to add).
  • Last commit was an attempt to fix a bug which ended up to be in libgxflux. It destroys everything (and close all files) before quitting. It's not really a needed commit to have everything working.

I am not sure we want to include this in next release as I only tested PR on Dolphin Emulator and not on a real hardware. I would also like a second look from someone who knows well the platform.

@lephilousophe lephilousophe requested review from ccawley2011 and dhewg Oct 2, 2019
Copy link
Member

left a comment

Oh, haven't looked at wii stuff in quite a while ;)
Looks good to me overall!
Are all dependencies available via portlibs? Wintermute showed interest in my good old libwiiflux at some point, is that available via pacman by now?

configure Outdated Show resolved Hide resolved
configure Outdated Show resolved Hide resolved
@lephilousophe

This comment has been minimized.

Copy link
Member Author

commented Oct 2, 2019

Hi,

Thanks for your report. I wasn't sure if I could bother you on Wii stuff because I noticed you moved to other stuff. 😄
Not all dependencies are available through pacman but there are some (libpng, libjpeg, libmad, libogg, libvorbisidec and freetype).
I didn't see libwiiflux in there but ScummVM uses libgxflux so didn't pay that much attention.

@dhewg

This comment has been minimized.

Copy link
Member

commented Oct 2, 2019

Yeah sorry, I meant libgxflux... so that's the only library not available via pacman? Is my old repo at https://repo.or.cz/w/libgxflux.git still used?

Nice to see someone giving this port some love, I don't even recall in which box my good old wii is stuffed in :)
And feel free to take over as wii/gc port maintainer!

@bluegr

This comment has been minimized.

Copy link
Member

commented Oct 2, 2019

Does this PR supersede the older PR #1291?

@lephilousophe

This comment has been minimized.

Copy link
Member Author

commented Oct 2, 2019

My bad, I didn't see that @ccawley2011 already did similar changes.
This PR has been somewhat tested and includes fixes to ELF loader.
I will try to improve my commits to avoid mandatory toolchain upgrade like in #1291 but without the -fpermissive fix.

Libraries provided by DevkitPPC are stored in these directories and
should be added to search paths
As network.h includes time.h, we must add this exception. We can't
include network.h before scummsys.h as inclusion depends on definitions
located in config.h which is loaded by scummsys.h.
It's used by recent versions of GCC in .eh_frame sections
That let's close virtual keyboard file.
@lephilousophe lephilousophe force-pushed the lephilousophe:fix-wii branch from c3f79ee to 95d07b5 Oct 2, 2019
@lephilousophe

This comment has been minimized.

Copy link
Member Author

commented Oct 2, 2019

@dhewg I still use your version of libgxflux with fixes that you can find at carstene1ns/libgxflux@bed224a and carstene1ns/libgxflux@0a636b8 plus one more fix from me at my repo

I can't be the port maintainer as I don't even own a Wii nor a GameCube.

@dhewg
dhewg approved these changes Oct 3, 2019
Copy link
Member

left a comment

lgtm

@dhewg

This comment has been minimized.

Copy link
Member

commented Oct 5, 2019

I still use your version of libgxflux with fixes that you can find at carstene1ns/libgxflux@bed224a and carstene1ns/libgxflux@0a636b8 plus one more fix from me at my repo

Pushed those 3

@lephilousophe

This comment has been minimized.

Copy link
Member Author

commented Oct 5, 2019

Great! Thanks.
I will update my toolchain scripts.

As everyone seem OK with my last changes, I will merge the PR tomorrow to master.
We could backport it to stable branch now that release has been tagged.
Thanks.

@bluegr

This comment has been minimized.

Copy link
Member

commented Oct 8, 2019

Closing PR #1291 in favor of this one

@lephilousophe lephilousophe merged commit c271994 into scummvm:master Oct 9, 2019
2 checks passed
2 checks passed
Codacy/PR Quality Review Up to standards. A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@lephilousophe lephilousophe deleted the lephilousophe:fix-wii branch Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.