Adding feature for cross-compilation hbosng#8
Adding feature for cross-compilation hbosng#8LarsGrootkarzijn wants to merge 3 commits intohifiberry:mainfrom
Conversation
build.sh
Outdated
| fi | ||
|
|
||
| sbuild --chroot-mode=unshare \ | ||
| --arch=$1 \ |
There was a problem hiding this comment.
build.sh should be able to compile without any argument.
The --arch should only be applied when the user explicitely wants to build for a specific architecture. This is optional.
The best way to check is to add --arch xxx as a command line argument to build.sh, parse it and add it only when given
There was a problem hiding this comment.
Hi, Yes, I fully agree, this should have been a draft, I improved this yesterday night, will push in a bit.
|
Hi @hifiberry, I changed the script, let me know what you think of this structure, so I can start working out the others. Currently, arch is standard at arm64. I could change this to the target architecture being the same as the host machine, but I think in most cases arm64 is goto. |
|
Looks good now |
I think arm64 as default is fine |
For example:
build.sh arm64This will however most likely introduce a lot of redundant code; Sanity architecture check in build-all -> Sanity architecture check in build.sh acr folder hbosng -> sanity architecture check in build.sh acr repository.
Technically, you can run each build.sh separately which means these checks are necessary. While when running build-all the sanity check is conducted immediately, and does not have to be conducted in the build.sh script(s).