From version 2.38, binutils default to ISA spec version 20191213. This
means that the csr read/write (csrr*/csrw*) instructions and fence.i
instruction has separated from the `I` extension, become two standalone
extensions: Zicsr and Zifencei. As the kernel uses those instruction,
this causes the following build failure:
CC lib/sbi/sbi_tlb.o
<<BUILDDIR>>/lib/sbi/sbi_tlb.c: Assembler messages:
<<BUILDDIR>>/lib/sbi/sbi_tlb.c:190: Error: unrecognized opcode `fence.i'
make: *** [Makefile:431: <<BUILDDIR>>/build/lib/sbi/sbi_tlb.o] Error 1
The fix is to specify those extensions explicitly in -march. However as
older binutils version do not support this, we first need to detect
that.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Gbp-Pq: Name opensbi-fix-build-with-binutils-2.38.patch
Signed-off-by: Cong Liu <liucong2@kylinos.cn>
The output of "ld -V" changes based on the environment's locale.
Gbp-Pq: Name slof-ensure-ld-is-called-with-C-locale.patch
Signed-off-by: Cong Liu <liucong2@kylinos.cn>
This version string ends up in the slof.bin, leading to
reproducibility issues.
Gbp-Pq: Name slof-remove-user-and-host-from-release-version.patch
Signed-off-by: Cong Liu <liucong2@kylinos.cn>
Two issues break reproducibility; the time and hostname get embedded
in the resulting seabios binary.
Simply drop the hostname from the embedded version string, as it
shouldn't be needed in Debian package builds.
Use the SOURCE_DATE_EPOCH environment variable to set the build date
rather than the current time:
https://reproducible-builds.org/docs/source-date-epoch/
Gbp-Pq: Name seabios-hppa-use-consistent-date-and-remove-hostname.patch
Signed-off-by: Cong Liu <liucong2@kylinos.cn>
Embedding the build time breaks reproducibility. Instead, use the date
specified by the SOURCE_DATE_EPOCH environment variable:
https://reproducible-builds.org/docs/source-date-epoch/
This patch relies on features of GNU date, and will need further
changes for portability to other systems.
Gbp-Pq: Name openbios-use-source_date_epoch-in-makefile.patch
Signed-off-by: Cong Liu <liucong2@kylinos.cn>
gcc-12.2 produces an apparently wrong warning for this file:
roms/openbios/arch/ppc/qemu/init.c:400:10: error: \
array subscript 0 is outside array bounds of ‘uint32_t[0]’ {aka ‘unsigned int[]’} \
[-Werror=array-bounds]
400 | *dsi = 0x48002002;
| =====^===========
Turn this particular -Werror back into warning. Gcc is apparently wrong here.
index e40385a70b..2e214aa079 100644
Gbp-Pq: Name openbios-array-bounds-gcc12.patch
Signed-off-by: Cong Liu <liucong2@kylinos.cn>