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

Update Toolchain Build Script #412

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

lolpro11
Copy link

Uses more threads, and fixes a "file not found error" with newlib

@@ -16,7 +16,7 @@ set -eu

TARGET=arm-none-eabi
PREFIX="${PWD}/install" # or the directory where the toolchain should be installed in
PARALLEL="${PARALLEL--j4}" # or "-j<number of build jobs>"
PARALLEL="${PARALLEL--$(nproc --all)}" # or "-j<number of build jobs>"
Copy link
Contributor

@adriweb adriweb Feb 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nproc isn't a thing on macOS (unless coreutils is installed, apparently), but from what I read, this should work:
getconf _NPROCESSORS_ONLN. You also want to keep the j in there.

@Vogtinator
Copy link
Contributor

fixes a "file not found error" with newlib

How? The PARALLEL change looks good, but the arm-none-eabi replacement is a noop.

@lolpro11
Copy link
Author

lolpro11 commented Feb 29, 2024

fixes a "file not found error" with newlib

How? The PARALLEL change looks good, but the arm-none-eabi replacement is a noop.

rm: cannot remove '/home/lolpro11/Documents/Ndless/ndless-sdk/toolchain/install/arm-none-eabi/sys-include/newlib.h': No such file or directory

If I compile for other architectures, by changing the TARGET variable, it will throw a No such file or directory error.
Same thing with rm .build_* and recompiling in place (I've had to do this many times due to user error)

@Vogtinator
Copy link
Contributor

fixes a "file not found error" with newlib

How? The PARALLEL change looks good, but the arm-none-eabi replacement is a noop.

rm: cannot remove '/home/lolpro11/Documents/Ndless/ndless-sdk/toolchain/install/arm-none-eabi/sys-include/newlib.h': No such file or directory

If I compile for other architectures, by changing the TARGET variable,

That's not meant to be changed. Maybe that should be made clear in the file.

it will throw a No such file or directory error. Same thing with rm .build_* and recompiling in place (I've had to do this many times due to user error)

Ok, that's a bug. rm -f would avoid the warning.

@lolpro11
Copy link
Author

If I compile for other architectures, by changing the TARGET variable,

That's not meant to be changed. Maybe that should be made clear in the file.

I am aware of that, I was trying to build a toolchain for arm-linux-gnueabi in order to try and compile Linux applications for my calculator.
I feel like changing this would help if other users want to do similar things.

@Vogtinator
Copy link
Contributor

If I compile for other architectures, by changing the TARGET variable,

That's not meant to be changed. Maybe that should be made clear in the file.

I am aware of that, I was trying to build a toolchain for arm-linux-gnueabi in order to try and compile Linux applications for my calculator. I feel like changing this would help if other users want to do similar things.

Right. That won't really work, the built libraries (libgcc, newlib) won't be compatible with linux.

@lolpro11
Copy link
Author

lolpro11 commented Feb 29, 2024

Right. That won't really work, the built libraries (libgcc, newlib) won't be compatible with linux.

I learned that the hard way.
Either way with or without my change the toolchain will still compile, I'm just adding the TARGET variable there for the sake of consistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants