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

devkitPro buildscript cleanup #131

Closed
asiekierka opened this issue Jun 25, 2018 · 6 comments
Closed

devkitPro buildscript cleanup #131

asiekierka opened this issue Jun 25, 2018 · 6 comments
Milestone

Comments

@asiekierka
Copy link
Contributor

  • WinterMute points out $DEVKITA64 is not "a thing" and should not be used or defined
  • Any and all references to 3ds_portlibs (portlibs.sh, commented out pkg-build lines) can now be safely removed.
@WinterMute
Copy link

also here

EXTRA_LIBS = -L$(CTRULIB)/lib -L$(DEVKITPRO)/portlibs/armv6k/lib -L$(DEVKITARM)/arm-none-eabi/lib/armv6k/fpu -L$(DEVKITPRO)/portlibs/3ds/lib

you shouldn't add -L$(DEVKITARM)/arm-none-eabi/lib/armv6k/fpu manually, allow the linker to take care of it.

CC := arm-none-eabi-gcc
CXX := arm-none-eabi-g++
AR := arm-none-eabi-ar
OBJCOPY := arm-none-eabi-objcopy
are already defined through 3ds_rules. Defining them manually may break the build with future updates.

If you're automating builds then please use the docker images at https://hub.docker.com/u/devkitpro/ rather than hammering the release system with unnecessary downloads.

@asiekierka
Copy link
Contributor Author

Oh, anything regarding arch/ is mostly on me. I'll look into this once I'm done tackling a breaking bug that popped up regarding directory traversal on 3DS.

@AliceLR
Copy link
Owner

AliceLR commented Jun 25, 2018

All of our release builds are currently manual. If by 'unnecessary downloads' you mean the DK1 and DK2 scripts in this folder (and the shell scripts they run), those particular scripts are actually intended to be run only once when the MSYS2 environment is initialized. Sorry for the confusion there!

Re: $DEVKITA64, is there currently a preferred alternative to that? I think anywhere I added that was only so that the Switch scripts would take roughly the same arguments as the other platform scripts.

@AliceLR
Copy link
Owner

AliceLR commented Jun 25, 2018

I removed most of the build script $DEVKITA64 references in de0693d. I also clarified the build script instructions (now titled README.md) and fixed the Wii port to use wii_rules instead of hardcoded vars.

@WinterMute
Copy link

WinterMute commented Jun 26, 2018

@AliceLR

Yes, I did mean the DK1 and DK2 scripts, sorry, at first glance it looked like it was part of automated building.

For devkitA64 we're just basing everything off $(DEVKITPRO) rather than having an extra variable. This was really just an artifact of starting with devkitARM and building out the rest of the infrastructure from there and we decided to clean things up a bit and re-organise for the switch toolset.

My main concern is that people end up cargo culting $DEVKITA64 and creating build systems based on something that doesn't exist in a standard install. Often the first we hear of it is when someone tries to build something with a fresh toolchain install and come complaining about things being broken.

With sections like this it's probably reasonable to generate $DEVKITARM rather than depending on it being passed in

export DEVKITPRO=$1
export DEVKITARM=$2
export PATH="$PATH:$DEVKITARM/bin"
export PATH="$PATH:$DEVKITPRO/tools/bin"

so either export DEVKITARM=$DEVKITPRO/devkitARM here or just export PATH="$PATH:$DEVKITPRO/devkitARM/bin" - bear in mind that it's not recommended to swap toolchains by changing that $DEVKITARM variable since libraries compiled with one version may not be compatible with another.

@AliceLR
Copy link
Owner

AliceLR commented Jul 12, 2018

I removed most reassigning of the environment variables in 2ae8923 and merged asie's fixes to the 3DS Makefile and code 08b96ba. I think that puts pretty much everything mentioned so far resolved.

@AliceLR AliceLR closed this as completed Aug 11, 2018
@AliceLR AliceLR added this to the 2.91d milestone Aug 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants