This is what worked for me, to build x86_32, x86_64, ARM and ARM64 UEFI drivers from a single Ubuntu 20.04 platform (which is actually an AppVeyor build environment):
sudo update-alternatives --remove-all gcc sudo update-alternatives --remove-all g++ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9 sudo -E apt-get install -y gcc-9-multilib gcc-9-aarch64-linux-gnu gcc-9-arm-linux-gnueabi sudo ln -s /usr/include/x86_64-linux-gnu/asm/ /usr/local/include/asm sudo ln -s /usr/bin/aarch64-linux-gnu-gcc-9 /usr/bin/aarch64-linux-gnu-gcc sudo ln -s /usr/bin/aarch64-linux-gnu-gcc-ar-9 /usr/bin/aarch64-linux-gnu-gcc-ar sudo ln -s /usr/bin/arm-linux-gnueabi-gcc-9 /usr/bin/arm-linux-gnueabi-gcc sudo ln -s /usr/bin/arm-linux-gnueabi-gcc-ar-9 /usr/bin/arm-linux-gnueabi-gcc-ar If you are interested, you can find the AppVeyor build log, that demonstrates how all 4 versions of gcc were properly invoked, at https://ci.appveyor.com/project/pbatard/ntfs- 3g/builds/38316398?fullLog=true Note that this is a real-life scenario, where some developers actually need to produce UEFI executables, for all supported UEFI archs, in one go. As such, it would really be a lot nicer if a 'gcc-multilib gcc- aarch64-linux-gnu gcc-arm-linux-gnueabi' configuration was supported without having to resort to applying workarounds. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1300211 Title: Can't install both gcc-multilib and gcc-arm-linux-gnueabihf To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1300211/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs