Taken from Gentoo and adapted to fix the build using GCC 10. See: https://bugs.gentoo.org/705730. --- a/mk/com32.mk +++ b/mk/com32.mk @@ -47,6 +47,7 @@ GCCOPT += $(call gcc_ok,-falign-functions=0,-malign-functions=0) GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0) GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0) GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0) +GCCOPT += $(call gcc_ok,-fcommon) ifeq ($(FWCLASS),EFI) GCCOPT += -mno-red-zone --- a/mk/elf.mk +++ b/mk/elf.mk @@ -42,6 +42,7 @@ GCCOPT += $(call gcc_ok,-falign-functions=0,-malign-functions=0) GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0) GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0) GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0) +GCCOPT += $(call gcc_ok,-fcommon) com32 = $(topdir)/com32 core = $(topdir)/core --- a/mk/embedded.mk +++ b/mk/embedded.mk @@ -51,6 +51,7 @@ GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0) GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0) GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0) GCCOPT += $(call gcc_ok,-fvisibility=hidden) +GCCOPT += $(call gcc_ok,-fcommon) LIBGCC := $(shell $(CC) $(GCCOPT) --print-libgcc) --- a/mk/lib.mk +++ b/mk/lib.mk @@ -28,6 +28,7 @@ GCCOPT += $(call gcc_ok,-falign-functions=0,-malign-functions=0) GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0) GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0) GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0) +GCCOPT += $(call gcc_ok,-fcommon) INCLUDE = -I$(SRC) STRIP = strip --strip-all -R .comment -R .note --- a/mk/efi.mk +++ b/mk/efi.mk @@ -7,7 +7,7 @@ core = $(topdir)/core # Set up architecture specifics; for cross compilation, set ARCH as apt # gnuefi sets up architecture specifics in ia32 or x86_64 sub directories # set up the LIBDIR and EFIINC for building for the appropriate architecture -GCCOPT := $(call gcc_ok,-fno-stack-protector,) +GCCOPT := $(call gcc_ok,-fno-stack-protector,) $(call gcc_ok,-fcommon) EFIINC = $(objdir)/include/efi LIBDIR = $(objdir)/lib diff --git a/dos/string.h b/dos/string.h index f648de2..a502132 100644 --- a/dos/string.h +++ b/dos/string.h @@ -5,12 +5,13 @@ #ifndef _STRING_H #define _STRING_H +#include + /* Standard routines */ #define memcpy(a,b,c) __builtin_memcpy(a,b,c) #define memmove(a,b,c) __builtin_memmove(a,b,c) #define memset(a,b,c) __builtin_memset(a,b,c) #define strcpy(a,b) __builtin_strcpy(a,b) -#define strlen(a) __builtin_strlen(a) /* This only returns true or false */ static inline int memcmp(const void *__m1, const void *__m2, unsigned int __n) @@ -21,6 +22,13 @@ static inline int memcmp(const void *__m1, const void *__m2, unsigned int __n) return rv; } +static inline size_t strlen(const char *s) +{ + size_t len = 0; + while (*s++) len++; + return len; +} + extern char *strchr(const char *s, int c); #endif /* _STRING_H */default....When accessing libvrtd remotely, polkit can't be used unless you are logged as root. Instead allow libvirt groups member access to the control socket. * gnu/services/virtualization.scm (libvirt-configuration) [unix-sock-group]: Change default from "root" to "libvirt". Brice Waegeneire 2021-09-04services: libvirt: Add qemu field....* gnu/services/virtualization.scm (libvirt-configuration): Add 'qemu' field. (libvirt-service-type): Replace 'qemu' package with the one specified in the service configuration. Brice Waegeneire 2021-08-30services: hurd-vm: Use the new 'targets' field of <bootloader-configuration>....* gnu/services/virtualization.scm (%hurd-vm-operating-system): Use 'targets' instead of 'target' for the 'bootloader-configuration' field. Ludovic Courtès 2021-08-29services: Remove i486 qemu target....The i486 target has been removed from qemu since at least 5.2.0. * gnu/services/virtualization.scm (%i486): Remove variable. (%qemu-platforms): Remove it. Efraim Flashner 2021-07-10services: qemu-binfmt: Preserve argv[0] by default....Previously, argv[0] would be replaced by the absolute file name of the executable. This could cause discrepancies, for example in the Coreutils test suite: <https://issues.guix.gnu.org/49485>. * gnu/services/virtualization.scm (<qemu-platform>)[flags]: Default to "FP". Ludovic Courtès 2021-03-15services/qemu-binfmt: Use the F flag and the static output of QEMU....Fixes <https://issues.guix.gnu.org/36117>. Before this change, the 'binfmt_misc' entries registered for QEMU would not be usable in container contexts outside of guix-daemon (without manually bind mounting file names). For example: $ docker run --rm arm32v7/debian true standard_init_linux.go:207: exec user process caused "no such file or directory" After this change, any container can make use of the QEMU binfmt_misc registrations, as their corresponding QEMU static binaries are fully pre-loaded by the kernel. * gnu/services/virtualization.scm (<qemu-platform>): Define using 'define-record-type*'. [flags]: New field, which defaults to "F" (fix binary). (%i386, %i486, %alpha, %arm, %armeb, %sparc, %sparc32plus, %ppc, %ppc64) (%ppc64le, %m68k, %mips, %mipsel, %mipsn32, %mipsn32el, %mips64, %mips64el) (%riscv32, %riscv64, %sh4, %sh4eb, %s390x, %aarch64, %hppa): Adjust. (qemu-binfmt-guix-chroot): Remove variable. (qemu-binfmt-service-type): Remove the qemu-binfmt-guix-chroot extension. * gnu/services/qemu-binfmt (qemu-platform->binfmt): Use the static output of QEMU. * doc/contributing.texi (Submitting Patches): Update doc. * doc/guix.texi (Virtualization Services): Update doc. Maxim Cournoyer