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

ansible: refresh cross compiler, include new 4.9.4 toolchain & new selector script #1237

Merged
merged 1 commit into from
Apr 23, 2018

Conversation

rvagg
Copy link
Member

@rvagg rvagg commented Apr 16, 2018

OK, so this is a bit of a major change in a number of ways.

Firstly, I've included a new cross-compile toolchain, cloned from https://github.com/rvagg/rpi-newer-crosstools, that included GCC 4.9.4 and also bundles in a more modern binutils, 2.28. So, we get past the 4.9.3 hurdle we are stuck with just using the toolchain that Raspbian uses (that we've been using https://github.com/raspberrypi/tools), plus we get to throw in a binutils that OpenSSL 1.1.1 is going to need when we upgrade Node 10 to it as per #1229. This gives us Jessie+ compatibility, we drop Wheezy but that was the plan anyway.

The only other option I've been able to come up with is to jump in to gcc-6 and have Stretch+ compatibility, but even then we have to use a custom toolchain since Raspbian is still using 4.8.3 for compiling even for their Stretch binaries ... as far as I can tell anyway!

The next thing this PR does is introduce a new cc-selector.sh script and gets rid of the old cc-armv6-4.8.sh etc. scripts. Combined with the new labels for the cross compiler worker in Jenkins and the version selector script there's very little logic in Jenkins anymore to select the right compiler.

We use the labels cross-compiler-armv6-gcc-4.8, cross-compiler-armv6-gcc-4.9.4, cross-compiler-armv7-gcc-4.8, cross-compiler-armv7-gcc-4.9.4 for the cross compiler machine, all 4 are selected for the node-cross-compile job, but only 2 get selected depending on the version of Node (version selector script does this). Then when compiling, we call . ./cc-selector.sh <label> with the current label and the selector script figures out which arm version and which gcc version and configures the CC, CPP, etc. variables. (There's also also a working gcc-4.9 label in there if we want to revert back to the Raspbian 4.9.3 toolchain for some reason).

On top of all of that, I've brought online two new cross-compiler machines, one test and one release (will make a new issue to discuss release cross-compiling ..), and they are Ubuntu 16.04 machines, instead of the current 14.04 that we have for our single current cross-compiler. I've also set up JNLP style configurations for them so they operate essentially like other test machines so the cross-compiler configuration is now just a simple extension of playbooks/jenkins/worker/create.yml that installs the toolchains and scripts. We're also bringing in ppa:ubuntu-toolchain-r/test to get the host compilers matching 4.9.4 as well, although it doesn't seem to matter if they are 4.9.3 while the cross compiler is 4.9.4, I don't really understand what V8 is doing with the host vs cross.

This has been active over the weekend in node-cross-compile, we've been building master (10+) on the new 4.9.4 and testing those on Jessie & Stretch Pi's without a hitch (well .. except for all the hitches it took to get this working). I've just brought online the second test cross-compiler and it seems to be happy, so we may want to consider upgrading the azure one to 16.04 sometime and bring it into harmony with this.

I suspect @joaocgreis is going to be the only one to grok all of this, sorry.

joaocgreis

This comment was marked as off-topic.

@joaocgreis joaocgreis mentioned this pull request Apr 20, 2018
@rvagg rvagg merged commit 57192a7 into master Apr 23, 2018
@rvagg rvagg deleted the rvagg/arm-release-cross branch April 23, 2018 12:16
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.

2 participants