Had to hack linux.config to build for ARMv6, custom.cbc file target_arch preference is overwritten
I'm building code for raspberry pi zero from an emulated environment (nspawn + qemu-arm-static + binfmt). The default gcc options are:
gcc -march=native -E -v - </dev/null 2>&1 | grep cc1
/usr/lib/gcc/arm-linux-gnueabihf/8/cc1 -E -quiet -v -imultilib . -imultiarch arm-linux-gnueabihf - -mfloat-abi=hard -mfpu=vfp -mtls-dialect=gnu -marm -march=armv6+fp
This is my raspberry.cbc
import os
from cerbero.config import Platform, Architecture, Distro, DistroVersion
target_platform = Platform.LINUX
target_distro = Distro.DEBIAN
target_arch = Architecture.ARM # hacked linux.config as cerbero switches to ARMv7 anyway- CFLAGS are set in .bashrc
variants = ['rpi']
tools_prefix='arm-linux-gnueabihf-'
prefix='/opt/gstreamer'
The compilation process will go Architecture.ARMv7 regardless my preference in target_arch, and so "arch_flags += ' -march=armv7-a" will be executed in linux.config. I had to comment that line to let CFLAGS be applied correctly and build for arm6