[vlc-devel] [PATCH 1/2] extra: packages: add a Raspberry Pi build scripts

Steve Lhomme robux4 at ycbcr.xyz
Fri Mar 20 12:05:38 CET 2020

On 2020-03-20 11:25, Konstantin Pavlov wrote:
> Hi Steve!
> On Fri, Mar 20, 2020 at 10:26:30AM +0100, Steve Lhomme wrote:
>> +   -h            Show some help
>> +   -r            Release mode (default is debug)
>> +   -a <arch>     Use the specified arch (default: arm, possible aarch64)
>> +case $ARCH in
>> +    aarch64)
>> +        SHORTARCH="linuxarm64"
>> +        EABI="gnu"
>> +        ;;
>> +    arm)
>> +        SHORTARCH="linuxarm"
>> +        EABI="gnueabihf"
>> +        ;;
>> +# force the same compiler as current Raspbian binaries
>> +export CC="arm-linux-gnueabihf-gcc-8"
>> +export CXX="arm-linux-gnueabihf-g++-8"
>> +export AR="arm-linux-gnueabihf-gcc-ar-8"
>> +export RANLIB="arm-linux-gnueabihf-gcc-ranlib-8"
> Are those the same even if you force aarch64 build?

No idea, there doesn't seem to be a 64 bits Raspbian yet. But the script 
might be usable with some other distros that provide the mmal headers/libs.

> As a side note, maybe we should check for the existense of those binaries
> before going forward in a script - I assume raspbian might update the
> toolchain at some point - and they probably used something else before.

We can test they work, although building will fail pretty quickly.

The question is whether we can detect which compiler to use for this 
cross compilation. I don't think it's possible. It's possible to remove 
the -8 and it should default to whatever is available on the system. In 
both the docker image and my system it defaults to gcc 9. On the Rpi 
board it's 8. I picked the one closer to the one on the device in case 
we want to use binaries.

That being said the cross-compilation ended up so dirty that there's 
little chance we can use the binaries anytime soon. So I'll remove the -8.

More information about the vlc-devel mailing list