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 */28nls: Update 'fr' translation.Julien Lepiller 2021-01-22Revert "nls: Update 'fr' translation."...This reverts commit 5d03ef73c3c1d995714abdaff650f73ac9fafc0f, which led to these errors: /gnu/store/…-guix/fr.po:7206: 'msgstr' is not a valid Scheme format string, unlike 'msgid'. Reason: In the directive number 3, the character ' ' is not a valid conversion specifier. /gnu/store/…-guix/fr.po:7554: format specifications in 'msgid' and 'msgstr' are not equivalent /gnu/store/…-gettext-minimal-0.20.1/bin/msgfmt: found 2 fatal errors Ludovic Courtès 2021-01-22nls: Update 'fr' translation.Julien Lepiller 2021-01-16guix: Move narinfo code from substitute script to module....This separation between the code for dealing with narinfos from the code doing that for a purpose should make things clearer, and better support components other that the substitute script in using this code. This is just moving the code around, no code should have been significantly changed. * guix/scripts/substitute.scm (<narinfo>): Move record type to (guix narinfo). (fields->alist, narinfo-hash-algorithm+value, narinfo-hash->sha256, narinfo-signature->canonical-sexp, narinfo-maker, read-narinfo, narinfo-sha256, valid-narinfo?, write-narinfo, narinfo->string, string->narinfo, equivalent-narinfo?, supported-compression?, compresses-better?, narinfo-best-uri): Move procedures to (guix narinfo). (%compression-methods): Move variable to (guix narinfo). * guix/narinfo.scm: New file. * Makefile.am (MODULES): Add it. * po/guix/POTFILES.in: Add 'guix/narinfo.scm'. Christopher Baines