diff --git a/core/gcc/build b/core/gcc/build index 3c6daecd..fa8b1bcc 100755 --- a/core/gcc/build +++ b/core/gcc/build @@ -1,15 +1,19 @@ #!/bin/sh -e +# Make sure gmp is built with generic options. +cp -v gcc/gmp/configfsf.guess gcc/gmp/config.guess +cp -v gcc/gmp/configfsf.sub gcc/gmp/config.sub + +# Use lib not lib64 by default. +sed -i '/m64=/s/lib64/lib/' gcc/gcc/config/i386/t-linux64 +sed -i 's/lib64/lib/' gcc/gcc/config/i386/linux64.h + # Build must happen outside of gcc source. mkdir -p gcc-build cd gcc-build export libat_cv_have_ifunc=no -# Unset CFLAGS/CXXFLAGS to make 'gcc' build as generic. -export CFLAGS=-pipe -export CXXFLAGS=-pipe - ../gcc/configure \ --prefix=/usr \ --disable-multilib \ diff --git a/core/gcc/checksums b/core/gcc/checksums index 9e90df50..6a83ea2a 100644 --- a/core/gcc/checksums +++ b/core/gcc/checksums @@ -1,2 +1,5 @@ 79a66834e96a6050d8fe78db2c3b32fb285b230b855d0a66288235bc04b327a0 gcc-9.1.0.tar.xz +87b565e89a9a684fe4ebeeddb8399dce2599f9c9049854ca8c0dfbdea0e21912 gmp-6.1.2.tar.xz +1d3be708604eae0e42d578ba93b390c2a145f17743a744d8f3f8c2ad5855a38a mpfr-4.0.2.tar.xz +6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e mpc-1.1.0.tar.gz 765614b3396d70bca3fa0ae4a813632486c6dca320e2bd13c8c39dca52be4a4c c99 diff --git a/core/gcc/depends b/core/gcc/depends index 3454ba8d..810b445d 100644 --- a/core/gcc/depends +++ b/core/gcc/depends @@ -1,8 +1,5 @@ bison flex -gmp -mpfr -mpc1 zlib linux-headers binutils diff --git a/core/gcc/sources b/core/gcc/sources index 355da179..bf5899b3 100644 --- a/core/gcc/sources +++ b/core/gcc/sources @@ -1,2 +1,5 @@ https://gcc.gnu.org/pub/gcc/releases/gcc-9.1.0/gcc-9.1.0.tar.xz gcc +https://gmplib.org/download/gmp/gmp-6.1.2.tar.xz gcc/gmp +http://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2.tar.xz gcc/mpfr +https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz gcc/mpc files/c99 diff --git a/core/gcc/version b/core/gcc/version index abec7419..9c4e0d67 100644 --- a/core/gcc/version +++ b/core/gcc/version @@ -1 +1 @@ -9.1.0 7 +9.1.0 8 diff --git a/core/kiss-bootstrap/depends b/core/kiss-bootstrap/depends index ad7891ef..987935dd 100644 --- a/core/kiss-bootstrap/depends +++ b/core/kiss-bootstrap/depends @@ -9,14 +9,11 @@ file make flex make gcc make git make -gmp make kiss make libressl make linux-headers make m4 make make make -mpc1 make -mpfr make musl make perl make pkgconf make diff --git a/core/kiss-bootstrap/version b/core/kiss-bootstrap/version index 8d04f961..707c2f26 100644 --- a/core/kiss-bootstrap/version +++ b/core/kiss-bootstrap/version @@ -1 +1 @@ -1 2 +1 3 diff --git a/extra/alsa-lib/checksums b/extra/alsa-lib/checksums index 5ffaa877..0937db71 100644 --- a/extra/alsa-lib/checksums +++ b/extra/alsa-lib/checksums @@ -1 +1 @@ -3cdc3a93a6427a26d8efab4ada2152e64dd89140d981f6ffa003e85be707aedf alsa-lib-1.1.8.tar.bz2 +488373aef5396682f3a411a6d064ae0ad196b9c96269d0bb912fbdeec94b994b alsa-lib-1.1.9.tar.bz2 diff --git a/extra/alsa-lib/sources b/extra/alsa-lib/sources index 4a595124..a2334d9b 100644 --- a/extra/alsa-lib/sources +++ b/extra/alsa-lib/sources @@ -1 +1 @@ -ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.1.8.tar.bz2 +ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.1.9.tar.bz2 diff --git a/extra/alsa-lib/version b/extra/alsa-lib/version index 7a39cf64..6d534464 100644 --- a/extra/alsa-lib/version +++ b/extra/alsa-lib/version @@ -1 +1 @@ -1.1.8 1 +1.1.9 1 diff --git a/extra/alsa-utils/build b/extra/alsa-utils/build index e5b4d467..608d209f 100755 --- a/extra/alsa-utils/build +++ b/extra/alsa-utils/build @@ -4,6 +4,7 @@ --disable-alsaconf \ --disable-bat \ --disable-nls \ + --with-curses=ncursesw \ --disable-xmlto \ --without-debug \ --prefix=/usr diff --git a/extra/alsa-utils/checksums b/extra/alsa-utils/checksums index 0ec8978d..86fcb074 100644 --- a/extra/alsa-utils/checksums +++ b/extra/alsa-utils/checksums @@ -1 +1 @@ -fd9bf528922b3829a91913b89a1858c58a0b24271a7b5f529923aa9ea12fa4cf alsa-utils-1.1.8.tar.bz2 +5ddf2cbddb4bd1a4a2a6492a09c25898b08c3ad64893c3655be14194cf0a213a alsa-utils-1.1.9.tar.bz2 diff --git a/extra/alsa-utils/depends b/extra/alsa-utils/depends index 6a470ffa..19afe0a0 100644 --- a/extra/alsa-utils/depends +++ b/extra/alsa-utils/depends @@ -1 +1,2 @@ ncurses +alsa-lib diff --git a/extra/alsa-utils/sources b/extra/alsa-utils/sources index 39ec4a3c..726d0938 100644 --- a/extra/alsa-utils/sources +++ b/extra/alsa-utils/sources @@ -1 +1 @@ -ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.1.8.tar.bz2 +ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.1.9.tar.bz2 diff --git a/extra/alsa-utils/version b/extra/alsa-utils/version index 7a39cf64..6d534464 100644 --- a/extra/alsa-utils/version +++ b/extra/alsa-utils/version @@ -1 +1 @@ -1.1.8 1 +1.1.9 1 diff --git a/extra/efivar/build b/extra/efivar/build index baa01e6b..e8286782 100755 --- a/extra/efivar/build +++ b/extra/efivar/build @@ -1,4 +1,6 @@ #!/bin/sh -e +patch -p1 < fix-gcc9-dp.h.patch +patch -p1 < fix-gcc9.patch make libdir=/usr/lib/ \ bindir=/usr/bin/ \ diff --git a/extra/efivar/checksums b/extra/efivar/checksums index 99d00323..119c5824 100644 --- a/extra/efivar/checksums +++ b/extra/efivar/checksums @@ -1 +1,3 @@ 3c67feb93f901b98fbb897d5ca82931a6698b5bcd6ac34f0815f670d77747b9f efivar-37.tar.bz2 +475ca086eecabeaaff6111c3e6766f7e31d88a4fb6e0d082e34201e2cfaf295a fix-gcc9-dp.h.patch +7e72f92eb0d03558b9b14ede6a68e29c0051ffe745a8c7a84d06dce6af458351 fix-gcc9.patch diff --git a/extra/efivar/patches/fix-gcc9-dp.h.patch b/extra/efivar/patches/fix-gcc9-dp.h.patch new file mode 100644 index 00000000..f40942f4 --- /dev/null +++ b/extra/efivar/patches/fix-gcc9-dp.h.patch @@ -0,0 +1,56 @@ +From b98ba8921010d03f46704a476c69861515deb1ca Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Mon, 7 Jan 2019 10:30:59 -0500 +Subject: [PATCH] dp.h: make format_guid() handle misaligned guid pointers + safely. + +GCC 9 adds -Werror=address-of-packed-member, which causes us to see the +build error reported at + https://bugzilla.opensuse.org/show_bug.cgi?id=1120862 . + +That bug report shows us the following: + +In file included from dp.c:26: +dp.h: In function 'format_vendor_helper': +dp.h:120:37: error: taking address of packed member of 'struct ' may result in an unaligned pointer value [-Werror=address-of-packed-member] + 120 | format_guid(buf, size, off, label, &dp->hw_vendor.vendor_guid); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +dp.h:74:25: note: in definition of macro 'format_guid' + 74 | _rc = efi_guid_to_str(guid, &_guidstr); \ + | ^~~~ +cc1: all warnings being treated as errors + +This patch makes format_guid() use a local variable as a bounce buffer +in the case that the guid we're passed is aligned as chaotic neutral. + +Note that this only fixes this instance and there may be others that bz +didn't show because it exited too soon, and I don't have a gcc 9 build +in front of me right now. + +Signed-off-by: Peter Jones +--- + src/dp.h | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/src/dp.h b/src/dp.h +index aa4e390..20cb608 100644 +--- a/src/dp.h ++++ b/src/dp.h +@@ -70,8 +70,15 @@ + #define format_guid(buf, size, off, dp_type, guid) ({ \ + int _rc; \ + char *_guidstr = NULL; \ +- \ +- _rc = efi_guid_to_str(guid, &_guidstr); \ ++ efi_guid_t _guid; \ ++ const efi_guid_t * const _guid_p = \ ++ likely(__alignof__(guid) == sizeof(guid)) \ ++ ? guid \ ++ : &_guid; \ ++ \ ++ if (unlikely(__alignof__(guid) == sizeof(guid))) \ ++ memmove(&_guid, guid, sizeof(_guid)); \ ++ _rc = efi_guid_to_str(_guid_p, &_guidstr); \ + if (_rc < 0) { \ + efi_error("could not build %s GUID DP string", \ + dp_type); \ diff --git a/extra/efivar/patches/fix-gcc9.patch b/extra/efivar/patches/fix-gcc9.patch new file mode 100644 index 00000000..bbb6a99a --- /dev/null +++ b/extra/efivar/patches/fix-gcc9.patch @@ -0,0 +1,168 @@ +From c3c553db85ff10890209d0fe48fb4856ad68e4e0 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Thu, 21 Feb 2019 15:20:12 -0500 +Subject: [PATCH] Fix all the places -Werror=address-of-packed-member catches. + +This gets rid of all the places GCC 9's -Werror=address-of-packed-member +flags as problematic. + +Fixes github issue #123 + +Signed-off-by: Peter Jones +--- + src/dp-message.c | 6 ++++-- + src/dp.h | 12 ++++-------- + src/guid.c | 2 +- + src/include/efivar/efivar.h | 2 +- + src/ucs2.h | 27 +++++++++++++++++++-------- + 5 files changed, 29 insertions(+), 20 deletions(-) + +diff --git a/src/dp-message.c b/src/dp-message.c +index 3724e5f..9f96466 100644 +--- a/src/dp-message.c ++++ b/src/dp-message.c +@@ -620,11 +620,13 @@ _format_message_dn(char *buf, size_t size, const_efidp dp) + ) / sizeof(efi_ip_addr_t); + format(buf, size, off, "Dns", "Dns("); + for (int i=0; i < end; i++) { +- const efi_ip_addr_t *addr = &dp->dns.addrs[i]; ++ efi_ip_addr_t addr; ++ ++ memcpy(&addr, &dp->dns.addrs[i], sizeof(addr)); + if (i != 0) + format(buf, size, off, "Dns", ","); + format_ip_addr(buf, size, off, "Dns", +- dp->dns.is_ipv6, addr); ++ dp->dns.is_ipv6, &addr); + } + format(buf, size, off, "Dns", ")"); + break; +diff --git a/src/dp.h b/src/dp.h +index 20cb608..1f921d5 100644 +--- a/src/dp.h ++++ b/src/dp.h +@@ -71,13 +71,9 @@ + int _rc; \ + char *_guidstr = NULL; \ + efi_guid_t _guid; \ +- const efi_guid_t * const _guid_p = \ +- likely(__alignof__(guid) == sizeof(guid)) \ +- ? guid \ +- : &_guid; \ +- \ +- if (unlikely(__alignof__(guid) == sizeof(guid))) \ +- memmove(&_guid, guid, sizeof(_guid)); \ ++ const efi_guid_t * const _guid_p = &_guid; \ ++ \ ++ memmove(&_guid, guid, sizeof(_guid)); \ + _rc = efi_guid_to_str(_guid_p, &_guidstr); \ + if (_rc < 0) { \ + efi_error("could not build %s GUID DP string", \ +@@ -86,7 +82,7 @@ + _guidstr = onstack(_guidstr, \ + strlen(_guidstr)+1); \ + _rc = format(buf, size, off, dp_type, "%s", \ +- _guidstr); \ ++ _guidstr); \ + } \ + _rc; \ + }) +diff --git a/src/guid.c b/src/guid.c +index 306c9ff..3156b3b 100644 +--- a/src/guid.c ++++ b/src/guid.c +@@ -31,7 +31,7 @@ + extern const efi_guid_t efi_guid_zero; + + int NONNULL(1, 2) PUBLIC +-efi_guid_cmp(const efi_guid_t *a, const efi_guid_t *b) ++efi_guid_cmp(const void * const a, const void * const b) + { + return memcmp(a, b, sizeof (efi_guid_t)); + } +diff --git a/src/include/efivar/efivar.h b/src/include/efivar/efivar.h +index 316891c..ad6449d 100644 +--- a/src/include/efivar/efivar.h ++++ b/src/include/efivar/efivar.h +@@ -128,7 +128,7 @@ extern int efi_symbol_to_guid(const char *symbol, efi_guid_t *guid) + + extern int efi_guid_is_zero(const efi_guid_t *guid); + extern int efi_guid_is_empty(const efi_guid_t *guid); +-extern int efi_guid_cmp(const efi_guid_t *a, const efi_guid_t *b); ++extern int efi_guid_cmp(const void * const a, const void * const b); + + /* import / export functions */ + typedef struct efi_variable efi_variable_t; +diff --git a/src/ucs2.h b/src/ucs2.h +index dbb5900..edd8367 100644 +--- a/src/ucs2.h ++++ b/src/ucs2.h +@@ -23,16 +23,21 @@ + (((val) & ((mask) << (shift))) >> (shift)) + + static inline size_t UNUSED +-ucs2len(const uint16_t * const s, ssize_t limit) ++ucs2len(const void *vs, ssize_t limit) + { + ssize_t i; +- for (i = 0; i < (limit >= 0 ? limit : i+1) && s[i] != (uint16_t)0; i++) ++ const uint16_t *s = vs; ++ const uint8_t *s8 = vs; ++ ++ for (i = 0; ++ i < (limit >= 0 ? limit : i+1) && s8[0] != 0 && s8[1] != 0; ++ i++, s8 += 2, s++) + ; + return i; + } + + static inline size_t UNUSED +-ucs2size(const uint16_t * const s, ssize_t limit) ++ucs2size(const void *s, ssize_t limit) + { + size_t rc = ucs2len(s, limit); + rc *= sizeof (uint16_t); +@@ -69,10 +74,11 @@ utf8size(uint8_t *s, ssize_t limit) + } + + static inline unsigned char * UNUSED +-ucs2_to_utf8(const uint16_t * const chars, ssize_t limit) ++ucs2_to_utf8(const void * const voidchars, ssize_t limit) + { + ssize_t i, j; + unsigned char *ret; ++ const uint16_t * const chars = voidchars; + + if (limit < 0) + limit = ucs2len(chars, -1); +@@ -124,10 +130,12 @@ ucs2_to_utf8(const uint16_t * const chars, ssize_t limit) + } + + static inline ssize_t UNUSED NONNULL(4) +-utf8_to_ucs2(uint16_t *ucs2, ssize_t size, int terminate, uint8_t *utf8) ++utf8_to_ucs2(void *ucs2void, ssize_t size, int terminate, uint8_t *utf8) + { + ssize_t req; + ssize_t i, j; ++ uint16_t *ucs2 = ucs2void; ++ uint16_t val16; + + if (!ucs2 && size > 0) { + errno = EINVAL; +@@ -162,10 +170,13 @@ utf8_to_ucs2(uint16_t *ucs2, ssize_t size, int terminate, uint8_t *utf8) + val = utf8[i] & 0x7f; + i += 1; + } +- ucs2[j] = val; ++ val16 = val; ++ ucs2[j] = val16; ++ } ++ if (terminate) { ++ val16 = 0; ++ ucs2[j++] = val16; + } +- if (terminate) +- ucs2[j++] = (uint16_t)0; + return j; + }; + diff --git a/extra/efivar/sources b/extra/efivar/sources index 0f98fa14..0f76dab3 100644 --- a/extra/efivar/sources +++ b/extra/efivar/sources @@ -1 +1,3 @@ https://github.com/rhboot/efivar/releases/download/37/efivar-37.tar.bz2 +patches/fix-gcc9-dp.h.patch +patches/fix-gcc9.patch diff --git a/extra/efivar/version b/extra/efivar/version index 4189655b..f1e16caf 100644 --- a/extra/efivar/version +++ b/extra/efivar/version @@ -1 +1 @@ -37 1 +37 2 diff --git a/core/gmp/build b/extra/gmp/build similarity index 100% rename from core/gmp/build rename to extra/gmp/build diff --git a/core/gmp/checksums b/extra/gmp/checksums similarity index 100% rename from core/gmp/checksums rename to extra/gmp/checksums diff --git a/core/gmp/depends b/extra/gmp/depends similarity index 100% rename from core/gmp/depends rename to extra/gmp/depends diff --git a/core/gmp/sources b/extra/gmp/sources similarity index 100% rename from core/gmp/sources rename to extra/gmp/sources diff --git a/core/gmp/version b/extra/gmp/version similarity index 100% rename from core/gmp/version rename to extra/gmp/version diff --git a/core/mpc1/build b/extra/mpc1/build similarity index 100% rename from core/mpc1/build rename to extra/mpc1/build diff --git a/core/mpc1/checksums b/extra/mpc1/checksums similarity index 100% rename from core/mpc1/checksums rename to extra/mpc1/checksums diff --git a/core/mpc1/depends b/extra/mpc1/depends similarity index 100% rename from core/mpc1/depends rename to extra/mpc1/depends diff --git a/core/mpc1/sources b/extra/mpc1/sources similarity index 100% rename from core/mpc1/sources rename to extra/mpc1/sources diff --git a/core/mpc1/version b/extra/mpc1/version similarity index 100% rename from core/mpc1/version rename to extra/mpc1/version diff --git a/core/mpfr/build b/extra/mpfr/build similarity index 100% rename from core/mpfr/build rename to extra/mpfr/build diff --git a/core/mpfr/checksums b/extra/mpfr/checksums similarity index 100% rename from core/mpfr/checksums rename to extra/mpfr/checksums diff --git a/core/mpfr/depends b/extra/mpfr/depends similarity index 100% rename from core/mpfr/depends rename to extra/mpfr/depends diff --git a/core/mpfr/sources b/extra/mpfr/sources similarity index 100% rename from core/mpfr/sources rename to extra/mpfr/sources diff --git a/core/mpfr/version b/extra/mpfr/version similarity index 100% rename from core/mpfr/version rename to extra/mpfr/version