Skip to content

Re-enable qemu-user-static builds#2009

Open
ewlsh wants to merge 1 commit intoarchlinuxarm:masterfrom
ewlsh:qemu-static-builds
Open

Re-enable qemu-user-static builds#2009
ewlsh wants to merge 1 commit intoarchlinuxarm:masterfrom
ewlsh:qemu-static-builds

Conversation

@ewlsh
Copy link
Copy Markdown

@ewlsh ewlsh commented Sep 27, 2023

Static builds were failing due to incorrect build flags in glibc 2.35.

See https://sourceware.org/bugzilla/show_bug.cgi?id=29514.

I'm currently compiling this locally with a patched glibc 2.35 but glibc 2.38 is in this repository which should compile correctly unpatched.

I removed x86-only dependencies from qemu-system-x86 (seabios, edk2-ovmf) based on what I saw in Fedora's packaging but if these are compilable on aarch64 let me know and I can adjust.

(my local patch for glibc 2.35)

diff --unified --recursive --text a/Makeconfig b/Makeconfig
--- a/Makeconfig        2023-09-24 23:08:32.340839948 -0700
+++ b/Makeconfig        2023-09-24 23:11:54.619347519 -0700
@@ -1070,7 +1070,7 @@
 PIC-ccflag = -fPIC
 endif
 # This can be changed by a sysdep makefile
-pie-ccflag = -fpie
+pie-ccflag = -fPIE
 no-pie-ccflag = -fno-pie
 # This one should always stay like this unless there is a very good reason.
 PIE-ccflag = -fPIE
diff --unified --recursive --text a/sysdeps/sparc/Makefile b/sysdeps/sparc/Makefile
--- a/sysdeps/sparc/Makefile    2023-09-24 23:08:32.552836773 -0700
+++ b/sysdeps/sparc/Makefile    2023-09-24 23:16:15.058325731 -0700
@@ -1,9 +1,6 @@
 # The Sparc `long double' is a distinct type we support.
 long-double-fcts = yes
 
-pie-ccflag = -fPIE
-no-pie-ccflag = -fno-PIE
-
 ifeq ($(subdir),gmon)
 sysdep_routines += sparc-mcount
 endif

@ewlsh ewlsh changed the title Re-enable qemu-static-user builds Re-enable qemu-user-static builds Sep 27, 2023
@ewlsh ewlsh force-pushed the qemu-static-builds branch from d75fb0e to 4942f9c Compare September 27, 2023 02:45
Static builds were failing due to incorrect build flags in
glibc 2.35.

See https://sourceware.org/bugzilla/show_bug.cgi?id=29514.
@ewlsh ewlsh force-pushed the qemu-static-builds branch from 4942f9c to 2e7be20 Compare September 27, 2023 02:48
@ewlsh
Copy link
Copy Markdown
Author

ewlsh commented Sep 27, 2023

If glibc 2.38 can't be released yet (for whatever reason), let me know if there is a way to propose a patch to glibc 2.35 to unblock this 🌞

@SpieringsAE
Copy link
Copy Markdown
Contributor

Can this be done? I want set up a archlinuxriscv chroot on my device and it needs this.
I just compiled it myself and that seems to have worked so far so I don't see why not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants