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

Cross compiling example #424

Merged

Conversation

carlhoerberg
Copy link

Took a lot of googling to find out how to cross compile for an aarch64 machine, wanted to share the script I now use. It's not the most generic but for Ubuntu machines it works..

Took a lot of googling to find out how to cross compile for an aarch64 machine, wanted to share the script I now use. It's not the most generic but for Ubuntu machines it works..
Copy link
Member

@bcardiff bcardiff left a comment

Choose a reason for hiding this comment

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

I think is a good starting point to give more visibility of the process

scp "$(basename $srcfile).o" "$target":.
rm "$(basename $srcfile).o"

# SSH to the target machine
Copy link
Member

Choose a reason for hiding this comment

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

That huge blob of remote commands is not very readable. I'd place the instructions for host and target machine in separate code blocks to make both aspects visually distinct but equivalent. The focus should be on illustrating how the approach works, not necessarily provide a c&p shell script (that could be an appendix).
It might also be better to use console format instead of bash for both.

Suggested change
# SSH to the target machine
```
On the target machine:
```bash
#!/bin/bash -eu

@straight-shoota straight-shoota changed the base branch from master to feature/cross-compiling March 18, 2021 19:39
@straight-shoota straight-shoota merged commit d5f3c95 into crystal-lang:feature/cross-compiling Mar 18, 2021
@straight-shoota
Copy link
Member

I merged this into a feature branch to combine with #177

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

Successfully merging this pull request may close these issues.

None yet

3 participants