Skip to content
Snippets Groups Projects
Verified Commit 5e7faf1a authored by Oliver Smith's avatar Oliver Smith Committed by Clayton Craft
Browse files

device/main/u-boot-librem5: fix build on gcc 12 (MR 3683)

Disable Werror and add -no-warn-rwx-segment to LDFLAGS of
arm-trusted-firmware to make it build with gcc 12, smilar to:
https://gitlab.alpinelinux.org/alpine/aports/-/commit/769f9666b663ba06dca63ddbff6eb1af458355f3

Related: https://builds.sr.ht/~postmarketos/job/894728#task-pmbootstrap_build-422

[ci:skip-build] already built successfully in CI
parent 2ccd927e
No related branches found
No related tags found
No related merge requests found
Pipeline #207234 passed
......@@ -3,7 +3,7 @@
# Co-Maintainer: Bhushan Shah <bshah@kde.org>
pkgname=u-boot-librem5
pkgver=2022.04_git20220420
pkgrel=0
pkgrel=1
# 'upstream/librem5-v3' branch in uboot repo
_commit="3fdb96e723a3fb0f2a271c5ff24bba7a39478c86"
# 'librem5' branch in atf repo
......@@ -51,12 +51,17 @@ prepare() {
./firmware-imx-$_firmwareversion.bin --auto-accept
cp -v "$_firmware_builddir"/firmware/ddr/synopsys/lpddr4*.bin $builddir/
cp -v "$_firmware_builddir"/firmware/hdmi/cadence/signed_*imx8m.bin $builddir/
# Disable -Werror in arm-trusted-firmware so it builds with GCC 12. The
# version we use here is missing E=0 introduced here:
# https://github.com/ARM-software/arm-trusted-firmware/commit/6336b07ad25cb05ca75f5a465d816af7956e0a59
sed -i "s/-Werror//g" "$_atf_builddir"/Makefile
}
build() {
msg "Building ARM trusted firmware"
cd "$_atf_builddir"
LDFLAGS="" make PLAT=imx8mq bl31
LDFLAGS="-no-warn-rwx-segment" make PLAT=imx8mq bl31
# Overwrite default bl31 binary with one made here
export BL31="$_atf_builddir/build/imx8mq/release/bl31.bin"
cp -v "$_atf_builddir"/build/imx8mq/release/bl31.bin "$builddir"/
......
  • Administrator @root

    mentioned in commit 09786192

    By Oliver Smith on 2022-12-01T17:30:36

    · Imported

    mentioned in commit 09786192

    By Oliver Smith on 2022-12-01T17:30:36

    Edited by Ghost User
    Toggle commit list
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment