summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/console-setup/APKBUILD4
-rw-r--r--system/docbook-xsl/APKBUILD32
-rw-r--r--system/gcc/006_as-needed-gold.patch58
-rw-r--r--system/gcc/201-ada.patch565
-rw-r--r--system/gcc/401-libsanitizer-linux.patch100
-rw-r--r--system/gcc/402-libsanitizer-utmp.patch75
-rw-r--r--system/gcc/APKBUILD12
-rw-r--r--system/gcc/ada-musl.patch137
-rw-r--r--system/iproute2/0001-f_flower-fix-build-with-musl-libc.patch28
-rw-r--r--system/iproute2/APKBUILD13
-rw-r--r--system/iproute2/devlink-sysinfo.patch43
-rw-r--r--system/iproute2/fix-uapi-garbage.patch22
-rw-r--r--system/lvm2/APKBUILD4
-rw-r--r--system/lz4/APKBUILD4
14 files changed, 889 insertions, 208 deletions
diff --git a/system/console-setup/APKBUILD b/system/console-setup/APKBUILD
index e833d66ef..519d9cffb 100644
--- a/system/console-setup/APKBUILD
+++ b/system/console-setup/APKBUILD
@@ -2,13 +2,13 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=console-setup
pkgver=1.191
-pkgrel=0
+pkgrel=1
pkgdesc="Set up console font and keyboard layout"
url="https://salsa.debian.org/installer-team/console-setup"
arch="noarch"
options="!check" # No test suite.
license="MIT AND GPL-2.0+ AND BSD-3-Clause"
-depends="kbd"
+depends="ckbcomp kbd"
makedepends="perl"
subpackages="$pkgname-doc console-fonts:fonts console-keymaps:keymaps
$pkgname-openrc ckbcomp"
diff --git a/system/docbook-xsl/APKBUILD b/system/docbook-xsl/APKBUILD
index 0482a76ef..ebfbf4dee 100644
--- a/system/docbook-xsl/APKBUILD
+++ b/system/docbook-xsl/APKBUILD
@@ -2,23 +2,25 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=docbook-xsl
pkgver=1.79.1
-pkgrel=2
+pkgrel=3
pkgdesc="XML stylesheets for Docbook-xml transformations."
url="http://docbook.sourceforge.net/"
arch="noarch"
options="!check" # Just XML files
license="MIT"
depends="libxml2-utils libxslt docbook-xml"
+subpackages="$pkgname-ns"
makedepends=""
install="$pkgname.post-install $pkgname.post-upgrade $pkgname.post-deinstall"
source="http://downloads.sourceforge.net/sourceforge/docbook/$pkgname-$pkgver.tar.bz2
+ https://downloads.sourceforge.net/project/docbook/docbook-xsl-ns/$pkgver/$pkgname-ns-$pkgver.tar.bz2
765567_non-recursive_string_subst.patch
"
package() {
cd "$builddir"
local _dest dir f
- _dest="$pkgdir"/usr/share/xml/docbook/xsl-stylesheets-$pkgver
+ _dest="$pkgdir"/usr/share/xml/docbook/xsl-stylesheets
install -dm755 "$_dest"
install -m644 VERSION VERSION.xsl "$_dest"/
@@ -40,5 +42,31 @@ package() {
"$pkgdir"/usr/share/licenses/$pkgname/COPYING
}
+ns() {
+ cd "$srcdir/${pkgname}-ns-${pkgver}"
+ local _dest dir f
+ _dest="$subpkgdir"/usr/share/xml/docbook/xsl-stylesheets-ns
+
+ install -dm755 "$_dest"
+ install -m644 VERSION VERSION.xsl "$_dest"/
+
+ for dir in assembly common eclipse epub epub3 fo highlighting html \
+ htmlhelp javahelp lib manpages params profiling roundtrip \
+ template website xhtml xhtml-1_1 xhtml5; do
+
+ install -dm755 $_dest/$dir
+ for f in $dir/*.xml $dir/*.xsl $dir/*.dtd $dir/*.ent; do
+ [ -e "$f" ] || continue
+ install -m644 $f $_dest/$dir
+ done
+ done
+
+ install -dm755 "$subpkgdir"/etc/xml
+
+ install -m644 -D COPYING \
+ "$subpkgdir"/usr/share/licenses/$pkgname/COPYING
+}
+
sha512sums="83325cbaf1545da6b9b8b77f5f0e6fdece26e3c455164b300a1aa3d19e3bd29ae71fd563553a714a5394968d1a65684c6c7987c77524469358d18b8c227025c7 docbook-xsl-1.79.1.tar.bz2
+23fd06870bd5afe4efcd08c8ad679821c202a62442b50657c093cbe9cd71b585a3c56a5534a0d41119f58bf98b1f9014a53ff2e48ab59075ec1827e7363980e9 docbook-xsl-ns-1.79.1.tar.bz2
6a26838078a3ce28273dddfa1af6a378cffc28b6d1ba48a4cfc839addd7bf58ce217d6584b735f9c75381954744ab2386c75fa3c593858b6e27882be55c00d04 765567_non-recursive_string_subst.patch"
diff --git a/system/gcc/006_as-needed-gold.patch b/system/gcc/006_as-needed-gold.patch
new file mode 100644
index 000000000..3dc0aee7a
--- /dev/null
+++ b/system/gcc/006_as-needed-gold.patch
@@ -0,0 +1,58 @@
+# DP: Use --push-state/--pop-state for gold as well when linking libtsan.
+
+Index: src/gcc/gcc.c
+===================================================================
+--- src/gcc/gcc.c
++++ src/gcc/gcc.c
+@@ -686,10 +686,10 @@ proper position among the other output f
+ #define LIBASAN_SPEC STATIC_LIBASAN_LIBS
+ #elif defined(HAVE_LD_STATIC_DYNAMIC)
+ #define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION "}" \
+- " %{!static-libasan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
++ " %{!static-libasan:--push-state --no-as-needed}" \
+ " -lasan " \
+ " %{static-libasan:" LD_DYNAMIC_OPTION "}" \
+- " %{!static-libasan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
++ " %{!static-libasan:--pop-state}" \
+ STATIC_LIBASAN_LIBS
+ #else
+ #define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS
+@@ -707,10 +707,10 @@ proper position among the other output f
+ #define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS
+ #elif defined(HAVE_LD_STATIC_DYNAMIC)
+ #define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION "}" \
+- " %{!static-libtsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
++ " %{!static-libtsan:--push-state --no-as-needed}" \
+ " -ltsan " \
+ " %{static-libtsan:" LD_DYNAMIC_OPTION "}" \
+- " %{!static-libtsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
++ " %{!static-libtsan:--pop-state}" \
+ STATIC_LIBTSAN_LIBS
+ #else
+ #define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS
+@@ -728,10 +728,10 @@ proper position among the other output f
+ #define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS
+ #elif defined(HAVE_LD_STATIC_DYNAMIC)
+ #define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION "}" \
+- " %{!static-liblsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
++ " %{!static-liblsan:--push-state --no-as-needed}" \
+ " -llsan " \
+ " %{static-liblsan:" LD_DYNAMIC_OPTION "}" \
+- " %{!static-liblsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
++ " %{!static-liblsan:--pop-state}" \
+ STATIC_LIBLSAN_LIBS
+ #else
+ #define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS
+@@ -747,10 +747,10 @@ proper position among the other output f
+ " %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}"
+ #ifdef HAVE_LD_STATIC_DYNAMIC
+ #define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION "}" \
+- " %{!static-libubsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
++ " %{!static-libubsan:--push-state --no-as-needed}" \
+ " -lubsan " \
+ " %{static-libubsan:" LD_DYNAMIC_OPTION "}" \
+- " %{!static-libubsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
++ " %{!static-libubsan:--pop-state}" \
+ STATIC_LIBUBSAN_LIBS
+ #else
+ #define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS
diff --git a/system/gcc/201-ada.patch b/system/gcc/201-ada.patch
new file mode 100644
index 000000000..acb1e1f1b
--- /dev/null
+++ b/system/gcc/201-ada.patch
@@ -0,0 +1,565 @@
+diff --git a/gcc/ada/adadecode.c b/gcc/ada/adadecode.c
+index a63b7e7641b0..92155ef2025a 100644
+--- a/gcc/ada/adadecode.c
++++ b/gcc/ada/adadecode.c
+@@ -29,6 +29,7 @@
+ * *
+ ****************************************************************************/
+
++#include "adaint.h" /* for a macro version of xstrdup. */
+
+ #if defined(IN_RTS)
+ #include "tconfig.h"
+@@ -42,8 +43,6 @@
+ #include <stdio.h>
+ #include <ctype.h>
+
+-#include "adaint.h" /* for a macro version of xstrdup. */
+-
+ #ifndef ISDIGIT
+ #define ISDIGIT(c) isdigit(c)
+ #endif
+diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
+index 414346558654..2586a1368903 100644
+--- a/gcc/ada/adaint.c
++++ b/gcc/ada/adaint.c
+@@ -85,6 +85,8 @@
+ #define _LARGEFILE64_SOURCE 1
+ #endif
+
++#include "adaint.h"
++
+ #ifdef IN_RTS
+ #include "tconfig.h"
+ #include "tsystem.h"
+@@ -202,8 +204,6 @@ UINT __gnat_current_ccs_encoding;
+ #include <utime.h>
+ #endif
+
+-#include "adaint.h"
+-
+ /* Define symbols O_BINARY and O_TEXT as harmless zeroes if they are not
+ defined in the current system. On DOS-like systems these flags control
+ whether the file is opened/created in text-translation mode (CR/LF in
+diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
+index 0d12f7e90209..74182446d4ac 100644
+--- a/gcc/ada/adaint.h
++++ b/gcc/ada/adaint.h
+@@ -316,6 +316,7 @@ extern void *__gnat_lwp_self (void);
+
+ /* Routines for interface to required CPU set primitives */
+
++#define _GNU_SOURCE
+ #include <sched.h>
+
+ extern cpu_set_t *__gnat_cpu_alloc (size_t);
+diff --git a/gcc/ada/argv.c b/gcc/ada/argv.c
+index f62cf1eb37dc..0b6c5fe6f0df 100644
+--- a/gcc/ada/argv.c
++++ b/gcc/ada/argv.c
+@@ -42,6 +42,8 @@
+ main program, and these routines are accessed from the
+ Ada.Command_Line.Environment package. */
+
++#include "adaint.h"
++
+ #ifdef IN_RTS
+ #include "tconfig.h"
+ #include "tsystem.h"
+@@ -51,8 +53,6 @@
+ #include "system.h"
+ #endif
+
+-#include "adaint.h"
+-
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+diff --git a/gcc/ada/cio.c b/gcc/ada/cio.c
+index ff97abe36ef1..56aa3477c8cd 100644
+--- a/gcc/ada/cio.c
++++ b/gcc/ada/cio.c
+@@ -29,6 +29,8 @@
+ * *
+ ****************************************************************************/
+
++#include "adaint.h"
++
+ #ifdef IN_RTS
+ #include "tconfig.h"
+ #include "tsystem.h"
+@@ -38,8 +40,6 @@
+ #include "system.h"
+ #endif
+
+-#include "adaint.h"
+-
+ /* We need L_tmpnam definition */
+ #include <stdio.h>
+
+diff --git a/gcc/ada/cstreams.c b/gcc/ada/cstreams.c
+index cdcb531e2b3f..dde6b9948089 100644
+--- a/gcc/ada/cstreams.c
++++ b/gcc/ada/cstreams.c
+@@ -52,6 +52,8 @@
+ #include "vxWorks.h"
+ #endif
+
++#include "adaint.h"
++
+ #ifdef IN_RTS
+ #include "tconfig.h"
+ #include "tsystem.h"
+@@ -61,8 +63,6 @@
+ #include "system.h"
+ #endif
+
+-#include "adaint.h"
+-
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+diff --git a/gcc/ada/exit.c b/gcc/ada/exit.c
+index 6274571c6f04..336b0f8f386b 100644
+--- a/gcc/ada/exit.c
++++ b/gcc/ada/exit.c
+@@ -33,6 +33,8 @@
+ #include "vxWorks.h"
+ #endif
+
++#include "adaint.h"
++
+ #ifdef IN_RTS
+ #include "tconfig.h"
+ #include "tsystem.h"
+@@ -42,8 +44,6 @@
+ #include "system.h"
+ #endif
+
+-#include "adaint.h"
+-
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
+index 0258f106d404..0416244ae428 100644
+--- a/gcc/ada/gcc-interface/Makefile.in
++++ b/gcc/ada/gcc-interface/Makefile.in
+@@ -1574,7 +1574,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
+ endif
+
+ # ARM linux, GNU eabi
+-ifeq ($(strip $(filter-out arm% linux-gnueabi%,$(target_cpu) $(target_os))),)
++ifeq ($(strip $(filter-out arm% linux-gnueabi% linux-musleabi% linux-muslgnueabi%,$(target_cpu) $(target_os))),)
+ LIBGNAT_TARGET_PAIRS = \
+ a-intnam.ads<libgnarl/a-intnam__linux.ads \
+ s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
+diff --git a/gcc/ada/init.c b/gcc/ada/init.c
+index 5088ecffc4f1..02a45b3ce7ca 100644
+--- a/gcc/ada/init.c
++++ b/gcc/ada/init.c
+@@ -53,6 +53,8 @@
+ #undef __linux__
+ #endif
+
++#include "adaint.h"
++
+ #ifdef IN_RTS
+ #include "tconfig.h"
+ #include "tsystem.h"
+@@ -65,7 +67,6 @@
+ #include "system.h"
+ #endif
+
+-#include "adaint.h"
+ #include "raise.h"
+
+ #ifdef __cplusplus
+diff --git a/gcc/ada/libgnarl/s-osinte__linux.ads b/gcc/ada/libgnarl/s-osinte__linux.ads
+index 5bf4a5fe1d26..c52cc70dfbab 100644
+--- a/gcc/ada/libgnarl/s-osinte__linux.ads
++++ b/gcc/ada/libgnarl/s-osinte__linux.ads
+@@ -394,12 +394,6 @@ package System.OS_Interface is
+ PTHREAD_RWLOCK_PREFER_WRITER_NP : constant := 1;
+ PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP : constant := 2;
+
+- function pthread_rwlockattr_setkind_np
+- (attr : access pthread_rwlockattr_t;
+- pref : int) return int;
+- pragma Import
+- (C, pthread_rwlockattr_setkind_np, "pthread_rwlockattr_setkind_np");
+-
+ function pthread_rwlock_init
+ (mutex : access pthread_rwlock_t;
+ attr : access pthread_rwlockattr_t) return int;
+@@ -464,11 +458,6 @@ package System.OS_Interface is
+ protocol : int) return int;
+ pragma Import (C, pthread_mutexattr_setprotocol);
+
+- function pthread_mutexattr_setprioceiling
+- (attr : access pthread_mutexattr_t;
+- prioceiling : int) return int;
+- pragma Import (C, pthread_mutexattr_setprioceiling);
+-
+ type struct_sched_param is record
+ sched_priority : int; -- scheduling priority
+ end record;
+diff --git a/gcc/ada/libgnarl/s-taprop__linux.adb b/gcc/ada/libgnarl/s-taprop__linux.adb
+index e55cd65e54f6..32d72b3980a6 100644
+--- a/gcc/ada/libgnarl/s-taprop__linux.adb
++++ b/gcc/ada/libgnarl/s-taprop__linux.adb
+@@ -202,9 +202,6 @@ package body System.Task_Primitives.Operations is
+ pragma Import
+ (C, GNAT_pthread_condattr_setup, "__gnat_pthread_condattr_setup");
+
+- function GNAT_has_cap_sys_nice return C.int;
+- pragma Import
+- (C, GNAT_has_cap_sys_nice, "__gnat_has_cap_sys_nice");
+ -- We do not have pragma Linker_Options ("-lcap"); here, because this
+ -- library is not present on many Linux systems. 'libcap' is the Linux
+ -- "capabilities" library, called by __gnat_has_cap_sys_nice.
+@@ -214,38 +211,6 @@ package body System.Task_Primitives.Operations is
+ -- Convert Ada priority to Linux priority. Priorities are 1 .. 99 on
+ -- GNU/Linux, so we map 0 .. 98 to 1 .. 99.
+
+- function Get_Ceiling_Support return Boolean;
+- -- Get the value of the Ceiling_Support constant (see below).
+- -- Note well: If this function or related code is modified, it should be
+- -- tested by hand, because automated testing doesn't exercise it.
+-
+- -------------------------
+- -- Get_Ceiling_Support --
+- -------------------------
+-
+- function Get_Ceiling_Support return Boolean is
+- Ceiling_Support : Boolean := False;
+- begin
+- if Locking_Policy /= 'C' then
+- return False;
+- end if;
+-
+- declare
+- function geteuid return Integer;
+- pragma Import (C, geteuid, "geteuid");
+- Superuser : constant Boolean := geteuid = 0;
+- Has_Cap : constant C.int := GNAT_has_cap_sys_nice;
+- pragma Assert (Has_Cap in 0 | 1);
+- begin
+- Ceiling_Support := Superuser or else Has_Cap = 1;
+- end;
+-
+- return Ceiling_Support;
+- end Get_Ceiling_Support;
+-
+- pragma Warnings (Off, "non-static call not allowed in preelaborated unit");
+- Ceiling_Support : constant Boolean := Get_Ceiling_Support;
+- pragma Warnings (On, "non-static call not allowed in preelaborated unit");
+ -- True if the locking policy is Ceiling_Locking, and the current process
+ -- has permission to use this policy. The process has permission if it is
+ -- running as 'root', or if the capability was set by the setcap command,
+@@ -348,7 +313,9 @@ package body System.Task_Primitives.Operations is
+ -- Init_Mutex --
+ ----------------
+
++ pragma Warnings (Off, "formal parameter * is not referenced");
+ function Init_Mutex (L : RTS_Lock_Ptr; Prio : Any_Priority) return C.int is
++ pragma Warnings (On, "formal parameter * is not referenced");
+ Mutex_Attr : aliased pthread_mutexattr_t;
+ Result, Result_2 : C.int;
+
+@@ -360,16 +327,7 @@ package body System.Task_Primitives.Operations is
+ return Result;
+ end if;
+
+- if Ceiling_Support then
+- Result := pthread_mutexattr_setprotocol
+- (Mutex_Attr'Access, PTHREAD_PRIO_PROTECT);
+- pragma Assert (Result = 0);
+-
+- Result := pthread_mutexattr_setprioceiling
+- (Mutex_Attr'Access, Prio_To_Linux_Prio (Prio));
+- pragma Assert (Result = 0);
+-
+- elsif Locking_Policy = 'I' then
++ if Locking_Policy = 'I' then
+ Result := pthread_mutexattr_setprotocol
+ (Mutex_Attr'Access, PTHREAD_PRIO_INHERIT);
+ pragma Assert (Result = 0);
+@@ -409,11 +367,6 @@ package body System.Task_Primitives.Operations is
+ Result := pthread_rwlockattr_init (RWlock_Attr'Access);
+ pragma Assert (Result = 0);
+
+- Result := pthread_rwlockattr_setkind_np
+- (RWlock_Attr'Access,
+- PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
+- pragma Assert (Result = 0);
+-
+ Result := pthread_rwlock_init (L.RW'Access, RWlock_Attr'Access);
+
+ pragma Assert (Result in 0 | ENOMEM);
+diff --git a/gcc/ada/libgnat/s-dwalin.adb b/gcc/ada/libgnat/s-dwalin.adb
+index a857b67132af..1e2bb4c545ad 100644
+--- a/gcc/ada/libgnat/s-dwalin.adb
++++ b/gcc/ada/libgnat/s-dwalin.adb
+@@ -382,7 +382,7 @@ package body System.Dwarf_Lines is
+
+ function Low (C : Dwarf_Context) return Address is
+ begin
+- return C.Low;
++ return To_Address (To_Integer (C.Low) + C.Load_Slide);
+ end Low;
+
+ ----------
+@@ -1210,19 +1210,21 @@ package body System.Dwarf_Lines is
+ -- Discard symbols whose length is 0
+ Sz := uint32 (Size (S));
+
+- -- Try to filter symbols at the same address. This is a best
+- -- effort as they might not be consecutive.
+- Addr := uint32 (Value (S) - uint64 (C.Low));
+- if Sz > 0 and then Addr /= Prev_Addr then
+- Nbr_Symbols := Nbr_Symbols + 1;
+- Prev_Addr := Addr;
+-
+- if Phase = 2 then
+- C.Cache (Nbr_Symbols) :=
+- (First => Addr,
+- Size => Sz,
+- Sym => uint32 (Off (S)),
+- Line => 0);
++ if Sz > 0 then
++ -- Try to filter symbols at the same address. This is a best
++ -- effort as they might not be consecutive.
++ Addr := uint32 (Value (S) - uint64 (C.Low));
++ if Addr /= Prev_Addr then
++ Nbr_Symbols := Nbr_Symbols + 1;
++ Prev_Addr := Addr;
++
++ if Phase = 2 then
++ C.Cache (Nbr_Symbols) :=
++ (First => Addr,
++ Size => Sz,
++ Sym => uint32 (Off (S)),
++ Line => 0);
++ end if;
+ end if;
+ end if;
+
+@@ -1267,6 +1269,10 @@ package body System.Dwarf_Lines is
+ -- Read table
+ loop
+ Read_Aranges_Entry (C, Ar_Start, Ar_Len);
++ -- Skip references to discarded sections
++ while Ar_Start = 0 and Ar_Len /= 0 loop
++ Read_Aranges_Entry (C, Ar_Start, Ar_Len);
++ end loop;
+ exit when Ar_Start = 0 and Ar_Len = 0;
+
+ Len := uint32 (Ar_Len);
+diff --git a/gcc/ada/libgnat/s-trasym__dwarf.adb b/gcc/ada/libgnat/s-trasym__dwarf.adb
+index db7c5eb4cdd8..3cd60ecbc37b 100644
+--- a/gcc/ada/libgnat/s-trasym__dwarf.adb
++++ b/gcc/ada/libgnat/s-trasym__dwarf.adb
+@@ -123,7 +123,8 @@ package body System.Traceback.Symbolic is
+ -- Return the String contained in Item, up until the first NUL character
+
+ pragma Warnings (Off, "*Add_Module_To_Cache*");
+- procedure Add_Module_To_Cache (Module_Name : String);
++ procedure Add_Module_To_Cache (Module_Name : String;
++ Load_Address : System.Address);
+ -- To be called by Build_Cache_For_All_Modules to add a new module to the
+ -- list. May not be referenced.
+
+@@ -217,12 +218,13 @@ package body System.Traceback.Symbolic is
+ -- Add_Module_To_Cache --
+ -------------------------
+
+- procedure Add_Module_To_Cache (Module_Name : String) is
++ procedure Add_Module_To_Cache (Module_Name : String;
++ Load_Address : System.Address) is
+ Module : Module_Cache_Acc;
+ Success : Boolean;
+ begin
+ Module := new Module_Cache;
+- Init_Module (Module.all, Success, Module_Name);
++ Init_Module (Module.all, Success, Module_Name, Load_Address);
+ if not Success then
+ Free (Module);
+ return;
+diff --git a/gcc/ada/libgnat/s-tsmona__linux.adb b/gcc/ada/libgnat/s-tsmona__linux.adb
+index cbebd0652048..c882aa64a6e2 100644
+--- a/gcc/ada/libgnat/s-tsmona__linux.adb
++++ b/gcc/ada/libgnat/s-tsmona__linux.adb
+@@ -87,45 +87,49 @@ package body Module_Name is
+ -- Build_Cache_For_All_Modules --
+ ---------------------------------
+
+- procedure Build_Cache_For_All_Modules is
+- type link_map;
+- type link_map_acc is access all link_map;
+- pragma Convention (C, link_map_acc);
+-
+- type link_map is record
+- l_addr : Address;
+- -- Base address of the shared object
+-
+- l_name : Address;
+- -- Null-terminated absolute file name
+-
+- l_ld : Address;
+- -- Dynamic section
+-
+- l_next, l_prev : link_map_acc;
+- -- Chain
+- end record;
+- pragma Convention (C, link_map);
+-
+- type r_debug_type is record
+- r_version : Integer;
+- r_map : link_map_acc;
+- end record;
+- pragma Convention (C, r_debug_type);
++ type dl_phdr_info is record
++ dlpi_addr : Address;
++ dlpi_name : Address;
++ dlpi_phdr : Address;
++ dlpi_phnum : unsigned_short;
++ end record;
++ pragma Convention (C, dl_phdr_info);
++
++ type Callback_Type is access function
++ (info : not null access dl_phdr_info;
++ size : size_t;
++ data : Address) return int;
++ pragma Convention (C, Callback_Type);
++
++ function Build_Cache_Callback
++ (info : not null access dl_phdr_info;
++ size : size_t;
++ data : Address) return int;
++ pragma Convention (C, Build_Cache_Callback);
++
++ function Build_Cache_Callback
++ (info : not null access dl_phdr_info;
++ size : size_t;
++ data : Address) return int is
++ pragma Unreferenced (size);
++ pragma Unreferenced (data);
++ begin
++ if Big_String_Conv.To_Pointer (info.dlpi_name) (1) /= ASCII.NUL then
++ -- Discard non-file (like the executable itself or the gate).
++ Add_Module_To_Cache (Value (info.dlpi_name), info.dlpi_addr);
++ end if;
++ return 0;
++ end Build_Cache_Callback;
+
+- r_debug : r_debug_type;
+- pragma Import (C, r_debug, "_r_debug");
++ function dl_iterate_phdr
++ (callback : Callback_Type;
++ data : Address) return int;
++ pragma Import (C, dl_iterate_phdr, "dl_iterate_phdr");
+
+- lm : link_map_acc;
++ procedure Build_Cache_For_All_Modules is
++ unused : int;
+ begin
+- lm := r_debug.r_map;
+- while lm /= null loop
+- if Big_String_Conv.To_Pointer (lm.l_name) (1) /= ASCII.NUL then
+- -- Discard non-file (like the executable itself or the gate).
+- Add_Module_To_Cache (Value (lm.l_name));
+- end if;
+- lm := lm.l_next;
+- end loop;
++ unused := dl_iterate_phdr (Build_Cache_Callback'Access, Null_Address);
+ end Build_Cache_For_All_Modules;
+
+ ---------
+diff --git a/gcc/ada/mkdir.c b/gcc/ada/mkdir.c
+index c101d968a851..43cdd51e8320 100644
+--- a/gcc/ada/mkdir.c
++++ b/gcc/ada/mkdir.c
+@@ -34,6 +34,8 @@
+ #include <version.h>
+ #endif /* __vxworks */
+
++#include "adaint.h"
++
+ #ifdef IN_RTS
+ #include "tconfig.h"
+ #include "tsystem.h"
+@@ -53,8 +55,6 @@
+ #endif
+ #endif
+
+-#include "adaint.h"
+-
+ /* This function provides a portable binding to the mkdir function. */
+
+ int
+diff --git a/gcc/ada/raise.c b/gcc/ada/raise.c
+index 70ad6cd3282a..eb92de1b2137 100644
+--- a/gcc/ada/raise.c
++++ b/gcc/ada/raise.c
+@@ -32,6 +32,8 @@
+ /* Shared routines to support exception handling. __gnat_unhandled_terminate
+ is shared between all exception handling mechanisms. */
+
++#include "adaint.h"
++
+ #ifdef IN_RTS
+ #include "tconfig.h"
+ #include "tsystem.h"
+@@ -40,7 +42,6 @@
+ #include "system.h"
+ #endif
+
+-#include "adaint.h"
+ #include "raise.h"
+
+ #ifdef __cplusplus
+diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c
+index 98b3901cb16f..98db6a14c2d5 100644
+--- a/gcc/ada/sysdep.c
++++ b/gcc/ada/sysdep.c
+@@ -52,6 +52,8 @@
+ #undef __linux__
+ #endif
+
++#include "adaint.h"
++
+ #ifdef IN_RTS
+ #define POSIX
+ #include "tconfig.h"
+@@ -72,8 +74,6 @@
+ extern struct tm *localtime_r(const time_t *, struct tm *);
+ #endif
+
+-#include "adaint.h"
+-
+ /* Don't use macros versions of this functions on VxWorks since they cause
+ imcompatible changes in some VxWorks versions */
+ #ifdef __vxworks
+diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c
+index 7025f57d645e..074845584958 100644
+--- a/gcc/ada/terminals.c
++++ b/gcc/ada/terminals.c
+@@ -1112,7 +1112,6 @@ __gnat_setup_winsize (void *desc, int rows, int columns)
+ (HP-UX) */
+ #if !defined (__hpux__) && !defined (BSD) && !defined (__APPLE__) \
+ && !defined (__rtems__) && !defined (__QNXNTO__)
+-# include <termio.h>
+ #endif
+
+ #include <sys/ioctl.h>
+@@ -1159,7 +1158,8 @@ __gnat_setup_winsize (void *desc, int rows, int columns)
+ #if defined (__APPLE__) || defined (BSD)
+ #define USE_OPENPTY
+ #elif defined (__linux__)
+-#define USE_GETPT
++#include <pty.h>
++#define USE_OPENPTY
+ #elif defined (__sun__)
+ #define USE_CLONE_DEVICE "/dev/ptmx"
+ #elif defined (_AIX)
diff --git a/system/gcc/401-libsanitizer-linux.patch b/system/gcc/401-libsanitizer-linux.patch
new file mode 100644
index 000000000..8a662a268
--- /dev/null
+++ b/system/gcc/401-libsanitizer-linux.patch
@@ -0,0 +1,100 @@
+--- gcc-8.3.0/libsanitizer/sanitizer_common/sanitizer_linux.cc.old 2017-10-19 11:23:59.000000000 +0000
++++ gcc-8.3.0/libsanitizer/sanitizer_common/sanitizer_linux.cc 2019-06-27 05:39:48.258332316 +0000
+@@ -752,7 +752,9 @@
+ }
+
+ #if SANITIZER_LINUX
++#ifndef SA_RESTORER
+ #define SA_RESTORER 0x04000000
++#endif
+ // Doesn't set sa_restorer if the caller did not set it, so use with caution
+ //(see below).
+ int internal_sigaction_norestorer(int signum, const void *act, void *oldact) {
+@@ -1687,65 +1689,59 @@
+ }
+
+ static void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) {
+-#if defined(__arm__)
+ ucontext_t *ucontext = (ucontext_t*)context;
++#if defined(__arm__)
+ *pc = ucontext->uc_mcontext.arm_pc;
+ *bp = ucontext->uc_mcontext.arm_fp;
+ *sp = ucontext->uc_mcontext.arm_sp;
+ #elif defined(__aarch64__)
+- ucontext_t *ucontext = (ucontext_t*)context;
+ *pc = ucontext->uc_mcontext.pc;
+ *bp = ucontext->uc_mcontext.regs[29];
+ *sp = ucontext->uc_mcontext.sp;
+ #elif defined(__hppa__)
+- ucontext_t *ucontext = (ucontext_t*)context;
+ *pc = ucontext->uc_mcontext.sc_iaoq[0];
+ /* GCC uses %r3 whenever a frame pointer is needed. */
+ *bp = ucontext->uc_mcontext.sc_gr[3];
+ *sp = ucontext->uc_mcontext.sc_gr[30];
+ #elif defined(__x86_64__)
+ # if SANITIZER_FREEBSD
+- ucontext_t *ucontext = (ucontext_t*)context;
+ *pc = ucontext->uc_mcontext.mc_rip;
+ *bp = ucontext->uc_mcontext.mc_rbp;
+ *sp = ucontext->uc_mcontext.mc_rsp;
+ #elif SANITIZER_NETBSD
+- ucontext_t *ucontext = (ucontext_t *)context;
+ *pc = ucontext->uc_mcontext.__gregs[_REG_RIP];
+ *bp = ucontext->uc_mcontext.__gregs[_REG_RBP];
+ *sp = ucontext->uc_mcontext.__gregs[_REG_RSP];
+ # else
+- ucontext_t *ucontext = (ucontext_t*)context;
+ *pc = ucontext->uc_mcontext.gregs[REG_RIP];
+ *bp = ucontext->uc_mcontext.gregs[REG_RBP];
+ *sp = ucontext->uc_mcontext.gregs[REG_RSP];
+ # endif
+ #elif defined(__i386__)
+ # if SANITIZER_FREEBSD
+- ucontext_t *ucontext = (ucontext_t*)context;
+ *pc = ucontext->uc_mcontext.mc_eip;
+ *bp = ucontext->uc_mcontext.mc_ebp;
+ *sp = ucontext->uc_mcontext.mc_esp;
+ #elif SANITIZER_NETBSD
+- ucontext_t *ucontext = (ucontext_t *)context;
+ *pc = ucontext->uc_mcontext.__gregs[_REG_EIP];
+ *bp = ucontext->uc_mcontext.__gregs[_REG_EBP];
+ *sp = ucontext->uc_mcontext.__gregs[_REG_ESP];
+ # else
+- ucontext_t *ucontext = (ucontext_t*)context;
+ *pc = ucontext->uc_mcontext.gregs[REG_EIP];
+ *bp = ucontext->uc_mcontext.gregs[REG_EBP];
+ *sp = ucontext->uc_mcontext.gregs[REG_ESP];
+ # endif
+-#elif defined(__powerpc__) || defined(__powerpc64__)
+- ucontext_t *ucontext = (ucontext_t*)context;
+- *pc = ucontext->uc_mcontext.regs->nip;
+- *sp = ucontext->uc_mcontext.regs->gpr[PT_R1];
++#elif defined(__powerpc64__)
++ *pc = ucontext->uc_mcontext.gp_regs[32];
++ *sp = ucontext->uc_mcontext.gp_regs[1];
++ *bp = ucontext->uc_mcontext.gp_regs[31];
++#elif defined(__powerpc__)
++ *pc = ucontext->uc_mcontext.gregs[32];
++ *sp = ucontext->uc_mcontext.gregs[1];
+ // The powerpc{,64}-linux ABIs do not specify r31 as the frame
+ // pointer, but GCC always uses r31 when we need a frame pointer.
+- *bp = ucontext->uc_mcontext.regs->gpr[PT_R31];
++ *bp = ucontext->uc_mcontext.gregs[31];
+ #elif defined(__sparc__)
+- ucontext_t *ucontext = (ucontext_t*)context;
+ uptr *stk_ptr;
+ # if defined (__arch64__)
+ *pc = ucontext->uc_mcontext.mc_gregs[MC_PC];
+@@ -1759,12 +1755,10 @@
+ *bp = stk_ptr[15];
+ # endif
+ #elif defined(__mips__)
+- ucontext_t *ucontext = (ucontext_t*)context;
+ *pc = ucontext->uc_mcontext.pc;
+ *bp = ucontext->uc_mcontext.gregs[30];
+ *sp = ucontext->uc_mcontext.gregs[29];
+ #elif defined(__s390__)
+- ucontext_t *ucontext = (ucontext_t*)context;
+ # if defined(__s390x__)
+ *pc = ucontext->uc_mcontext.psw.addr;
+ # else
diff --git a/system/gcc/402-libsanitizer-utmp.patch b/system/gcc/402-libsanitizer-utmp.patch
new file mode 100644
index 000000000..7929cd8b9
--- /dev/null
+++ b/system/gcc/402-libsanitizer-utmp.patch
@@ -0,0 +1,75 @@
+--- gcc-8.3.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc.old 2018-05-31 09:58:32.000000000 +0000
++++ gcc-8.3.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc 2019-06-27 08:52:53.520080465 +0000
+@@ -43,9 +43,6 @@
+ #include <termios.h>
+ #include <time.h>
+ #include <wchar.h>
+-#if !SANITIZER_MAC && !SANITIZER_FREEBSD
+-#include <utmp.h>
+-#endif
+
+ #if !SANITIZER_IOS
+ #include <net/route.h>
+@@ -291,9 +288,6 @@
+ int shmctl_shm_stat = (int)SHM_STAT;
+ #endif
+
+-#if !SANITIZER_MAC && !SANITIZER_FREEBSD
+- unsigned struct_utmp_sz = sizeof(struct utmp);
+-#endif
+ #if !SANITIZER_ANDROID
+ unsigned struct_utmpx_sz = sizeof(struct utmpx);
+ #endif
+--- gcc-8.3.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h.old 2017-10-19 11:23:59.000000000 +0000
++++ gcc-8.3.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h 2019-06-27 08:53:41.114993442 +0000
+@@ -873,9 +873,6 @@
+ extern int shmctl_shm_stat;
+ #endif
+
+-#if !SANITIZER_MAC && !SANITIZER_FREEBSD
+- extern unsigned struct_utmp_sz;
+-#endif
+ #if !SANITIZER_ANDROID
+ extern unsigned struct_utmpx_sz;
+ #endif
+--- gcc-8.3.0/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc.old 2017-10-19 11:23:59.000000000 +0000
++++ gcc-8.3.0/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc 2019-06-27 08:54:20.530780618 +0000
+@@ -6106,38 +6106,7 @@
+
+ // FIXME: add other *stat interceptor
+
+-#if SANITIZER_INTERCEPT_UTMP
+-INTERCEPTOR(void *, getutent, int dummy) {
+- void *ctx;
+- COMMON_INTERCEPTOR_ENTER(ctx, getutent, dummy);
+- void *res = REAL(getutent)(dummy);
+- if (res)
+- COMMON_INTERCEPTOR_INITIALIZE_RANGE(res, __sanitizer::struct_utmp_sz);
+- return res;
+-}
+-INTERCEPTOR(void *, getutid, void *ut) {
+- void *ctx;
+- COMMON_INTERCEPTOR_ENTER(ctx, getutid, ut);
+- void *res = REAL(getutid)(ut);
+- if (res)
+- COMMON_INTERCEPTOR_INITIALIZE_RANGE(res, __sanitizer::struct_utmp_sz);
+- return res;
+-}
+-INTERCEPTOR(void *, getutline, void *ut) {
+- void *ctx;
+- COMMON_INTERCEPTOR_ENTER(ctx, getutline, ut);
+- void *res = REAL(getutline)(ut);
+- if (res)
+- COMMON_INTERCEPTOR_INITIALIZE_RANGE(res, __sanitizer::struct_utmp_sz);
+- return res;
+-}
+-#define INIT_UTMP \
+- COMMON_INTERCEPT_FUNCTION(getutent); \
+- COMMON_INTERCEPT_FUNCTION(getutid); \
+- COMMON_INTERCEPT_FUNCTION(getutline);
+-#else
+ #define INIT_UTMP
+-#endif
+
+ #if SANITIZER_INTERCEPT_UTMPX
+ INTERCEPTOR(void *, getutxent, int dummy) {
diff --git a/system/gcc/APKBUILD b/system/gcc/APKBUILD
index 2ab149205..5eaae5163 100644
--- a/system/gcc/APKBUILD
+++ b/system/gcc/APKBUILD
@@ -6,7 +6,7 @@ pkgver=8.3.0
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
pkgname="$pkgname$_target"
-pkgrel=0
+pkgrel=1
pkgdesc="The GNU Compiler Collection"
url="https://gcc.gnu.org"
arch="all"
@@ -26,7 +26,7 @@ options="$options !check !dbg strip toolchain"
: ${LANG_OBJC:=true}
: ${LANG_GO:=true}
: ${LANG_FORTRAN:=true}
-: ${LANG_ADA:=false}
+: ${LANG_ADA:=true}
LIBGOMP=true
LIBGCC=true
@@ -149,11 +149,13 @@ source="https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz
002_all_default-relro.patch
005_all_default-as-needed.patch
+ 006_as-needed-gold.patch
011_all_default-warn-format-security.patch
012_all_default-warn-trampolines.patch
020_all_msgfmt-libstdc++-link.patch
051_all_libiberty-pic.patch
+ 201-ada.patch
205-nopie.patch
libgcc-always-build-gcceh.a.patch
@@ -163,7 +165,6 @@ source="https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz
fix-cxxflags-passing.patch
ada-shared.patch
- ada-musl.patch
320-libffi-gnulinux.patch
330-gccgo-link-to-ucontext.patch
@@ -244,7 +245,7 @@ build() {
case "$CTARGET_LIBC" in
musl)
- # musl does not support mudflap, or libsanitizer
+ # musl does not support mudflap
# libmpx uses secure_getenv and struct _libc_fpstate not present in musl
_libc_configure="--disable-libmpx --disable-libmudflap --disable-libsanitizer"
_symvers="--disable-symvers"
@@ -546,10 +547,12 @@ cd3ba928121e8578ba9f73215e4d81ee3ebbab33e00b04cdfd62b46d21f9536297ae12dc021aad6e
dfedf48829cff22ee836ece743de20ad467b40e86c8f4034326a4c32df35b10affd69d6b9ab3382df2871a99ad0c2e99d4342183b59f9bca7f15112eed58ec8d 0016-invalid-tls-model.patch
625c02e03c2f1db04da12cc6a086ec85790a031a13df36486243fd9569cd17f7c8ebeec91ac16cc1f87c3ec1ffe4c421153e98a9aeb5eea35943a6f015d81f50 002_all_default-relro.patch
02b725b220e540077efef741e9d457f9e004fe53ae642a138e214875d076a60f7c2f27de0ed9a4225db2030fc9c3d2c5b0414c895b9eec0f5f48fad70e2fb029 005_all_default-as-needed.patch
+9073a5ae46e46a44a77adba183db301194a3666afca07a8444a4c10dc2c087dd41d6065a051b1024454bb37bee06fabf4361e5fae62dab8d4c9620520924f606 006_as-needed-gold.patch
622fdbcbbf2feb86bd839af627ec3613c6d2c77b14d37d31165b19f73f45b3663a203efff5d224f194edb15eb62d3d5885e32f85d1b584f071e580fea4e12664 011_all_default-warn-format-security.patch
03cddde56b2a355f08716c8efcd5616606d42946c87831d77d55570636c46e351e81a04c7dabd3466d9406c40476bead857cfe1eceaf7f0d86dd2757c8cf4a9e 012_all_default-warn-trampolines.patch
d35a3ac7e13a4446921a90e1ff3eec1079840c845f9d523c868e24ae21f94cf69ba041de5341ebef96432a6f57598e223381d4286e8fb8baaa25906707f29fbd 020_all_msgfmt-libstdc++-link.patch
0a0bc72b9366158f5d23fff1928e756fdd212433bac6ab1f00d632f241382820db8db5d475ddf11ea020eaf7e2e71b12fb9b1c3c870cf84adf6c2b16f15aabca 051_all_libiberty-pic.patch
+a3702c1f642412413d0ffc69f6439a3e101b2b56c16610f94c66556c88e52d01b0b6d1e57bfc5a972668f976c02fbf2fc22bcf707b000867e44744d9eb7b7566 201-ada.patch
98473bcaa77903a223ca9b0d2087c0921b287a2816d308cc32c8fe009e6cbf5dd1ae7fba27794ab8d9c09e117fe534413d91a464d1218474fc123ce0adfdc2c1 205-nopie.patch
d08d7ead2de0429e5c9055d5b029ec2be9a8c821d22cecaf9b51f633652c493333f98963d9267fa2fa63850c50ae5eefd5f59e5910ec10d20044dac082182a8b libgcc-always-build-gcceh.a.patch
600fe5098dc54edaa9808fd5717af9dec058953f9ad37d49cfba1db4f7e9a7a8f02019342f75157fc575946fa693259422184de27b7ecc8386d9f3ecc0f7cc5d gcc-4.9-musl-fortify.patch
@@ -557,7 +560,6 @@ dbe0ee917fc7668571722364ab7c806731e3a31e8bfa30b4941b28b16b877d2a32b4a3897ef53339
fa62556719449caec6b2b434355bfbcaa5ae55ffe017b3e1f827f66a2aae21b79c571ee7a4ce723ea69169bc3a6447e73650991a200cc372adf2f102677518d7 gcc-pure64.patch
35d6d59f0b7b968f282f56767c9e0823a7bdc5aa0d450aca50fbd802649a7ca608b47671244a3faa208a9b0d6832cabb5a22724157dc817b2c0ad63d09f93282 fix-cxxflags-passing.patch
3f5bc334d9f73d06f5f7c876738d02356acdd08958bea0e4d2095ebf15c2c2ec4e411abdae0297505ae9a1699ca01b17338e853184e84663203b192b0d35fc19 ada-shared.patch
-631d4bdef6d8bde34df7978bb53ec28c3c909cf1f87139e5f148138d0f09adc58b41ecf0148bbf50fb4bc916c411e9bf8a2b6c046c75c0e77d754d8c35bcd4d7 ada-musl.patch
f4ef08454e28c8732db69115e4998ec153399e8d229dd27f923dbdcf57b68128a65640d026cc7f45b58ba8764ab1eb575d4eb6d6dfc550a87a183f8b94e76181 320-libffi-gnulinux.patch
8efd028febb962ae100be32f72f7450c4f77d67ad96a5f47072136cdf47043f9d54835a87c7ab5aaa0fa0108c4c7a97ba2d7732d5aaf2efce70fe1f7e1c39d6e 330-gccgo-link-to-ucontext.patch
24c8708f64b9b7945b3f07e9bbecf17ab8bcde2524f49cbd694ca2f6146ccc3f13bb027db282f326525ea79d50a2868fa3fa2b0d688a914b5ea77bbfd7e5cbe4 331-gccgo-use-real-off_t-type.patch
diff --git a/system/gcc/ada-musl.patch b/system/gcc/ada-musl.patch
deleted file mode 100644
index 464c3d57d..000000000
--- a/system/gcc/ada-musl.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-diff -rup gcc-5.1.0/gcc.orig/ada/adaint.c gcc-5.1.0/gcc/ada/adaint.c
---- gcc-5.1.0/gcc.orig/ada/adaint.c 2015-02-20 11:48:57.000000000 +0000
-+++ gcc-5.1.0/gcc/ada/adaint.c 2015-06-02 10:47:51.672767476 +0000
-@@ -70,6 +70,11 @@
- #include <sys/param.h>
- #include <sys/pstat.h>
- #endif
-+
-+#if defined (linux)
-+#define _GNU_SOURCE 1
-+#include <sched.h>
-+#endif
-
- #ifdef __PikeOS__
- #define __BSD_VISIBLE 1
-@@ -3057,8 +3062,6 @@ __gnat_lwp_self (void)
- return (void *) syscall (__NR_gettid);
- }
-
--#include <sched.h>
--
- /* glibc versions earlier than 2.7 do not define the routines to handle
- dynamically allocated CPU sets. For these targets, we use the static
- versions. */
-@@ -3067,7 +3070,7 @@ __gnat_lwp_self (void)
-
- /* Dynamic cpu sets */
-
--cpu_set_t *
-+void *
- __gnat_cpu_alloc (size_t count)
- {
- return CPU_ALLOC (count);
-@@ -3080,33 +3083,33 @@ __gnat_cpu_alloc_size (size_t count)
- }
-
- void
--__gnat_cpu_free (cpu_set_t *set)
-+__gnat_cpu_free (void *set)
- {
-- CPU_FREE (set);
-+ CPU_FREE ((cpu_set_t *) set);
- }
-
- void
--__gnat_cpu_zero (size_t count, cpu_set_t *set)
-+__gnat_cpu_zero (size_t count, void *set)
- {
-- CPU_ZERO_S (count, set);
-+ CPU_ZERO_S (count, (cpu_set_t *) set);
- }
-
- void
--__gnat_cpu_set (int cpu, size_t count, cpu_set_t *set)
-+__gnat_cpu_set (int cpu, size_t count, void *set)
- {
- /* Ada handles CPU numbers starting from 1, while C identifies the first
- CPU by a 0, so we need to adjust. */
-- CPU_SET_S (cpu - 1, count, set);
-+ CPU_SET_S (cpu - 1, count, (cpu_set_t *) set);
- }
-
- #else /* !CPU_ALLOC */
-
- /* Static cpu sets */
-
--cpu_set_t *
-+void *
- __gnat_cpu_alloc (size_t count ATTRIBUTE_UNUSED)
- {
-- return (cpu_set_t *) xmalloc (sizeof (cpu_set_t));
-+ return xmalloc (sizeof (cpu_set_t));
- }
-
- size_t
-@@ -3116,23 +3119,23 @@ __gnat_cpu_alloc_size (size_t count ATTR
- }
-
- void
--__gnat_cpu_free (cpu_set_t *set)
-+__gnat_cpu_free (void *set)
- {
- free (set);
- }
-
- void
--__gnat_cpu_zero (size_t count ATTRIBUTE_UNUSED, cpu_set_t *set)
-+__gnat_cpu_zero (size_t count ATTRIBUTE_UNUSED, void *set)
- {
-- CPU_ZERO (set);
-+ CPU_ZERO ((cpu_set_t *) set);
- }
-
- void
--__gnat_cpu_set (int cpu, size_t count ATTRIBUTE_UNUSED, cpu_set_t *set)
-+__gnat_cpu_set (int cpu, size_t count ATTRIBUTE_UNUSED, void *set)
- {
- /* Ada handles CPU numbers starting from 1, while C identifies the first
- CPU by a 0, so we need to adjust. */
-- CPU_SET (cpu - 1, set);
-+ CPU_SET (cpu - 1, (cpu_set_t *) set);
- }
- #endif /* !CPU_ALLOC */
- #endif /* linux */
-diff -rup gcc-5.1.0/gcc.orig/ada/adaint.h gcc-5.1.0/gcc/ada/adaint.h
---- gcc-5.1.0/gcc.orig/ada/adaint.h 2015-01-27 17:20:27.000000000 +0000
-+++ gcc-5.1.0/gcc/ada/adaint.h 2015-06-02 10:47:23.188910894 +0000
-@@ -287,13 +287,11 @@ extern void *__gnat_lwp_self (voi
-
- /* Routines for interface to required CPU set primitives */
-
--#include <sched.h>
--
--extern cpu_set_t *__gnat_cpu_alloc (size_t);
-+extern void * __gnat_cpu_alloc (size_t);
- extern size_t __gnat_cpu_alloc_size (size_t);
--extern void __gnat_cpu_free (cpu_set_t *);
--extern void __gnat_cpu_zero (size_t, cpu_set_t *);
--extern void __gnat_cpu_set (int, size_t, cpu_set_t *);
-+extern void __gnat_cpu_free (void *);
-+extern void __gnat_cpu_zero (size_t, void *);
-+extern void __gnat_cpu_set (int, size_t, void *);
- #endif
-
- #if defined (_WIN32)
-diff -rup gcc-5.1.0/gcc.orig/ada/gcc-interface/Makefile.in gcc-5.1.0/gcc/ada/gcc-interface/Makefile.in
---- gcc-5.1.0/gcc.orig/ada/gcc-interface/Makefile.in 2015-04-09 20:29:28.000000000 +0000
-+++ gcc-5.1.0/gcc/ada/gcc-interface/Makefile.in 2015-06-02 10:47:23.188910894 +0000
-@@ -1910,7 +1910,7 @@ ifeq ($(strip $(filter-out powerpc% linu
- endif
-
- # ARM linux, GNU eabi
--ifeq ($(strip $(filter-out arm% linux-gnueabi%,$(target_cpu) $(target_os))),)
-+ifeq ($(strip $(filter-out arm% linux-gnueabi% linux-musleabi% linux-muslgnueabi%,$(target_cpu) $(target_os))),)
- LIBGNAT_TARGET_PAIRS = \
- a-intnam.ads<a-intnam-linux.ads \
- s-inmaop.adb<s-inmaop-posix.adb \
diff --git a/system/iproute2/0001-f_flower-fix-build-with-musl-libc.patch b/system/iproute2/0001-f_flower-fix-build-with-musl-libc.patch
deleted file mode 100644
index 8a51affe5..000000000
--- a/system/iproute2/0001-f_flower-fix-build-with-musl-libc.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 28747146622a49c3e7b5c5b36dc02c6a64124770 Mon Sep 17 00:00:00 2001
-From: Hans Dedecker <dedeckeh@gmail.com>
-Date: Wed, 23 Jan 2019 22:02:31 +0100
-Subject: [PATCH] f_flower: fix build with musl libc
-
-XATTR_SIZE_MAX requires the usage of linux/limits.h; let's include it
-
-Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
-Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
----
- tc/f_flower.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/tc/f_flower.c b/tc/f_flower.c
-index c5636667..9659e894 100644
---- a/tc/f_flower.c
-+++ b/tc/f_flower.c
-@@ -14,6 +14,7 @@
- #include <unistd.h>
- #include <string.h>
- #include <net/if.h>
-+#include <linux/limits.h>
- #include <linux/if_arp.h>
- #include <linux/if_ether.h>
- #include <linux/ip.h>
---
-2.19.2
-
diff --git a/system/iproute2/APKBUILD b/system/iproute2/APKBUILD
index 500a49f18..4b4b6060c 100644
--- a/system/iproute2/APKBUILD
+++ b/system/iproute2/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=iproute2
-pkgver=4.20.0
+pkgver=5.1.0
pkgrel=0
pkgdesc="IP configuration, routing, and traffic control utilities"
url="https://wiki.linuxfoundation.org/networking/iproute2"
@@ -10,13 +10,11 @@ arch="all"
options="!check"
license="GPL-2.0-only"
depends=""
-makedepends="bison flex bash libelf-dev libmnl-dev libcap-dev"
+makedepends="bison flex bash libelf-dev libmnl-dev libcap-dev bsd-compat-headers"
install="$pkgname.post-install"
subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch"
source="https://kernel.org/pub/linux/utils/net/iproute2/iproute2-$pkgver.tar.xz
- fix-uapi-garbage.patch
- 0001-f_flower-fix-build-with-musl-libc.patch
- "
+ devlink-sysinfo.patch"
prepare() {
default_prepare
@@ -54,6 +52,5 @@ bashcomp() {
rmdir -p "$pkgdir"/usr/share 2>/dev/null || true
}
-sha512sums="ed29638c864062e199152c7b3b24b6495987ca6f79cc9ab1b529dab37a8a840fa2b5858d5db2b94eeefa1c0d72ff666a790107e27d11a597b189bfb7a01a4b8b iproute2-4.20.0.tar.xz
-d9b40539f4ac074f20b0bb10381de9c3b64aadf612f0d599814cdb632fe97c76c9b4730406b08a6e53739670ca51ea0f699862156247cf20c3b7f4c78394fa46 fix-uapi-garbage.patch
-b6b5dc65fb4ffff06978c160446bcc79f4f242c94d0ba44890f3b01d86640f56e7cc32efbc0b2bbfce1ae5fd40252ba9ddbb59ff91e54a4de1d4274d48260b2c 0001-f_flower-fix-build-with-musl-libc.patch"
+sha512sums="5c8319b040bd0ba98cf1225b2a77efafc662741344c53877ee38cf108ca01906b03328e4f9b00b7557e301c6e64bca4e42e92af477b4d657bcbff5120c0c4e87 iproute2-5.1.0.tar.xz
+3585c70d110749e0bdba7f1bbdc32c7d635147026fbb9662f63dfcca2405e8a45cc990cb6ad38b6405cde23a1535a59ff854387ae1649b4241597ec71f445e20 devlink-sysinfo.patch"
diff --git a/system/iproute2/devlink-sysinfo.patch b/system/iproute2/devlink-sysinfo.patch
new file mode 100644
index 000000000..316fcefae
--- /dev/null
+++ b/system/iproute2/devlink-sysinfo.patch
@@ -0,0 +1,43 @@
+Since commit 2f1242efe9d ("devlink: Add devlink health show command") we
+use the sys/sysinfo.h header for the sysinfo(2) system call. But since
+iproute2 carries a local version of the kernel struct sysinfo, this
+causes a collision with libc that do not rely on kernel defined sysinfo
+like musl libc:
+
+In file included from devlink.c:25:0:
+.../sysroot/usr/include/sys/sysinfo.h:10:8: error: redefinition of 'struct sysinfo'
+ struct sysinfo {
+ ^~~~~~~
+In file included from ../include/uapi/linux/kernel.h:5:0,
+ from ../include/uapi/linux/netlink.h:5,
+ from ../include/uapi/linux/genetlink.h:6,
+ from devlink.c:21:
+../include/uapi/linux/sysinfo.h:8:8: note: originally defined here
+ struct sysinfo {
+ ^~~~~~~
+
+Rely on the kernel header alone to avoid kernel and userspace headers
+collision of definitions.
+
+Cc: Aya Levin <ayal@xxxxxxxxxxxx>
+Cc: Moshe Shemesh <moshe@xxxxxxxxxxxx>
+Signed-off-by: Baruch Siach <baruch@xxxxxxxxxx>
+---
+ devlink/devlink.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/devlink/devlink.c b/devlink/devlink.c
+index 436935f88bda..d7a6ce94f0e6 100644
+--- a/devlink/devlink.c
++++ b/devlink/devlink.c
+@@ -22,7 +22,7 @@
+ #include <linux/devlink.h>
+ #include <libmnl/libmnl.h>
+ #include <netinet/ether.h>
+-#include <sys/sysinfo.h>
++#include <linux/sysinfo.h>
+ #include <sys/queue.h>
+
+ #include "SNAPSHOT.h"
+--
+2.20.1 \ No newline at end of file
diff --git a/system/iproute2/fix-uapi-garbage.patch b/system/iproute2/fix-uapi-garbage.patch
deleted file mode 100644
index 9f899ebb0..000000000
--- a/system/iproute2/fix-uapi-garbage.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- iproute2-4.17.0/rdma/rdma.h 2018-06-08 12:11:50.000000000 -0500
-+++ iproute2-4.17.0/rdma/rdma.h 2018-06-25 23:26:35.811455508 -0500
-@@ -16,15 +16,16 @@
- #include <errno.h>
- #include <getopt.h>
- #include <libmnl/libmnl.h>
--#include <rdma/rdma_netlink.h>
--#include <rdma/rdma_user_cm.h>
- #include <time.h>
--#include <net/if_arp.h>
-
- #include "list.h"
- #include "utils.h"
- #include "json_writer.h"
-
-+#include <rdma/rdma_netlink.h>
-+#include <rdma/rdma_user_cm.h>
-+#include <net/if_arp.h>
-+
- #define pr_err(args...) fprintf(stderr, ##args)
- #define pr_out(args...) fprintf(stdout, ##args)
-
diff --git a/system/lvm2/APKBUILD b/system/lvm2/APKBUILD
index efb73d48f..8287d3813 100644
--- a/system/lvm2/APKBUILD
+++ b/system/lvm2/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=lvm2
-pkgver=2.03.02
+pkgver=2.03.05
pkgrel=0
pkgdesc="Logical Volume Manager 2 utilities"
url="https://sourceware.org/lvm2/"
@@ -105,7 +105,7 @@ dm_event_libs() {
mv "$pkgdir"/lib/libdevmapper-event.so.* "$subpkgdir"/lib/
}
-sha512sums="b8ccd96a98bee36272492ed056aa0bd65e074e476f29d6e5562ff4604a18326cbf40a7948f2c37d8d4758a1403c3c98106f2698e1e2ba5e014e4cb91aeb3cf90 LVM2.2.03.02.tgz
+sha512sums="3b00f53771e99faa6459ae73353bff06ae37c64bd2659586ec25d0bb43bc3ff8ba5f713c68617fd7662a5f6cb65bca1ad0aea554819048d79c1cce20bf67c50a LVM2.2.03.05.tgz
6ea4efad03f8632f2883f33f9d9f8ca295f7d8d2aa1bfbfa7738e7d711727a511758848dde5776b222bd74e6fb60bed8b56a3cd2f74ca448b8d86f50470a42b9 fix-stdio-usage.patch
9272ec8c5184ef5dc776ead8f74132e072b7563b5119a3a38b712f00d92a1e3878c9b3a54eb2b01dcba038110c686b39d4c17ecd0eb258537e9217d7ed03c408 mallinfo.patch
33004594a5cce7af1e493a2a66ce8ad2f864dde3b2ec0960d0fda9df9b7bcf65d9455f9eccf7860f48726c48f14111b843b0a0c9bd395ef2952b41aaab8092b2 library_dir-default-config.patch
diff --git a/system/lz4/APKBUILD b/system/lz4/APKBUILD
index b7c8a56b7..281c3248c 100644
--- a/system/lz4/APKBUILD
+++ b/system/lz4/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=lz4
-pkgver=1.8.3
+pkgver=1.9.1
pkgrel=0
pkgdesc="LZ4: Extremely Fast Compression algorithm"
url="https://github.com/lz4/lz4"
@@ -27,4 +27,4 @@ package() {
make PREFIX="/usr" DESTDIR="$pkgdir" install
}
-sha512sums="5d284f75a0c4ad11ebc4abb4394d98c863436da0718d62f648ef2e2cda8e5adf47617a4b43594375f7b0b673541a9ccfaf73880a55fd240986594558214dbf9f lz4-1.8.3.tar.gz"
+sha512sums="536cdeb6dd73b4769cf9501ad312b004ab01699758534b47ca2eddbc815fd374a3caba40cde36f73a7a70e134065836b733e2b0c023c31740b877ef9317ccf3e lz4-1.9.1.tar.gz"