The recent discussions about which architectures are currently supported has inspired me to revisit my work on adding GitHub workflow actions. Glenn pointed out that there are a couple of errors in the x86/amd64 builds which are fixed by this patchset.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Mark Cave-Ayland (2): config/scripts/switch-arch: allow x86_64 prefix for x86 builds arch/unix/unix.c: fix build on x86 architecture with modern gcc compilers
arch/unix/unix.c | 2 ++ config/scripts/switch-arch | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
Modern 64-bit compilers with a gcc multilib-capable toolchain are easily able to build x86 OpenBIOS. If the build is not gcc multilib-capable then the build typically fails with the message "fatal error: sys/cdefs.h: No such file or directory".
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- config/scripts/switch-arch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/scripts/switch-arch b/config/scripts/switch-arch index 7ed1369..b5acc6c 100755 --- a/config/scripts/switch-arch +++ b/config/scripts/switch-arch @@ -295,7 +295,7 @@ for ARCH in $arch_list; do ;;
x86) - select_prefix i486 + select_prefix i486 x86_64 CFLAGS="-fno-builtin -m32" AS_FLAGS="-Wa,-32" ;;
Modern gcc compilers will fail to build x86 OpenBIOS failing with the error message "libc/misc.c:20: multiple definition of `errno_int'" during link.
Since the accompanying comment mentions that the reason for adding the definition is to allow compilation to succeed on OS X, surround it with suitable #if defined(__APPLE__) ... #endif guards.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- arch/unix/unix.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/arch/unix/unix.c b/arch/unix/unix.c index 1f628eb..cb9757e 100644 --- a/arch/unix/unix.c +++ b/arch/unix/unix.c @@ -68,7 +68,9 @@ static int verbose = 0; unsigned long isa_io_base; #endif
+#if defined(__APPLE__) int errno_int; /* implement for fs drivers, needed to build on Mac OS X */ +#endif
ucell ofmem_claim(ucell addr, ucell size, ucell align) {
On Tue, 8 Feb 2022 22:24:31 +0000 Mark Cave-Ayland mark.cave-ayland@ilande.co.uk wrote:
The recent discussions about which architectures are currently supported has inspired me to revisit my work on adding GitHub workflow actions. Glenn pointed out that there are a couple of errors in the x86/amd64 builds which are fixed by this patchset.
Are you thinking of having the GitHub workflow actions produce binary that could be downloaded from GitHub? If so, I'd be interested in knowing when its up so I can pull from that for running the GRUB tests.
Glenn
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Mark Cave-Ayland (2): config/scripts/switch-arch: allow x86_64 prefix for x86 builds arch/unix/unix.c: fix build on x86 architecture with modern gcc compilers
arch/unix/unix.c | 2 ++ config/scripts/switch-arch | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
On 09/02/2022 18:13, Glenn Washburn wrote:
On Tue, 8 Feb 2022 22:24:31 +0000 Mark Cave-Ayland mark.cave-ayland@ilande.co.uk wrote:
The recent discussions about which architectures are currently supported has inspired me to revisit my work on adding GitHub workflow actions. Glenn pointed out that there are a couple of errors in the x86/amd64 builds which are fixed by this patchset.
Are you thinking of having the GitHub workflow actions produce binary that could be downloaded from GitHub? If so, I'd be interested in knowing when its up so I can pull from that for running the GRUB tests.
Glenn
Indeed. At the moment I have the workflow creating a .zip artifact that contains the binaries for all of the supported architectures.
Unfortunately it seems that GitHub requires users to log in to download artifacts (and also deletes them after 90 days) but whatever solution is eventually chosen can be added later. The important thing is finally there will be a consistent build environment in docker that can be used externally and via GitHub workflows without having to build and/or configure all the cross-compilers manually :)
ATB,
Mark.
On Thu, 10 Feb 2022 12:56:08 +0000 Mark Cave-Ayland mark.cave-ayland@ilande.co.uk wrote:
On 09/02/2022 18:13, Glenn Washburn wrote:
On Tue, 8 Feb 2022 22:24:31 +0000 Mark Cave-Ayland mark.cave-ayland@ilande.co.uk wrote:
The recent discussions about which architectures are currently supported has inspired me to revisit my work on adding GitHub workflow actions. Glenn pointed out that there are a couple of errors in the x86/amd64 builds which are fixed by this patchset.
Are you thinking of having the GitHub workflow actions produce binary that could be downloaded from GitHub? If so, I'd be interested in knowing when its up so I can pull from that for running the GRUB tests.
Glenn
Indeed. At the moment I have the workflow creating a .zip artifact that contains the binaries for all of the supported architectures.
Unfortunately it seems that GitHub requires users to log in to download artifacts (and also deletes them after 90 days) but whatever solution is eventually chosen can be added later. The important thing is finally there will be a consistent build environment in docker that can be used externally and via GitHub workflows without having to build and/or configure all the cross-compilers manually :)
Thats great, sounds like the hard part is done. Perhaps you can create an openbios-builds repo and in the actions script commit and push to that and tag every commit like "openbios-${SHORT_COMMIT_ID}". That should make it publically available.
Glenn
On 08/02/2022 22:24, Mark Cave-Ayland wrote:
The recent discussions about which architectures are currently supported has inspired me to revisit my work on adding GitHub workflow actions. Glenn pointed out that there are a couple of errors in the x86/amd64 builds which are fixed by this patchset.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Mark Cave-Ayland (2): config/scripts/switch-arch: allow x86_64 prefix for x86 builds arch/unix/unix.c: fix build on x86 architecture with modern gcc compilers
arch/unix/unix.c | 2 ++ config/scripts/switch-arch | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
No further comments, so pushed to master.
ATB,
Mark.