pd-rs / crankstart

A barely functional, wildly incomplete and basically undocumented Rust crate whose aim is to let you write Games for the Playdate handheld gaming system in Rust.
MIT License
235 stars 24 forks source link

Add sysroot include path for arm-none-eabi-gcc #42

Closed tjkirch closed 1 year ago

tjkirch commented 1 year ago

This switches to using the default include path for arm-none-eabi-gcc, used in generating bindings_playdate.rs.

On my system, arm-none-eabi-gcc -print-sysroot prints /usr/arm-none-eabi, leading to -I/usr/arm-none-eabi/include.

The line just above this used a path relative to $(which arm-none-eabi-gcc), which for me is at /bin/arm-none-eabi-gcc and therefore didn't work. [edit: removed this as unneeded per lilyinstarlight]

tjkirch commented 1 year ago

@lilyinstarlight I'm curious whether this approach would work for you as well, and we could remove the line above it...

tjkirch commented 1 year ago

Thanks for checking! Removed the old include path in favor of this one.

tjkirch commented 1 year ago

Removed the unnecessary which call.

tjkirch commented 1 year ago

Also I changed the #!/usr/bin/env zsh at the top of the script to #!/usr/bin/env bash and it still ran just fine. I'm pretty sure it's using the subset of zsh that's bash-compatible

I also made #44 to move to plain sh so there would be no possible concern about shell availability or version anymore. I know Mac OS does things a little differently and I've had issues there in the past.