Cross compiling s390


As I said in my last blog, I am dedicating this blog to cross compilation process of s390. Actually it is pretty straight-forward. But I never cross compiled s390 before this, that’s why I didn’t know how to do that. So, Julia told Quentin Lambert [Engineer who works with Julia] to help me with the same. Quentin mailed me explaining the process and it was so easy[thanks to him for explaining in such a way]. Here, is a step by step process:

Step 1: Download the following script

wget -O ~/bin/make.cross

Step 2: Make the script executable:

chmod +x ~/bin/make.cross

Step 3: Now you can use it with ARCH=s390 as if it was the regular Makefile

make.cross ARCH=s390 allyesconfig
make.cross ARCH=s390 path/to/file.o

As, one can see here in a script there are lot of supported platforms. I am planning to write one script that tries each
of the options in the cross compile script until coming to one that doesn’t give warnings about missing header files. It could be slow, but it would be easier than figuring out the architecture by hand. [Thanks to Julia for suggesting this] So, lets see how much time I found for writing this script. [Its not related to my work but it could be useful in general]. I will update this blog or may be will write new blog once I will be done with it.