summaryrefslogtreecommitdiffstats
path: root/bsp/meta-synopsys
diff options
context:
space:
mode:
Diffstat (limited to 'bsp/meta-synopsys')
-rw-r--r--bsp/meta-synopsys/conf/layer.conf2
-rw-r--r--bsp/meta-synopsys/conf/machine/hsdk.conf2
-rw-r--r--bsp/meta-synopsys/conf/machine/include/arch-arc.inc4
-rw-r--r--bsp/meta-synopsys/recipes-core/expat/expat_2.2.6.bbappend1
-rw-r--r--bsp/meta-synopsys/recipes-core/glibc/files/0031-Add-ARC-architecture.patch8475
-rw-r--r--bsp/meta-synopsys/recipes-core/glibc/files/0032-Add-with-nonshared-cflags-option-to-configure.patch162
-rw-r--r--bsp/meta-synopsys/recipes-core/glibc/glibc-initial_2.28.bbappend4
-rw-r--r--bsp/meta-synopsys/recipes-core/glibc/glibc_2.28.bbappend4
-rw-r--r--bsp/meta-synopsys/recipes-core/glibc/glibc_2.31.bbappend33
-rw-r--r--bsp/meta-synopsys/recipes-core/systemd/files/0001-network-fix-static-assertion-on-IPPROTO_MAX-range.patch74
-rw-r--r--bsp/meta-synopsys/recipes-core/systemd/systemd-conf.bbappend6
-rw-r--r--bsp/meta-synopsys/recipes-core/systemd/systemd-conf/0001-Add-MESA_LOADER_DRIVER_OVERRIDE-imx-drm-env-to-etc-s.patch27
-rw-r--r--bsp/meta-synopsys/recipes-core/systemd/systemd_244.3.bbappend4
-rw-r--r--bsp/meta-synopsys/recipes-core/util-linux/util-linux_%.bbappend1
-rw-r--r--bsp/meta-synopsys/recipes-devtools/binutils/binutils-arc.inc6
-rw-r--r--bsp/meta-synopsys/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch29
-rw-r--r--bsp/meta-synopsys/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch26
-rw-r--r--bsp/meta-synopsys/recipes-devtools/binutils/binutils_arc.bb2
-rw-r--r--bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc.inc11
-rw-r--r--bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0003-gcc-poison-system-directories.patch65
-rw-r--r--bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0007-optional-libstdc.patch38
-rw-r--r--bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0012-cpp-honor-sysroot.patch22
-rw-r--r--bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0014-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch63
-rw-r--r--bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0037-sync-gcc-stddef.h-with-musl.patch32
-rw-r--r--bsp/meta-synopsys/recipes-devtools/gcc/gcc-cross-initial_arc.bb2
-rw-r--r--bsp/meta-synopsys/recipes-devtools/gcc/gcc-crosssdk-initial_arc.bb2
-rw-r--r--bsp/meta-synopsys/recipes-devtools/gcc/libgcc_arc.bb7
l---------bsp/meta-synopsys/recipes-devtools/gcc/ltmain.sh1
-rw-r--r--bsp/meta-synopsys/recipes-devtools/meson/files/0001-mesonbuild-Recognise-ARC-architecture.patch39
-rw-r--r--bsp/meta-synopsys/recipes-devtools/meson/meson_0.47.2.bbappend2
-rw-r--r--bsp/meta-synopsys/recipes-extended/mozjs/mozjs/0001-Add-ARC-CPU-support.patch48
-rw-r--r--bsp/meta-synopsys/recipes-extended/mozjs/mozjs/0001-arc-Disable-atomic-operations.patch42
-rw-r--r--bsp/meta-synopsys/recipes-extended/mozjs/mozjs_60.9.0.bbappend (renamed from bsp/meta-synopsys/recipes-extended/mozjs/mozjs_52.9.1.bbappend)1
-rw-r--r--bsp/meta-synopsys/recipes-graphics/mesa/mesa_%.bbappend2
-rw-r--r--bsp/meta-synopsys/recipes-graphics/wayland/agl-compositor_git.bbappend6
-rw-r--r--bsp/meta-synopsys/recipes-graphics/wayland/files/0001-Fix-build-with-GCC9.patch26
-rw-r--r--bsp/meta-synopsys/recipes-graphics/wayland/weston/1001-os-compatibility-define-CLOCK_BOOTTIME-when-not-avai.patch41
-rw-r--r--bsp/meta-synopsys/recipes-graphics/wayland/weston/1005-protocol-add-weston-debug.xml.patch242
-rw-r--r--bsp/meta-synopsys/recipes-graphics/wayland/weston/1006-libweston-add-weston_debug-API-and-implementation.patch958
-rw-r--r--bsp/meta-synopsys/recipes-graphics/wayland/weston/1007-compositor-add-option-to-enable-weston_debug.patch87
-rw-r--r--bsp/meta-synopsys/recipes-graphics/wayland/weston/1010-xwm-dump_property-to-use-FILE-internally.patch141
-rw-r--r--bsp/meta-synopsys/recipes-graphics/wayland/weston/1011-xwm-move-FILE-to-the-callers-of-dump_property.patch267
-rw-r--r--bsp/meta-synopsys/recipes-graphics/wayland/weston/1012-xwm-convert-WM_DEBUG-into-a-weston-debug-scope.patch423
-rw-r--r--bsp/meta-synopsys/recipes-graphics/wayland/weston/1014-compositor-Add-weston_layer_mask_is_infinite.patch52
-rw-r--r--bsp/meta-synopsys/recipes-graphics/wayland/weston/1015-compositor-Add-scene-graph-debug-scope.patch297
-rw-r--r--bsp/meta-synopsys/recipes-graphics/wayland/weston/1017-compositor-drm-Add-backend-pointer-to-drm_output.patch37
-rw-r--r--bsp/meta-synopsys/recipes-graphics/wayland/weston/1018-compositor-drm-Add-drm-backend-log-debug-scope.patch632
-rw-r--r--bsp/meta-synopsys/recipes-graphics/wayland/weston/1046-compositor-drm-Read-FB2_MODIFIERS-capability.patch89
-rw-r--r--bsp/meta-synopsys/recipes-graphics/wayland/weston_5.0.0.bbappend16
-rw-r--r--bsp/meta-synopsys/recipes-kernel/linux-firmware/linux-firmware_%.bbappend (renamed from bsp/meta-synopsys/recipes-kernel/linux-firmware/linux-firmware_git.bbappend)0
-rw-r--r--bsp/meta-synopsys/recipes-kernel/linux/linux-arc.inc24
-rw-r--r--bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0009-UDL-add-pseudo-deferred-io-for-modeset-drive.patch79
-rw-r--r--bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0010-UDL-defio-add-fb-lock-and-required-checks.patch54
-rw-r--r--bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0011-ARC-hsdk-Enable-U-Boot-support.patch28
-rw-r--r--bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0012-ARC-hsdk-Enable-cgroups-support.patch27
-rw-r--r--bsp/meta-synopsys/recipes-kernel/linux/linux-arc_4.19.9.bb4
-rw-r--r--bsp/meta-synopsys/recipes-kernel/linux/linux-arc_5.3.15.bb6
-rw-r--r--bsp/meta-synopsys/recipes-kernel/linux/linux-yocto_%.bbappend9
-rw-r--r--bsp/meta-synopsys/recipes-multimedia/pulseaudio/pulseaudio_13.0.bbappend (renamed from bsp/meta-synopsys/recipes-multimedia/pulseaudio/pulseaudio_12.2.bbappend)0
-rw-r--r--bsp/meta-synopsys/recipes-navigation/gpsd/gpsd_%.bbappend2
-rw-r--r--bsp/meta-synopsys/recipes-platform/images/agl-demo-platform-crosssdk.bbappend1
-rw-r--r--bsp/meta-synopsys/recipes-qt/qt5/qtbase/0001-Add-ARC-support-in-double-conversion.patch22
-rw-r--r--bsp/meta-synopsys/recipes-qt/qt5/qtbase_git.bbappend7
-rw-r--r--bsp/meta-synopsys/recipes-support/gnupg/gnupg_2.2.%.bbappend1
-rw-r--r--bsp/meta-synopsys/recipes-support/libgpg-error/libgpg-error_1.37.bbappend (renamed from bsp/meta-synopsys/recipes-support/libgpg-error/libgpg-error_1.32.bbappend)0
-rw-r--r--bsp/meta-synopsys/recipes-support/liburcu/liburcu_0.11.%.bbappend (renamed from bsp/meta-synopsys/recipes-support/liburcu/liburcu_0.10.%.bbappend)0
66 files changed, 590 insertions, 12227 deletions
diff --git a/bsp/meta-synopsys/conf/layer.conf b/bsp/meta-synopsys/conf/layer.conf
index 005bbf67..6d4e526c 100644
--- a/bsp/meta-synopsys/conf/layer.conf
+++ b/bsp/meta-synopsys/conf/layer.conf
@@ -11,7 +11,7 @@ BBFILE_PRIORITY_synopsys = "6"
# This should only be incremented on significant changes that will
# cause compatibility issues with other layers
LAYERVERSION_synopsys = "1"
-LAYERSERIES_COMPAT_synopsys-layer = "sumo thud"
+LAYERSERIES_COMPAT_synopsys-layer = "zeus dunfell"
LAYERDEPENDS_synopsys = "core"
BBFILES += "${@' '.join('${LAYERDIR}/dynamic-layers/%s/recipes*/*/*.bbappend' % layer \
diff --git a/bsp/meta-synopsys/conf/machine/hsdk.conf b/bsp/meta-synopsys/conf/machine/hsdk.conf
index 18f020f3..d6b3bd5a 100644
--- a/bsp/meta-synopsys/conf/machine/hsdk.conf
+++ b/bsp/meta-synopsys/conf/machine/hsdk.conf
@@ -4,7 +4,7 @@ SERIAL_CONSOLES = "115200;ttyS0"
KERNEL_IMAGETYPE = "uImage"
-WKS_FILE ?= "hsdk-bootpart.wks"
+WKS_FILE ?= "sdimage-hsdk.wks"
IMAGE_FSTYPES += "wic"
IMAGE_BOOT_FILES ?= "uImage uboot.env"
IMAGE_INSTALL_append += " u-boot"
diff --git a/bsp/meta-synopsys/conf/machine/include/arch-arc.inc b/bsp/meta-synopsys/conf/machine/include/arch-arc.inc
index 01831a46..0dce7128 100644
--- a/bsp/meta-synopsys/conf/machine/include/arch-arc.inc
+++ b/bsp/meta-synopsys/conf/machine/include/arch-arc.inc
@@ -4,7 +4,9 @@ TUNE_ARCH = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'arceb', 'arc',
MACHINE_FEATURES_BACKFILL_CONSIDERED_append = " qemu-usermode"
-PREFERRED_PROVIDER_virtual/kernel ?= "linux-arc"
+# In order to use newer/custom Linux version change
+# "linux-yocto" below to "linux-arc"
+PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
# Otherwise huge binaries (>32MiB) might fail to link due to
# limitation of 25-bit R_ARC_S25H_PCREL_PLT relocation
diff --git a/bsp/meta-synopsys/recipes-core/expat/expat_2.2.6.bbappend b/bsp/meta-synopsys/recipes-core/expat/expat_2.2.6.bbappend
deleted file mode 100644
index 59ef6dd7..00000000
--- a/bsp/meta-synopsys/recipes-core/expat/expat_2.2.6.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-CFLAGS_append = " -O1"
diff --git a/bsp/meta-synopsys/recipes-core/glibc/files/0031-Add-ARC-architecture.patch b/bsp/meta-synopsys/recipes-core/glibc/files/0031-Add-ARC-architecture.patch
deleted file mode 100644
index 46f8de8e..00000000
--- a/bsp/meta-synopsys/recipes-core/glibc/files/0031-Add-ARC-architecture.patch
+++ /dev/null
@@ -1,8475 +0,0 @@
-glibc: Update to arc-2018.09-rc2 tag
-
-This was generated from Synopsys GitHub Glibc WIP fork [1] this way:
------------------>8-----------------
-git diff glibc-2.28..arc-2018.09-rc2 ':!NEWS'
------------------>8-----------------
-
-[1] https://github.com/foss-for-synopsys-dwc-arc-processors/glibc
-
-Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
-
-Upstream-Status: Pending
----
-diff --git a/elf/elf.h b/elf/elf.h
-index 7e2b072a7f75..5b0b20d58934 100644
---- a/elf/elf.h
-+++ b/elf/elf.h
-@@ -330,7 +330,7 @@ typedef struct
- #define EM_CLOUDSHIELD 192 /* CloudShield */
- #define EM_COREA_1ST 193 /* KIPO-KAIST Core-A 1st gen. */
- #define EM_COREA_2ND 194 /* KIPO-KAIST Core-A 2nd gen. */
--#define EM_ARC_COMPACT2 195 /* Synopsys ARCompact V2 */
-+#define EM_ARCV2 195 /* Synopsys ARCv2 ISA */
- #define EM_OPEN8 196 /* Open8 RISC */
- #define EM_RL78 197 /* Renesas RL78 */
- #define EM_VIDEOCORE5 198 /* Broadcom VideoCore V */
-@@ -3925,6 +3925,74 @@ enum
- #define R_NDS32_TLS_TPOFF 102
- #define R_NDS32_TLS_DESC 119
-
-+/* ARCompact/ARCv2 specific relocs */
-+#define R_ARC_NONE 0x0
-+#define R_ARC_8 0x1
-+#define R_ARC_16 0x2
-+#define R_ARC_24 0x3
-+#define R_ARC_32 0x4
-+#define R_ARC_B26 0x5
-+#define R_ARC_B22_PCREL 0x6
-+#define R_ARC_H30 0x7
-+#define R_ARC_N8 0x8
-+#define R_ARC_N16 0x9
-+#define R_ARC_N24 0xA
-+#define R_ARC_N32 0xB
-+#define R_ARC_SDA 0xC
-+#define R_ARC_SECTOFF 0xD
-+#define R_ARC_S21H_PCREL 0xE
-+#define R_ARC_S21W_PCREL 0xF
-+#define R_ARC_S25H_PCREL 0x10
-+#define R_ARC_S25W_PCREL 0x11
-+#define R_ARC_SDA32 0x12
-+#define R_ARC_SDA_LDST 0x13
-+#define R_ARC_SDA_LDST1 0x14
-+#define R_ARC_SDA_LDST2 0x15
-+#define R_ARC_SDA16_LD 0x16
-+#define R_ARC_SDA16_LD1 0x17
-+#define R_ARC_SDA16_LD2 0x18
-+#define R_ARC_S13_PCREL 0x19
-+#define R_ARC_W 0x1A
-+#define R_ARC_32_ME 0x1B
-+#define R_ARC_N32_ME 0x1C
-+#define R_ARC_SECTOFF_ME 0x1D
-+#define R_ARC_SDA32_ME 0x1E
-+#define R_ARC_W_ME 0x1F
-+#define R_ARC_H30_ME 0x20
-+#define R_ARC_SECTOFF_U8 0x21
-+#define R_ARC_SECTOFF_S9 0x22
-+#define R_AC_SECTOFF_U8 0x23
-+#define R_AC_SECTOFF_U8_1 0x24
-+#define R_AC_SECTOFF_U8_2 0x25
-+#define R_AC_SECTOFF_S9 0x26
-+#define R_AC_SECTOFF_S9_1 0x27
-+#define R_AC_SECTOFF_S9_2 0x28
-+#define R_ARC_SECTOFF_ME_1 0x29
-+#define R_ARC_SECTOFF_ME_2 0x2A
-+#define R_ARC_SECTOFF_1 0x2B
-+#define R_ARC_SECTOFF_2 0x2C
-+#define R_ARC_PC32 0x32
-+#define R_ARC_GOTPC32 0x33
-+#define R_ARC_PLT32 0x34
-+#define R_ARC_COPY 0x35
-+#define R_ARC_GLOB_DAT 0x36
-+#define R_ARC_JUMP_SLOT 0x37
-+#define R_ARC_RELATIVE 0x38
-+#define R_ARC_GOTOFF 0x39
-+#define R_ARC_GOTPC 0x3A
-+#define R_ARC_GOT32 0x3B
-+
-+#define R_ARC_TLS_DTPMOD 0x42
-+#define R_ARC_TLS_DTPOFF 0x43
-+#define R_ARC_TLS_TPOFF 0x44
-+#define R_ARC_TLS_GD_GOT 0x45
-+#define R_ARC_TLS_GD_LD 0x46
-+#define R_ARC_TLS_GD_CALL 0x47
-+#define R_ARC_TLS_IE_GOT 0x48
-+#define R_ARC_TLS_DTPOFF_S9 0x4a
-+#define R_ARC_TLS_LE_S9 0x4a
-+#define R_ARC_TLS_LE_32 0x4b
-+
- __END_DECLS
-
- #endif /* elf.h */
-diff --git a/posix/tst-getaddrinfo4.c b/posix/tst-getaddrinfo4.c
-index dc9e423448af..0139dee777a1 100644
---- a/posix/tst-getaddrinfo4.c
-+++ b/posix/tst-getaddrinfo4.c
-@@ -39,6 +39,7 @@ try (const char *service, int family, int flags)
- case 0:
- case EAI_AGAIN:
- case EAI_NONAME:
-+ case EAI_NODATA:
- printf ("SUCCESS getaddrinfo(service=%s, family=%d, flags=%d): %s: %m\n",
- service ?: "NULL", family, flags, gai_strerror (res));
- return 0;
-diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
-index 8ef463f57ad6..07171a7ad7b7 100755
---- a/scripts/build-many-glibcs.py
-+++ b/scripts/build-many-glibcs.py
-@@ -165,6 +165,9 @@ class Context(object):
- 'cfg': ['--disable-multi-arch']}])
- self.add_config(arch='aarch64_be',
- os_name='linux-gnu')
-+ self.add_config(arch='arc',
-+ os_name='linux-gnu',
-+ gcc_cfg=['--disable-multilib', '--with-cpu=archs'])
- self.add_config(arch='alpha',
- os_name='linux-gnu')
- self.add_config(arch='arm',
-@@ -778,13 +781,13 @@ class Context(object):
- git_branch = 'binutils-%s-branch' % version.translate(trans)
- return self.git_checkout(component, git_url, git_branch, update)
- elif component == 'gcc':
-+ git_url = 'git://gcc.gnu.org/git/gcc.git'
- if version == 'mainline':
-- branch = 'trunk'
-+ branch = 'master'
- else:
- trans = str.maketrans({'.': '_'})
-- branch = 'branches/gcc-%s-branch' % version.translate(trans)
-- svn_url = 'svn://gcc.gnu.org/svn/gcc/%s' % branch
-- return self.gcc_checkout(svn_url, update)
-+ branch = 'gcc-%s-branch' % version.translate(trans)
-+ return self.git_checkout(component, git_url, branch, update)
- elif component == 'glibc':
- git_url = 'git://sourceware.org/git/glibc.git'
- if version == 'mainline':
-@@ -1245,6 +1248,7 @@ class Config(object):
- def install_linux_headers(self, cmdlist):
- """Install Linux kernel headers."""
- arch_map = {'aarch64': 'arm64',
-+ 'arc': 'arc',
- 'alpha': 'alpha',
- 'arm': 'arm',
- 'hppa': 'parisc',
-@@ -1640,11 +1644,11 @@ def get_parser():
- parser = argparse.ArgumentParser(description=__doc__)
- parser.add_argument('-j', dest='parallelism',
- help='Run this number of jobs in parallel',
-- type=int, default=os.cpu_count())
-+ type=int, default=1)
- parser.add_argument('--keep', dest='keep',
- help='Whether to keep all build directories, '
- 'none or only those from failed builds',
-- default='none', choices=('none', 'all', 'failed'))
-+ default='all', choices=('none', 'all', 'failed'))
- parser.add_argument('--replace-sources', action='store_true',
- help='Remove and replace source directories '
- 'with the wrong version of a component')
-diff --git a/stdlib/longlong.h b/stdlib/longlong.h
-index c7c6977c9fd6..fb982dd530c9 100644
---- a/stdlib/longlong.h
-+++ b/stdlib/longlong.h
-@@ -197,17 +197,17 @@ extern UDItype __udiv_qrnnd (UDItype *, UDItype, UDItype, UDItype);
- : "=r" ((USItype) (sh)), \
- "=&r" ((USItype) (sl)) \
- : "%r" ((USItype) (ah)), \
-- "rIJ" ((USItype) (bh)), \
-+ "rICal" ((USItype) (bh)), \
- "%r" ((USItype) (al)), \
-- "rIJ" ((USItype) (bl)))
-+ "rICal" ((USItype) (bl)))
- #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
- __asm__ ("sub.f %1, %4, %5\n\tsbc %0, %2, %3" \
- : "=r" ((USItype) (sh)), \
- "=&r" ((USItype) (sl)) \
- : "r" ((USItype) (ah)), \
-- "rIJ" ((USItype) (bh)), \
-+ "rICal" ((USItype) (bh)), \
- "r" ((USItype) (al)), \
-- "rIJ" ((USItype) (bl)))
-+ "rICal" ((USItype) (bl)))
-
- #define __umulsidi3(u,v) ((UDItype)(USItype)u*(USItype)v)
- #ifdef __ARC_NORM__
-@@ -221,8 +221,8 @@ extern UDItype __udiv_qrnnd (UDItype *, UDItype, UDItype, UDItype);
- } \
- while (0)
- #define COUNT_LEADING_ZEROS_0 32
--#endif
--#endif
-+#endif /* __ARC_NORM__ */
-+#endif /* __arc__ */
-
- #if defined (__arm__) && (defined (__thumb2__) || !defined (__thumb__)) \
- && W_TYPE_SIZE == 32
-@@ -858,42 +858,6 @@ extern UDItype __umulsidi3 (USItype, USItype);
- #endif
- #endif /* __mips__ */
-
--#if defined (__ns32000__) && W_TYPE_SIZE == 32
--#define umul_ppmm(w1, w0, u, v) \
-- ({union {UDItype __ll; \
-- struct {USItype __l, __h;} __i; \
-- } __xx; \
-- __asm__ ("meid %2,%0" \
-- : "=g" (__xx.__ll) \
-- : "%0" ((USItype) (u)), \
-- "g" ((USItype) (v))); \
-- (w1) = __xx.__i.__h; (w0) = __xx.__i.__l;})
--#define __umulsidi3(u, v) \
-- ({UDItype __w; \
-- __asm__ ("meid %2,%0" \
-- : "=g" (__w) \
-- : "%0" ((USItype) (u)), \
-- "g" ((USItype) (v))); \
-- __w; })
--#define udiv_qrnnd(q, r, n1, n0, d) \
-- ({union {UDItype __ll; \
-- struct {USItype __l, __h;} __i; \
-- } __xx; \
-- __xx.__i.__h = (n1); __xx.__i.__l = (n0); \
-- __asm__ ("deid %2,%0" \
-- : "=g" (__xx.__ll) \
-- : "0" (__xx.__ll), \
-- "g" ((USItype) (d))); \
-- (r) = __xx.__i.__l; (q) = __xx.__i.__h; })
--#define count_trailing_zeros(count,x) \
-- do { \
-- __asm__ ("ffsd %2,%0" \
-- : "=r" ((USItype) (count)) \
-- : "0" ((USItype) 0), \
-- "r" ((USItype) (x))); \
-- } while (0)
--#endif /* __ns32000__ */
--
- /* FIXME: We should test _IBMR2 here when we add assembly support for the
- system vendor compilers.
- FIXME: What's needed for gcc PowerPC VxWorks? __vxworks__ is not good
-@@ -1086,7 +1050,7 @@ extern UDItype __umulsidi3 (USItype, USItype);
- } while (0)
- #endif
-
--#if defined(__sh__) && (!defined (__SHMEDIA__) || !__SHMEDIA__) && W_TYPE_SIZE == 32
-+#if defined(__sh__) && W_TYPE_SIZE == 32
- #ifndef __sh1__
- #define umul_ppmm(w1, w0, u, v) \
- __asm__ ( \
-@@ -1159,21 +1123,6 @@ extern UDItype __umulsidi3 (USItype, USItype);
-
- #endif /* __sh__ */
-
--#if defined (__SH5__) && defined (__SHMEDIA__) && __SHMEDIA__ && W_TYPE_SIZE == 32
--#define __umulsidi3(u,v) ((UDItype)(USItype)u*(USItype)v)
--#define count_leading_zeros(count, x) \
-- do \
-- { \
-- UDItype x_ = (USItype)(x); \
-- SItype c_; \
-- \
-- __asm__ ("nsb %1, %0" : "=r" (c_) : "r" (x_)); \
-- (count) = c_ - 31; \
-- } \
-- while (0)
--#define COUNT_LEADING_ZEROS_0 32
--#endif
--
- #if defined (__sparc__) && !defined (__arch64__) && !defined (__sparcv9) \
- && W_TYPE_SIZE == 32
- #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
-diff --git a/sysdeps/arc/Implies b/sysdeps/arc/Implies
-new file mode 100644
-index 000000000000..7d69983412d8
---- /dev/null
-+++ b/sysdeps/arc/Implies
-@@ -0,0 +1,4 @@
-+wordsize-32
-+ieee754/soft-fp
-+ieee754/dbl-64
-+ieee754/flt-32
-diff --git a/sysdeps/arc/Makefile b/sysdeps/arc/Makefile
-new file mode 100644
-index 000000000000..a88eda115b95
---- /dev/null
-+++ b/sysdeps/arc/Makefile
-@@ -0,0 +1,25 @@
-+# ARC Makefile
-+# Copyright (C) 1993-2018 Free Software Foundation, Inc.
-+# This file is part of the GNU C Library.
-+
-+# The GNU C Library is free software; you can redistribute it and/or
-+# modify it under the terms of the GNU Lesser General Public
-+# License as published by the Free Software Foundation; either
-+# version 2.1 of the License, or (at your option) any later version.
-+
-+# The GNU C Library is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+# Lesser General Public License for more details.
-+
-+# You should have received a copy of the GNU Lesser General Public
-+# License along with the GNU C Library. If not, see
-+# <http://www.gnu.org/licenses/>.
-+
-+# We don't support long doubles as a distinct type. We don't need to set
-+# this variable; it's here mostly for documentational purposes.
-+long-double-fcts = no
-+
-+ifeq ($(subdir),debug)
-+CFLAGS-backtrace.c += -funwind-tables
-+endif
-diff --git a/sysdeps/arc/Versions b/sysdeps/arc/Versions
-new file mode 100644
-index 000000000000..1041bccc1f1a
---- /dev/null
-+++ b/sysdeps/arc/Versions
-@@ -0,0 +1,14 @@
-+libc {
-+ GLIBC_2.27 {
-+ __adddf3; __addsf3; __divdf3; __divsf3; __eqdf2; __eqsf2; __extendsfdf2;
-+ __fixdfdi; __fixdfsi; __fixsfdi; __fixsfsi;
-+ __fixunsdfdi; __fixunsdfsi; __fixunssfdi; __fixunssfsi;
-+ __floatdidf; __floatdisf; __floatsidf; __floatsisf;
-+ __floatundidf; __floatundisf; __floatunsidf; __floatunsisf;
-+ __gedf2; __gesf2; __gtdf2; __gtsf2; __ledf2; __lesf2; __ltdf2; __ltsf2;
-+ __muldf3; __mulsf3; __nedf2; __nesf2; __negdf2; __negsf2;
-+ __subdf3; __subsf3; __truncdfsf2; __unorddf2; __unordsf2;
-+ __syscall_error;
-+ __mcount;
-+ }
-+}
-diff --git a/sysdeps/arc/__longjmp.S b/sysdeps/arc/__longjmp.S
-new file mode 100644
-index 000000000000..5ef271536bcc
---- /dev/null
-+++ b/sysdeps/arc/__longjmp.S
-@@ -0,0 +1,50 @@
-+/* longjmp for ARC.
-+ Copyright (C) 2017-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public License as
-+ published by the Free Software Foundation; either version 2.1 of the
-+ License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include <sysdep.h>
-+#include <jmpbuf-offsets.h>
-+
-+;@ r0 = jump buffer from which regs will be restored
-+;@ r1 = value that setjmp( ) will return due to this longjmp
-+
-+ENTRY(__longjmp)
-+
-+ ld_s r13, [r0]
-+ ld_s r14, [r0,4]
-+ ld r15, [r0,8]
-+ ld r16, [r0,12]
-+ ld r17, [r0,16]
-+ ld r18, [r0,20]
-+ ld r19, [r0,24]
-+ ld r20, [r0,28]
-+ ld r21, [r0,32]
-+ ld r22, [r0,36]
-+ ld r23, [r0,40]
-+ ld r24, [r0,44]
-+ ld r25, [r0,48]
-+
-+ ld blink, [r0,60]
-+ ld fp, [r0,52]
-+ ld sp, [r0,56]
-+
-+ mov.f r0, r1 ; get the setjmp return value(due to longjmp) in place
-+
-+ j.d [blink] ; to caller of setjmp location, right after the call
-+ mov.z r0, 1 ; can't let setjmp return 0 when it is due to longjmp
-+
-+END(__longjmp)
-diff --git a/sysdeps/arc/abort-instr.h b/sysdeps/arc/abort-instr.h
-new file mode 100644
-index 000000000000..474098e9a819
---- /dev/null
-+++ b/sysdeps/arc/abort-instr.h
-@@ -0,0 +1,2 @@
-+/* FLAG 1 is privilege mode only instruction, hence will crash any program */
-+#define ABORT_INSTRUCTION asm ("flag 1")
-diff --git a/sysdeps/arc/atomic-machine.h b/sysdeps/arc/atomic-machine.h
-new file mode 100644
-index 000000000000..1a8d976794d0
---- /dev/null
-+++ b/sysdeps/arc/atomic-machine.h
-@@ -0,0 +1,89 @@
-+/* Low-level functions for atomic operations. ARC version.
-+ Copyright (C) 2012-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#ifndef _ARC_BITS_ATOMIC_H
-+#define _ARC_BITS_ATOMIC_H 1
-+
-+#include <stdint.h>
-+
-+typedef int32_t atomic32_t;
-+typedef uint32_t uatomic32_t;
-+typedef int_fast32_t atomic_fast32_t;
-+typedef uint_fast32_t uatomic_fast32_t;
-+
-+typedef intptr_t atomicptr_t;
-+typedef uintptr_t uatomicptr_t;
-+typedef intmax_t atomic_max_t;
-+typedef uintmax_t uatomic_max_t;
-+
-+#define __HAVE_64B_ATOMICS 0
-+#define USE_ATOMIC_COMPILER_BUILTINS 0
-+#define ATOMIC_EXCHANGE_USES_CAS 1
-+
-+#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \
-+ (abort (), (__typeof (*mem)) 0)
-+#define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \
-+ (abort (), (__typeof (*mem)) 0)
-+#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
-+ (abort (), (__typeof (*mem)) 0)
-+
-+#define __arch_compare_and_exchange_bool_8_acq(mem, newval, oldval) \
-+ (abort (), 0)
-+#define __arch_compare_and_exchange_bool_16_acq(mem, newval, oldval) \
-+ (abort (), 0)
-+#define __arch_compare_and_exchange_bool_64_acq(mem, newval, oldval) \
-+ (abort (), 0)
-+
-+#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
-+ ({ \
-+ __typeof(*(mem)) prev; \
-+ \
-+ __asm__ __volatile__( \
-+ "1: llock %0, [%1] \n" \
-+ " brne %0, %2, 2f \n" \
-+ " scond %3, [%1] \n" \
-+ " bnz 1b \n" \
-+ "2: \n" \
-+ : "=&r"(prev) \
-+ : "r"(mem), "ir"(oldval), \
-+ "r"(newval) /* can't be "ir". scond can't take limm for "b" */\
-+ : "cc", "memory"); \
-+ \
-+ prev; \
-+ })
-+
-+# define atomic_exchange_acq(mem, newvalue) \
-+ ({ \
-+ __typeof(*(mem)) __val = (newvalue); \
-+ \
-+ __asm__ __volatile__( \
-+ "1: ex %0, [%1] \n" \
-+ : "+r"(__val) \
-+ : "r"(mem) \
-+ : "memory"); \
-+ \
-+ __val; \
-+ })
-+
-+#ifdef __ARC700__
-+#define atomic_full_barrier() ({ asm volatile ("sync":::"memory"); })
-+#else
-+#define atomic_full_barrier() ({ asm volatile ("dmb 3":::"memory"); })
-+#endif
-+
-+#endif /* _ARC_BITS_ATOMIC_H */
-diff --git a/sysdeps/arc/bits/endian.h b/sysdeps/arc/bits/endian.h
-new file mode 100644
-index 000000000000..88fbcf39a58a
---- /dev/null
-+++ b/sysdeps/arc/bits/endian.h
-@@ -0,0 +1,12 @@
-+/* The ARC architecture has selectable endianness. */
-+
-+#ifndef _ENDIAN_H
-+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
-+#endif
-+
-+#ifdef __BIG_ENDIAN__
-+# define __BYTE_ORDER __BIG_ENDIAN
-+#endif
-+#ifdef __LITTLE_ENDIAN__
-+# define __BYTE_ORDER __LITTLE_ENDIAN
-+#endif
-diff --git a/sysdeps/arc/bits/fenv.h b/sysdeps/arc/bits/fenv.h
-new file mode 100644
-index 000000000000..df576e8dd5e3
---- /dev/null
-+++ b/sysdeps/arc/bits/fenv.h
-@@ -0,0 +1,52 @@
-+/* Copyright (C) 2012-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#ifndef _FENV_H
-+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
-+#endif
-+
-+/* ARC hardware FPU does not support exceptions,
-+ nor does the software floating-point support. */
-+#define FE_ALL_EXCEPT 0
-+
-+/* ARC supports only round-to-nearest. The software
-+ floating-point support also acts this way. */
-+enum
-+ {
-+ __FE_UNDEFINED = 0,
-+
-+ FE_TONEAREST =
-+#define FE_TONEAREST 1
-+ FE_TONEAREST,
-+ };
-+
-+/* Type representing exception flags. */
-+typedef unsigned int fexcept_t;
-+
-+/* Type representing floating-point environment. */
-+typedef unsigned int fenv_t;
-+
-+/* If the default argument is used we use this value. */
-+#define FE_DFL_ENV ((const fenv_t *) -1)
-+
-+#if __GLIBC_USE (IEC_60559_BFP_EXT)
-+/* Type representing floating-point control modes. */
-+typedef unsigned int femode_t;
-+
-+/* Default floating-point control modes. */
-+# define FE_DFL_MODE ((const femode_t *) -1L)
-+#endif
-diff --git a/sysdeps/arc/bits/link.h b/sysdeps/arc/bits/link.h
-new file mode 100644
-index 000000000000..1f4da2d9941c
---- /dev/null
-+++ b/sysdeps/arc/bits/link.h
-@@ -0,0 +1,52 @@
-+/* Machine-specific declarations for dynamic linker interface, ARC version.
-+ Copyright (C) 2009-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#ifndef _LINK_H
-+# error "Never include <bits/link.h> directly; use <link.h> instead."
-+#endif
-+
-+/* Registers for entry into PLT on ARC. */
-+typedef struct La_arc_regs
-+{
-+ uint32_t lr_reg[8]; /* r0 through r7 (upto 8 args) */
-+} La_arc_regs;
-+
-+/* Return values for calls from PLT on ARC. */
-+typedef struct La_arc_retval
-+{
-+ /* For ARCv2, a 64-bit integer return value can use 2 regs */
-+ uint32_t lrv_reg[2];
-+} La_arc_retval;
-+
-+__BEGIN_DECLS
-+
-+extern Elf32_Addr la_arc_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
-+ uintptr_t *__refcook,
-+ uintptr_t *__defcook,
-+ La_arc_regs *__regs,
-+ unsigned int *__flags,
-+ const char *__symname,
-+ long int *__framesizep);
-+extern unsigned int la_arc_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
-+ uintptr_t *__refcook,
-+ uintptr_t *__defcook,
-+ const La_arc_regs *__inregs,
-+ La_arc_retval *__outregs,
-+ const char *symname);
-+
-+__END_DECLS
-diff --git a/sysdeps/arc/bits/setjmp.h b/sysdeps/arc/bits/setjmp.h
-new file mode 100644
-index 000000000000..3a014955ee5a
---- /dev/null
-+++ b/sysdeps/arc/bits/setjmp.h
-@@ -0,0 +1,33 @@
-+/* Define the machine-dependent type `jmp_buf'. ARC version.
-+ Copyright (C) 1992-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#ifndef _BITS_SETJMP_H
-+#define _BITS_SETJMP_H 1
-+
-+#if !defined(_SETJMP_H) && !defined(_PTHREAD_H)
-+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
-+#endif
-+
-+#ifndef __ASSEMBLER__
-+
-+/* Saves r13-r25 (callee-saved), fp (frame pointer), sp (stack pointer),
-+ * blink (branch-n-link) */
-+typedef int __jmp_buf[32];
-+#endif
-+
-+#endif
-diff --git a/sysdeps/arc/bsd-_setjmp.S b/sysdeps/arc/bsd-_setjmp.S
-new file mode 100644
-index 000000000000..4e6a2da560c4
---- /dev/null
-+++ b/sysdeps/arc/bsd-_setjmp.S
-@@ -0,0 +1 @@
-+/* _setjmp is in setjmp.S */
-diff --git a/sysdeps/arc/bsd-setjmp.S b/sysdeps/arc/bsd-setjmp.S
-new file mode 100644
-index 000000000000..1da848d2f1ee
---- /dev/null
-+++ b/sysdeps/arc/bsd-setjmp.S
-@@ -0,0 +1 @@
-+/* setjmp is in setjmp.S */
-diff --git a/sysdeps/arc/configure b/sysdeps/arc/configure
-new file mode 100644
-index 000000000000..2033957d0d9f
---- /dev/null
-+++ b/sysdeps/arc/configure
-@@ -0,0 +1,17 @@
-+# This file is generated from configure.ac by Autoconf. DO NOT EDIT!
-+ # Local configure fragment for sysdeps/arc.
-+
-+$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
-+
-+libc_cv_have_sdata_section=no
-+
-+# For ARC, historically ; was used for comments and not newline
-+# Later # also got added to comment list, but ; couldn't be switched to
-+# canonical newline as there's lots of code out there which will break
-+libc_cv_asm_line_sep='`'
-+cat >>confdefs.h <<_ACEOF
-+#define ASM_LINE_SEP $libc_cv_asm_line_sep
-+_ACEOF
-+
-+
-+libc_cv_fpie=no
-diff --git a/sysdeps/arc/configure.ac b/sysdeps/arc/configure.ac
-new file mode 100644
-index 000000000000..91e58efb35c8
---- /dev/null
-+++ b/sysdeps/arc/configure.ac
-@@ -0,0 +1,13 @@
-+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-+# Local configure fragment for sysdeps/arc.
-+
-+AC_DEFINE(PI_STATIC_AND_HIDDEN)
-+libc_cv_have_sdata_section=no
-+
-+# For ARC, historically ; was used for comments and not newline
-+# Later # also got added to comment list, but ; couldn't be switched to
-+# canonical newline as there's lots of code out there which will break
-+libc_cv_asm_line_sep='`'
-+AC_DEFINE_UNQUOTED(ASM_LINE_SEP, $libc_cv_asm_line_sep)
-+
-+libc_cv_fpie=no
-diff --git a/sysdeps/arc/crti.S b/sysdeps/arc/crti.S
-new file mode 100644
-index 000000000000..ea741b30e3cf
---- /dev/null
-+++ b/sysdeps/arc/crti.S
-@@ -0,0 +1,79 @@
-+/* Special .init and .fini section support for ARC.
-+ Copyright (C) 2012-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ In addition to the permissions in the GNU Lesser General Public
-+ License, the Free Software Foundation gives you unlimited
-+ permission to link the compiled version of this file with other
-+ programs, and to distribute those programs without any restriction
-+ coming from the use of this file. (The GNU Lesser General Public
-+ License restrictions do apply in other respects; for example, they
-+ cover modification of the file, and distribution when not linked
-+ into another program.)
-+
-+ Note that people who make modified versions of this file are not
-+ obligated to grant this special exception for their modified
-+ versions; it is their choice whether to do so. The GNU Lesser
-+ General Public License gives permission to release a modified
-+ version without this exception; this exception also makes it
-+ possible to release a modified version which carries forward this
-+ exception.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include <libc-symbols.h>
-+#include <sysdep.h>
-+
-+#ifndef PREINIT_FUNCTION
-+# define PREINIT_FUNCTION __gmon_start__
-+#endif
-+
-+#ifndef PREINIT_FUNCTION_WEAK
-+# define PREINIT_FUNCTION_WEAK 1
-+#endif
-+
-+#if PREINIT_FUNCTION_WEAK
-+ weak_extern (PREINIT_FUNCTION)
-+#else
-+ .hidden PREINIT_FUNCTION
-+#endif
-+
-+ .section .init
-+ .align 4
-+ .global _init
-+ .hidden _init
-+ .type _init,@function
-+_init:
-+ st.a blink, [sp,-4]
-+ st.a fp, [sp,-4]
-+ mov fp, sp
-+#if PREINIT_FUNCTION_WEAK
-+ ld r0, [pcl, @PREINIT_FUNCTION@gotpc]
-+ tst r0, r0
-+ jlnz [r0]
-+#else
-+ bl PREINIT_FUNCTION
-+#endif
-+
-+ .section .fini
-+ .align 4
-+ .global _fini
-+ .hidden _fini
-+ .type _fini,@function
-+_fini:
-+ st.a blink,[sp,-4]
-+ st.a fp,[sp,-4]
-+ mov fp,sp
-+ .align 4
-diff --git a/sysdeps/arc/crtn.S b/sysdeps/arc/crtn.S
-new file mode 100644
-index 000000000000..c6c58c5593c9
---- /dev/null
-+++ b/sysdeps/arc/crtn.S
-@@ -0,0 +1,56 @@
-+/* Special .init and .fini section support for ARC.
-+ Copyright (C) 2012-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ In addition to the permissions in the GNU Lesser General Public
-+ License, the Free Software Foundation gives you unlimited
-+ permission to link the compiled version of this file with other
-+ programs, and to distribute those programs without any restriction
-+ coming from the use of this file. (The GNU Lesser General Public
-+ License restrictions do apply in other respects; for example, they
-+ cover modification of the file, and distribution when not linked
-+ into another program.)
-+
-+ Note that people who make modified versions of this file are not
-+ obligated to grant this special exception for their modified
-+ versions; it is their choice whether to do so. The GNU Lesser
-+ General Public License gives permission to release a modified
-+ version without this exception; this exception also makes it
-+ possible to release a modified version which carries forward this
-+ exception.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+ .section .init
-+ .align 4
-+ .global _init
-+ .type _init,@function
-+ ; EPILOGUE
-+ ld.ab fp,[sp,4]
-+ ld blink,[sp,0]
-+ j.d [blink]
-+ add sp,sp,4
-+; .size _init,.-_init
-+
-+ .section .fini
-+ .align 4
-+ .global _fini
-+ .type _fini,@function
-+ ; EPILOGUE
-+ ld.ab fp,[sp,4]
-+ ld blink,[sp,0]
-+ j.d [blink]
-+ add sp,sp,4
-+; .size _fini,.-_fini
-diff --git a/sysdeps/arc/dl-machine.h b/sysdeps/arc/dl-machine.h
-new file mode 100644
-index 000000000000..f4757904084a
---- /dev/null
-+++ b/sysdeps/arc/dl-machine.h
-@@ -0,0 +1,339 @@
-+/* Machine-dependent ELF dynamic relocation inline functions. ARC version.
-+ Copyright (C) 1995-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#ifndef dl_machine_h
-+#define dl_machine_h
-+
-+#define ELF_MACHINE_NAME "arc"
-+
-+#include <entry.h>
-+
-+#ifndef ENTRY_POINT
-+#error ENTRY_POINT needs to be defined for ARC
-+#endif
-+
-+#include <string.h>
-+#include <link.h>
-+#include <dl-tls.h>
-+
-+/*
-+ * Dynamic Linking ABI for ARCv2 ISA
-+ *
-+ * PLT
-+ * -------------------------------- <---- DT_PLTGOT
-+ * | ld r11, [pcl, off-to-GOT[1] | 0
-+ * | | 4
-+ * plt0 | ld r10, [pcl, off-to-GOT[2] | 8
-+ * | | 12
-+ * | j [r10] | 16
-+ * --------------------------------
-+ * | Base address of GOT | 20
-+ * --------------------------------
-+ * | ld r12, [pcl, off-to-GOT[3] | 24
-+ * plt1 | |
-+ * | j.d [r12] | 32
-+ * | mov r12, pcl | 36
-+ * --------------------------------
-+ * | | 40
-+ * ~ ~
-+ * ~ ~
-+ * | |
-+ * --------------------------------
-+ *
-+ * .got
-+ * --------------
-+ * | [0] |
-+ * | ... | Runtime address for data symbols
-+ * | [n] |
-+ * --------------
-+ *
-+ * .got.plt
-+ * --------------
-+ * | [0] | Build address of .dynamic
-+ * --------------
-+ * | [1] | Module info - setup by ld.so
-+ * --------------
-+ * | [2] | resolver entry point
-+ * --------------
-+ * | [3] |
-+ * | ... | Runtime address for function symbols
-+ * | [f] |
-+ * --------------
-+ *
-+ * For ARCompact, the PLT is 12 bytes due to short instructions
-+ *
-+ * --------------------------------
-+ * | ld r12, [pcl, off-to-GOT[3] | 24 (12 bytes each)
-+ * plt1 | |
-+ * | j_s.d [r12] | 32
-+ * | mov_s r12, pcl | 34
-+ * --------------------------------
-+ * | | 36
-+ *
-+ */
-+
-+/* Return nonzero iff ELF header is compatible with the running host. */
-+static inline int
-+elf_machine_matches_host (const Elf32_Ehdr *ehdr)
-+{
-+ return (ehdr->e_machine == EM_ARCV2 /* ARC HS */
-+ || ehdr->e_machine == EM_ARC_COMPACT); /* ARC 700 */
-+}
-+
-+/*
-+ * Get build time address of .dynamic as setup in GOT[0]
-+ * This is called very early in _dl_start() so it has not been relocated to
-+ * runtime value
-+ */
-+static inline Elf32_Addr
-+elf_machine_dynamic (void)
-+{
-+ extern const Elf32_Addr _GLOBAL_OFFSET_TABLE_[] attribute_hidden;
-+ return _GLOBAL_OFFSET_TABLE_[0];
-+}
-+
-+
-+/* Return the run-time load address of the shared object. */
-+static inline Elf32_Addr
-+elf_machine_load_address (void)
-+{
-+ Elf32_Addr build_addr, run_addr;
-+
-+ /* For build address, below generates
-+ * ld r0, [pcl, _GLOBAL_OFFSET_TABLE_@pcl]
-+ */
-+ build_addr = elf_machine_dynamic();
-+ __asm__ ("add %0, pcl, _DYNAMIC@pcl \n" : "=r" (run_addr));
-+
-+ return run_addr - build_addr;
-+}
-+
-+/* Set up the loaded object described by L so its unrelocated PLT
-+ entries will jump to the on-demand fixup code in dl-runtime.c. */
-+
-+static inline int __attribute__ ((always_inline))
-+elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
-+{
-+ extern void _dl_runtime_resolve (Elf32_Word);
-+
-+ if (l->l_info[DT_JMPREL] && lazy)
-+ {
-+ /* On ARC DT_PLTGOT point to .plt whose 5th word (after the PLT header)
-+ * contains the address of .got */
-+ Elf32_Addr *plt_base = (Elf32_Addr *) D_PTR (l, l_info[DT_PLTGOT]);
-+ Elf32_Addr *got = (Elf32_Addr *) (plt_base[5] + l->l_addr);
-+
-+ got[1] = (Elf32_Addr) l; /* Identify this shared object. */
-+
-+ /* This function will get called to fix up the GOT entry indicated by
-+ the offset on the stack, and then jump to the resolved address. */
-+ got[2] = (Elf32_Addr) &_dl_runtime_resolve;
-+ }
-+
-+ return lazy;
-+}
-+
-+/* What this code does:
-+ -ldso starts execution here when kernel returns from execve()
-+ -calls into generic ldso entry point _dl_start( )
-+ -optionally adjusts argc for executable if exec passed as cmd
-+ -calls into app main with address of finaliser */
-+
-+#define RTLD_START asm ("\
-+.text \n\
-+.globl __start \n\
-+.type __start, @function \n\
-+__start: \n\
-+ ; (1). bootstrap ld.so \n\
-+ bl.d _dl_start \n\
-+ mov_s r0, sp ; pass ptr to aux vector tbl \n\
-+ mov r13, r0 ; safekeep app elf entry point \n\
-+ \n\
-+ ; (2). If ldso ran with executable as arg \n\
-+ ; skip the extra args calc by dl_start() \n\
-+ ld_s r1, [sp] ; orig argc \n\
-+ ld r12, [pcl, _dl_skip_args@pcl] \n\
-+ breq r12, 0, 1f \n\
-+ \n\
-+ add2 sp, sp, r12 ; discard argv entries from stack\n\
-+ sub_s r1, r1, r12 ; adjusted argc, on stack \n\
-+ st_s r1, [sp] \n\
-+ add r2, sp, 4 \n\
-+ ld r3, [pcl, _dl_argv@gotpc] ; ST doesn't support this addressing mode \n\
-+ st r2, [r3] \n\
-+1: \n\
-+ ; (3). call preinit stuff \n\
-+ ld r0, [pcl, _rtld_local@pcl] \n\
-+ add r2, sp, 4 ; argv \n\
-+ add2 r3, r2, r1 \n\
-+ add r3, r3, 4 ; env \n\
-+ bl _dl_init@plt \n\
-+ \n\
-+ ; (4) call app elf entry point \n\
-+ add r0, pcl, _dl_fini@pcl \n\
-+ j [r13] \n\
-+ \n\
-+ .size __start,.-__start \n\
-+ .previous \n\
-+");
-+
-+/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
-+ PLT entries should not be allowed to define the value.
-+ ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
-+ of the main executable's symbols, as for a COPY reloc. */
-+#define elf_machine_type_class(type) \
-+ ((((type) == R_ARC_JUMP_SLOT \
-+ || (type) == R_ARC_TLS_DTPMOD \
-+ || (type) == R_ARC_TLS_DTPOFF \
-+ || (type) == R_ARC_TLS_TPOFF) * ELF_RTYPE_CLASS_PLT) \
-+ | (((type) == R_ARC_COPY) * ELF_RTYPE_CLASS_COPY))
-+
-+/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
-+#define ELF_MACHINE_JMP_SLOT R_ARC_JUMP_SLOT
-+
-+/* ARC uses Elf32_Rela relocations. */
-+#define ELF_MACHINE_NO_REL 1
-+#define ELF_MACHINE_NO_RELA 0
-+
-+/* Fixup a PLT entry to bounce directly to the function at VALUE. */
-+
-+static inline Elf32_Addr
-+elf_machine_fixup_plt (struct link_map *map, lookup_t t,
-+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
-+ const Elf32_Rela *reloc,
-+ Elf32_Addr *reloc_addr, Elf32_Addr value)
-+{
-+ return *reloc_addr = value;
-+}
-+
-+/* Return the final value of a plt relocation. */
-+static inline Elf32_Addr
-+elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc,
-+ Elf32_Addr value)
-+{
-+ return value;
-+}
-+
-+/* Names of the architecture-specific auditing callback functions. */
-+#define ARCH_LA_PLTENTER arc_gnu_pltenter
-+#define ARCH_LA_PLTEXIT arc_gnu_pltexit
-+
-+#endif /* dl_machine_h */
-+
-+#ifdef RESOLVE_MAP
-+
-+auto inline void __attribute__ ((always_inline))
-+elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
-+ const ElfW(Sym) *sym, const struct r_found_version *version,
-+ void *const reloc_addr_arg, int skip_ifunc)
-+{
-+ Elf32_Addr *const reloc_addr = reloc_addr_arg;
-+ const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
-+
-+ if (__glibc_unlikely (r_type == R_ARC_RELATIVE))
-+ *reloc_addr += map->l_addr;
-+ else if (__glibc_unlikely (r_type == R_ARC_NONE))
-+ return;
-+ else
-+ {
-+ const Elf32_Sym *const refsym = sym;
-+ struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
-+ Elf32_Addr value = SYMBOL_ADDRESS (sym_map, sym, true);
-+
-+ switch (r_type)
-+ {
-+ case R_ARC_COPY:
-+ if (sym == NULL)
-+ /* This can happen in trace mode if an object could not be
-+ found. */
-+ break;
-+ if (sym->st_size > refsym->st_size
-+ || (sym->st_size < refsym->st_size && GLRO(dl_verbose)))
-+ {
-+ const char *strtab;
-+
-+ strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
-+ _dl_error_printf ("\
-+%s: Symbol `%s' has different size in shared object, consider re-linking\n",
-+ rtld_progname ?: "<program name unknown>",
-+ strtab + refsym->st_name);
-+ }
-+ memcpy (reloc_addr_arg, (void *) value,
-+ MIN (sym->st_size, refsym->st_size));
-+ break;
-+ case R_ARC_GLOB_DAT:
-+ case R_ARC_JUMP_SLOT:
-+ *reloc_addr = value;
-+ break;
-+ case R_ARC_TLS_DTPMOD:
-+ /* Get the information from the link map returned by the
-+ resolv function. */
-+ if (sym_map != NULL)
-+ *reloc_addr = sym_map->l_tls_modid;
-+ break;
-+
-+ case R_ARC_TLS_DTPOFF:
-+ if (sym != NULL)
-+ {
-+ *reloc_addr += sym->st_value;
-+ }
-+ break;
-+
-+ case R_ARC_TLS_TPOFF:
-+ if (sym != NULL)
-+ {
-+ CHECK_STATIC_TLS (map, sym_map);
-+ *reloc_addr = sym_map->l_tls_offset + sym->st_value + reloc->r_addend;
-+ }
-+ break;
-+ case R_ARC_32:
-+ *reloc_addr += value + reloc->r_addend;
-+ break;
-+
-+ case R_ARC_PC32:
-+ *reloc_addr += value + reloc->r_addend - (unsigned long) reloc_addr;
-+ break;
-+
-+ default:
-+ _dl_reloc_bad_type (map, r_type, 0);
-+ break;
-+ }
-+ }
-+}
-+
-+auto inline void __attribute__((always_inline))
-+elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
-+ void *const reloc_addr_arg)
-+{
-+ Elf32_Addr *const reloc_addr = reloc_addr_arg;
-+ *reloc_addr += l_addr; // + reloc->r_addend;
-+}
-+
-+auto inline void __attribute__((always_inline))
-+elf_machine_lazy_rel (struct link_map *map,
-+ ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
-+ int skip_ifunc)
-+{
-+ Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
-+ if (ELF32_R_TYPE (reloc->r_info) == R_ARC_JUMP_SLOT)
-+ *reloc_addr += l_addr;
-+ else
-+ _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 1);
-+}
-+
-+#endif /* RESOLVE_MAP */
-diff --git a/sysdeps/arc/dl-runtime.c b/sysdeps/arc/dl-runtime.c
-new file mode 100644
-index 000000000000..76d39fab5ab8
---- /dev/null
-+++ b/sysdeps/arc/dl-runtime.c
-@@ -0,0 +1,21 @@
-+/* PLT jump into resolver passes PC of PLTn, while _dl_fixup expects the
-+ address of corresponding .rela.plt entry */
-+
-+#ifdef __A7__
-+#define ARC_PLT_SIZE 12
-+#else
-+#define ARC_PLT_SIZE 16
-+#endif
-+
-+#define reloc_index \
-+({ \
-+ unsigned long plt0 = D_PTR (l, l_info[DT_PLTGOT]); \
-+ unsigned long pltn = reloc_arg; \
-+ /* exclude PL0 and PLT1 */ \
-+ unsigned long idx = (pltn - plt0)/ARC_PLT_SIZE - 2; \
-+ idx; \
-+})
-+
-+#define reloc_offset reloc_index * sizeof (PLTREL)
-+
-+#include <elf/dl-runtime.c>
-diff --git a/sysdeps/arc/dl-sysdep.h b/sysdeps/arc/dl-sysdep.h
-new file mode 100644
-index 000000000000..a3e734c1020c
---- /dev/null
-+++ b/sysdeps/arc/dl-sysdep.h
-@@ -0,0 +1,25 @@
-+/* System-specific settings for dynamic linker code. ARC version.
-+ Copyright (C) 2009-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include_next <dl-sysdep.h>
-+
-+/* _dl_argv cannot be attribute_relro, because _dl_start_user
-+ might write into it after _dl_start returns. */
-+#define DL_ARGV_NOT_RELRO 1
-+
-+#define DL_EXTERN_PROTECTED_DATA
-diff --git a/sysdeps/arc/dl-tls.h b/sysdeps/arc/dl-tls.h
-new file mode 100644
-index 000000000000..42b5df9ca4da
---- /dev/null
-+++ b/sysdeps/arc/dl-tls.h
-@@ -0,0 +1,30 @@
-+/* Thread-local storage handling in the ELF dynamic linker. ARC version.
-+ Copyright (C) 2012-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+
-+/* Type used for the representation of TLS information in the GOT. */
-+typedef struct
-+{
-+ unsigned long int ti_module;
-+ unsigned long int ti_offset;
-+} tls_index;
-+
-+extern void *__tls_get_addr (tls_index *ti);
-+
-+/* Value used for dtv entries for which the allocation is delayed. */
-+#define TLS_DTV_UNALLOCATED ((void *) -1l)
-diff --git a/sysdeps/arc/dl-trampoline.S b/sysdeps/arc/dl-trampoline.S
-new file mode 100644
-index 000000000000..0fc9786ec1d3
---- /dev/null
-+++ b/sysdeps/arc/dl-trampoline.S
-@@ -0,0 +1,81 @@
-+/* PLT trampolines. ARC version.
-+ Copyright (C) 2005-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include <sysdep.h>
-+#include <libc-symbols.h>
-+
-+#include <sysdep.h>
-+#include <sys/syscall.h>
-+
-+; Save the registers which resolver could possibly clobber
-+; r0-r9: args to the function - symbol being resolved
-+; r10-r12 are already clobbered by PLTn, PLT0 thus neednot be saved
-+
-+.macro SAVE_CALLER_SAVED
-+ push_s r0
-+ push_s r1
-+ push_s r2
-+ push_s r3
-+ st.a r4, [sp, -4]
-+ st.a r5, [sp, -4]
-+ st.a r6, [sp, -4]
-+ st.a r7, [sp, -4]
-+ st.a r8, [sp, -4]
-+ st.a r9, [sp, -4]
-+ cfi_adjust_cfa_offset (40)
-+ push_s blink
-+ cfi_adjust_cfa_offset (4)
-+ cfi_rel_offset (blink, 0)
-+.endm
-+
-+.macro RESTORE_CALLER_SAVED_BUT_R0
-+ ld.ab blink,[sp, 4]
-+ cfi_adjust_cfa_offset (-4)
-+ cfi_restore (blink)
-+ ld.ab r9, [sp, 4]
-+ ld.ab r8, [sp, 4]
-+ ld.ab r7, [sp, 4]
-+ ld.ab r6, [sp, 4]
-+ ld.ab r5, [sp, 4]
-+ ld.ab r4, [sp, 4]
-+ pop_s r3
-+ pop_s r2
-+ pop_s r1
-+ cfi_adjust_cfa_offset (-36)
-+.endm
-+
-+; Upon entry, PLTn, which led us here, sets up the following regs
-+; r11 = Module info (tpnt pointer as expected by resolver)
-+; r12 = PC of the PLTn itself - needed by resolver to find
-+; corresponding .rela.plt entry
-+
-+ENTRY(_dl_runtime_resolve)
-+ ; args to func being resolved, which resolver might clobber
-+ SAVE_CALLER_SAVED
-+
-+ mov_s r1, r12
-+ bl.d _dl_fixup
-+ mov r0, r11
-+
-+ RESTORE_CALLER_SAVED_BUT_R0
-+ j_s.d [r0] ; r0 has resolved function addr
-+ pop_s r0 ; restore first arg to resolved call
-+ cfi_adjust_cfa_offset (-4)
-+ cfi_restore (r0)
-+
-+END(_dl_runtime_resolve)
-diff --git a/sysdeps/arc/entry.h b/sysdeps/arc/entry.h
-new file mode 100644
-index 000000000000..adb01d981afd
---- /dev/null
-+++ b/sysdeps/arc/entry.h
-@@ -0,0 +1,5 @@
-+#ifndef __ASSEMBLY__
-+extern void __start (void) attribute_hidden;
-+#endif
-+
-+#define ENTRY_POINT __start
-diff --git a/sysdeps/arc/gccframe.h b/sysdeps/arc/gccframe.h
-new file mode 100644
-index 000000000000..54a1225284b6
---- /dev/null
-+++ b/sysdeps/arc/gccframe.h
-@@ -0,0 +1,21 @@
-+/* Definition of object in frame unwind info. ARC version.
-+ Copyright (C) 2017-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#define FIRST_PSEUDO_REGISTER 40
-+
-+#include <sysdeps/generic/gccframe.h>
-diff --git a/sysdeps/arc/gmp-mparam.h b/sysdeps/arc/gmp-mparam.h
-new file mode 100644
-index 000000000000..2b09517766e3
---- /dev/null
-+++ b/sysdeps/arc/gmp-mparam.h
-@@ -0,0 +1,23 @@
-+/* gmp-mparam.h -- Compiler/machine parameter header file.
-+
-+Copyright (C) 2017-2018 Free Software Foundation, Inc.
-+
-+This file is part of the GNU MP Library.
-+
-+The GNU MP Library is free software; you can redistribute it and/or modify
-+it under the terms of the GNU Lesser General Public License as published by
-+the Free Software Foundation; either version 2.1 of the License, or (at your
-+option) any later version.
-+
-+The GNU MP Library is distributed in the hope that it will be useful, but
-+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
-+License for more details.
-+
-+You should have received a copy of the GNU Lesser General Public License
-+along with the GNU MP Library; see the file COPYING.LIB. If not, see
-+<http://www.gnu.org/licenses/>. */
-+
-+#include <sysdeps/generic/gmp-mparam.h>
-+
-+#define IEEE_DOUBLE_BIG_ENDIAN 0
-diff --git a/sysdeps/arc/jmpbuf-offsets.h b/sysdeps/arc/jmpbuf-offsets.h
-new file mode 100644
-index 000000000000..c9cf4bc2e355
---- /dev/null
-+++ b/sysdeps/arc/jmpbuf-offsets.h
-@@ -0,0 +1,46 @@
-+/* Private macros for accessing __jmp_buf contents. ARC version.
-+ Copyright (C) 2006-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+/* Save offsets within __jmp_buf. */
-+/* We don't use most of these symbols; they are here for documentation. */
-+
-+/* Callee Regs */
-+#define JB_R13 0
-+#define JB_R14 1
-+#define JB_R15 2
-+#define JB_R16 3
-+#define JB_R17 4
-+#define JB_R18 5
-+#define JB_R19 6
-+#define JB_R20 7
-+#define JB_R21 8
-+#define JB_R22 9
-+#define JB_R23 10
-+#define JB_R24 11
-+#define JB_R25 12
-+
-+/* Frame Pointer, Stack Pointer, Branch-n-link */
-+#define JB_FP 13
-+#define JB_SP 14
-+#define JB_BLINK 15
-+
-+/* We save space for some extra state to accommodate future changes. */
-+#define JB_NUM 32 /* words */
-+
-+/* Helper for generic ____longjmp_chk(). */
-+#define JB_FRAME_ADDRESS(buf) ((void *) (unsigned long) (buf[JB_SP]))
-diff --git a/sysdeps/arc/jmpbuf-unwind.h b/sysdeps/arc/jmpbuf-unwind.h
-new file mode 100644
-index 000000000000..d87ac13b3416
---- /dev/null
-+++ b/sysdeps/arc/jmpbuf-unwind.h
-@@ -0,0 +1,47 @@
-+/* Examine __jmp_buf for unwinding frames. ARC version.
-+ Copyright (C) 2005-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include <setjmp.h>
-+#include <jmpbuf-offsets.h>
-+#include <stdint.h>
-+#include <unwind.h>
-+
-+/* Test if longjmp to JMPBUF would unwind the frame
-+ containing a local variable at ADDRESS. */
-+
-+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
-+ ((void *) (address) < (void *) demangle (jmpbuf[JB_SP]))
-+
-+#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
-+ _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
-+
-+static inline uintptr_t __attribute__ ((unused))
-+_jmpbuf_sp (__jmp_buf jmpbuf)
-+{
-+ uintptr_t sp = jmpbuf[JB_SP];
-+#ifdef PTR_DEMANGLE
-+ PTR_DEMANGLE (sp);
-+#endif
-+ return sp;
-+}
-+
-+#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
-+ ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf_sp (_jmpbuf) - (_adj)))
-+
-+/* We use the normal longjmp for unwinding. */
-+#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
-diff --git a/sysdeps/arc/ldsodefs.h b/sysdeps/arc/ldsodefs.h
-new file mode 100644
-index 000000000000..3fafc683da2e
---- /dev/null
-+++ b/sysdeps/arc/ldsodefs.h
-@@ -0,0 +1,43 @@
-+/* Run-time dynamic linker data structures for loaded ELF shared objects.
-+ Copyright (C) 2000-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#ifndef _ARC_LDSODEFS_H
-+#define _ARC_LDSODEFS_H 1
-+
-+#include <elf.h>
-+
-+struct La_arc_regs;
-+struct La_arc_retval;
-+
-+#define ARCH_PLTENTER_MEMBERS \
-+ ElfW(Addr) (*arc_gnu_pltenter) (ElfW(Sym) *, unsigned int, \
-+ uintptr_t *, uintptr_t *, \
-+ const struct La_arc_regs *, \
-+ unsigned int *, const char *, \
-+ long int *);
-+
-+#define ARCH_PLTEXIT_MEMBERS \
-+ unsigned int (*arc_gnu_pltexit) (ElfW(Sym) *, unsigned int, \
-+ uintptr_t *, uintptr_t *, \
-+ const struct La_arc_regs *, \
-+ struct La_arc_retval *, \
-+ const char *);
-+
-+#include_next <ldsodefs.h>
-+
-+#endif
-diff --git a/sysdeps/arc/libc-tls.c b/sysdeps/arc/libc-tls.c
-new file mode 100644
-index 000000000000..c6c865daac3e
---- /dev/null
-+++ b/sysdeps/arc/libc-tls.c
-@@ -0,0 +1,27 @@
-+/* Thread-local storage handling in the ELF dynamic linker. ARC version.
-+ Copyright (C) 2005-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include <csu/libc-tls.c>
-+#include <dl-tls.h>
-+
-+void *
-+__tls_get_addr (tls_index *ti)
-+{
-+ dtv_t *dtv = THREAD_DTV ();
-+ return (char *) dtv[1].pointer.val + ti->ti_offset;
-+}
-diff --git a/sysdeps/arc/libm-test-ulps b/sysdeps/arc/libm-test-ulps
-new file mode 100644
-index 000000000000..0e8ef313fa94
---- /dev/null
-+++ b/sysdeps/arc/libm-test-ulps
-@@ -0,0 +1,390 @@
-+# Begin of automatic generation
-+
-+# Maximal error of functions:
-+Function: "acos":
-+float: 1
-+ifloat: 1
-+
-+Function: "acosh":
-+double: 2
-+float: 2
-+idouble: 2
-+ifloat: 2
-+
-+Function: "asin":
-+float: 1
-+ifloat: 1
-+
-+Function: "asinh":
-+double: 1
-+float: 1
-+idouble: 1
-+ifloat: 1
-+
-+Function: "atan":
-+float: 1
-+ifloat: 1
-+
-+Function: "atan2":
-+float: 1
-+ifloat: 1
-+
-+Function: "atanh":
-+double: 2
-+float: 2
-+idouble: 2
-+ifloat: 2
-+
-+Function: "cabs":
-+double: 1
-+idouble: 1
-+
-+Function: Real part of "cacos":
-+double: 1
-+float: 2
-+idouble: 1
-+ifloat: 2
-+
-+Function: Imaginary part of "cacos":
-+double: 2
-+float: 2
-+idouble: 2
-+ifloat: 2
-+
-+Function: Real part of "cacosh":
-+double: 2
-+float: 2
-+idouble: 2
-+ifloat: 2
-+
-+Function: Imaginary part of "cacosh":
-+double: 1
-+float: 2
-+idouble: 1
-+ifloat: 2
-+
-+Function: "carg":
-+float: 1
-+ifloat: 1
-+
-+Function: Real part of "casin":
-+double: 1
-+float: 1
-+idouble: 1
-+ifloat: 1
-+
-+Function: Imaginary part of "casin":
-+double: 2
-+float: 2
-+idouble: 2
-+ifloat: 2
-+
-+Function: Real part of "casinh":
-+double: 2
-+float: 2
-+idouble: 2
-+ifloat: 2
-+
-+Function: Imaginary part of "casinh":
-+double: 1
-+float: 1
-+idouble: 1
-+ifloat: 1
-+
-+Function: Real part of "catan":
-+double: 1
-+float: 1
-+idouble: 1
-+ifloat: 1
-+
-+Function: Imaginary part of "catan":
-+double: 1
-+float: 1
-+idouble: 1
-+ifloat: 1
-+
-+Function: Real part of "catanh":
-+double: 1
-+float: 1
-+idouble: 1
-+ifloat: 1
-+
-+Function: Imaginary part of "catanh":
-+double: 1
-+float: 1
-+idouble: 1
-+ifloat: 1
-+
-+Function: "cbrt":
-+double: 3
-+float: 1
-+idouble: 3
-+ifloat: 1
-+
-+Function: Real part of "ccos":
-+double: 1
-+float: 1
-+idouble: 1
-+ifloat: 1
-+
-+Function: Imaginary part of "ccos":
-+double: 1
-+float: 1
-+idouble: 1
-+ifloat: 1
-+
-+Function: Real part of "ccosh":
-+double: 1
-+float: 1
-+idouble: 1
-+ifloat: 1
-+
-+Function: Imaginary part of "ccosh":
-+double: 1
-+float: 1
-+idouble: 1
-+ifloat: 1
-+
-+Function: Real part of "cexp":
-+double: 2
-+float: 1
-+idouble: 2
-+ifloat: 1
-+
-+Function: Imaginary part of "cexp":
-+double: 1
-+float: 2
-+idouble: 1
-+ifloat: 2
-+
-+Function: Real part of "clog":
-+double: 3
-+float: 3
-+idouble: 3
-+ifloat: 3
-+
-+Function: Imaginary part of "clog":
-+float: 1
-+ifloat: 1
-+
-+Function: Real part of "clog10":
-+double: 3
-+float: 4
-+idouble: 3
-+ifloat: 4
-+
-+Function: Imaginary part of "clog10":
-+double: 2
-+float: 2
-+idouble: 2
-+ifloat: 2
-+
-+Function: "cos":
-+double: 1
-+float: 1
-+idouble: 1
-+ifloat: 1
-+
-+Function: "cosh":
-+double: 1
-+float: 1
-+idouble: 1
-+ifloat: 1
-+
-+Function: Real part of "cpow":
-+double: 2
-+float: 5
-+idouble: 2
-+ifloat: 5
-+
-+Function: Imaginary part of "cpow":
-+float: 2
-+ifloat: 2
-+
-+Function: Real part of "csin":
-+double: 1
-+float: 1
-+idouble: 1
-+ifloat: 1
-+
-+Function: Real part of "csinh":
-+float: 1
-+ifloat: 1
-+
-+Function: Imaginary part of "csinh":
-+double: 1
-+float: 1
-+idouble: 1
-+ifloat: 1
-+
-+Function: Real part of "csqrt":
-+double: 2
-+float: 2
-+idouble: 2
-+ifloat: 2
-+
-+Function: Imaginary part of "csqrt":
-+double: 2
-+float: 2
-+idouble: 2
-+ifloat: 2
-+
-+Function: Real part of "ctan":
-+double: 1
-+float: 1
-+idouble: 1
-+ifloat: 1
-+
-+Function: Imaginary part of "ctan":
-+double: 2
-+float: 2
-+idouble: 2
-+ifloat: 2
-+
-+Function: Real part of "ctanh":
-+double: 2
-+float: 2
-+idouble: 2
-+ifloat: 2
-+
-+Function: Imaginary part of "ctanh":
-+double: 2
-+float: 2
-+idouble: 2
-+ifloat: 2
-+
-+Function: "erf":
-+double: 1
-+float: 1
-+idouble: 1
-+ifloat: 1
-+
-+Function: "erfc":
-+double: 3
-+float: 2
-+idouble: 3
-+ifloat: 2
-+
-+Function: "exp10":
-+double: 2
-+idouble: 2
-+
-+Function: "exp2":
-+double: 1
-+idouble: 1
-+
-+Function: "expm1":
-+double: 1
-+float: 1
-+idouble: 1
-+ifloat: 1
-+
-+Function: "gamma":
-+double: 4
-+float: 3
-+idouble: 4
-+ifloat: 3
-+
-+Function: "hypot":
-+double: 1
-+idouble: 1
-+
-+Function: "j0":
-+double: 2
-+float: 2
-+idouble: 2
-+ifloat: 2
-+
-+Function: "j1":
-+double: 1
-+float: 2
-+idouble: 1
-+ifloat: 2
-+
-+Function: "jn":
-+double: 4
-+float: 4
-+idouble: 4
-+ifloat: 4
-+
-+Function: "lgamma":
-+double: 4
-+float: 3
-+idouble: 4
-+ifloat: 3
-+
-+Function: "log10":
-+double: 2
-+float: 2
-+idouble: 2
-+ifloat: 2
-+
-+Function: "log1p":
-+double: 1
-+float: 1
-+idouble: 1
-+ifloat: 1
-+
-+Function: "log2":
-+double: 2
-+float: 1
-+idouble: 2
-+ifloat: 1
-+
-+Function: "pow":
-+double: 1
-+idouble: 1
-+
-+Function: "sin":
-+double: 1
-+float: 1
-+idouble: 1
-+ifloat: 1
-+
-+Function: "sincos":
-+double: 1
-+float: 1
-+idouble: 1
-+ifloat: 1
-+
-+Function: "sinh":
-+double: 2
-+float: 2
-+idouble: 2
-+ifloat: 2
-+
-+Function: "tan":
-+float: 1
-+ifloat: 1
-+
-+Function: "tanh":
-+double: 2
-+float: 2
-+idouble: 2
-+ifloat: 2
-+
-+Function: "tgamma":
-+double: 5
-+float: 4
-+idouble: 5
-+ifloat: 4
-+
-+Function: "y0":
-+double: 2
-+float: 1
-+idouble: 2
-+ifloat: 1
-+
-+Function: "y1":
-+double: 3
-+float: 2
-+idouble: 3
-+ifloat: 2
-+
-+Function: "yn":
-+double: 3
-+float: 3
-+idouble: 3
-+ifloat: 3
-+
-+# end of automatic generation
-diff --git a/sysdeps/arc/libm-test-ulps-name b/sysdeps/arc/libm-test-ulps-name
-new file mode 100644
-index 000000000000..8c4fba4f9ae0
---- /dev/null
-+++ b/sysdeps/arc/libm-test-ulps-name
-@@ -0,0 +1 @@
-+ARC
-diff --git a/sysdeps/arc/machine-gmon.h b/sysdeps/arc/machine-gmon.h
-new file mode 100644
-index 000000000000..55facf77a858
---- /dev/null
-+++ b/sysdeps/arc/machine-gmon.h
-@@ -0,0 +1,33 @@
-+/* Machine-dependent definitions for profiling support. ARC version.
-+ Copyright (C) 1996-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include <sysdep.h>
-+
-+#define _MCOUNT_DECL(frompc, selfpc)
-+static void __mcount_internal (unsigned long frompc, unsigned long selfpc)
-+
-+/* this is very simple as gcc does all the heavy lifting at _mcount call site
-+ * - sets up caller's blink in r0, so frompc is setup correctly
-+ * - preserve argument registers for original call */
-+
-+#define MCOUNT \
-+void _mcount (void *frompc) \
-+{ \
-+ __mcount_internal ((unsigned long int) frompc, \
-+ (unsigned long int) __builtin_return_address(0)); \
-+}
-diff --git a/sysdeps/arc/math-tests.h b/sysdeps/arc/math-tests.h
-new file mode 100644
-index 000000000000..2fe08698ff49
---- /dev/null
-+++ b/sysdeps/arc/math-tests.h
-@@ -0,0 +1,28 @@
-+/* Configuration for math tests. ARC version.
-+ Copyright (C) 2017-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+/* Current ARC soft-float does not support exceptions or rounding
-+ modes. */
-+#define ROUNDING_TESTS_float(MODE) ((MODE) == FE_TONEAREST)
-+#define ROUNDING_TESTS_double(MODE) ((MODE) == FE_TONEAREST)
-+#define ROUNDING_TESTS_long_double(MODE) ((MODE) == FE_TONEAREST)
-+#define EXCEPTION_TESTS_float 0
-+#define EXCEPTION_TESTS_double 0
-+#define EXCEPTION_TESTS_long_double 0
-+
-+#include_next <math-tests.h>
-diff --git a/sysdeps/arc/math_private.h b/sysdeps/arc/math_private.h
-new file mode 100644
-index 000000000000..35046d842533
---- /dev/null
-+++ b/sysdeps/arc/math_private.h
-@@ -0,0 +1,6 @@
-+#ifndef ARC_MATH_PRIVATE_H
-+#define ARC_MATH_PRIVATE_H
-+
-+#include_next <math_private.h>
-+
-+#endif
-diff --git a/sysdeps/arc/memusage.h b/sysdeps/arc/memusage.h
-new file mode 100644
-index 000000000000..536f1fdbf614
---- /dev/null
-+++ b/sysdeps/arc/memusage.h
-@@ -0,0 +1,23 @@
-+/* Machine-specific definitions for memory usage profiling, ARC version.
-+ Copyright (C) 2000-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#define GETSP() ({ register uintptr_t stack_ptr asm ("sp"); stack_ptr; })
-+
-+#define uatomic32_t unsigned int
-+
-+#include <sysdeps/generic/memusage.h>
-diff --git a/sysdeps/arc/nptl/Makefile b/sysdeps/arc/nptl/Makefile
-new file mode 100644
-index 000000000000..afeb58a8c1cb
---- /dev/null
-+++ b/sysdeps/arc/nptl/Makefile
-@@ -0,0 +1,22 @@
-+# NPTL makefile fragment for ARC.
-+# Copyright (C) 2005-2018 Free Software Foundation, Inc.
-+#
-+# This file is part of the GNU C Library.
-+#
-+# The GNU C Library is free software; you can redistribute it and/or
-+# modify it under the terms of the GNU Lesser General Public
-+# License as published by the Free Software Foundation; either
-+# version 2.1 of the License, or (at your option) any later version.
-+#
-+# The GNU C Library is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+# Lesser General Public License for more details.
-+#
-+# You should have received a copy of the GNU Lesser General Public
-+# License along with the GNU C Library. If not, see
-+# <http://www.gnu.org/licenses/>.
-+
-+ifeq ($(subdir),csu)
-+gen-as-const-headers += tcb-offsets.sym
-+endif
-diff --git a/sysdeps/arc/nptl/bits/pthreadtypes-arch.h b/sysdeps/arc/nptl/bits/pthreadtypes-arch.h
-new file mode 100644
-index 000000000000..473d9ec2bf0d
---- /dev/null
-+++ b/sysdeps/arc/nptl/bits/pthreadtypes-arch.h
-@@ -0,0 +1,72 @@
-+/* Machine-specific pthread type layouts. ARC version.
-+ Copyright (C) 2012-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#ifndef _BITS_PTHREADTYPES_ARCH_H
-+#define _BITS_PTHREADTYPES_ARCH_H 1
-+
-+#include <endian.h>
-+
-+#define __SIZEOF_PTHREAD_ATTR_T 36
-+#define __SIZEOF_PTHREAD_MUTEX_T 24
-+#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
-+#define __SIZEOF_PTHREAD_COND_T 48
-+#define __SIZEOF_PTHREAD_CONDATTR_T 4
-+#define __SIZEOF_PTHREAD_RWLOCK_T 32
-+#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
-+#define __SIZEOF_PTHREAD_BARRIER_T 20
-+#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
-+
-+/* Data structure for mutex handling. */
-+#define __PTHREAD_COMPAT_PADDING_MID
-+#define __PTHREAD_COMPAT_PADDING_END
-+#define __PTHREAD_MUTEX_LOCK_ELISION 0
-+#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1
-+#define __PTHREAD_MUTEX_USE_UNION 1
-+
-+#define __LOCK_ALIGNMENT
-+#define __ONCE_ALIGNMENT
-+
-+struct __pthread_rwlock_arch_t
-+{
-+ unsigned int __readers;
-+ unsigned int __writers;
-+ unsigned int __wrphase_futex;
-+ unsigned int __writers_futex;
-+ unsigned int __pad3;
-+ unsigned int __pad4;
-+#if __BYTE_ORDER == __BIG_ENDIAN
-+ unsigned char __pad1;
-+ unsigned char __pad2;
-+ unsigned char __shared;
-+ /* FLAGS must stay at this position in the structure to maintain
-+ binary compatibility. */
-+ unsigned char __flags;
-+#else
-+ /* FLAGS must stay at this position in the structure to maintain
-+ binary compatibility. */
-+ unsigned char __flags;
-+ unsigned char __shared;
-+ unsigned char __pad1;
-+ unsigned char __pad2;
-+#endif
-+ int __cur_writer;
-+};
-+
-+#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
-+
-+#endif /* bits/pthreadtypes-arch.h */
-diff --git a/sysdeps/arc/nptl/bits/semaphore.h b/sysdeps/arc/nptl/bits/semaphore.h
-new file mode 100644
-index 000000000000..1ecc8ab8a65b
---- /dev/null
-+++ b/sysdeps/arc/nptl/bits/semaphore.h
-@@ -0,0 +1,32 @@
-+/* Machine-specific POSIX semaphore type layouts. ARC version.
-+ Copyright (C) 2002-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#ifndef _SEMAPHORE_H
-+# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
-+#endif
-+
-+#define __SIZEOF_SEM_T 16
-+
-+/* Value returned if `sem_open' failed. */
-+#define SEM_FAILED ((sem_t *) 0)
-+
-+typedef union
-+{
-+ char __size[__SIZEOF_SEM_T];
-+ long int __align;
-+} sem_t;
-diff --git a/sysdeps/arc/nptl/pthread-offsets.h b/sysdeps/arc/nptl/pthread-offsets.h
-new file mode 100644
-index 000000000000..9617354dc7e3
---- /dev/null
-+++ b/sysdeps/arc/nptl/pthread-offsets.h
-@@ -0,0 +1,5 @@
-+#define __PTHREAD_MUTEX_NUSERS_OFFSET 16
-+#define __PTHREAD_MUTEX_KIND_OFFSET 12
-+#define __PTHREAD_MUTEX_SPINS_OFFSET 20
-+#define __PTHREAD_MUTEX_ELISION_OFFSET 22
-+#define __PTHREAD_MUTEX_LIST_OFFSET 20
-diff --git a/sysdeps/arc/nptl/pthreaddef.h b/sysdeps/arc/nptl/pthreaddef.h
-new file mode 100644
-index 000000000000..41e13c53038c
---- /dev/null
-+++ b/sysdeps/arc/nptl/pthreaddef.h
-@@ -0,0 +1,32 @@
-+/* pthread machine parameter definitions, ARC version.
-+ Copyright (C) 2002-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+/* Default stack size. */
-+#define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
-+
-+/* Required stack pointer alignment at beginning. */
-+#define STACK_ALIGN 4
-+
-+/* Minimal stack size after allocating thread descriptor and guard size. */
-+#define MINIMAL_REST_STACK 2048
-+
-+/* Alignment requirement for TCB. */
-+#define TCB_ALIGNMENT 4
-+
-+/* Location of current stack frame. */
-+#define CURRENT_STACK_FRAME __builtin_frame_address (0)
-diff --git a/sysdeps/arc/nptl/tcb-offsets.sym b/sysdeps/arc/nptl/tcb-offsets.sym
-new file mode 100644
-index 000000000000..56950e0676ed
---- /dev/null
-+++ b/sysdeps/arc/nptl/tcb-offsets.sym
-@@ -0,0 +1,11 @@
-+#include <sysdep.h>
-+#include <tls.h>
-+
-+-- Derive offsets relative to the thread register.
-+#define thread_offsetof(mem) (long)(offsetof(struct pthread, mem) - sizeof(struct pthread))
-+
-+MULTIPLE_THREADS_OFFSET offsetof (struct pthread, header.multiple_threads)
-+TLS_PRE_TCB_SIZE sizeof (struct pthread)
-+TLS_TCB_SIZE sizeof(tcbhead_t)
-+
-+PTHREAD_TID offsetof(struct pthread, tid)
-diff --git a/sysdeps/arc/nptl/tls.h b/sysdeps/arc/nptl/tls.h
-new file mode 100644
-index 000000000000..b6c2023ef3f6
---- /dev/null
-+++ b/sysdeps/arc/nptl/tls.h
-@@ -0,0 +1,150 @@
-+/* Definition for thread-local data handling. NPTL/ARC version.
-+ Copyright (C) 2012-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#ifndef _ARC_NPTL_TLS_H
-+#define _ARC_NPTL_TLS_H 1
-+
-+#include <dl-sysdep.h>
-+
-+#ifndef __ASSEMBLER__
-+# include <stdbool.h>
-+# include <stddef.h>
-+# include <stdint.h>
-+
-+#include <dl-dtv.h>
-+
-+/* Get system call information. */
-+# include <sysdep.h>
-+
-+/* The TLS blocks start right after the TCB. */
-+# define TLS_DTV_AT_TP 1
-+# define TLS_TCB_AT_TP 0
-+
-+/* Get the thread descriptor definition. */
-+# include <nptl/descr.h>
-+
-+typedef struct
-+{
-+ dtv_t *dtv;
-+ uintptr_t pointer_guard;
-+} tcbhead_t;
-+
-+register struct pthread *__thread_self __asm__("r25");
-+
-+/* This is the size of the initial TCB. */
-+# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
-+
-+/* Alignment requirements for the initial TCB. */
-+# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread)
-+
-+/* This is the size of the TCB. */
-+#ifndef TLS_TCB_SIZE
-+# define TLS_TCB_SIZE sizeof (tcbhead_t)
-+#endif
-+
-+/* Alignment requirements for the TCB. */
-+# define TLS_TCB_ALIGN __alignof__ (struct pthread)
-+
-+/* This is the size we need before TCB. */
-+# define TLS_PRE_TCB_SIZE sizeof (struct pthread)
-+
-+/* Install the dtv pointer. The pointer passed is to the element with
-+ index -1 which contain the length. */
-+# define INSTALL_DTV(tcbp, dtvp) \
-+ (((tcbhead_t *) (tcbp))->dtv = (dtvp) + 1)
-+
-+/* Install new dtv for current thread. */
-+# define INSTALL_NEW_DTV(dtv) \
-+ (THREAD_DTV() = (dtv))
-+
-+/* Return dtv of given thread descriptor. */
-+# define GET_DTV(tcbp) \
-+ (((tcbhead_t *) (tcbp))->dtv)
-+
-+/* Code to initially initialize the thread pointer. */
-+# define TLS_INIT_TP(tcbp) \
-+ ({ \
-+ long result_var; \
-+ __builtin_set_thread_pointer(tcbp); \
-+ result_var = INTERNAL_SYSCALL (arc_settls, err, 1, (tcbp)); \
-+ INTERNAL_SYSCALL_ERROR_P (result_var, err) \
-+ ? "unknown error" : NULL; \
-+ })
-+
-+/* Value passed to 'clone' for initialization of the thread register. */
-+# define TLS_DEFINE_INIT_TP(tp, pd) void *tp = (pd) + 1
-+
-+/* Return the address of the dtv for the current thread. */
-+# define THREAD_DTV() \
-+ (((tcbhead_t *) __builtin_thread_pointer ())->dtv)
-+
-+/* Return the thread descriptor for the current thread. */
-+# define THREAD_SELF \
-+ ((struct pthread *)__builtin_thread_pointer () - 1)
-+
-+/* Magic for libthread_db to know how to do THREAD_SELF. */
-+# define DB_THREAD_SELF \
-+ CONST_THREAD_AREA (32, sizeof (struct pthread))
-+
-+/* Access to data in the thread descriptor is easy. */
-+# define THREAD_GETMEM(descr, member) \
-+ descr->member
-+# define THREAD_GETMEM_NC(descr, member, idx) \
-+ descr->member[idx]
-+# define THREAD_SETMEM(descr, member, value) \
-+ descr->member = (value)
-+# define THREAD_SETMEM_NC(descr, member, idx, value) \
-+ descr->member[idx] = (value)
-+
-+/* Get and set the global scope generation counter in struct pthread. */
-+#define THREAD_GSCOPE_IN_TCB 1
-+#define THREAD_GSCOPE_FLAG_UNUSED 0
-+#define THREAD_GSCOPE_FLAG_USED 1
-+#define THREAD_GSCOPE_FLAG_WAIT 2
-+#define THREAD_GSCOPE_RESET_FLAG() \
-+ do \
-+ { int __res \
-+ = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \
-+ THREAD_GSCOPE_FLAG_UNUSED); \
-+ if (__res == THREAD_GSCOPE_FLAG_WAIT) \
-+ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \
-+ } \
-+ while (0)
-+#define THREAD_GSCOPE_SET_FLAG() \
-+ do \
-+ { \
-+ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \
-+ atomic_write_barrier (); \
-+ } \
-+ while (0)
-+#define THREAD_GSCOPE_WAIT() \
-+ GL(dl_wait_lookup_done) ()
-+
-+#else
-+
-+# include <tcb-offsets.h>
-+
-+# r25 is dedicated TLS register for ARC
-+.macro THREAD_SELF reg
-+ # struct pthread is just ahead of TCB
-+ sub \reg, r25, TLS_PRE_TCB_SIZE
-+.endm
-+
-+#endif /* __ASSEMBLER__ */
-+
-+#endif /* tls.h */
-diff --git a/sysdeps/arc/preconfigure b/sysdeps/arc/preconfigure
-new file mode 100644
-index 000000000000..8a24fcb18319
---- /dev/null
-+++ b/sysdeps/arc/preconfigure
-@@ -0,0 +1,6 @@
-+case "$machine" in
-+arc*)
-+ base_machine=arc
-+ machine=arc
-+ ;;
-+esac
-diff --git a/sysdeps/arc/setjmp.S b/sysdeps/arc/setjmp.S
-new file mode 100644
-index 000000000000..cbd44e538339
---- /dev/null
-+++ b/sysdeps/arc/setjmp.S
-@@ -0,0 +1,64 @@
-+/* setjmp for ARC.
-+ Copyright (C) 1991-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+
-+#include <sysdep.h>
-+
-+;@ r0 = jump buffer into which regs will be saved
-+ENTRY(setjmp)
-+ b.d __sigsetjmp
-+ mov r1, 1 ; save signals
-+END(setjmp)
-+
-+;@ r0 = jump buffer into which regs will be saved
-+ENTRY(_setjmp)
-+ b.d __sigsetjmp
-+ mov r1, 0 ; don't save signals
-+END(_setjmp)
-+libc_hidden_def(_setjmp)
-+
-+;@ r0 = jump buffer into which regs will be saved
-+;@ r1 = do we need to save signals
-+ENTRY(__sigsetjmp)
-+
-+ st_s r13, [r0]
-+ st_s r14, [r0,4]
-+ st r15, [r0,8]
-+ st r16, [r0,12]
-+ st r17, [r0,16]
-+ st r18, [r0,20]
-+ st r19, [r0,24]
-+ st r20, [r0,28]
-+ st r21, [r0,32]
-+ st r22, [r0,36]
-+ st r23, [r0,40]
-+ st r24, [r0,44]
-+ st r25, [r0,48]
-+ st fp, [r0,52]
-+ st sp, [r0,56]
-+
-+ ; make a note of where longjmp will return to.
-+ ; that will be right next to this setjmp call-site which will be
-+ ; contained in blink, since "C" caller of this routine will do
-+ ; a branch-n-link
-+
-+ st blink, [r0,60]
-+ b __sigjmp_save
-+
-+END(__sigsetjmp)
-+libc_hidden_def(__sigsetjmp)
-diff --git a/sysdeps/arc/sfp-machine.h b/sysdeps/arc/sfp-machine.h
-new file mode 100644
-index 000000000000..95eefc187430
---- /dev/null
-+++ b/sysdeps/arc/sfp-machine.h
-@@ -0,0 +1,51 @@
-+#define _FP_W_TYPE_SIZE 32
-+#define _FP_W_TYPE unsigned long
-+#define _FP_WS_TYPE signed long
-+#define _FP_I_TYPE long
-+
-+#define _FP_MUL_MEAT_S(R,X,Y) \
-+ _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm)
-+#define _FP_MUL_MEAT_D(R,X,Y) \
-+ _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm)
-+#define _FP_MUL_MEAT_Q(R,X,Y) \
-+ _FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)
-+
-+#define _FP_MUL_MEAT_DW_S(R,X,Y) \
-+ _FP_MUL_MEAT_DW_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm)
-+#define _FP_MUL_MEAT_DW_D(R,X,Y) \
-+ _FP_MUL_MEAT_DW_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm)
-+#define _FP_MUL_MEAT_DW_Q(R,X,Y) \
-+ _FP_MUL_MEAT_DW_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)
-+
-+#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_loop(S,R,X,Y)
-+#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_2_udiv(D,R,X,Y)
-+#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_4_udiv(Q,R,X,Y)
-+
-+#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1)
-+#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1), -1
-+#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1
-+#define _FP_NANSIGN_S 0
-+#define _FP_NANSIGN_D 0
-+#define _FP_NANSIGN_Q 0
-+
-+#define _FP_KEEPNANFRACP 1
-+#define _FP_QNANNEGATEDP 0
-+
-+/* This is arbitrarily taken from the PowerPC version. */
-+#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \
-+ do { \
-+ if ((_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs) \
-+ && !(_FP_FRAC_HIGH_RAW_##fs(Y) & _FP_QNANBIT_##fs)) \
-+ { \
-+ R##_s = Y##_s; \
-+ _FP_FRAC_COPY_##wc(R,Y); \
-+ } \
-+ else \
-+ { \
-+ R##_s = X##_s; \
-+ _FP_FRAC_COPY_##wc(R,X); \
-+ } \
-+ R##_c = FP_CLS_NAN; \
-+ } while (0)
-+
-+#define _FP_TININESS_AFTER_ROUNDING 0
-diff --git a/sysdeps/arc/sotruss-lib.c b/sysdeps/arc/sotruss-lib.c
-new file mode 100644
-index 000000000000..fc6a009e913a
---- /dev/null
-+++ b/sysdeps/arc/sotruss-lib.c
-@@ -0,0 +1,51 @@
-+/* Override generic sotruss-lib.c to define actual functions for ARC.
-+ Copyright (C) 2017-2018 Free Software Foundation, Inc.
-+
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#define HAVE_ARCH_PLTENTER
-+#define HAVE_ARCH_PLTEXIT
-+
-+#include <elf/sotruss-lib.c>
-+
-+ElfW(Addr)
-+la_arc_gnu_pltenter (ElfW(Sym) *sym __attribute__ ((unused)),
-+ unsigned int ndx __attribute__ ((unused)),
-+ uintptr_t *refcook, uintptr_t *defcook,
-+ La_arc_regs *regs, unsigned int *flags,
-+ const char *symname, long int *framesizep)
-+{
-+ print_enter (refcook, defcook, symname,
-+ regs->lr_reg[0], regs->lr_reg[1], regs->lr_reg[2],
-+ *flags);
-+
-+ /* No need to copy anything, we will not need the parameters in any case. */
-+ *framesizep = 0;
-+
-+ return sym->st_value;
-+}
-+
-+unsigned int
-+la_arc_gnu_pltexit (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook,
-+ uintptr_t *defcook,
-+ const struct La_arc_regs *inregs,
-+ struct La_arc_retval *outregs, const char *symname)
-+{
-+ print_exit (refcook, defcook, symname, outregs->lrv_reg[0]);
-+
-+ return 0;
-+}
-diff --git a/sysdeps/arc/stackinfo.h b/sysdeps/arc/stackinfo.h
-new file mode 100644
-index 000000000000..42821ada1027
---- /dev/null
-+++ b/sysdeps/arc/stackinfo.h
-@@ -0,0 +1,33 @@
-+/* Stack environment definitions for ARC.
-+ Copyright (C) 2012-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+/* This file contains a bit of information about the stack allocation
-+ of the processor. */
-+
-+#ifndef _STACKINFO_H
-+#define _STACKINFO_H 1
-+
-+#include <elf.h>
-+
-+/* On ARC the stack grows down. */
-+#define _STACK_GROWS_DOWN 1
-+
-+/* Default to a non-executable stack. */
-+#define DEFAULT_STACK_PERMS (PF_R|PF_W)
-+
-+#endif /* stackinfo.h */
-diff --git a/sysdeps/arc/start.S b/sysdeps/arc/start.S
-new file mode 100644
-index 000000000000..79e73e27d00d
---- /dev/null
-+++ b/sysdeps/arc/start.S
-@@ -0,0 +1,89 @@
-+/* Startup code for ARC
-+ Copyright (C) 1995-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ In addition to the permissions in the GNU Lesser General Public
-+ License, the Free Software Foundation gives you unlimited
-+ permission to link the compiled version of this file with other
-+ programs, and to distribute those programs without any restriction
-+ coming from the use of this file. (The GNU Lesser General Public
-+ License restrictions do apply in other respects; for example, they
-+ cover modification of the file, and distribution when not linked
-+ into another program.)
-+
-+ Note that people who make modified versions of this file are not
-+ obligated to grant this special exception for their modified
-+ versions; it is their choice whether to do so. The GNU Lesser
-+ General Public License gives permission to release a modified
-+ version without this exception; this exception also makes it
-+ possible to release a modified version which carries forward this
-+ exception.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+
-+#define __ASSEMBLY__ 1
-+#include <entry.h>
-+#ifndef ENTRY_POINT
-+#error ENTRY_POINT needs to be defined for ARC
-+#endif
-+
-+/* When we enter this piece of code, the program stack looks like this:
-+
-+ argc argument counter (integer)
-+ argv[0] program name (pointer)
-+ argv[1...N] program args (pointers)
-+ argv[argc-1] end of args (integer)
-+ NULL
-+ env[0...N] environment variables (pointers)
-+ NULL
-+*/
-+ .text
-+ .align 4
-+ .global __start
-+ .type __start,@function
-+__start:
-+ mov fp, 0
-+ ld_s r1, [sp] ; argc
-+
-+ mov_s r5, r0 ; rltd_fini
-+ add_s r2, sp, 4 ; argv
-+ and sp, sp, -8
-+ mov r6, sp
-+
-+#ifdef SHARED
-+ ld r0, [pcl, @main@gotpc]
-+ ld r3, [pcl, @__libc_csu_init@gotpc]
-+ ld r4, [pcl, @__libc_csu_fini@gotpc]
-+ bl __libc_start_main@plt
-+#else
-+ mov_s r0, main
-+ mov_s r3, __libc_csu_init
-+ mov r4, __libc_csu_fini
-+ bl __libc_start_main
-+#endif
-+ /* __libc_start_main (main, argc, argv, init, fini, rtld_fini, stack_end) */
-+
-+ /* Should never get here.... */
-+ flag 1
-+ .size __start,.-__start
-+
-+/* Define a symbol for the first piece of initialized data. */
-+ .data
-+ .globl __data_start
-+__data_start:
-+ .long 0
-+ .weak data_start
-+ data_start = __data_start
-diff --git a/sysdeps/arc/sysdep.h b/sysdeps/arc/sysdep.h
-new file mode 100644
-index 000000000000..920611277089
---- /dev/null
-+++ b/sysdeps/arc/sysdep.h
-@@ -0,0 +1,51 @@
-+/* Assembler macros for ARC.
-+ Copyright (C) 2017-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public License as
-+ published by the Free Software Foundation; either version 2.1 of the
-+ License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include <sysdeps/generic/sysdep.h>
-+
-+#ifdef __ASSEMBLER__
-+
-+/* Syntactic details of assembler.
-+ * One weirness is ; is not newline but comment
-+ * Although # is also for comment
-+ */
-+
-+#define ASM_SIZE_DIRECTIVE(name) .size name,.-name
-+
-+#define ENTRY(name) \
-+ .align 4 ASM_LINE_SEP \
-+ .globl C_SYMBOL_NAME(name) ASM_LINE_SEP \
-+ .type C_SYMBOL_NAME(name),%function ASM_LINE_SEP \
-+ C_LABEL(name) ASM_LINE_SEP \
-+ cfi_startproc ASM_LINE_SEP \
-+ CALL_MCOUNT
-+
-+#undef END
-+#define END(name) \
-+ cfi_endproc ASM_LINE_SEP \
-+ ASM_SIZE_DIRECTIVE(name)
-+
-+#ifdef SHARED
-+#define PLTJMP(_x) _x##@plt
-+#else
-+#define PLTJMP(_x) _x
-+#endif
-+
-+# define CALL_MCOUNT /* Do nothing for now. */
-+
-+#endif /* __ASSEMBLER__ */
-diff --git a/sysdeps/arc/tls-macros.h b/sysdeps/arc/tls-macros.h
-new file mode 100644
-index 000000000000..51855edef6e7
---- /dev/null
-+++ b/sysdeps/arc/tls-macros.h
-@@ -0,0 +1,29 @@
-+/* Macros to support TLS testing in times of missing compiler support. */
-+
-+/* For now */
-+#define TLS_LD(x) TLS_IE(x)
-+
-+#define TLS_GD(x) \
-+ ({ int *__result; \
-+ __asm__ ("add r0, pcl, @" #x "@tlsgd \n" \
-+ ".tls_gd_ld " #x "`bl __tls_get_addr@plt \n" \
-+ "mov %0, r0 \n" \
-+ : "=&r" (__result) \
-+ ::"r0","r1","r2","r3","r4","r5","r6","r7", \
-+ "r8","r9","r10","r11","r12"); \
-+ __result; })
-+
-+#define TLS_LE(x) \
-+ ({ int *__result; \
-+ void *tp = __builtin_thread_pointer(); \
-+ __asm__ ("add %0, %1, @" #x "@tpoff \n" \
-+ : "=r" (__result) : "r"(tp)); \
-+ __result; })
-+
-+#define TLS_IE(x) \
-+ ({ int *__result; \
-+ void *tp = __builtin_thread_pointer(); \
-+ __asm__ ("ld %0, [pcl, @" #x "@tlsie] \n" \
-+ "add %0, %1, %0 \n" \
-+ : "=&r" (__result) : "r" (tp)); \
-+ __result; })
-diff --git a/sysdeps/arc/tst-audit.h b/sysdeps/arc/tst-audit.h
-new file mode 100644
-index 000000000000..8ae3734cd50c
---- /dev/null
-+++ b/sysdeps/arc/tst-audit.h
-@@ -0,0 +1,23 @@
-+/* Definitions for testing PLT entry/exit auditing. ARC version.
-+ Copyright (C) 2009-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#define pltenter la_arc_gnu_pltenter
-+#define pltexit la_arc_gnu_pltexit
-+#define La_regs La_arc_regs
-+#define La_retval La_arc_retval
-+#define int_retval lrv_reg[0]
-diff --git a/sysdeps/unix/make-syscalls.sh b/sysdeps/unix/make-syscalls.sh
-index e39b2d6d5214..6a5c10d54e87 100644
---- a/sysdeps/unix/make-syscalls.sh
-+++ b/sysdeps/unix/make-syscalls.sh
-@@ -7,7 +7,7 @@
- #
- # This script is used to process the syscall data encoded in the various
- # syscalls.list files to produce thin assembly syscall wrappers around the
--# appropriate OS syscall. See syscall-template.s for more details on the
-+# appropriate OS syscall. See syscall-template.S for more details on the
- # actual wrapper.
- #
- # Syscall Signature Prefixes:
-diff --git a/sysdeps/unix/sysv/linux/arc/Implies b/sysdeps/unix/sysv/linux/arc/Implies
-new file mode 100644
-index 000000000000..7f739a0340b6
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/Implies
-@@ -0,0 +1,3 @@
-+arc/nptl
-+unix/sysv/linux/generic/wordsize-32
-+unix/sysv/linux/generic
-diff --git a/sysdeps/unix/sysv/linux/arc/Makefile b/sysdeps/unix/sysv/linux/arc/Makefile
-new file mode 100644
-index 000000000000..a6c6dfc6ec64
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/Makefile
-@@ -0,0 +1,20 @@
-+ifeq ($(subdir),stdlib)
-+gen-as-const-headers += ucontext_i.sym
-+endif
-+
-+ifeq ($(subdir),signal)
-+sysdep_routines += sigrestorer
-+endif
-+
-+ifeq ($(subdir),misc)
-+# MIPS/Tile-style cacheflush routine
-+sysdep_headers += sys/cachectl.h
-+sysdep_routines += cacheflush
-+endif
-+
-+ifeq ($(subdir),elf)
-+ifeq ($(build-shared),yes)
-+# This is needed for DSO loading from static binaries.
-+sysdep-dl-routines += dl-static
-+endif
-+endif
-diff --git a/sysdeps/unix/sysv/linux/arc/Versions b/sysdeps/unix/sysv/linux/arc/Versions
-new file mode 100644
-index 000000000000..87974e40aa75
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/Versions
-@@ -0,0 +1,16 @@
-+ld {
-+ GLIBC_PRIVATE {
-+ # used for loading by static libraries
-+ _dl_var_init;
-+ }
-+}
-+libc {
-+ GLIBC_2.27 {
-+ _flush_cache;
-+ cacheflush;
-+ }
-+ GLIBC_PRIVATE {
-+ # A copy of sigaction lives in libpthread, and needs these.
-+ __default_rt_sa_restorer;
-+ }
-+}
-diff --git a/sysdeps/unix/sysv/linux/arc/bits/mman.h b/sysdeps/unix/sysv/linux/arc/bits/mman.h
-new file mode 100644
-index 000000000000..d52a82eae4ad
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/bits/mman.h
-@@ -0,0 +1,42 @@
-+/* Definitions for POSIX memory map interface. Linux/ARC version.
-+
-+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
-+
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#ifndef _SYS_MMAN_H
-+# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
-+#endif
-+
-+/* The following definitions basically come from the kernel headers.
-+ But the kernel header is not namespace clean. */
-+
-+/* These are Linux-specific. */
-+#ifdef __USE_MISC
-+# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */
-+# define MAP_DENYWRITE 0x00800 /* ETXTBSY */
-+# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */
-+# define MAP_LOCKED 0x02000 /* Lock the mapping. */
-+# define MAP_NORESERVE 0x04000 /* Don't check for reservations. */
-+# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */
-+# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
-+# define MAP_STACK 0x20000 /* Allocation is for a stack. */
-+# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
-+#endif
-+
-+/* Include generic Linux declarations. */
-+#include <bits/mman-linux.h>
-diff --git a/sysdeps/unix/sysv/linux/arc/bits/sigaction.h b/sysdeps/unix/sysv/linux/arc/bits/sigaction.h
-new file mode 100644
-index 000000000000..47e86c06ce98
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/bits/sigaction.h
-@@ -0,0 +1,85 @@
-+/* The proper definitions for Linux's sigaction.
-+ Copyright (C) 1993-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#ifndef _BITS_SIGACTION_H
-+#define _BITS_SIGACTION_H 1
-+
-+#ifndef _SIGNAL_H
-+# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
-+#endif
-+
-+/* Structure describing the action to be taken when a signal arrives.
-+ * The generic struct is NOT ABI compatible with asm-generic Linux syscall variant*/
-+
-+struct sigaction
-+ {
-+ /* Signal handler. */
-+#if defined __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED
-+ union
-+ {
-+ /* Used if SA_SIGINFO is not set. */
-+ __sighandler_t sa_handler;
-+ /* Used if SA_SIGINFO is set. */
-+ void (*sa_sigaction) (int, siginfo_t *, void *);
-+ }
-+ __sigaction_handler;
-+# define sa_handler __sigaction_handler.sa_handler
-+# define sa_sigaction __sigaction_handler.sa_sigaction
-+#else
-+ __sighandler_t sa_handler;
-+#endif
-+
-+ /* Special flags. */
-+ int sa_flags;
-+
-+ /* Restore handler. */
-+ void (*sa_restorer) (void);
-+
-+ /* Additional set of signals to be blocked. */
-+ __sigset_t sa_mask;
-+ };
-+
-+/* Bits in `sa_flags'. */
-+#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */
-+#define SA_NOCLDWAIT 2 /* Don't create zombie on child death. */
-+#define SA_SIGINFO 4 /* Invoke signal-catching function with
-+ three arguments instead of one. */
-+#if defined __USE_XOPEN_EXTENDED || defined __USE_MISC
-+# define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */
-+#endif
-+#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
-+# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */
-+# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when
-+ its handler is being executed. */
-+# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */
-+#endif
-+#ifdef __USE_MISC
-+# define SA_INTERRUPT 0x20000000 /* Historical no-op. */
-+
-+/* Some aliases for the SA_ constants. */
-+# define SA_NOMASK SA_NODEFER
-+# define SA_ONESHOT SA_RESETHAND
-+# define SA_STACK SA_ONSTACK
-+#endif
-+
-+/* Values for the HOW argument to `sigprocmask'. */
-+#define SIG_BLOCK 0 /* Block signals. */
-+#define SIG_UNBLOCK 1 /* Unblock signals. */
-+#define SIG_SETMASK 2 /* Set the set of blocked signals. */
-+
-+#endif
-\ No newline at end of file
-diff --git a/sysdeps/unix/sysv/linux/arc/c++-types.data b/sysdeps/unix/sysv/linux/arc/c++-types.data
-new file mode 100644
-index 000000000000..303f4570c8ee
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/c++-types.data
-@@ -0,0 +1,67 @@
-+blkcnt64_t:x
-+blkcnt_t:l
-+blksize_t:i
-+caddr_t:Pc
-+clockid_t:i
-+clock_t:l
-+daddr_t:i
-+dev_t:y
-+fd_mask:l
-+fsblkcnt64_t:y
-+fsblkcnt_t:m
-+fsfilcnt64_t:y
-+fsfilcnt_t:m
-+fsid_t:8__fsid_t
-+gid_t:j
-+id_t:j
-+ino64_t:y
-+ino_t:m
-+int16_t:s
-+int32_t:i
-+int64_t:x
-+int8_t:a
-+intptr_t:i
-+key_t:i
-+loff_t:x
-+mode_t:j
-+nlink_t:j
-+off64_t:x
-+off_t:l
-+pid_t:i
-+pthread_attr_t:14pthread_attr_t
-+pthread_barrier_t:17pthread_barrier_t
-+pthread_barrierattr_t:21pthread_barrierattr_t
-+pthread_cond_t:14pthread_cond_t
-+pthread_condattr_t:18pthread_condattr_t
-+pthread_key_t:j
-+pthread_mutex_t:15pthread_mutex_t
-+pthread_mutexattr_t:19pthread_mutexattr_t
-+pthread_once_t:i
-+pthread_rwlock_t:16pthread_rwlock_t
-+pthread_rwlockattr_t:20pthread_rwlockattr_t
-+pthread_spinlock_t:i
-+pthread_t:m
-+quad_t:x
-+register_t:i
-+rlim64_t:y
-+rlim_t:m
-+sigset_t:10__sigset_t
-+size_t:j
-+socklen_t:j
-+ssize_t:i
-+suseconds_t:l
-+time_t:l
-+u_char:h
-+uid_t:j
-+uint:j
-+u_int:j
-+u_int16_t:t
-+u_int32_t:j
-+u_int64_t:y
-+u_int8_t:h
-+ulong:m
-+u_long:m
-+u_quad_t:y
-+useconds_t:j
-+ushort:t
-+u_short:t
-diff --git a/sysdeps/unix/sysv/linux/arc/cacheflush.c b/sysdeps/unix/sysv/linux/arc/cacheflush.c
-new file mode 100644
-index 000000000000..7b14211eccf7
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/cacheflush.c
-@@ -0,0 +1,29 @@
-+/* cacheflush system call for ARC Linux.
-+ Copyright (C) 2017-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include <sysdep.h>
-+#include <stddef.h>
-+#include <unistd.h>
-+
-+/* Flush cache(s). */
-+int
-+_flush_cache (char *addr, const int nbytes, const int op)
-+{
-+ return INLINE_SYSCALL (cacheflush, 3, addr, nbytes, op);
-+}
-+weak_alias (_flush_cache, cacheflush)
-diff --git a/sysdeps/unix/sysv/linux/arc/clone.S b/sysdeps/unix/sysv/linux/arc/clone.S
-new file mode 100644
-index 000000000000..04f2df5ef06d
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/clone.S
-@@ -0,0 +1,100 @@
-+/* clone() implementation for ARC.
-+ Copyright (C) 2008-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+ Contributed by Andrew Jenner <andrew@codesourcery.com>, 2008.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+
-+#include <sysdep.h>
-+#define _ERRNO_H 1
-+#include <bits/errno.h>
-+#include <tcb-offsets.h>
-+
-+#define CLONE_SETTLS 0x00080000
-+
-+; int clone(int (*fn)(void *), void *child_stack,
-+; int flags, void *arg, ...
-+; /* pid_t *ptid, struct user_desc *tls, pid_t *ctid */);
-+;
-+; NOTE: I'm assuming that the last 3 args are NOT var-args and in case all
-+; 3 are not relevant, caller will nevertheless pass those as NULL.
-+; Current (Jul 2012) upstream powerpc/clone.S assumes similarly.
-+; Our LTP (from 2007) doesn't seem to have tests to prove otherwise
-+
-+; clone syscall in kernel (ABI: CONFIG_CLONE_BACKWARDS)
-+;
-+; int sys_clone(unsigned long clone_flags,
-+; unsigned long newsp,
-+; int __user *parent_tidptr,
-+; void *tls,
-+; int __user *child_tidptr)
-+
-+ENTRY(__clone)
-+ cmp r0, 0 ; @fn can't be NULL
-+ cmp.ne r1, 0 ; @child_stack can't be NULL
-+ bz .L__sys_err
-+
-+ ; save some of the orig args
-+ ; r0 containg @fn will be clobbered AFTER syscall (with ret val)
-+ ; rest are clobbered BEFORE syscall due to different arg ordering
-+ mov r10, r0 ; @fn
-+ mov r11, r3 ; @args
-+ mov r12, r2 ; @clone_flags
-+ mov r9, r5 ; @tls
-+
-+ ; adjust libc args for syscall
-+
-+ mov r0, r2 ; libc @flags is 1st syscall arg
-+ mov r2, r4 ; libc @ptid
-+ mov r3, r5 ; libc @tls
-+ mov r4, r6 ; libc @ctid
-+ mov r8, __NR_clone
-+ ARC_TRAP_INSN
-+
-+ cmp r0, 0 ; return code : 0 new process, !0 parent
-+ blt .L__sys_err2 ; < 0 (signed) error
-+ jnz [blink] ; Parent returns
-+
-+ ; ----- child starts here ---------
-+
-+ ; Setup TP register (only recent kernels v4.19+ do that)
-+ and.f 0, r12, CLONE_SETTLS
-+ mov.nz r25, r9
-+
-+ ; child jumps off to @fn with @arg as argument, and returns here
-+ jl.d [r10]
-+ mov r0, r11
-+
-+ ; exit() with result from @fn (already in r0)
-+ mov r8, __NR_exit
-+ ARC_TRAP_INSN
-+ ; In case it ever came back
-+ flag 1
-+
-+.L__sys_err:
-+ mov r0, -EINVAL
-+.L__sys_err2:
-+ ; (1) No need to make -ve kernel error code as positive errno
-+ ; __syscall_error expects the -ve error code returned by kernel
-+ ; (2) r0 still had orig -ve kernel error code
-+ ; (3) Tail call to __syscall_error so we dont have to come back
-+ ; here hence instead of jmp-n-link (reg push/pop) we do jmp
-+ ; (4) No need to route __syscall_error via PLT, B is inherently
-+ ; position independent
-+ b __syscall_error
-+PSEUDO_END (__clone)
-+libc_hidden_def (__clone)
-+weak_alias (__clone, clone)
-diff --git a/sysdeps/unix/sysv/linux/arc/configure b/sysdeps/unix/sysv/linux/arc/configure
-new file mode 100644
-index 000000000000..f74fa7cb0259
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/configure
-@@ -0,0 +1,4 @@
-+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
-+ # Local configure fragment for sysdeps/unix/sysv/linux/arc.
-+
-+arch_minimum_kernel=3.9.0
-diff --git a/sysdeps/unix/sysv/linux/arc/configure.ac b/sysdeps/unix/sysv/linux/arc/configure.ac
-new file mode 100644
-index 000000000000..a9528032d32a
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/configure.ac
-@@ -0,0 +1,4 @@
-+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-+# Local configure fragment for sysdeps/unix/sysv/linux/arc.
-+
-+arch_minimum_kernel=3.9.0
-diff --git a/sysdeps/unix/sysv/linux/arc/dl-static.c b/sysdeps/unix/sysv/linux/arc/dl-static.c
-new file mode 100644
-index 000000000000..2683ee5e7e2a
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/dl-static.c
-@@ -0,0 +1,84 @@
-+/* Variable initialization. ARC version.
-+ Copyright (C) 2001-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include <ldsodefs.h>
-+
-+#ifdef SHARED
-+
-+void
-+_dl_var_init (void *array[])
-+{
-+ /* It has to match "variables" below. */
-+ enum
-+ {
-+ DL_PAGESIZE = 0
-+ };
-+
-+ GLRO(dl_pagesize) = *((size_t *) array[DL_PAGESIZE]);
-+}
-+
-+#else
-+
-+static void *variables[] =
-+{
-+ &GLRO(dl_pagesize)
-+};
-+
-+static void
-+_dl_unprotect_relro (struct link_map *l)
-+{
-+ ElfW(Addr) start = ((l->l_addr + l->l_relro_addr)
-+ & ~(GLRO(dl_pagesize) - 1));
-+ ElfW(Addr) end = ((l->l_addr + l->l_relro_addr + l->l_relro_size)
-+ & ~(GLRO(dl_pagesize) - 1));
-+
-+ if (start != end)
-+ __mprotect ((void *) start, end - start, PROT_READ | PROT_WRITE);
-+}
-+
-+void
-+_dl_static_init (struct link_map *l)
-+{
-+ struct link_map *rtld_map = l;
-+ struct r_scope_elem **scope;
-+ const ElfW(Sym) *ref = NULL;
-+ lookup_t loadbase;
-+ void (*f) (void *[]);
-+ size_t i;
-+
-+ loadbase = _dl_lookup_symbol_x ("_dl_var_init", l, &ref, l->l_local_scope,
-+ NULL, 0, 1, NULL);
-+
-+ for (scope = l->l_local_scope; *scope != NULL; scope++)
-+ for (i = 0; i < (*scope)->r_nlist; i++)
-+ if ((*scope)->r_list[i] == loadbase)
-+ {
-+ rtld_map = (*scope)->r_list[i];
-+ break;
-+ }
-+
-+ if (ref != NULL)
-+ {
-+ f = (void (*) (void *[])) DL_SYMBOL_ADDRESS (loadbase, ref);
-+ _dl_unprotect_relro (rtld_map);
-+ f (variables);
-+ _dl_protect_relro (rtld_map);
-+ }
-+}
-+
-+#endif
-diff --git a/sysdeps/unix/sysv/linux/arc/getcontext.S b/sysdeps/unix/sysv/linux/arc/getcontext.S
-new file mode 100644
-index 000000000000..af31f581e846
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/getcontext.S
-@@ -0,0 +1,65 @@
-+/* Save current context for ARC
-+ Copyright (C) 2009-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include "ucontext-macros.h"
-+
-+/* int getcontext (ucontext_t *ucp)
-+
-+ Save machine context in @ucp and return 0 on success, -1 on error
-+ - saves callee saved registers only
-+ - layout mandated by uncontext_t:m_context (hence different from setjmp)
-+*/
-+
-+ENTRY(__getcontext)
-+
-+ /* callee saved registers */
-+ SAVE_REG(r13, r0, 37)
-+ SAVE_REG(r14, r0, 36)
-+ SAVE_REG(r15, r0, 35)
-+ SAVE_REG(r16, r0, 34)
-+ SAVE_REG(r17, r0, 33)
-+ SAVE_REG(r18, r0, 32)
-+ SAVE_REG(r19, r0, 31)
-+ SAVE_REG(r20, r0, 30)
-+ SAVE_REG(r21, r0, 29)
-+ SAVE_REG(r22, r0, 28)
-+ SAVE_REG(r23, r0, 27)
-+ SAVE_REG(r24, r0, 26)
-+ SAVE_REG(r25, r0, 25)
-+
-+ SAVE_REG(blink, r0, 7)
-+ SAVE_REG(fp, r0, 8)
-+ SAVE_REG(sp, r0, 23)
-+
-+ /* save 0 in r0 placeholder to return 0 when this @ucp activated */
-+ mov r9, 0
-+ SAVE_REG(r9, r0, 22)
-+
-+ /* rt_sigprocmask (SIG_BLOCK, NULL, &ucp->uc_sigmask, _NSIG8) */
-+ mov r3, _NSIG8
-+ add r2, r0, UCONTEXT_SIGMASK
-+ mov r1, 0
-+ mov r0, SIG_BLOCK
-+ mov r8, __NR_rt_sigprocmask
-+ ARC_TRAP_INSN
-+ brhi r0, -1024, .Lcall_syscall_err
-+ j.d [blink]
-+ mov r0, 0 ; success ; error case handled in .Lcall_syscall_err
-+
-+PSEUDO_END(__getcontext)
-+weak_alias(__getcontext, getcontext)
-diff --git a/sysdeps/unix/sysv/linux/arc/ipc_priv.h b/sysdeps/unix/sysv/linux/arc/ipc_priv.h
-new file mode 100644
-index 000000000000..5f6e9815d169
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/ipc_priv.h
-@@ -0,0 +1,21 @@
-+/* Old SysV permission definition for Linux. ARC version.
-+ Copyright (C) 2016-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include <sys/ipc.h> /* For __key_t */
-+
-+#define __IPC_64 0x0
-diff --git a/sysdeps/unix/sysv/linux/arc/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/arc/jmp_buf-macros.h
-new file mode 100644
-index 000000000000..2fec69d21657
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/jmp_buf-macros.h
-@@ -0,0 +1,6 @@
-+#define JMP_BUF_SIZE (32 + 1 + 1024/32) * 4
-+#define SIGJMP_BUF_SIZE (32 + 1 + 1024/32) * 4
-+#define JMP_BUF_ALIGN 4
-+#define SIGJMP_BUF_ALIGN 4
-+#define MASK_WAS_SAVED_OFFSET 32 * 4
-+#define SAVED_MASK_OFFSET 33 * 4
-diff --git a/sysdeps/unix/sysv/linux/arc/kernel-features.h b/sysdeps/unix/sysv/linux/arc/kernel-features.h
-new file mode 100644
-index 000000000000..d8f667ca4759
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/kernel-features.h
-@@ -0,0 +1,28 @@
-+/* Set flags signalling availability of kernel features based on given
-+ kernel version number.
-+
-+ Copyright (C) 2009-2018 Free Software Foundation, Inc.
-+
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+/* The minimum supported kernel version for ARC is 3.9,
-+ guaranteeing many kernel features. */
-+
-+#include_next <kernel-features.h>
-+
-+#undef __ASSUME_CLONE_DEFAULT
-+#define __ASSUME_CLONE_BACKWARDS 1
-diff --git a/sysdeps/unix/sysv/linux/arc/ld.abilist b/sysdeps/unix/sysv/linux/arc/ld.abilist
-new file mode 100644
-index 000000000000..1aad547f8a4b
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/ld.abilist
-@@ -0,0 +1,9 @@
-+GLIBC_2.27 __libc_stack_end D 0x4
-+GLIBC_2.27 __stack_chk_guard D 0x4
-+GLIBC_2.27 __tls_get_addr F
-+GLIBC_2.27 _dl_mcount F
-+GLIBC_2.27 _r_debug D 0x14
-+GLIBC_2.27 calloc F
-+GLIBC_2.27 free F
-+GLIBC_2.27 malloc F
-+GLIBC_2.27 realloc F
-diff --git a/sysdeps/unix/sysv/linux/arc/ldconfig.h b/sysdeps/unix/sysv/linux/arc/ldconfig.h
-new file mode 100644
-index 000000000000..c38ce20edaea
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/ldconfig.h
-@@ -0,0 +1,25 @@
-+/* dynamic linker names for ARC
-+ Copyright (C) 2001-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include <sysdeps/generic/ldconfig.h>
-+
-+#define SYSDEP_KNOWN_INTERPRETER_NAMES \
-+ { "/lib/ld-linux.so.2", FLAG_ELF_LIBC6 },
-+#define SYSDEP_KNOWN_LIBRARY_NAMES \
-+ { "libc.so.6", FLAG_ELF_LIBC6 }, \
-+ { "libm.so.6", FLAG_ELF_LIBC6 },
-diff --git a/sysdeps/unix/sysv/linux/arc/ldsodefs.h b/sysdeps/unix/sysv/linux/arc/ldsodefs.h
-new file mode 100644
-index 000000000000..005c49a7b7cd
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/ldsodefs.h
-@@ -0,0 +1,32 @@
-+/* Run-time dynamic linker data structures for loaded ELF shared objects. ARC
-+ Copyright (C) 2001-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#ifndef _LDSODEFS_H
-+
-+/* Get the real definitions. */
-+#include_next <ldsodefs.h>
-+
-+/* Now define our stuff. */
-+
-+/* We need special support to initialize DSO loaded for statically linked
-+ binaries. */
-+extern void _dl_static_init (struct link_map *map);
-+#undef DL_STATIC_INIT
-+#define DL_STATIC_INIT(map) _dl_static_init (map)
-+
-+#endif /* ldsodefs.h */
-diff --git a/sysdeps/unix/sysv/linux/arc/libBrokenLocale.abilist b/sysdeps/unix/sysv/linux/arc/libBrokenLocale.abilist
-new file mode 100644
-index 000000000000..18968d3c01d1
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/libBrokenLocale.abilist
-@@ -0,0 +1 @@
-+GLIBC_2.27 __ctype_get_mb_cur_max F
-diff --git a/sysdeps/unix/sysv/linux/arc/libanl.abilist b/sysdeps/unix/sysv/linux/arc/libanl.abilist
-new file mode 100644
-index 000000000000..711fc87c2af1
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/libanl.abilist
-@@ -0,0 +1,4 @@
-+GLIBC_2.27 gai_cancel F
-+GLIBC_2.27 gai_error F
-+GLIBC_2.27 gai_suspend F
-+GLIBC_2.27 getaddrinfo_a F
-diff --git a/sysdeps/unix/sysv/linux/arc/libc.abilist b/sysdeps/unix/sysv/linux/arc/libc.abilist
-new file mode 100644
-index 000000000000..b25e35d50280
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/libc.abilist
-@@ -0,0 +1,2091 @@
-+GLIBC_2.27 _Exit F
-+GLIBC_2.27 _IO_2_1_stderr_ D 0x98
-+GLIBC_2.27 _IO_2_1_stdin_ D 0x98
-+GLIBC_2.27 _IO_2_1_stdout_ D 0x98
-+GLIBC_2.27 _IO_adjust_column F
-+GLIBC_2.27 _IO_adjust_wcolumn F
-+GLIBC_2.27 _IO_default_doallocate F
-+GLIBC_2.27 _IO_default_finish F
-+GLIBC_2.27 _IO_default_pbackfail F
-+GLIBC_2.27 _IO_default_uflow F
-+GLIBC_2.27 _IO_default_xsgetn F
-+GLIBC_2.27 _IO_default_xsputn F
-+GLIBC_2.27 _IO_do_write F
-+GLIBC_2.27 _IO_doallocbuf F
-+GLIBC_2.27 _IO_fclose F
-+GLIBC_2.27 _IO_fdopen F
-+GLIBC_2.27 _IO_feof F
-+GLIBC_2.27 _IO_ferror F
-+GLIBC_2.27 _IO_fflush F
-+GLIBC_2.27 _IO_fgetpos F
-+GLIBC_2.27 _IO_fgetpos64 F
-+GLIBC_2.27 _IO_fgets F
-+GLIBC_2.27 _IO_file_attach F
-+GLIBC_2.27 _IO_file_close F
-+GLIBC_2.27 _IO_file_close_it F
-+GLIBC_2.27 _IO_file_doallocate F
-+GLIBC_2.27 _IO_file_finish F
-+GLIBC_2.27 _IO_file_fopen F
-+GLIBC_2.27 _IO_file_init F
-+GLIBC_2.27 _IO_file_jumps D 0x54
-+GLIBC_2.27 _IO_file_open F
-+GLIBC_2.27 _IO_file_overflow F
-+GLIBC_2.27 _IO_file_read F
-+GLIBC_2.27 _IO_file_seek F
-+GLIBC_2.27 _IO_file_seekoff F
-+GLIBC_2.27 _IO_file_setbuf F
-+GLIBC_2.27 _IO_file_stat F
-+GLIBC_2.27 _IO_file_sync F
-+GLIBC_2.27 _IO_file_underflow F
-+GLIBC_2.27 _IO_file_write F
-+GLIBC_2.27 _IO_file_xsputn F
-+GLIBC_2.27 _IO_flockfile F
-+GLIBC_2.27 _IO_flush_all F
-+GLIBC_2.27 _IO_flush_all_linebuffered F
-+GLIBC_2.27 _IO_fopen F
-+GLIBC_2.27 _IO_fprintf F
-+GLIBC_2.27 _IO_fputs F
-+GLIBC_2.27 _IO_fread F
-+GLIBC_2.27 _IO_free_backup_area F
-+GLIBC_2.27 _IO_free_wbackup_area F
-+GLIBC_2.27 _IO_fsetpos F
-+GLIBC_2.27 _IO_fsetpos64 F
-+GLIBC_2.27 _IO_ftell F
-+GLIBC_2.27 _IO_ftrylockfile F
-+GLIBC_2.27 _IO_funlockfile F
-+GLIBC_2.27 _IO_fwrite F
-+GLIBC_2.27 _IO_getc F
-+GLIBC_2.27 _IO_getline F
-+GLIBC_2.27 _IO_getline_info F
-+GLIBC_2.27 _IO_gets F
-+GLIBC_2.27 _IO_init F
-+GLIBC_2.27 _IO_init_marker F
-+GLIBC_2.27 _IO_init_wmarker F
-+GLIBC_2.27 _IO_iter_begin F
-+GLIBC_2.27 _IO_iter_end F
-+GLIBC_2.27 _IO_iter_file F
-+GLIBC_2.27 _IO_iter_next F
-+GLIBC_2.27 _IO_least_wmarker F
-+GLIBC_2.27 _IO_link_in F
-+GLIBC_2.27 _IO_list_all D 0x4
-+GLIBC_2.27 _IO_list_lock F
-+GLIBC_2.27 _IO_list_resetlock F
-+GLIBC_2.27 _IO_list_unlock F
-+GLIBC_2.27 _IO_marker_delta F
-+GLIBC_2.27 _IO_marker_difference F
-+GLIBC_2.27 _IO_padn F
-+GLIBC_2.27 _IO_peekc_locked F
-+GLIBC_2.27 _IO_popen F
-+GLIBC_2.27 _IO_printf F
-+GLIBC_2.27 _IO_proc_close F
-+GLIBC_2.27 _IO_proc_open F
-+GLIBC_2.27 _IO_putc F
-+GLIBC_2.27 _IO_puts F
-+GLIBC_2.27 _IO_remove_marker F
-+GLIBC_2.27 _IO_seekmark F
-+GLIBC_2.27 _IO_seekoff F
-+GLIBC_2.27 _IO_seekpos F
-+GLIBC_2.27 _IO_seekwmark F
-+GLIBC_2.27 _IO_setb F
-+GLIBC_2.27 _IO_setbuffer F
-+GLIBC_2.27 _IO_setvbuf F
-+GLIBC_2.27 _IO_sgetn F
-+GLIBC_2.27 _IO_sprintf F
-+GLIBC_2.27 _IO_sputbackc F
-+GLIBC_2.27 _IO_sputbackwc F
-+GLIBC_2.27 _IO_sscanf F
-+GLIBC_2.27 _IO_str_init_readonly F
-+GLIBC_2.27 _IO_str_init_static F
-+GLIBC_2.27 _IO_str_overflow F
-+GLIBC_2.27 _IO_str_pbackfail F
-+GLIBC_2.27 _IO_str_seekoff F
-+GLIBC_2.27 _IO_str_underflow F
-+GLIBC_2.27 _IO_sungetc F
-+GLIBC_2.27 _IO_sungetwc F
-+GLIBC_2.27 _IO_switch_to_get_mode F
-+GLIBC_2.27 _IO_switch_to_main_wget_area F
-+GLIBC_2.27 _IO_switch_to_wbackup_area F
-+GLIBC_2.27 _IO_switch_to_wget_mode F
-+GLIBC_2.27 _IO_un_link F
-+GLIBC_2.27 _IO_ungetc F
-+GLIBC_2.27 _IO_unsave_markers F
-+GLIBC_2.27 _IO_unsave_wmarkers F
-+GLIBC_2.27 _IO_vfprintf F
-+GLIBC_2.27 _IO_vfscanf F
-+GLIBC_2.27 _IO_vsprintf F
-+GLIBC_2.27 _IO_wdefault_doallocate F
-+GLIBC_2.27 _IO_wdefault_finish F
-+GLIBC_2.27 _IO_wdefault_pbackfail F
-+GLIBC_2.27 _IO_wdefault_uflow F
-+GLIBC_2.27 _IO_wdefault_xsgetn F
-+GLIBC_2.27 _IO_wdefault_xsputn F
-+GLIBC_2.27 _IO_wdo_write F
-+GLIBC_2.27 _IO_wdoallocbuf F
-+GLIBC_2.27 _IO_wfile_jumps D 0x54
-+GLIBC_2.27 _IO_wfile_overflow F
-+GLIBC_2.27 _IO_wfile_seekoff F
-+GLIBC_2.27 _IO_wfile_sync F
-+GLIBC_2.27 _IO_wfile_underflow F
-+GLIBC_2.27 _IO_wfile_xsputn F
-+GLIBC_2.27 _IO_wmarker_delta F
-+GLIBC_2.27 _IO_wsetb F
-+GLIBC_2.27 ___brk_addr D 0x4
-+GLIBC_2.27 __adjtimex F
-+GLIBC_2.27 __after_morecore_hook D 0x4
-+GLIBC_2.27 __argz_count F
-+GLIBC_2.27 __argz_next F
-+GLIBC_2.27 __argz_stringify F
-+GLIBC_2.27 __asprintf F
-+GLIBC_2.27 __asprintf_chk F
-+GLIBC_2.27 __assert F
-+GLIBC_2.27 __assert_fail F
-+GLIBC_2.27 __assert_perror_fail F
-+GLIBC_2.27 __backtrace F
-+GLIBC_2.27 __backtrace_symbols F
-+GLIBC_2.27 __backtrace_symbols_fd F
-+GLIBC_2.27 __bsd_getpgrp F
-+GLIBC_2.27 __bzero F
-+GLIBC_2.27 __check_rhosts_file D 0x4
-+GLIBC_2.27 __chk_fail F
-+GLIBC_2.27 __clone F
-+GLIBC_2.27 __close F
-+GLIBC_2.27 __cmsg_nxthdr F
-+GLIBC_2.27 __confstr_chk F
-+GLIBC_2.27 __connect F
-+GLIBC_2.27 __ctype_b_loc F
-+GLIBC_2.27 __ctype_get_mb_cur_max F
-+GLIBC_2.27 __ctype_tolower_loc F
-+GLIBC_2.27 __ctype_toupper_loc F
-+GLIBC_2.27 __curbrk D 0x4
-+GLIBC_2.27 __cxa_at_quick_exit F
-+GLIBC_2.27 __cxa_atexit F
-+GLIBC_2.27 __cxa_finalize F
-+GLIBC_2.27 __cxa_thread_atexit_impl F
-+GLIBC_2.27 __cyg_profile_func_enter F
-+GLIBC_2.27 __cyg_profile_func_exit F
-+GLIBC_2.27 __daylight D 0x4
-+GLIBC_2.27 __dcgettext F
-+GLIBC_2.27 __default_morecore F
-+GLIBC_2.27 __dgettext F
-+GLIBC_2.27 __dprintf_chk F
-+GLIBC_2.27 __dup2 F
-+GLIBC_2.27 __duplocale F
-+GLIBC_2.27 __endmntent F
-+GLIBC_2.27 __environ D 0x4
-+GLIBC_2.27 __errno_location F
-+GLIBC_2.27 __explicit_bzero_chk F
-+GLIBC_2.27 __fbufsize F
-+GLIBC_2.27 __fcntl F
-+GLIBC_2.27 __fdelt_chk F
-+GLIBC_2.27 __fdelt_warn F
-+GLIBC_2.27 __ffs F
-+GLIBC_2.27 __fgets_chk F
-+GLIBC_2.27 __fgets_unlocked_chk F
-+GLIBC_2.27 __fgetws_chk F
-+GLIBC_2.27 __fgetws_unlocked_chk F
-+GLIBC_2.27 __finite F
-+GLIBC_2.27 __finitef F
-+GLIBC_2.27 __flbf F
-+GLIBC_2.27 __fork F
-+GLIBC_2.27 __fpending F
-+GLIBC_2.27 __fprintf_chk F
-+GLIBC_2.27 __fpu_control D 0x4
-+GLIBC_2.27 __fpurge F
-+GLIBC_2.27 __fread_chk F
-+GLIBC_2.27 __fread_unlocked_chk F
-+GLIBC_2.27 __freadable F
-+GLIBC_2.27 __freading F
-+GLIBC_2.27 __free_hook D 0x4
-+GLIBC_2.27 __freelocale F
-+GLIBC_2.27 __fsetlocking F
-+GLIBC_2.27 __fwprintf_chk F
-+GLIBC_2.27 __fwritable F
-+GLIBC_2.27 __fwriting F
-+GLIBC_2.27 __fxstat F
-+GLIBC_2.27 __fxstat64 F
-+GLIBC_2.27 __fxstatat F
-+GLIBC_2.27 __fxstatat64 F
-+GLIBC_2.27 __getauxval F
-+GLIBC_2.27 __getcwd_chk F
-+GLIBC_2.27 __getdelim F
-+GLIBC_2.27 __getdomainname_chk F
-+GLIBC_2.27 __getgroups_chk F
-+GLIBC_2.27 __gethostname_chk F
-+GLIBC_2.27 __getlogin_r_chk F
-+GLIBC_2.27 __getmntent_r F
-+GLIBC_2.27 __getpagesize F
-+GLIBC_2.27 __getpgid F
-+GLIBC_2.27 __getpid F
-+GLIBC_2.27 __gets_chk F
-+GLIBC_2.27 __gettimeofday F
-+GLIBC_2.27 __getwd_chk F
-+GLIBC_2.27 __gmtime_r F
-+GLIBC_2.27 __h_errno_location F
-+GLIBC_2.27 __isalnum_l F
-+GLIBC_2.27 __isalpha_l F
-+GLIBC_2.27 __isascii_l F
-+GLIBC_2.27 __isblank_l F
-+GLIBC_2.27 __iscntrl_l F
-+GLIBC_2.27 __isctype F
-+GLIBC_2.27 __isdigit_l F
-+GLIBC_2.27 __isgraph_l F
-+GLIBC_2.27 __isinf F
-+GLIBC_2.27 __isinff F
-+GLIBC_2.27 __islower_l F
-+GLIBC_2.27 __isnan F
-+GLIBC_2.27 __isnanf F
-+GLIBC_2.27 __isoc99_fscanf F
-+GLIBC_2.27 __isoc99_fwscanf F
-+GLIBC_2.27 __isoc99_scanf F
-+GLIBC_2.27 __isoc99_sscanf F
-+GLIBC_2.27 __isoc99_swscanf F
-+GLIBC_2.27 __isoc99_vfscanf F
-+GLIBC_2.27 __isoc99_vfwscanf F
-+GLIBC_2.27 __isoc99_vscanf F
-+GLIBC_2.27 __isoc99_vsscanf F
-+GLIBC_2.27 __isoc99_vswscanf F
-+GLIBC_2.27 __isoc99_vwscanf F
-+GLIBC_2.27 __isoc99_wscanf F
-+GLIBC_2.27 __isprint_l F
-+GLIBC_2.27 __ispunct_l F
-+GLIBC_2.27 __isspace_l F
-+GLIBC_2.27 __isupper_l F
-+GLIBC_2.27 __iswalnum_l F
-+GLIBC_2.27 __iswalpha_l F
-+GLIBC_2.27 __iswblank_l F
-+GLIBC_2.27 __iswcntrl_l F
-+GLIBC_2.27 __iswctype F
-+GLIBC_2.27 __iswctype_l F
-+GLIBC_2.27 __iswdigit_l F
-+GLIBC_2.27 __iswgraph_l F
-+GLIBC_2.27 __iswlower_l F
-+GLIBC_2.27 __iswprint_l F
-+GLIBC_2.27 __iswpunct_l F
-+GLIBC_2.27 __iswspace_l F
-+GLIBC_2.27 __iswupper_l F
-+GLIBC_2.27 __iswxdigit_l F
-+GLIBC_2.27 __isxdigit_l F
-+GLIBC_2.27 __ivaliduser F
-+GLIBC_2.27 __key_decryptsession_pk_LOCAL D 0x4
-+GLIBC_2.27 __key_encryptsession_pk_LOCAL D 0x4
-+GLIBC_2.27 __key_gendes_LOCAL D 0x4
-+GLIBC_2.27 __libc_allocate_rtsig F
-+GLIBC_2.27 __libc_calloc F
-+GLIBC_2.27 __libc_current_sigrtmax F
-+GLIBC_2.27 __libc_current_sigrtmin F
-+GLIBC_2.27 __libc_free F
-+GLIBC_2.27 __libc_freeres F
-+GLIBC_2.27 __libc_init_first F
-+GLIBC_2.27 __libc_mallinfo F
-+GLIBC_2.27 __libc_malloc F
-+GLIBC_2.27 __libc_mallopt F
-+GLIBC_2.27 __libc_memalign F
-+GLIBC_2.27 __libc_pvalloc F
-+GLIBC_2.27 __libc_realloc F
-+GLIBC_2.27 __libc_sa_len F
-+GLIBC_2.27 __libc_start_main F
-+GLIBC_2.27 __libc_valloc F
-+GLIBC_2.27 __longjmp_chk F
-+GLIBC_2.27 __lseek F
-+GLIBC_2.27 __lxstat F
-+GLIBC_2.27 __lxstat64 F
-+GLIBC_2.27 __malloc_hook D 0x4
-+GLIBC_2.27 __mbrlen F
-+GLIBC_2.27 __mbrtowc F
-+GLIBC_2.27 __mbsnrtowcs_chk F
-+GLIBC_2.27 __mbsrtowcs_chk F
-+GLIBC_2.27 __mbstowcs_chk F
-+GLIBC_2.27 __memalign_hook D 0x4
-+GLIBC_2.27 __memcpy_chk F
-+GLIBC_2.27 __memmove_chk F
-+GLIBC_2.27 __mempcpy F
-+GLIBC_2.27 __mempcpy_chk F
-+GLIBC_2.27 __memset_chk F
-+GLIBC_2.27 __monstartup F
-+GLIBC_2.27 __morecore D 0x4
-+GLIBC_2.27 __nanosleep F
-+GLIBC_2.27 __newlocale F
-+GLIBC_2.27 __nl_langinfo_l F
-+GLIBC_2.27 __nss_configure_lookup F
-+GLIBC_2.27 __nss_database_lookup F
-+GLIBC_2.27 __nss_hostname_digits_dots F
-+GLIBC_2.27 __nss_next F
-+GLIBC_2.27 __obstack_printf_chk F
-+GLIBC_2.27 __obstack_vprintf_chk F
-+GLIBC_2.27 __open F
-+GLIBC_2.27 __open64 F
-+GLIBC_2.27 __open64_2 F
-+GLIBC_2.27 __open_2 F
-+GLIBC_2.27 __openat64_2 F
-+GLIBC_2.27 __openat_2 F
-+GLIBC_2.27 __overflow F
-+GLIBC_2.27 __pipe F
-+GLIBC_2.27 __poll F
-+GLIBC_2.27 __poll_chk F
-+GLIBC_2.27 __posix_getopt F
-+GLIBC_2.27 __ppoll_chk F
-+GLIBC_2.27 __pread64 F
-+GLIBC_2.27 __pread64_chk F
-+GLIBC_2.27 __pread_chk F
-+GLIBC_2.27 __printf_chk F
-+GLIBC_2.27 __printf_fp F
-+GLIBC_2.27 __profile_frequency F
-+GLIBC_2.27 __progname D 0x4
-+GLIBC_2.27 __progname_full D 0x4
-+GLIBC_2.27 __ptsname_r_chk F
-+GLIBC_2.27 __pwrite64 F
-+GLIBC_2.27 __rawmemchr F
-+GLIBC_2.27 __rcmd_errstr D 0x4
-+GLIBC_2.27 __read F
-+GLIBC_2.27 __read_chk F
-+GLIBC_2.27 __readlink_chk F
-+GLIBC_2.27 __readlinkat_chk F
-+GLIBC_2.27 __realloc_hook D 0x4
-+GLIBC_2.27 __realpath_chk F
-+GLIBC_2.27 __recv_chk F
-+GLIBC_2.27 __recvfrom_chk F
-+GLIBC_2.27 __register_atfork F
-+GLIBC_2.27 __res_init F
-+GLIBC_2.27 __res_nclose F
-+GLIBC_2.27 __res_ninit F
-+GLIBC_2.27 __res_randomid F
-+GLIBC_2.27 __res_state F
-+GLIBC_2.27 __rpc_thread_createerr F
-+GLIBC_2.27 __rpc_thread_svc_fdset F
-+GLIBC_2.27 __rpc_thread_svc_max_pollfd F
-+GLIBC_2.27 __rpc_thread_svc_pollfd F
-+GLIBC_2.27 __sbrk F
-+GLIBC_2.27 __sched_cpualloc F
-+GLIBC_2.27 __sched_cpucount F
-+GLIBC_2.27 __sched_cpufree F
-+GLIBC_2.27 __sched_get_priority_max F
-+GLIBC_2.27 __sched_get_priority_min F
-+GLIBC_2.27 __sched_getparam F
-+GLIBC_2.27 __sched_getscheduler F
-+GLIBC_2.27 __sched_setscheduler F
-+GLIBC_2.27 __sched_yield F
-+GLIBC_2.27 __select F
-+GLIBC_2.27 __send F
-+GLIBC_2.27 __setmntent F
-+GLIBC_2.27 __setpgid F
-+GLIBC_2.27 __sigaction F
-+GLIBC_2.27 __signbit F
-+GLIBC_2.27 __signbitf F
-+GLIBC_2.27 __sigpause F
-+GLIBC_2.27 __sigsetjmp F
-+GLIBC_2.27 __sigsuspend F
-+GLIBC_2.27 __snprintf_chk F
-+GLIBC_2.27 __sprintf_chk F
-+GLIBC_2.27 __stack_chk_fail F
-+GLIBC_2.27 __statfs F
-+GLIBC_2.27 __stpcpy F
-+GLIBC_2.27 __stpcpy_chk F
-+GLIBC_2.27 __stpncpy F
-+GLIBC_2.27 __stpncpy_chk F
-+GLIBC_2.27 __strcasecmp F
-+GLIBC_2.27 __strcasecmp_l F
-+GLIBC_2.27 __strcasestr F
-+GLIBC_2.27 __strcat_chk F
-+GLIBC_2.27 __strcoll_l F
-+GLIBC_2.27 __strcpy_chk F
-+GLIBC_2.27 __strdup F
-+GLIBC_2.27 __strerror_r F
-+GLIBC_2.27 __strfmon_l F
-+GLIBC_2.27 __strftime_l F
-+GLIBC_2.27 __strncasecmp_l F
-+GLIBC_2.27 __strncat_chk F
-+GLIBC_2.27 __strncpy_chk F
-+GLIBC_2.27 __strndup F
-+GLIBC_2.27 __strsep_g F
-+GLIBC_2.27 __strtod_internal F
-+GLIBC_2.27 __strtod_l F
-+GLIBC_2.27 __strtof_internal F
-+GLIBC_2.27 __strtof_l F
-+GLIBC_2.27 __strtok_r F
-+GLIBC_2.27 __strtol_internal F
-+GLIBC_2.27 __strtol_l F
-+GLIBC_2.27 __strtold_internal F
-+GLIBC_2.27 __strtold_l F
-+GLIBC_2.27 __strtoll_internal F
-+GLIBC_2.27 __strtoll_l F
-+GLIBC_2.27 __strtoul_internal F
-+GLIBC_2.27 __strtoul_l F
-+GLIBC_2.27 __strtoull_internal F
-+GLIBC_2.27 __strtoull_l F
-+GLIBC_2.27 __strverscmp F
-+GLIBC_2.27 __strxfrm_l F
-+GLIBC_2.27 __swprintf_chk F
-+GLIBC_2.27 __syscall_error F
-+GLIBC_2.27 __sysconf F
-+GLIBC_2.27 __syslog_chk F
-+GLIBC_2.27 __sysv_signal F
-+GLIBC_2.27 __timezone D 0x4
-+GLIBC_2.27 __toascii_l F
-+GLIBC_2.27 __tolower_l F
-+GLIBC_2.27 __toupper_l F
-+GLIBC_2.27 __towctrans F
-+GLIBC_2.27 __towctrans_l F
-+GLIBC_2.27 __towlower_l F
-+GLIBC_2.27 __towupper_l F
-+GLIBC_2.27 __ttyname_r_chk F
-+GLIBC_2.27 __tzname D 0x8
-+GLIBC_2.27 __uflow F
-+GLIBC_2.27 __underflow F
-+GLIBC_2.27 __uselocale F
-+GLIBC_2.27 __vasprintf_chk F
-+GLIBC_2.27 __vdprintf_chk F
-+GLIBC_2.27 __vfork F
-+GLIBC_2.27 __vfprintf_chk F
-+GLIBC_2.27 __vfscanf F
-+GLIBC_2.27 __vfwprintf_chk F
-+GLIBC_2.27 __vprintf_chk F
-+GLIBC_2.27 __vsnprintf F
-+GLIBC_2.27 __vsnprintf_chk F
-+GLIBC_2.27 __vsprintf_chk F
-+GLIBC_2.27 __vsscanf F
-+GLIBC_2.27 __vswprintf_chk F
-+GLIBC_2.27 __vsyslog_chk F
-+GLIBC_2.27 __vwprintf_chk F
-+GLIBC_2.27 __wait F
-+GLIBC_2.27 __waitpid F
-+GLIBC_2.27 __wcpcpy_chk F
-+GLIBC_2.27 __wcpncpy_chk F
-+GLIBC_2.27 __wcrtomb_chk F
-+GLIBC_2.27 __wcscasecmp_l F
-+GLIBC_2.27 __wcscat_chk F
-+GLIBC_2.27 __wcscoll_l F
-+GLIBC_2.27 __wcscpy_chk F
-+GLIBC_2.27 __wcsftime_l F
-+GLIBC_2.27 __wcsncasecmp_l F
-+GLIBC_2.27 __wcsncat_chk F
-+GLIBC_2.27 __wcsncpy_chk F
-+GLIBC_2.27 __wcsnrtombs_chk F
-+GLIBC_2.27 __wcsrtombs_chk F
-+GLIBC_2.27 __wcstod_internal F
-+GLIBC_2.27 __wcstod_l F
-+GLIBC_2.27 __wcstof_internal F
-+GLIBC_2.27 __wcstof_l F
-+GLIBC_2.27 __wcstol_internal F
-+GLIBC_2.27 __wcstol_l F
-+GLIBC_2.27 __wcstold_internal F
-+GLIBC_2.27 __wcstold_l F
-+GLIBC_2.27 __wcstoll_internal F
-+GLIBC_2.27 __wcstoll_l F
-+GLIBC_2.27 __wcstombs_chk F
-+GLIBC_2.27 __wcstoul_internal F
-+GLIBC_2.27 __wcstoul_l F
-+GLIBC_2.27 __wcstoull_internal F
-+GLIBC_2.27 __wcstoull_l F
-+GLIBC_2.27 __wcsxfrm_l F
-+GLIBC_2.27 __wctomb_chk F
-+GLIBC_2.27 __wctrans_l F
-+GLIBC_2.27 __wctype_l F
-+GLIBC_2.27 __wmemcpy_chk F
-+GLIBC_2.27 __wmemmove_chk F
-+GLIBC_2.27 __wmempcpy_chk F
-+GLIBC_2.27 __wmemset_chk F
-+GLIBC_2.27 __woverflow F
-+GLIBC_2.27 __wprintf_chk F
-+GLIBC_2.27 __write F
-+GLIBC_2.27 __wuflow F
-+GLIBC_2.27 __wunderflow F
-+GLIBC_2.27 __xmknod F
-+GLIBC_2.27 __xmknodat F
-+GLIBC_2.27 __xpg_basename F
-+GLIBC_2.27 __xpg_sigpause F
-+GLIBC_2.27 __xpg_strerror_r F
-+GLIBC_2.27 __xstat F
-+GLIBC_2.27 __xstat64 F
-+GLIBC_2.27 _authenticate F
-+GLIBC_2.27 _dl_mcount_wrapper F
-+GLIBC_2.27 _dl_mcount_wrapper_check F
-+GLIBC_2.27 _environ D 0x4
-+GLIBC_2.27 _exit F
-+GLIBC_2.27 _flush_cache F
-+GLIBC_2.27 _flushlbf F
-+GLIBC_2.27 _libc_intl_domainname D 0x5
-+GLIBC_2.27 _longjmp F
-+GLIBC_2.27 _mcleanup F
-+GLIBC_2.27 _mcount F
-+GLIBC_2.27 _nl_default_dirname D 0x12
-+GLIBC_2.27 _nl_domain_bindings D 0x4
-+GLIBC_2.27 _nl_msg_cat_cntr D 0x4
-+GLIBC_2.27 _null_auth D 0xc
-+GLIBC_2.27 _obstack_allocated_p F
-+GLIBC_2.27 _obstack_begin F
-+GLIBC_2.27 _obstack_begin_1 F
-+GLIBC_2.27 _obstack_free F
-+GLIBC_2.27 _obstack_memory_used F
-+GLIBC_2.27 _obstack_newchunk F
-+GLIBC_2.27 _res D 0x200
-+GLIBC_2.27 _res_hconf D 0x30
-+GLIBC_2.27 _rpc_dtablesize F
-+GLIBC_2.27 _seterr_reply F
-+GLIBC_2.27 _setjmp F
-+GLIBC_2.27 _sys_errlist D 0x21c
-+GLIBC_2.27 _sys_nerr D 0x4
-+GLIBC_2.27 _sys_siglist D 0x104
-+GLIBC_2.27 _tolower F
-+GLIBC_2.27 _toupper F
-+GLIBC_2.27 a64l F
-+GLIBC_2.27 abort F
-+GLIBC_2.27 abs F
-+GLIBC_2.27 accept F
-+GLIBC_2.27 accept4 F
-+GLIBC_2.27 access F
-+GLIBC_2.27 acct F
-+GLIBC_2.27 addmntent F
-+GLIBC_2.27 addseverity F
-+GLIBC_2.27 adjtime F
-+GLIBC_2.27 adjtimex F
-+GLIBC_2.27 alarm F
-+GLIBC_2.27 aligned_alloc F
-+GLIBC_2.27 alphasort F
-+GLIBC_2.27 alphasort64 F
-+GLIBC_2.27 argp_err_exit_status D 0x4
-+GLIBC_2.27 argp_error F
-+GLIBC_2.27 argp_failure F
-+GLIBC_2.27 argp_help F
-+GLIBC_2.27 argp_parse F
-+GLIBC_2.27 argp_program_bug_address D 0x4
-+GLIBC_2.27 argp_program_version D 0x4
-+GLIBC_2.27 argp_program_version_hook D 0x4
-+GLIBC_2.27 argp_state_help F
-+GLIBC_2.27 argp_usage F
-+GLIBC_2.27 argz_add F
-+GLIBC_2.27 argz_add_sep F
-+GLIBC_2.27 argz_append F
-+GLIBC_2.27 argz_count F
-+GLIBC_2.27 argz_create F
-+GLIBC_2.27 argz_create_sep F
-+GLIBC_2.27 argz_delete F
-+GLIBC_2.27 argz_extract F
-+GLIBC_2.27 argz_insert F
-+GLIBC_2.27 argz_next F
-+GLIBC_2.27 argz_replace F
-+GLIBC_2.27 argz_stringify F
-+GLIBC_2.27 asctime F
-+GLIBC_2.27 asctime_r F
-+GLIBC_2.27 asprintf F
-+GLIBC_2.27 atof F
-+GLIBC_2.27 atoi F
-+GLIBC_2.27 atol F
-+GLIBC_2.27 atoll F
-+GLIBC_2.27 authdes_create F
-+GLIBC_2.27 authdes_getucred F
-+GLIBC_2.27 authdes_pk_create F
-+GLIBC_2.27 authnone_create F
-+GLIBC_2.27 authunix_create F
-+GLIBC_2.27 authunix_create_default F
-+GLIBC_2.27 backtrace F
-+GLIBC_2.27 backtrace_symbols F
-+GLIBC_2.27 backtrace_symbols_fd F
-+GLIBC_2.27 basename F
-+GLIBC_2.27 bcmp F
-+GLIBC_2.27 bcopy F
-+GLIBC_2.27 bind F
-+GLIBC_2.27 bind_textdomain_codeset F
-+GLIBC_2.27 bindresvport F
-+GLIBC_2.27 bindtextdomain F
-+GLIBC_2.27 brk F
-+GLIBC_2.27 bsd_signal F
-+GLIBC_2.27 bsearch F
-+GLIBC_2.27 btowc F
-+GLIBC_2.27 bzero F
-+GLIBC_2.27 c16rtomb F
-+GLIBC_2.27 c32rtomb F
-+GLIBC_2.27 cacheflush F
-+GLIBC_2.27 calloc F
-+GLIBC_2.27 callrpc F
-+GLIBC_2.27 canonicalize_file_name F
-+GLIBC_2.27 capget F
-+GLIBC_2.27 capset F
-+GLIBC_2.27 catclose F
-+GLIBC_2.27 catgets F
-+GLIBC_2.27 catopen F
-+GLIBC_2.27 cbc_crypt F
-+GLIBC_2.27 cfgetispeed F
-+GLIBC_2.27 cfgetospeed F
-+GLIBC_2.27 cfmakeraw F
-+GLIBC_2.27 cfsetispeed F
-+GLIBC_2.27 cfsetospeed F
-+GLIBC_2.27 cfsetspeed F
-+GLIBC_2.27 chdir F
-+GLIBC_2.27 chflags F
-+GLIBC_2.27 chmod F
-+GLIBC_2.27 chown F
-+GLIBC_2.27 chroot F
-+GLIBC_2.27 clearenv F
-+GLIBC_2.27 clearerr F
-+GLIBC_2.27 clearerr_unlocked F
-+GLIBC_2.27 clnt_broadcast F
-+GLIBC_2.27 clnt_create F
-+GLIBC_2.27 clnt_pcreateerror F
-+GLIBC_2.27 clnt_perrno F
-+GLIBC_2.27 clnt_perror F
-+GLIBC_2.27 clnt_spcreateerror F
-+GLIBC_2.27 clnt_sperrno F
-+GLIBC_2.27 clnt_sperror F
-+GLIBC_2.27 clntraw_create F
-+GLIBC_2.27 clnttcp_create F
-+GLIBC_2.27 clntudp_bufcreate F
-+GLIBC_2.27 clntudp_create F
-+GLIBC_2.27 clntunix_create F
-+GLIBC_2.27 clock F
-+GLIBC_2.27 clock_adjtime F
-+GLIBC_2.27 clock_getcpuclockid F
-+GLIBC_2.27 clock_getres F
-+GLIBC_2.27 clock_gettime F
-+GLIBC_2.27 clock_nanosleep F
-+GLIBC_2.27 clock_settime F
-+GLIBC_2.27 clone F
-+GLIBC_2.27 close F
-+GLIBC_2.27 closedir F
-+GLIBC_2.27 closelog F
-+GLIBC_2.27 confstr F
-+GLIBC_2.27 connect F
-+GLIBC_2.27 copy_file_range F
-+GLIBC_2.27 copysign F
-+GLIBC_2.27 copysignf F
-+GLIBC_2.27 copysignl F
-+GLIBC_2.27 creat F
-+GLIBC_2.27 creat64 F
-+GLIBC_2.27 ctermid F
-+GLIBC_2.27 ctime F
-+GLIBC_2.27 ctime_r F
-+GLIBC_2.27 cuserid F
-+GLIBC_2.27 daemon F
-+GLIBC_2.27 daylight D 0x4
-+GLIBC_2.27 dcgettext F
-+GLIBC_2.27 dcngettext F
-+GLIBC_2.27 delete_module F
-+GLIBC_2.27 des_setparity F
-+GLIBC_2.27 dgettext F
-+GLIBC_2.27 difftime F
-+GLIBC_2.27 dirfd F
-+GLIBC_2.27 dirname F
-+GLIBC_2.27 div F
-+GLIBC_2.27 dl_iterate_phdr F
-+GLIBC_2.27 dngettext F
-+GLIBC_2.27 dprintf F
-+GLIBC_2.27 drand48 F
-+GLIBC_2.27 drand48_r F
-+GLIBC_2.27 dup F
-+GLIBC_2.27 dup2 F
-+GLIBC_2.27 dup3 F
-+GLIBC_2.27 duplocale F
-+GLIBC_2.27 dysize F
-+GLIBC_2.27 eaccess F
-+GLIBC_2.27 ecb_crypt F
-+GLIBC_2.27 ecvt F
-+GLIBC_2.27 ecvt_r F
-+GLIBC_2.27 endaliasent F
-+GLIBC_2.27 endfsent F
-+GLIBC_2.27 endgrent F
-+GLIBC_2.27 endhostent F
-+GLIBC_2.27 endmntent F
-+GLIBC_2.27 endnetent F
-+GLIBC_2.27 endnetgrent F
-+GLIBC_2.27 endprotoent F
-+GLIBC_2.27 endpwent F
-+GLIBC_2.27 endrpcent F
-+GLIBC_2.27 endservent F
-+GLIBC_2.27 endsgent F
-+GLIBC_2.27 endspent F
-+GLIBC_2.27 endttyent F
-+GLIBC_2.27 endusershell F
-+GLIBC_2.27 endutent F
-+GLIBC_2.27 endutxent F
-+GLIBC_2.27 environ D 0x4
-+GLIBC_2.27 envz_add F
-+GLIBC_2.27 envz_entry F
-+GLIBC_2.27 envz_get F
-+GLIBC_2.27 envz_merge F
-+GLIBC_2.27 envz_remove F
-+GLIBC_2.27 envz_strip F
-+GLIBC_2.27 epoll_create F
-+GLIBC_2.27 epoll_create1 F
-+GLIBC_2.27 epoll_ctl F
-+GLIBC_2.27 epoll_pwait F
-+GLIBC_2.27 epoll_wait F
-+GLIBC_2.27 erand48 F
-+GLIBC_2.27 erand48_r F
-+GLIBC_2.27 err F
-+GLIBC_2.27 error F
-+GLIBC_2.27 error_at_line F
-+GLIBC_2.27 error_message_count D 0x4
-+GLIBC_2.27 error_one_per_line D 0x4
-+GLIBC_2.27 error_print_progname D 0x4
-+GLIBC_2.27 errx F
-+GLIBC_2.27 ether_aton F
-+GLIBC_2.27 ether_aton_r F
-+GLIBC_2.27 ether_hostton F
-+GLIBC_2.27 ether_line F
-+GLIBC_2.27 ether_ntoa F
-+GLIBC_2.27 ether_ntoa_r F
-+GLIBC_2.27 ether_ntohost F
-+GLIBC_2.27 euidaccess F
-+GLIBC_2.27 eventfd F
-+GLIBC_2.27 eventfd_read F
-+GLIBC_2.27 eventfd_write F
-+GLIBC_2.27 execl F
-+GLIBC_2.27 execle F
-+GLIBC_2.27 execlp F
-+GLIBC_2.27 execv F
-+GLIBC_2.27 execve F
-+GLIBC_2.27 execvp F
-+GLIBC_2.27 execvpe F
-+GLIBC_2.27 exit F
-+GLIBC_2.27 explicit_bzero F
-+GLIBC_2.27 faccessat F
-+GLIBC_2.27 fallocate F
-+GLIBC_2.27 fallocate64 F
-+GLIBC_2.27 fanotify_init F
-+GLIBC_2.27 fanotify_mark F
-+GLIBC_2.27 fattach F
-+GLIBC_2.27 fchdir F
-+GLIBC_2.27 fchflags F
-+GLIBC_2.27 fchmod F
-+GLIBC_2.27 fchmodat F
-+GLIBC_2.27 fchown F
-+GLIBC_2.27 fchownat F
-+GLIBC_2.27 fclose F
-+GLIBC_2.27 fcloseall F
-+GLIBC_2.27 fcntl F
-+GLIBC_2.27 fcvt F
-+GLIBC_2.27 fcvt_r F
-+GLIBC_2.27 fdatasync F
-+GLIBC_2.27 fdetach F
-+GLIBC_2.27 fdopen F
-+GLIBC_2.27 fdopendir F
-+GLIBC_2.27 feof F
-+GLIBC_2.27 feof_unlocked F
-+GLIBC_2.27 ferror F
-+GLIBC_2.27 ferror_unlocked F
-+GLIBC_2.27 fexecve F
-+GLIBC_2.27 fflush F
-+GLIBC_2.27 fflush_unlocked F
-+GLIBC_2.27 ffs F
-+GLIBC_2.27 ffsl F
-+GLIBC_2.27 ffsll F
-+GLIBC_2.27 fgetc F
-+GLIBC_2.27 fgetc_unlocked F
-+GLIBC_2.27 fgetgrent F
-+GLIBC_2.27 fgetgrent_r F
-+GLIBC_2.27 fgetpos F
-+GLIBC_2.27 fgetpos64 F
-+GLIBC_2.27 fgetpwent F
-+GLIBC_2.27 fgetpwent_r F
-+GLIBC_2.27 fgets F
-+GLIBC_2.27 fgets_unlocked F
-+GLIBC_2.27 fgetsgent F
-+GLIBC_2.27 fgetsgent_r F
-+GLIBC_2.27 fgetspent F
-+GLIBC_2.27 fgetspent_r F
-+GLIBC_2.27 fgetwc F
-+GLIBC_2.27 fgetwc_unlocked F
-+GLIBC_2.27 fgetws F
-+GLIBC_2.27 fgetws_unlocked F
-+GLIBC_2.27 fgetxattr F
-+GLIBC_2.27 fileno F
-+GLIBC_2.27 fileno_unlocked F
-+GLIBC_2.27 finite F
-+GLIBC_2.27 finitef F
-+GLIBC_2.27 finitel F
-+GLIBC_2.27 flistxattr F
-+GLIBC_2.27 flock F
-+GLIBC_2.27 flockfile F
-+GLIBC_2.27 fmemopen F
-+GLIBC_2.27 fmtmsg F
-+GLIBC_2.27 fnmatch F
-+GLIBC_2.27 fopen F
-+GLIBC_2.27 fopen64 F
-+GLIBC_2.27 fopencookie F
-+GLIBC_2.27 fork F
-+GLIBC_2.27 fpathconf F
-+GLIBC_2.27 fprintf F
-+GLIBC_2.27 fputc F
-+GLIBC_2.27 fputc_unlocked F
-+GLIBC_2.27 fputs F
-+GLIBC_2.27 fputs_unlocked F
-+GLIBC_2.27 fputwc F
-+GLIBC_2.27 fputwc_unlocked F
-+GLIBC_2.27 fputws F
-+GLIBC_2.27 fputws_unlocked F
-+GLIBC_2.27 fread F
-+GLIBC_2.27 fread_unlocked F
-+GLIBC_2.27 free F
-+GLIBC_2.27 freeaddrinfo F
-+GLIBC_2.27 freeifaddrs F
-+GLIBC_2.27 freelocale F
-+GLIBC_2.27 fremovexattr F
-+GLIBC_2.27 freopen F
-+GLIBC_2.27 freopen64 F
-+GLIBC_2.27 frexp F
-+GLIBC_2.27 frexpf F
-+GLIBC_2.27 frexpl F
-+GLIBC_2.27 fscanf F
-+GLIBC_2.27 fseek F
-+GLIBC_2.27 fseeko F
-+GLIBC_2.27 fseeko64 F
-+GLIBC_2.27 fsetpos F
-+GLIBC_2.27 fsetpos64 F
-+GLIBC_2.27 fsetxattr F
-+GLIBC_2.27 fstatfs F
-+GLIBC_2.27 fstatfs64 F
-+GLIBC_2.27 fstatvfs F
-+GLIBC_2.27 fstatvfs64 F
-+GLIBC_2.27 fsync F
-+GLIBC_2.27 ftell F
-+GLIBC_2.27 ftello F
-+GLIBC_2.27 ftello64 F
-+GLIBC_2.27 ftime F
-+GLIBC_2.27 ftok F
-+GLIBC_2.27 ftruncate F
-+GLIBC_2.27 ftruncate64 F
-+GLIBC_2.27 ftrylockfile F
-+GLIBC_2.27 fts64_children F
-+GLIBC_2.27 fts64_close F
-+GLIBC_2.27 fts64_open F
-+GLIBC_2.27 fts64_read F
-+GLIBC_2.27 fts64_set F
-+GLIBC_2.27 fts_children F
-+GLIBC_2.27 fts_close F
-+GLIBC_2.27 fts_open F
-+GLIBC_2.27 fts_read F
-+GLIBC_2.27 fts_set F
-+GLIBC_2.27 ftw F
-+GLIBC_2.27 ftw64 F
-+GLIBC_2.27 funlockfile F
-+GLIBC_2.27 futimens F
-+GLIBC_2.27 futimes F
-+GLIBC_2.27 futimesat F
-+GLIBC_2.27 fwide F
-+GLIBC_2.27 fwprintf F
-+GLIBC_2.27 fwrite F
-+GLIBC_2.27 fwrite_unlocked F
-+GLIBC_2.27 fwscanf F
-+GLIBC_2.27 gai_strerror F
-+GLIBC_2.27 gcvt F
-+GLIBC_2.27 get_avphys_pages F
-+GLIBC_2.27 get_current_dir_name F
-+GLIBC_2.27 get_myaddress F
-+GLIBC_2.27 get_nprocs F
-+GLIBC_2.27 get_nprocs_conf F
-+GLIBC_2.27 get_phys_pages F
-+GLIBC_2.27 getaddrinfo F
-+GLIBC_2.27 getaliasbyname F
-+GLIBC_2.27 getaliasbyname_r F
-+GLIBC_2.27 getaliasent F
-+GLIBC_2.27 getaliasent_r F
-+GLIBC_2.27 getauxval F
-+GLIBC_2.27 getc F
-+GLIBC_2.27 getc_unlocked F
-+GLIBC_2.27 getchar F
-+GLIBC_2.27 getchar_unlocked F
-+GLIBC_2.27 getcontext F
-+GLIBC_2.27 getcwd F
-+GLIBC_2.27 getdate F
-+GLIBC_2.27 getdate_err D 0x4
-+GLIBC_2.27 getdate_r F
-+GLIBC_2.27 getdelim F
-+GLIBC_2.27 getdirentries F
-+GLIBC_2.27 getdirentries64 F
-+GLIBC_2.27 getdomainname F
-+GLIBC_2.27 getdtablesize F
-+GLIBC_2.27 getegid F
-+GLIBC_2.27 getentropy F
-+GLIBC_2.27 getenv F
-+GLIBC_2.27 geteuid F
-+GLIBC_2.27 getfsent F
-+GLIBC_2.27 getfsfile F
-+GLIBC_2.27 getfsspec F
-+GLIBC_2.27 getgid F
-+GLIBC_2.27 getgrent F
-+GLIBC_2.27 getgrent_r F
-+GLIBC_2.27 getgrgid F
-+GLIBC_2.27 getgrgid_r F
-+GLIBC_2.27 getgrnam F
-+GLIBC_2.27 getgrnam_r F
-+GLIBC_2.27 getgrouplist F
-+GLIBC_2.27 getgroups F
-+GLIBC_2.27 gethostbyaddr F
-+GLIBC_2.27 gethostbyaddr_r F
-+GLIBC_2.27 gethostbyname F
-+GLIBC_2.27 gethostbyname2 F
-+GLIBC_2.27 gethostbyname2_r F
-+GLIBC_2.27 gethostbyname_r F
-+GLIBC_2.27 gethostent F
-+GLIBC_2.27 gethostent_r F
-+GLIBC_2.27 gethostid F
-+GLIBC_2.27 gethostname F
-+GLIBC_2.27 getifaddrs F
-+GLIBC_2.27 getipv4sourcefilter F
-+GLIBC_2.27 getitimer F
-+GLIBC_2.27 getline F
-+GLIBC_2.27 getloadavg F
-+GLIBC_2.27 getlogin F
-+GLIBC_2.27 getlogin_r F
-+GLIBC_2.27 getmntent F
-+GLIBC_2.27 getmntent_r F
-+GLIBC_2.27 getmsg F
-+GLIBC_2.27 getnameinfo F
-+GLIBC_2.27 getnetbyaddr F
-+GLIBC_2.27 getnetbyaddr_r F
-+GLIBC_2.27 getnetbyname F
-+GLIBC_2.27 getnetbyname_r F
-+GLIBC_2.27 getnetent F
-+GLIBC_2.27 getnetent_r F
-+GLIBC_2.27 getnetgrent F
-+GLIBC_2.27 getnetgrent_r F
-+GLIBC_2.27 getnetname F
-+GLIBC_2.27 getopt F
-+GLIBC_2.27 getopt_long F
-+GLIBC_2.27 getopt_long_only F
-+GLIBC_2.27 getpagesize F
-+GLIBC_2.27 getpass F
-+GLIBC_2.27 getpeername F
-+GLIBC_2.27 getpgid F
-+GLIBC_2.27 getpgrp F
-+GLIBC_2.27 getpid F
-+GLIBC_2.27 getpmsg F
-+GLIBC_2.27 getppid F
-+GLIBC_2.27 getpriority F
-+GLIBC_2.27 getprotobyname F
-+GLIBC_2.27 getprotobyname_r F
-+GLIBC_2.27 getprotobynumber F
-+GLIBC_2.27 getprotobynumber_r F
-+GLIBC_2.27 getprotoent F
-+GLIBC_2.27 getprotoent_r F
-+GLIBC_2.27 getpt F
-+GLIBC_2.27 getpublickey F
-+GLIBC_2.27 getpw F
-+GLIBC_2.27 getpwent F
-+GLIBC_2.27 getpwent_r F
-+GLIBC_2.27 getpwnam F
-+GLIBC_2.27 getpwnam_r F
-+GLIBC_2.27 getpwuid F
-+GLIBC_2.27 getpwuid_r F
-+GLIBC_2.27 getrandom F
-+GLIBC_2.27 getresgid F
-+GLIBC_2.27 getresuid F
-+GLIBC_2.27 getrlimit F
-+GLIBC_2.27 getrlimit64 F
-+GLIBC_2.27 getrpcbyname F
-+GLIBC_2.27 getrpcbyname_r F
-+GLIBC_2.27 getrpcbynumber F
-+GLIBC_2.27 getrpcbynumber_r F
-+GLIBC_2.27 getrpcent F
-+GLIBC_2.27 getrpcent_r F
-+GLIBC_2.27 getrpcport F
-+GLIBC_2.27 getrusage F
-+GLIBC_2.27 gets F
-+GLIBC_2.27 getsecretkey F
-+GLIBC_2.27 getservbyname F
-+GLIBC_2.27 getservbyname_r F
-+GLIBC_2.27 getservbyport F
-+GLIBC_2.27 getservbyport_r F
-+GLIBC_2.27 getservent F
-+GLIBC_2.27 getservent_r F
-+GLIBC_2.27 getsgent F
-+GLIBC_2.27 getsgent_r F
-+GLIBC_2.27 getsgnam F
-+GLIBC_2.27 getsgnam_r F
-+GLIBC_2.27 getsid F
-+GLIBC_2.27 getsockname F
-+GLIBC_2.27 getsockopt F
-+GLIBC_2.27 getsourcefilter F
-+GLIBC_2.27 getspent F
-+GLIBC_2.27 getspent_r F
-+GLIBC_2.27 getspnam F
-+GLIBC_2.27 getspnam_r F
-+GLIBC_2.27 getsubopt F
-+GLIBC_2.27 gettext F
-+GLIBC_2.27 gettimeofday F
-+GLIBC_2.27 getttyent F
-+GLIBC_2.27 getttynam F
-+GLIBC_2.27 getuid F
-+GLIBC_2.27 getusershell F
-+GLIBC_2.27 getutent F
-+GLIBC_2.27 getutent_r F
-+GLIBC_2.27 getutid F
-+GLIBC_2.27 getutid_r F
-+GLIBC_2.27 getutline F
-+GLIBC_2.27 getutline_r F
-+GLIBC_2.27 getutmp F
-+GLIBC_2.27 getutmpx F
-+GLIBC_2.27 getutxent F
-+GLIBC_2.27 getutxid F
-+GLIBC_2.27 getutxline F
-+GLIBC_2.27 getw F
-+GLIBC_2.27 getwc F
-+GLIBC_2.27 getwc_unlocked F
-+GLIBC_2.27 getwchar F
-+GLIBC_2.27 getwchar_unlocked F
-+GLIBC_2.27 getwd F
-+GLIBC_2.27 getxattr F
-+GLIBC_2.27 glob F
-+GLIBC_2.27 glob64 F
-+GLIBC_2.27 glob_pattern_p F
-+GLIBC_2.27 globfree F
-+GLIBC_2.27 globfree64 F
-+GLIBC_2.27 gmtime F
-+GLIBC_2.27 gmtime_r F
-+GLIBC_2.27 gnu_dev_major F
-+GLIBC_2.27 gnu_dev_makedev F
-+GLIBC_2.27 gnu_dev_minor F
-+GLIBC_2.27 gnu_get_libc_release F
-+GLIBC_2.27 gnu_get_libc_version F
-+GLIBC_2.27 grantpt F
-+GLIBC_2.27 group_member F
-+GLIBC_2.27 gsignal F
-+GLIBC_2.27 gtty F
-+GLIBC_2.27 h_errlist D 0x14
-+GLIBC_2.27 h_nerr D 0x4
-+GLIBC_2.27 hasmntopt F
-+GLIBC_2.27 hcreate F
-+GLIBC_2.27 hcreate_r F
-+GLIBC_2.27 hdestroy F
-+GLIBC_2.27 hdestroy_r F
-+GLIBC_2.27 herror F
-+GLIBC_2.27 host2netname F
-+GLIBC_2.27 hsearch F
-+GLIBC_2.27 hsearch_r F
-+GLIBC_2.27 hstrerror F
-+GLIBC_2.27 htonl F
-+GLIBC_2.27 htons F
-+GLIBC_2.27 iconv F
-+GLIBC_2.27 iconv_close F
-+GLIBC_2.27 iconv_open F
-+GLIBC_2.27 if_freenameindex F
-+GLIBC_2.27 if_indextoname F
-+GLIBC_2.27 if_nameindex F
-+GLIBC_2.27 if_nametoindex F
-+GLIBC_2.27 imaxabs F
-+GLIBC_2.27 imaxdiv F
-+GLIBC_2.27 in6addr_any D 0x10
-+GLIBC_2.27 in6addr_loopback D 0x10
-+GLIBC_2.27 index F
-+GLIBC_2.27 inet6_opt_append F
-+GLIBC_2.27 inet6_opt_find F
-+GLIBC_2.27 inet6_opt_finish F
-+GLIBC_2.27 inet6_opt_get_val F
-+GLIBC_2.27 inet6_opt_init F
-+GLIBC_2.27 inet6_opt_next F
-+GLIBC_2.27 inet6_opt_set_val F
-+GLIBC_2.27 inet6_option_alloc F
-+GLIBC_2.27 inet6_option_append F
-+GLIBC_2.27 inet6_option_find F
-+GLIBC_2.27 inet6_option_init F
-+GLIBC_2.27 inet6_option_next F
-+GLIBC_2.27 inet6_option_space F
-+GLIBC_2.27 inet6_rth_add F
-+GLIBC_2.27 inet6_rth_getaddr F
-+GLIBC_2.27 inet6_rth_init F
-+GLIBC_2.27 inet6_rth_reverse F
-+GLIBC_2.27 inet6_rth_segments F
-+GLIBC_2.27 inet6_rth_space F
-+GLIBC_2.27 inet_addr F
-+GLIBC_2.27 inet_aton F
-+GLIBC_2.27 inet_lnaof F
-+GLIBC_2.27 inet_makeaddr F
-+GLIBC_2.27 inet_netof F
-+GLIBC_2.27 inet_network F
-+GLIBC_2.27 inet_nsap_addr F
-+GLIBC_2.27 inet_nsap_ntoa F
-+GLIBC_2.27 inet_ntoa F
-+GLIBC_2.27 inet_ntop F
-+GLIBC_2.27 inet_pton F
-+GLIBC_2.27 init_module F
-+GLIBC_2.27 initgroups F
-+GLIBC_2.27 initstate F
-+GLIBC_2.27 initstate_r F
-+GLIBC_2.27 innetgr F
-+GLIBC_2.27 inotify_add_watch F
-+GLIBC_2.27 inotify_init F
-+GLIBC_2.27 inotify_init1 F
-+GLIBC_2.27 inotify_rm_watch F
-+GLIBC_2.27 insque F
-+GLIBC_2.27 ioctl F
-+GLIBC_2.27 iruserok F
-+GLIBC_2.27 iruserok_af F
-+GLIBC_2.27 isalnum F
-+GLIBC_2.27 isalnum_l F
-+GLIBC_2.27 isalpha F
-+GLIBC_2.27 isalpha_l F
-+GLIBC_2.27 isascii F
-+GLIBC_2.27 isastream F
-+GLIBC_2.27 isatty F
-+GLIBC_2.27 isblank F
-+GLIBC_2.27 isblank_l F
-+GLIBC_2.27 iscntrl F
-+GLIBC_2.27 iscntrl_l F
-+GLIBC_2.27 isctype F
-+GLIBC_2.27 isdigit F
-+GLIBC_2.27 isdigit_l F
-+GLIBC_2.27 isfdtype F
-+GLIBC_2.27 isgraph F
-+GLIBC_2.27 isgraph_l F
-+GLIBC_2.27 isinf F
-+GLIBC_2.27 isinff F
-+GLIBC_2.27 isinfl F
-+GLIBC_2.27 islower F
-+GLIBC_2.27 islower_l F
-+GLIBC_2.27 isnan F
-+GLIBC_2.27 isnanf F
-+GLIBC_2.27 isnanl F
-+GLIBC_2.27 isprint F
-+GLIBC_2.27 isprint_l F
-+GLIBC_2.27 ispunct F
-+GLIBC_2.27 ispunct_l F
-+GLIBC_2.27 isspace F
-+GLIBC_2.27 isspace_l F
-+GLIBC_2.27 isupper F
-+GLIBC_2.27 isupper_l F
-+GLIBC_2.27 iswalnum F
-+GLIBC_2.27 iswalnum_l F
-+GLIBC_2.27 iswalpha F
-+GLIBC_2.27 iswalpha_l F
-+GLIBC_2.27 iswblank F
-+GLIBC_2.27 iswblank_l F
-+GLIBC_2.27 iswcntrl F
-+GLIBC_2.27 iswcntrl_l F
-+GLIBC_2.27 iswctype F
-+GLIBC_2.27 iswctype_l F
-+GLIBC_2.27 iswdigit F
-+GLIBC_2.27 iswdigit_l F
-+GLIBC_2.27 iswgraph F
-+GLIBC_2.27 iswgraph_l F
-+GLIBC_2.27 iswlower F
-+GLIBC_2.27 iswlower_l F
-+GLIBC_2.27 iswprint F
-+GLIBC_2.27 iswprint_l F
-+GLIBC_2.27 iswpunct F
-+GLIBC_2.27 iswpunct_l F
-+GLIBC_2.27 iswspace F
-+GLIBC_2.27 iswspace_l F
-+GLIBC_2.27 iswupper F
-+GLIBC_2.27 iswupper_l F
-+GLIBC_2.27 iswxdigit F
-+GLIBC_2.27 iswxdigit_l F
-+GLIBC_2.27 isxdigit F
-+GLIBC_2.27 isxdigit_l F
-+GLIBC_2.27 jrand48 F
-+GLIBC_2.27 jrand48_r F
-+GLIBC_2.27 key_decryptsession F
-+GLIBC_2.27 key_decryptsession_pk F
-+GLIBC_2.27 key_encryptsession F
-+GLIBC_2.27 key_encryptsession_pk F
-+GLIBC_2.27 key_gendes F
-+GLIBC_2.27 key_get_conv F
-+GLIBC_2.27 key_secretkey_is_set F
-+GLIBC_2.27 key_setnet F
-+GLIBC_2.27 key_setsecret F
-+GLIBC_2.27 kill F
-+GLIBC_2.27 killpg F
-+GLIBC_2.27 klogctl F
-+GLIBC_2.27 l64a F
-+GLIBC_2.27 labs F
-+GLIBC_2.27 lchmod F
-+GLIBC_2.27 lchown F
-+GLIBC_2.27 lckpwdf F
-+GLIBC_2.27 lcong48 F
-+GLIBC_2.27 lcong48_r F
-+GLIBC_2.27 ldexp F
-+GLIBC_2.27 ldexpf F
-+GLIBC_2.27 ldexpl F
-+GLIBC_2.27 ldiv F
-+GLIBC_2.27 lfind F
-+GLIBC_2.27 lgetxattr F
-+GLIBC_2.27 link F
-+GLIBC_2.27 linkat F
-+GLIBC_2.27 listen F
-+GLIBC_2.27 listxattr F
-+GLIBC_2.27 llabs F
-+GLIBC_2.27 lldiv F
-+GLIBC_2.27 llistxattr F
-+GLIBC_2.27 llseek F
-+GLIBC_2.27 localeconv F
-+GLIBC_2.27 localtime F
-+GLIBC_2.27 localtime_r F
-+GLIBC_2.27 lockf F
-+GLIBC_2.27 lockf64 F
-+GLIBC_2.27 longjmp F
-+GLIBC_2.27 lrand48 F
-+GLIBC_2.27 lrand48_r F
-+GLIBC_2.27 lremovexattr F
-+GLIBC_2.27 lsearch F
-+GLIBC_2.27 lseek F
-+GLIBC_2.27 lseek64 F
-+GLIBC_2.27 lsetxattr F
-+GLIBC_2.27 lutimes F
-+GLIBC_2.27 madvise F
-+GLIBC_2.27 makecontext F
-+GLIBC_2.27 mallinfo F
-+GLIBC_2.27 malloc F
-+GLIBC_2.27 malloc_info F
-+GLIBC_2.27 malloc_stats F
-+GLIBC_2.27 malloc_trim F
-+GLIBC_2.27 malloc_usable_size F
-+GLIBC_2.27 mallopt F
-+GLIBC_2.27 mallwatch D 0x4
-+GLIBC_2.27 mblen F
-+GLIBC_2.27 mbrlen F
-+GLIBC_2.27 mbrtoc16 F
-+GLIBC_2.27 mbrtoc32 F
-+GLIBC_2.27 mbrtowc F
-+GLIBC_2.27 mbsinit F
-+GLIBC_2.27 mbsnrtowcs F
-+GLIBC_2.27 mbsrtowcs F
-+GLIBC_2.27 mbstowcs F
-+GLIBC_2.27 mbtowc F
-+GLIBC_2.27 mcheck F
-+GLIBC_2.27 mcheck_check_all F
-+GLIBC_2.27 mcheck_pedantic F
-+GLIBC_2.27 memalign F
-+GLIBC_2.27 memccpy F
-+GLIBC_2.27 memchr F
-+GLIBC_2.27 memcmp F
-+GLIBC_2.27 memcpy F
-+GLIBC_2.27 memfd_create F
-+GLIBC_2.27 memfrob F
-+GLIBC_2.27 memmem F
-+GLIBC_2.27 memmove F
-+GLIBC_2.27 mempcpy F
-+GLIBC_2.27 memrchr F
-+GLIBC_2.27 memset F
-+GLIBC_2.27 mincore F
-+GLIBC_2.27 mkdir F
-+GLIBC_2.27 mkdirat F
-+GLIBC_2.27 mkdtemp F
-+GLIBC_2.27 mkfifo F
-+GLIBC_2.27 mkfifoat F
-+GLIBC_2.27 mkostemp F
-+GLIBC_2.27 mkostemp64 F
-+GLIBC_2.27 mkostemps F
-+GLIBC_2.27 mkostemps64 F
-+GLIBC_2.27 mkstemp F
-+GLIBC_2.27 mkstemp64 F
-+GLIBC_2.27 mkstemps F
-+GLIBC_2.27 mkstemps64 F
-+GLIBC_2.27 mktemp F
-+GLIBC_2.27 mktime F
-+GLIBC_2.27 mlock F
-+GLIBC_2.27 mlock2 F
-+GLIBC_2.27 mlockall F
-+GLIBC_2.27 mmap F
-+GLIBC_2.27 mmap64 F
-+GLIBC_2.27 modf F
-+GLIBC_2.27 modff F
-+GLIBC_2.27 modfl F
-+GLIBC_2.27 moncontrol F
-+GLIBC_2.27 monstartup F
-+GLIBC_2.27 mount F
-+GLIBC_2.27 mprobe F
-+GLIBC_2.27 mprotect F
-+GLIBC_2.27 mrand48 F
-+GLIBC_2.27 mrand48_r F
-+GLIBC_2.27 mremap F
-+GLIBC_2.27 msgctl F
-+GLIBC_2.27 msgget F
-+GLIBC_2.27 msgrcv F
-+GLIBC_2.27 msgsnd F
-+GLIBC_2.27 msync F
-+GLIBC_2.27 mtrace F
-+GLIBC_2.27 munlock F
-+GLIBC_2.27 munlockall F
-+GLIBC_2.27 munmap F
-+GLIBC_2.27 muntrace F
-+GLIBC_2.27 name_to_handle_at F
-+GLIBC_2.27 nanosleep F
-+GLIBC_2.27 netname2host F
-+GLIBC_2.27 netname2user F
-+GLIBC_2.27 newlocale F
-+GLIBC_2.27 nfsservctl F
-+GLIBC_2.27 nftw F
-+GLIBC_2.27 nftw64 F
-+GLIBC_2.27 ngettext F
-+GLIBC_2.27 nice F
-+GLIBC_2.27 nl_langinfo F
-+GLIBC_2.27 nl_langinfo_l F
-+GLIBC_2.27 nrand48 F
-+GLIBC_2.27 nrand48_r F
-+GLIBC_2.27 ntohl F
-+GLIBC_2.27 ntohs F
-+GLIBC_2.27 ntp_adjtime F
-+GLIBC_2.27 ntp_gettime F
-+GLIBC_2.27 ntp_gettimex F
-+GLIBC_2.27 obstack_alloc_failed_handler D 0x4
-+GLIBC_2.27 obstack_exit_failure D 0x4
-+GLIBC_2.27 obstack_free F
-+GLIBC_2.27 obstack_printf F
-+GLIBC_2.27 obstack_vprintf F
-+GLIBC_2.27 on_exit F
-+GLIBC_2.27 open F
-+GLIBC_2.27 open64 F
-+GLIBC_2.27 open_by_handle_at F
-+GLIBC_2.27 open_memstream F
-+GLIBC_2.27 open_wmemstream F
-+GLIBC_2.27 openat F
-+GLIBC_2.27 openat64 F
-+GLIBC_2.27 opendir F
-+GLIBC_2.27 openlog F
-+GLIBC_2.27 optarg D 0x4
-+GLIBC_2.27 opterr D 0x4
-+GLIBC_2.27 optind D 0x4
-+GLIBC_2.27 optopt D 0x4
-+GLIBC_2.27 parse_printf_format F
-+GLIBC_2.27 passwd2des F
-+GLIBC_2.27 pathconf F
-+GLIBC_2.27 pause F
-+GLIBC_2.27 pclose F
-+GLIBC_2.27 perror F
-+GLIBC_2.27 personality F
-+GLIBC_2.27 pipe F
-+GLIBC_2.27 pipe2 F
-+GLIBC_2.27 pivot_root F
-+GLIBC_2.27 pkey_alloc F
-+GLIBC_2.27 pkey_free F
-+GLIBC_2.27 pkey_get F
-+GLIBC_2.27 pkey_mprotect F
-+GLIBC_2.27 pkey_set F
-+GLIBC_2.27 pmap_getmaps F
-+GLIBC_2.27 pmap_getport F
-+GLIBC_2.27 pmap_rmtcall F
-+GLIBC_2.27 pmap_set F
-+GLIBC_2.27 pmap_unset F
-+GLIBC_2.27 poll F
-+GLIBC_2.27 popen F
-+GLIBC_2.27 posix_fadvise F
-+GLIBC_2.27 posix_fadvise64 F
-+GLIBC_2.27 posix_fallocate F
-+GLIBC_2.27 posix_fallocate64 F
-+GLIBC_2.27 posix_madvise F
-+GLIBC_2.27 posix_memalign F
-+GLIBC_2.27 posix_openpt F
-+GLIBC_2.27 posix_spawn F
-+GLIBC_2.27 posix_spawn_file_actions_addclose F
-+GLIBC_2.27 posix_spawn_file_actions_adddup2 F
-+GLIBC_2.27 posix_spawn_file_actions_addopen F
-+GLIBC_2.27 posix_spawn_file_actions_destroy F
-+GLIBC_2.27 posix_spawn_file_actions_init F
-+GLIBC_2.27 posix_spawnattr_destroy F
-+GLIBC_2.27 posix_spawnattr_getflags F
-+GLIBC_2.27 posix_spawnattr_getpgroup F
-+GLIBC_2.27 posix_spawnattr_getschedparam F
-+GLIBC_2.27 posix_spawnattr_getschedpolicy F
-+GLIBC_2.27 posix_spawnattr_getsigdefault F
-+GLIBC_2.27 posix_spawnattr_getsigmask F
-+GLIBC_2.27 posix_spawnattr_init F
-+GLIBC_2.27 posix_spawnattr_setflags F
-+GLIBC_2.27 posix_spawnattr_setpgroup F
-+GLIBC_2.27 posix_spawnattr_setschedparam F
-+GLIBC_2.27 posix_spawnattr_setschedpolicy F
-+GLIBC_2.27 posix_spawnattr_setsigdefault F
-+GLIBC_2.27 posix_spawnattr_setsigmask F
-+GLIBC_2.27 posix_spawnp F
-+GLIBC_2.27 ppoll F
-+GLIBC_2.27 prctl F
-+GLIBC_2.27 pread F
-+GLIBC_2.27 pread64 F
-+GLIBC_2.27 preadv F
-+GLIBC_2.27 preadv2 F
-+GLIBC_2.27 preadv64 F
-+GLIBC_2.27 preadv64v2 F
-+GLIBC_2.27 printf F
-+GLIBC_2.27 printf_size F
-+GLIBC_2.27 printf_size_info F
-+GLIBC_2.27 prlimit F
-+GLIBC_2.27 prlimit64 F
-+GLIBC_2.27 process_vm_readv F
-+GLIBC_2.27 process_vm_writev F
-+GLIBC_2.27 profil F
-+GLIBC_2.27 program_invocation_name D 0x4
-+GLIBC_2.27 program_invocation_short_name D 0x4
-+GLIBC_2.27 pselect F
-+GLIBC_2.27 psiginfo F
-+GLIBC_2.27 psignal F
-+GLIBC_2.27 pthread_attr_destroy F
-+GLIBC_2.27 pthread_attr_getdetachstate F
-+GLIBC_2.27 pthread_attr_getinheritsched F
-+GLIBC_2.27 pthread_attr_getschedparam F
-+GLIBC_2.27 pthread_attr_getschedpolicy F
-+GLIBC_2.27 pthread_attr_getscope F
-+GLIBC_2.27 pthread_attr_init F
-+GLIBC_2.27 pthread_attr_setdetachstate F
-+GLIBC_2.27 pthread_attr_setinheritsched F
-+GLIBC_2.27 pthread_attr_setschedparam F
-+GLIBC_2.27 pthread_attr_setschedpolicy F
-+GLIBC_2.27 pthread_attr_setscope F
-+GLIBC_2.27 pthread_cond_broadcast F
-+GLIBC_2.27 pthread_cond_destroy F
-+GLIBC_2.27 pthread_cond_init F
-+GLIBC_2.27 pthread_cond_signal F
-+GLIBC_2.27 pthread_cond_timedwait F
-+GLIBC_2.27 pthread_cond_wait F
-+GLIBC_2.27 pthread_condattr_destroy F
-+GLIBC_2.27 pthread_condattr_init F
-+GLIBC_2.27 pthread_equal F
-+GLIBC_2.27 pthread_exit F
-+GLIBC_2.27 pthread_getschedparam F
-+GLIBC_2.27 pthread_mutex_destroy F
-+GLIBC_2.27 pthread_mutex_init F
-+GLIBC_2.27 pthread_mutex_lock F
-+GLIBC_2.27 pthread_mutex_unlock F
-+GLIBC_2.27 pthread_self F
-+GLIBC_2.27 pthread_setcancelstate F
-+GLIBC_2.27 pthread_setcanceltype F
-+GLIBC_2.27 pthread_setschedparam F
-+GLIBC_2.27 ptrace F
-+GLIBC_2.27 ptsname F
-+GLIBC_2.27 ptsname_r F
-+GLIBC_2.27 putc F
-+GLIBC_2.27 putc_unlocked F
-+GLIBC_2.27 putchar F
-+GLIBC_2.27 putchar_unlocked F
-+GLIBC_2.27 putenv F
-+GLIBC_2.27 putgrent F
-+GLIBC_2.27 putmsg F
-+GLIBC_2.27 putpmsg F
-+GLIBC_2.27 putpwent F
-+GLIBC_2.27 puts F
-+GLIBC_2.27 putsgent F
-+GLIBC_2.27 putspent F
-+GLIBC_2.27 pututline F
-+GLIBC_2.27 pututxline F
-+GLIBC_2.27 putw F
-+GLIBC_2.27 putwc F
-+GLIBC_2.27 putwc_unlocked F
-+GLIBC_2.27 putwchar F
-+GLIBC_2.27 putwchar_unlocked F
-+GLIBC_2.27 pvalloc F
-+GLIBC_2.27 pwrite F
-+GLIBC_2.27 pwrite64 F
-+GLIBC_2.27 pwritev F
-+GLIBC_2.27 pwritev2 F
-+GLIBC_2.27 pwritev64 F
-+GLIBC_2.27 pwritev64v2 F
-+GLIBC_2.27 qecvt F
-+GLIBC_2.27 qecvt_r F
-+GLIBC_2.27 qfcvt F
-+GLIBC_2.27 qfcvt_r F
-+GLIBC_2.27 qgcvt F
-+GLIBC_2.27 qsort F
-+GLIBC_2.27 qsort_r F
-+GLIBC_2.27 quick_exit F
-+GLIBC_2.27 quotactl F
-+GLIBC_2.27 raise F
-+GLIBC_2.27 rand F
-+GLIBC_2.27 rand_r F
-+GLIBC_2.27 random F
-+GLIBC_2.27 random_r F
-+GLIBC_2.27 rawmemchr F
-+GLIBC_2.27 rcmd F
-+GLIBC_2.27 rcmd_af F
-+GLIBC_2.27 re_comp F
-+GLIBC_2.27 re_compile_fastmap F
-+GLIBC_2.27 re_compile_pattern F
-+GLIBC_2.27 re_exec F
-+GLIBC_2.27 re_match F
-+GLIBC_2.27 re_match_2 F
-+GLIBC_2.27 re_search F
-+GLIBC_2.27 re_search_2 F
-+GLIBC_2.27 re_set_registers F
-+GLIBC_2.27 re_set_syntax F
-+GLIBC_2.27 re_syntax_options D 0x4
-+GLIBC_2.27 read F
-+GLIBC_2.27 readahead F
-+GLIBC_2.27 readdir F
-+GLIBC_2.27 readdir64 F
-+GLIBC_2.27 readdir64_r F
-+GLIBC_2.27 readdir_r F
-+GLIBC_2.27 readlink F
-+GLIBC_2.27 readlinkat F
-+GLIBC_2.27 readv F
-+GLIBC_2.27 realloc F
-+GLIBC_2.27 reallocarray F
-+GLIBC_2.27 realpath F
-+GLIBC_2.27 reboot F
-+GLIBC_2.27 recv F
-+GLIBC_2.27 recvfrom F
-+GLIBC_2.27 recvmmsg F
-+GLIBC_2.27 recvmsg F
-+GLIBC_2.27 regcomp F
-+GLIBC_2.27 regerror F
-+GLIBC_2.27 regexec F
-+GLIBC_2.27 regfree F
-+GLIBC_2.27 register_printf_function F
-+GLIBC_2.27 register_printf_modifier F
-+GLIBC_2.27 register_printf_specifier F
-+GLIBC_2.27 register_printf_type F
-+GLIBC_2.27 registerrpc F
-+GLIBC_2.27 remap_file_pages F
-+GLIBC_2.27 remove F
-+GLIBC_2.27 removexattr F
-+GLIBC_2.27 remque F
-+GLIBC_2.27 rename F
-+GLIBC_2.27 renameat F
-+GLIBC_2.27 revoke F
-+GLIBC_2.27 rewind F
-+GLIBC_2.27 rewinddir F
-+GLIBC_2.27 rexec F
-+GLIBC_2.27 rexec_af F
-+GLIBC_2.27 rexecoptions D 0x4
-+GLIBC_2.27 rindex F
-+GLIBC_2.27 rmdir F
-+GLIBC_2.27 rpc_createerr D 0x10
-+GLIBC_2.27 rpmatch F
-+GLIBC_2.27 rresvport F
-+GLIBC_2.27 rresvport_af F
-+GLIBC_2.27 rtime F
-+GLIBC_2.27 ruserok F
-+GLIBC_2.27 ruserok_af F
-+GLIBC_2.27 ruserpass F
-+GLIBC_2.27 sbrk F
-+GLIBC_2.27 scalbn F
-+GLIBC_2.27 scalbnf F
-+GLIBC_2.27 scalbnl F
-+GLIBC_2.27 scandir F
-+GLIBC_2.27 scandir64 F
-+GLIBC_2.27 scandirat F
-+GLIBC_2.27 scandirat64 F
-+GLIBC_2.27 scanf F
-+GLIBC_2.27 sched_get_priority_max F
-+GLIBC_2.27 sched_get_priority_min F
-+GLIBC_2.27 sched_getaffinity F
-+GLIBC_2.27 sched_getcpu F
-+GLIBC_2.27 sched_getparam F
-+GLIBC_2.27 sched_getscheduler F
-+GLIBC_2.27 sched_rr_get_interval F
-+GLIBC_2.27 sched_setaffinity F
-+GLIBC_2.27 sched_setparam F
-+GLIBC_2.27 sched_setscheduler F
-+GLIBC_2.27 sched_yield F
-+GLIBC_2.27 secure_getenv F
-+GLIBC_2.27 seed48 F
-+GLIBC_2.27 seed48_r F
-+GLIBC_2.27 seekdir F
-+GLIBC_2.27 select F
-+GLIBC_2.27 semctl F
-+GLIBC_2.27 semget F
-+GLIBC_2.27 semop F
-+GLIBC_2.27 semtimedop F
-+GLIBC_2.27 send F
-+GLIBC_2.27 sendfile F
-+GLIBC_2.27 sendfile64 F
-+GLIBC_2.27 sendmmsg F
-+GLIBC_2.27 sendmsg F
-+GLIBC_2.27 sendto F
-+GLIBC_2.27 setaliasent F
-+GLIBC_2.27 setbuf F
-+GLIBC_2.27 setbuffer F
-+GLIBC_2.27 setcontext F
-+GLIBC_2.27 setdomainname F
-+GLIBC_2.27 setegid F
-+GLIBC_2.27 setenv F
-+GLIBC_2.27 seteuid F
-+GLIBC_2.27 setfsent F
-+GLIBC_2.27 setfsgid F
-+GLIBC_2.27 setfsuid F
-+GLIBC_2.27 setgid F
-+GLIBC_2.27 setgrent F
-+GLIBC_2.27 setgroups F
-+GLIBC_2.27 sethostent F
-+GLIBC_2.27 sethostid F
-+GLIBC_2.27 sethostname F
-+GLIBC_2.27 setipv4sourcefilter F
-+GLIBC_2.27 setitimer F
-+GLIBC_2.27 setjmp F
-+GLIBC_2.27 setlinebuf F
-+GLIBC_2.27 setlocale F
-+GLIBC_2.27 setlogin F
-+GLIBC_2.27 setlogmask F
-+GLIBC_2.27 setmntent F
-+GLIBC_2.27 setnetent F
-+GLIBC_2.27 setnetgrent F
-+GLIBC_2.27 setns F
-+GLIBC_2.27 setpgid F
-+GLIBC_2.27 setpgrp F
-+GLIBC_2.27 setpriority F
-+GLIBC_2.27 setprotoent F
-+GLIBC_2.27 setpwent F
-+GLIBC_2.27 setregid F
-+GLIBC_2.27 setresgid F
-+GLIBC_2.27 setresuid F
-+GLIBC_2.27 setreuid F
-+GLIBC_2.27 setrlimit F
-+GLIBC_2.27 setrlimit64 F
-+GLIBC_2.27 setrpcent F
-+GLIBC_2.27 setservent F
-+GLIBC_2.27 setsgent F
-+GLIBC_2.27 setsid F
-+GLIBC_2.27 setsockopt F
-+GLIBC_2.27 setsourcefilter F
-+GLIBC_2.27 setspent F
-+GLIBC_2.27 setstate F
-+GLIBC_2.27 setstate_r F
-+GLIBC_2.27 settimeofday F
-+GLIBC_2.27 setttyent F
-+GLIBC_2.27 setuid F
-+GLIBC_2.27 setusershell F
-+GLIBC_2.27 setutent F
-+GLIBC_2.27 setutxent F
-+GLIBC_2.27 setvbuf F
-+GLIBC_2.27 setxattr F
-+GLIBC_2.27 sgetsgent F
-+GLIBC_2.27 sgetsgent_r F
-+GLIBC_2.27 sgetspent F
-+GLIBC_2.27 sgetspent_r F
-+GLIBC_2.27 shmat F
-+GLIBC_2.27 shmctl F
-+GLIBC_2.27 shmdt F
-+GLIBC_2.27 shmget F
-+GLIBC_2.27 shutdown F
-+GLIBC_2.27 sigaction F
-+GLIBC_2.27 sigaddset F
-+GLIBC_2.27 sigaltstack F
-+GLIBC_2.27 sigandset F
-+GLIBC_2.27 sigblock F
-+GLIBC_2.27 sigdelset F
-+GLIBC_2.27 sigemptyset F
-+GLIBC_2.27 sigfillset F
-+GLIBC_2.27 siggetmask F
-+GLIBC_2.27 sighold F
-+GLIBC_2.27 sigignore F
-+GLIBC_2.27 siginterrupt F
-+GLIBC_2.27 sigisemptyset F
-+GLIBC_2.27 sigismember F
-+GLIBC_2.27 siglongjmp F
-+GLIBC_2.27 signal F
-+GLIBC_2.27 signalfd F
-+GLIBC_2.27 sigorset F
-+GLIBC_2.27 sigpause F
-+GLIBC_2.27 sigpending F
-+GLIBC_2.27 sigprocmask F
-+GLIBC_2.27 sigqueue F
-+GLIBC_2.27 sigrelse F
-+GLIBC_2.27 sigreturn F
-+GLIBC_2.27 sigset F
-+GLIBC_2.27 sigsetmask F
-+GLIBC_2.27 sigstack F
-+GLIBC_2.27 sigsuspend F
-+GLIBC_2.27 sigtimedwait F
-+GLIBC_2.27 sigwait F
-+GLIBC_2.27 sigwaitinfo F
-+GLIBC_2.27 sleep F
-+GLIBC_2.27 snprintf F
-+GLIBC_2.27 sockatmark F
-+GLIBC_2.27 socket F
-+GLIBC_2.27 socketpair F
-+GLIBC_2.27 splice F
-+GLIBC_2.27 sprintf F
-+GLIBC_2.27 sprofil F
-+GLIBC_2.27 srand F
-+GLIBC_2.27 srand48 F
-+GLIBC_2.27 srand48_r F
-+GLIBC_2.27 srandom F
-+GLIBC_2.27 srandom_r F
-+GLIBC_2.27 sscanf F
-+GLIBC_2.27 ssignal F
-+GLIBC_2.27 sstk F
-+GLIBC_2.27 statfs F
-+GLIBC_2.27 statfs64 F
-+GLIBC_2.27 statvfs F
-+GLIBC_2.27 statvfs64 F
-+GLIBC_2.27 stderr D 0x4
-+GLIBC_2.27 stdin D 0x4
-+GLIBC_2.27 stdout D 0x4
-+GLIBC_2.27 stime F
-+GLIBC_2.27 stpcpy F
-+GLIBC_2.27 stpncpy F
-+GLIBC_2.27 strcasecmp F
-+GLIBC_2.27 strcasecmp_l F
-+GLIBC_2.27 strcasestr F
-+GLIBC_2.27 strcat F
-+GLIBC_2.27 strchr F
-+GLIBC_2.27 strchrnul F
-+GLIBC_2.27 strcmp F
-+GLIBC_2.27 strcoll F
-+GLIBC_2.27 strcoll_l F
-+GLIBC_2.27 strcpy F
-+GLIBC_2.27 strcspn F
-+GLIBC_2.27 strdup F
-+GLIBC_2.27 strerror F
-+GLIBC_2.27 strerror_l F
-+GLIBC_2.27 strerror_r F
-+GLIBC_2.27 strfmon F
-+GLIBC_2.27 strfmon_l F
-+GLIBC_2.27 strfromd F
-+GLIBC_2.27 strfromf F
-+GLIBC_2.27 strfromf32 F
-+GLIBC_2.27 strfromf32x F
-+GLIBC_2.27 strfromf64 F
-+GLIBC_2.27 strfroml F
-+GLIBC_2.27 strfry F
-+GLIBC_2.27 strftime F
-+GLIBC_2.27 strftime_l F
-+GLIBC_2.27 strlen F
-+GLIBC_2.27 strncasecmp F
-+GLIBC_2.27 strncasecmp_l F
-+GLIBC_2.27 strncat F
-+GLIBC_2.27 strncmp F
-+GLIBC_2.27 strncpy F
-+GLIBC_2.27 strndup F
-+GLIBC_2.27 strnlen F
-+GLIBC_2.27 strpbrk F
-+GLIBC_2.27 strptime F
-+GLIBC_2.27 strptime_l F
-+GLIBC_2.27 strrchr F
-+GLIBC_2.27 strsep F
-+GLIBC_2.27 strsignal F
-+GLIBC_2.27 strspn F
-+GLIBC_2.27 strstr F
-+GLIBC_2.27 strtod F
-+GLIBC_2.27 strtod_l F
-+GLIBC_2.27 strtof F
-+GLIBC_2.27 strtof32 F
-+GLIBC_2.27 strtof32_l F
-+GLIBC_2.27 strtof32x F
-+GLIBC_2.27 strtof32x_l F
-+GLIBC_2.27 strtof64 F
-+GLIBC_2.27 strtof64_l F
-+GLIBC_2.27 strtof_l F
-+GLIBC_2.27 strtoimax F
-+GLIBC_2.27 strtok F
-+GLIBC_2.27 strtok_r F
-+GLIBC_2.27 strtol F
-+GLIBC_2.27 strtol_l F
-+GLIBC_2.27 strtold F
-+GLIBC_2.27 strtold_l F
-+GLIBC_2.27 strtoll F
-+GLIBC_2.27 strtoll_l F
-+GLIBC_2.27 strtoq F
-+GLIBC_2.27 strtoul F
-+GLIBC_2.27 strtoul_l F
-+GLIBC_2.27 strtoull F
-+GLIBC_2.27 strtoull_l F
-+GLIBC_2.27 strtoumax F
-+GLIBC_2.27 strtouq F
-+GLIBC_2.27 strverscmp F
-+GLIBC_2.27 strxfrm F
-+GLIBC_2.27 strxfrm_l F
-+GLIBC_2.27 stty F
-+GLIBC_2.27 svc_exit F
-+GLIBC_2.27 svc_fdset D 0x80
-+GLIBC_2.27 svc_getreq F
-+GLIBC_2.27 svc_getreq_common F
-+GLIBC_2.27 svc_getreq_poll F
-+GLIBC_2.27 svc_getreqset F
-+GLIBC_2.27 svc_max_pollfd D 0x4
-+GLIBC_2.27 svc_pollfd D 0x4
-+GLIBC_2.27 svc_register F
-+GLIBC_2.27 svc_run F
-+GLIBC_2.27 svc_sendreply F
-+GLIBC_2.27 svc_unregister F
-+GLIBC_2.27 svcauthdes_stats D 0xc
-+GLIBC_2.27 svcerr_auth F
-+GLIBC_2.27 svcerr_decode F
-+GLIBC_2.27 svcerr_noproc F
-+GLIBC_2.27 svcerr_noprog F
-+GLIBC_2.27 svcerr_progvers F
-+GLIBC_2.27 svcerr_systemerr F
-+GLIBC_2.27 svcerr_weakauth F
-+GLIBC_2.27 svcfd_create F
-+GLIBC_2.27 svcraw_create F
-+GLIBC_2.27 svctcp_create F
-+GLIBC_2.27 svcudp_bufcreate F
-+GLIBC_2.27 svcudp_create F
-+GLIBC_2.27 svcudp_enablecache F
-+GLIBC_2.27 svcunix_create F
-+GLIBC_2.27 svcunixfd_create F
-+GLIBC_2.27 swab F
-+GLIBC_2.27 swapcontext F
-+GLIBC_2.27 swapoff F
-+GLIBC_2.27 swapon F
-+GLIBC_2.27 swprintf F
-+GLIBC_2.27 swscanf F
-+GLIBC_2.27 symlink F
-+GLIBC_2.27 symlinkat F
-+GLIBC_2.27 sync F
-+GLIBC_2.27 sync_file_range F
-+GLIBC_2.27 syncfs F
-+GLIBC_2.27 sys_errlist D 0x21c
-+GLIBC_2.27 sys_nerr D 0x4
-+GLIBC_2.27 sys_sigabbrev D 0x104
-+GLIBC_2.27 sys_siglist D 0x104
-+GLIBC_2.27 syscall F
-+GLIBC_2.27 sysconf F
-+GLIBC_2.27 sysctl F
-+GLIBC_2.27 sysinfo F
-+GLIBC_2.27 syslog F
-+GLIBC_2.27 system F
-+GLIBC_2.27 sysv_signal F
-+GLIBC_2.27 tcdrain F
-+GLIBC_2.27 tcflow F
-+GLIBC_2.27 tcflush F
-+GLIBC_2.27 tcgetattr F
-+GLIBC_2.27 tcgetpgrp F
-+GLIBC_2.27 tcgetsid F
-+GLIBC_2.27 tcsendbreak F
-+GLIBC_2.27 tcsetattr F
-+GLIBC_2.27 tcsetpgrp F
-+GLIBC_2.27 tdelete F
-+GLIBC_2.27 tdestroy F
-+GLIBC_2.27 tee F
-+GLIBC_2.27 telldir F
-+GLIBC_2.27 tempnam F
-+GLIBC_2.27 textdomain F
-+GLIBC_2.27 tfind F
-+GLIBC_2.27 time F
-+GLIBC_2.27 timegm F
-+GLIBC_2.27 timelocal F
-+GLIBC_2.27 timerfd_create F
-+GLIBC_2.27 timerfd_gettime F
-+GLIBC_2.27 timerfd_settime F
-+GLIBC_2.27 times F
-+GLIBC_2.27 timespec_get F
-+GLIBC_2.27 timezone D 0x4
-+GLIBC_2.27 tmpfile F
-+GLIBC_2.27 tmpfile64 F
-+GLIBC_2.27 tmpnam F
-+GLIBC_2.27 tmpnam_r F
-+GLIBC_2.27 toascii F
-+GLIBC_2.27 tolower F
-+GLIBC_2.27 tolower_l F
-+GLIBC_2.27 toupper F
-+GLIBC_2.27 toupper_l F
-+GLIBC_2.27 towctrans F
-+GLIBC_2.27 towctrans_l F
-+GLIBC_2.27 towlower F
-+GLIBC_2.27 towlower_l F
-+GLIBC_2.27 towupper F
-+GLIBC_2.27 towupper_l F
-+GLIBC_2.27 tr_break F
-+GLIBC_2.27 truncate F
-+GLIBC_2.27 truncate64 F
-+GLIBC_2.27 tsearch F
-+GLIBC_2.27 ttyname F
-+GLIBC_2.27 ttyname_r F
-+GLIBC_2.27 ttyslot F
-+GLIBC_2.27 twalk F
-+GLIBC_2.27 tzname D 0x8
-+GLIBC_2.27 tzset F
-+GLIBC_2.27 ualarm F
-+GLIBC_2.27 ulckpwdf F
-+GLIBC_2.27 ulimit F
-+GLIBC_2.27 umask F
-+GLIBC_2.27 umount F
-+GLIBC_2.27 umount2 F
-+GLIBC_2.27 uname F
-+GLIBC_2.27 ungetc F
-+GLIBC_2.27 ungetwc F
-+GLIBC_2.27 unlink F
-+GLIBC_2.27 unlinkat F
-+GLIBC_2.27 unlockpt F
-+GLIBC_2.27 unsetenv F
-+GLIBC_2.27 unshare F
-+GLIBC_2.27 updwtmp F
-+GLIBC_2.27 updwtmpx F
-+GLIBC_2.27 uselocale F
-+GLIBC_2.27 user2netname F
-+GLIBC_2.27 usleep F
-+GLIBC_2.27 ustat F
-+GLIBC_2.27 utime F
-+GLIBC_2.27 utimensat F
-+GLIBC_2.27 utimes F
-+GLIBC_2.27 utmpname F
-+GLIBC_2.27 utmpxname F
-+GLIBC_2.27 valloc F
-+GLIBC_2.27 vasprintf F
-+GLIBC_2.27 vdprintf F
-+GLIBC_2.27 verr F
-+GLIBC_2.27 verrx F
-+GLIBC_2.27 versionsort F
-+GLIBC_2.27 versionsort64 F
-+GLIBC_2.27 vfork F
-+GLIBC_2.27 vfprintf F
-+GLIBC_2.27 vfscanf F
-+GLIBC_2.27 vfwprintf F
-+GLIBC_2.27 vfwscanf F
-+GLIBC_2.27 vhangup F
-+GLIBC_2.27 vlimit F
-+GLIBC_2.27 vmsplice F
-+GLIBC_2.27 vprintf F
-+GLIBC_2.27 vscanf F
-+GLIBC_2.27 vsnprintf F
-+GLIBC_2.27 vsprintf F
-+GLIBC_2.27 vsscanf F
-+GLIBC_2.27 vswprintf F
-+GLIBC_2.27 vswscanf F
-+GLIBC_2.27 vsyslog F
-+GLIBC_2.27 vtimes F
-+GLIBC_2.27 vwarn F
-+GLIBC_2.27 vwarnx F
-+GLIBC_2.27 vwprintf F
-+GLIBC_2.27 vwscanf F
-+GLIBC_2.27 wait F
-+GLIBC_2.27 wait3 F
-+GLIBC_2.27 wait4 F
-+GLIBC_2.27 waitid F
-+GLIBC_2.27 waitpid F
-+GLIBC_2.27 warn F
-+GLIBC_2.27 warnx F
-+GLIBC_2.27 wcpcpy F
-+GLIBC_2.27 wcpncpy F
-+GLIBC_2.27 wcrtomb F
-+GLIBC_2.27 wcscasecmp F
-+GLIBC_2.27 wcscasecmp_l F
-+GLIBC_2.27 wcscat F
-+GLIBC_2.27 wcschr F
-+GLIBC_2.27 wcschrnul F
-+GLIBC_2.27 wcscmp F
-+GLIBC_2.27 wcscoll F
-+GLIBC_2.27 wcscoll_l F
-+GLIBC_2.27 wcscpy F
-+GLIBC_2.27 wcscspn F
-+GLIBC_2.27 wcsdup F
-+GLIBC_2.27 wcsftime F
-+GLIBC_2.27 wcsftime_l F
-+GLIBC_2.27 wcslen F
-+GLIBC_2.27 wcsncasecmp F
-+GLIBC_2.27 wcsncasecmp_l F
-+GLIBC_2.27 wcsncat F
-+GLIBC_2.27 wcsncmp F
-+GLIBC_2.27 wcsncpy F
-+GLIBC_2.27 wcsnlen F
-+GLIBC_2.27 wcsnrtombs F
-+GLIBC_2.27 wcspbrk F
-+GLIBC_2.27 wcsrchr F
-+GLIBC_2.27 wcsrtombs F
-+GLIBC_2.27 wcsspn F
-+GLIBC_2.27 wcsstr F
-+GLIBC_2.27 wcstod F
-+GLIBC_2.27 wcstod_l F
-+GLIBC_2.27 wcstof F
-+GLIBC_2.27 wcstof32 F
-+GLIBC_2.27 wcstof32_l F
-+GLIBC_2.27 wcstof32x F
-+GLIBC_2.27 wcstof32x_l F
-+GLIBC_2.27 wcstof64 F
-+GLIBC_2.27 wcstof64_l F
-+GLIBC_2.27 wcstof_l F
-+GLIBC_2.27 wcstoimax F
-+GLIBC_2.27 wcstok F
-+GLIBC_2.27 wcstol F
-+GLIBC_2.27 wcstol_l F
-+GLIBC_2.27 wcstold F
-+GLIBC_2.27 wcstold_l F
-+GLIBC_2.27 wcstoll F
-+GLIBC_2.27 wcstoll_l F
-+GLIBC_2.27 wcstombs F
-+GLIBC_2.27 wcstoq F
-+GLIBC_2.27 wcstoul F
-+GLIBC_2.27 wcstoul_l F
-+GLIBC_2.27 wcstoull F
-+GLIBC_2.27 wcstoull_l F
-+GLIBC_2.27 wcstoumax F
-+GLIBC_2.27 wcstouq F
-+GLIBC_2.27 wcswcs F
-+GLIBC_2.27 wcswidth F
-+GLIBC_2.27 wcsxfrm F
-+GLIBC_2.27 wcsxfrm_l F
-+GLIBC_2.27 wctob F
-+GLIBC_2.27 wctomb F
-+GLIBC_2.27 wctrans F
-+GLIBC_2.27 wctrans_l F
-+GLIBC_2.27 wctype F
-+GLIBC_2.27 wctype_l F
-+GLIBC_2.27 wcwidth F
-+GLIBC_2.27 wmemchr F
-+GLIBC_2.27 wmemcmp F
-+GLIBC_2.27 wmemcpy F
-+GLIBC_2.27 wmemmove F
-+GLIBC_2.27 wmempcpy F
-+GLIBC_2.27 wmemset F
-+GLIBC_2.27 wordexp F
-+GLIBC_2.27 wordfree F
-+GLIBC_2.27 wprintf F
-+GLIBC_2.27 write F
-+GLIBC_2.27 writev F
-+GLIBC_2.27 wscanf F
-+GLIBC_2.27 xdecrypt F
-+GLIBC_2.27 xdr_accepted_reply F
-+GLIBC_2.27 xdr_array F
-+GLIBC_2.27 xdr_authdes_cred F
-+GLIBC_2.27 xdr_authdes_verf F
-+GLIBC_2.27 xdr_authunix_parms F
-+GLIBC_2.27 xdr_bool F
-+GLIBC_2.27 xdr_bytes F
-+GLIBC_2.27 xdr_callhdr F
-+GLIBC_2.27 xdr_callmsg F
-+GLIBC_2.27 xdr_char F
-+GLIBC_2.27 xdr_cryptkeyarg F
-+GLIBC_2.27 xdr_cryptkeyarg2 F
-+GLIBC_2.27 xdr_cryptkeyres F
-+GLIBC_2.27 xdr_des_block F
-+GLIBC_2.27 xdr_double F
-+GLIBC_2.27 xdr_enum F
-+GLIBC_2.27 xdr_float F
-+GLIBC_2.27 xdr_free F
-+GLIBC_2.27 xdr_getcredres F
-+GLIBC_2.27 xdr_hyper F
-+GLIBC_2.27 xdr_int F
-+GLIBC_2.27 xdr_int16_t F
-+GLIBC_2.27 xdr_int32_t F
-+GLIBC_2.27 xdr_int64_t F
-+GLIBC_2.27 xdr_int8_t F
-+GLIBC_2.27 xdr_key_netstarg F
-+GLIBC_2.27 xdr_key_netstres F
-+GLIBC_2.27 xdr_keybuf F
-+GLIBC_2.27 xdr_keystatus F
-+GLIBC_2.27 xdr_long F
-+GLIBC_2.27 xdr_longlong_t F
-+GLIBC_2.27 xdr_netnamestr F
-+GLIBC_2.27 xdr_netobj F
-+GLIBC_2.27 xdr_opaque F
-+GLIBC_2.27 xdr_opaque_auth F
-+GLIBC_2.27 xdr_pmap F
-+GLIBC_2.27 xdr_pmaplist F
-+GLIBC_2.27 xdr_pointer F
-+GLIBC_2.27 xdr_quad_t F
-+GLIBC_2.27 xdr_reference F
-+GLIBC_2.27 xdr_rejected_reply F
-+GLIBC_2.27 xdr_replymsg F
-+GLIBC_2.27 xdr_rmtcall_args F
-+GLIBC_2.27 xdr_rmtcallres F
-+GLIBC_2.27 xdr_short F
-+GLIBC_2.27 xdr_sizeof F
-+GLIBC_2.27 xdr_string F
-+GLIBC_2.27 xdr_u_char F
-+GLIBC_2.27 xdr_u_hyper F
-+GLIBC_2.27 xdr_u_int F
-+GLIBC_2.27 xdr_u_long F
-+GLIBC_2.27 xdr_u_longlong_t F
-+GLIBC_2.27 xdr_u_quad_t F
-+GLIBC_2.27 xdr_u_short F
-+GLIBC_2.27 xdr_uint16_t F
-+GLIBC_2.27 xdr_uint32_t F
-+GLIBC_2.27 xdr_uint64_t F
-+GLIBC_2.27 xdr_uint8_t F
-+GLIBC_2.27 xdr_union F
-+GLIBC_2.27 xdr_unixcred F
-+GLIBC_2.27 xdr_vector F
-+GLIBC_2.27 xdr_void F
-+GLIBC_2.27 xdr_wrapstring F
-+GLIBC_2.27 xdrmem_create F
-+GLIBC_2.27 xdrrec_create F
-+GLIBC_2.27 xdrrec_endofrecord F
-+GLIBC_2.27 xdrrec_eof F
-+GLIBC_2.27 xdrrec_skiprecord F
-+GLIBC_2.27 xdrstdio_create F
-+GLIBC_2.27 xencrypt F
-+GLIBC_2.27 xprt_register F
-+GLIBC_2.27 xprt_unregister F
-+GLIBC_2.28 fcntl F
-+GLIBC_2.28 fcntl64 F
-+GLIBC_2.28 renameat2 F
-+GLIBC_2.28 statx F
-+GLIBC_2.28 thrd_current F
-+GLIBC_2.28 thrd_equal F
-+GLIBC_2.28 thrd_sleep F
-+GLIBC_2.28 thrd_yield F
-diff --git a/sysdeps/unix/sysv/linux/arc/libcrypt.abilist b/sysdeps/unix/sysv/linux/arc/libcrypt.abilist
-new file mode 100644
-index 000000000000..9484dca79ea6
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/libcrypt.abilist
-@@ -0,0 +1,7 @@
-+GLIBC_2.27 crypt F
-+GLIBC_2.27 crypt_r F
-+GLIBC_2.27 encrypt F
-+GLIBC_2.27 encrypt_r F
-+GLIBC_2.27 fcrypt F
-+GLIBC_2.27 setkey F
-+GLIBC_2.27 setkey_r F
-diff --git a/sysdeps/unix/sysv/linux/arc/libdl.abilist b/sysdeps/unix/sysv/linux/arc/libdl.abilist
-new file mode 100644
-index 000000000000..16adcae553d8
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/libdl.abilist
-@@ -0,0 +1,9 @@
-+GLIBC_2.27 dladdr F
-+GLIBC_2.27 dladdr1 F
-+GLIBC_2.27 dlclose F
-+GLIBC_2.27 dlerror F
-+GLIBC_2.27 dlinfo F
-+GLIBC_2.27 dlmopen F
-+GLIBC_2.27 dlopen F
-+GLIBC_2.27 dlsym F
-+GLIBC_2.27 dlvsym F
-diff --git a/sysdeps/unix/sysv/linux/arc/libm.abilist b/sysdeps/unix/sysv/linux/arc/libm.abilist
-new file mode 100644
-index 000000000000..52b3db50a2bb
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/libm.abilist
-@@ -0,0 +1,753 @@
-+GLIBC_2.27 __acos_finite F
-+GLIBC_2.27 __acosf_finite F
-+GLIBC_2.27 __acosh_finite F
-+GLIBC_2.27 __acoshf_finite F
-+GLIBC_2.27 __asin_finite F
-+GLIBC_2.27 __asinf_finite F
-+GLIBC_2.27 __atan2_finite F
-+GLIBC_2.27 __atan2f_finite F
-+GLIBC_2.27 __atanh_finite F
-+GLIBC_2.27 __atanhf_finite F
-+GLIBC_2.27 __clog10 F
-+GLIBC_2.27 __clog10f F
-+GLIBC_2.27 __clog10l F
-+GLIBC_2.27 __cosh_finite F
-+GLIBC_2.27 __coshf_finite F
-+GLIBC_2.27 __exp10_finite F
-+GLIBC_2.27 __exp10f_finite F
-+GLIBC_2.27 __exp2_finite F
-+GLIBC_2.27 __exp2f_finite F
-+GLIBC_2.27 __exp_finite F
-+GLIBC_2.27 __expf_finite F
-+GLIBC_2.27 __finite F
-+GLIBC_2.27 __finitef F
-+GLIBC_2.27 __fmod_finite F
-+GLIBC_2.27 __fmodf_finite F
-+GLIBC_2.27 __fpclassify F
-+GLIBC_2.27 __fpclassifyf F
-+GLIBC_2.27 __gamma_r_finite F
-+GLIBC_2.27 __gammaf_r_finite F
-+GLIBC_2.27 __hypot_finite F
-+GLIBC_2.27 __hypotf_finite F
-+GLIBC_2.27 __iseqsig F
-+GLIBC_2.27 __iseqsigf F
-+GLIBC_2.27 __issignaling F
-+GLIBC_2.27 __issignalingf F
-+GLIBC_2.27 __j0_finite F
-+GLIBC_2.27 __j0f_finite F
-+GLIBC_2.27 __j1_finite F
-+GLIBC_2.27 __j1f_finite F
-+GLIBC_2.27 __jn_finite F
-+GLIBC_2.27 __jnf_finite F
-+GLIBC_2.27 __lgamma_r_finite F
-+GLIBC_2.27 __lgammaf_r_finite F
-+GLIBC_2.27 __log10_finite F
-+GLIBC_2.27 __log10f_finite F
-+GLIBC_2.27 __log2_finite F
-+GLIBC_2.27 __log2f_finite F
-+GLIBC_2.27 __log_finite F
-+GLIBC_2.27 __logf_finite F
-+GLIBC_2.27 __pow_finite F
-+GLIBC_2.27 __powf_finite F
-+GLIBC_2.27 __remainder_finite F
-+GLIBC_2.27 __remainderf_finite F
-+GLIBC_2.27 __scalb_finite F
-+GLIBC_2.27 __scalbf_finite F
-+GLIBC_2.27 __signbit F
-+GLIBC_2.27 __signbitf F
-+GLIBC_2.27 __signgam D 0x4
-+GLIBC_2.27 __sinh_finite F
-+GLIBC_2.27 __sinhf_finite F
-+GLIBC_2.27 __sqrt_finite F
-+GLIBC_2.27 __sqrtf_finite F
-+GLIBC_2.27 __y0_finite F
-+GLIBC_2.27 __y0f_finite F
-+GLIBC_2.27 __y1_finite F
-+GLIBC_2.27 __y1f_finite F
-+GLIBC_2.27 __yn_finite F
-+GLIBC_2.27 __ynf_finite F
-+GLIBC_2.27 acos F
-+GLIBC_2.27 acosf F
-+GLIBC_2.27 acosf32 F
-+GLIBC_2.27 acosf32x F
-+GLIBC_2.27 acosf64 F
-+GLIBC_2.27 acosh F
-+GLIBC_2.27 acoshf F
-+GLIBC_2.27 acoshf32 F
-+GLIBC_2.27 acoshf32x F
-+GLIBC_2.27 acoshf64 F
-+GLIBC_2.27 acoshl F
-+GLIBC_2.27 acosl F
-+GLIBC_2.27 asin F
-+GLIBC_2.27 asinf F
-+GLIBC_2.27 asinf32 F
-+GLIBC_2.27 asinf32x F
-+GLIBC_2.27 asinf64 F
-+GLIBC_2.27 asinh F
-+GLIBC_2.27 asinhf F
-+GLIBC_2.27 asinhf32 F
-+GLIBC_2.27 asinhf32x F
-+GLIBC_2.27 asinhf64 F
-+GLIBC_2.27 asinhl F
-+GLIBC_2.27 asinl F
-+GLIBC_2.27 atan F
-+GLIBC_2.27 atan2 F
-+GLIBC_2.27 atan2f F
-+GLIBC_2.27 atan2f32 F
-+GLIBC_2.27 atan2f32x F
-+GLIBC_2.27 atan2f64 F
-+GLIBC_2.27 atan2l F
-+GLIBC_2.27 atanf F
-+GLIBC_2.27 atanf32 F
-+GLIBC_2.27 atanf32x F
-+GLIBC_2.27 atanf64 F
-+GLIBC_2.27 atanh F
-+GLIBC_2.27 atanhf F
-+GLIBC_2.27 atanhf32 F
-+GLIBC_2.27 atanhf32x F
-+GLIBC_2.27 atanhf64 F
-+GLIBC_2.27 atanhl F
-+GLIBC_2.27 atanl F
-+GLIBC_2.27 cabs F
-+GLIBC_2.27 cabsf F
-+GLIBC_2.27 cabsf32 F
-+GLIBC_2.27 cabsf32x F
-+GLIBC_2.27 cabsf64 F
-+GLIBC_2.27 cabsl F
-+GLIBC_2.27 cacos F
-+GLIBC_2.27 cacosf F
-+GLIBC_2.27 cacosf32 F
-+GLIBC_2.27 cacosf32x F
-+GLIBC_2.27 cacosf64 F
-+GLIBC_2.27 cacosh F
-+GLIBC_2.27 cacoshf F
-+GLIBC_2.27 cacoshf32 F
-+GLIBC_2.27 cacoshf32x F
-+GLIBC_2.27 cacoshf64 F
-+GLIBC_2.27 cacoshl F
-+GLIBC_2.27 cacosl F
-+GLIBC_2.27 canonicalize F
-+GLIBC_2.27 canonicalizef F
-+GLIBC_2.27 canonicalizef32 F
-+GLIBC_2.27 canonicalizef32x F
-+GLIBC_2.27 canonicalizef64 F
-+GLIBC_2.27 canonicalizel F
-+GLIBC_2.27 carg F
-+GLIBC_2.27 cargf F
-+GLIBC_2.27 cargf32 F
-+GLIBC_2.27 cargf32x F
-+GLIBC_2.27 cargf64 F
-+GLIBC_2.27 cargl F
-+GLIBC_2.27 casin F
-+GLIBC_2.27 casinf F
-+GLIBC_2.27 casinf32 F
-+GLIBC_2.27 casinf32x F
-+GLIBC_2.27 casinf64 F
-+GLIBC_2.27 casinh F
-+GLIBC_2.27 casinhf F
-+GLIBC_2.27 casinhf32 F
-+GLIBC_2.27 casinhf32x F
-+GLIBC_2.27 casinhf64 F
-+GLIBC_2.27 casinhl F
-+GLIBC_2.27 casinl F
-+GLIBC_2.27 catan F
-+GLIBC_2.27 catanf F
-+GLIBC_2.27 catanf32 F
-+GLIBC_2.27 catanf32x F
-+GLIBC_2.27 catanf64 F
-+GLIBC_2.27 catanh F
-+GLIBC_2.27 catanhf F
-+GLIBC_2.27 catanhf32 F
-+GLIBC_2.27 catanhf32x F
-+GLIBC_2.27 catanhf64 F
-+GLIBC_2.27 catanhl F
-+GLIBC_2.27 catanl F
-+GLIBC_2.27 cbrt F
-+GLIBC_2.27 cbrtf F
-+GLIBC_2.27 cbrtf32 F
-+GLIBC_2.27 cbrtf32x F
-+GLIBC_2.27 cbrtf64 F
-+GLIBC_2.27 cbrtl F
-+GLIBC_2.27 ccos F
-+GLIBC_2.27 ccosf F
-+GLIBC_2.27 ccosf32 F
-+GLIBC_2.27 ccosf32x F
-+GLIBC_2.27 ccosf64 F
-+GLIBC_2.27 ccosh F
-+GLIBC_2.27 ccoshf F
-+GLIBC_2.27 ccoshf32 F
-+GLIBC_2.27 ccoshf32x F
-+GLIBC_2.27 ccoshf64 F
-+GLIBC_2.27 ccoshl F
-+GLIBC_2.27 ccosl F
-+GLIBC_2.27 ceil F
-+GLIBC_2.27 ceilf F
-+GLIBC_2.27 ceilf32 F
-+GLIBC_2.27 ceilf32x F
-+GLIBC_2.27 ceilf64 F
-+GLIBC_2.27 ceill F
-+GLIBC_2.27 cexp F
-+GLIBC_2.27 cexpf F
-+GLIBC_2.27 cexpf32 F
-+GLIBC_2.27 cexpf32x F
-+GLIBC_2.27 cexpf64 F
-+GLIBC_2.27 cexpl F
-+GLIBC_2.27 cimag F
-+GLIBC_2.27 cimagf F
-+GLIBC_2.27 cimagf32 F
-+GLIBC_2.27 cimagf32x F
-+GLIBC_2.27 cimagf64 F
-+GLIBC_2.27 cimagl F
-+GLIBC_2.27 clog F
-+GLIBC_2.27 clog10 F
-+GLIBC_2.27 clog10f F
-+GLIBC_2.27 clog10f32 F
-+GLIBC_2.27 clog10f32x F
-+GLIBC_2.27 clog10f64 F
-+GLIBC_2.27 clog10l F
-+GLIBC_2.27 clogf F
-+GLIBC_2.27 clogf32 F
-+GLIBC_2.27 clogf32x F
-+GLIBC_2.27 clogf64 F
-+GLIBC_2.27 clogl F
-+GLIBC_2.27 conj F
-+GLIBC_2.27 conjf F
-+GLIBC_2.27 conjf32 F
-+GLIBC_2.27 conjf32x F
-+GLIBC_2.27 conjf64 F
-+GLIBC_2.27 conjl F
-+GLIBC_2.27 copysign F
-+GLIBC_2.27 copysignf F
-+GLIBC_2.27 copysignf32 F
-+GLIBC_2.27 copysignf32x F
-+GLIBC_2.27 copysignf64 F
-+GLIBC_2.27 copysignl F
-+GLIBC_2.27 cos F
-+GLIBC_2.27 cosf F
-+GLIBC_2.27 cosf32 F
-+GLIBC_2.27 cosf32x F
-+GLIBC_2.27 cosf64 F
-+GLIBC_2.27 cosh F
-+GLIBC_2.27 coshf F
-+GLIBC_2.27 coshf32 F
-+GLIBC_2.27 coshf32x F
-+GLIBC_2.27 coshf64 F
-+GLIBC_2.27 coshl F
-+GLIBC_2.27 cosl F
-+GLIBC_2.27 cpow F
-+GLIBC_2.27 cpowf F
-+GLIBC_2.27 cpowf32 F
-+GLIBC_2.27 cpowf32x F
-+GLIBC_2.27 cpowf64 F
-+GLIBC_2.27 cpowl F
-+GLIBC_2.27 cproj F
-+GLIBC_2.27 cprojf F
-+GLIBC_2.27 cprojf32 F
-+GLIBC_2.27 cprojf32x F
-+GLIBC_2.27 cprojf64 F
-+GLIBC_2.27 cprojl F
-+GLIBC_2.27 creal F
-+GLIBC_2.27 crealf F
-+GLIBC_2.27 crealf32 F
-+GLIBC_2.27 crealf32x F
-+GLIBC_2.27 crealf64 F
-+GLIBC_2.27 creall F
-+GLIBC_2.27 csin F
-+GLIBC_2.27 csinf F
-+GLIBC_2.27 csinf32 F
-+GLIBC_2.27 csinf32x F
-+GLIBC_2.27 csinf64 F
-+GLIBC_2.27 csinh F
-+GLIBC_2.27 csinhf F
-+GLIBC_2.27 csinhf32 F
-+GLIBC_2.27 csinhf32x F
-+GLIBC_2.27 csinhf64 F
-+GLIBC_2.27 csinhl F
-+GLIBC_2.27 csinl F
-+GLIBC_2.27 csqrt F
-+GLIBC_2.27 csqrtf F
-+GLIBC_2.27 csqrtf32 F
-+GLIBC_2.27 csqrtf32x F
-+GLIBC_2.27 csqrtf64 F
-+GLIBC_2.27 csqrtl F
-+GLIBC_2.27 ctan F
-+GLIBC_2.27 ctanf F
-+GLIBC_2.27 ctanf32 F
-+GLIBC_2.27 ctanf32x F
-+GLIBC_2.27 ctanf64 F
-+GLIBC_2.27 ctanh F
-+GLIBC_2.27 ctanhf F
-+GLIBC_2.27 ctanhf32 F
-+GLIBC_2.27 ctanhf32x F
-+GLIBC_2.27 ctanhf64 F
-+GLIBC_2.27 ctanhl F
-+GLIBC_2.27 ctanl F
-+GLIBC_2.27 drem F
-+GLIBC_2.27 dremf F
-+GLIBC_2.27 dreml F
-+GLIBC_2.27 erf F
-+GLIBC_2.27 erfc F
-+GLIBC_2.27 erfcf F
-+GLIBC_2.27 erfcf32 F
-+GLIBC_2.27 erfcf32x F
-+GLIBC_2.27 erfcf64 F
-+GLIBC_2.27 erfcl F
-+GLIBC_2.27 erff F
-+GLIBC_2.27 erff32 F
-+GLIBC_2.27 erff32x F
-+GLIBC_2.27 erff64 F
-+GLIBC_2.27 erfl F
-+GLIBC_2.27 exp F
-+GLIBC_2.27 exp10 F
-+GLIBC_2.27 exp10f F
-+GLIBC_2.27 exp10f32 F
-+GLIBC_2.27 exp10f32x F
-+GLIBC_2.27 exp10f64 F
-+GLIBC_2.27 exp10l F
-+GLIBC_2.27 exp2 F
-+GLIBC_2.27 exp2f F
-+GLIBC_2.27 exp2f32 F
-+GLIBC_2.27 exp2f32x F
-+GLIBC_2.27 exp2f64 F
-+GLIBC_2.27 exp2l F
-+GLIBC_2.27 expf F
-+GLIBC_2.27 expf32 F
-+GLIBC_2.27 expf32x F
-+GLIBC_2.27 expf64 F
-+GLIBC_2.27 expl F
-+GLIBC_2.27 expm1 F
-+GLIBC_2.27 expm1f F
-+GLIBC_2.27 expm1f32 F
-+GLIBC_2.27 expm1f32x F
-+GLIBC_2.27 expm1f64 F
-+GLIBC_2.27 expm1l F
-+GLIBC_2.27 fabs F
-+GLIBC_2.27 fabsf F
-+GLIBC_2.27 fabsf32 F
-+GLIBC_2.27 fabsf32x F
-+GLIBC_2.27 fabsf64 F
-+GLIBC_2.27 fabsl F
-+GLIBC_2.27 fdim F
-+GLIBC_2.27 fdimf F
-+GLIBC_2.27 fdimf32 F
-+GLIBC_2.27 fdimf32x F
-+GLIBC_2.27 fdimf64 F
-+GLIBC_2.27 fdiml F
-+GLIBC_2.27 feclearexcept F
-+GLIBC_2.27 fedisableexcept F
-+GLIBC_2.27 feenableexcept F
-+GLIBC_2.27 fegetenv F
-+GLIBC_2.27 fegetexcept F
-+GLIBC_2.27 fegetexceptflag F
-+GLIBC_2.27 fegetmode F
-+GLIBC_2.27 fegetround F
-+GLIBC_2.27 feholdexcept F
-+GLIBC_2.27 feraiseexcept F
-+GLIBC_2.27 fesetenv F
-+GLIBC_2.27 fesetexcept F
-+GLIBC_2.27 fesetexceptflag F
-+GLIBC_2.27 fesetmode F
-+GLIBC_2.27 fesetround F
-+GLIBC_2.27 fetestexcept F
-+GLIBC_2.27 fetestexceptflag F
-+GLIBC_2.27 feupdateenv F
-+GLIBC_2.27 finite F
-+GLIBC_2.27 finitef F
-+GLIBC_2.27 finitel F
-+GLIBC_2.27 floor F
-+GLIBC_2.27 floorf F
-+GLIBC_2.27 floorf32 F
-+GLIBC_2.27 floorf32x F
-+GLIBC_2.27 floorf64 F
-+GLIBC_2.27 floorl F
-+GLIBC_2.27 fma F
-+GLIBC_2.27 fmaf F
-+GLIBC_2.27 fmaf32 F
-+GLIBC_2.27 fmaf32x F
-+GLIBC_2.27 fmaf64 F
-+GLIBC_2.27 fmal F
-+GLIBC_2.27 fmax F
-+GLIBC_2.27 fmaxf F
-+GLIBC_2.27 fmaxf32 F
-+GLIBC_2.27 fmaxf32x F
-+GLIBC_2.27 fmaxf64 F
-+GLIBC_2.27 fmaxl F
-+GLIBC_2.27 fmaxmag F
-+GLIBC_2.27 fmaxmagf F
-+GLIBC_2.27 fmaxmagf32 F
-+GLIBC_2.27 fmaxmagf32x F
-+GLIBC_2.27 fmaxmagf64 F
-+GLIBC_2.27 fmaxmagl F
-+GLIBC_2.27 fmin F
-+GLIBC_2.27 fminf F
-+GLIBC_2.27 fminf32 F
-+GLIBC_2.27 fminf32x F
-+GLIBC_2.27 fminf64 F
-+GLIBC_2.27 fminl F
-+GLIBC_2.27 fminmag F
-+GLIBC_2.27 fminmagf F
-+GLIBC_2.27 fminmagf32 F
-+GLIBC_2.27 fminmagf32x F
-+GLIBC_2.27 fminmagf64 F
-+GLIBC_2.27 fminmagl F
-+GLIBC_2.27 fmod F
-+GLIBC_2.27 fmodf F
-+GLIBC_2.27 fmodf32 F
-+GLIBC_2.27 fmodf32x F
-+GLIBC_2.27 fmodf64 F
-+GLIBC_2.27 fmodl F
-+GLIBC_2.27 frexp F
-+GLIBC_2.27 frexpf F
-+GLIBC_2.27 frexpf32 F
-+GLIBC_2.27 frexpf32x F
-+GLIBC_2.27 frexpf64 F
-+GLIBC_2.27 frexpl F
-+GLIBC_2.27 fromfp F
-+GLIBC_2.27 fromfpf F
-+GLIBC_2.27 fromfpf32 F
-+GLIBC_2.27 fromfpf32x F
-+GLIBC_2.27 fromfpf64 F
-+GLIBC_2.27 fromfpl F
-+GLIBC_2.27 fromfpx F
-+GLIBC_2.27 fromfpxf F
-+GLIBC_2.27 fromfpxf32 F
-+GLIBC_2.27 fromfpxf32x F
-+GLIBC_2.27 fromfpxf64 F
-+GLIBC_2.27 fromfpxl F
-+GLIBC_2.27 gamma F
-+GLIBC_2.27 gammaf F
-+GLIBC_2.27 gammal F
-+GLIBC_2.27 getpayload F
-+GLIBC_2.27 getpayloadf F
-+GLIBC_2.27 getpayloadf32 F
-+GLIBC_2.27 getpayloadf32x F
-+GLIBC_2.27 getpayloadf64 F
-+GLIBC_2.27 getpayloadl F
-+GLIBC_2.27 hypot F
-+GLIBC_2.27 hypotf F
-+GLIBC_2.27 hypotf32 F
-+GLIBC_2.27 hypotf32x F
-+GLIBC_2.27 hypotf64 F
-+GLIBC_2.27 hypotl F
-+GLIBC_2.27 ilogb F
-+GLIBC_2.27 ilogbf F
-+GLIBC_2.27 ilogbf32 F
-+GLIBC_2.27 ilogbf32x F
-+GLIBC_2.27 ilogbf64 F
-+GLIBC_2.27 ilogbl F
-+GLIBC_2.27 j0 F
-+GLIBC_2.27 j0f F
-+GLIBC_2.27 j0f32 F
-+GLIBC_2.27 j0f32x F
-+GLIBC_2.27 j0f64 F
-+GLIBC_2.27 j0l F
-+GLIBC_2.27 j1 F
-+GLIBC_2.27 j1f F
-+GLIBC_2.27 j1f32 F
-+GLIBC_2.27 j1f32x F
-+GLIBC_2.27 j1f64 F
-+GLIBC_2.27 j1l F
-+GLIBC_2.27 jn F
-+GLIBC_2.27 jnf F
-+GLIBC_2.27 jnf32 F
-+GLIBC_2.27 jnf32x F
-+GLIBC_2.27 jnf64 F
-+GLIBC_2.27 jnl F
-+GLIBC_2.27 ldexp F
-+GLIBC_2.27 ldexpf F
-+GLIBC_2.27 ldexpf32 F
-+GLIBC_2.27 ldexpf32x F
-+GLIBC_2.27 ldexpf64 F
-+GLIBC_2.27 ldexpl F
-+GLIBC_2.27 lgamma F
-+GLIBC_2.27 lgamma_r F
-+GLIBC_2.27 lgammaf F
-+GLIBC_2.27 lgammaf32 F
-+GLIBC_2.27 lgammaf32_r F
-+GLIBC_2.27 lgammaf32x F
-+GLIBC_2.27 lgammaf32x_r F
-+GLIBC_2.27 lgammaf64 F
-+GLIBC_2.27 lgammaf64_r F
-+GLIBC_2.27 lgammaf_r F
-+GLIBC_2.27 lgammal F
-+GLIBC_2.27 lgammal_r F
-+GLIBC_2.27 llogb F
-+GLIBC_2.27 llogbf F
-+GLIBC_2.27 llogbf32 F
-+GLIBC_2.27 llogbf32x F
-+GLIBC_2.27 llogbf64 F
-+GLIBC_2.27 llogbl F
-+GLIBC_2.27 llrint F
-+GLIBC_2.27 llrintf F
-+GLIBC_2.27 llrintf32 F
-+GLIBC_2.27 llrintf32x F
-+GLIBC_2.27 llrintf64 F
-+GLIBC_2.27 llrintl F
-+GLIBC_2.27 llround F
-+GLIBC_2.27 llroundf F
-+GLIBC_2.27 llroundf32 F
-+GLIBC_2.27 llroundf32x F
-+GLIBC_2.27 llroundf64 F
-+GLIBC_2.27 llroundl F
-+GLIBC_2.27 log F
-+GLIBC_2.27 log10 F
-+GLIBC_2.27 log10f F
-+GLIBC_2.27 log10f32 F
-+GLIBC_2.27 log10f32x F
-+GLIBC_2.27 log10f64 F
-+GLIBC_2.27 log10l F
-+GLIBC_2.27 log1p F
-+GLIBC_2.27 log1pf F
-+GLIBC_2.27 log1pf32 F
-+GLIBC_2.27 log1pf32x F
-+GLIBC_2.27 log1pf64 F
-+GLIBC_2.27 log1pl F
-+GLIBC_2.27 log2 F
-+GLIBC_2.27 log2f F
-+GLIBC_2.27 log2f32 F
-+GLIBC_2.27 log2f32x F
-+GLIBC_2.27 log2f64 F
-+GLIBC_2.27 log2l F
-+GLIBC_2.27 logb F
-+GLIBC_2.27 logbf F
-+GLIBC_2.27 logbf32 F
-+GLIBC_2.27 logbf32x F
-+GLIBC_2.27 logbf64 F
-+GLIBC_2.27 logbl F
-+GLIBC_2.27 logf F
-+GLIBC_2.27 logf32 F
-+GLIBC_2.27 logf32x F
-+GLIBC_2.27 logf64 F
-+GLIBC_2.27 logl F
-+GLIBC_2.27 lrint F
-+GLIBC_2.27 lrintf F
-+GLIBC_2.27 lrintf32 F
-+GLIBC_2.27 lrintf32x F
-+GLIBC_2.27 lrintf64 F
-+GLIBC_2.27 lrintl F
-+GLIBC_2.27 lround F
-+GLIBC_2.27 lroundf F
-+GLIBC_2.27 lroundf32 F
-+GLIBC_2.27 lroundf32x F
-+GLIBC_2.27 lroundf64 F
-+GLIBC_2.27 lroundl F
-+GLIBC_2.27 modf F
-+GLIBC_2.27 modff F
-+GLIBC_2.27 modff32 F
-+GLIBC_2.27 modff32x F
-+GLIBC_2.27 modff64 F
-+GLIBC_2.27 modfl F
-+GLIBC_2.27 nan F
-+GLIBC_2.27 nanf F
-+GLIBC_2.27 nanf32 F
-+GLIBC_2.27 nanf32x F
-+GLIBC_2.27 nanf64 F
-+GLIBC_2.27 nanl F
-+GLIBC_2.27 nearbyint F
-+GLIBC_2.27 nearbyintf F
-+GLIBC_2.27 nearbyintf32 F
-+GLIBC_2.27 nearbyintf32x F
-+GLIBC_2.27 nearbyintf64 F
-+GLIBC_2.27 nearbyintl F
-+GLIBC_2.27 nextafter F
-+GLIBC_2.27 nextafterf F
-+GLIBC_2.27 nextafterf32 F
-+GLIBC_2.27 nextafterf32x F
-+GLIBC_2.27 nextafterf64 F
-+GLIBC_2.27 nextafterl F
-+GLIBC_2.27 nextdown F
-+GLIBC_2.27 nextdownf F
-+GLIBC_2.27 nextdownf32 F
-+GLIBC_2.27 nextdownf32x F
-+GLIBC_2.27 nextdownf64 F
-+GLIBC_2.27 nextdownl F
-+GLIBC_2.27 nexttoward F
-+GLIBC_2.27 nexttowardf F
-+GLIBC_2.27 nexttowardl F
-+GLIBC_2.27 nextup F
-+GLIBC_2.27 nextupf F
-+GLIBC_2.27 nextupf32 F
-+GLIBC_2.27 nextupf32x F
-+GLIBC_2.27 nextupf64 F
-+GLIBC_2.27 nextupl F
-+GLIBC_2.27 pow F
-+GLIBC_2.27 powf F
-+GLIBC_2.27 powf32 F
-+GLIBC_2.27 powf32x F
-+GLIBC_2.27 powf64 F
-+GLIBC_2.27 powl F
-+GLIBC_2.27 remainder F
-+GLIBC_2.27 remainderf F
-+GLIBC_2.27 remainderf32 F
-+GLIBC_2.27 remainderf32x F
-+GLIBC_2.27 remainderf64 F
-+GLIBC_2.27 remainderl F
-+GLIBC_2.27 remquo F
-+GLIBC_2.27 remquof F
-+GLIBC_2.27 remquof32 F
-+GLIBC_2.27 remquof32x F
-+GLIBC_2.27 remquof64 F
-+GLIBC_2.27 remquol F
-+GLIBC_2.27 rint F
-+GLIBC_2.27 rintf F
-+GLIBC_2.27 rintf32 F
-+GLIBC_2.27 rintf32x F
-+GLIBC_2.27 rintf64 F
-+GLIBC_2.27 rintl F
-+GLIBC_2.27 round F
-+GLIBC_2.27 roundeven F
-+GLIBC_2.27 roundevenf F
-+GLIBC_2.27 roundevenf32 F
-+GLIBC_2.27 roundevenf32x F
-+GLIBC_2.27 roundevenf64 F
-+GLIBC_2.27 roundevenl F
-+GLIBC_2.27 roundf F
-+GLIBC_2.27 roundf32 F
-+GLIBC_2.27 roundf32x F
-+GLIBC_2.27 roundf64 F
-+GLIBC_2.27 roundl F
-+GLIBC_2.27 scalb F
-+GLIBC_2.27 scalbf F
-+GLIBC_2.27 scalbl F
-+GLIBC_2.27 scalbln F
-+GLIBC_2.27 scalblnf F
-+GLIBC_2.27 scalblnf32 F
-+GLIBC_2.27 scalblnf32x F
-+GLIBC_2.27 scalblnf64 F
-+GLIBC_2.27 scalblnl F
-+GLIBC_2.27 scalbn F
-+GLIBC_2.27 scalbnf F
-+GLIBC_2.27 scalbnf32 F
-+GLIBC_2.27 scalbnf32x F
-+GLIBC_2.27 scalbnf64 F
-+GLIBC_2.27 scalbnl F
-+GLIBC_2.27 setpayload F
-+GLIBC_2.27 setpayloadf F
-+GLIBC_2.27 setpayloadf32 F
-+GLIBC_2.27 setpayloadf32x F
-+GLIBC_2.27 setpayloadf64 F
-+GLIBC_2.27 setpayloadl F
-+GLIBC_2.27 setpayloadsig F
-+GLIBC_2.27 setpayloadsigf F
-+GLIBC_2.27 setpayloadsigf32 F
-+GLIBC_2.27 setpayloadsigf32x F
-+GLIBC_2.27 setpayloadsigf64 F
-+GLIBC_2.27 setpayloadsigl F
-+GLIBC_2.27 signgam D 0x4
-+GLIBC_2.27 significand F
-+GLIBC_2.27 significandf F
-+GLIBC_2.27 significandl F
-+GLIBC_2.27 sin F
-+GLIBC_2.27 sincos F
-+GLIBC_2.27 sincosf F
-+GLIBC_2.27 sincosf32 F
-+GLIBC_2.27 sincosf32x F
-+GLIBC_2.27 sincosf64 F
-+GLIBC_2.27 sincosl F
-+GLIBC_2.27 sinf F
-+GLIBC_2.27 sinf32 F
-+GLIBC_2.27 sinf32x F
-+GLIBC_2.27 sinf64 F
-+GLIBC_2.27 sinh F
-+GLIBC_2.27 sinhf F
-+GLIBC_2.27 sinhf32 F
-+GLIBC_2.27 sinhf32x F
-+GLIBC_2.27 sinhf64 F
-+GLIBC_2.27 sinhl F
-+GLIBC_2.27 sinl F
-+GLIBC_2.27 sqrt F
-+GLIBC_2.27 sqrtf F
-+GLIBC_2.27 sqrtf32 F
-+GLIBC_2.27 sqrtf32x F
-+GLIBC_2.27 sqrtf64 F
-+GLIBC_2.27 sqrtl F
-+GLIBC_2.27 tan F
-+GLIBC_2.27 tanf F
-+GLIBC_2.27 tanf32 F
-+GLIBC_2.27 tanf32x F
-+GLIBC_2.27 tanf64 F
-+GLIBC_2.27 tanh F
-+GLIBC_2.27 tanhf F
-+GLIBC_2.27 tanhf32 F
-+GLIBC_2.27 tanhf32x F
-+GLIBC_2.27 tanhf64 F
-+GLIBC_2.27 tanhl F
-+GLIBC_2.27 tanl F
-+GLIBC_2.27 tgamma F
-+GLIBC_2.27 tgammaf F
-+GLIBC_2.27 tgammaf32 F
-+GLIBC_2.27 tgammaf32x F
-+GLIBC_2.27 tgammaf64 F
-+GLIBC_2.27 tgammal F
-+GLIBC_2.27 totalorder F
-+GLIBC_2.27 totalorderf F
-+GLIBC_2.27 totalorderf32 F
-+GLIBC_2.27 totalorderf32x F
-+GLIBC_2.27 totalorderf64 F
-+GLIBC_2.27 totalorderl F
-+GLIBC_2.27 totalordermag F
-+GLIBC_2.27 totalordermagf F
-+GLIBC_2.27 totalordermagf32 F
-+GLIBC_2.27 totalordermagf32x F
-+GLIBC_2.27 totalordermagf64 F
-+GLIBC_2.27 totalordermagl F
-+GLIBC_2.27 trunc F
-+GLIBC_2.27 truncf F
-+GLIBC_2.27 truncf32 F
-+GLIBC_2.27 truncf32x F
-+GLIBC_2.27 truncf64 F
-+GLIBC_2.27 truncl F
-+GLIBC_2.27 ufromfp F
-+GLIBC_2.27 ufromfpf F
-+GLIBC_2.27 ufromfpf32 F
-+GLIBC_2.27 ufromfpf32x F
-+GLIBC_2.27 ufromfpf64 F
-+GLIBC_2.27 ufromfpl F
-+GLIBC_2.27 ufromfpx F
-+GLIBC_2.27 ufromfpxf F
-+GLIBC_2.27 ufromfpxf32 F
-+GLIBC_2.27 ufromfpxf32x F
-+GLIBC_2.27 ufromfpxf64 F
-+GLIBC_2.27 ufromfpxl F
-+GLIBC_2.27 y0 F
-+GLIBC_2.27 y0f F
-+GLIBC_2.27 y0f32 F
-+GLIBC_2.27 y0f32x F
-+GLIBC_2.27 y0f64 F
-+GLIBC_2.27 y0l F
-+GLIBC_2.27 y1 F
-+GLIBC_2.27 y1f F
-+GLIBC_2.27 y1f32 F
-+GLIBC_2.27 y1f32x F
-+GLIBC_2.27 y1f64 F
-+GLIBC_2.27 y1l F
-+GLIBC_2.27 yn F
-+GLIBC_2.27 ynf F
-+GLIBC_2.27 ynf32 F
-+GLIBC_2.27 ynf32x F
-+GLIBC_2.27 ynf64 F
-+GLIBC_2.27 ynl F
-+GLIBC_2.28 daddl F
-+GLIBC_2.28 ddivl F
-+GLIBC_2.28 dmull F
-+GLIBC_2.28 dsubl F
-+GLIBC_2.28 f32addf32x F
-+GLIBC_2.28 f32addf64 F
-+GLIBC_2.28 f32divf32x F
-+GLIBC_2.28 f32divf64 F
-+GLIBC_2.28 f32mulf32x F
-+GLIBC_2.28 f32mulf64 F
-+GLIBC_2.28 f32subf32x F
-+GLIBC_2.28 f32subf64 F
-+GLIBC_2.28 f32xaddf64 F
-+GLIBC_2.28 f32xdivf64 F
-+GLIBC_2.28 f32xmulf64 F
-+GLIBC_2.28 f32xsubf64 F
-+GLIBC_2.28 fadd F
-+GLIBC_2.28 faddl F
-+GLIBC_2.28 fdiv F
-+GLIBC_2.28 fdivl F
-+GLIBC_2.28 fmul F
-+GLIBC_2.28 fmull F
-+GLIBC_2.28 fsub F
-+GLIBC_2.28 fsubl F
-diff --git a/sysdeps/unix/sysv/linux/arc/libnsl.abilist b/sysdeps/unix/sysv/linux/arc/libnsl.abilist
-new file mode 100644
-index 000000000000..0767472d06e6
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/libnsl.abilist
-@@ -0,0 +1,120 @@
-+GLIBC_2.27 __free_fdresult F
-+GLIBC_2.27 __nis_default_access F
-+GLIBC_2.27 __nis_default_group F
-+GLIBC_2.27 __nis_default_owner F
-+GLIBC_2.27 __nis_default_ttl F
-+GLIBC_2.27 __nis_finddirectory F
-+GLIBC_2.27 __nisbind_connect F
-+GLIBC_2.27 __nisbind_create F
-+GLIBC_2.27 __nisbind_destroy F
-+GLIBC_2.27 __nisbind_next F
-+GLIBC_2.27 __yp_check F
-+GLIBC_2.27 nis_add F
-+GLIBC_2.27 nis_add_entry F
-+GLIBC_2.27 nis_addmember F
-+GLIBC_2.27 nis_checkpoint F
-+GLIBC_2.27 nis_clone_directory F
-+GLIBC_2.27 nis_clone_object F
-+GLIBC_2.27 nis_clone_result F
-+GLIBC_2.27 nis_creategroup F
-+GLIBC_2.27 nis_destroy_object F
-+GLIBC_2.27 nis_destroygroup F
-+GLIBC_2.27 nis_dir_cmp F
-+GLIBC_2.27 nis_domain_of F
-+GLIBC_2.27 nis_domain_of_r F
-+GLIBC_2.27 nis_first_entry F
-+GLIBC_2.27 nis_free_directory F
-+GLIBC_2.27 nis_free_object F
-+GLIBC_2.27 nis_free_request F
-+GLIBC_2.27 nis_freenames F
-+GLIBC_2.27 nis_freeresult F
-+GLIBC_2.27 nis_freeservlist F
-+GLIBC_2.27 nis_freetags F
-+GLIBC_2.27 nis_getnames F
-+GLIBC_2.27 nis_getservlist F
-+GLIBC_2.27 nis_ismember F
-+GLIBC_2.27 nis_leaf_of F
-+GLIBC_2.27 nis_leaf_of_r F
-+GLIBC_2.27 nis_lerror F
-+GLIBC_2.27 nis_list F
-+GLIBC_2.27 nis_local_directory F
-+GLIBC_2.27 nis_local_group F
-+GLIBC_2.27 nis_local_host F
-+GLIBC_2.27 nis_local_principal F
-+GLIBC_2.27 nis_lookup F
-+GLIBC_2.27 nis_mkdir F
-+GLIBC_2.27 nis_modify F
-+GLIBC_2.27 nis_modify_entry F
-+GLIBC_2.27 nis_name_of F
-+GLIBC_2.27 nis_name_of_r F
-+GLIBC_2.27 nis_next_entry F
-+GLIBC_2.27 nis_perror F
-+GLIBC_2.27 nis_ping F
-+GLIBC_2.27 nis_print_directory F
-+GLIBC_2.27 nis_print_entry F
-+GLIBC_2.27 nis_print_group F
-+GLIBC_2.27 nis_print_group_entry F
-+GLIBC_2.27 nis_print_link F
-+GLIBC_2.27 nis_print_object F
-+GLIBC_2.27 nis_print_result F
-+GLIBC_2.27 nis_print_rights F
-+GLIBC_2.27 nis_print_table F
-+GLIBC_2.27 nis_read_obj F
-+GLIBC_2.27 nis_remove F
-+GLIBC_2.27 nis_remove_entry F
-+GLIBC_2.27 nis_removemember F
-+GLIBC_2.27 nis_rmdir F
-+GLIBC_2.27 nis_servstate F
-+GLIBC_2.27 nis_sperrno F
-+GLIBC_2.27 nis_sperror F
-+GLIBC_2.27 nis_sperror_r F
-+GLIBC_2.27 nis_stats F
-+GLIBC_2.27 nis_verifygroup F
-+GLIBC_2.27 nis_write_obj F
-+GLIBC_2.27 readColdStartFile F
-+GLIBC_2.27 writeColdStartFile F
-+GLIBC_2.27 xdr_cback_data F
-+GLIBC_2.27 xdr_domainname F
-+GLIBC_2.27 xdr_keydat F
-+GLIBC_2.27 xdr_mapname F
-+GLIBC_2.27 xdr_obj_p F
-+GLIBC_2.27 xdr_peername F
-+GLIBC_2.27 xdr_valdat F
-+GLIBC_2.27 xdr_yp_buf F
-+GLIBC_2.27 xdr_ypall F
-+GLIBC_2.27 xdr_ypbind_binding F
-+GLIBC_2.27 xdr_ypbind_resp F
-+GLIBC_2.27 xdr_ypbind_resptype F
-+GLIBC_2.27 xdr_ypbind_setdom F
-+GLIBC_2.27 xdr_ypdelete_args F
-+GLIBC_2.27 xdr_ypmap_parms F
-+GLIBC_2.27 xdr_ypmaplist F
-+GLIBC_2.27 xdr_yppush_status F
-+GLIBC_2.27 xdr_yppushresp_xfr F
-+GLIBC_2.27 xdr_ypreq_key F
-+GLIBC_2.27 xdr_ypreq_nokey F
-+GLIBC_2.27 xdr_ypreq_xfr F
-+GLIBC_2.27 xdr_ypresp_all F
-+GLIBC_2.27 xdr_ypresp_key_val F
-+GLIBC_2.27 xdr_ypresp_maplist F
-+GLIBC_2.27 xdr_ypresp_master F
-+GLIBC_2.27 xdr_ypresp_order F
-+GLIBC_2.27 xdr_ypresp_val F
-+GLIBC_2.27 xdr_ypresp_xfr F
-+GLIBC_2.27 xdr_ypstat F
-+GLIBC_2.27 xdr_ypupdate_args F
-+GLIBC_2.27 xdr_ypxfrstat F
-+GLIBC_2.27 yp_all F
-+GLIBC_2.27 yp_bind F
-+GLIBC_2.27 yp_first F
-+GLIBC_2.27 yp_get_default_domain F
-+GLIBC_2.27 yp_maplist F
-+GLIBC_2.27 yp_master F
-+GLIBC_2.27 yp_match F
-+GLIBC_2.27 yp_next F
-+GLIBC_2.27 yp_order F
-+GLIBC_2.27 yp_unbind F
-+GLIBC_2.27 yp_update F
-+GLIBC_2.27 ypbinderr_string F
-+GLIBC_2.27 yperr_string F
-+GLIBC_2.27 ypprot_err F
-diff --git a/sysdeps/unix/sysv/linux/arc/libpthread.abilist b/sysdeps/unix/sysv/linux/arc/libpthread.abilist
-new file mode 100644
-index 000000000000..c370fda73db9
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/libpthread.abilist
-@@ -0,0 +1,237 @@
-+GLIBC_2.27 _IO_flockfile F
-+GLIBC_2.27 _IO_ftrylockfile F
-+GLIBC_2.27 _IO_funlockfile F
-+GLIBC_2.27 __close F
-+GLIBC_2.27 __connect F
-+GLIBC_2.27 __errno_location F
-+GLIBC_2.27 __fcntl F
-+GLIBC_2.27 __h_errno_location F
-+GLIBC_2.27 __libc_allocate_rtsig F
-+GLIBC_2.27 __libc_current_sigrtmax F
-+GLIBC_2.27 __libc_current_sigrtmin F
-+GLIBC_2.27 __lseek F
-+GLIBC_2.27 __nanosleep F
-+GLIBC_2.27 __open F
-+GLIBC_2.27 __open64 F
-+GLIBC_2.27 __pread64 F
-+GLIBC_2.27 __pthread_cleanup_routine F
-+GLIBC_2.27 __pthread_getspecific F
-+GLIBC_2.27 __pthread_key_create F
-+GLIBC_2.27 __pthread_mutex_destroy F
-+GLIBC_2.27 __pthread_mutex_init F
-+GLIBC_2.27 __pthread_mutex_lock F
-+GLIBC_2.27 __pthread_mutex_trylock F
-+GLIBC_2.27 __pthread_mutex_unlock F
-+GLIBC_2.27 __pthread_mutexattr_destroy F
-+GLIBC_2.27 __pthread_mutexattr_init F
-+GLIBC_2.27 __pthread_mutexattr_settype F
-+GLIBC_2.27 __pthread_once F
-+GLIBC_2.27 __pthread_register_cancel F
-+GLIBC_2.27 __pthread_register_cancel_defer F
-+GLIBC_2.27 __pthread_rwlock_destroy F
-+GLIBC_2.27 __pthread_rwlock_init F
-+GLIBC_2.27 __pthread_rwlock_rdlock F
-+GLIBC_2.27 __pthread_rwlock_tryrdlock F
-+GLIBC_2.27 __pthread_rwlock_trywrlock F
-+GLIBC_2.27 __pthread_rwlock_unlock F
-+GLIBC_2.27 __pthread_rwlock_wrlock F
-+GLIBC_2.27 __pthread_setspecific F
-+GLIBC_2.27 __pthread_unregister_cancel F
-+GLIBC_2.27 __pthread_unregister_cancel_restore F
-+GLIBC_2.27 __pthread_unwind_next F
-+GLIBC_2.27 __pwrite64 F
-+GLIBC_2.27 __read F
-+GLIBC_2.27 __res_state F
-+GLIBC_2.27 __send F
-+GLIBC_2.27 __sigaction F
-+GLIBC_2.27 __wait F
-+GLIBC_2.27 __write F
-+GLIBC_2.27 _pthread_cleanup_pop F
-+GLIBC_2.27 _pthread_cleanup_pop_restore F
-+GLIBC_2.27 _pthread_cleanup_push F
-+GLIBC_2.27 _pthread_cleanup_push_defer F
-+GLIBC_2.27 accept F
-+GLIBC_2.27 close F
-+GLIBC_2.27 connect F
-+GLIBC_2.27 fcntl F
-+GLIBC_2.27 flockfile F
-+GLIBC_2.27 fsync F
-+GLIBC_2.27 ftrylockfile F
-+GLIBC_2.27 funlockfile F
-+GLIBC_2.27 lseek F
-+GLIBC_2.27 lseek64 F
-+GLIBC_2.27 msync F
-+GLIBC_2.27 nanosleep F
-+GLIBC_2.27 open F
-+GLIBC_2.27 open64 F
-+GLIBC_2.27 pause F
-+GLIBC_2.27 pread F
-+GLIBC_2.27 pread64 F
-+GLIBC_2.27 pthread_attr_destroy F
-+GLIBC_2.27 pthread_attr_getaffinity_np F
-+GLIBC_2.27 pthread_attr_getdetachstate F
-+GLIBC_2.27 pthread_attr_getguardsize F
-+GLIBC_2.27 pthread_attr_getinheritsched F
-+GLIBC_2.27 pthread_attr_getschedparam F
-+GLIBC_2.27 pthread_attr_getschedpolicy F
-+GLIBC_2.27 pthread_attr_getscope F
-+GLIBC_2.27 pthread_attr_getstack F
-+GLIBC_2.27 pthread_attr_getstackaddr F
-+GLIBC_2.27 pthread_attr_getstacksize F
-+GLIBC_2.27 pthread_attr_init F
-+GLIBC_2.27 pthread_attr_setaffinity_np F
-+GLIBC_2.27 pthread_attr_setdetachstate F
-+GLIBC_2.27 pthread_attr_setguardsize F
-+GLIBC_2.27 pthread_attr_setinheritsched F
-+GLIBC_2.27 pthread_attr_setschedparam F
-+GLIBC_2.27 pthread_attr_setschedpolicy F
-+GLIBC_2.27 pthread_attr_setscope F
-+GLIBC_2.27 pthread_attr_setstack F
-+GLIBC_2.27 pthread_attr_setstackaddr F
-+GLIBC_2.27 pthread_attr_setstacksize F
-+GLIBC_2.27 pthread_barrier_destroy F
-+GLIBC_2.27 pthread_barrier_init F
-+GLIBC_2.27 pthread_barrier_wait F
-+GLIBC_2.27 pthread_barrierattr_destroy F
-+GLIBC_2.27 pthread_barrierattr_getpshared F
-+GLIBC_2.27 pthread_barrierattr_init F
-+GLIBC_2.27 pthread_barrierattr_setpshared F
-+GLIBC_2.27 pthread_cancel F
-+GLIBC_2.27 pthread_cond_broadcast F
-+GLIBC_2.27 pthread_cond_destroy F
-+GLIBC_2.27 pthread_cond_init F
-+GLIBC_2.27 pthread_cond_signal F
-+GLIBC_2.27 pthread_cond_timedwait F
-+GLIBC_2.27 pthread_cond_wait F
-+GLIBC_2.27 pthread_condattr_destroy F
-+GLIBC_2.27 pthread_condattr_getclock F
-+GLIBC_2.27 pthread_condattr_getpshared F
-+GLIBC_2.27 pthread_condattr_init F
-+GLIBC_2.27 pthread_condattr_setclock F
-+GLIBC_2.27 pthread_condattr_setpshared F
-+GLIBC_2.27 pthread_create F
-+GLIBC_2.27 pthread_detach F
-+GLIBC_2.27 pthread_equal F
-+GLIBC_2.27 pthread_exit F
-+GLIBC_2.27 pthread_getaffinity_np F
-+GLIBC_2.27 pthread_getattr_default_np F
-+GLIBC_2.27 pthread_getattr_np F
-+GLIBC_2.27 pthread_getconcurrency F
-+GLIBC_2.27 pthread_getcpuclockid F
-+GLIBC_2.27 pthread_getname_np F
-+GLIBC_2.27 pthread_getschedparam F
-+GLIBC_2.27 pthread_getspecific F
-+GLIBC_2.27 pthread_join F
-+GLIBC_2.27 pthread_key_create F
-+GLIBC_2.27 pthread_key_delete F
-+GLIBC_2.27 pthread_kill F
-+GLIBC_2.27 pthread_kill_other_threads_np F
-+GLIBC_2.27 pthread_mutex_consistent F
-+GLIBC_2.27 pthread_mutex_consistent_np F
-+GLIBC_2.27 pthread_mutex_destroy F
-+GLIBC_2.27 pthread_mutex_getprioceiling F
-+GLIBC_2.27 pthread_mutex_init F
-+GLIBC_2.27 pthread_mutex_lock F
-+GLIBC_2.27 pthread_mutex_setprioceiling F
-+GLIBC_2.27 pthread_mutex_timedlock F
-+GLIBC_2.27 pthread_mutex_trylock F
-+GLIBC_2.27 pthread_mutex_unlock F
-+GLIBC_2.27 pthread_mutexattr_destroy F
-+GLIBC_2.27 pthread_mutexattr_getkind_np F
-+GLIBC_2.27 pthread_mutexattr_getprioceiling F
-+GLIBC_2.27 pthread_mutexattr_getprotocol F
-+GLIBC_2.27 pthread_mutexattr_getpshared F
-+GLIBC_2.27 pthread_mutexattr_getrobust F
-+GLIBC_2.27 pthread_mutexattr_getrobust_np F
-+GLIBC_2.27 pthread_mutexattr_gettype F
-+GLIBC_2.27 pthread_mutexattr_init F
-+GLIBC_2.27 pthread_mutexattr_setkind_np F
-+GLIBC_2.27 pthread_mutexattr_setprioceiling F
-+GLIBC_2.27 pthread_mutexattr_setprotocol F
-+GLIBC_2.27 pthread_mutexattr_setpshared F
-+GLIBC_2.27 pthread_mutexattr_setrobust F
-+GLIBC_2.27 pthread_mutexattr_setrobust_np F
-+GLIBC_2.27 pthread_mutexattr_settype F
-+GLIBC_2.27 pthread_once F
-+GLIBC_2.27 pthread_rwlock_destroy F
-+GLIBC_2.27 pthread_rwlock_init F
-+GLIBC_2.27 pthread_rwlock_rdlock F
-+GLIBC_2.27 pthread_rwlock_timedrdlock F
-+GLIBC_2.27 pthread_rwlock_timedwrlock F
-+GLIBC_2.27 pthread_rwlock_tryrdlock F
-+GLIBC_2.27 pthread_rwlock_trywrlock F
-+GLIBC_2.27 pthread_rwlock_unlock F
-+GLIBC_2.27 pthread_rwlock_wrlock F
-+GLIBC_2.27 pthread_rwlockattr_destroy F
-+GLIBC_2.27 pthread_rwlockattr_getkind_np F
-+GLIBC_2.27 pthread_rwlockattr_getpshared F
-+GLIBC_2.27 pthread_rwlockattr_init F
-+GLIBC_2.27 pthread_rwlockattr_setkind_np F
-+GLIBC_2.27 pthread_rwlockattr_setpshared F
-+GLIBC_2.27 pthread_setaffinity_np F
-+GLIBC_2.27 pthread_setattr_default_np F
-+GLIBC_2.27 pthread_setcancelstate F
-+GLIBC_2.27 pthread_setcanceltype F
-+GLIBC_2.27 pthread_setconcurrency F
-+GLIBC_2.27 pthread_setname_np F
-+GLIBC_2.27 pthread_setschedparam F
-+GLIBC_2.27 pthread_setschedprio F
-+GLIBC_2.27 pthread_setspecific F
-+GLIBC_2.27 pthread_sigmask F
-+GLIBC_2.27 pthread_sigqueue F
-+GLIBC_2.27 pthread_spin_destroy F
-+GLIBC_2.27 pthread_spin_init F
-+GLIBC_2.27 pthread_spin_lock F
-+GLIBC_2.27 pthread_spin_trylock F
-+GLIBC_2.27 pthread_spin_unlock F
-+GLIBC_2.27 pthread_testcancel F
-+GLIBC_2.27 pthread_timedjoin_np F
-+GLIBC_2.27 pthread_tryjoin_np F
-+GLIBC_2.27 pthread_yield F
-+GLIBC_2.27 pwrite F
-+GLIBC_2.27 pwrite64 F
-+GLIBC_2.27 raise F
-+GLIBC_2.27 read F
-+GLIBC_2.27 recv F
-+GLIBC_2.27 recvfrom F
-+GLIBC_2.27 recvmsg F
-+GLIBC_2.27 sem_close F
-+GLIBC_2.27 sem_destroy F
-+GLIBC_2.27 sem_getvalue F
-+GLIBC_2.27 sem_init F
-+GLIBC_2.27 sem_open F
-+GLIBC_2.27 sem_post F
-+GLIBC_2.27 sem_timedwait F
-+GLIBC_2.27 sem_trywait F
-+GLIBC_2.27 sem_unlink F
-+GLIBC_2.27 sem_wait F
-+GLIBC_2.27 send F
-+GLIBC_2.27 sendmsg F
-+GLIBC_2.27 sendto F
-+GLIBC_2.27 sigaction F
-+GLIBC_2.27 sigwait F
-+GLIBC_2.27 tcdrain F
-+GLIBC_2.27 wait F
-+GLIBC_2.27 waitpid F
-+GLIBC_2.27 write F
-+GLIBC_2.28 call_once F
-+GLIBC_2.28 cnd_broadcast F
-+GLIBC_2.28 cnd_destroy F
-+GLIBC_2.28 cnd_init F
-+GLIBC_2.28 cnd_signal F
-+GLIBC_2.28 cnd_timedwait F
-+GLIBC_2.28 cnd_wait F
-+GLIBC_2.28 mtx_destroy F
-+GLIBC_2.28 mtx_init F
-+GLIBC_2.28 mtx_lock F
-+GLIBC_2.28 mtx_timedlock F
-+GLIBC_2.28 mtx_trylock F
-+GLIBC_2.28 mtx_unlock F
-+GLIBC_2.28 thrd_create F
-+GLIBC_2.28 thrd_detach F
-+GLIBC_2.28 thrd_exit F
-+GLIBC_2.28 thrd_join F
-+GLIBC_2.28 tss_create F
-+GLIBC_2.28 tss_delete F
-+GLIBC_2.28 tss_get F
-+GLIBC_2.28 tss_set F
-diff --git a/sysdeps/unix/sysv/linux/arc/libresolv.abilist b/sysdeps/unix/sysv/linux/arc/libresolv.abilist
-new file mode 100644
-index 000000000000..69f26d515dd0
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/libresolv.abilist
-@@ -0,0 +1,79 @@
-+GLIBC_2.27 __b64_ntop F
-+GLIBC_2.27 __b64_pton F
-+GLIBC_2.27 __dn_comp F
-+GLIBC_2.27 __dn_count_labels F
-+GLIBC_2.27 __dn_expand F
-+GLIBC_2.27 __dn_skipname F
-+GLIBC_2.27 __fp_nquery F
-+GLIBC_2.27 __fp_query F
-+GLIBC_2.27 __fp_resstat F
-+GLIBC_2.27 __hostalias F
-+GLIBC_2.27 __loc_aton F
-+GLIBC_2.27 __loc_ntoa F
-+GLIBC_2.27 __p_cdname F
-+GLIBC_2.27 __p_cdnname F
-+GLIBC_2.27 __p_class F
-+GLIBC_2.27 __p_class_syms D 0x54
-+GLIBC_2.27 __p_fqname F
-+GLIBC_2.27 __p_fqnname F
-+GLIBC_2.27 __p_option F
-+GLIBC_2.27 __p_query F
-+GLIBC_2.27 __p_rcode F
-+GLIBC_2.27 __p_time F
-+GLIBC_2.27 __p_type F
-+GLIBC_2.27 __p_type_syms D 0x228
-+GLIBC_2.27 __putlong F
-+GLIBC_2.27 __putshort F
-+GLIBC_2.27 __res_close F
-+GLIBC_2.27 __res_dnok F
-+GLIBC_2.27 __res_hnok F
-+GLIBC_2.27 __res_hostalias F
-+GLIBC_2.27 __res_isourserver F
-+GLIBC_2.27 __res_mailok F
-+GLIBC_2.27 __res_mkquery F
-+GLIBC_2.27 __res_nameinquery F
-+GLIBC_2.27 __res_nmkquery F
-+GLIBC_2.27 __res_nquery F
-+GLIBC_2.27 __res_nquerydomain F
-+GLIBC_2.27 __res_nsearch F
-+GLIBC_2.27 __res_nsend F
-+GLIBC_2.27 __res_ownok F
-+GLIBC_2.27 __res_queriesmatch F
-+GLIBC_2.27 __res_query F
-+GLIBC_2.27 __res_querydomain F
-+GLIBC_2.27 __res_search F
-+GLIBC_2.27 __res_send F
-+GLIBC_2.27 __sym_ntop F
-+GLIBC_2.27 __sym_ntos F
-+GLIBC_2.27 __sym_ston F
-+GLIBC_2.27 _getlong F
-+GLIBC_2.27 _getshort F
-+GLIBC_2.27 inet_net_ntop F
-+GLIBC_2.27 inet_net_pton F
-+GLIBC_2.27 inet_neta F
-+GLIBC_2.27 ns_datetosecs F
-+GLIBC_2.27 ns_format_ttl F
-+GLIBC_2.27 ns_get16 F
-+GLIBC_2.27 ns_get32 F
-+GLIBC_2.27 ns_initparse F
-+GLIBC_2.27 ns_makecanon F
-+GLIBC_2.27 ns_msg_getflag F
-+GLIBC_2.27 ns_name_compress F
-+GLIBC_2.27 ns_name_ntol F
-+GLIBC_2.27 ns_name_ntop F
-+GLIBC_2.27 ns_name_pack F
-+GLIBC_2.27 ns_name_pton F
-+GLIBC_2.27 ns_name_rollback F
-+GLIBC_2.27 ns_name_skip F
-+GLIBC_2.27 ns_name_uncompress F
-+GLIBC_2.27 ns_name_unpack F
-+GLIBC_2.27 ns_parse_ttl F
-+GLIBC_2.27 ns_parserr F
-+GLIBC_2.27 ns_put16 F
-+GLIBC_2.27 ns_put32 F
-+GLIBC_2.27 ns_samedomain F
-+GLIBC_2.27 ns_samename F
-+GLIBC_2.27 ns_skiprr F
-+GLIBC_2.27 ns_sprintrr F
-+GLIBC_2.27 ns_sprintrrf F
-+GLIBC_2.27 ns_subdomain F
-diff --git a/sysdeps/unix/sysv/linux/arc/librt.abilist b/sysdeps/unix/sysv/linux/arc/librt.abilist
-new file mode 100644
-index 000000000000..bfd262ecc57c
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/librt.abilist
-@@ -0,0 +1,35 @@
-+GLIBC_2.27 __mq_open_2 F
-+GLIBC_2.27 aio_cancel F
-+GLIBC_2.27 aio_cancel64 F
-+GLIBC_2.27 aio_error F
-+GLIBC_2.27 aio_error64 F
-+GLIBC_2.27 aio_fsync F
-+GLIBC_2.27 aio_fsync64 F
-+GLIBC_2.27 aio_init F
-+GLIBC_2.27 aio_read F
-+GLIBC_2.27 aio_read64 F
-+GLIBC_2.27 aio_return F
-+GLIBC_2.27 aio_return64 F
-+GLIBC_2.27 aio_suspend F
-+GLIBC_2.27 aio_suspend64 F
-+GLIBC_2.27 aio_write F
-+GLIBC_2.27 aio_write64 F
-+GLIBC_2.27 lio_listio F
-+GLIBC_2.27 lio_listio64 F
-+GLIBC_2.27 mq_close F
-+GLIBC_2.27 mq_getattr F
-+GLIBC_2.27 mq_notify F
-+GLIBC_2.27 mq_open F
-+GLIBC_2.27 mq_receive F
-+GLIBC_2.27 mq_send F
-+GLIBC_2.27 mq_setattr F
-+GLIBC_2.27 mq_timedreceive F
-+GLIBC_2.27 mq_timedsend F
-+GLIBC_2.27 mq_unlink F
-+GLIBC_2.27 shm_open F
-+GLIBC_2.27 shm_unlink F
-+GLIBC_2.27 timer_create F
-+GLIBC_2.27 timer_delete F
-+GLIBC_2.27 timer_getoverrun F
-+GLIBC_2.27 timer_gettime F
-+GLIBC_2.27 timer_settime F
-diff --git a/sysdeps/unix/sysv/linux/arc/libthread_db.abilist b/sysdeps/unix/sysv/linux/arc/libthread_db.abilist
-new file mode 100644
-index 000000000000..4122e563a1d3
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/libthread_db.abilist
-@@ -0,0 +1,40 @@
-+GLIBC_2.27 td_init F
-+GLIBC_2.27 td_log F
-+GLIBC_2.27 td_symbol_list F
-+GLIBC_2.27 td_ta_clear_event F
-+GLIBC_2.27 td_ta_delete F
-+GLIBC_2.27 td_ta_enable_stats F
-+GLIBC_2.27 td_ta_event_addr F
-+GLIBC_2.27 td_ta_event_getmsg F
-+GLIBC_2.27 td_ta_get_nthreads F
-+GLIBC_2.27 td_ta_get_ph F
-+GLIBC_2.27 td_ta_get_stats F
-+GLIBC_2.27 td_ta_map_id2thr F
-+GLIBC_2.27 td_ta_map_lwp2thr F
-+GLIBC_2.27 td_ta_new F
-+GLIBC_2.27 td_ta_reset_stats F
-+GLIBC_2.27 td_ta_set_event F
-+GLIBC_2.27 td_ta_setconcurrency F
-+GLIBC_2.27 td_ta_thr_iter F
-+GLIBC_2.27 td_ta_tsd_iter F
-+GLIBC_2.27 td_thr_clear_event F
-+GLIBC_2.27 td_thr_dbresume F
-+GLIBC_2.27 td_thr_dbsuspend F
-+GLIBC_2.27 td_thr_event_enable F
-+GLIBC_2.27 td_thr_event_getmsg F
-+GLIBC_2.27 td_thr_get_info F
-+GLIBC_2.27 td_thr_getfpregs F
-+GLIBC_2.27 td_thr_getgregs F
-+GLIBC_2.27 td_thr_getxregs F
-+GLIBC_2.27 td_thr_getxregsize F
-+GLIBC_2.27 td_thr_set_event F
-+GLIBC_2.27 td_thr_setfpregs F
-+GLIBC_2.27 td_thr_setgregs F
-+GLIBC_2.27 td_thr_setprio F
-+GLIBC_2.27 td_thr_setsigpending F
-+GLIBC_2.27 td_thr_setxregs F
-+GLIBC_2.27 td_thr_sigsetmask F
-+GLIBC_2.27 td_thr_tls_get_addr F
-+GLIBC_2.27 td_thr_tlsbase F
-+GLIBC_2.27 td_thr_tsd F
-+GLIBC_2.27 td_thr_validate F
-diff --git a/sysdeps/unix/sysv/linux/arc/libutil.abilist b/sysdeps/unix/sysv/linux/arc/libutil.abilist
-new file mode 100644
-index 000000000000..cbfec8d46e60
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/libutil.abilist
-@@ -0,0 +1,6 @@
-+GLIBC_2.27 forkpty F
-+GLIBC_2.27 login F
-+GLIBC_2.27 login_tty F
-+GLIBC_2.27 logout F
-+GLIBC_2.27 logwtmp F
-+GLIBC_2.27 openpty F
-diff --git a/sysdeps/unix/sysv/linux/arc/localplt.data b/sysdeps/unix/sysv/linux/arc/localplt.data
-new file mode 100644
-index 000000000000..815f218daa67
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/localplt.data
-@@ -0,0 +1,15 @@
-+libc.so: realloc
-+libc.so: malloc
-+libc.so: memalign
-+libc.so: calloc
-+libc.so: free
-+libc.so: memcpy
-+ld.so: malloc
-+ld.so: calloc
-+ld.so: realloc
-+ld.so: free
-+# The TLS-enabled version of these functions is interposed from libc.so.
-+ld.so: _dl_signal_error
-+ld.so: _dl_catch_error
-+ld.so: _dl_signal_exception
-+ld.so: _dl_catch_exception
-diff --git a/sysdeps/unix/sysv/linux/arc/makecontext.c b/sysdeps/unix/sysv/linux/arc/makecontext.c
-new file mode 100644
-index 000000000000..8d233f83da7e
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/makecontext.c
-@@ -0,0 +1,75 @@
-+/* Create new context for ARC
-+ Copyright (C) 2015-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include <sysdep.h>
-+#include <stdarg.h>
-+#include <stdint.h>
-+#include <sys/ucontext.h>
-+
-+void
-+__makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
-+{
-+ extern void __startcontext (void) attribute_hidden;
-+ unsigned long sp, *r;
-+ va_list vl;
-+ int i, reg_args, stack_args;
-+
-+ sp = ((unsigned long) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size) & ~7;
-+
-+ ucp->uc_mcontext.scratch.sp = sp;
-+ ucp->uc_mcontext.scratch.fp = 0;
-+
-+ /* __startcontext is sort of trampoline to invoke @func
-+ * From setcontext() pov, the resume address is __startcontext,
-+ * set it up in BLINK place holder*/
-+ ucp->uc_mcontext.scratch.blink = (unsigned long) &__startcontext;
-+
-+ /* __startcontext passed 2 types of args
-+ * - args to @func setup in canonical r0-r7
-+ * - @func itself in r9, and next function in r10
-+ */
-+ ucp->uc_mcontext.callee.r13 = (unsigned long) func;
-+ ucp->uc_mcontext.callee.r14 = (unsigned long) ucp->uc_link;
-+ ucp->uc_mcontext.callee.r15 = 0;
-+
-+ r = &ucp->uc_mcontext.scratch.r0;
-+
-+ va_start (vl, argc);
-+
-+ reg_args = argc > 8 ? 8 : argc;
-+ for (i = 0; i < reg_args; i++) {
-+ *r-- = va_arg(vl, unsigned long);
-+ }
-+
-+ stack_args = argc - reg_args;
-+
-+ if (__glibc_unlikely(stack_args > 0)) {
-+
-+ sp -= stack_args * sizeof (unsigned long);
-+ ucp->uc_mcontext.scratch.sp = sp;
-+ r = (unsigned long *)sp;
-+
-+ for (i = 0; i < stack_args; i++) {
-+ *r++ = va_arg(vl, unsigned long);
-+ }
-+ }
-+
-+ va_end (vl);
-+}
-+
-+weak_alias (__makecontext, makecontext)
-diff --git a/sysdeps/unix/sysv/linux/arc/mmap_internal.h b/sysdeps/unix/sysv/linux/arc/mmap_internal.h
-new file mode 100644
-index 000000000000..3c8c55d57d0e
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/mmap_internal.h
-@@ -0,0 +1,26 @@
-+/* mmap - map files or devices into memory. Linux/ARC version.
-+ Copyright (C) 2017-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#ifndef MMAP_ARC_INTERNAL_H
-+#define MMAP_ARC_INTERNAL_H
-+
-+#define MMAP2_PAGE_UNIT 8192ULL /* 8K page is default for ARC */
-+
-+#include_next <mmap_internal.h>
-+
-+#endif
-diff --git a/sysdeps/unix/sysv/linux/arc/profil-counter.h b/sysdeps/unix/sysv/linux/arc/profil-counter.h
-new file mode 100644
-index 000000000000..8a6a0bcf3d59
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/profil-counter.h
-@@ -0,0 +1,2 @@
-+/* We can use the ix86 version. */
-+#include <sysdeps/unix/sysv/linux/i386/profil-counter.h>
-diff --git a/sysdeps/unix/sysv/linux/arc/pt-vfork.S b/sysdeps/unix/sysv/linux/arc/pt-vfork.S
-new file mode 100644
-index 000000000000..65cc3823ac87
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/pt-vfork.S
-@@ -0,0 +1 @@
-+#include <sysdeps/unix/sysv/linux/alpha/pt-vfork.S>
-diff --git a/sysdeps/unix/sysv/linux/arc/setcontext.S b/sysdeps/unix/sysv/linux/arc/setcontext.S
-new file mode 100644
-index 000000000000..6ec2ec0ddc79
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/setcontext.S
-@@ -0,0 +1,95 @@
-+/* Set current context for ARC
-+ Copyright (C) 2009-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include "ucontext-macros.h"
-+
-+/*
-+ int setcontext (const ucontext_t *ucp)
-+ - Restores the machine context in @ucp and resumes execution
-+ (doesn't return to caller)
-+*/
-+
-+ENTRY(__setcontext)
-+
-+ mov r9, r0 /* stash @ucp across syscall */
-+
-+ /* rt_sigprocmask (SIG_SETMASK, &ucp->uc_sigmask, NULL, _NSIG8) */
-+ mov r3, _NSIG8
-+ mov r2, 0
-+ add r1, r0, UCONTEXT_SIGMASK
-+ mov r0, SIG_SETMASK
-+ mov r8, __NR_rt_sigprocmask
-+ ARC_TRAP_INSN
-+ brhi r0, -1024, .Lcall_syscall_err
-+
-+ /* restore scratch/arg regs for makecontext() case */
-+ LOAD_REG(r0, r9, 22)
-+ LOAD_REG(r1, r9, 21)
-+ LOAD_REG(r2, r9, 20)
-+ LOAD_REG(r3, r9, 19)
-+ LOAD_REG(r4, r9, 18)
-+ LOAD_REG(r5, r9, 17)
-+ LOAD_REG(r6, r9, 16)
-+ LOAD_REG(r7, r9, 15)
-+
-+ /* restore callee saved registers */
-+ LOAD_REG(r13, r9, 37)
-+ LOAD_REG(r14, r9, 36)
-+ LOAD_REG(r15, r9, 35)
-+ LOAD_REG(r16, r9, 34)
-+ LOAD_REG(r17, r9, 33)
-+ LOAD_REG(r18, r9, 32)
-+ LOAD_REG(r19, r9, 31)
-+ LOAD_REG(r20, r9, 30)
-+ LOAD_REG(r21, r9, 29)
-+ LOAD_REG(r22, r9, 28)
-+ LOAD_REG(r23, r9, 27)
-+ LOAD_REG(r24, r9, 26)
-+ LOAD_REG(r25, r9, 25)
-+
-+ LOAD_REG(blink, r9, 7)
-+ LOAD_REG(fp, r9, 8)
-+ LOAD_REG(sp, r9, 23)
-+
-+ j [blink]
-+
-+PSEUDO_END(__setcontext)
-+weak_alias(__setcontext, setcontext)
-+
-+
-+/*
-+ Helper for activating makecontext() created context
-+ - r13 has @func, r14 has uc_link
-+*/
-+
-+ENTRY(__startcontext)
-+
-+ cfi_register (blink, r15)
-+
-+ /* call user @func, loaded in r13 by setcontext() */
-+ jl [r13]
-+
-+ /* if uc_link (r14) call setcontext with that */
-+ mov r0, r14
-+ breq r0, 0, 1f
-+
-+ bl __setcontext
-+1:
-+ /* exit with status 0 */
-+ b HIDDEN_JUMPTARGET(exit)
-+END(__startcontext)
-diff --git a/sysdeps/unix/sysv/linux/arc/shlib-versions b/sysdeps/unix/sysv/linux/arc/shlib-versions
-new file mode 100644
-index 000000000000..fdfe223b4371
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/shlib-versions
-@@ -0,0 +1,2 @@
-+DEFAULT GLIBC_2.27
-+ld=ld-linux-arc.so.2
-diff --git a/sysdeps/unix/sysv/linux/arc/sigaction.c b/sysdeps/unix/sysv/linux/arc/sigaction.c
-new file mode 100644
-index 000000000000..b437af677d58
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/sigaction.c
-@@ -0,0 +1,63 @@
-+/* ARC specific sigaction and signal restorer
-+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include <sysdep.h>
-+#include <errno.h>
-+#include <signal.h>
-+#include <string.h>
-+#include <sys/syscall.h>
-+
-+extern void __default_rt_sa_restorer(void);
-+
-+#define SA_RESTORER 0x04000000
-+
-+/* If @act is not NULL, change the action for @sig to @act.
-+ If @oact is not NULL, put the old action for @sig in @oact. */
-+int
-+__libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
-+{
-+ struct sigaction kact;
-+ const struct sigaction *arg;
-+
-+ /*
-+ * SA_RESTORER is only relevant for act != NULL case
-+ * (!act means caller only wants to know @oact)
-+ */
-+ if (act && !(act->sa_flags & SA_RESTORER)) {
-+ kact.sa_restorer = __default_rt_sa_restorer;
-+ kact.sa_flags = act->sa_flags | SA_RESTORER;
-+
-+ kact.sa_handler = act->sa_handler;
-+ kact.sa_mask = act->sa_mask;
-+
-+ arg = &kact;
-+ } else {
-+ arg = act;
-+ }
-+
-+ /*
-+ * syscall also expects sizeof(sa_mask) and asm-generic kernel syscall
-+ * ABI mandates it be 2 words (8 bytes below) although glibc defines
-+ * sigset_to be much larger (1024 / 32 == 64 bytes)
-+ */
-+ return INLINE_SYSCALL(rt_sigaction, 4, sig, arg, oact, _NSIG / 8);
-+}
-+
-+libc_hidden_def (__libc_sigaction)
-+
-+#include <nptl/sigaction.c>
-diff --git a/sysdeps/unix/sysv/linux/arc/sigcontextinfo.h b/sysdeps/unix/sysv/linux/arc/sigcontextinfo.h
-new file mode 100644
-index 000000000000..852bbd96d47f
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/sigcontextinfo.h
-@@ -0,0 +1,23 @@
-+/* ARC definitions for signal handling calling conventions.
-+ Copyright (C) 2017-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include <sys/ucontext.h>
-+#include "kernel-features.h"
-+
-+#define SIGCONTEXT int _code, struct ucontext_t *
-+#define GET_PC(ctx) ((void *) (ctx)->uc_mcontext.scratch.ret)
-diff --git a/sysdeps/unix/sysv/linux/arc/sigrestorer.S b/sysdeps/unix/sysv/linux/arc/sigrestorer.S
-new file mode 100644
-index 000000000000..d74cf0ec00e3
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/sigrestorer.S
-@@ -0,0 +1,28 @@
-+/* Default sigreturn stub for ARC Linux.
-+ Copyright (C) 2005-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include <sys/syscall.h>
-+#include <sysdep.h>
-+#include <tcb-offsets.h>
-+
-+ nop
-+ENTRY(__default_rt_sa_restorer)
-+ mov r8, __NR_rt_sigreturn
-+ ARC_TRAP_INSN
-+ j_s [blink]
-+PSEUDO_END_NOERRNO(__default_rt_sa_restorer)
-diff --git a/sysdeps/unix/sysv/linux/arc/swapcontext.S b/sysdeps/unix/sysv/linux/arc/swapcontext.S
-new file mode 100644
-index 000000000000..ad6bf70ab5e2
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/swapcontext.S
-@@ -0,0 +1,92 @@
-+/* Save and set current context for ARC
-+ Copyright (C) 2009-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include "ucontext-macros.h"
-+
-+/* int swapcontext (ucontext_t *oucp, const ucontext_t *ucp) */
-+
-+ENTRY(__swapcontext)
-+
-+ /* save context into @oucp pointed to by r0 */
-+
-+ SAVE_REG(r13, r0, 37)
-+ SAVE_REG(r14, r0, 36)
-+ SAVE_REG(r15, r0, 35)
-+ SAVE_REG(r16, r0, 34)
-+ SAVE_REG(r17, r0, 33)
-+ SAVE_REG(r18, r0, 32)
-+ SAVE_REG(r19, r0, 31)
-+ SAVE_REG(r20, r0, 30)
-+ SAVE_REG(r21, r0, 29)
-+ SAVE_REG(r22, r0, 28)
-+ SAVE_REG(r23, r0, 27)
-+ SAVE_REG(r24, r0, 26)
-+ SAVE_REG(r25, r0, 25)
-+
-+ SAVE_REG(blink, r0, 7)
-+ SAVE_REG(fp, r0, 8)
-+ SAVE_REG(sp, r0, 23)
-+
-+ /* save 0 in r0 placeholder to return 0 when @oucp activated */
-+ mov r9, 0
-+ SAVE_REG(r9, r0, 22)
-+
-+ /* load context from @ucp */
-+
-+ mov r9, r1 ; safekeep @ucp across syscall
-+
-+ /* rt_sigprocmask (SIG_SETMASK, &ucp->uc_sigmask, &oucp->uc_sigmask, _NSIG8) */
-+ mov r3, _NSIG8
-+ add r2, r0, UCONTEXT_SIGMASK
-+ add r1, r1, UCONTEXT_SIGMASK
-+ mov r0, SIG_SETMASK
-+ mov r8, __NR_rt_sigprocmask
-+ ARC_TRAP_INSN
-+ brhi r0, -1024, .Lcall_syscall_err
-+
-+ LOAD_REG(r0, r9, 22)
-+ LOAD_REG(r1, r9, 21)
-+ LOAD_REG(r2, r9, 20)
-+ LOAD_REG(r3, r9, 19)
-+ LOAD_REG(r4, r9, 18)
-+ LOAD_REG(r5, r9, 17)
-+ LOAD_REG(r6, r9, 16)
-+ LOAD_REG(r7, r9, 15)
-+
-+ LOAD_REG(r13, r9, 37)
-+ LOAD_REG(r14, r9, 36)
-+ LOAD_REG(r15, r9, 35)
-+ LOAD_REG(r16, r9, 34)
-+ LOAD_REG(r17, r9, 33)
-+ LOAD_REG(r18, r9, 32)
-+ LOAD_REG(r19, r9, 31)
-+ LOAD_REG(r20, r9, 30)
-+ LOAD_REG(r21, r9, 29)
-+ LOAD_REG(r22, r9, 28)
-+ LOAD_REG(r23, r9, 27)
-+ LOAD_REG(r24, r9, 26)
-+ LOAD_REG(r25, r9, 25)
-+
-+ LOAD_REG(blink, r9, 7)
-+ LOAD_REG(fp, r9, 8)
-+ LOAD_REG(sp, r9, 23)
-+
-+ j [blink]
-+
-+PSEUDO_END(__swapcontext)
-+weak_alias(__swapcontext, swapcontext)
-diff --git a/sysdeps/unix/sysv/linux/arc/sys/cachectl.h b/sysdeps/unix/sysv/linux/arc/sys/cachectl.h
-new file mode 100644
-index 000000000000..c2ba820e50b7
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/sys/cachectl.h
-@@ -0,0 +1,36 @@
-+/* cacheflush - flush contents of instruction and/or data cache.
-+ Copyright (C) 2017-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#ifndef _SYS_CACHECTL_H
-+#define _SYS_CACHECTL_H 1
-+
-+#include <features.h>
-+
-+/* Get the kernel definition for the op bits. */
-+#include <asm/cachectl.h>
-+
-+__BEGIN_DECLS
-+
-+#ifdef __USE_MISC
-+extern int cacheflush (void *__addr, const int __nbytes, const int __op) __THROW;
-+#endif
-+extern int _flush_cache (char *__addr, const int __nbytes, const int __op) __THROW;
-+
-+__END_DECLS
-+
-+#endif /* sys/cachectl.h */
-diff --git a/sysdeps/unix/sysv/linux/arc/sys/procfs.h b/sysdeps/unix/sysv/linux/arc/sys/procfs.h
-new file mode 100644
-index 000000000000..3c1689bc4b91
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/sys/procfs.h
-@@ -0,0 +1,123 @@
-+/* Core image file related definitions, ARC version.
-+ Copyright (C) 1996-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#ifndef _SYS_PROCFS_H
-+#define _SYS_PROCFS_H 1
-+
-+/* This is somewhat modelled after the file of the same name on SVR4
-+ systems. It provides a definition of the core file format for ELF
-+ used on Linux. It doesn't have anything to do with the /proc file
-+ system, even though Linux has one.
-+
-+ Anyway, the whole purpose of this file is for GDB and GDB only.
-+ Don't read too much into it. Don't use it for anything other than
-+ GDB unless you know what you are doing. */
-+
-+#include <features.h>
-+#include <sys/time.h>
-+#include <sys/types.h>
-+#include <sys/user.h>
-+
-+__BEGIN_DECLS
-+
-+/* Type for a general-purpose register. */
-+typedef unsigned long elf_greg_t;
-+
-+/* And the whole bunch of them. We could have used `struct
-+ user_regs' directly in the typedef, but tradition says that
-+ the register set is an array, which does have some peculiar
-+ semantics, so leave it that way. */
-+#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
-+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
-+
-+/* Register set for the floating-point registers. */
-+typedef struct { } elf_fpregset_t;
-+
-+/* Signal info. */
-+struct elf_siginfo
-+ {
-+ int si_signo; /* Signal number. */
-+ int si_code; /* Extra code. */
-+ int si_errno; /* Errno. */
-+ };
-+
-+/* Definitions to generate Intel SVR4-like core files. These mostly
-+ have the same names as the SVR4 types with "elf_" tacked on the
-+ front to prevent clashes with Linux definitions, and the typedef
-+ forms have been avoided. This is mostly like the SVR4 structure,
-+ but more Linuxy, with things that Linux does not support and which
-+ GDB doesn't really use excluded. */
-+
-+struct elf_prstatus
-+ {
-+ struct elf_siginfo pr_info; /* Info associated with signal. */
-+ short int pr_cursig; /* Current signal. */
-+ unsigned long int pr_sigpend; /* Set of pending signals. */
-+ unsigned long int pr_sighold; /* Set of held signals. */
-+ __pid_t pr_pid;
-+ __pid_t pr_ppid;
-+ __pid_t pr_pgrp;
-+ __pid_t pr_sid;
-+ struct timeval pr_utime; /* User time. */
-+ struct timeval pr_stime; /* System time. */
-+ struct timeval pr_cutime; /* Cumulative user time. */
-+ struct timeval pr_cstime; /* Cumulative system time. */
-+ elf_gregset_t pr_reg; /* GP registers. */
-+ int pr_fpvalid; /* True if math copro being used. */
-+ };
-+
-+
-+#define ELF_PRARGSZ (80) /* Number of chars for args. */
-+
-+struct elf_prpsinfo
-+ {
-+ char pr_state; /* Numeric process state. */
-+ char pr_sname; /* Char for pr_state. */
-+ char pr_zomb; /* Zombie. */
-+ char pr_nice; /* Nice val. */
-+ unsigned long int pr_flag; /* Flags. */
-+ unsigned short int pr_uid;
-+ unsigned short int pr_gid;
-+ int pr_pid, pr_ppid, pr_pgrp, pr_sid;
-+ /* Lots missing */
-+ char pr_fname[16]; /* Filename of executable. */
-+ char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
-+ };
-+
-+/* The rest of this file provides the types for emulation of the
-+ Solaris <proc_service.h> interfaces that should be implemented by
-+ users of libthread_db. */
-+
-+/* Addresses. */
-+typedef void *psaddr_t;
-+
-+/* Register sets. Linux has different names. */
-+typedef elf_gregset_t prgregset_t;
-+typedef elf_fpregset_t prfpregset_t;
-+
-+/* We don't have any differences between processes and threads,
-+ therefore have only one PID type. */
-+typedef __pid_t lwpid_t;
-+
-+/* Process status and info. In the end we do provide typedefs for them. */
-+typedef struct elf_prstatus prstatus_t;
-+typedef struct elf_prpsinfo prpsinfo_t;
-+
-+__END_DECLS
-+
-+#endif /* sys/procfs.h */
-diff --git a/sysdeps/unix/sysv/linux/arc/sys/ucontext.h b/sysdeps/unix/sysv/linux/arc/sys/ucontext.h
-new file mode 100644
-index 000000000000..e91abc3d9fba
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/sys/ucontext.h
-@@ -0,0 +1,71 @@
-+/* struct ucontext definition, ARC version.
-+ Copyright (C) 2017-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+/* System V/ARC ABI compliant context switching support. */
-+
-+#ifndef _SYS_UCONTEXT_H
-+#define _SYS_UCONTEXT_H 1
-+
-+#include <features.h>
-+
-+#include <bits/types/sigset_t.h>
-+#include <bits/types/stack_t.h>
-+
-+#ifdef __USE_MISC
-+# define __ctx(fld) fld
-+#else
-+# define __ctx(fld) __ ## fld
-+#endif
-+
-+typedef struct
-+ {
-+ unsigned long __ctx(pad);
-+ struct {
-+ unsigned long __ctx(bta);
-+ unsigned long __ctx(lp_start), __ctx(lp_end), __ctx(lp_count);
-+ unsigned long __ctx(status32), __ctx(ret), __ctx(blink);
-+ unsigned long __ctx(fp), __ctx(gp);
-+ unsigned long __ctx(r12), __ctx(r11), __ctx(r10), __ctx(r9), __ctx(r8);
-+ unsigned long __ctx(r7), __ctx(r6), __ctx(r5), __ctx(r4), __ctx(r3);
-+ unsigned long __ctx(r2), __ctx(r1), __ctx(r0);
-+ unsigned long __ctx(sp);
-+ } __ctx(scratch);
-+ unsigned long __ctx(pad2);
-+ struct {
-+ unsigned long __ctx(r25), __ctx(r24), __ctx(r23), __ctx(r22), __ctx(r21);
-+ unsigned long __ctx(r20), __ctx(r19), __ctx(r18), __ctx(r17), __ctx(r16);
-+ unsigned long __ctx(r15), __ctx(r14), __ctx(r13);
-+ } __ctx(callee);
-+ unsigned long __ctx(efa);
-+ unsigned long __ctx(stop_pc);
-+ unsigned long __ctx(r30), __ctx(r58), __ctx(r59);
-+ } mcontext_t;
-+
-+/* Userlevel context. */
-+typedef struct ucontext_t
-+ {
-+ unsigned long __ctx(uc_flags);
-+ struct ucontext_t *uc_link;
-+ stack_t uc_stack;
-+ mcontext_t uc_mcontext;
-+ sigset_t uc_sigmask;
-+ } ucontext_t;
-+
-+#undef __ctx
-+
-+#endif /* sys/ucontext.h */
-diff --git a/sysdeps/unix/sysv/linux/arc/sys/user.h b/sysdeps/unix/sysv/linux/arc/sys/user.h
-new file mode 100644
-index 000000000000..1f7129799bf6
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/sys/user.h
-@@ -0,0 +1,32 @@
-+/* ptrace register data format definitions.
-+ Copyright (C) 1998-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#ifndef _SYS_USER_H
-+#define _SYS_USER_H 1
-+
-+/* struct user_regs_struct is exported by kernel header
-+ * However apps like strace also expect a struct user, so it's better to
-+ * have a dummy implementation
-+ */
-+#include <asm/ptrace.h>
-+
-+struct user {
-+ int dummy;
-+};
-+
-+#endif /* sys/user.h */
-diff --git a/sysdeps/unix/sysv/linux/arc/syscall.S b/sysdeps/unix/sysv/linux/arc/syscall.S
-new file mode 100644
-index 000000000000..8f76fa43e95f
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/syscall.S
-@@ -0,0 +1,38 @@
-+/* syscall - indirect system call.
-+ Copyright (C) 2017-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include <sysdep.h>
-+
-+ENTRY (syscall)
-+ mov_s r8, r0
-+ mov_s r0, r1
-+ mov_s r1, r2
-+ mov_s r2, r3
-+ mov_s r3, r4
-+#ifdef __ARC700__
-+ mov r4, r5
-+ mov r5, r6
-+#else
-+ mov_s r4, r5
-+ mov_s r5, r6
-+#endif
-+
-+ ARC_TRAP_INSN
-+ brhi r0, -1024, .Lcall_syscall_err
-+ j [blink]
-+PSEUDO_END (syscall)
-diff --git a/sysdeps/unix/sysv/linux/arc/sysdep.c b/sysdeps/unix/sysv/linux/arc/sysdep.c
-new file mode 100644
-index 000000000000..d9bcc305b846
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/sysdep.c
-@@ -0,0 +1,33 @@
-+/* ARC wrapper for setting errno
-+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include <sysdep.h>
-+#include <errno.h>
-+
-+/* All syscall handler come here to avoid generated code bloat due to
-+ * GOT reference to errno_location or it's equivalent
-+ */
-+int __syscall_error(int err_no)
-+{
-+ __set_errno(-err_no);
-+ return -1;
-+}
-+
-+#if IS_IN (libc)
-+hidden_def (__syscall_error)
-+#endif
-diff --git a/sysdeps/unix/sysv/linux/arc/sysdep.h b/sysdeps/unix/sysv/linux/arc/sysdep.h
-new file mode 100644
-index 000000000000..9ed06a3206b0
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/sysdep.h
-@@ -0,0 +1,260 @@
-+/* Assembler macros for ARC.
-+ Copyright (C) 2000-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#ifndef _LINUX_ARC_SYSDEP_H
-+#define _LINUX_ARC_SYSDEP_H 1
-+
-+#include <asm/unistd.h>
-+#include <sysdeps/arc/sysdep.h>
-+#include <sysdeps/unix/sysv/linux/generic/sysdep.h>
-+
-+/* For RTLD_PRIVATE_ERRNO. */
-+#include <dl-sysdep.h>
-+
-+#include <tls.h>
-+
-+#undef SYS_ify
-+#define SYS_ify(syscall_name) __NR_##syscall_name
-+
-+#ifdef __ASSEMBLER__
-+
-+/* This is a "normal" system call stub: if there is an error,
-+ it returns -1 and sets errno. */
-+
-+# undef PSEUDO
-+# define PSEUDO(name, syscall_name, args) \
-+ PSEUDO_NOERRNO(name, syscall_name, args) ASM_LINE_SEP \
-+ brhi r0, -1024, .Lcall_syscall_err ASM_LINE_SEP
-+
-+#define ret j [blink]
-+
-+# undef PSEUDO_END
-+# define PSEUDO_END(name) \
-+ SYSCALL_ERROR_HANDLER ASM_LINE_SEP \
-+ END (name)
-+
-+/* --------- helper for SYSCALL_NOERRNO ----------- */
-+
-+/* This kind of system call stub never returns an error.
-+ We return the return value register to the caller unexamined. */
-+
-+# undef PSEUDO_NOERRNO
-+# define PSEUDO_NOERRNO(name, syscall_name, args) \
-+ .text ASM_LINE_SEP \
-+ ENTRY (name) ASM_LINE_SEP \
-+ DO_CALL (syscall_name, args) ASM_LINE_SEP \
-+
-+/* return the return value register unexamined
-+ * r0 is both syscall return reg and function return reg, so no need to do
-+ * anything
-+ */
-+# define ret_NOERRNO \
-+ j_s [blink] ASM_LINE_SEP
-+
-+# undef PSEUDO_END_NOERRNO
-+# define PSEUDO_END_NOERRNO(name) \
-+ END (name)
-+
-+/* --------- helper for SYSCALL_ERRVAL ----------- */
-+
-+/* This kind of system call stub returns the errno code as its return
-+ value, or zero for success. We may massage the kernel's return value
-+ to meet that ABI, but we never set errno here. */
-+
-+# undef PSEUDO_ERRVAL
-+# define PSEUDO_ERRVAL(name, syscall_name, args) \
-+ PSEUDO_NOERRNO(name, syscall_name, args) ASM_LINE_SEP
-+
-+/* don't set errno, return kernel error (in errno form) or zero */
-+# define ret_ERRVAL \
-+ rsub r0, r0, 0 ASM_LINE_SEP \
-+ ret_NOERRNO
-+
-+# undef PSEUDO_END_ERRVAL
-+# define PSEUDO_END_ERRVAL(name) \
-+ END (name)
-+
-+
-+/* To reduce the code footprint, we confine the actual errno access
-+ * to single place in __syscall_error()
-+ * this takes raw kernel error value, sets errno and returns -1
-+ */
-+#if IS_IN (libc)
-+#define CALL_ERRNO_SETTER_C bl PLTJMP(HIDDEN_JUMPTARGET(__syscall_error))
-+#else
-+#define CALL_ERRNO_SETTER_C bl PLTJMP(__syscall_error)
-+#endif
-+
-+# define SYSCALL_ERROR_HANDLER \
-+.Lcall_syscall_err: ASM_LINE_SEP \
-+ st.a blink, [sp, -4] ASM_LINE_SEP \
-+ cfi_adjust_cfa_offset (4) ASM_LINE_SEP \
-+ cfi_rel_offset (blink, 0) ASM_LINE_SEP \
-+ CALL_ERRNO_SETTER_C ASM_LINE_SEP \
-+ ld.ab blink, [sp, 4] ASM_LINE_SEP \
-+ cfi_adjust_cfa_offset (-4) ASM_LINE_SEP \
-+ cfi_restore (blink) ASM_LINE_SEP \
-+ j [blink]
-+
-+# define DO_CALL(syscall_name, args) \
-+ mov r8, SYS_ify (syscall_name) ASM_LINE_SEP \
-+ ARC_TRAP_INSN ASM_LINE_SEP
-+
-+#define ARC_TRAP_INSN trap_s 0
-+
-+#else /* !__ASSEMBLER__ */
-+
-+# define SINGLE_THREAD_BY_GLOBAL 1
-+
-+/* In order to get __set_errno() definition in INLINE_SYSCALL. */
-+#include <errno.h>
-+
-+extern int __syscall_error (int);
-+
-+#if IS_IN (libc)
-+hidden_proto (__syscall_error)
-+#define CALL_ERRNO_SETTER "bl __syscall_error \n\t"
-+#else
-+#define CALL_ERRNO_SETTER "bl __syscall_error@plt \n\t"
-+#endif
-+
-+
-+/* Define a macro which expands into the inline wrapper code for a system
-+ call. */
-+#undef INLINE_SYSCALL
-+#define INLINE_SYSCALL(name, nr_args, args...) \
-+({ \
-+ register int __res __asm__("r0"); \
-+ __res = INTERNAL_SYSCALL_NCS(__NR_##name, , nr_args, args); \
-+ if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P ((__res), ), 0)) \
-+ { \
-+ asm volatile ("st.a blink, [sp, -4] \n\t" \
-+ CALL_ERRNO_SETTER \
-+ "ld.ab blink, [sp, 4] \n\t" \
-+ :"+r" (__res) \
-+ : \
-+ :"r1","r2","r3","r4","r5","r6", \
-+ "r7","r8","r9","r10","r11","r12" \
-+ ); \
-+ } \
-+ __res; \
-+})
-+
-+#undef INTERNAL_SYSCALL_DECL
-+#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
-+
-+#undef INTERNAL_SYSCALL_ERRNO
-+# define INTERNAL_SYSCALL_ERRNO(val, err) (-(val))
-+
-+/* -1 to -1023 are valid errno values */
-+#undef INTERNAL_SYSCALL_ERROR_P
-+#define INTERNAL_SYSCALL_ERROR_P(val, err) \
-+ ((unsigned int) (val) > -1024U)
-+
-+#define ARC_TRAP_INSN "trap_s 0 \n\t"
-+
-+#undef INTERNAL_SYSCALL_RAW
-+#define INTERNAL_SYSCALL_RAW(name, err, nr_args, args...) \
-+({ \
-+ /* Per ABI, r0 is 1st arg and return reg */ \
-+ register int __ret __asm__("r0"); \
-+ register int _sys_num __asm__("r8"); \
-+ \
-+ LOAD_ARGS_##nr_args (name, args) \
-+ \
-+ __asm__ volatile ( \
-+ ARC_TRAP_INSN \
-+ : "+r" (__ret) \
-+ : "r"(_sys_num) ASM_ARGS_##nr_args \
-+ : "memory"); \
-+ \
-+ __ret; \
-+})
-+
-+/* Macros for setting up inline __asm__ input regs */
-+#define ASM_ARGS_0
-+#define ASM_ARGS_1 ASM_ARGS_0, "r" (__ret)
-+#define ASM_ARGS_2 ASM_ARGS_1, "r" (_arg2)
-+#define ASM_ARGS_3 ASM_ARGS_2, "r" (_arg3)
-+#define ASM_ARGS_4 ASM_ARGS_3, "r" (_arg4)
-+#define ASM_ARGS_5 ASM_ARGS_4, "r" (_arg5)
-+#define ASM_ARGS_6 ASM_ARGS_5, "r" (_arg6)
-+#define ASM_ARGS_7 ASM_ARGS_6, "r" (_arg7)
-+
-+/* Macros for converting sys-call wrapper args into sys call args */
-+#define LOAD_ARGS_0(nm, arg) \
-+ _sys_num = (int) (nm);
-+
-+#define LOAD_ARGS_1(nm, arg1) \
-+ __ret = (int) (arg1); \
-+ LOAD_ARGS_0 (nm, arg1)
-+
-+/*
-+ * Note that the use of _tmpX might look superflous, however it is needed
-+ * to ensure that register variables are not clobbered if arg happens to be
-+ * a function call itself. e.g. sched_setaffinity() calling getpid() for arg2
-+ *
-+ * Also this specific order of recursive calling is important to segregate
-+ * the tmp args evaluation (function call case described above) and assigment
-+ * of register variables
-+ */
-+#define LOAD_ARGS_2(nm, arg1, arg2) \
-+ int _tmp2 = (int) (arg2); \
-+ LOAD_ARGS_1 (nm, arg1) \
-+ register int _arg2 __asm__ ("r1") = _tmp2;
-+
-+#define LOAD_ARGS_3(nm, arg1, arg2, arg3) \
-+ int _tmp3 = (int) (arg3); \
-+ LOAD_ARGS_2 (nm, arg1, arg2) \
-+ register int _arg3 __asm__ ("r2") = _tmp3;
-+
-+#define LOAD_ARGS_4(nm, arg1, arg2, arg3, arg4) \
-+ int _tmp4 = (int) (arg4); \
-+ LOAD_ARGS_3 (nm, arg1, arg2, arg3) \
-+ register int _arg4 __asm__ ("r3") = _tmp4;
-+
-+#define LOAD_ARGS_5(nm, arg1, arg2, arg3, arg4, arg5) \
-+ int _tmp5 = (int) (arg5); \
-+ LOAD_ARGS_4 (nm, arg1, arg2, arg3, arg4) \
-+ register int _arg5 __asm__ ("r4") = _tmp5;
-+
-+#define LOAD_ARGS_6(nm, arg1, arg2, arg3, arg4, arg5, arg6) \
-+ int _tmp6 = (int) (arg6); \
-+ LOAD_ARGS_5 (nm, arg1, arg2, arg3, arg4, arg5) \
-+ register int _arg6 __asm__ ("r5") = _tmp6;
-+
-+#define LOAD_ARGS_7(nm, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\
-+ int _tmp7 = (int) (arg7); \
-+ LOAD_ARGS_6 (nm, arg1, arg2, arg3, arg4, arg5, arg6) \
-+ register int _arg7 __asm__ ("r6") = _tmp7;
-+
-+#undef INTERNAL_SYSCALL
-+#define INTERNAL_SYSCALL(name, err, nr, args...) \
-+ INTERNAL_SYSCALL_RAW(SYS_ify(name), err, nr, args)
-+
-+#undef INTERNAL_SYSCALL_NCS
-+#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \
-+ INTERNAL_SYSCALL_RAW(number, err, nr, args)
-+
-+/* Pointer mangling not yet supported */
-+# define PTR_MANGLE(var) (void) (var)
-+# define PTR_DEMANGLE(var) (void) (var)
-+
-+#endif /* !__ASSEMBLER__ */
-+
-+#endif /* linux/arc/sysdep.h */
-diff --git a/sysdeps/unix/sysv/linux/arc/ucontext-macros.h b/sysdeps/unix/sysv/linux/arc/ucontext-macros.h
-new file mode 100644
-index 000000000000..a5d861476f3c
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/ucontext-macros.h
-@@ -0,0 +1,29 @@
-+/* Macros for ucontext routines - ARC
-+ Copyright (C) 2017-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library. If not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#ifndef _LINUX_ARC_UCONTEXT_MACROS_H
-+#define _LINUX_ARC_UCONTEXT_MACROS_H
-+
-+#include <sysdep.h>
-+
-+#include "ucontext_i.h"
-+
-+#define SAVE_REG(reg, rbase, off) st reg, [rbase, UCONTEXT_MCONTEXT + off * 4]
-+#define LOAD_REG(reg, rbase, off) ld reg, [rbase, UCONTEXT_MCONTEXT + off * 4]
-+
-+#endif
-diff --git a/sysdeps/unix/sysv/linux/arc/ucontext_i.sym b/sysdeps/unix/sysv/linux/arc/ucontext_i.sym
-new file mode 100644
-index 000000000000..f0a209e581ab
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/ucontext_i.sym
-@@ -0,0 +1,20 @@
-+#include <inttypes.h>
-+#include <signal.h>
-+#include <stddef.h>
-+#include <sys/ucontext.h>
-+
-+SIG_BLOCK
-+SIG_SETMASK
-+
-+-- sizeof(sigset_t) expected by kernel: see comment in ARC sigaction.c for details
-+_NSIG8 (_NSIG / 8)
-+
-+-- Offsets of the fields in the ucontext_t structure.
-+#define ucontext(member) offsetof (ucontext_t, member)
-+
-+UCONTEXT_FLAGS ucontext (uc_flags)
-+UCONTEXT_LINK ucontext (uc_link)
-+UCONTEXT_STACK ucontext (uc_stack)
-+UCONTEXT_MCONTEXT ucontext (uc_mcontext)
-+UCONTEXT_SIGMASK ucontext (uc_sigmask)
-+UCONTEXT_SIZE sizeof (ucontext_t)
-diff --git a/sysdeps/unix/sysv/linux/arc/vfork.S b/sysdeps/unix/sysv/linux/arc/vfork.S
-new file mode 100644
-index 000000000000..6d7f63c9900b
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/arc/vfork.S
-@@ -0,0 +1,42 @@
-+/* vfork for ARC Linux.
-+ Copyright (C) 2005-2018 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include <sys/syscall.h>
-+#include <sysdep.h>
-+#include <tcb-offsets.h>
-+#define _SIGNAL_H
-+#include <bits/signum.h> /* For SIGCHLD */
-+
-+#define CLONE_VM 0x00000100
-+#define CLONE_VFORK 0x00004000
-+#define CLONE_FLAGS_FOR_VFORK (CLONE_VM|CLONE_VFORK|SIGCHLD)
-+
-+ENTRY(__vfork)
-+ mov r0, CLONE_FLAGS_FOR_VFORK
-+ mov_s r1, sp
-+ mov r8, __NR_clone
-+ ARC_TRAP_INSN
-+
-+ cmp r0, 0
-+ jge [blink] ; child continues
-+
-+ b __syscall_error
-+PSEUDO_END (__vfork)
-+libc_hidden_def (__vfork)
-+
-+weak_alias (__vfork, vfork)
-diff --git a/sysdeps/unix/sysv/linux/syscall-names.list b/sysdeps/unix/sysv/linux/syscall-names.list
-index 5306d538e644..d038840b67d3 100644
---- a/sysdeps/unix/sysv/linux/syscall-names.list
-+++ b/sysdeps/unix/sysv/linux/syscall-names.list
-@@ -42,6 +42,9 @@ adjtimex
- afs_syscall
- alarm
- alloc_hugepages
-+arc_gettls
-+arc_settls
-+arc_usr_cmpxchg
- arch_prctl
- arm_fadvise64_64
- arm_sync_file_range
-diff --git a/timezone/tst-tzset.c b/timezone/tst-tzset.c
-index 27f986b56dab..fca704c2ad2d 100644
---- a/timezone/tst-tzset.c
-+++ b/timezone/tst-tzset.c
-@@ -25,7 +25,6 @@
- #include <time.h>
- #include <unistd.h>
-
--#define TIMEOUT 5
- static int do_test (void);
- #define TEST_FUNCTION do_test ()
- #include "../test-skeleton.c"
-diff --git a/timezone/zic.c b/timezone/zic.c
-index e738386600c2..53b25256d78c 100644
---- a/timezone/zic.c
-+++ b/timezone/zic.c
-@@ -36,7 +36,7 @@ typedef int_fast64_t zic_t;
- #include <sys/stat.h>
- #endif
- #ifdef S_IRUSR
--#define MKDIR_UMASK (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)
-+#define MKDIR_UMASK (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IWGRP|S_IXGRP|S_IROTH|S_IWOTH|S_IXOTH)
- #else
- #define MKDIR_UMASK 0755
- #endif
diff --git a/bsp/meta-synopsys/recipes-core/glibc/files/0032-Add-with-nonshared-cflags-option-to-configure.patch b/bsp/meta-synopsys/recipes-core/glibc/files/0032-Add-with-nonshared-cflags-option-to-configure.patch
deleted file mode 100644
index 06556430..00000000
--- a/bsp/meta-synopsys/recipes-core/glibc/files/0032-Add-with-nonshared-cflags-option-to-configure.patch
+++ /dev/null
@@ -1,162 +0,0 @@
-From 2add82381a59df74de413d11166a9840e870e072 Mon Sep 17 00:00:00 2001
-From: Florian Weimer <fweimer@redhat.com>
-Date: Fri, 17 Aug 2018 11:44:39 +0200
-Subject: [PATCH] Add --with-nonshared-cflags option to configure
-
-Upstream status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;f=INSTALL;h=6413fcde4fe0272eee469aaf41c8bb1d6e6a270f]
-
-Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
----
- INSTALL | 16 ++++++++++++++++
- Makeconfig | 2 +-
- config.make.in | 1 +
- configure | 14 ++++++++++++++
- configure.ac | 8 ++++++++
- manual/install.texi | 14 ++++++++++++++
- 6 files changed, 54 insertions(+), 1 deletion(-)
-
-diff --git a/INSTALL b/INSTALL
-index 781cb8415b..3e566ebfef 100644
---- a/INSTALL
-+++ b/INSTALL
-@@ -90,6 +90,22 @@ if 'CFLAGS' is specified it must enable optimization. For example:
- library will still be usable, but functionality may be lost--for
- example, you can't build a shared libc with old binutils.
-
-+'--with-nonshared-cflags=CFLAGS'
-+ Use additional compiler flags CFLAGS to build the parts of the
-+ library which are always statically linked into applications and
-+ libraries even with shared linking (that is, the object files
-+ contained in 'lib*_nonshared.a' libraries). The build process will
-+ automatically use the appropriate flags, but this option can be
-+ used to set additional flags required for building applications and
-+ libraries, to match local policy. For example, if such a policy
-+ requires that all code linked into applications must be built with
-+ source fortification,
-+ '--with-nonshared-cflags=-Wp,-D_FORTIFY_SOURCE=2' will make sure
-+ that the objects in 'libc_nonshared.a' are compiled with this flag
-+ (although this will not affect the generated code in this
-+ particular case and potentially change debugging information and
-+ metadata only).
-+
- '--disable-shared'
- Don't build shared libraries even if it is possible. Not all
- systems support shared libraries; you need ELF support and
-diff --git a/Makeconfig b/Makeconfig
-index 608ffe648c..b0b27f0113 100644
---- a/Makeconfig
-+++ b/Makeconfig
-@@ -1038,7 +1038,7 @@ object-suffixes-for-libc += .oS
- # Must build the routines as PIC, though, because they can end up in (users')
- # shared objects. We don't want to use CFLAGS-os because users may, for
- # example, make that processor-specific.
--CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
-+CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag) $(extra-nonshared-cflags)
- CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
- libtype.oS = lib%_nonshared.a
- endif
-diff --git a/config.make.in b/config.make.in
-index d9891b2cd8..a6fe48d31f 100644
---- a/config.make.in
-+++ b/config.make.in
-@@ -110,6 +110,7 @@ BUILD_CC = @BUILD_CC@
- CFLAGS = @CFLAGS@
- CPPFLAGS-config = @CPPFLAGS@
- CPPUNDEFS = @CPPUNDEFS@
-+extra-nonshared-cflags = @extra_nonshared_cflags@
- ASFLAGS-config = @ASFLAGS_config@
- AR = @AR@
- NM = @NM@
-diff --git a/configure b/configure
-index fde57d63fe..285a6537f0 100755
---- a/configure
-+++ b/configure
-@@ -684,6 +684,7 @@ force_install
- bindnow
- hardcoded_path_in_tests
- enable_timezone_tools
-+extra_nonshared_cflags
- use_default_link
- sysheaders
- ac_ct_CXX
-@@ -762,6 +763,7 @@ with_binutils
- with_selinux
- with_headers
- with_default_link
-+with_nonshared_cflags
- enable_sanity_checks
- enable_shared
- enable_profile
-@@ -1482,6 +1484,8 @@ Optional Packages:
- --with-headers=PATH location of system headers to use (for example
- /usr/src/linux/include) [default=compiler default]
- --with-default-link do not use explicit linker scripts
-+ --with-nonshared-cflags=CFLAGS
-+ build nonshared libraries with additional CFLAGS
- --with-cpu=CPU select code for CPU variant
-
- Some influential environment variables:
-@@ -3339,6 +3343,16 @@ else
- fi
-
-
-+
-+# Check whether --with-nonshared-cflags was given.
-+if test "${with_nonshared_cflags+set}" = set; then :
-+ withval=$with_nonshared_cflags; extra_nonshared_cflags=$withval
-+else
-+ extra_nonshared_cflags=
-+fi
-+
-+
-+
- # Check whether --enable-sanity-checks was given.
- if test "${enable_sanity_checks+set}" = set; then :
- enableval=$enable_sanity_checks; enable_sanity=$enableval
-diff --git a/configure.ac b/configure.ac
-index 014e09a5d5..8045d44dd0 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -154,6 +154,14 @@ AC_ARG_WITH([default-link],
- [use_default_link=$withval],
- [use_default_link=default])
-
-+dnl Additional build flags injection.
-+AC_ARG_WITH([nonshared-cflags],
-+ AC_HELP_STRING([--with-nonshared-cflags=CFLAGS],
-+ [build nonshared libraries with additional CFLAGS]),
-+ [extra_nonshared_cflags=$withval],
-+ [extra_nonshared_cflags=])
-+AC_SUBST(extra_nonshared_cflags)
-+
- AC_ARG_ENABLE([sanity-checks],
- AC_HELP_STRING([--disable-sanity-checks],
- [really do not use threads (should not be used except in special situations) @<:@default=yes@:>@]),
-diff --git a/manual/install.texi b/manual/install.texi
-index c39e63bf3b..5476bb66f7 100644
---- a/manual/install.texi
-+++ b/manual/install.texi
-@@ -117,6 +117,20 @@ problem and suppress these constructs, so that the library will still be
- usable, but functionality may be lost---for example, you can't build a
- shared libc with old binutils.
-
-+@item --with-nonshared-cflags=@var{cflags}
-+Use additional compiler flags @var{cflags} to build the parts of the
-+library which are always statically linked into applications and
-+libraries even with shared linking (that is, the object files contained
-+in @file{lib*_nonshared.a} libraries). The build process will
-+automatically use the appropriate flags, but this option can be used to
-+set additional flags required for building applications and libraries,
-+to match local policy. For example, if such a policy requires that all
-+code linked into applications must be built with source fortification,
-+@samp{--with-nonshared-cflags=-Wp,-D_FORTIFY_SOURCE=2} will make sure
-+that the objects in @file{libc_nonshared.a} are compiled with this flag
-+(although this will not affect the generated code in this particular
-+case and potentially change debugging information and metadata only).
-+
- @c disable static doesn't work currently
- @c @item --disable-static
- @c Don't build static libraries. Static libraries aren't that useful these
---
-2.16.2
-
diff --git a/bsp/meta-synopsys/recipes-core/glibc/glibc-initial_2.28.bbappend b/bsp/meta-synopsys/recipes-core/glibc/glibc-initial_2.28.bbappend
deleted file mode 100644
index 25f96bf3..00000000
--- a/bsp/meta-synopsys/recipes-core/glibc/glibc-initial_2.28.bbappend
+++ /dev/null
@@ -1,4 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-SRC_URI += "file://0031-Add-ARC-architecture.patch \
- file://0032-Add-with-nonshared-cflags-option-to-configure.patch \
-"
diff --git a/bsp/meta-synopsys/recipes-core/glibc/glibc_2.28.bbappend b/bsp/meta-synopsys/recipes-core/glibc/glibc_2.28.bbappend
deleted file mode 100644
index 25f96bf3..00000000
--- a/bsp/meta-synopsys/recipes-core/glibc/glibc_2.28.bbappend
+++ /dev/null
@@ -1,4 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-SRC_URI += "file://0031-Add-ARC-architecture.patch \
- file://0032-Add-with-nonshared-cflags-option-to-configure.patch \
-"
diff --git a/bsp/meta-synopsys/recipes-core/glibc/glibc_2.31.bbappend b/bsp/meta-synopsys/recipes-core/glibc/glibc_2.31.bbappend
new file mode 100644
index 00000000..f72214cf
--- /dev/null
+++ b/bsp/meta-synopsys/recipes-core/glibc/glibc_2.31.bbappend
@@ -0,0 +1,33 @@
+CFLAGS_append += " -Wno-error"
+EXTRA_OECONF += " --disable-werror --disable-multilib"
+SRCBRANCH = "master"
+SRCREV_glibc = "758caf37366c3bebd349cd3107341dbfd761189a"
+SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
+ file://etc/ld.so.conf \
+ file://generate-supported.mk \
+ file://makedbs.sh \
+ \
+ ${NATIVESDKFIXES} \
+ file://0008-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \
+ file://0009-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \
+ file://0010-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \
+ file://0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
+ file://0012-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \
+ file://0013-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
+ file://0014-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
+ file://0015-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \
+ file://0017-yes-within-the-path-sets-wrong-config-variables.patch \
+ file://0018-timezone-re-written-tzselect-as-posix-sh.patch \
+ file://0019-Remove-bash-dependency-for-nscd-init-script.patch \
+ file://0020-eglibc-Cross-building-and-testing-instructions.patch \
+ file://0021-eglibc-Help-bootstrap-cross-toolchain.patch \
+ file://0022-eglibc-Resolve-__fpscr_values-on-SH4.patch \
+ file://0023-eglibc-Forward-port-cross-locale-generation-support.patch \
+ file://0024-Define-DUMMY_LOCALE_T-if-not-defined.patch \
+ file://0025-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \
+ file://0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \
+ file://0027-intl-Emit-no-lines-in-bison-generated-files.patch \
+ file://0029-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch \
+ "
+
+
diff --git a/bsp/meta-synopsys/recipes-core/systemd/files/0001-network-fix-static-assertion-on-IPPROTO_MAX-range.patch b/bsp/meta-synopsys/recipes-core/systemd/files/0001-network-fix-static-assertion-on-IPPROTO_MAX-range.patch
new file mode 100644
index 00000000..b6aeadd0
--- /dev/null
+++ b/bsp/meta-synopsys/recipes-core/systemd/files/0001-network-fix-static-assertion-on-IPPROTO_MAX-range.patch
@@ -0,0 +1,74 @@
+From c5e346905952fef0f163d91522dd43333f1f219d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Thu, 16 Apr 2020 16:49:30 +0200
+Subject: [PATCH] network: fix static assertion on IPPROTO_MAX range
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Builds with recent glibc would fail with:
+../src/network/netdev/fou-tunnel.c: In function ‘config_parse_ip_protocol’:
+../src/basic/macro.h:380:9: error: static assertion failed: "IPPROTO_MAX-1 <= UINT8_MAX"
+ 380 | static_assert(expr, #expr)
+ | ^~~~~~~~~~~~~
+../src/network/netdev/fou-tunnel.c:161:9: note: in expansion of macro ‘assert_cc’
+ 161 | assert_cc(IPPROTO_MAX-1 <= UINT8_MAX);
+ | ^~~~~~~~~
+
+This is because f9ac84f92f151e07586c55e14ed628d493a5929d (present in
+glibc-2.31.9000-9.fc33.x86_64) added IPPROTO_MPTCP=262, following
+v5.5-rc5-1002-gfaf391c382 in the kernel.
+
+(cherry picked from commit 3d58d7328a6ecbc61d3494803d705edd8a108d72)
+---
+ src/network/netdev/fou-tunnel.c | 22 ++++++++++++++++------
+ 1 file changed, 16 insertions(+), 6 deletions(-)
+
+diff --git a/src/network/netdev/fou-tunnel.c b/src/network/netdev/fou-tunnel.c
+index 3cc273c7fe..40abacd6f7 100644
+--- a/src/network/netdev/fou-tunnel.c
++++ b/src/network/netdev/fou-tunnel.c
+@@ -149,7 +149,10 @@ int config_parse_ip_protocol(
+ void *data,
+ void *userdata) {
+
+- uint8_t *protocol = data;
++ uint8_t *ret = data;
++ unsigned protocol;
++ /* linux/fou.h defines the netlink field as one byte, so we need to reject protocols numbers that
++ * don't fit in one byte. */
+ int r;
+
+ assert(filename);
+@@ -158,11 +161,11 @@ int config_parse_ip_protocol(
+ assert(rvalue);
+ assert(data);
+
+- assert_cc(IPPROTO_MAX-1 <= UINT8_MAX);
+-
+ r = parse_ip_protocol(rvalue);
+- if (r < 0) {
+- r = safe_atou8(rvalue, protocol);
++ if (r >= 0)
++ protocol = r;
++ else {
++ r = safe_atou(rvalue, &protocol);
+ if (r < 0)
+ log_syntax(unit, LOG_ERR, filename, line, r,
+ "Failed to parse IP protocol '%s' for Foo over UDP tunnel, "
+@@ -170,7 +173,14 @@ int config_parse_ip_protocol(
+ return 0;
+ }
+
+- *protocol = r;
++ if (protocol > UINT8_MAX) {
++ log_syntax(unit, LOG_ERR, filename, line, 0,
++ "IP protocol '%s' for FooOverUDP tunnel out of range, "
++ "ignoring assignment: %m", rvalue);
++ return 0;
++ }
++
++ *ret = protocol;
+ return 0;
+ }
+
diff --git a/bsp/meta-synopsys/recipes-core/systemd/systemd-conf.bbappend b/bsp/meta-synopsys/recipes-core/systemd/systemd-conf.bbappend
deleted file mode 100644
index 6d076184..00000000
--- a/bsp/meta-synopsys/recipes-core/systemd/systemd-conf.bbappend
+++ /dev/null
@@ -1,6 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-SRC_URI += "\
- file://0001-Add-MESA_LOADER_DRIVER_OVERRIDE-imx-drm-env-to-etc-s.patch \
-"
-
-
diff --git a/bsp/meta-synopsys/recipes-core/systemd/systemd-conf/0001-Add-MESA_LOADER_DRIVER_OVERRIDE-imx-drm-env-to-etc-s.patch b/bsp/meta-synopsys/recipes-core/systemd/systemd-conf/0001-Add-MESA_LOADER_DRIVER_OVERRIDE-imx-drm-env-to-etc-s.patch
deleted file mode 100644
index d002368e..00000000
--- a/bsp/meta-synopsys/recipes-core/systemd/systemd-conf/0001-Add-MESA_LOADER_DRIVER_OVERRIDE-imx-drm-env-to-etc-s.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 37cba4c262828c9a33466e71206046dbeb151300 Mon Sep 17 00:00:00 2001
-From: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
-Date: Tue, 2 Apr 2019 17:49:52 +0300
-Subject: [PATCH] Add MESA_LOADER_DRIVER_OVERRIDE=imx-drm env to
- /etc/systemd/system.conf
-
-Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
----
- src/core/system.conf.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/core/system.conf.in b/src/core/system.conf.in
-index f0a59a79a5..2851151ad0 100644
---- a/src/core/system.conf.in
-+++ b/src/core/system.conf.in
-@@ -38,7 +38,7 @@
- #DefaultRestartSec=100ms
- #DefaultStartLimitIntervalSec=10s
- #DefaultStartLimitBurst=5
--#DefaultEnvironment=
-+DefaultEnvironment="MESA_LOADER_DRIVER_OVERRIDE=imx-drm"
- #DefaultCPUAccounting=no
- #DefaultIOAccounting=no
- #DefaultIPAccounting=no
---
-2.16.2
-
diff --git a/bsp/meta-synopsys/recipes-core/systemd/systemd_244.3.bbappend b/bsp/meta-synopsys/recipes-core/systemd/systemd_244.3.bbappend
new file mode 100644
index 00000000..4f3c2a7c
--- /dev/null
+++ b/bsp/meta-synopsys/recipes-core/systemd/systemd_244.3.bbappend
@@ -0,0 +1,4 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+SRC_URI_append += "\
+ file://0001-network-fix-static-assertion-on-IPPROTO_MAX-range.patch; \
+"
diff --git a/bsp/meta-synopsys/recipes-core/util-linux/util-linux_%.bbappend b/bsp/meta-synopsys/recipes-core/util-linux/util-linux_%.bbappend
deleted file mode 100644
index 50339c4e..00000000
--- a/bsp/meta-synopsys/recipes-core/util-linux/util-linux_%.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-EXTRA_OECONF += "--disable-tls"
diff --git a/bsp/meta-synopsys/recipes-devtools/binutils/binutils-arc.inc b/bsp/meta-synopsys/recipes-devtools/binutils/binutils-arc.inc
index 2b397fb7..0dec79a8 100644
--- a/bsp/meta-synopsys/recipes-devtools/binutils/binutils-arc.inc
+++ b/bsp/meta-synopsys/recipes-devtools/binutils/binutils-arc.inc
@@ -10,14 +10,12 @@ LIC_FILES_CHKSUM="\
file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
"
-SRCREV ?= "arc-2018.09-release"
+SRCREV ?= "arc-2019.09-release"
SRC_URI = "\
- git://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb;protocol=https;branch=arc-2018.09; \
+ git://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb;protocol=https;branch=arc-2019.09; \
file://0004-Point-scripts-location-to-libdir.patch \
- file://0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
file://0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
- file://0009-warn-for-uses-of-system-directories-when-cross-linki.patch \
"
S = "${WORKDIR}/git"
diff --git a/bsp/meta-synopsys/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch b/bsp/meta-synopsys/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
index 6bdb407b..7c4346aa 100644
--- a/bsp/meta-synopsys/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
+++ b/bsp/meta-synopsys/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
@@ -1,7 +1,7 @@
-From 4a99f058030c86794bb96b582a7dbd631f963b06 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 2 Mar 2015 01:58:54 +0000
-Subject: [PATCH 01/15] binutils-crosssdk: Generate relocatable SDKs
+From 0ba27f807d86490d0563d776ec32719262a54bb4 Mon Sep 17 00:00:00 2001
+From: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
+Date: Wed, 15 Apr 2020 13:13:19 +0300
+Subject: [PATCH] binutils-crosssdk: Generate relocatable SDKs
This patch will modify the ELF linker scripts so that the crosssdk
linker will generate binaries with a 4096 bytes PT_INTERP section. When the binaries
@@ -12,41 +12,42 @@ Upstream-Status: Inappropriate [SDK specific]
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
---
ld/genscripts.sh | 3 +++
ld/scripttempl/elf.sc | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
-index 370b22269d..a5c367aa8f 100755
+index cb2b081e9e9..db2e9fd569d 100755
--- a/ld/genscripts.sh
+++ b/ld/genscripts.sh
-@@ -279,6 +279,7 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
+@@ -325,6 +325,7 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
LD_FLAG=r
DATA_ALIGNMENT=${DATA_ALIGNMENT_r}
DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
+PARTIAL_LINKING=" "
( echo "/* Script for ld -r: link without relocation */"
- . ${CUSTOMIZER_SCRIPT}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
-@@ -287,10 +288,12 @@ DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
+ source_sh ${CUSTOMIZER_SCRIPT}
+ source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+@@ -333,10 +334,12 @@ DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
LD_FLAG=u
DATA_ALIGNMENT=${DATA_ALIGNMENT_u}
CONSTRUCTING=" "
+PARTIAL_LINKING=" "
( echo "/* Script for ld -Ur: link w/out relocation, do create constructors */"
- . ${CUSTOMIZER_SCRIPT}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+ source_sh ${CUSTOMIZER_SCRIPT}
+ source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xu
+unset PARTIAL_LINKING
DATA_ALIGNMENT=${DATA_ALIGNMENT_}
RELOCATING=" "
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
-index 444aef2942..afa99f736d 100644
+index c3ad467bff4..a847ffecc19 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
-@@ -139,8 +139,8 @@ if test -z "$DATA_SEGMENT_ALIGN"; then
+@@ -140,8 +140,8 @@ if test -z "$DATA_SEGMENT_ALIGN"; then
DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
fi
fi
@@ -58,5 +59,5 @@ index 444aef2942..afa99f736d 100644
if test -z "$PLT"; then
IPLT=".iplt ${RELOCATING-0} : { *(.iplt) }"
--
-2.18.0
+2.16.2
diff --git a/bsp/meta-synopsys/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch b/bsp/meta-synopsys/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch
index 9a9e3196..9727821b 100644
--- a/bsp/meta-synopsys/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch
+++ b/bsp/meta-synopsys/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch
@@ -1,7 +1,7 @@
-From a3667059fc0d52d890b505bed0e5050ea3d7002e Mon Sep 17 00:00:00 2001
+From 98f68c0892ba4bbd53b0a0a4cbbdf0b7197e0320 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 15 Jan 2016 06:31:09 +0000
-Subject: [PATCH 09/15] warn for uses of system directories when cross linking
+Subject: [PATCH 08/15] warn for uses of system directories when cross linking
2008-07-02 Joseph Myers <joseph@codesourcery.com>
@@ -77,7 +77,7 @@ index d93c9b0830..5da2742bea 100644
#undef EXTRA_SHLIB_EXTENSION
diff --git a/ld/configure b/ld/configure
-index 2b291f0da8..facc386563 100755
+index 43c391c2b3..ff9f6b3c02 100755
--- a/ld/configure
+++ b/ld/configure
@@ -826,6 +826,7 @@ with_lib_path
@@ -118,7 +118,7 @@ index 2b291f0da8..facc386563 100755
if test "${enable_gold+set}" = set; then :
enableval=$enable_gold; case "${enableval}" in
diff --git a/ld/configure.ac b/ld/configure.ac
-index d10c553650..9f1b57b120 100644
+index d335f21091..7f692d9387 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -94,6 +94,16 @@ AC_SUBST(use_sysroot)
@@ -139,7 +139,7 @@ index d10c553650..9f1b57b120 100644
dnl "install_as_default" is set to false if gold is the default linker.
dnl "installed_linker" is the installed BFD linker name.
diff --git a/ld/ld.h b/ld/ld.h
-index ba914b921e..9df17dab6c 100644
+index b97d977f37..f3bbd2d55d 100644
--- a/ld/ld.h
+++ b/ld/ld.h
@@ -180,6 +180,14 @@ typedef struct
@@ -158,10 +158,10 @@ index ba914b921e..9df17dab6c 100644
enum endian_enum endian;
diff --git a/ld/ld.texi b/ld/ld.texi
-index b9fe2324da..43486605e0 100644
+index 5179af3e0e..f78bf74682 100644
--- a/ld/ld.texi
+++ b/ld/ld.texi
-@@ -2479,6 +2479,18 @@ string identifying the original linked file does not change.
+@@ -2524,6 +2524,18 @@ string identifying the original linked file does not change.
Passing @code{none} for @var{style} disables the setting from any
@code{--build-id} options earlier on the command line.
@@ -181,7 +181,7 @@ index b9fe2324da..43486605e0 100644
@c man end
diff --git a/ld/ldfile.c b/ld/ldfile.c
-index a72ff13526..dc5148f748 100644
+index fcadc08c73..63e295ce8a 100644
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
@@ -116,6 +116,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline)
@@ -209,7 +209,7 @@ index a72ff13526..dc5148f748 100644
/* Try to open a BFD for a lang_input_statement. */
diff --git a/ld/ldlex.h b/ld/ldlex.h
-index 04d6fd5f96..d7df005bb2 100644
+index 32853debe4..8135361c49 100644
--- a/ld/ldlex.h
+++ b/ld/ldlex.h
@@ -148,6 +148,8 @@ enum option_values
@@ -222,10 +222,10 @@ index 04d6fd5f96..d7df005bb2 100644
/* The initial parser states. */
diff --git a/ld/ldmain.c b/ld/ldmain.c
-index f31eeb29c3..25f8497888 100644
+index 77cdbd0dd2..725512f126 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
-@@ -268,6 +268,8 @@ main (int argc, char **argv)
+@@ -269,6 +269,8 @@ main (int argc, char **argv)
command_line.warn_mismatch = TRUE;
command_line.warn_search_mismatch = TRUE;
command_line.check_section_addresses = -1;
@@ -235,7 +235,7 @@ index f31eeb29c3..25f8497888 100644
/* We initialize DEMANGLING based on the environment variable
COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
diff --git a/ld/lexsup.c b/ld/lexsup.c
-index 86a033a383..4a40d48020 100644
+index 88e85c73f4..eed1b71456 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -543,6 +543,14 @@ static const struct ld_option ld_options[] =
@@ -269,5 +269,5 @@ index 86a033a383..4a40d48020 100644
}
--
-2.18.0
+2.20.1
diff --git a/bsp/meta-synopsys/recipes-devtools/binutils/binutils_arc.bb b/bsp/meta-synopsys/recipes-devtools/binutils/binutils_arc.bb
index 09c6a886..a7928ecf 100644
--- a/bsp/meta-synopsys/recipes-devtools/binutils/binutils_arc.bb
+++ b/bsp/meta-synopsys/recipes-devtools/binutils/binutils_arc.bb
@@ -45,5 +45,7 @@ do_install_class-native () {
# Split out libbfd-*.so so including perf doesn't include extra stuff
PACKAGE_BEFORE_PN += "libbfd"
FILES_libbfd = "${libdir}/libbfd-*.so"
+PACKAGE_BEFORE_PN += "libopcodes"
+FILES_libopcodes = "${libdir}/libopcodes-*.so"
BBCLASSEXTEND = "native nativesdk"
diff --git a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc.inc b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc.inc
index 3807a697..f0f8146c 100644
--- a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc.inc
+++ b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc.inc
@@ -6,7 +6,7 @@ PV = "arc"
# BINV should be incremented to a revision after a minor gcc release
-BINV = "8.2.1"
+BINV = "9.2.1"
FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-arc:"
@@ -23,10 +23,10 @@ LIC_FILES_CHKSUM = "\
file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \
"
-SRCREV ?= "arc-2018.09-release"
+SRCREV ?= "arc-2019.09-release"
SRC_URI = "\
- git://github.com/foss-for-synopsys-dwc-arc-processors/gcc.git;protocol=https;branch=arc-2018.09; \
+ git://github.com/foss-for-synopsys-dwc-arc-processors/gcc.git;protocol=https;branch=arc-2019.09; \
file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
file://0003-gcc-poison-system-directories.patch \
file://0005-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
@@ -36,7 +36,7 @@ SRC_URI = "\
file://0009-COLLECT_GCC_OPTIONS.patch \
file://0010-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
file://0011-fortran-cross-compile-hack.patch \
- file://0012-cpp-honor-sysroot.patch \
+ file://0012-cpp-honor-sysroot.patch \
file://0014-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
file://0015-gcc-Fix-argument-list-too-long-error.patch \
file://0016-Disable-sdt.patch \
@@ -61,8 +61,7 @@ SRC_URI = "\
file://0038-fix-segmentation-fault-in-precompiled-header-generat.patch \
file://0039-Fix-for-testsuite-failure.patch \
file://0040-Re-introduce-spe-commandline-options.patch \
- file://0041-ARC-Emit-blockage-regardless-to-avoid-delay-slot-sch.patch \
- file://0042-ARC-Dont-throw-errors-when-compiling-for-xarch.patch \
+ file://0042-ARC-Dont-throw-errors-when-compiling-for-xarch.patch \
${BACKPORTS} \
"
BACKPORTS = "\
diff --git a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0003-gcc-poison-system-directories.patch b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0003-gcc-poison-system-directories.patch
index 05138976..a1116e75 100644
--- a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0003-gcc-poison-system-directories.patch
+++ b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0003-gcc-poison-system-directories.patch
@@ -1,11 +1,20 @@
-From 48c670d2678e0323d88eb72205e039f393cabe05 Mon Sep 17 00:00:00 2001
+From 68e78bc15de215fa15c7d8b56bd2e2b0539b34fa Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 29 Mar 2013 08:59:00 +0400
-Subject: [PATCH 03/39] gcc: poison-system-directories
+Subject: [PATCH 02/36] gcc: poison-system-directories
+Add /sw/include and /opt/include based on the original
+zecke-no-host-includes.patch patch. The original patch checked for
+/usr/include, /sw/include and /opt/include and then triggered a failure and
+aborted.
+
+Instead, we add the two missing items to the current scan. If the user
+wants this to be a failure, they can add "-Werror=poison-system-directories".
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Inappropriate [distribution: codesourcery]
+Upstream-Status: Pending
---
gcc/common.opt | 4 ++++
gcc/config.in | 6 ++++++
@@ -13,14 +22,14 @@ Upstream-Status: Inappropriate [distribution: codesourcery]
gcc/configure.ac | 10 ++++++++++
gcc/doc/invoke.texi | 9 +++++++++
gcc/gcc.c | 2 ++
- gcc/incpath.c | 19 +++++++++++++++++++
- 7 files changed, 66 insertions(+)
+ gcc/incpath.c | 21 +++++++++++++++++++++
+ 7 files changed, 68 insertions(+)
diff --git a/gcc/common.opt b/gcc/common.opt
-index d6ef85928f3..7b29efe3882 100644
+index d342c4f3749..c64fd4a6c50 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
-@@ -679,6 +679,10 @@ Wreturn-local-addr
+@@ -684,6 +684,10 @@ Wreturn-local-addr
Common Var(warn_return_local_addr) Init(1) Warning
Warn about returning a pointer/reference to a local or temporary variable.
@@ -32,10 +41,10 @@ index d6ef85928f3..7b29efe3882 100644
Common Var(warn_shadow) Warning
Warn when one variable shadows another. Same as -Wshadow=global.
diff --git a/gcc/config.in b/gcc/config.in
-index 5bccb408016..1c784a8276b 100644
+index a718ceaf3da..5713342efb1 100644
--- a/gcc/config.in
+++ b/gcc/config.in
-@@ -194,6 +194,12 @@
+@@ -200,6 +200,12 @@
#endif
@@ -49,10 +58,10 @@ index 5bccb408016..1c784a8276b 100644
optimizer and back end) to be checked for dynamic type safety at runtime.
This is quite expensive. */
diff --git a/gcc/configure b/gcc/configure
-index 5c345ce0fd7..cafd05fd150 100755
+index 481071b4265..a6ea3a8a84c 100755
--- a/gcc/configure
+++ b/gcc/configure
-@@ -953,6 +953,7 @@ with_system_zlib
+@@ -995,6 +995,7 @@ with_system_zlib
enable_maintainer_mode
enable_link_mutex
enable_version_specific_runtime_libs
@@ -60,7 +69,7 @@ index 5c345ce0fd7..cafd05fd150 100755
enable_plugin
enable_host_shared
enable_libquadmath_support
-@@ -1696,6 +1697,8 @@ Optional Features:
+@@ -1748,6 +1749,8 @@ Optional Features:
--enable-version-specific-runtime-libs
specify that runtime libraries should be installed
in a compiler-specific directory
@@ -69,7 +78,7 @@ index 5c345ce0fd7..cafd05fd150 100755
--enable-plugin enable plugin support
--enable-host-shared build host code as shared libraries
--disable-libquadmath-support
-@@ -29715,6 +29718,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
+@@ -29750,6 +29753,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
fi
@@ -90,10 +99,10 @@ index 5c345ce0fd7..cafd05fd150 100755
diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 65dbf1f2f80..dd5b38195ce 100644
+index ce2825580c6..d42bbd4fd1c 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
-@@ -6341,6 +6341,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
+@@ -6378,6 +6378,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
[specify that runtime libraries should be
installed in a compiler-specific directory])])
@@ -111,18 +120,18 @@ index 65dbf1f2f80..dd5b38195ce 100644
AC_SUBST(subdirs)
AC_SUBST(srcdir)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index 255149fcfb8..cb71b60fe3c 100644
+index 6ef36ce02aa..09414d8cc05 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
-@@ -303,6 +303,7 @@ Objective-C and Objective-C++ Dialects}.
- -Wpacked -Wpacked-bitfield-compat -Wpacked-not-aligned -Wpadded @gol
+@@ -332,6 +332,7 @@ Objective-C and Objective-C++ Dialects}.
+ -Wpacked -Wpacked-bitfield-compat -Wpacked-not-aligned -Wpadded @gol
-Wparentheses -Wno-pedantic-ms-format @gol
-Wplacement-new -Wplacement-new=@var{n} @gol
+-Wno-poison-system-directories @gol
-Wpointer-arith -Wpointer-compare -Wno-pointer-to-int-cast @gol
- -Wno-pragmas -Wredundant-decls -Wrestrict -Wno-return-local-addr @gol
- -Wreturn-type -Wsequence-point -Wshadow -Wno-shadow-ivar @gol
-@@ -5712,6 +5713,14 @@ made up of data only and thus requires no special treatment. But, for
+ -Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls @gol
+ -Wrestrict -Wno-return-local-addr @gol
+@@ -6289,6 +6290,14 @@ made up of data only and thus requires no special treatment. But, for
most targets, it is made up of code and thus requires the stack to be
made executable in order for the program to work properly.
@@ -138,20 +147,20 @@ index 255149fcfb8..cb71b60fe3c 100644
@opindex Wfloat-equal
@opindex Wno-float-equal
diff --git a/gcc/gcc.c b/gcc/gcc.c
-index a716f708259..02b3cd39fc2 100644
+index 4f57765b012..a2601a6bb06 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
-@@ -1037,6 +1037,8 @@ proper position among the other output files. */
+@@ -1042,6 +1042,8 @@ proper position among the other output files. */
"%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
"%X %{o*} %{e*} %{N} %{n} %{r}\
- %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \
+ %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
+ %{Wno-poison-system-directories:--no-poison-system-directories} \
+ %{Werror=poison-system-directories:--error-poison-system-directories} \
- %{static|no-pie|static-pie:} %{L*} %(mfwrap) %(link_libgcc) " \
- VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o " CHKP_SPEC " \
+ %{static|no-pie|static-pie:} %@{L*} %(mfwrap) %(link_libgcc) " \
+ VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \
%{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
diff --git a/gcc/incpath.c b/gcc/incpath.c
-index b11c6a57939..e3b7a21966f 100644
+index bcbe2082905..5752298bbf2 100644
--- a/gcc/incpath.c
+++ b/gcc/incpath.c
@@ -26,6 +26,7 @@
@@ -190,5 +199,5 @@ index b11c6a57939..e3b7a21966f 100644
/* Use given -I paths for #include "..." but not #include <...>, and
--
-2.17.0
+2.22.1
diff --git a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0007-optional-libstdc.patch b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0007-optional-libstdc.patch
index 721ea03f..f4fac914 100644
--- a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0007-optional-libstdc.patch
+++ b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0007-optional-libstdc.patch
@@ -1,7 +1,7 @@
-From fb7df63e9548c29b70601d642a1850fc455f8565 Mon Sep 17 00:00:00 2001
+From e7e504f4a90cfa395e7f8ee779f8c3ed687802ca Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 29 Mar 2013 09:12:56 +0400
-Subject: [PATCH 07/39] optional libstdc
+Subject: [PATCH 05/36] optional libstdc
gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++
will not run correctly since by default the linker will try to link against libstdc++
@@ -25,10 +25,10 @@ Upstream-Status: Inappropriate [embedded specific]
4 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
-index 5013501b232..6312f2c8f90 100644
+index 916cc67b453..41619fa591c 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
-@@ -1900,6 +1900,10 @@ nostdinc++
+@@ -1952,6 +1952,10 @@ nostdinc++
C++ ObjC++
Do not search standard system include directories for C++.
@@ -40,7 +40,7 @@ index 5013501b232..6312f2c8f90 100644
C ObjC C++ ObjC++ Joined Separate
; Documented in common.opt
diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c
-index 443a1746da3..e9b51be62ef 100644
+index 6c4574a837d..0e2657f00ee 100644
--- a/gcc/cp/g++spec.c
+++ b/gcc/cp/g++spec.c
@@ -137,6 +137,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
@@ -52,10 +52,10 @@ index 443a1746da3..e9b51be62ef 100644
library = -1;
break;
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index cb71b60fe3c..b0d481e3a30 100644
+index 09414d8cc05..a43969bc9f0 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
-@@ -211,6 +211,9 @@ in the following sections.
+@@ -228,6 +228,9 @@ in the following sections.
-fno-weak -nostdinc++ @gol
-fvisibility-inlines-hidden @gol
-fvisibility-ms-compat @gol
@@ -64,19 +64,19 @@ index cb71b60fe3c..b0d481e3a30 100644
+-nostdlib++ @gol
-fext-numeric-literals @gol
-Wabi=@var{n} -Wabi-tag -Wconversion-null -Wctor-dtor-privacy @gol
- -Wdelete-non-virtual-dtor -Wliteral-suffix -Wmultiple-inheritance @gol
-@@ -509,7 +512,7 @@ Objective-C and Objective-C++ Dialects}.
- -s -static -static-pie -static-libgcc -static-libstdc++ @gol
+ -Wdelete-non-virtual-dtor -Wdeprecated-copy -Wdeprecated-copy-dtor @gol
+@@ -538,7 +541,7 @@ Objective-C and Objective-C++ Dialects}.
+ -pie -pthread -r -rdynamic @gol
+ -s -static -static-pie -static-libgcc -static-libstdc++ @gol
-static-libasan -static-libtsan -static-liblsan -static-libubsan @gol
- -static-libmpx -static-libmpxwrappers @gol
--shared -shared-libgcc -symbolic @gol
+-shared -shared-libgcc -symbolic -nostdlib++ @gol
-T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol
-u @var{symbol} -z @var{keyword}}
-@@ -12331,6 +12334,33 @@ library subroutines.
- constructors are called; @pxref{Collect2,,@code{collect2}, gccint,
- GNU Compiler Collection (GCC) Internals}.)
+@@ -13312,6 +13315,33 @@ Specify that the program entry point is @var{entry}. The argument is
+ interpreted by the linker; the GNU linker accepts either a symbol name
+ or an address.
+@item -nostdlib++
+@opindex nostdlib++
@@ -109,17 +109,17 @@ index cb71b60fe3c..b0d481e3a30 100644
@opindex pie
Produce a dynamically linked position independent executable on targets
diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 02b3cd39fc2..8cd27a5dad5 100644
+index a2601a6bb06..cd6c6fc95db 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
-@@ -1047,6 +1047,7 @@ proper position among the other output files. */
+@@ -1052,6 +1052,7 @@ proper position among the other output files. */
%(mflib) " STACK_SPLIT_SPEC "\
%{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \
- %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\
+ %{!nostdlib:%{!r:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}}\
+ %{!nostdlib++:}\
- %{!nostdlib:%{!nostartfiles:%E}} %{T*} \n%(post_link) }}}}}}"
+ %{!nostdlib:%{!r:%{!nostartfiles:%E}}} %{T*} \n%(post_link) }}}}}}"
#endif
--
-2.17.0
+2.22.1
diff --git a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0012-cpp-honor-sysroot.patch b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0012-cpp-honor-sysroot.patch
index 961f96f1..6af0a012 100644
--- a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0012-cpp-honor-sysroot.patch
+++ b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0012-cpp-honor-sysroot.patch
@@ -1,7 +1,7 @@
-From b3e8e7e8ae106e3207e9edc3d23dcce1464b755f Mon Sep 17 00:00:00 2001
+From 45e9cd39d9c62454d46b9e9473a0c1034ceca15d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 29 Mar 2013 09:22:00 +0400
-Subject: [PATCH 12/39] cpp: honor sysroot.
+Subject: [PATCH 09/36] cpp: honor sysroot.
Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile
preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location
@@ -26,21 +26,21 @@ Upstream-Status: Pending
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h
-index f0802b8915c..f324d299849 100644
+index c6e42eda283..e1ddf066467 100644
--- a/gcc/cp/lang-specs.h
+++ b/gcc/cp/lang-specs.h
-@@ -64,5 +64,5 @@ along with GCC; see the file COPYING3. If not see
+@@ -66,5 +66,5 @@ along with GCC; see the file COPYING3. If not see
{".ii", "@c++-cpp-output", 0, 0, 0},
{"@c++-cpp-output",
- "%{!M:%{!MM:%{!E:\
-- cc1plus -fpreprocessed %i %(cc1_options) %2\
-+ cc1plus -fpreprocessed %i %I %(cc1_options) %2\
- %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+ "%{!E:%{!M:%{!MM:"
+- " cc1plus -fpreprocessed %i %(cc1_options) %2"
++ " cc1plus -fpreprocessed %i %I %(cc1_options) %2"
+ " %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
diff --git a/gcc/gcc.c b/gcc/gcc.c
-index d355d65583a..570cdc00034 100644
+index 7da9c5d457b..4e7c45b268c 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
-@@ -1343,7 +1343,7 @@ static const struct compiler default_compilers[] =
+@@ -1349,7 +1349,7 @@ static const struct compiler default_compilers[] =
%W{o*:--output-pch=%*}}%V}}}}}}}", 0, 0, 0},
{".i", "@cpp-output", 0, 0, 0},
{"@cpp-output",
@@ -50,5 +50,5 @@ index d355d65583a..570cdc00034 100644
{"@assembler",
"%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0},
--
-2.17.0
+2.22.1
diff --git a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0014-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0014-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
index 043bb9dd..66fb24d4 100644
--- a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0014-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
+++ b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0014-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
@@ -1,7 +1,7 @@
-From 53f1c382b1366c5621c8edead9c766950c290fd9 Mon Sep 17 00:00:00 2001
+From 72fc3975bcd720b2f8040fa87cd23d3db4c5975a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 29 Mar 2013 09:24:50 +0400
-Subject: [PATCH 14/39] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
+Subject: [PATCH] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
relative to SYSTEMLIBS_DIR
This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
@@ -24,14 +24,14 @@ Upstream-Status: Inappropriate [OE configuration]
gcc/config/linux.h | 8 ++++----
gcc/config/mips/linux.h | 12 ++++++------
gcc/config/riscv/linux.h | 2 +-
- gcc/config/rs6000/linux64.h | 16 ++++++----------
+ gcc/config/rs6000/linux64.h | 15 +++++----------
gcc/config/sh/linux.h | 2 +-
gcc/config/sparc/linux.h | 2 +-
gcc/config/sparc/linux64.h | 4 ++--
- 12 files changed, 30 insertions(+), 34 deletions(-)
+ 12 files changed, 29 insertions(+), 34 deletions(-)
diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
-index 36b74dc1993..02373578af8 100644
+index 824861befec..6afacce3292 100644
--- a/gcc/config/alpha/linux-elf.h
+++ b/gcc/config/alpha/linux-elf.h
@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see
@@ -46,10 +46,10 @@ index 36b74dc1993..02373578af8 100644
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
#elif DEFAULT_LIBC == LIBC_GLIBC
diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
-index 8585fde3d41..b3af68cac57 100644
+index 66ec0ea3980..e4ade2e2ab0 100644
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
-@@ -62,8 +62,8 @@
+@@ -65,8 +65,8 @@
GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */
#undef GLIBC_DYNAMIC_LINKER
@@ -61,7 +61,7 @@ index 8585fde3d41..b3af68cac57 100644
#define GLIBC_DYNAMIC_LINKER \
diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
-index cfcd9cb1a5c..a798e987ecb 100644
+index 9a360defd21..98f6e960b64 100644
--- a/gcc/config/arm/linux-elf.h
+++ b/gcc/config/arm/linux-elf.h
@@ -60,7 +60,7 @@
@@ -74,7 +74,7 @@ index cfcd9cb1a5c..a798e987ecb 100644
#define LINUX_TARGET_LINK_SPEC "%{h*} \
%{static:-Bstatic} \
diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
-index 69f97f15b0d..71bc31d9231 100644
+index 9a6e2d99896..31efbb73016 100644
--- a/gcc/config/i386/linux.h
+++ b/gcc/config/i386/linux.h
@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see
@@ -87,7 +87,7 @@ index 69f97f15b0d..71bc31d9231 100644
#undef MUSL_DYNAMIC_LINKER
#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
-index f2d913e30ac..8725f33d8a5 100644
+index c08221c4210..dbb474d792b 100644
--- a/gcc/config/i386/linux64.h
+++ b/gcc/config/i386/linux64.h
@@ -27,9 +27,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
@@ -104,10 +104,10 @@ index f2d913e30ac..8725f33d8a5 100644
#undef MUSL_DYNAMIC_LINKER32
#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
diff --git a/gcc/config/linux.h b/gcc/config/linux.h
-index 2ea4ff92c1d..487b0c0923b 100644
+index c3c4a219e67..4b05d8e93d1 100644
--- a/gcc/config/linux.h
+++ b/gcc/config/linux.h
-@@ -81,10 +81,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+@@ -94,10 +94,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
supporting both 32-bit and 64-bit compilation. */
@@ -123,7 +123,7 @@ index 2ea4ff92c1d..487b0c0923b 100644
#define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
#define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
-index 2dfd0c18b90..12057c51b5e 100644
+index 6f79ac9c01a..25de96f9561 100644
--- a/gcc/config/mips/linux.h
+++ b/gcc/config/mips/linux.h
@@ -22,20 +22,20 @@ along with GCC; see the file COPYING3. If not see
@@ -154,10 +154,10 @@ index 2dfd0c18b90..12057c51b5e 100644
#undef MUSL_DYNAMIC_LINKER32
#define MUSL_DYNAMIC_LINKER32 \
diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
-index aa8a28d5d..ebf9551c9 100644
+index 58dd18b89f3..112ba9cd764 100644
--- a/gcc/config/riscv/linux.h
+++ b/gcc/config/riscv/linux.h
-@@ -22,7 +22,7 @@ along with GCC; see the file COPYING3.
+@@ -22,7 +22,7 @@ along with GCC; see the file COPYING3. If not see
GNU_USER_TARGET_OS_CPP_BUILTINS(); \
} while (0)
@@ -167,10 +167,10 @@ index aa8a28d5d..ebf9551c9 100644
#define MUSL_ABI_SUFFIX \
"%{mabi=ilp32:-sf}" \
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
-index 90fe6566255..55695dadd91 100644
+index 9946d3fed94..45a9a7cae59 100644
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
-@@ -420,16 +420,11 @@ extern int dot_symbols;
+@@ -423,24 +423,19 @@ extern int dot_symbols;
#undef LINK_OS_DEFAULT_SPEC
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
@@ -189,21 +189,19 @@ index 90fe6566255..55695dadd91 100644
+#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:" SYSTEMLIBS_DIR "ld64.so.2;:" SYSTEMLIBS_DIR "ld64.so.1}"
#endif
+ #undef MUSL_DYNAMIC_LINKER32
#define MUSL_DYNAMIC_LINKER32 \
-@@ -437,8 +432,9 @@ extern int dot_symbols;
+- "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
++ SYSTEMLIBS_DIR "ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
+ #undef MUSL_DYNAMIC_LINKER64
#define MUSL_DYNAMIC_LINKER64 \
- "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
+- "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
++ SYSTEMLIBS_DIR "ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
-+
- #if DEFAULT_LIBC == LIBC_UCLIBC
- #define CHOOSE_DYNAMIC_LINKER(G, U, M) \
- "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
+ #undef DEFAULT_ASM_ENDIAN
+ #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h
-index 6d2ccd012ba..ec78a89ce15 100644
+index c9897b7aca5..82f275319cc 100644
--- a/gcc/config/sh/linux.h
+++ b/gcc/config/sh/linux.h
@@ -64,7 +64,7 @@ along with GCC; see the file COPYING3. If not see
@@ -216,10 +214,10 @@ index 6d2ccd012ba..ec78a89ce15 100644
#undef SUBTARGET_LINK_EMUL_SUFFIX
#define SUBTARGET_LINK_EMUL_SUFFIX "%{mfdpic:_fd;:_linux}"
diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
-index 9fb03af0fe9..401fddbbb22 100644
+index 08476f1d94d..80440e712ad 100644
--- a/gcc/config/sparc/linux.h
+++ b/gcc/config/sparc/linux.h
-@@ -83,7 +83,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
+@@ -84,7 +84,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
When the -shared link option is used a final link is not being
done. */
@@ -229,7 +227,7 @@ index 9fb03af0fe9..401fddbbb22 100644
#undef LINK_SPEC
#define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
-index c1fe42165b7..26a79bfa2e3 100644
+index 789d1df4bd5..b920c680fb1 100644
--- a/gcc/config/sparc/linux64.h
+++ b/gcc/config/sparc/linux64.h
@@ -84,8 +84,8 @@ along with GCC; see the file COPYING3. If not see
@@ -243,6 +241,3 @@ index c1fe42165b7..26a79bfa2e3 100644
#ifdef SPARC_BI_ARCH
---
-2.17.0
-
diff --git a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0037-sync-gcc-stddef.h-with-musl.patch b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0037-sync-gcc-stddef.h-with-musl.patch
index f8a7f41a..b99ac429 100644
--- a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0037-sync-gcc-stddef.h-with-musl.patch
+++ b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0037-sync-gcc-stddef.h-with-musl.patch
@@ -1,23 +1,23 @@
-From 602abaab15ffb60bf1797187a71b485042c56360 Mon Sep 17 00:00:00 2001
+From 39e2f61d262f9f6c7a91068998dea80791ef665e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 3 Feb 2017 12:56:00 -0800
-Subject: [PATCH 37/39] sync gcc stddef.h with musl
+Subject: [PATCH 33/36] sync gcc stddef.h with musl
musl defines ptrdiff_t size_t and wchar_t
so dont define them here if musl is definining them
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
gcc/ginclude/stddef.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
-index 31b96a7e5e1..438a3ce7c56 100644
+index da692e1c01a..9a00c261adb 100644
--- a/gcc/ginclude/stddef.h
+++ b/gcc/ginclude/stddef.h
-@@ -134,6 +134,7 @@ _TYPE_wchar_t;
+@@ -128,6 +128,7 @@ _TYPE_wchar_t;
#ifndef ___int_ptrdiff_t_h
#ifndef _GCC_PTRDIFF_T
#ifndef _PTRDIFF_T_DECLARED /* DragonFly */
@@ -25,7 +25,7 @@ index 31b96a7e5e1..438a3ce7c56 100644
#define _PTRDIFF_T
#define _T_PTRDIFF_
#define _T_PTRDIFF
-@@ -143,10 +144,12 @@ _TYPE_wchar_t;
+@@ -137,10 +138,12 @@ _TYPE_wchar_t;
#define ___int_ptrdiff_t_h
#define _GCC_PTRDIFF_T
#define _PTRDIFF_T_DECLARED
@@ -38,7 +38,7 @@ index 31b96a7e5e1..438a3ce7c56 100644
#endif /* _PTRDIFF_T_DECLARED */
#endif /* _GCC_PTRDIFF_T */
#endif /* ___int_ptrdiff_t_h */
-@@ -184,6 +187,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
+@@ -178,6 +181,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
#ifndef _GCC_SIZE_T
#ifndef _SIZET_
#ifndef __size_t
@@ -46,15 +46,15 @@ index 31b96a7e5e1..438a3ce7c56 100644
#define __size_t__ /* BeOS */
#define __SIZE_T__ /* Cray Unicos/Mk */
#define _SIZE_T
-@@ -200,6 +204,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
+@@ -194,6 +198,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
#define ___int_size_t_h
#define _GCC_SIZE_T
#define _SIZET_
+#define __DEFINED_size_t /* musl */
- #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
+ #if defined (__FreeBSD__) \
|| defined(__DragonFly__) \
- || defined(__FreeBSD_kernel__)
-@@ -235,6 +240,7 @@ typedef long ssize_t;
+ || defined(__FreeBSD_kernel__) \
+@@ -228,6 +233,7 @@ typedef long ssize_t;
#endif /* _SIZE_T */
#endif /* __SIZE_T__ */
#endif /* __size_t__ */
@@ -62,7 +62,7 @@ index 31b96a7e5e1..438a3ce7c56 100644
#undef __need_size_t
#endif /* _STDDEF_H or __need_size_t. */
-@@ -264,6 +270,7 @@ typedef long ssize_t;
+@@ -257,6 +263,7 @@ typedef long ssize_t;
#ifndef ___int_wchar_t_h
#ifndef __INT_WCHAR_T_H
#ifndef _GCC_WCHAR_T
@@ -70,7 +70,7 @@ index 31b96a7e5e1..438a3ce7c56 100644
#define __wchar_t__ /* BeOS */
#define __WCHAR_T__ /* Cray Unicos/Mk */
#define _WCHAR_T
-@@ -279,6 +286,7 @@ typedef long ssize_t;
+@@ -272,6 +279,7 @@ typedef long ssize_t;
#define __INT_WCHAR_T_H
#define _GCC_WCHAR_T
#define _WCHAR_T_DECLARED
@@ -78,7 +78,7 @@ index 31b96a7e5e1..438a3ce7c56 100644
/* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_
instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other
-@@ -344,6 +352,7 @@ typedef __WCHAR_TYPE__ wchar_t;
+@@ -337,6 +345,7 @@ typedef __WCHAR_TYPE__ wchar_t;
#endif
#endif /* __WCHAR_T__ */
#endif /* __wchar_t__ */
@@ -87,5 +87,5 @@ index 31b96a7e5e1..438a3ce7c56 100644
#endif /* _STDDEF_H or __need_wchar_t. */
--
-2.17.0
+2.22.1
diff --git a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-cross-initial_arc.bb b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-cross-initial_arc.bb
index 22d4b05c..d9354f42 100644
--- a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-cross-initial_arc.bb
+++ b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-cross-initial_arc.bb
@@ -1,2 +1,2 @@
require recipes-devtools/gcc/gcc-cross_${PV}.bb
-require recipes-devtools/gcc/gcc-cross-initial.inc
+require recipes-devtools/gcc/gcc-cross.inc
diff --git a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-crosssdk-initial_arc.bb b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-crosssdk-initial_arc.bb
index c0b66267..886c7f12 100644
--- a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-crosssdk-initial_arc.bb
+++ b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-crosssdk-initial_arc.bb
@@ -1,3 +1,3 @@
require recipes-devtools/gcc/gcc-cross-initial_${PV}.bb
-require recipes-devtools/gcc/gcc-crosssdk-initial.inc
+require recipes-devtools/gcc/gcc-crosssdk.inc
diff --git a/bsp/meta-synopsys/recipes-devtools/gcc/libgcc_arc.bb b/bsp/meta-synopsys/recipes-devtools/gcc/libgcc_arc.bb
index 21ad7653..340300cd 100644
--- a/bsp/meta-synopsys/recipes-devtools/gcc/libgcc_arc.bb
+++ b/bsp/meta-synopsys/recipes-devtools/gcc/libgcc_arc.bb
@@ -1,9 +1,2 @@
require recipes-devtools/gcc/gcc-${PV}.inc
require recipes-devtools/gcc/libgcc.inc
-INSANE_SKIP_${PN} = "ldflags staticdev"
-INSANE_SKIP_${PN}-dev = "ldflags staticdev"
-INSANE_SKIP_${PN} = "staticdev"
-INSANE_SKIP_libgcc_eh = "staticdev"
-INSANE_SKIP_libgcc_eh-dev = "staticdev"
-INSANE_SKIP_libgcov-dev = "staticdev"
-INSANE_SKIP_libgcov = "staticdev"
diff --git a/bsp/meta-synopsys/recipes-devtools/gcc/ltmain.sh b/bsp/meta-synopsys/recipes-devtools/gcc/ltmain.sh
new file mode 120000
index 00000000..00e62a0e
--- /dev/null
+++ b/bsp/meta-synopsys/recipes-devtools/gcc/ltmain.sh
@@ -0,0 +1 @@
+/global/freeware/Linux/RHEL7/libtool/share/libtool/build-aux/ltmain.sh \ No newline at end of file
diff --git a/bsp/meta-synopsys/recipes-devtools/meson/files/0001-mesonbuild-Recognise-ARC-architecture.patch b/bsp/meta-synopsys/recipes-devtools/meson/files/0001-mesonbuild-Recognise-ARC-architecture.patch
deleted file mode 100644
index f26bdf3e..00000000
--- a/bsp/meta-synopsys/recipes-devtools/meson/files/0001-mesonbuild-Recognise-ARC-architecture.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 9f14ab34c27b99848d558576e365503eebe3882c Mon Sep 17 00:00:00 2001
-From: Alexey Brodkin <abrodkin@synopsys.com>
-Date: Fri, 21 Sep 2018 00:11:57 +0300
-Subject: [PATCH] mesonbuild: Recognise ARC architecture
-
--------------------------->8-----------------------
-root@nsimhs:~# python
-
-Python 2.7.15 (default, Sep 20 2018, 21:44:15)
-[GCC 8.2.0] on linux2
-Type "help", "copyright", "credits" or "license" for more information.
->>>
->>> import platform
->>> print platform.machine()
-arc
--------------------------->8-----------------------
-
-Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
-
-Upstream-satus: Submitted [https://github.com/mesonbuild/meson/pull/4234]
----
- mesonbuild/environment.py | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
-index d29a77f0e019..13354c720269 100644
---- a/mesonbuild/environment.py
-+++ b/mesonbuild/environment.py
-@@ -76,6 +76,7 @@ build_filename = 'meson.build'
-
- known_cpu_families = (
- 'aarch64',
-+ 'arc',
- 'arm',
- 'e2k',
- 'ia64',
---
-2.17.1
-
diff --git a/bsp/meta-synopsys/recipes-devtools/meson/meson_0.47.2.bbappend b/bsp/meta-synopsys/recipes-devtools/meson/meson_0.47.2.bbappend
deleted file mode 100644
index da0f1665..00000000
--- a/bsp/meta-synopsys/recipes-devtools/meson/meson_0.47.2.bbappend
+++ /dev/null
@@ -1,2 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-SRC_URI += "file://0001-mesonbuild-Recognise-ARC-architecture.patch "
diff --git a/bsp/meta-synopsys/recipes-extended/mozjs/mozjs/0001-Add-ARC-CPU-support.patch b/bsp/meta-synopsys/recipes-extended/mozjs/mozjs/0001-Add-ARC-CPU-support.patch
index e0ccee2a..5d90d4bd 100644
--- a/bsp/meta-synopsys/recipes-extended/mozjs/mozjs/0001-Add-ARC-CPU-support.patch
+++ b/bsp/meta-synopsys/recipes-extended/mozjs/mozjs/0001-Add-ARC-CPU-support.patch
@@ -1,18 +1,18 @@
-From e1a1c4b3daa5fdddae579405f32989156ff9db92 Mon Sep 17 00:00:00 2001
+From 9171149440fcb1e8c3459372716577cd81e62734 Mon Sep 17 00:00:00 2001
From: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
-Date: Tue, 26 Mar 2019 10:24:17 +0300
-Subject: [PATCH] Add ARC support
+Date: Thu, 2 Apr 2020 20:33:21 +0300
+Subject: [PATCH] mozjs: Introduce ARC support
Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
---
- build/autoconf/config.guess | 3 +++
- build/moz.configure/init.configure | 3 +++
- mfbt/double-conversion/utils.h | 2 +-
- python/mozbuild/mozbuild/configure/constants.py | 2 ++
+ build/autoconf/config.guess | 3 +++
+ build/moz.configure/init.configure | 3 +++
+ mfbt/double-conversion/double-conversion/utils.h | 2 +-
+ python/mozbuild/mozbuild/configure/constants.py | 2 ++
4 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/build/autoconf/config.guess b/build/autoconf/config.guess
-index 1277a862..e3c40ec7 100755
+index 1277a86..e3c40ec 100755
--- a/build/autoconf/config.guess
+++ b/build/autoconf/config.guess
@@ -1032,6 +1032,9 @@ EOF
@@ -26,45 +26,45 @@ index 1277a862..e3c40ec7 100755
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
-index 56e6730f..85a944c9 100644
+index 648ac2d..7618f08 100644
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
-@@ -365,6 +365,9 @@ def split_triplet(triplet):
+@@ -661,6 +661,9 @@ def split_triplet(triplet, allow_unknown=False):
elif cpu in ('riscv32', 'riscv64'):
canonical_cpu = cpu
endianness = 'little'
+ elif cpu in ('arc'):
+ canonical_cpu = 'arc'
+ endianness = 'little'
- else:
- die('Unknown CPU type: %s' % cpu)
-
-diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h
-index 4f372180..c0680791 100644
---- a/mfbt/double-conversion/utils.h
-+++ b/mfbt/double-conversion/utils.h
-@@ -61,7 +61,7 @@
+ elif allow_unknown:
+ canonical_cpu = cpu
+ endianness = 'unknown'
+diff --git a/mfbt/double-conversion/double-conversion/utils.h b/mfbt/double-conversion/double-conversion/utils.h
+index 5f17c04..f4ff736 100644
+--- a/mfbt/double-conversion/double-conversion/utils.h
++++ b/mfbt/double-conversion/double-conversion/utils.h
+@@ -77,7 +77,7 @@ inline void abort_noreturn() { MOZ_CRASH(); }
defined(__SH4__) || defined(__alpha__) || \
defined(_MIPS_ARCH_MIPS32R2) || \
defined(__AARCH64EL__) || defined(__aarch64__) || \
- defined(__riscv)
+ defined(__riscv) || defined(__arc__)
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
- #elif defined(_M_IX86) || defined(__i386__) || defined(__i386)
- #if defined(_WIN32)
+ #elif defined(__mc68000__)
+ #undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS
diff --git a/python/mozbuild/mozbuild/configure/constants.py b/python/mozbuild/mozbuild/configure/constants.py
-index 4f8d6666..3cef1f50 100644
+index 1067b6a..1f700b8 100644
--- a/python/mozbuild/mozbuild/configure/constants.py
+++ b/python/mozbuild/mozbuild/configure/constants.py
-@@ -50,6 +50,7 @@ CPU_bitness = {
+@@ -52,6 +52,7 @@ CPU_bitness = {
'ppc64': 64,
'riscv32': 32,
'riscv64': 64,
+ 'arc': 32,
's390': 32,
's390x': 64,
- 'sparc': 32,
-@@ -83,6 +84,7 @@ CPU_preprocessor_checks = OrderedDict((
+ 'sh4': 32,
+@@ -86,6 +87,7 @@ CPU_preprocessor_checks = OrderedDict((
('ppc', '__powerpc__'),
('riscv32', '__riscv && __SIZEOF_POINTER__ == 4'),
('riscv64', '__riscv && __SIZEOF_POINTER__ == 8'),
diff --git a/bsp/meta-synopsys/recipes-extended/mozjs/mozjs/0001-arc-Disable-atomic-operations.patch b/bsp/meta-synopsys/recipes-extended/mozjs/mozjs/0001-arc-Disable-atomic-operations.patch
new file mode 100644
index 00000000..b609889a
--- /dev/null
+++ b/bsp/meta-synopsys/recipes-extended/mozjs/mozjs/0001-arc-Disable-atomic-operations.patch
@@ -0,0 +1,42 @@
+From d8881cbf62d8bb5bc2acc57a5cf976138446c2bc Mon Sep 17 00:00:00 2001
+From: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
+Date: Thu, 2 Apr 2020 20:59:21 +0300
+Subject: [PATCH] arc: Disable atomic operations
+
+Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
+---
+ js/src/jit/AtomicOperations.h | 2 ++
+ js/src/jit/none/AtomicOperations-feeling-lucky.h | 4 ++++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/js/src/jit/AtomicOperations.h b/js/src/jit/AtomicOperations.h
+index fda0b14..d583e4b 100644
+--- a/js/src/jit/AtomicOperations.h
++++ b/js/src/jit/AtomicOperations.h
+@@ -395,6 +395,8 @@ inline bool AtomicOperations::isLockfreeJS(int32_t size) {
+ #include "jit/none/AtomicOperations-feeling-lucky.h"
+ #elif defined(__riscv)
+ #include "jit/none/AtomicOperations-feeling-lucky.h"
++#elif defined(__arc__)
++#include "jit/none/AtomicOperations-feeling-lucky.h"
+ #else
+ #error "No AtomicOperations support provided for this platform"
+ #endif
+diff --git a/js/src/jit/none/AtomicOperations-feeling-lucky.h b/js/src/jit/none/AtomicOperations-feeling-lucky.h
+index 42b1f3e..f49f680 100644
+--- a/js/src/jit/none/AtomicOperations-feeling-lucky.h
++++ b/js/src/jit/none/AtomicOperations-feeling-lucky.h
+@@ -88,6 +88,10 @@
+ #endif
+ #endif
+
++#ifdef __arc__
++#define GNUC_COMPATIBLE
++#endif
++
+ // The default implementation tactic for gcc/clang is to use the newer
+ // __atomic intrinsics added for use in C++11 <atomic>. Where that
+ // isn't available, we use GCC's older __sync functions instead.
+--
+2.16.2
+
diff --git a/bsp/meta-synopsys/recipes-extended/mozjs/mozjs_52.9.1.bbappend b/bsp/meta-synopsys/recipes-extended/mozjs/mozjs_60.9.0.bbappend
index 903f5815..fa4a49e2 100644
--- a/bsp/meta-synopsys/recipes-extended/mozjs/mozjs_52.9.1.bbappend
+++ b/bsp/meta-synopsys/recipes-extended/mozjs/mozjs_60.9.0.bbappend
@@ -1,5 +1,6 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/mozjs:"
SRC_URI_append += "\
file://0001-Add-ARC-CPU-support.patch; \
+ file://0001-arc-Disable-atomic-operations.patch; \
"
diff --git a/bsp/meta-synopsys/recipes-graphics/mesa/mesa_%.bbappend b/bsp/meta-synopsys/recipes-graphics/mesa/mesa_%.bbappend
index 9b38eb6f..fa6b53ff 100644
--- a/bsp/meta-synopsys/recipes-graphics/mesa/mesa_%.bbappend
+++ b/bsp/meta-synopsys/recipes-graphics/mesa/mesa_%.bbappend
@@ -1,4 +1,4 @@
PACKAGECONFIG[wayland] += " wayland-protocols"
PACKAGECONFIG_append = " gallium"
-GALLIUMDRIVERS_append = ",imx,etnaviv"
+GALLIUMDRIVERS_append = ",etnaviv"
diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/agl-compositor_git.bbappend b/bsp/meta-synopsys/recipes-graphics/wayland/agl-compositor_git.bbappend
new file mode 100644
index 00000000..626424a6
--- /dev/null
+++ b/bsp/meta-synopsys/recipes-graphics/wayland/agl-compositor_git.bbappend
@@ -0,0 +1,6 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+SRC_URI += "\
+ file://0001-Fix-build-with-GCC9.patch; \
+"
+
+
diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/files/0001-Fix-build-with-GCC9.patch b/bsp/meta-synopsys/recipes-graphics/wayland/files/0001-Fix-build-with-GCC9.patch
new file mode 100644
index 00000000..d66c79e5
--- /dev/null
+++ b/bsp/meta-synopsys/recipes-graphics/wayland/files/0001-Fix-build-with-GCC9.patch
@@ -0,0 +1,26 @@
+From 88bee9ba10dbbcd8d58d8444baf638a570b3679d Mon Sep 17 00:00:00 2001
+From: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
+Date: Tue, 14 Jul 2020 15:03:27 +0300
+Subject: [PATCH] Fix build with GCC9
+
+Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
+---
+ src/main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/main.c b/src/main.c
+index 99512d5..4adf9ce 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -1235,7 +1235,7 @@ log_timestamp(char *buf, size_t len)
+
+ strftime(timestr, sizeof(timestr), "%H:%M:%S", brokendown_time);
+ /* if datestr is empty it prints only timestr*/
+- snprintf(buf, len, "%s[%s.%03li]", datestr,
++ snprintf(buf, len, "%s[%s.%03lli]", datestr,
+ timestr, (tv.tv_usec / 1000));
+
+ return buf;
+--
+2.16.2
+
diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1001-os-compatibility-define-CLOCK_BOOTTIME-when-not-avai.patch b/bsp/meta-synopsys/recipes-graphics/wayland/weston/1001-os-compatibility-define-CLOCK_BOOTTIME-when-not-avai.patch
deleted file mode 100644
index a7f2a34a..00000000
--- a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1001-os-compatibility-define-CLOCK_BOOTTIME-when-not-avai.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 66b71951f8ce66f02040f8814e1d89db34c34a87 Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Date: Sun, 22 Feb 2015 12:36:00 +0100
-Subject: [PATCH] os-compatibility: define CLOCK_BOOTTIME when not available
-
-CLOCK_BOOTTIME is supposed to be provided by the C library headers,
-but uClibc 0.9.33.2 does not provide it. Instead of depending on an
-uClibc patch, let's make Weston define it to the right value when not
-already defined by the C library.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- shared/os-compatibility.h | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/shared/os-compatibility.h b/shared/os-compatibility.h
-index 172bb7e..e369899 100644
---- a/shared/os-compatibility.h
-+++ b/shared/os-compatibility.h
-@@ -26,6 +26,7 @@
- #include "config.h"
-
- #include <sys/types.h>
-+#include <time.h>
-
- #ifdef HAVE_EXECINFO_H
- #include <execinfo.h>
-@@ -37,6 +38,10 @@ backtrace(void **buffer, int size)
- }
- #endif
-
-+#ifndef CLOCK_BOOTTIME
-+#define CLOCK_BOOTTIME 7
-+#endif
-+
- int
- os_socketpair_cloexec(int domain, int type, int protocol, int *sv);
-
---
-2.1.0
-
diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1005-protocol-add-weston-debug.xml.patch b/bsp/meta-synopsys/recipes-graphics/wayland/weston/1005-protocol-add-weston-debug.xml.patch
deleted file mode 100644
index 4ca79b72..00000000
--- a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1005-protocol-add-weston-debug.xml.patch
+++ /dev/null
@@ -1,242 +0,0 @@
-From 4fc1ee8d5b5c2a66fcc1a5bafad3eb95c3759bac Mon Sep 17 00:00:00 2001
-From: Pekka Paalanen <pq@iki.fi>
-Date: Thu, 12 Oct 2017 13:13:41 +0200
-Subject: [PATCH 05/46] protocol: add weston-debug.xml
-
-This is a new debugging extension for non-production environments. The
-aim is to replace all build-time choosable debug prints in the
-compositor with runtime subscribable debug streams.
-
-Signed-off-by: Pekka Paalanen <pq@iki.fi>
-
-Added new libweston-$MAJOR-protocols.pc file and install that
-for external projects to find the XML files installed by libweston.
-
-Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
-
-Use noarch_pkgconfig_DATA instead, add ${pc_sysrootdir}, drop
-unnecessary EXTRA_DIST of weston-debug.xml.
-
-Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
-Add explicit advertisement of available debug interfaces.
-
-Signed-off-by: Daniel Stone <daniels@collabora.com>
-Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
----
- Makefile.am | 10 +++
- configure.ac | 1 +
- libweston/libweston-protocols.pc.in | 7 ++
- protocol/weston-debug.xml | 139 ++++++++++++++++++++++++++++++++++++
- 4 files changed, 157 insertions(+)
- create mode 100644 libweston/libweston-protocols.pc.in
- create mode 100644 protocol/weston-debug.xml
-
-diff --git a/Makefile.am b/Makefile.am
-index 83546b7c..e38ac009 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -104,6 +104,10 @@ libweston_@LIBWESTON_MAJOR@_la_SOURCES = \
- shared/platform.h \
- shared/weston-egl-ext.h
-
-+libweston_@LIBWESTON_MAJOR@_datadir = $(datadir)/weston/protocols
-+dist_libweston_@LIBWESTON_MAJOR@_data_DATA = \
-+ protocol/weston-debug.xml
-+
- lib_LTLIBRARIES += libweston-desktop-@LIBWESTON_MAJOR@.la
- libweston_desktop_@LIBWESTON_MAJOR@_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
- libweston_desktop_@LIBWESTON_MAJOR@_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
-@@ -150,6 +154,8 @@ endif
- nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES = \
- protocol/weston-screenshooter-protocol.c \
- protocol/weston-screenshooter-server-protocol.h \
-+ protocol/weston-debug-protocol.c \
-+ protocol/weston-debug-server-protocol.h \
- protocol/text-cursor-position-protocol.c \
- protocol/text-cursor-position-server-protocol.h \
- protocol/text-input-unstable-v1-protocol.c \
-@@ -274,6 +280,10 @@ pkgconfig_DATA = \
- libweston-desktop/libweston-desktop-${LIBWESTON_MAJOR}.pc \
- compositor/weston.pc
-
-+noarch_pkgconfigdir = $(datadir)/pkgconfig
-+noarch_pkgconfig_DATA = \
-+ libweston/libweston-${LIBWESTON_MAJOR}-protocols.pc
-+
- wayland_sessiondir = $(datadir)/wayland-sessions
- dist_wayland_session_DATA = compositor/weston.desktop
-
-diff --git a/configure.ac b/configure.ac
-index ab9ff7c7..cb62a386 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -695,6 +695,7 @@ AC_CONFIG_FILES([Makefile libweston/version.h compositor/weston.pc])
- # libweston_abi_version here, and outside [] because of m4 quoting rules
- AC_CONFIG_FILES([libweston/libweston-]libweston_major_version[.pc:libweston/libweston.pc.in])
- AC_CONFIG_FILES([libweston/libweston-]libweston_major_version[-uninstalled.pc:libweston/libweston-uninstalled.pc.in])
-+AC_CONFIG_FILES([libweston/libweston-]libweston_major_version[-protocols.pc:libweston/libweston-protocols.pc.in])
- AC_CONFIG_FILES([libweston-desktop/libweston-desktop-]libweston_major_version[.pc:libweston-desktop/libweston-desktop.pc.in])
- AC_CONFIG_FILES([libweston-desktop/libweston-desktop-]libweston_major_version[-uninstalled.pc:libweston-desktop/libweston-desktop-uninstalled.pc.in])
-
-diff --git a/libweston/libweston-protocols.pc.in b/libweston/libweston-protocols.pc.in
-new file mode 100644
-index 00000000..6547a0d5
---- /dev/null
-+++ b/libweston/libweston-protocols.pc.in
-@@ -0,0 +1,7 @@
-+prefix=@prefix@
-+datarootdir=@datarootdir@
-+pkgdatadir=${pc_sysrootdir}@datadir@/@PACKAGE@/protocols
-+
-+Name: libWeston Protocols
-+Description: libWeston protocol files
-+Version: @WESTON_VERSION@
-diff --git a/protocol/weston-debug.xml b/protocol/weston-debug.xml
-new file mode 100644
-index 00000000..effa1a19
---- /dev/null
-+++ b/protocol/weston-debug.xml
-@@ -0,0 +1,139 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<protocol name="weston_debug">
-+
-+ <copyright>
-+ Copyright © 2017 Pekka Paalanen pq@iki.fi
-+ Copyright © 2018 Zodiac Inflight Innovations
-+
-+ Permission is hereby granted, free of charge, to any person obtaining a
-+ copy of this software and associated documentation files (the "Software"),
-+ to deal in the Software without restriction, including without limitation
-+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
-+ and/or sell copies of the Software, and to permit persons to whom the
-+ Software is furnished to do so, subject to the following conditions:
-+
-+ The above copyright notice and this permission notice (including the next
-+ paragraph) shall be included in all copies or substantial portions of the
-+ Software.
-+
-+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-+ DEALINGS IN THE SOFTWARE.
-+ </copyright>
-+
-+ <interface name="weston_debug_v1" version="1">
-+ <description summary="weston internal debugging">
-+ This is a generic debugging interface for Weston internals, the global
-+ object advertized through wl_registry.
-+
-+ WARNING: This interface by design allows a denial-of-service attack. It
-+ should not be offered in production, or proper authorization mechnisms
-+ must be enforced.
-+
-+ The idea is for a client to provide a file descriptor that the server
-+ uses for printing debug information. The server uses the file
-+ descriptor in blocking writes mode, which exposes the denial-of-service
-+ risk. The blocking mode is necessary to ensure all debug messages can
-+ be easily printed in place. It also ensures message ordering if a
-+ client subcribes to more than one debug stream.
-+
-+ The available debugging features depend on the server.
-+
-+ A debug stream can be one-shot where the server prints the requested
-+ information and then closes it, or continuous where server keeps on
-+ printing until the client stops it. Or anything in between.
-+ </description>
-+
-+ <request name="destroy" type="destructor">
-+ <description summary="destroy factory object">
-+ Destroys the factory object, but does not affect any other objects.
-+ </description>
-+ </request>
-+
-+ <event name="available">
-+ <description summary="advertise available debug scope">
-+ Advertises an available debug scope which the client may be able to
-+ bind to. No information is provided by the server about the content
-+ contained within the debug streams provided by the scope, once a
-+ client has subscribed.
-+ </description>
-+
-+ <arg name="name" type="string" allow-null="false"
-+ summary="debug stream name"/>
-+ <arg name="description" type="string" allow-null="true"
-+ summary="human-readable description of the debug scope"/>
-+ </event>
-+
-+ <request name="subscribe">
-+ <description summary="subscribe to a debug stream">
-+ Subscribe to a named debug stream. The server will start printing
-+ to the given file descriptor.
-+
-+ If the named debug stream is a one-shot dump, the server will send
-+ weston_debug_stream_v1.complete event once all requested data has
-+ been printed. Otherwise, the server will continue streaming debug
-+ prints until the subscription object is destroyed.
-+
-+ If the debug stream name is unknown to the server, the server will
-+ immediately respond with weston_debug_stream_v1.failure event.
-+ </description>
-+
-+ <arg name="name" type="string" allow-null="false"
-+ summary="debug stream name"/>
-+ <arg name="streamfd" type="fd" summary="write stream file descriptor"/>
-+ <arg name="stream" type="new_id" interface="weston_debug_stream_v1"
-+ summary="created debug stream object"/>
-+ </request>
-+ </interface>
-+
-+ <interface name="weston_debug_stream_v1" version="1">
-+ <description summary="A subscribed debug stream">
-+ Represents one subscribed debug stream, created with
-+ weston_debug_v1.subscribe. When the object is created, it is associated
-+ with a given file descriptor. The server will continue writing to the
-+ file descriptor until the object is destroyed or the server sends an
-+ event through the object.
-+ </description>
-+
-+ <request name="destroy" type="destructor">
-+ <description summary="close a debug stream">
-+ Destroys the object, which causes the server to stop writing into
-+ and closes the associated file descriptor if it was not closed
-+ already.
-+
-+ Use a wl_display.sync if the clients needs to guarantee the file
-+ descriptor is closed before continuing.
-+ </description>
-+ </request>
-+
-+ <event name="complete">
-+ <description summary="server completed the debug stream">
-+ The server has successfully finished writing to and has closed the
-+ associated file descriptor.
-+
-+ This event is delivered only for one-shot debug streams where the
-+ server dumps some data and stop. This is never delivered for
-+ continuous debbug streams because they by definition never complete.
-+ </description>
-+ </event>
-+
-+ <event name="failure">
-+ <description summary="server cannot continue the debug stream">
-+ The server has stopped writing to and has closed the
-+ associated file descriptor. The data already written to the file
-+ descriptor is correct, but it may be truncated.
-+
-+ This event may be delivered at any time and for any kind of debug
-+ stream. It may be due to a failure in or shutdown of the server.
-+ The message argument may provide a hint of the reason.
-+ </description>
-+
-+ <arg name="message" type="string" allow-null="true"
-+ summary="human readable reason"/>
-+ </event>
-+ </interface>
-+</protocol>
---
-2.16.2
-
diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1006-libweston-add-weston_debug-API-and-implementation.patch b/bsp/meta-synopsys/recipes-graphics/wayland/weston/1006-libweston-add-weston_debug-API-and-implementation.patch
deleted file mode 100644
index 83887c66..00000000
--- a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1006-libweston-add-weston_debug-API-and-implementation.patch
+++ /dev/null
@@ -1,958 +0,0 @@
-From a5630eafec4f139adf1da4a5ba54894715d7b50f Mon Sep 17 00:00:00 2001
-From: Pekka Paalanen <pq@iki.fi>
-Date: Thu, 12 Oct 2017 13:13:42 +0200
-Subject: [PATCH 06/46] libweston: add weston_debug API and implementation
-
-weston_debug is both a libweston API for relaying debugging messages,
-and the compositor-debug wayland protocol implementation for accessing those
-debug messages from a Wayland client.
-
-weston_debug_compositor_{create,destroy}() are private API, hence not
-exported.
-
-Signed-off-by: Pekka Paalanen <pq@iki.fi>
-
-append the debug scope name along with the timestamp in
-weston_debug_scope_timestamp API
-
-Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
-Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
-Add explicit advertisement of debug scope names.
-
-Signed-off-by: Daniel Stone <daniels@collabora.com>
-Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
----
- Makefile.am | 2 +
- libweston/compositor.c | 5 +
- libweston/compositor.h | 9 +
- libweston/weston-debug.c | 732 +++++++++++++++++++++++++++++++++++++++++++++++
- libweston/weston-debug.h | 107 +++++++
- 5 files changed, 855 insertions(+)
- create mode 100644 libweston/weston-debug.c
- create mode 100644 libweston/weston-debug.h
-
-diff --git a/Makefile.am b/Makefile.am
-index e38ac009..d5ed3e58 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -96,6 +96,8 @@ libweston_@LIBWESTON_MAJOR@_la_SOURCES = \
- libweston/linux-dmabuf.h \
- libweston/pixel-formats.c \
- libweston/pixel-formats.h \
-+ libweston/weston-debug.c \
-+ libweston/weston-debug.h \
- shared/helpers.h \
- shared/matrix.c \
- shared/matrix.h \
-diff --git a/libweston/compositor.c b/libweston/compositor.c
-index 9deb7817..01616550 100644
---- a/libweston/compositor.c
-+++ b/libweston/compositor.c
-@@ -6361,6 +6361,9 @@ weston_compositor_create(struct wl_display *display, void *user_data)
- ec, bind_presentation))
- goto fail;
-
-+ if (weston_debug_compositor_create(ec) < 0)
-+ goto fail;
-+
- if (weston_input_init(ec) != 0)
- goto fail;
-
-@@ -6702,6 +6705,8 @@ weston_compositor_destroy(struct weston_compositor *compositor)
- if (compositor->heads_changed_source)
- wl_event_source_remove(compositor->heads_changed_source);
-
-+ weston_debug_compositor_destroy(compositor);
-+
- free(compositor);
- }
-
-diff --git a/libweston/compositor.h b/libweston/compositor.h
-index 8b7a1020..33f02b18 100644
---- a/libweston/compositor.h
-+++ b/libweston/compositor.h
-@@ -1048,6 +1048,7 @@ struct weston_touch_calibrator;
-
- struct weston_desktop_xwayland;
- struct weston_desktop_xwayland_interface;
-+struct weston_debug_compositor;
-
- struct weston_compositor {
- struct wl_signal destroy_signal;
-@@ -1160,6 +1161,8 @@ struct weston_compositor {
- weston_touch_calibration_save_func touch_calibration_save;
- struct weston_layer calibrator_layer;
- struct weston_touch_calibrator *touch_calibrator;
-+
-+ struct weston_debug_compositor *weston_debug;
- };
-
- struct weston_buffer {
-@@ -2318,6 +2321,12 @@ int
- weston_compositor_enable_touch_calibrator(struct weston_compositor *compositor,
- weston_touch_calibration_save_func save);
-
-+int
-+weston_debug_compositor_create(struct weston_compositor *compositor);
-+
-+void
-+weston_debug_compositor_destroy(struct weston_compositor *compositor);
-+
- #ifdef __cplusplus
- }
- #endif
-diff --git a/libweston/weston-debug.c b/libweston/weston-debug.c
-new file mode 100644
-index 00000000..04895ad5
---- /dev/null
-+++ b/libweston/weston-debug.c
-@@ -0,0 +1,732 @@
-+/*
-+ * Copyright © 2017 Pekka Paalanen <pq@iki.fi>
-+ * Copyright © 2018 Zodiac Inflight Innovations
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining
-+ * a copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sublicense, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ *
-+ * The above copyright notice and this permission notice (including the
-+ * next paragraph) shall be included in all copies or substantial
-+ * portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-+ * SOFTWARE.
-+ */
-+
-+#include "config.h"
-+
-+#include "weston-debug.h"
-+#include "helpers.h"
-+#include "compositor.h"
-+
-+#include "weston-debug-server-protocol.h"
-+
-+#include <assert.h>
-+#include <unistd.h>
-+#include <stdarg.h>
-+#include <string.h>
-+#include <errno.h>
-+#include <sys/time.h>
-+
-+/** Main weston-debug context
-+ *
-+ * One per weston_compositor.
-+ *
-+ * \internal
-+ */
-+struct weston_debug_compositor {
-+ struct weston_compositor *compositor;
-+ struct wl_listener compositor_destroy_listener;
-+ struct wl_global *global;
-+ struct wl_list scope_list; /**< weston_debug_scope::compositor_link */
-+};
-+
-+/** weston-debug message scope
-+ *
-+ * This is used for scoping debugging messages. Clients can subscribe to
-+ * only the scopes they are interested in. A scope is identified by its name
-+ * (also referred to as debug stream name).
-+ */
-+struct weston_debug_scope {
-+ char *name;
-+ char *desc;
-+ weston_debug_scope_cb begin_cb;
-+ void *user_data;
-+ struct wl_list stream_list; /**< weston_debug_stream::scope_link */
-+ struct wl_list compositor_link;
-+};
-+
-+/** A debug stream created by a client
-+ *
-+ * A client provides a file descriptor for the server to write debug
-+ * messages into. A weston_debug_stream is associated to one
-+ * weston_debug_scope via the scope name, and the scope provides the messages.
-+ * There can be several streams for the same scope, all streams getting the
-+ * same messages.
-+ */
-+struct weston_debug_stream {
-+ int fd; /**< client provided fd */
-+ struct wl_resource *resource; /**< weston_debug_stream_v1 object */
-+ struct wl_list scope_link;
-+};
-+
-+static struct weston_debug_scope *
-+get_scope(struct weston_debug_compositor *wdc, const char *name)
-+{
-+ struct weston_debug_scope *scope;
-+
-+ wl_list_for_each(scope, &wdc->scope_list, compositor_link)
-+ if (strcmp(name, scope->name) == 0)
-+ return scope;
-+
-+ return NULL;
-+}
-+
-+static void
-+stream_close_unlink(struct weston_debug_stream *stream)
-+{
-+ if (stream->fd != -1)
-+ close(stream->fd);
-+ stream->fd = -1;
-+
-+ wl_list_remove(&stream->scope_link);
-+ wl_list_init(&stream->scope_link);
-+}
-+
-+static void WL_PRINTF(2, 3)
-+stream_close_on_failure(struct weston_debug_stream *stream,
-+ const char *fmt, ...)
-+{
-+ char *msg;
-+ va_list ap;
-+ int ret;
-+
-+ stream_close_unlink(stream);
-+
-+ va_start(ap, fmt);
-+ ret = vasprintf(&msg, fmt, ap);
-+ va_end(ap);
-+
-+ if (ret > 0) {
-+ weston_debug_stream_v1_send_failure(stream->resource, msg);
-+ free(msg);
-+ } else {
-+ weston_debug_stream_v1_send_failure(stream->resource,
-+ "MEMFAIL");
-+ }
-+}
-+
-+static struct weston_debug_stream *
-+stream_create(struct weston_debug_compositor *wdc, const char *name,
-+ int32_t streamfd, struct wl_resource *stream_resource)
-+{
-+ struct weston_debug_stream *stream;
-+ struct weston_debug_scope *scope;
-+
-+ stream = zalloc(sizeof *stream);
-+ if (!stream)
-+ return NULL;
-+
-+ stream->fd = streamfd;
-+ stream->resource = stream_resource;
-+
-+ scope = get_scope(wdc, name);
-+ if (scope) {
-+ wl_list_insert(&scope->stream_list, &stream->scope_link);
-+
-+ if (scope->begin_cb)
-+ scope->begin_cb(stream, scope->user_data);
-+ } else {
-+ wl_list_init(&stream->scope_link);
-+ stream_close_on_failure(stream,
-+ "Debug stream name '%s' is unknown.",
-+ name);
-+ }
-+
-+ return stream;
-+}
-+
-+static void
-+stream_destroy(struct wl_resource *stream_resource)
-+{
-+ struct weston_debug_stream *stream;
-+
-+ stream = wl_resource_get_user_data(stream_resource);
-+
-+ if (stream->fd != -1)
-+ close(stream->fd);
-+ wl_list_remove(&stream->scope_link);
-+ free(stream);
-+}
-+
-+static void
-+weston_debug_stream_destroy(struct wl_client *client,
-+ struct wl_resource *stream_resource)
-+{
-+ wl_resource_destroy(stream_resource);
-+}
-+
-+static const struct weston_debug_stream_v1_interface
-+ weston_debug_stream_impl = {
-+ weston_debug_stream_destroy
-+};
-+
-+static void
-+weston_debug_destroy(struct wl_client *client,
-+ struct wl_resource *global_resource)
-+{
-+ wl_resource_destroy(global_resource);
-+}
-+
-+static void
-+weston_debug_subscribe(struct wl_client *client,
-+ struct wl_resource *global_resource,
-+ const char *name,
-+ int32_t streamfd,
-+ uint32_t new_stream_id)
-+{
-+ struct weston_debug_compositor *wdc;
-+ struct wl_resource *stream_resource;
-+ uint32_t version;
-+ struct weston_debug_stream *stream;
-+
-+ wdc = wl_resource_get_user_data(global_resource);
-+ version = wl_resource_get_version(global_resource);
-+
-+ stream_resource = wl_resource_create(client,
-+ &weston_debug_stream_v1_interface,
-+ version, new_stream_id);
-+ if (!stream_resource)
-+ goto fail;
-+
-+ stream = stream_create(wdc, name, streamfd, stream_resource);
-+ if (!stream)
-+ goto fail;
-+
-+ wl_resource_set_implementation(stream_resource,
-+ &weston_debug_stream_impl,
-+ stream, stream_destroy);
-+ return;
-+
-+fail:
-+ close(streamfd);
-+ wl_client_post_no_memory(client);
-+}
-+
-+static const struct weston_debug_v1_interface weston_debug_impl = {
-+ weston_debug_destroy,
-+ weston_debug_subscribe
-+};
-+
-+static void
-+bind_weston_debug(struct wl_client *client,
-+ void *data, uint32_t version, uint32_t id)
-+{
-+ struct weston_debug_compositor *wdc = data;
-+ struct weston_debug_scope *scope;
-+ struct wl_resource *resource;
-+
-+ resource = wl_resource_create(client,
-+ &weston_debug_v1_interface,
-+ version, id);
-+ if (!resource) {
-+ wl_client_post_no_memory(client);
-+ return;
-+ }
-+ wl_resource_set_implementation(resource, &weston_debug_impl,
-+ wdc, NULL);
-+
-+ wl_list_for_each(scope, &wdc->scope_list, compositor_link) {
-+ weston_debug_v1_send_available(resource, scope->name,
-+ scope->desc);
-+ }
-+}
-+
-+/** Initialize weston-debug structure
-+ *
-+ * \param compositor The libweston compositor.
-+ * \return 0 on success, -1 on failure.
-+ *
-+ * weston_debug_compositor is a singleton for each weston_compositor.
-+ *
-+ * Sets weston_compositor::weston_debug.
-+ *
-+ * \internal
-+ */
-+int
-+weston_debug_compositor_create(struct weston_compositor *compositor)
-+{
-+ struct weston_debug_compositor *wdc;
-+
-+ if (compositor->weston_debug)
-+ return -1;
-+
-+ wdc = zalloc(sizeof *wdc);
-+ if (!wdc)
-+ return -1;
-+
-+ wdc->compositor = compositor;
-+ wl_list_init(&wdc->scope_list);
-+
-+ compositor->weston_debug = wdc;
-+
-+ return 0;
-+}
-+
-+/** Destroy weston_debug_compositor structure
-+ *
-+ * \param compositor The libweston compositor whose weston-debug to tear down.
-+ *
-+ * Clears weston_compositor::weston_debug.
-+ *
-+ * \internal
-+ */
-+void
-+weston_debug_compositor_destroy(struct weston_compositor *compositor)
-+{
-+ struct weston_debug_compositor *wdc = compositor->weston_debug;
-+ struct weston_debug_scope *scope;
-+
-+ if (wdc->global)
-+ wl_global_destroy(wdc->global);
-+
-+ wl_list_for_each(scope, &wdc->scope_list, compositor_link)
-+ weston_log("Internal warning: debug scope '%s' has not been destroyed.\n",
-+ scope->name);
-+
-+ /* Remove head to not crash if scope removed later. */
-+ wl_list_remove(&wdc->scope_list);
-+
-+ free(wdc);
-+
-+ compositor->weston_debug = NULL;
-+}
-+
-+/** Enable weston-debug protocol extension
-+ *
-+ * \param compositor The libweston compositor where to enable.
-+ *
-+ * This enables the weston_debug_v1 Wayland protocol extension which any client
-+ * can use to get debug messsages from the compositor.
-+ *
-+ * WARNING: This feature should not be used in production. If a client
-+ * provides a file descriptor that blocks writes, it will block the whole
-+ * compositor indefinitely.
-+ *
-+ * There is no control on which client is allowed to subscribe to debug
-+ * messages. Any and all clients are allowed.
-+ *
-+ * The debug extension is disabled by default, and once enabled, cannot be
-+ * disabled again.
-+ */
-+WL_EXPORT void
-+weston_compositor_enable_debug_protocol(struct weston_compositor *compositor)
-+{
-+ struct weston_debug_compositor *wdc = compositor->weston_debug;
-+
-+ assert(wdc);
-+ if (wdc->global)
-+ return;
-+
-+ wdc->global = wl_global_create(compositor->wl_display,
-+ &weston_debug_v1_interface, 1,
-+ wdc, bind_weston_debug);
-+ if (!wdc->global)
-+ return;
-+
-+ weston_log("WARNING: debug protocol has been enabled. "
-+ "This is a potential denial-of-service attack vector and "
-+ "information leak.\n");
-+}
-+
-+/** Register a new debug stream name, creating a debug scope
-+ *
-+ * \param compositor The libweston compositor where to add.
-+ * \param name The debug stream/scope name; must not be NULL.
-+ * \param desc The debug scope description for humans; must not be NULL.
-+ * \param begin_cb Optional callback when a client subscribes to this scope.
-+ * \param user_data Optional user data pointer for the callback.
-+ * \return A valid pointer on success, NULL on failure.
-+ *
-+ * This function is used to create a debug scope. All debug message printing
-+ * happens for a scope, which allows clients to subscribe to the kind of
-+ * debug messages they want by \c name.
-+ *
-+ * \c name must be unique in the \c weston_compositor instance. \c name and
-+ * \c description must both be provided. The description is printed when a
-+ * client asks for a list of supported debug scopes.
-+ *
-+ * \c begin_cb, if not NULL, is called when a client subscribes to the
-+ * debug scope creating a debug stream. This is for debug scopes that need
-+ * to print messages as a response to a client appearing, e.g. printing a
-+ * list of windows on demand or a static preamble. The argument \c user_data
-+ * is passed in to the callback and is otherwise unused.
-+ *
-+ * For one-shot debug streams, \c begin_cb should finally call
-+ * weston_debug_stream_complete() to close the stream and tell the client
-+ * the printing is complete. Otherwise the client expects more to be written
-+ * to its file descriptor.
-+ *
-+ * The debug scope must be destroyed before destroying the
-+ * \c weston_compositor.
-+ *
-+ * \memberof weston_debug_scope
-+ * \sa weston_debug_stream, weston_debug_scope_cb
-+ */
-+WL_EXPORT struct weston_debug_scope *
-+weston_compositor_add_debug_scope(struct weston_compositor *compositor,
-+ const char *name,
-+ const char *description,
-+ weston_debug_scope_cb begin_cb,
-+ void *user_data)
-+{
-+ struct weston_debug_compositor *wdc;
-+ struct weston_debug_scope *scope;
-+
-+ if (!compositor || !name || !description) {
-+ weston_log("Error: cannot add a debug scope without name or description.\n");
-+ return NULL;
-+ }
-+
-+ wdc = compositor->weston_debug;
-+ if (!wdc) {
-+ weston_log("Error: cannot add debug scope '%s', infra not initialized.\n",
-+ name);
-+ return NULL;
-+ }
-+
-+ if (get_scope(wdc, name)){
-+ weston_log("Error: debug scope named '%s' is already registered.\n",
-+ name);
-+ return NULL;
-+ }
-+
-+ scope = zalloc(sizeof *scope);
-+ if (!scope) {
-+ weston_log("Error adding debug scope '%s': out of memory.\n",
-+ name);
-+ return NULL;
-+ }
-+
-+ scope->name = strdup(name);
-+ scope->desc = strdup(description);
-+ scope->begin_cb = begin_cb;
-+ scope->user_data = user_data;
-+ wl_list_init(&scope->stream_list);
-+
-+ if (!scope->name || !scope->desc) {
-+ weston_log("Error adding debug scope '%s': out of memory.\n",
-+ name);
-+ free(scope->name);
-+ free(scope->desc);
-+ free(scope);
-+ return NULL;
-+ }
-+
-+ wl_list_insert(wdc->scope_list.prev, &scope->compositor_link);
-+
-+ return scope;
-+}
-+
-+/** Destroy a debug scope
-+ *
-+ * \param scope The debug scope to destroy; may be NULL.
-+ *
-+ * Destroys the debug scope, closing all open streams subscribed to it and
-+ * sending them each a \c weston_debug_stream_v1.failure event.
-+ *
-+ * \memberof weston_debug_scope
-+ */
-+WL_EXPORT void
-+weston_debug_scope_destroy(struct weston_debug_scope *scope)
-+{
-+ struct weston_debug_stream *stream;
-+
-+ if (!scope)
-+ return;
-+
-+ while (!wl_list_empty(&scope->stream_list)) {
-+ stream = wl_container_of(scope->stream_list.prev,
-+ stream, scope_link);
-+
-+ stream_close_on_failure(stream, "debug name removed");
-+ }
-+
-+ wl_list_remove(&scope->compositor_link);
-+ free(scope->name);
-+ free(scope->desc);
-+ free(scope);
-+}
-+
-+/** Are there any active subscriptions to the scope?
-+ *
-+ * \param scope The debug scope to check; may be NULL.
-+ * \return True if any streams are open for this scope, false otherwise.
-+ *
-+ * As printing some debugging messages may be relatively expensive, one
-+ * can use this function to determine if there is a need to gather the
-+ * debugging information at all. If this function returns false, all
-+ * printing for this scope is dropped, so gathering the information is
-+ * pointless.
-+ *
-+ * The return value of this function should not be stored, as new clients
-+ * may subscribe to the debug scope later.
-+ *
-+ * If the given scope is NULL, this function will always return false,
-+ * making it safe to use in teardown or destroy code, provided the
-+ * scope is initialized to NULL before creation and set to NULL after
-+ * destruction.
-+ *
-+ * \memberof weston_debug_scope
-+ */
-+WL_EXPORT bool
-+weston_debug_scope_is_enabled(struct weston_debug_scope *scope)
-+{
-+ if (!scope)
-+ return false;
-+
-+ return !wl_list_empty(&scope->stream_list);
-+}
-+
-+/** Write data into a specific debug stream
-+ *
-+ * \param stream The debug stream to write into; must not be NULL.
-+ * \param data[in] Pointer to the data to write.
-+ * \param len Number of bytes to write.
-+ *
-+ * Writes the given data (binary verbatim) into the debug stream.
-+ * If \c len is zero or negative, the write is silently dropped.
-+ *
-+ * Writing is continued until all data has been written or
-+ * a write fails. If the write fails due to a signal, it is re-tried.
-+ * Otherwise on failure, the stream is closed and
-+ * \c weston_debug_stream_v1.failure event is sent to the client.
-+ *
-+ * \memberof weston_debug_stream
-+ */
-+WL_EXPORT void
-+weston_debug_stream_write(struct weston_debug_stream *stream,
-+ const char *data, size_t len)
-+{
-+ ssize_t len_ = len;
-+ ssize_t ret;
-+ int e;
-+
-+ if (stream->fd == -1)
-+ return;
-+
-+ while (len_ > 0) {
-+ ret = write(stream->fd, data, len_);
-+ e = errno;
-+ if (ret < 0) {
-+ if (e == EINTR)
-+ continue;
-+
-+ stream_close_on_failure(stream,
-+ "Error writing %zd bytes: %s (%d)",
-+ len_, strerror(e), e);
-+ break;
-+ }
-+
-+ len_ -= ret;
-+ data += ret;
-+ }
-+}
-+
-+/** Write a formatted string into a specific debug stream (varargs)
-+ *
-+ * \param stream The debug stream to write into.
-+ * \param fmt Printf-style format string.
-+ * \param ap Formatting arguments.
-+ *
-+ * The behavioral details are the same as for weston_debug_stream_write().
-+ *
-+ * \memberof weston_debug_stream
-+ */
-+WL_EXPORT void
-+weston_debug_stream_vprintf(struct weston_debug_stream *stream,
-+ const char *fmt, va_list ap)
-+{
-+ char *str;
-+ int len;
-+
-+ len = vasprintf(&str, fmt, ap);
-+ if (len >= 0) {
-+ weston_debug_stream_write(stream, str, len);
-+ free(str);
-+ } else {
-+ stream_close_on_failure(stream, "Out of memory");
-+ }
-+}
-+
-+/** Write a formatted string into a specific debug stream
-+ *
-+ * \param stream The debug stream to write into.
-+ * \param fmt Printf-style format string and arguments.
-+ *
-+ * The behavioral details are the same as for weston_debug_stream_write().
-+ *
-+ * \memberof weston_debug_stream
-+ */
-+WL_EXPORT void
-+weston_debug_stream_printf(struct weston_debug_stream *stream,
-+ const char *fmt, ...)
-+{
-+ va_list ap;
-+
-+ va_start(ap, fmt);
-+ weston_debug_stream_vprintf(stream, fmt, ap);
-+ va_end(ap);
-+}
-+
-+/** Close the debug stream and send success event
-+ *
-+ * \param stream The debug stream to close.
-+ *
-+ * Closes the debug stream and sends \c weston_debug_stream_v1.complete
-+ * event to the client. This tells the client the debug information dump
-+ * is complete.
-+ *
-+ * \memberof weston_debug_stream
-+ */
-+WL_EXPORT void
-+weston_debug_stream_complete(struct weston_debug_stream *stream)
-+{
-+ stream_close_unlink(stream);
-+ weston_debug_stream_v1_send_complete(stream->resource);
-+}
-+
-+/** Write debug data for a scope
-+ *
-+ * \param scope The debug scope to write for; may be NULL, in which case
-+ * nothing will be written.
-+ * \param data[in] Pointer to the data to write.
-+ * \param len Number of bytes to write.
-+ *
-+ * Writes the given data to all subscribed clients' streams.
-+ *
-+ * The behavioral details for each stream are the same as for
-+ * weston_debug_stream_write().
-+ *
-+ * \memberof weston_debug_scope
-+ */
-+WL_EXPORT void
-+weston_debug_scope_write(struct weston_debug_scope *scope,
-+ const char *data, size_t len)
-+{
-+ struct weston_debug_stream *stream;
-+
-+ if (!scope)
-+ return;
-+
-+ wl_list_for_each(stream, &scope->stream_list, scope_link)
-+ weston_debug_stream_write(stream, data, len);
-+}
-+
-+/** Write a formatted string for a scope (varargs)
-+ *
-+ * \param scope The debug scope to write for; may be NULL, in which case
-+ * nothing will be written.
-+ * \param fmt Printf-style format string.
-+ * \param ap Formatting arguments.
-+ *
-+ * Writes to formatted string to all subscribed clients' streams.
-+ *
-+ * The behavioral details for each stream are the same as for
-+ * weston_debug_stream_write().
-+ *
-+ * \memberof weston_debug_scope
-+ */
-+WL_EXPORT void
-+weston_debug_scope_vprintf(struct weston_debug_scope *scope,
-+ const char *fmt, va_list ap)
-+{
-+ static const char oom[] = "Out of memory";
-+ char *str;
-+ int len;
-+
-+ if (!weston_debug_scope_is_enabled(scope))
-+ return;
-+
-+ len = vasprintf(&str, fmt, ap);
-+ if (len >= 0) {
-+ weston_debug_scope_write(scope, str, len);
-+ free(str);
-+ } else {
-+ weston_debug_scope_write(scope, oom, sizeof oom - 1);
-+ }
-+}
-+
-+/** Write a formatted string for a scope
-+ *
-+ * \param scope The debug scope to write for; may be NULL, in which case
-+ * nothing will be written.
-+ * \param fmt Printf-style format string and arguments.
-+ *
-+ * Writes to formatted string to all subscribed clients' streams.
-+ *
-+ * The behavioral details for each stream are the same as for
-+ * weston_debug_stream_write().
-+ *
-+ * \memberof weston_debug_scope
-+ */
-+WL_EXPORT void
-+weston_debug_scope_printf(struct weston_debug_scope *scope,
-+ const char *fmt, ...)
-+{
-+ va_list ap;
-+
-+ va_start(ap, fmt);
-+ weston_debug_scope_vprintf(scope, fmt, ap);
-+ va_end(ap);
-+}
-+
-+/** Write debug scope name and current time into string
-+ *
-+ * \param scope[in] debug scope; may be NULL
-+ * \param buf[out] Buffer to store the string.
-+ * \param len Available size in the buffer in bytes.
-+ * \return \c buf
-+ *
-+ * Reads the current local wall-clock time and formats it into a string.
-+ * and append the debug scope name to it, if a scope is available.
-+ * The string is NUL-terminated, even if truncated.
-+ */
-+WL_EXPORT char *
-+weston_debug_scope_timestamp(struct weston_debug_scope *scope,
-+ char *buf, size_t len)
-+{
-+ struct timeval tv;
-+ struct tm *bdt;
-+ char string[128];
-+ size_t ret = 0;
-+
-+ gettimeofday(&tv, NULL);
-+
-+ bdt = localtime(&tv.tv_sec);
-+ if (bdt)
-+ ret = strftime(string, sizeof string,
-+ "%Y-%m-%d %H:%M:%S", bdt);
-+
-+ if (ret > 0) {
-+ snprintf(buf, len, "[%s.%03ld][%s]", string,
-+ tv.tv_usec / 1000,
-+ (scope) ? scope->name : "no scope");
-+ } else {
-+ snprintf(buf, len, "[?][%s]",
-+ (scope) ? scope->name : "no scope");
-+ }
-+
-+ return buf;
-+}
-diff --git a/libweston/weston-debug.h b/libweston/weston-debug.h
-new file mode 100644
-index 00000000..c76cec85
---- /dev/null
-+++ b/libweston/weston-debug.h
-@@ -0,0 +1,107 @@
-+/*
-+ * Copyright © 2017 Pekka Paalanen <pq@iki.fi>
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining
-+ * a copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sublicense, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ *
-+ * The above copyright notice and this permission notice (including the
-+ * next paragraph) shall be included in all copies or substantial
-+ * portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-+ * SOFTWARE.
-+ */
-+
-+#ifndef WESTON_DEBUG_H
-+#define WESTON_DEBUG_H
-+
-+#include <stdbool.h>
-+#include <stdlib.h>
-+#include <stdarg.h>
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+struct weston_compositor;
-+
-+void
-+weston_compositor_enable_debug_protocol(struct weston_compositor *);
-+
-+struct weston_debug_scope;
-+struct weston_debug_stream;
-+
-+/** weston_debug_scope callback
-+ *
-+ * \param stream The debug stream.
-+ * \param user_data The \c user_data argument given to
-+ * weston_compositor_add_debug_scope()
-+ *
-+ * \memberof weston_debug_scope
-+ * \sa weston_debug_stream
-+ */
-+typedef void (*weston_debug_scope_cb)(struct weston_debug_stream *stream,
-+ void *user_data);
-+
-+struct weston_debug_scope *
-+weston_compositor_add_debug_scope(struct weston_compositor *compositor,
-+ const char *name,
-+ const char *description,
-+ weston_debug_scope_cb begin_cb,
-+ void *user_data);
-+
-+void
-+weston_debug_scope_destroy(struct weston_debug_scope *scope);
-+
-+bool
-+weston_debug_scope_is_enabled(struct weston_debug_scope *scope);
-+
-+void
-+weston_debug_scope_write(struct weston_debug_scope *scope,
-+ const char *data, size_t len);
-+
-+void
-+weston_debug_scope_vprintf(struct weston_debug_scope *scope,
-+ const char *fmt, va_list ap);
-+
-+void
-+weston_debug_scope_printf(struct weston_debug_scope *scope,
-+ const char *fmt, ...)
-+ __attribute__ ((format (printf, 2, 3)));
-+
-+void
-+weston_debug_stream_write(struct weston_debug_stream *stream,
-+ const char *data, size_t len);
-+
-+void
-+weston_debug_stream_vprintf(struct weston_debug_stream *stream,
-+ const char *fmt, va_list ap);
-+
-+void
-+weston_debug_stream_printf(struct weston_debug_stream *stream,
-+ const char *fmt, ...)
-+ __attribute__ ((format (printf, 2, 3)));
-+
-+void
-+weston_debug_stream_complete(struct weston_debug_stream *stream);
-+
-+char *
-+weston_debug_scope_timestamp(struct weston_debug_scope *scope,
-+ char *buf, size_t len);
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif /* WESTON_DEBUG_H */
---
-2.16.2
-
diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1007-compositor-add-option-to-enable-weston_debug.patch b/bsp/meta-synopsys/recipes-graphics/wayland/weston/1007-compositor-add-option-to-enable-weston_debug.patch
deleted file mode 100644
index 34422850..00000000
--- a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1007-compositor-add-option-to-enable-weston_debug.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 771b7cfc11cec3638b0a4f47edeeaabe2ba46cb6 Mon Sep 17 00:00:00 2001
-From: Pekka Paalanen <pq@iki.fi>
-Date: Thu, 12 Oct 2017 13:13:43 +0200
-Subject: [PATCH 07/46] compositor: add option to enable weston_debug
-
-Let users enable the compositor debug protocol on the compositor command
-line. This allows weston-debug tool to work.
-
-Signed-off-by: Pekka Paalanen <pq@iki.fi>
-Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
-Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
----
- compositor/main.c | 7 +++++++
- man/weston.man | 11 +++++++++++
- 2 files changed, 18 insertions(+)
-
-diff --git a/compositor/main.c b/compositor/main.c
-index b5b4fc59..2f34e111 100644
---- a/compositor/main.c
-+++ b/compositor/main.c
-@@ -60,6 +60,7 @@
- #include "compositor-x11.h"
- #include "compositor-wayland.h"
- #include "windowed-output-api.h"
-+#include "weston-debug.h"
-
- #define WINDOW_TITLE "Weston Compositor"
-
-@@ -508,6 +509,7 @@ usage(int error_code)
- " -c, --config=FILE\tConfig file to load, defaults to weston.ini\n"
- " --no-config\t\tDo not read weston.ini\n"
- " --wait-for-debugger\tRaise SIGSTOP on start-up\n"
-+ " --debug\t\tEnable debug extension\n"
- " -h, --help\t\tThis help message\n\n");
-
- #if defined(BUILD_DRM_COMPOSITOR)
-@@ -2375,6 +2377,7 @@ int main(int argc, char *argv[])
- char *socket_name = NULL;
- int32_t version = 0;
- int32_t noconfig = 0;
-+ int32_t debug_protocol = 0;
- int32_t numlock_on;
- char *config_file = NULL;
- struct weston_config *config = NULL;
-@@ -2399,6 +2402,7 @@ int main(int argc, char *argv[])
- { WESTON_OPTION_BOOLEAN, "no-config", 0, &noconfig },
- { WESTON_OPTION_STRING, "config", 'c', &config_file },
- { WESTON_OPTION_BOOLEAN, "wait-for-debugger", 0, &wait_for_debugger },
-+ { WESTON_OPTION_BOOLEAN, "debug", 0, &debug_protocol },
- };
-
- wl_list_init(&wet.layoutput_list);
-@@ -2486,6 +2490,9 @@ int main(int argc, char *argv[])
- }
- segv_compositor = wet.compositor;
-
-+ if (debug_protocol)
-+ weston_compositor_enable_debug_protocol(wet.compositor);
-+
- if (weston_compositor_init_config(wet.compositor, config) < 0)
- goto out;
-
-diff --git a/man/weston.man b/man/weston.man
-index 44a73fa0..c09d4c2d 100644
---- a/man/weston.man
-+++ b/man/weston.man
-@@ -133,6 +133,17 @@ If also
- .B --no-config
- is given, no configuration file will be read.
- .TP
-+.BR \-\-debug
-+Enable debug protocol extension
-+.I weston_debug_v1
-+which any client can use to receive debugging messages from the compositor.
-+
-+.B WARNING:
-+This is risky for two reasons. First, a client may cause a denial-of-service
-+blocking the compositor by providing an unsuitable file descriptor, and
-+second, the debug messages may expose sensitive information. This option
-+should not be used in production.
-+.TP
- .BR \-\-version
- Print the program version.
- .TP
---
-2.16.2
-
diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1010-xwm-dump_property-to-use-FILE-internally.patch b/bsp/meta-synopsys/recipes-graphics/wayland/weston/1010-xwm-dump_property-to-use-FILE-internally.patch
deleted file mode 100644
index e9e46002..00000000
--- a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1010-xwm-dump_property-to-use-FILE-internally.patch
+++ /dev/null
@@ -1,141 +0,0 @@
-From 0a3ef9902a210ab1fa0e4ed317ad7782f0399b51 Mon Sep 17 00:00:00 2001
-From: Pekka Paalanen <pq@iki.fi>
-Date: Thu, 12 Oct 2017 13:18:12 +0200
-Subject: [PATCH 10/46] xwm: dump_property() to use FILE internally
-
-Write the output of dump_property() out in one log call. When multiple
-processes (weston and Xwayland) are writing to the same file, this will
-keep the property dump uninterrupted by Xwayland debug prints.
-
-This is also preparation for more development in the same direction.
-
-Signed-off-by: Pekka Paalanen <pq@iki.fi>
-Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
-Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-Reviewed-by: Daniel Stone <daniels@collabora.com>
----
- xwayland/window-manager.c | 58 ++++++++++++++++++++++++-----------------------
- 1 file changed, 30 insertions(+), 28 deletions(-)
-
-diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
-index 2b3defb7..3bf323a4 100644
---- a/xwayland/window-manager.c
-+++ b/xwayland/window-manager.c
-@@ -410,20 +410,14 @@ dump_cardinal_array_elem(FILE *fp, unsigned format,
- }
-
- static void
--dump_cardinal_array(xcb_get_property_reply_t *reply)
-+dump_cardinal_array(FILE *fp, xcb_get_property_reply_t *reply)
- {
- unsigned i = 0;
-- FILE *fp;
- void *arr;
- char *str = NULL;
-- size_t size = 0;
-
- assert(reply->type == XCB_ATOM_CARDINAL);
-
-- fp = open_memstream(&str, &size);
-- if (!fp)
-- return;
--
- arr = xcb_get_property_value(reply);
-
- fprintf(fp, "[");
-@@ -432,10 +426,6 @@ dump_cardinal_array(xcb_get_property_reply_t *reply)
- arr, reply->value_len, i);
- fprintf(fp, "]");
-
-- if (fclose(fp) != 0)
-- return;
--
-- wm_log_continue("%s\n", str);
- free(str);
- }
-
-@@ -449,22 +439,29 @@ dump_property(struct weston_wm *wm,
- xcb_window_t *window_value;
- int width, len;
- uint32_t i;
-+ FILE *fp;
-+ char *logstr;
-+ size_t logsize;
-
-- width = wm_log_continue("%s: ", get_atom_name(wm->conn, property));
-- if (reply == NULL) {
-- wm_log_continue("(no reply)\n");
-+ fp = open_memstream(&logstr, &logsize);
-+ if (!fp)
- return;
-+
-+ width = fprintf(fp, "%s: ", get_atom_name(wm->conn, property));
-+ if (reply == NULL) {
-+ fprintf(fp, "(no reply)\n");
-+ goto out;
- }
-
-- width += wm_log_continue("%s/%d, length %d (value_len %d): ",
-- get_atom_name(wm->conn, reply->type),
-- reply->format,
-- xcb_get_property_value_length(reply),
-- reply->value_len);
-+ width += fprintf(fp, "%s/%d, length %d (value_len %d): ",
-+ get_atom_name(wm->conn, reply->type),
-+ reply->format,
-+ xcb_get_property_value_length(reply),
-+ reply->value_len);
-
- if (reply->type == wm->atom.incr) {
- incr_value = xcb_get_property_value(reply);
-- wm_log_continue("%d\n", *incr_value);
-+ fprintf(fp, "%d\n", *incr_value);
- } else if (reply->type == wm->atom.utf8_string ||
- reply->type == wm->atom.string) {
- text_value = xcb_get_property_value(reply);
-@@ -472,29 +469,34 @@ dump_property(struct weston_wm *wm,
- len = 40;
- else
- len = reply->value_len;
-- wm_log_continue("\"%.*s\"\n", len, text_value);
-+ fprintf(fp, "\"%.*s\"\n", len, text_value);
- } else if (reply->type == XCB_ATOM_ATOM) {
- atom_value = xcb_get_property_value(reply);
- for (i = 0; i < reply->value_len; i++) {
- name = get_atom_name(wm->conn, atom_value[i]);
- if (width + strlen(name) + 2 > 78) {
-- wm_log_continue("\n ");
-+ fprintf(fp, "\n ");
- width = 4;
- } else if (i > 0) {
-- width += wm_log_continue(", ");
-+ width += fprintf(fp, ", ");
- }
-
-- width += wm_log_continue("%s", name);
-+ width += fprintf(fp, "%s", name);
- }
-- wm_log_continue("\n");
-+ fprintf(fp, "\n");
- } else if (reply->type == XCB_ATOM_CARDINAL) {
-- dump_cardinal_array(reply);
-+ dump_cardinal_array(fp, reply);
- } else if (reply->type == XCB_ATOM_WINDOW && reply->format == 32) {
- window_value = xcb_get_property_value(reply);
-- wm_log_continue("win %u\n", *window_value);
-+ fprintf(fp, "win %u\n", *window_value);
- } else {
-- wm_log_continue("huh?\n");
-+ fprintf(fp, "huh?\n");
- }
-+
-+out:
-+ if (fclose(fp) == 0)
-+ wm_log_continue("%s", logstr);
-+ free(logstr);
- }
-
- static void
---
-2.16.2
-
diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1011-xwm-move-FILE-to-the-callers-of-dump_property.patch b/bsp/meta-synopsys/recipes-graphics/wayland/weston/1011-xwm-move-FILE-to-the-callers-of-dump_property.patch
deleted file mode 100644
index 693bff29..00000000
--- a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1011-xwm-move-FILE-to-the-callers-of-dump_property.patch
+++ /dev/null
@@ -1,267 +0,0 @@
-From b3b006559856037ab97200b93641640b88ec7db8 Mon Sep 17 00:00:00 2001
-From: Pekka Paalanen <pq@iki.fi>
-Date: Thu, 12 Oct 2017 13:18:13 +0200
-Subject: [PATCH 11/46] xwm: move FILE to the callers of dump_property()
-
-This is preparation for using the weston-debug infrastructure for
-WM_DEBUG. dump_property() may be called from different debugging
-contexts and often needs to be prefixed with more information.
-
-An alternative to this patch would be to pass in the weston_debug_scope
-as an argument to dump_property(), but then all callers would need to be
-converted to weston-debug infra in a single commit.
-
-Therefore require the callers to provide the FILE* to print to.
-
-Signed-off-by: Pekka Paalanen <pq@iki.fi>
-Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
-Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-Reviewed-by: Daniel Stone <daniels@collabora.com>
----
- xwayland/selection.c | 39 ++++++++++++++++++++++++---
- xwayland/window-manager.c | 67 +++++++++++++++++++----------------------------
- xwayland/xwayland.h | 3 ++-
- 3 files changed, 65 insertions(+), 44 deletions(-)
-
-diff --git a/xwayland/selection.c b/xwayland/selection.c
-index 59702246..e0eb3ffc 100644
---- a/xwayland/selection.c
-+++ b/xwayland/selection.c
-@@ -34,6 +34,12 @@
- #include "xwayland.h"
- #include "shared/helpers.h"
-
-+#ifdef WM_DEBUG
-+#define wm_log(...) weston_log(__VA_ARGS__)
-+#else
-+#define wm_log(...) do {} while (0)
-+#endif
-+
- static int
- writable_callback(int fd, uint32_t mask, void *data)
- {
-@@ -102,6 +108,9 @@ weston_wm_get_incr_chunk(struct weston_wm *wm)
- {
- xcb_get_property_cookie_t cookie;
- xcb_get_property_reply_t *reply;
-+ FILE *fp;
-+ char *logstr;
-+ size_t logsize;
-
- cookie = xcb_get_property(wm->conn,
- 0, /* delete */
-@@ -115,7 +124,13 @@ weston_wm_get_incr_chunk(struct weston_wm *wm)
- if (reply == NULL)
- return;
-
-- dump_property(wm, wm->atom.wl_selection, reply);
-+ fp = open_memstream(&logstr, &logsize);
-+ if (fp) {
-+ dump_property(fp, wm, wm->atom.wl_selection, reply);
-+ if (fclose(fp) == 0)
-+ wm_log("%s", logstr);
-+ free(logstr);
-+ }
-
- if (xcb_get_property_value_length(reply) > 0) {
- /* reply's ownership is transferred to wm, which is responsible
-@@ -178,6 +193,9 @@ weston_wm_get_selection_targets(struct weston_wm *wm)
- xcb_atom_t *value;
- char **p;
- uint32_t i;
-+ FILE *fp;
-+ char *logstr;
-+ size_t logsize;
-
- cookie = xcb_get_property(wm->conn,
- 1, /* delete */
-@@ -191,7 +209,13 @@ weston_wm_get_selection_targets(struct weston_wm *wm)
- if (reply == NULL)
- return;
-
-- dump_property(wm, wm->atom.wl_selection, reply);
-+ fp = open_memstream(&logstr, &logsize);
-+ if (fp) {
-+ dump_property(fp, wm, wm->atom.wl_selection, reply);
-+ if (fclose(fp) == 0)
-+ wm_log("%s", logstr);
-+ free(logstr);
-+ }
-
- if (reply->type != XCB_ATOM_ATOM) {
- free(reply);
-@@ -232,6 +256,9 @@ weston_wm_get_selection_data(struct weston_wm *wm)
- {
- xcb_get_property_cookie_t cookie;
- xcb_get_property_reply_t *reply;
-+ FILE *fp;
-+ char *logstr;
-+ size_t logsize;
-
- cookie = xcb_get_property(wm->conn,
- 1, /* delete */
-@@ -243,7 +270,13 @@ weston_wm_get_selection_data(struct weston_wm *wm)
-
- reply = xcb_get_property_reply(wm->conn, cookie, NULL);
-
-- dump_property(wm, wm->atom.wl_selection, reply);
-+ fp = open_memstream(&logstr, &logsize);
-+ if (fp) {
-+ dump_property(fp, wm, wm->atom.wl_selection, reply);
-+ if (fclose(fp) == 0)
-+ wm_log("%s", logstr);
-+ free(logstr);
-+ }
-
- if (reply == NULL) {
- return;
-diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
-index 3bf323a4..4a26f6e7 100644
---- a/xwayland/window-manager.c
-+++ b/xwayland/window-manager.c
-@@ -210,23 +210,6 @@ wm_log(const char *fmt, ...)
- #endif
- }
-
--static int __attribute__ ((format (printf, 1, 2)))
--wm_log_continue(const char *fmt, ...)
--{
--#ifdef WM_DEBUG
-- int l;
-- va_list argp;
--
-- va_start(argp, fmt);
-- l = weston_vlog_continue(fmt, argp);
-- va_end(argp);
--
-- return l;
--#else
-- return 0;
--#endif
--}
--
- static void
- weston_output_weak_ref_init(struct weston_output_weak_ref *ref)
- {
-@@ -430,7 +413,7 @@ dump_cardinal_array(FILE *fp, xcb_get_property_reply_t *reply)
- }
-
- void
--dump_property(struct weston_wm *wm,
-+dump_property(FILE *fp, struct weston_wm *wm,
- xcb_atom_t property, xcb_get_property_reply_t *reply)
- {
- int32_t *incr_value;
-@@ -439,18 +422,11 @@ dump_property(struct weston_wm *wm,
- xcb_window_t *window_value;
- int width, len;
- uint32_t i;
-- FILE *fp;
-- char *logstr;
-- size_t logsize;
--
-- fp = open_memstream(&logstr, &logsize);
-- if (!fp)
-- return;
-
- width = fprintf(fp, "%s: ", get_atom_name(wm->conn, property));
- if (reply == NULL) {
- fprintf(fp, "(no reply)\n");
-- goto out;
-+ return;
- }
-
- width += fprintf(fp, "%s/%d, length %d (value_len %d): ",
-@@ -492,15 +468,10 @@ dump_property(struct weston_wm *wm,
- } else {
- fprintf(fp, "huh?\n");
- }
--
--out:
-- if (fclose(fp) == 0)
-- wm_log_continue("%s", logstr);
-- free(logstr);
- }
-
- static void
--read_and_dump_property(struct weston_wm *wm,
-+read_and_dump_property(FILE *fp, struct weston_wm *wm,
- xcb_window_t window, xcb_atom_t property)
- {
- xcb_get_property_reply_t *reply;
-@@ -510,7 +481,7 @@ read_and_dump_property(struct weston_wm *wm,
- property, XCB_ATOM_ANY, 0, 2048);
- reply = xcb_get_property_reply(wm->conn, cookie, NULL);
-
-- dump_property(wm, property, reply);
-+ dump_property(fp, wm, property, reply);
-
- free(reply);
- }
-@@ -1389,19 +1360,35 @@ weston_wm_handle_property_notify(struct weston_wm *wm, xcb_generic_event_t *even
- xcb_property_notify_event_t *property_notify =
- (xcb_property_notify_event_t *) event;
- struct weston_wm_window *window;
-+ FILE *fp;
-+ char *logstr;
-+ size_t logsize;
-
- if (!wm_lookup_window(wm, property_notify->window, &window))
- return;
-
- window->properties_dirty = 1;
-
-- wm_log("XCB_PROPERTY_NOTIFY: window %d, ", property_notify->window);
-- if (property_notify->state == XCB_PROPERTY_DELETE)
-- wm_log_continue("deleted %s\n",
-- get_atom_name(wm->conn, property_notify->atom));
-- else
-- read_and_dump_property(wm, property_notify->window,
-- property_notify->atom);
-+ fp = open_memstream(&logstr, &logsize);
-+ if (fp) {
-+ fprintf(fp, "XCB_PROPERTY_NOTIFY: window %d, ", property_notify->window);
-+ if (property_notify->state == XCB_PROPERTY_DELETE)
-+ fprintf(fp, "deleted %s\n",
-+ get_atom_name(wm->conn, property_notify->atom));
-+ else
-+ read_and_dump_property(fp, wm, property_notify->window,
-+ property_notify->atom);
-+
-+ if (fclose(fp) == 0)
-+ wm_log("%s", logstr);
-+ free(logstr);
-+ } else {
-+ /* read_and_dump_property() is a X11 roundtrip.
-+ * Mimic it to maintain ordering semantics between debug
-+ * and non-debug paths.
-+ */
-+ get_atom_name(wm->conn, property_notify->atom);
-+ }
-
- if (property_notify->atom == wm->atom.net_wm_name ||
- property_notify->atom == XCB_ATOM_WM_NAME)
-diff --git a/xwayland/xwayland.h b/xwayland/xwayland.h
-index ca75f5b7..52da6786 100644
---- a/xwayland/xwayland.h
-+++ b/xwayland/xwayland.h
-@@ -23,6 +23,7 @@
- * SOFTWARE.
- */
-
-+#include <stdio.h>
- #include <wayland-server.h>
- #include <xcb/xcb.h>
- #include <xcb/xfixes.h>
-@@ -159,7 +160,7 @@ struct weston_wm {
- };
-
- void
--dump_property(struct weston_wm *wm, xcb_atom_t property,
-+dump_property(FILE *fp, struct weston_wm *wm, xcb_atom_t property,
- xcb_get_property_reply_t *reply);
-
- const char *
---
-2.16.2
-
diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1012-xwm-convert-WM_DEBUG-into-a-weston-debug-scope.patch b/bsp/meta-synopsys/recipes-graphics/wayland/weston/1012-xwm-convert-WM_DEBUG-into-a-weston-debug-scope.patch
deleted file mode 100644
index cc171a58..00000000
--- a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1012-xwm-convert-WM_DEBUG-into-a-weston-debug-scope.patch
+++ /dev/null
@@ -1,423 +0,0 @@
-From 9b72eb7930ef60aa44ab49c53b2aec9e7242cf1c Mon Sep 17 00:00:00 2001
-From: Pekka Paalanen <pq@iki.fi>
-Date: Thu, 12 Oct 2017 13:18:14 +0200
-Subject: [PATCH 12/46] xwm: convert WM_DEBUG into a weston-debug scope
-
-Instead of a compile time choice, offer the XWM debugging messages
-through the weston-debug protocol and tool on demand. Users will not
-need to recompile weston to get XWM debugging, and it won't flood the
-weston log.
-
-The debug scope needs to be initialized in launcher.c for it be
-available from start, before the first X11 client tries to connect and
-initializes XWM.
-
-Signed-off-by: Pekka Paalanen <pq@iki.fi>
-
-pass the wm_debug scope to weston_debug_scope_printf API to append
-the scopename to the timestr
-
-Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
-Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-Reviewed-by: Daniel Stone <daniels@collabora.com>
----
- xwayland/launcher.c | 7 ++
- xwayland/window-manager.c | 166 +++++++++++++++++++++++++---------------------
- xwayland/xwayland.h | 3 +
- 3 files changed, 99 insertions(+), 77 deletions(-)
-
-diff --git a/xwayland/launcher.c b/xwayland/launcher.c
-index 0ecdb205..c5b99385 100644
---- a/xwayland/launcher.c
-+++ b/xwayland/launcher.c
-@@ -229,6 +229,8 @@ weston_xserver_destroy(struct wl_listener *l, void *data)
- if (wxs->loop)
- weston_xserver_shutdown(wxs);
-
-+ weston_debug_scope_destroy(wxs->wm_debug);
-+
- free(wxs);
- }
-
-@@ -391,5 +393,10 @@ weston_module_init(struct weston_compositor *compositor)
- wxs->destroy_listener.notify = weston_xserver_destroy;
- wl_signal_add(&compositor->destroy_signal, &wxs->destroy_listener);
-
-+ wxs->wm_debug = weston_compositor_add_debug_scope(wxs->compositor,
-+ "xwm-wm-x11",
-+ "XWM's window management X11 events\n",
-+ NULL, NULL);
-+
- return 0;
- }
-diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
-index 4a26f6e7..ccdae57f 100644
---- a/xwayland/window-manager.c
-+++ b/xwayland/window-manager.c
-@@ -193,23 +193,27 @@ static void
- xserver_map_shell_surface(struct weston_wm_window *window,
- struct weston_surface *surface);
-
--static int __attribute__ ((format (printf, 1, 2)))
--wm_log(const char *fmt, ...)
-+static bool
-+wm_debug_is_enabled(struct weston_wm *wm)
- {
--#ifdef WM_DEBUG
-- int l;
-- va_list argp;
-+ return weston_debug_scope_is_enabled(wm->server->wm_debug);
-+}
-
-- va_start(argp, fmt);
-- l = weston_vlog(fmt, argp);
-- va_end(argp);
-+static void __attribute__ ((format (printf, 2, 3)))
-+wm_printf(struct weston_wm *wm, const char *fmt, ...)
-+{
-+ va_list ap;
-+ char timestr[128];
-
-- return l;
--#else
-- return 0;
--#endif
--}
-+ if (wm_debug_is_enabled(wm))
-+ weston_debug_scope_printf(wm->server->wm_debug, "%s ",
-+ weston_debug_scope_timestamp(wm->server->wm_debug,
-+ timestr, sizeof timestr));
-
-+ va_start(ap, fmt);
-+ weston_debug_scope_vprintf(wm->server->wm_debug, fmt, ap);
-+ va_end(ap);
-+}
- static void
- weston_output_weak_ref_init(struct weston_output_weak_ref *ref)
- {
-@@ -717,10 +721,10 @@ weston_wm_handle_configure_request(struct weston_wm *wm, xcb_generic_event_t *ev
- uint32_t mask, values[16];
- int x, y, width, height, i = 0;
-
-- wm_log("XCB_CONFIGURE_REQUEST (window %d) %d,%d @ %dx%d\n",
-- configure_request->window,
-- configure_request->x, configure_request->y,
-- configure_request->width, configure_request->height);
-+ wm_printf(wm, "XCB_CONFIGURE_REQUEST (window %d) %d,%d @ %dx%d\n",
-+ configure_request->window,
-+ configure_request->x, configure_request->y,
-+ configure_request->width, configure_request->height);
-
- if (!wm_lookup_window(wm, configure_request->window, &window))
- return;
-@@ -786,11 +790,11 @@ weston_wm_handle_configure_notify(struct weston_wm *wm, xcb_generic_event_t *eve
- wm->server->compositor->xwayland_interface;
- struct weston_wm_window *window;
-
-- wm_log("XCB_CONFIGURE_NOTIFY (window %d) %d,%d @ %dx%d%s\n",
-- configure_notify->window,
-- configure_notify->x, configure_notify->y,
-- configure_notify->width, configure_notify->height,
-- configure_notify->override_redirect ? ", override" : "");
-+ wm_printf(wm, "XCB_CONFIGURE_NOTIFY (window %d) %d,%d @ %dx%d%s\n",
-+ configure_notify->window,
-+ configure_notify->x, configure_notify->y,
-+ configure_notify->width, configure_notify->height,
-+ configure_notify->override_redirect ? ", override" : "");
-
- if (!wm_lookup_window(wm, configure_notify->window, &window))
- return;
-@@ -839,7 +843,7 @@ weston_wm_create_surface(struct wl_listener *listener, void *data)
- if (wl_resource_get_client(surface->resource) != wm->server->client)
- return;
-
-- wm_log("XWM: create weston_surface %p\n", surface);
-+ wm_printf(wm, "XWM: create weston_surface %p\n", surface);
-
- wl_list_for_each(window, &wm->unpaired_window_list, link)
- if (window->surface_id ==
-@@ -1096,8 +1100,8 @@ weston_wm_handle_map_request(struct weston_wm *wm, xcb_generic_event_t *event)
- struct weston_output *output;
-
- if (our_resource(wm, map_request->window)) {
-- wm_log("XCB_MAP_REQUEST (window %d, ours)\n",
-- map_request->window);
-+ wm_printf(wm, "XCB_MAP_REQUEST (window %d, ours)\n",
-+ map_request->window);
- return;
- }
-
-@@ -1126,10 +1130,10 @@ weston_wm_handle_map_request(struct weston_wm *wm, xcb_generic_event_t *event)
- weston_wm_window_create_frame(window); /* sets frame_id */
- assert(window->frame_id != XCB_WINDOW_NONE);
-
-- wm_log("XCB_MAP_REQUEST (window %d, %p, frame %d, %dx%d @ %d,%d)\n",
-- window->id, window, window->frame_id,
-- window->width, window->height,
-- window->map_request_x, window->map_request_y);
-+ wm_printf(wm, "XCB_MAP_REQUEST (window %d, %p, frame %d, %dx%d @ %d,%d)\n",
-+ window->id, window, window->frame_id,
-+ window->width, window->height,
-+ window->map_request_x, window->map_request_y);
-
- weston_wm_window_set_allow_commits(window, false);
- weston_wm_window_set_wm_state(window, ICCCM_NORMAL_STATE);
-@@ -1157,13 +1161,13 @@ weston_wm_handle_map_notify(struct weston_wm *wm, xcb_generic_event_t *event)
- xcb_map_notify_event_t *map_notify = (xcb_map_notify_event_t *) event;
-
- if (our_resource(wm, map_notify->window)) {
-- wm_log("XCB_MAP_NOTIFY (window %d, ours)\n",
-- map_notify->window);
-+ wm_printf(wm, "XCB_MAP_NOTIFY (window %d, ours)\n",
-+ map_notify->window);
- return;
- }
-
-- wm_log("XCB_MAP_NOTIFY (window %d%s)\n", map_notify->window,
-- map_notify->override_redirect ? ", override" : "");
-+ wm_printf(wm, "XCB_MAP_NOTIFY (window %d%s)\n", map_notify->window,
-+ map_notify->override_redirect ? ", override" : "");
- }
-
- static void
-@@ -1173,10 +1177,10 @@ weston_wm_handle_unmap_notify(struct weston_wm *wm, xcb_generic_event_t *event)
- (xcb_unmap_notify_event_t *) event;
- struct weston_wm_window *window;
-
-- wm_log("XCB_UNMAP_NOTIFY (window %d, event %d%s)\n",
-- unmap_notify->window,
-- unmap_notify->event,
-- our_resource(wm, unmap_notify->window) ? ", ours" : "");
-+ wm_printf(wm, "XCB_UNMAP_NOTIFY (window %d, event %d%s)\n",
-+ unmap_notify->window,
-+ unmap_notify->event,
-+ our_resource(wm, unmap_notify->window) ? ", ours" : "");
-
- if (our_resource(wm, unmap_notify->window))
- return;
-@@ -1216,7 +1220,7 @@ weston_wm_window_draw_decoration(struct weston_wm_window *window)
- cairo_t *cr;
- int width, height;
-
-- wm_log("XWM: draw decoration, win %d\n", window->id);
-+ wm_printf(window->wm, "XWM: draw decoration, win %d\n", window->id);
-
- weston_wm_window_get_frame_size(window, &width, &height);
-
-@@ -1279,8 +1283,8 @@ weston_wm_window_set_pending_state(struct weston_wm_window *window)
- input_h = height;
- }
-
-- wm_log("XWM: win %d geometry: %d,%d %dx%d\n",
-- window->id, input_x, input_y, input_w, input_h);
-+ wm_printf(window->wm, "XWM: win %d geometry: %d,%d %dx%d\n",
-+ window->id, input_x, input_y, input_w, input_h);
-
- pixman_region32_fini(&window->surface->pending.input);
- pixman_region32_init_rect(&window->surface->pending.input,
-@@ -1347,7 +1351,7 @@ weston_wm_window_schedule_repaint(struct weston_wm_window *window)
- if (window->repaint_source)
- return;
-
-- wm_log("XWM: schedule repaint, win %d\n", window->id);
-+ wm_printf(wm, "XWM: schedule repaint, win %d\n", window->id);
-
- window->repaint_source =
- wl_event_loop_add_idle(wm->server->loop,
-@@ -1360,18 +1364,24 @@ weston_wm_handle_property_notify(struct weston_wm *wm, xcb_generic_event_t *even
- xcb_property_notify_event_t *property_notify =
- (xcb_property_notify_event_t *) event;
- struct weston_wm_window *window;
-- FILE *fp;
-+ FILE *fp = NULL;
- char *logstr;
- size_t logsize;
-+ char timestr[128];
-
- if (!wm_lookup_window(wm, property_notify->window, &window))
- return;
-
- window->properties_dirty = 1;
-
-- fp = open_memstream(&logstr, &logsize);
-+ if (wm_debug_is_enabled(wm))
-+ fp = open_memstream(&logstr, &logsize);
-+
- if (fp) {
-- fprintf(fp, "XCB_PROPERTY_NOTIFY: window %d, ", property_notify->window);
-+ fprintf(fp, "%s XCB_PROPERTY_NOTIFY: window %d, ",
-+ weston_debug_scope_timestamp(wm->server->wm_debug,
-+ timestr, sizeof timestr),
-+ property_notify->window);
- if (property_notify->state == XCB_PROPERTY_DELETE)
- fprintf(fp, "deleted %s\n",
- get_atom_name(wm->conn, property_notify->atom));
-@@ -1380,7 +1390,8 @@ weston_wm_handle_property_notify(struct weston_wm *wm, xcb_generic_event_t *even
- property_notify->atom);
-
- if (fclose(fp) == 0)
-- wm_log("%s", logstr);
-+ weston_debug_scope_write(wm->server->wm_debug,
-+ logstr, logsize);
- free(logstr);
- } else {
- /* read_and_dump_property() is a X11 roundtrip.
-@@ -1406,7 +1417,7 @@ weston_wm_window_create(struct weston_wm *wm,
-
- window = zalloc(sizeof *window);
- if (window == NULL) {
-- wm_log("failed to allocate window\n");
-+ wm_printf(wm, "failed to allocate window\n");
- return;
- }
-
-@@ -1479,12 +1490,12 @@ weston_wm_handle_create_notify(struct weston_wm *wm, xcb_generic_event_t *event)
- xcb_create_notify_event_t *create_notify =
- (xcb_create_notify_event_t *) event;
-
-- wm_log("XCB_CREATE_NOTIFY (window %d, at (%d, %d), width %d, height %d%s%s)\n",
-- create_notify->window,
-- create_notify->x, create_notify->y,
-- create_notify->width, create_notify->height,
-- create_notify->override_redirect ? ", override" : "",
-- our_resource(wm, create_notify->window) ? ", ours" : "");
-+ wm_printf(wm, "XCB_CREATE_NOTIFY (window %d, at (%d, %d), width %d, height %d%s%s)\n",
-+ create_notify->window,
-+ create_notify->x, create_notify->y,
-+ create_notify->width, create_notify->height,
-+ create_notify->override_redirect ? ", override" : "",
-+ our_resource(wm, create_notify->window) ? ", ours" : "");
-
- if (our_resource(wm, create_notify->window))
- return;
-@@ -1502,10 +1513,10 @@ weston_wm_handle_destroy_notify(struct weston_wm *wm, xcb_generic_event_t *event
- (xcb_destroy_notify_event_t *) event;
- struct weston_wm_window *window;
-
-- wm_log("XCB_DESTROY_NOTIFY, win %d, event %d%s\n",
-- destroy_notify->window,
-- destroy_notify->event,
-- our_resource(wm, destroy_notify->window) ? ", ours" : "");
-+ wm_printf(wm, "XCB_DESTROY_NOTIFY, win %d, event %d%s\n",
-+ destroy_notify->window,
-+ destroy_notify->event,
-+ our_resource(wm, destroy_notify->window) ? ", ours" : "");
-
- if (our_resource(wm, destroy_notify->window))
- return;
-@@ -1523,11 +1534,11 @@ weston_wm_handle_reparent_notify(struct weston_wm *wm, xcb_generic_event_t *even
- (xcb_reparent_notify_event_t *) event;
- struct weston_wm_window *window;
-
-- wm_log("XCB_REPARENT_NOTIFY (window %d, parent %d, event %d%s)\n",
-- reparent_notify->window,
-- reparent_notify->parent,
-- reparent_notify->event,
-- reparent_notify->override_redirect ? ", override" : "");
-+ wm_printf(wm, "XCB_REPARENT_NOTIFY (window %d, parent %d, event %d%s)\n",
-+ reparent_notify->window,
-+ reparent_notify->parent,
-+ reparent_notify->event,
-+ reparent_notify->override_redirect ? ", override" : "");
-
- if (reparent_notify->parent == wm->screen->root) {
- weston_wm_window_create(wm, reparent_notify->window, 10, 10,
-@@ -1734,7 +1745,7 @@ surface_destroy(struct wl_listener *listener, void *data)
- container_of(listener,
- struct weston_wm_window, surface_destroy_listener);
-
-- wm_log("surface for xid %d destroyed\n", window->id);
-+ wm_printf(window->wm, "surface for xid %d destroyed\n", window->id);
-
- /* This should have been freed by the shell.
- * Don't try to use it later. */
-@@ -1750,7 +1761,8 @@ weston_wm_window_handle_surface_id(struct weston_wm_window *window,
- struct wl_resource *resource;
-
- if (window->surface_id != 0) {
-- wm_log("already have surface id for window %d\n", window->id);
-+ wm_printf(wm, "already have surface id for window %d\n",
-+ window->id);
- return;
- }
-
-@@ -1782,14 +1794,14 @@ weston_wm_handle_client_message(struct weston_wm *wm,
- (xcb_client_message_event_t *) event;
- struct weston_wm_window *window;
-
-- wm_log("XCB_CLIENT_MESSAGE (%s %d %d %d %d %d win %d)\n",
-- get_atom_name(wm->conn, client_message->type),
-- client_message->data.data32[0],
-- client_message->data.data32[1],
-- client_message->data.data32[2],
-- client_message->data.data32[3],
-- client_message->data.data32[4],
-- client_message->window);
-+ wm_printf(wm, "XCB_CLIENT_MESSAGE (%s %d %d %d %d %d win %d)\n",
-+ get_atom_name(wm->conn, client_message->type),
-+ client_message->data.data32[0],
-+ client_message->data.data32[1],
-+ client_message->data.data32[2],
-+ client_message->data.data32[3],
-+ client_message->data.data32[4],
-+ client_message->window);
-
- /* The window may get created and destroyed before we actually
- * handle the message. If it doesn't exist, bail.
-@@ -2007,9 +2019,9 @@ weston_wm_handle_button(struct weston_wm *wm, xcb_generic_event_t *event)
- uint32_t button_id;
- uint32_t double_click = 0;
-
-- wm_log("XCB_BUTTON_%s (detail %d)\n",
-- button->response_type == XCB_BUTTON_PRESS ?
-- "PRESS" : "RELEASE", button->detail);
-+ wm_printf(wm, "XCB_BUTTON_%s (detail %d)\n",
-+ button->response_type == XCB_BUTTON_PRESS ?
-+ "PRESS" : "RELEASE", button->detail);
-
- if (!wm_lookup_window(wm, button->event, &window) ||
- !window->decorate)
-@@ -2221,7 +2233,7 @@ weston_wm_handle_event(int fd, uint32_t mask, void *data)
- weston_wm_handle_destroy_notify(wm, event);
- break;
- case XCB_MAPPING_NOTIFY:
-- wm_log("XCB_MAPPING_NOTIFY\n");
-+ wm_printf(wm, "XCB_MAPPING_NOTIFY\n");
- break;
- case XCB_PROPERTY_NOTIFY:
- weston_wm_handle_property_notify(wm, event);
-@@ -2837,8 +2849,8 @@ xserver_map_shell_surface(struct weston_wm_window *window,
- window->surface,
- &shell_client);
-
-- wm_log("XWM: map shell surface, win %d, weston_surface %p, xwayland surface %p\n",
-- window->id, window->surface, window->shsurf);
-+ wm_printf(wm, "XWM: map shell surface, win %d, weston_surface %p, xwayland surface %p\n",
-+ window->id, window->surface, window->shsurf);
-
- if (window->name)
- xwayland_interface->set_title(window->shsurf, window->name);
-diff --git a/xwayland/xwayland.h b/xwayland/xwayland.h
-index 52da6786..507d534d 100644
---- a/xwayland/xwayland.h
-+++ b/xwayland/xwayland.h
-@@ -33,6 +33,7 @@
- #include "compositor.h"
- #include "compositor/weston.h"
- #include "xwayland-api.h"
-+#include "weston-debug.h"
-
- #define SEND_EVENT_MASK (0x80)
- #define EVENT_TYPE(event) ((event)->response_type & ~SEND_EVENT_MASK)
-@@ -52,6 +53,8 @@ struct weston_xserver {
- struct wl_listener destroy_listener;
- weston_xwayland_spawn_xserver_func_t spawn_func;
- void *user_data;
-+
-+ struct weston_debug_scope *wm_debug;
- };
-
- struct weston_wm {
---
-2.16.2
-
diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1014-compositor-Add-weston_layer_mask_is_infinite.patch b/bsp/meta-synopsys/recipes-graphics/wayland/weston/1014-compositor-Add-weston_layer_mask_is_infinite.patch
deleted file mode 100644
index ee4ab191..00000000
--- a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1014-compositor-Add-weston_layer_mask_is_infinite.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 3b7756351d31a72da11ff09c56efa17960db1b20 Mon Sep 17 00:00:00 2001
-From: Daniel Stone <daniels@collabora.com>
-Date: Fri, 20 Jul 2018 08:38:25 +0100
-Subject: [PATCH 14/46] compositor: Add weston_layer_mask_is_infinite
-
-As a counterpart to weston_layer_set_mask_infinite(), returning if the
-mask is the same as what is set.
-
-Signed-off-by: Daniel Stone <daniels@collabora.com>
-Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
----
- libweston/compositor.c | 9 +++++++++
- libweston/compositor.h | 3 +++
- 2 files changed, 12 insertions(+)
-
-diff --git a/libweston/compositor.c b/libweston/compositor.c
-index 01616550..a38c4c1b 100644
---- a/libweston/compositor.c
-+++ b/libweston/compositor.c
-@@ -2746,6 +2746,15 @@ weston_layer_set_mask_infinite(struct weston_layer *layer)
- UINT32_MAX, UINT32_MAX);
- }
-
-+WL_EXPORT bool
-+weston_layer_mask_is_infinite(struct weston_layer *layer)
-+{
-+ return layer->mask.x1 == INT32_MIN &&
-+ layer->mask.y1 == INT32_MIN &&
-+ layer->mask.x2 == INT32_MIN + UINT32_MAX &&
-+ layer->mask.y2 == INT32_MIN + UINT32_MAX;
-+}
-+
- WL_EXPORT void
- weston_output_schedule_repaint(struct weston_output *output)
- {
-diff --git a/libweston/compositor.h b/libweston/compositor.h
-index 33f02b18..069fb03d 100644
---- a/libweston/compositor.h
-+++ b/libweston/compositor.h
-@@ -1685,6 +1685,9 @@ weston_layer_set_mask(struct weston_layer *layer, int x, int y, int width, int h
- void
- weston_layer_set_mask_infinite(struct weston_layer *layer);
-
-+bool
-+weston_layer_mask_is_infinite(struct weston_layer *layer);
-+
- void
- weston_plane_init(struct weston_plane *plane,
- struct weston_compositor *ec,
---
-2.16.2
-
diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1015-compositor-Add-scene-graph-debug-scope.patch b/bsp/meta-synopsys/recipes-graphics/wayland/weston/1015-compositor-Add-scene-graph-debug-scope.patch
deleted file mode 100644
index 13ba4c81..00000000
--- a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1015-compositor-Add-scene-graph-debug-scope.patch
+++ /dev/null
@@ -1,297 +0,0 @@
-From ce62cb3d05505777893ccdfacbf2a013c82e4ce2 Mon Sep 17 00:00:00 2001
-From: Daniel Stone <daniels@collabora.com>
-Date: Fri, 20 Jul 2018 09:46:24 +0100
-Subject: [PATCH 15/46] compositor: Add scene-graph debug scope
-
-Add a 'scene-graph' debug scope which will dump out the current set of
-outputs, layers, and views and as much information as possible about how
-they are rendered and composited.
-
-Signed-off-by: Daniel Stone <daniels@collabora.com>
----
- libweston/compositor.c | 225 +++++++++++++++++++++++++++++++++++++++++++++++++
- libweston/compositor.h | 4 +
- 2 files changed, 229 insertions(+)
-
-diff --git a/libweston/compositor.c b/libweston/compositor.c
-index a38c4c1b..2ca3da3b 100644
---- a/libweston/compositor.c
-+++ b/libweston/compositor.c
-@@ -55,6 +55,8 @@
- #include "timeline.h"
-
- #include "compositor.h"
-+#include "weston-debug.h"
-+#include "linux-dmabuf.h"
- #include "viewporter-server-protocol.h"
- #include "presentation-time-server-protocol.h"
- #include "shared/helpers.h"
-@@ -6306,6 +6308,221 @@ timeline_key_binding_handler(struct weston_keyboard *keyboard,
- weston_timeline_open(compositor);
- }
-
-+static const char *
-+output_repaint_status_text(struct weston_output *output)
-+{
-+ switch (output->repaint_status) {
-+ case REPAINT_NOT_SCHEDULED:
-+ return "no repaint";
-+ case REPAINT_BEGIN_FROM_IDLE:
-+ return "start_repaint_loop scheduled";
-+ case REPAINT_SCHEDULED:
-+ return "repaint scheduled";
-+ case REPAINT_AWAITING_COMPLETION:
-+ return "awaiting completion";
-+ }
-+
-+ assert(!"output_repaint_status_text missing enum");
-+ return NULL;
-+}
-+
-+static void
-+debug_scene_view_print_buffer(FILE *fp, struct weston_view *view)
-+{
-+ struct weston_buffer *buffer = view->surface->buffer_ref.buffer;
-+ struct wl_shm_buffer *shm;
-+ struct linux_dmabuf_buffer *dmabuf;
-+
-+ if (!buffer) {
-+ fprintf(fp, "\t\t[buffer not available]\n");
-+ return;
-+ }
-+
-+ shm = wl_shm_buffer_get(buffer->resource);
-+ if (shm) {
-+ fprintf(fp, "\t\tSHM buffer\n");
-+ fprintf(fp, "\t\t\tformat: 0x%lx\n",
-+ (unsigned long) wl_shm_buffer_get_format(shm));
-+ return;
-+ }
-+
-+ dmabuf = linux_dmabuf_buffer_get(buffer->resource);
-+ if (dmabuf) {
-+ fprintf(fp, "\t\tdmabuf buffer\n");
-+ fprintf(fp, "\t\t\tformat: 0x%lx\n",
-+ (unsigned long) dmabuf->attributes.format);
-+ fprintf(fp, "\t\t\tmodifier: 0x%llx\n",
-+ (unsigned long long) dmabuf->attributes.modifier[0]);
-+ return;
-+ }
-+
-+ fprintf(fp, "\t\tEGL buffer");
-+}
-+
-+static void
-+debug_scene_view_print(FILE *fp, struct weston_view *view, int view_idx)
-+{
-+ struct weston_compositor *ec = view->surface->compositor;
-+ struct weston_output *output;
-+ char desc[512];
-+ pixman_box32_t *box;
-+ uint32_t surface_id = 0;
-+ pid_t pid = 0;
-+
-+ if (view->surface->resource) {
-+ struct wl_resource *resource = view->surface->resource;
-+ wl_client_get_credentials(wl_resource_get_client(resource),
-+ &pid, NULL, NULL);
-+ surface_id = wl_resource_get_id(view->surface->resource);
-+ }
-+
-+ if (!view->surface->get_label ||
-+ view->surface->get_label(view->surface, desc, sizeof(desc)) < 0) {
-+ strcpy(desc, "[no description available]");
-+ }
-+ fprintf(fp, "\tView %d (role %s, PID %d, surface ID %u, %s, %p):\n",
-+ view_idx, view->surface->role_name, pid, surface_id,
-+ desc, view);
-+
-+ box = pixman_region32_extents(&view->transform.boundingbox);
-+ fprintf(fp, "\t\tposition: (%d, %d) -> (%d, %d)\n",
-+ box->x1, box->y1, box->x2, box->y2);
-+ box = pixman_region32_extents(&view->transform.opaque);
-+
-+ if (pixman_region32_equal(&view->transform.opaque,
-+ &view->transform.boundingbox)) {
-+ fprintf(fp, "\t\t[fully opaque]\n");
-+ } else if (!pixman_region32_not_empty(&view->transform.opaque)) {
-+ fprintf(fp, "\t\t[not opaque]\n");
-+ } else {
-+ fprintf(fp, "\t\t[opaque: (%d, %d) -> (%d, %d)]\n",
-+ box->x1, box->y1, box->x2, box->y2);
-+ }
-+
-+ if (view->alpha < 1.0)
-+ fprintf(fp, "\t\talpha: %f\n", view->alpha);
-+
-+ if (view->output_mask != 0) {
-+ bool first_output = true;
-+ fprintf(fp, "\t\toutputs: ");
-+ wl_list_for_each(output, &ec->output_list, link) {
-+ if (!(view->output_mask & (1 << output->id)))
-+ continue;
-+ fprintf(fp, "%s%d (%s)%s",
-+ (first_output) ? "" : ", ",
-+ output->id, output->name,
-+ (view->output == output) ? " (primary)" : "");
-+ first_output = false;
-+ }
-+ } else {
-+ fprintf(fp, "\t\t[no outputs]");
-+ }
-+
-+ fprintf(fp, "\n");
-+
-+ debug_scene_view_print_buffer(fp, view);
-+}
-+
-+/**
-+ * Output information on how libweston is currently composing the scene
-+ * graph.
-+ */
-+WL_EXPORT char *
-+weston_compositor_print_scene_graph(struct weston_compositor *ec)
-+{
-+ struct weston_output *output;
-+ struct weston_layer *layer;
-+ struct timespec now;
-+ int layer_idx = 0;
-+ FILE *fp;
-+ char *ret;
-+ size_t len;
-+ int err;
-+
-+ fp = open_memstream(&ret, &len);
-+ assert(fp);
-+
-+ weston_compositor_read_presentation_clock(ec, &now);
-+ fprintf(fp, "Weston scene graph at %ld.%09ld:\n\n",
-+ now.tv_sec, now.tv_nsec);
-+
-+ wl_list_for_each(output, &ec->output_list, link) {
-+ struct weston_head *head;
-+ int head_idx = 0;
-+
-+ fprintf(fp, "Output %d (%s):\n", output->id, output->name);
-+ assert(output->enabled);
-+
-+ fprintf(fp, "\tposition: (%d, %d) -> (%d, %d)\n",
-+ output->x, output->y,
-+ output->x + output->width,
-+ output->y + output->height);
-+ fprintf(fp, "\tmode: %dx%d@%.3fHz\n",
-+ output->current_mode->width,
-+ output->current_mode->height,
-+ output->current_mode->refresh / 1000.0);
-+ fprintf(fp, "\tscale: %d\n", output->scale);
-+
-+ fprintf(fp, "\trepaint status: %s\n",
-+ output_repaint_status_text(output));
-+ if (output->repaint_status == REPAINT_SCHEDULED)
-+ fprintf(fp, "\tnext repaint: %ld.%09ld\n",
-+ output->next_repaint.tv_sec,
-+ output->next_repaint.tv_nsec);
-+
-+ wl_list_for_each(head, &output->head_list, output_link) {
-+ fprintf(fp, "\tHead %d (%s): %sconnected\n",
-+ head_idx++, head->name,
-+ (head->connected) ? "" : "not ");
-+ }
-+ }
-+
-+ fprintf(fp, "\n");
-+
-+ wl_list_for_each(layer, &ec->layer_list, link) {
-+ struct weston_view *view;
-+ int view_idx = 0;
-+
-+ fprintf(fp, "Layer %d (pos 0x%lx):\n", layer_idx++,
-+ (unsigned long) layer->position);
-+
-+ if (!weston_layer_mask_is_infinite(layer)) {
-+ fprintf(fp, "\t[mask: (%d, %d) -> (%d,%d)]\n\n",
-+ layer->mask.x1, layer->mask.y1,
-+ layer->mask.x2, layer->mask.y2);
-+ }
-+
-+ wl_list_for_each(view, &layer->view_list.link, layer_link.link)
-+ debug_scene_view_print(fp, view, view_idx++);
-+
-+ if (wl_list_empty(&layer->view_list.link))
-+ fprintf(fp, "\t[no views]\n");
-+
-+ fprintf(fp, "\n");
-+ }
-+
-+ err = fclose(fp);
-+ assert(err == 0);
-+
-+ return ret;
-+}
-+
-+/**
-+ * Called when the 'scene-graph' debug scope is bound by a client. This
-+ * one-shot weston-debug scope prints the current scene graph when bound,
-+ * and then terminates the stream.
-+ */
-+static void
-+debug_scene_graph_cb(struct weston_debug_stream *stream, void *data)
-+{
-+ struct weston_compositor *ec = data;
-+ char *str = weston_compositor_print_scene_graph(ec);
-+
-+ weston_debug_stream_printf(stream, "%s", str);
-+ free(str);
-+ weston_debug_stream_complete(stream);
-+}
-+
- /** Create the compositor.
- *
- * This functions creates and initializes a compositor instance.
-@@ -6415,6 +6632,12 @@ weston_compositor_create(struct wl_display *display, void *user_data)
- weston_compositor_add_debug_binding(ec, KEY_T,
- timeline_key_binding_handler, ec);
-
-+ ec->debug_scene =
-+ weston_compositor_add_debug_scope(ec, "scene-graph",
-+ "Scene graph details\n",
-+ debug_scene_graph_cb,
-+ ec);
-+
- return ec;
-
- fail:
-@@ -6714,6 +6937,8 @@ weston_compositor_destroy(struct weston_compositor *compositor)
- if (compositor->heads_changed_source)
- wl_event_source_remove(compositor->heads_changed_source);
-
-+ weston_debug_scope_destroy(compositor->debug_scene);
-+ compositor->debug_scene = NULL;
- weston_debug_compositor_destroy(compositor);
-
- free(compositor);
-diff --git a/libweston/compositor.h b/libweston/compositor.h
-index 069fb03d..49013e14 100644
---- a/libweston/compositor.h
-+++ b/libweston/compositor.h
-@@ -1163,6 +1163,7 @@ struct weston_compositor {
- struct weston_touch_calibrator *touch_calibrator;
-
- struct weston_debug_compositor *weston_debug;
-+ struct weston_debug_scope *debug_scene;
- };
-
- struct weston_buffer {
-@@ -1933,6 +1934,9 @@ weston_buffer_reference(struct weston_buffer_reference *ref,
- void
- weston_compositor_get_time(struct timespec *time);
-
-+char *
-+weston_compositor_print_scene_graph(struct weston_compositor *ec);
-+
- void
- weston_compositor_destroy(struct weston_compositor *ec);
- struct weston_compositor *
---
-2.16.2
-
diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1017-compositor-drm-Add-backend-pointer-to-drm_output.patch b/bsp/meta-synopsys/recipes-graphics/wayland/weston/1017-compositor-drm-Add-backend-pointer-to-drm_output.patch
deleted file mode 100644
index 2dff3bd3..00000000
--- a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1017-compositor-drm-Add-backend-pointer-to-drm_output.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 64dbbee7f6570949edc8bca30e6cd026a9e70a59 Mon Sep 17 00:00:00 2001
-From: Daniel Stone <daniels@collabora.com>
-Date: Fri, 20 Jul 2018 19:00:06 +0100
-Subject: [PATCH 17/46] compositor-drm: Add backend pointer to drm_output
-
-Add this for convenience, so it's easier to access when we add the DRM
-backend debug scope.
-
-Signed-off-by: Daniel Stone <daniels@collabora.com>
----
- libweston/compositor-drm.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
-index 94d78752..612e6a8f 100644
---- a/libweston/compositor-drm.c
-+++ b/libweston/compositor-drm.c
-@@ -463,6 +463,7 @@ struct drm_head {
-
- struct drm_output {
- struct weston_output base;
-+ struct drm_backend *backend;
-
- uint32_t crtc_id; /* object ID to pass to DRM functions */
- int pipe; /* index of CRTC in resource array / bitmasks */
-@@ -6104,6 +6105,8 @@ drm_output_create(struct weston_compositor *compositor, const char *name)
- if (output == NULL)
- return NULL;
-
-+ output->backend = b;
-+
- weston_output_init(&output->base, compositor, name);
-
- output->base.enable = drm_output_enable;
---
-2.16.2
-
diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1018-compositor-drm-Add-drm-backend-log-debug-scope.patch b/bsp/meta-synopsys/recipes-graphics/wayland/weston/1018-compositor-drm-Add-drm-backend-log-debug-scope.patch
deleted file mode 100644
index 932859ca..00000000
--- a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1018-compositor-drm-Add-drm-backend-log-debug-scope.patch
+++ /dev/null
@@ -1,632 +0,0 @@
-From 1cbe1f952de2b22539e163c0055fa3dcbb2e2d54 Mon Sep 17 00:00:00 2001
-From: Daniel Stone <daniels@collabora.com>
-Date: Fri, 20 Jul 2018 10:21:28 +0100
-Subject: [PATCH 18/46] compositor-drm: Add drm-backend log debug scope
-
-Add a 'drm-debug' scope which prints verbose information about the DRM
-backend's repaint cycle, including the decision tree on how views are
-assigned (or not) to planes.
-
-Signed-off-by: Daniel Stone <daniels@collabora.com>
----
- libweston/compositor-drm.c | 285 ++++++++++++++++++++++++++++++++++++++++-----
- 1 file changed, 258 insertions(+), 27 deletions(-)
-
-diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
-index 612e6a8f..b21793e5 100644
---- a/libweston/compositor-drm.c
-+++ b/libweston/compositor-drm.c
-@@ -51,6 +51,7 @@
-
- #include "compositor.h"
- #include "compositor-drm.h"
-+#include "weston-debug.h"
- #include "shared/helpers.h"
- #include "shared/timespec-util.h"
- #include "gl-renderer.h"
-@@ -73,6 +74,42 @@
- #define GBM_BO_USE_CURSOR GBM_BO_USE_CURSOR_64X64
- #endif
-
-+/**
-+ * A small wrapper to print information into the 'drm-backend' debug scope.
-+ *
-+ * The following conventions are used to print variables:
-+ *
-+ * - fixed uint32_t values, including Weston object IDs such as weston_output
-+ * IDs, DRM object IDs such as CRTCs or properties, and GBM/DRM formats:
-+ * "%lu (0x%lx)" (unsigned long) value, (unsigned long) value
-+ *
-+ * - fixed uint64_t values, such as DRM property values (including object IDs
-+ * when used as a value):
-+ * "%llu (0x%llx)" (unsigned long long) value, (unsigned long long) value
-+ *
-+ * - non-fixed-width signed int:
-+ * "%d" value
-+ *
-+ * - non-fixed-width unsigned int:
-+ * "%u (0x%x)" value, value
-+ *
-+ * - non-fixed-width unsigned long:
-+ * "%lu (0x%lx)" value, value
-+ *
-+ * Either the integer or hexadecimal forms may be omitted if it is known that
-+ * one representation is not useful (e.g. width/height in hex are rarely what
-+ * you want).
-+ *
-+ * This is to avoid implicit widening or narrowing when we use fixed-size
-+ * types: uint32_t can be resolved by either unsigned int or unsigned long
-+ * on a 32-bit system but only unsigned int on a 64-bit system, with uint64_t
-+ * being unsigned long long on a 32-bit system and unsigned long on a 64-bit
-+ * system. To avoid confusing side effects, we explicitly cast to the widest
-+ * possible type and use a matching format specifier.
-+ */
-+#define drm_debug(b, ...) \
-+ weston_debug_scope_printf((b)->debug, __VA_ARGS__)
-+
- #define MAX_CLONED_CONNECTORS 4
-
- /**
-@@ -302,6 +339,8 @@ struct drm_backend {
- bool shutting_down;
-
- bool aspect_ratio_supported;
-+
-+ struct weston_debug_scope *debug;
- };
-
- struct drm_mode {
-@@ -2357,6 +2396,10 @@ crtc_add_prop(drmModeAtomicReq *req, struct drm_output *output,
-
- ret = drmModeAtomicAddProperty(req, output->crtc_id, info->prop_id,
- val);
-+ drm_debug(output->backend, "\t\t\t[CRTC:%lu] %lu (%s) -> %llu (0x%llx)\n",
-+ (unsigned long) output->crtc_id,
-+ (unsigned long) info->prop_id, info->name,
-+ (unsigned long long) val, (unsigned long long) val);
- return (ret <= 0) ? -1 : 0;
- }
-
-@@ -2372,6 +2415,10 @@ connector_add_prop(drmModeAtomicReq *req, struct drm_head *head,
-
- ret = drmModeAtomicAddProperty(req, head->connector_id,
- info->prop_id, val);
-+ drm_debug(head->backend, "\t\t\t[CONN:%lu] %lu (%s) -> %llu (0x%llx)\n",
-+ (unsigned long) head->connector_id,
-+ (unsigned long) info->prop_id, info->name,
-+ (unsigned long long) val, (unsigned long long) val);
- return (ret <= 0) ? -1 : 0;
- }
-
-@@ -2387,6 +2434,10 @@ plane_add_prop(drmModeAtomicReq *req, struct drm_plane *plane,
-
- ret = drmModeAtomicAddProperty(req, plane->plane_id, info->prop_id,
- val);
-+ drm_debug(plane->backend, "\t\t\t[PLANE:%lu] %lu (%s) -> %llu (0x%llx)\n",
-+ (unsigned long) plane->plane_id,
-+ (unsigned long) info->prop_id, info->name,
-+ (unsigned long long) val, (unsigned long long) val);
- return (ret <= 0) ? -1 : 0;
- }
-
-@@ -2405,6 +2456,9 @@ drm_mode_ensure_blob(struct drm_backend *backend, struct drm_mode *mode)
- if (ret != 0)
- weston_log("failed to create mode property blob: %m\n");
-
-+ drm_debug(backend, "\t\t\t[atomic] created new mode blob %lu for %s",
-+ (unsigned long) mode->blob_id, mode->mode_info.name);
-+
- return ret;
- }
-
-@@ -2414,17 +2468,23 @@ drm_output_apply_state_atomic(struct drm_output_state *state,
- uint32_t *flags)
- {
- struct drm_output *output = state->output;
-- struct drm_backend *backend = to_drm_backend(output->base.compositor);
-+ struct drm_backend *b = to_drm_backend(output->base.compositor);
- struct drm_plane_state *plane_state;
- struct drm_mode *current_mode = to_drm_mode(output->base.current_mode);
- struct drm_head *head;
- int ret = 0;
-
-- if (state->dpms != output->state_cur->dpms)
-+ drm_debug(b, "\t\t[atomic] %s output %lu (%s) state\n",
-+ (*flags & DRM_MODE_ATOMIC_TEST_ONLY) ? "testing" : "applying",
-+ (unsigned long) output->base.id, output->base.name);
-+
-+ if (state->dpms != output->state_cur->dpms) {
-+ drm_debug(b, "\t\t\t[atomic] DPMS state differs, modeset OK\n");
- *flags |= DRM_MODE_ATOMIC_ALLOW_MODESET;
-+ }
-
- if (state->dpms == WESTON_DPMS_ON) {
-- ret = drm_mode_ensure_blob(backend, current_mode);
-+ ret = drm_mode_ensure_blob(b, current_mode);
- if (ret != 0)
- return ret;
-
-@@ -2522,6 +2582,9 @@ drm_pending_state_apply_atomic(struct drm_pending_state *pending_state,
- uint32_t *unused;
- int err;
-
-+ drm_debug(b, "\t\t[atomic] previous state invalid; "
-+ "starting with fresh state\n");
-+
- /* If we need to reset all our state (e.g. because we've
- * just started, or just been VT-switched in), explicitly
- * disable all the CRTCs and connectors we aren't using. */
-@@ -2534,9 +2597,16 @@ drm_pending_state_apply_atomic(struct drm_pending_state *pending_state,
-
- head = to_drm_head(head_base);
-
-+ drm_debug(b, "\t\t[atomic] disabling inactive head %s\n",
-+ head_base->name);
-+
- info = &head->props_conn[WDRM_CONNECTOR_CRTC_ID];
- err = drmModeAtomicAddProperty(req, head->connector_id,
- info->prop_id, 0);
-+ drm_debug(b, "\t\t\t[CONN:%lu] %lu (%s) -> 0\n",
-+ (unsigned long) head->connector_id,
-+ (unsigned long) info->prop_id,
-+ info->name);
- if (err <= 0)
- ret = -1;
- }
-@@ -2573,12 +2643,21 @@ drm_pending_state_apply_atomic(struct drm_pending_state *pending_state,
- continue;
- }
-
-+ drm_debug(b, "\t\t[atomic] disabling unused CRTC %lu\n",
-+ (unsigned long) *unused);
-+
-+ drm_debug(b, "\t\t\t[CRTC:%lu] %lu (%s) -> 0\n",
-+ (unsigned long) *unused,
-+ (unsigned long) info->prop_id, info->name);
- err = drmModeAtomicAddProperty(req, *unused,
- info->prop_id, 0);
- if (err <= 0)
- ret = -1;
-
- info = &infos[WDRM_CRTC_MODE_ID];
-+ drm_debug(b, "\t\t\t[CRTC:%lu] %lu (%s) -> 0\n",
-+ (unsigned long) *unused,
-+ (unsigned long) info->prop_id, info->name);
- err = drmModeAtomicAddProperty(req, *unused,
- info->prop_id, 0);
- if (err <= 0)
-@@ -2590,6 +2669,8 @@ drm_pending_state_apply_atomic(struct drm_pending_state *pending_state,
- /* Disable all the planes; planes which are being used will
- * override this state in the output-state application. */
- wl_list_for_each(plane, &b->plane_list, link) {
-+ drm_debug(b, "\t\t[atomic] starting with plane %lu disabled\n",
-+ (unsigned long) plane->plane_id);
- plane_add_prop(req, plane, WDRM_PLANE_CRTC_ID, 0);
- plane_add_prop(req, plane, WDRM_PLANE_FB_ID, 0);
- }
-@@ -2972,6 +3053,14 @@ drm_repaint_begin(struct weston_compositor *compositor)
- ret = drm_pending_state_alloc(b);
- b->repaint_data = ret;
-
-+ if (weston_debug_scope_is_enabled(b->debug)) {
-+ char *dbg = weston_compositor_print_scene_graph(compositor);
-+ drm_debug(b, "[repaint] Beginning repaint; pending_state %p\n",
-+ ret);
-+ drm_debug(b, "%s", dbg);
-+ free(dbg);
-+ }
-+
- return ret;
- }
-
-@@ -2991,6 +3080,7 @@ drm_repaint_flush(struct weston_compositor *compositor, void *repaint_data)
- struct drm_pending_state *pending_state = repaint_data;
-
- drm_pending_state_apply(pending_state);
-+ drm_debug(b, "[repaint] flushed pending_state %p\n", pending_state);
- b->repaint_data = NULL;
- }
-
-@@ -3007,6 +3097,7 @@ drm_repaint_cancel(struct weston_compositor *compositor, void *repaint_data)
- struct drm_pending_state *pending_state = repaint_data;
-
- drm_pending_state_free(pending_state);
-+ drm_debug(b, "[repaint] cancel pending_state %p\n", pending_state);
- b->repaint_data = NULL;
- }
-
-@@ -3050,12 +3141,21 @@ drm_output_prepare_overlay_view(struct drm_output_state *output_state,
- struct drm_fb *fb;
- unsigned int i;
- int ret;
-+ enum {
-+ NO_PLANES,
-+ NO_PLANES_WITH_FORMAT,
-+ NO_PLANES_ACCEPTED,
-+ PLACED_ON_PLANE,
-+ } availability = NO_PLANES;
-
- assert(!b->sprites_are_broken);
-
- fb = drm_fb_get_from_view(output_state, ev);
-- if (!fb)
-+ if (!fb) {
-+ drm_debug(b, "\t\t\t\t[overlay] not placing view %p on overlay: "
-+ " couldn't get fb\n", ev);
- return NULL;
-+ }
-
- wl_list_for_each(p, &b->plane_list, link) {
- if (p->type != WDRM_PLANE_TYPE_OVERLAY)
-@@ -3064,6 +3164,15 @@ drm_output_prepare_overlay_view(struct drm_output_state *output_state,
- if (!drm_plane_is_available(p, output))
- continue;
-
-+ state = drm_output_state_get_plane(output_state, p);
-+ if (state->fb) {
-+ state = NULL;
-+ continue;
-+ }
-+
-+ if (availability == NO_PLANES)
-+ availability = NO_PLANES_WITH_FORMAT;
-+
- /* Check whether the format is supported */
- for (i = 0; i < p->count_formats; i++) {
- unsigned int j;
-@@ -3084,15 +3193,14 @@ drm_output_prepare_overlay_view(struct drm_output_state *output_state,
- if (i == p->count_formats)
- continue;
-
-- state = drm_output_state_get_plane(output_state, p);
-- if (state->fb) {
-- state = NULL;
-- continue;
-- }
-+ if (availability == NO_PLANES_WITH_FORMAT)
-+ availability = NO_PLANES_ACCEPTED;
-
- state->ev = ev;
- state->output = output;
- if (!drm_plane_state_coords_for_view(state, ev)) {
-+ drm_debug(b, "\t\t\t\t[overlay] not placing view %p on overlay: "
-+ "unsuitable transform\n", ev);
- drm_plane_state_put_back(state);
- state = NULL;
- continue;
-@@ -3100,6 +3208,8 @@ drm_output_prepare_overlay_view(struct drm_output_state *output_state,
- if (!b->atomic_modeset &&
- (state->src_w != state->dest_w << 16 ||
- state->src_h != state->dest_h << 16)) {
-+ drm_debug(b, "\t\t\t\t[overlay] not placing view %p on overlay: "
-+ "no scaling without atomic\n", ev);
- drm_plane_state_put_back(state);
- state = NULL;
- continue;
-@@ -3113,17 +3223,48 @@ drm_output_prepare_overlay_view(struct drm_output_state *output_state,
-
- /* In planes-only mode, we don't have an incremental state to
- * test against, so we just hope it'll work. */
-- if (mode == DRM_OUTPUT_PROPOSE_STATE_PLANES_ONLY)
-+ if (mode == DRM_OUTPUT_PROPOSE_STATE_PLANES_ONLY) {
-+ drm_debug(b, "\t\t\t\t[overlay] provisionally placing "
-+ "view %p on overlay %lu in planes-only mode\n",
-+ ev, (unsigned long) p->plane_id);
-+ availability = PLACED_ON_PLANE;
- goto out;
-+ }
-
- ret = drm_pending_state_test(output_state->pending_state);
-- if (ret == 0)
-+ if (ret == 0) {
-+ drm_debug(b, "\t\t\t\t[overlay] provisionally placing "
-+ "view %p on overlay %d in mixed mode\n",
-+ ev, p->plane_id);
-+ availability = PLACED_ON_PLANE;
- goto out;
-+ }
-+
-+ drm_debug(b, "\t\t\t\t[overlay] not placing view %p on overlay %lu "
-+ "in mixed mode: kernel test failed\n",
-+ ev, (unsigned long) p->plane_id);
-
- drm_plane_state_put_back(state);
- state = NULL;
- }
-
-+ switch (availability) {
-+ case NO_PLANES:
-+ drm_debug(b, "\t\t\t\t[overlay] not placing view %p on overlay: "
-+ "no free overlay planes\n", ev);
-+ break;
-+ case NO_PLANES_WITH_FORMAT:
-+ drm_debug(b, "\t\t\t\t[overlay] not placing view %p on overlay: "
-+ "no free overlay planes matching format 0x%lx, "
-+ "modifier 0x%llx\n",
-+ ev, (unsigned long) fb->format,
-+ (unsigned long long) fb->modifier);
-+ break;
-+ case NO_PLANES_ACCEPTED:
-+ case PLACED_ON_PLANE:
-+ break;
-+ }
-+
- out:
- drm_fb_unref(fb);
- return state;
-@@ -3192,13 +3333,23 @@ drm_output_prepare_cursor_view(struct drm_output_state *output_state,
- if (b->gbm == NULL)
- return NULL;
-
-- if (ev->surface->buffer_ref.buffer == NULL)
-+ if (ev->surface->buffer_ref.buffer == NULL) {
-+ drm_debug(b, "\t\t\t\t[cursor] not assigning view %p to cursor plane "
-+ "(no buffer available)\n", ev);
- return NULL;
-+ }
- shmbuf = wl_shm_buffer_get(ev->surface->buffer_ref.buffer->resource);
-- if (!shmbuf)
-+ if (!shmbuf) {
-+ drm_debug(b, "\t\t\t\t[cursor] not assigning view %p to cursor plane "
-+ "(buffer isn't SHM)\n", ev);
- return NULL;
-- if (wl_shm_buffer_get_format(shmbuf) != WL_SHM_FORMAT_ARGB8888)
-+ }
-+ if (wl_shm_buffer_get_format(shmbuf) != WL_SHM_FORMAT_ARGB8888) {
-+ drm_debug(b, "\t\t\t\t[cursor] not assigning view %p to cursor plane "
-+ "(format 0x%lx unsuitable)\n",
-+ ev, (unsigned long) wl_shm_buffer_get_format(shmbuf));
- return NULL;
-+ }
-
- plane_state =
- drm_output_state_get_plane(output_state, output->cursor_plane);
-@@ -3216,8 +3367,11 @@ drm_output_prepare_cursor_view(struct drm_output_state *output_state,
- plane_state->src_w > (unsigned) b->cursor_width << 16 ||
- plane_state->src_h > (unsigned) b->cursor_height << 16 ||
- plane_state->src_w != plane_state->dest_w << 16 ||
-- plane_state->src_h != plane_state->dest_h << 16)
-+ plane_state->src_h != plane_state->dest_h << 16) {
-+ drm_debug(b, "\t\t\t\t[cursor] not assigning view %p to cursor plane "
-+ "(positioning requires cropping or scaling)\n", ev);
- goto err;
-+ }
-
- /* Since we're setting plane state up front, we need to work out
- * whether or not we need to upload a new cursor. We can't use the
-@@ -3240,8 +3394,10 @@ drm_output_prepare_cursor_view(struct drm_output_state *output_state,
- plane_state->fb =
- drm_fb_ref(output->gbm_cursor_fb[output->current_cursor]);
-
-- if (needs_update)
-+ if (needs_update) {
-+ drm_debug(b, "\t\t\t\t[cursor] copying new content to cursor BO\n");
- cursor_bo_update(plane_state, ev);
-+ }
-
- /* The cursor API is somewhat special: in cursor_bo_update(), we upload
- * a buffer which is always cursor_width x cursor_height, even if the
-@@ -3252,6 +3408,9 @@ drm_output_prepare_cursor_view(struct drm_output_state *output_state,
- plane_state->dest_w = b->cursor_width;
- plane_state->dest_h = b->cursor_height;
-
-+ drm_debug(b, "\t\t\t\t[cursor] provisionally assigned view %p to cursor\n",
-+ ev);
-+
- return plane_state;
-
- err:
-@@ -3347,18 +3506,32 @@ drm_output_propose_state(struct weston_output *output_base,
- if (!scanout_fb ||
- (scanout_fb->type != BUFFER_GBM_SURFACE &&
- scanout_fb->type != BUFFER_PIXMAN_DUMB)) {
-+ drm_debug(b, "\t\t[state] cannot propose mixed mode: "
-+ "for output %s (%lu): no previous renderer "
-+ "fb\n",
-+ output->base.name,
-+ (unsigned long) output->base.id);
- drm_output_state_free(state);
- return NULL;
- }
-
- if (scanout_fb->width != output_base->current_mode->width ||
- scanout_fb->height != output_base->current_mode->height) {
-+ drm_debug(b, "\t\t[state] cannot propose mixed mode "
-+ "for output %s (%lu): previous fb has "
-+ "different size\n",
-+ output->base.name,
-+ (unsigned long) output->base.id);
- drm_output_state_free(state);
- return NULL;
- }
-
- scanout_state = drm_plane_state_duplicate(state,
- plane->state_cur);
-+ drm_debug(b, "\t\t[state] using renderer FB ID %lu for mixed "
-+ "mode for output %s (%lu)\n",
-+ (unsigned long) scanout_fb->fb_id, output->base.name,
-+ (unsigned long) output->base.id);
- }
-
- /*
-@@ -3384,18 +3557,32 @@ drm_output_propose_state(struct weston_output *output_base,
- bool totally_occluded = false;
- bool overlay_occluded = false;
-
-+ drm_debug(b, "\t\t\t[view] evaluating view %p for "
-+ "output %s (%lu)\n",
-+ ev, output->base.name,
-+ (unsigned long) output->base.id);
-+
- /* If this view doesn't touch our output at all, there's no
- * reason to do anything with it. */
-- if (!(ev->output_mask & (1u << output->base.id)))
-+ if (!(ev->output_mask & (1u << output->base.id))) {
-+ drm_debug(b, "\t\t\t\t[view] ignoring view %p "
-+ "(not on our output)\n", ev);
- continue;
-+ }
-
- /* We only assign planes to views which are exclusively present
- * on our output. */
-- if (ev->output_mask != (1u << output->base.id))
-+ if (ev->output_mask != (1u << output->base.id)) {
-+ drm_debug(b, "\t\t\t\t[view] not assigning view %p to plane "
-+ "(on multiple outputs)\n", ev);
- force_renderer = true;
-+ }
-
-- if (!ev->surface->buffer_ref.buffer)
-+ if (!ev->surface->buffer_ref.buffer) {
-+ drm_debug(b, "\t\t\t\t[view] not assigning view %p to plane "
-+ "(no buffer available)\n", ev);
- force_renderer = true;
-+ }
-
- /* Ignore views we know to be totally occluded. */
- pixman_region32_init(&clipped_view);
-@@ -3408,6 +3595,8 @@ drm_output_propose_state(struct weston_output *output_base,
- &occluded_region);
- totally_occluded = !pixman_region32_not_empty(&surface_overlap);
- if (totally_occluded) {
-+ drm_debug(b, "\t\t\t\t[view] ignoring view %p "
-+ "(occluded on our output)\n", ev);
- pixman_region32_fini(&surface_overlap);
- pixman_region32_fini(&clipped_view);
- continue;
-@@ -3418,8 +3607,11 @@ drm_output_propose_state(struct weston_output *output_base,
- * be part of, or occluded by, it, and cannot go on a plane. */
- pixman_region32_intersect(&surface_overlap, &renderer_region,
- &clipped_view);
-- if (pixman_region32_not_empty(&surface_overlap))
-+ if (pixman_region32_not_empty(&surface_overlap)) {
-+ drm_debug(b, "\t\t\t\t[view] not assigning view %p to plane "
-+ "(occluded by renderer views)\n", ev);
- force_renderer = true;
-+ }
-
- /* We do not control the stacking order of overlay planes;
- * the scanout plane is strictly stacked bottom and the cursor
-@@ -3428,8 +3620,11 @@ drm_output_propose_state(struct weston_output *output_base,
- * planes overlapping each other. */
- pixman_region32_intersect(&surface_overlap, &occluded_region,
- &clipped_view);
-- if (pixman_region32_not_empty(&surface_overlap))
-+ if (pixman_region32_not_empty(&surface_overlap)) {
-+ drm_debug(b, "\t\t\t\t[view] not assigning view %p to plane "
-+ "(occluded by other overlay planes)\n", ev);
- overlay_occluded = true;
-+ }
- pixman_region32_fini(&surface_overlap);
-
- /* The cursor plane is 'special' in the sense that we can still
-@@ -3441,10 +3636,16 @@ drm_output_propose_state(struct weston_output *output_base,
- /* If sprites are disabled or the view is not fully opaque, we
- * must put the view into the renderer - unless it has already
- * been placed in the cursor plane, which can handle alpha. */
-- if (!ps && !planes_ok)
-+ if (!ps && !planes_ok) {
-+ drm_debug(b, "\t\t\t\t[view] not assigning view %p to plane "
-+ "(precluded by mode)\n", ev);
- force_renderer = true;
-- if (!ps && !drm_view_is_opaque(ev))
-+ }
-+ if (!ps && !drm_view_is_opaque(ev)) {
-+ drm_debug(b, "\t\t\t\t[view] not assigning view %p to plane "
-+ "(view not fully opaque)\n", ev);
- force_renderer = true;
-+ }
-
- /* Only try to place scanout surfaces in planes-only mode; in
- * mixed mode, we have already failed to place a view on the
-@@ -3477,6 +3678,9 @@ drm_output_propose_state(struct weston_output *output_base,
- * check if this is OK, and add ourselves to the renderer
- * region if so. */
- if (!renderer_ok) {
-+ drm_debug(b, "\t\t[view] failing state generation: "
-+ "placing view %p to renderer not allowed\n",
-+ ev);
- pixman_region32_fini(&clipped_view);
- goto err_region;
- }
-@@ -3496,8 +3700,11 @@ drm_output_propose_state(struct weston_output *output_base,
-
- /* Check to see if this state will actually work. */
- ret = drm_pending_state_test(state->pending_state);
-- if (ret != 0)
-+ if (ret != 0) {
-+ drm_debug(b, "\t\t[view] failing state generation: "
-+ "atomic test not OK\n");
- goto err;
-+ }
-
- /* Counterpart to duplicating scanout state at the top of this
- * function: if we have taken a renderer framebuffer and placed it in
-@@ -3530,12 +3737,24 @@ drm_assign_planes(struct weston_output *output_base, void *repaint_data)
- struct weston_view *ev;
- struct weston_plane *primary = &output_base->compositor->primary_plane;
-
-+ drm_debug(b, "\t[repaint] preparing state for output %s (%lu)\n",
-+ output_base->name, (unsigned long) output_base->id);
-+
- if (!b->sprites_are_broken) {
- state = drm_output_propose_state(output_base, pending_state,
- DRM_OUTPUT_PROPOSE_STATE_PLANES_ONLY);
-- if (!state)
-+ if (!state) {
-+ drm_debug(b, "\t[repaint] could not build planes-only "
-+ "state, trying mixed\n");
- state = drm_output_propose_state(output_base, pending_state,
- DRM_OUTPUT_PROPOSE_STATE_MIXED);
-+ }
-+ if (!state) {
-+ drm_debug(b, "\t[repaint] could not build mixed-mode "
-+ "state, trying renderer-only\n");
-+ }
-+ } else {
-+ drm_debug(b, "\t[state] no overlay plane support\n");
- }
-
- if (!state)
-@@ -3582,10 +3801,16 @@ drm_assign_planes(struct weston_output *output_base, void *repaint_data)
- }
- }
-
-- if (target_plane)
-+ if (target_plane) {
-+ drm_debug(b, "\t[repaint] view %p on %s plane %lu\n",
-+ ev, plane_type_enums[target_plane->type].name,
-+ (unsigned long) target_plane->plane_id);
- weston_view_move_to_plane(ev, &target_plane->base);
-- else
-+ } else {
-+ drm_debug(b, "\t[repaint] view %p using renderer "
-+ "composition\n", ev);
- weston_view_move_to_plane(ev, primary);
-+ }
-
- if (!target_plane ||
- target_plane->type == WDRM_PLANE_TYPE_CURSOR) {
-@@ -6264,6 +6489,8 @@ drm_destroy(struct weston_compositor *ec)
-
- destroy_sprites(b);
-
-+ weston_debug_scope_destroy(b->debug);
-+ b->debug = NULL;
- weston_compositor_shutdown(ec);
-
- wl_list_for_each_safe(base, next, &ec->head_list, compositor_link)
-@@ -6725,6 +6952,10 @@ drm_backend_create(struct weston_compositor *compositor,
- b->pageflip_timeout = config->pageflip_timeout;
- b->use_pixman_shadow = config->use_pixman_shadow;
-
-+ b->debug = weston_compositor_add_debug_scope(compositor, "drm-backend",
-+ "Debug messages from DRM/KMS backend\n",
-+ NULL, NULL);
-+
- compositor->backend = &b->base;
-
- if (parse_gbm_format(config->gbm_format, GBM_FORMAT_XRGB8888, &b->gbm_format) < 0)
---
-2.16.2
-
diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1046-compositor-drm-Read-FB2_MODIFIERS-capability.patch b/bsp/meta-synopsys/recipes-graphics/wayland/weston/1046-compositor-drm-Read-FB2_MODIFIERS-capability.patch
deleted file mode 100644
index f3a46b1a..00000000
--- a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1046-compositor-drm-Read-FB2_MODIFIERS-capability.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From a864f58f44d701164dbb32bfcdde8c6d761f28ee Mon Sep 17 00:00:00 2001
-From: Deepak Rawat <drawat@vmware.com>
-Date: Fri, 24 Aug 2018 13:16:03 -0700
-Subject: [PATCH 46/46] compositor-drm: Read FB2_MODIFIERS capability
-
-Not all drivers support fb2 modifiers so read the capability before
-using drmModeAddFB2WithModifiers.
-
-Signed-off-by: Deepak Rawat <drawat@vmware.com>
----
- libweston/compositor-drm.c | 20 +++++++++++++++-----
- 1 file changed, 15 insertions(+), 5 deletions(-)
-
-diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
-index e024e66f..4cf0d31f 100644
---- a/libweston/compositor-drm.c
-+++ b/libweston/compositor-drm.c
-@@ -346,6 +346,8 @@ struct drm_backend {
-
- bool aspect_ratio_supported;
-
-+ bool fb_modifiers;
-+
- struct weston_debug_scope *debug;
- };
-
-@@ -961,7 +963,7 @@ drm_fb_destroy_gbm(struct gbm_bo *bo, void *data)
- }
-
- static int
--drm_fb_addfb(struct drm_fb *fb)
-+drm_fb_addfb(struct drm_backend *b, struct drm_fb *fb)
- {
- int ret = -EINVAL;
- #ifdef HAVE_DRM_ADDFB2_MODIFIERS
-@@ -971,7 +973,7 @@ drm_fb_addfb(struct drm_fb *fb)
-
- /* If we have a modifier set, we must only use the WithModifiers
- * entrypoint; we cannot import it through legacy ioctls. */
-- if (fb->modifier != DRM_FORMAT_MOD_INVALID) {
-+ if (b->fb_modifiers && fb->modifier != DRM_FORMAT_MOD_INVALID) {
- /* KMS demands that if a modifier is set, it must be the same
- * for all planes. */
- #ifdef HAVE_DRM_ADDFB2_MODIFIERS
-@@ -1055,7 +1057,7 @@ drm_fb_create_dumb(struct drm_backend *b, int width, int height,
- fb->height = height;
- fb->fd = b->drm.fd;
-
-- if (drm_fb_addfb(fb) != 0) {
-+ if (drm_fb_addfb(b, fb) != 0) {
- weston_log("failed to create kms fb: %m\n");
- goto err_bo;
- }
-@@ -1228,7 +1230,7 @@ drm_fb_get_from_dmabuf(struct linux_dmabuf_buffer *dmabuf,
- goto err_free;
- }
-
-- if (drm_fb_addfb(fb) != 0)
-+ if (drm_fb_addfb(backend, fb) != 0)
- goto err_free;
-
- return fb;
-@@ -1301,7 +1303,7 @@ drm_fb_get_from_bo(struct gbm_bo *bo, struct drm_backend *backend,
- goto err_free;
- }
-
-- if (drm_fb_addfb(fb) != 0) {
-+ if (drm_fb_addfb(backend, fb) != 0) {
- if (type == BUFFER_GBM_SURFACE)
- weston_log("failed to create kms fb: %m\n");
- goto err_free;
-@@ -4062,6 +4064,14 @@ init_kms_caps(struct drm_backend *b)
- weston_log("DRM: %s atomic modesetting\n",
- b->atomic_modeset ? "supports" : "does not support");
-
-+#ifdef HAVE_DRM_ADDFB2_MODIFIERS
-+ ret = drmGetCap(b->drm.fd, DRM_CAP_ADDFB2_MODIFIERS, &cap);
-+ if (ret == 0)
-+ b->fb_modifiers = cap;
-+ else
-+#endif
-+ b->fb_modifiers = 0;
-+
- /*
- * KMS support for hardware planes cannot properly synchronize
- * without nuclear page flip. Without nuclear/atomic, hw plane
---
-2.16.2
-
diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston_5.0.0.bbappend b/bsp/meta-synopsys/recipes-graphics/wayland/weston_5.0.0.bbappend
deleted file mode 100644
index ac339435..00000000
--- a/bsp/meta-synopsys/recipes-graphics/wayland/weston_5.0.0.bbappend
+++ /dev/null
@@ -1,16 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/weston:"
-SRC_URI_append += "\
- file://1001-os-compatibility-define-CLOCK_BOOTTIME-when-not-avai.patch; \
- file://1005-protocol-add-weston-debug.xml.patch; \
- file://1006-libweston-add-weston_debug-API-and-implementation.patch; \
- file://1007-compositor-add-option-to-enable-weston_debug.patch; \
- file://1010-xwm-dump_property-to-use-FILE-internally.patch; \
- file://1011-xwm-move-FILE-to-the-callers-of-dump_property.patch; \
- file://1012-xwm-convert-WM_DEBUG-into-a-weston-debug-scope.patch; \
- file://1014-compositor-Add-weston_layer_mask_is_infinite.patch; \
- file://1015-compositor-Add-scene-graph-debug-scope.patch; \
- file://1017-compositor-drm-Add-backend-pointer-to-drm_output.patch; \
- file://1018-compositor-drm-Add-drm-backend-log-debug-scope.patch; \
- file://1046-compositor-drm-Read-FB2_MODIFIERS-capability.patch; \
-"
-
diff --git a/bsp/meta-synopsys/recipes-kernel/linux-firmware/linux-firmware_git.bbappend b/bsp/meta-synopsys/recipes-kernel/linux-firmware/linux-firmware_%.bbappend
index 7180d22b..7180d22b 100644
--- a/bsp/meta-synopsys/recipes-kernel/linux-firmware/linux-firmware_git.bbappend
+++ b/bsp/meta-synopsys/recipes-kernel/linux-firmware/linux-firmware_%.bbappend
diff --git a/bsp/meta-synopsys/recipes-kernel/linux/linux-arc.inc b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc.inc
index 9ec28f5c..52e626e6 100644
--- a/bsp/meta-synopsys/recipes-kernel/linux/linux-arc.inc
+++ b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc.inc
@@ -6,30 +6,8 @@ LICENSE = "GPLv2"
inherit kernel
-SRC_URI = "https://www.kernel.org/pub/linux/kernel/v4.x/linux-${PV}.tar.xz \
- file://0002-etnaviv-Make-archtecture-and-platform-agnostic.patch \
- file://0004-ARC-plat-hsdk-Add-support-of-Vivante-GPU.patch \
- file://0006-devres-Really-align-data-field-to-unsigned-long-long.patch \
- file://0007-ETHNAVIV-don-t-print-command-dump.patch \
- file://0006-Use-dev-mmcblk0p2-as-rootfs-storage.patch \
- file://0001-DRM-UDL-get-rid-of-useless-vblank-initialization.patch \
- file://1001-Agl-hsdk-defconfig.patch \
- file://3003-Experimental-ARC-increase-memory-to-1.5GB.patch \
- file://6001-ARC-adjust-memblock_reserve-of-kernel-memory.patch \
- file://8000-ARCv2-support-manual-regfile-save-on-interrupts.patch \
+SRC_URI = "https://www.kernel.org/pub/linux/kernel/v5.x/linux-${PV}.tar.xz \
"
-#file://2001-ARC-prevent-showing-irrelevant-exception-info-in-sig.patch
-#file://2002-ARC-split-show_faulting_vma-for-logic-and-representa.patch
-#file://2003-ARC-ARCv2-Introduce-SmaRT-support.patch
-#file://3003-Experimental-ARC-increase-memory-to-1.5GB.patch
-
-# file://1001-Agl-hsdk-defconfig.patch
-# file://5001-Enable-FBDEV_DRM-emulation-for-HSDK.patch
-
-# file://4001-HSDK-add-highmem-zone.patch
-# file://4002-ARC-temporary-disable-IOC.patch
-# file://4003-ARC-cache-ops-add-assertions.patch
-
S = "${WORKDIR}/linux-${PV}"
diff --git a/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0009-UDL-add-pseudo-deferred-io-for-modeset-drive.patch b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0009-UDL-add-pseudo-deferred-io-for-modeset-drive.patch
new file mode 100644
index 00000000..9ca4f1eb
--- /dev/null
+++ b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0009-UDL-add-pseudo-deferred-io-for-modeset-drive.patch
@@ -0,0 +1,79 @@
+From dba8746636e35f3e42bed62f5b7d7231adf569c8 Mon Sep 17 00:00:00 2001
+From: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
+Date: Wed, 4 Apr 2018 21:55:21 +0300
+Subject: [PATCH v100500 9/9] UDL: add pseudo deferred io for modeset driver
+
+With blackjack and mud.
+---
+ drivers/gpu/drm/udl/udl_modeset.c | 42 +++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 42 insertions(+)
+
+diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c
+index 5bcae7649795..737471da16e4 100644
+--- a/drivers/gpu/drm/udl/udl_modeset.c
++++ b/drivers/gpu/drm/udl/udl_modeset.c
+@@ -17,6 +17,45 @@
+ #include <drm/drm_plane_helper.h>
+ #include "udl_drv.h"
+
++/* All hacks and mud stuff --- start */
++#define DL_DEFIO_WRITE_DELAY (HZ / 40) /* deferred_io delay in jiffies */
++
++static struct delayed_work deferred_work;
++static struct drm_device *deferred_dev;
++
++static void pal_modeset_damage(struct drm_device *dev)
++{
++ struct udl_device *udl = dev->dev_private;
++ struct udl_framebuffer *ufb;
++
++ if (!udl->crtc || !udl->crtc->primary->fb)
++ return;
++
++ ufb = to_udl_fb(udl->crtc->primary->fb);
++ udl_handle_damage(ufb, 0, 0, ufb->base.width, ufb->base.height);
++}
++
++static void pal_deferred_io_work(struct work_struct *work)
++{
++ pal_modeset_damage(deferred_dev);
++ schedule_delayed_work(&deferred_work, DL_DEFIO_WRITE_DELAY);
++}
++
++static void pal_deferred_io_cleanup(void)
++{
++ cancel_delayed_work_sync(&deferred_work);
++}
++
++static void pal_deferred_io_init(struct drm_device *dev)
++{
++ deferred_dev = dev;
++
++ INIT_DELAYED_WORK(&deferred_work, pal_deferred_io_work);
++
++ schedule_delayed_work(&deferred_work, DL_DEFIO_WRITE_DELAY);
++}
++/* All hacks and mud stuff --- end */
++
+ /*
+ * All DisplayLink bulk operations start with 0xAF, followed by specific code
+ * All operations are written to buffers which then later get sent to device
+@@ -450,6 +489,8 @@ int udl_modeset_init(struct drm_device *dev)
+
+ udl_connector_init(dev, encoder);
+
++ pal_deferred_io_init(dev);
++
+ return 0;
+ }
+
+@@ -467,5 +508,6 @@ void udl_modeset_restore(struct drm_device *dev)
+
+ void udl_modeset_cleanup(struct drm_device *dev)
+ {
++ pal_deferred_io_cleanup();
+ drm_mode_config_cleanup(dev);
+ }
+--
+2.14.3
+
diff --git a/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0010-UDL-defio-add-fb-lock-and-required-checks.patch b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0010-UDL-defio-add-fb-lock-and-required-checks.patch
new file mode 100644
index 00000000..9c52b940
--- /dev/null
+++ b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0010-UDL-defio-add-fb-lock-and-required-checks.patch
@@ -0,0 +1,54 @@
+From f781b63e277a7bc821d9c3415bc84d3e075d5591 Mon Sep 17 00:00:00 2001
+From: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
+Date: Wed, 19 Sep 2018 16:57:32 +0300
+Subject: [PATCH] UDL: defio: add fb lock and required checks
+
+Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
+---
+ drivers/gpu/drm/udl/udl_modeset.c | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c
+index 10794ce2619c..df30b81abf7a 100644
+--- a/drivers/gpu/drm/udl/udl_modeset.c
++++ b/drivers/gpu/drm/udl/udl_modeset.c
+@@ -27,12 +27,26 @@ static void pal_modeset_damage(struct drm_device *dev)
+ {
+ struct udl_device *udl = dev->dev_private;
+ struct udl_framebuffer *ufb;
++ struct drm_framebuffer *fb;
+
+- if (!udl->crtc || !udl->crtc->primary->fb)
++ if (!udl) {
++ pr_warn(" PAL: UDL: no udl! %s:%d", __func__, __LINE__);
++ return;
++ }
++
++ if (!udl->crtc || !udl->crtc->primary)
+ return;
+
++ fb = udl->crtc->primary->fb;
++ if (!fb)
++ return;
++
++ drm_modeset_lock_all(fb->dev);
++
+ ufb = to_udl_fb(udl->crtc->primary->fb);
+ udl_handle_damage(ufb, 0, 0, ufb->base.width, ufb->base.height);
++
++ drm_modeset_unlock_all(fb->dev);
+ }
+
+ static void pal_deferred_io_work(struct work_struct *work)
+@@ -44,6 +58,8 @@ static void pal_deferred_io_work(struct work_struct *work)
+ static void pal_deferred_io_cleanup(void)
+ {
+ cancel_delayed_work_sync(&deferred_work);
++
++ pr_info(" PAL: UDL: cancel deferred io! %s:%d", __func__, __LINE__);
+ }
+
+ static void pal_deferred_io_init(struct drm_device *dev)
+--
+2.16.2
+
diff --git a/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0011-ARC-hsdk-Enable-U-Boot-support.patch b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0011-ARC-hsdk-Enable-U-Boot-support.patch
new file mode 100644
index 00000000..8c205bf6
--- /dev/null
+++ b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0011-ARC-hsdk-Enable-U-Boot-support.patch
@@ -0,0 +1,28 @@
+From 875c449cea26bbd35b11316fcbd3c53d22c98e9d Mon Sep 17 00:00:00 2001
+From: Alexey Brodkin <abrodkin@synopsys.com>
+Date: Tue, 15 Jan 2019 16:18:39 +0300
+Subject: [PATCH] ARC: [hsdk]: Enable U-Boot support
+
+This is required to get from U-Boot either
+customized kernel command line of even entire .dtb
+
+Upstream status: Inappropriate.
+
+Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
+---
+ arch/arc/configs/hsdk_defconfig | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/arch/arc/configs/hsdk_defconfig b/arch/arc/configs/hsdk_defconfig
+index 2a1d2cbfee1a..ef9b90550b18 100644
+--- a/arch/arc/configs/hsdk_defconfig
++++ b/arch/arc/configs/hsdk_defconfig
+@@ -77,3 +77,5 @@ CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10
+ # CONFIG_DEBUG_PREEMPT is not set
+ # CONFIG_FTRACE is not set
+ CONFIG_CRYPTO_ECHAINIV=y
++# CONFIG_ARC_SMP_HALT_ON_RESET is not set
++CONFIG_ARC_UBOOT_SUPPORT=y
+--
+2.16.2
+
diff --git a/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0012-ARC-hsdk-Enable-cgroups-support.patch b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0012-ARC-hsdk-Enable-cgroups-support.patch
new file mode 100644
index 00000000..47a1cfd8
--- /dev/null
+++ b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0012-ARC-hsdk-Enable-cgroups-support.patch
@@ -0,0 +1,27 @@
+From c2ef210039765c77544c6cd86336f4dc4b7ff52a Mon Sep 17 00:00:00 2001
+From: Alexey Brodkin <abrodkin@synopsys.com>
+Date: Wed, 16 Jan 2019 11:31:06 +0300
+Subject: [PATCH] ARC: [hsdk]: Enable cgroups support
+
+This is required for systemd, otherwise we get a message about
+missing API filesystems.
+
+Upstream status: Inappropriate.
+
+Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
+---
+ arch/arc/configs/hsdk_defconfig | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/arch/arc/configs/hsdk_defconfig b/arch/arc/configs/hsdk_defconfig
+index 109126c3d75c..4f1b917ba6f5 100644
+--- a/arch/arc/configs/hsdk_defconfig
++++ b/arch/arc/configs/hsdk_defconfig
+@@ -82,3 +82,4 @@ CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10
+ CONFIG_CRYPTO_ECHAINIV=y
+ # CONFIG_ARC_SMP_HALT_ON_RESET is not set
+ CONFIG_ARC_UBOOT_SUPPORT=y
++CONFIG_CGROUPS=y
+--
+2.16.2
+
diff --git a/bsp/meta-synopsys/recipes-kernel/linux/linux-arc_4.19.9.bb b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc_4.19.9.bb
deleted file mode 100644
index 6897b041..00000000
--- a/bsp/meta-synopsys/recipes-kernel/linux/linux-arc_4.19.9.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require linux-arc.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
-SRC_URI[sha256sum] = "fc116cc6829c73944215d3b3ac0fc368dde9e8235b456744afffde001269dbf2"
diff --git a/bsp/meta-synopsys/recipes-kernel/linux/linux-arc_5.3.15.bb b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc_5.3.15.bb
new file mode 100644
index 00000000..e3af8e6e
--- /dev/null
+++ b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc_5.3.15.bb
@@ -0,0 +1,6 @@
+require linux-arc.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
+SRC_URI[md5sum] = "3919149d6dfd122f24570c873bce951d"
+SRC_URI[sha256sum] = "cec8aaea89feac4a3555f1e4b90000244ff7c5e7640db242a7de796a006d1197"
+
diff --git a/bsp/meta-synopsys/recipes-kernel/linux/linux-yocto_%.bbappend b/bsp/meta-synopsys/recipes-kernel/linux/linux-yocto_%.bbappend
new file mode 100644
index 00000000..15778bb0
--- /dev/null
+++ b/bsp/meta-synopsys/recipes-kernel/linux/linux-yocto_%.bbappend
@@ -0,0 +1,9 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+COMPATIBLE_MACHINE_append = "|hsdk|nsimhs"
+
+KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}"
+
+SRC_URI += "\
+ file://most_deps.cfg \
+ "
diff --git a/bsp/meta-synopsys/recipes-multimedia/pulseaudio/pulseaudio_12.2.bbappend b/bsp/meta-synopsys/recipes-multimedia/pulseaudio/pulseaudio_13.0.bbappend
index 09e264cb..09e264cb 100644
--- a/bsp/meta-synopsys/recipes-multimedia/pulseaudio/pulseaudio_12.2.bbappend
+++ b/bsp/meta-synopsys/recipes-multimedia/pulseaudio/pulseaudio_13.0.bbappend
diff --git a/bsp/meta-synopsys/recipes-navigation/gpsd/gpsd_%.bbappend b/bsp/meta-synopsys/recipes-navigation/gpsd/gpsd_%.bbappend
new file mode 100644
index 00000000..655b645c
--- /dev/null
+++ b/bsp/meta-synopsys/recipes-navigation/gpsd/gpsd_%.bbappend
@@ -0,0 +1,2 @@
+CC_append += "-lpthread"
+CCLD_append += "-lpthread"
diff --git a/bsp/meta-synopsys/recipes-platform/images/agl-demo-platform-crosssdk.bbappend b/bsp/meta-synopsys/recipes-platform/images/agl-demo-platform-crosssdk.bbappend
new file mode 100644
index 00000000..58c80da8
--- /dev/null
+++ b/bsp/meta-synopsys/recipes-platform/images/agl-demo-platform-crosssdk.bbappend
@@ -0,0 +1 @@
+TOOLCHAIN_TARGET_TASK_remove = "gcc-sanitizers"
diff --git a/bsp/meta-synopsys/recipes-qt/qt5/qtbase/0001-Add-ARC-support-in-double-conversion.patch b/bsp/meta-synopsys/recipes-qt/qt5/qtbase/0001-Add-ARC-support-in-double-conversion.patch
index de7fec59..40e7b08b 100644
--- a/bsp/meta-synopsys/recipes-qt/qt5/qtbase/0001-Add-ARC-support-in-double-conversion.patch
+++ b/bsp/meta-synopsys/recipes-qt/qt5/qtbase/0001-Add-ARC-support-in-double-conversion.patch
@@ -1,7 +1,7 @@
-From e7da33f233ffb38f0e9d0bf839c7712911bce109 Mon Sep 17 00:00:00 2001
+From 2fa8ccab832fde23d5e8e395dbaa6e7ed94dd00b Mon Sep 17 00:00:00 2001
From: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
-Date: Tue, 26 Mar 2019 14:13:49 +0300
-Subject: [PATCH] double conversion: support ARC
+Date: Thu, 2 Apr 2020 23:11:49 +0300
+Subject: [PATCH] double conversion: ARC support
Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
---
@@ -9,18 +9,18 @@ Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/3rdparty/double-conversion/include/double-conversion/utils.h b/src/3rdparty/double-conversion/include/double-conversion/utils.h
-index 69aa17171c..ae5342eb45 100644
+index 7622fe6162..f45c77c360 100644
--- a/src/3rdparty/double-conversion/include/double-conversion/utils.h
+++ b/src/3rdparty/double-conversion/include/double-conversion/utils.h
-@@ -77,7 +77,7 @@ inline void abort_noreturn() { abort(); }
- defined(__SH4__) || defined(__alpha__) || \
+@@ -94,7 +94,7 @@ int main(int argc, char** argv) {
defined(_MIPS_ARCH_MIPS32R2) || \
- defined(__AARCH64EL__) || defined(__AARCH64EB__) || defined(__aarch64__) || \
-- defined(__riscv)
-+ defined(__riscv) || defined(__arc__)
+ defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \
+ defined(__riscv) || defined(__EMSCRIPTEN__) || \
+- defined(__or1k__)
++ defined(__or1k__) || defined(__arc__)
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
- #elif defined(__mc68000__)
- #undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS
+ #elif defined(__mc68000__) || \
+ defined(__pnacl__) || defined(__native_client__)
--
2.16.2
diff --git a/bsp/meta-synopsys/recipes-qt/qt5/qtbase_git.bbappend b/bsp/meta-synopsys/recipes-qt/qt5/qtbase_git.bbappend
index f3ad0fc2..a11cdeb0 100644
--- a/bsp/meta-synopsys/recipes-qt/qt5/qtbase_git.bbappend
+++ b/bsp/meta-synopsys/recipes-qt/qt5/qtbase_git.bbappend
@@ -1,5 +1,4 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/qtbase:"
-SRC_URI += "\
- file://0001-Add-ARC-support-in-double-conversion.patch \
- file://0002-Fix-build-for-ARC-with-glibc-due-to-lack-of-FENV.patch \
-"
+#SRC_URI += "\
+# file://0001-Add-ARC-support-in-double-conversion.patch \
+#"
diff --git a/bsp/meta-synopsys/recipes-support/gnupg/gnupg_2.2.%.bbappend b/bsp/meta-synopsys/recipes-support/gnupg/gnupg_2.2.%.bbappend
new file mode 100644
index 00000000..db1c53e1
--- /dev/null
+++ b/bsp/meta-synopsys/recipes-support/gnupg/gnupg_2.2.%.bbappend
@@ -0,0 +1 @@
+EXTRA_OECONF_append = " ac_cv_have_decl_sys_siglist=no"
diff --git a/bsp/meta-synopsys/recipes-support/libgpg-error/libgpg-error_1.32.bbappend b/bsp/meta-synopsys/recipes-support/libgpg-error/libgpg-error_1.37.bbappend
index 0c23363f..0c23363f 100644
--- a/bsp/meta-synopsys/recipes-support/libgpg-error/libgpg-error_1.32.bbappend
+++ b/bsp/meta-synopsys/recipes-support/libgpg-error/libgpg-error_1.37.bbappend
diff --git a/bsp/meta-synopsys/recipes-support/liburcu/liburcu_0.10.%.bbappend b/bsp/meta-synopsys/recipes-support/liburcu/liburcu_0.11.%.bbappend
index 5f059523..5f059523 100644
--- a/bsp/meta-synopsys/recipes-support/liburcu/liburcu_0.10.%.bbappend
+++ b/bsp/meta-synopsys/recipes-support/liburcu/liburcu_0.11.%.bbappend