"toolchain: switch to GCC v7.4"

This reverts commit 7548d17823.
This commit is contained in:
LEAN-ESX 2019-10-28 01:19:41 -07:00
parent cf19c5720c
commit e21c8c95e1
80 changed files with 795 additions and 1668 deletions

View File

@ -18,7 +18,7 @@ kmod-nf-nathelper kmod-nf-nathelper-extra kmod-ipt-raw wget libustream-openssl c
default-settings luci luci-app-ddns luci-app-sqm luci-app-upnp luci-app-adbyby-plus luci-app-autoreboot \
luci-app-filetransfer luci-app-vsftpd ddns-scripts_aliyun luci-app-ssr-plus \
luci-app-pptp-server luci-app-arpbind luci-app-vlmcsd luci-app-wifischedule luci-app-wol luci-app-ramfree \
luci-app-sfe luci-app-flowoffload luci-app-nlbwmon luci-app-usb-printer luci-app-accesscontrol luci-app-zerotier
luci-app-sfe luci-app-flowoffload luci-app-nlbwmon luci-app-usb-printer luci-app-accesscontrol luci-app-zerotier luci-app-xlnetacc
# For nas targets
DEFAULT_PACKAGES.nas:=fdisk lsblk mdadm automount autosamba luci-app-usb-printer
# For router targets
@ -56,7 +56,7 @@ else
endif
endif
ifneq ($(filter 4.9,$(KERNEL_PATCHVER)),)
ifneq ($(filter 3.18 4.9,$(KERNEL_PATCHVER)),)
DEFAULT_PACKAGES.router:=$(filter-out kmod-ipt-offload,$(DEFAULT_PACKAGES.router))
endif
@ -188,6 +188,26 @@ ifeq ($(DUMP),1)
endif
ifneq ($(findstring arm,$(ARCH)),)
CPU_TYPE ?= xscale
CPU_CFLAGS_arm920t = -mcpu=arm920t
CPU_CFLAGS_arm926ej-s = -mcpu=arm926ej-s
CPU_CFLAGS_arm1136j-s = -mcpu=arm1136j-s
CPU_CFLAGS_arm1176jzf-s = -mcpu=arm1176jzf-s
CPU_CFLAGS_cortex-a5 = -mcpu=cortex-a5
CPU_CFLAGS_cortex-a7 = -mcpu=cortex-a7
CPU_CFLAGS_cortex-a8 = -mcpu=cortex-a8
CPU_CFLAGS_cortex-a9 = -mcpu=cortex-a9
CPU_CFLAGS_cortex-a15 = -mcpu=cortex-a15
CPU_CFLAGS_cortex-a53 = -mcpu=cortex-a53
CPU_CFLAGS_cortex-a72 = -mcpu=cortex-a72
CPU_CFLAGS_fa526 = -mcpu=fa526
CPU_CFLAGS_mpcore = -mcpu=mpcore
CPU_CFLAGS_xscale = -mcpu=xscale
ifeq ($(CONFIG_SOFT_FLOAT),)
CPU_CFLAGS_neon = -mfpu=neon
CPU_CFLAGS_vfp = -mfpu=vfp
CPU_CFLAGS_vfpv3 = -mfpu=vfpv3-d16
CPU_CFLAGS_neon-vfpv4 = -mfpu=neon-vfpv4
endif
endif
ifeq ($(ARCH),powerpc)
CPU_CFLAGS_603e:=-mcpu=603e
@ -230,9 +250,6 @@ ifeq ($(DUMP),1)
.SILENT: $(TMP_CONFIG)
.PRECIOUS: $(TMP_CONFIG)
ifdef KERNEL_TESTING_PATCHVER
FEATURES += testing-kernel
endif
ifneq ($(CONFIG_OF),)
FEATURES += dt
endif
@ -291,7 +308,6 @@ define BuildTargets/DumpCurrent
echo 'Target-Optimization: $(if $(CFLAGS),$(CFLAGS),$(DEFAULT_CFLAGS))'; \
echo 'CPU-Type: $(CPU_TYPE)$(if $(CPU_SUBTYPE),+$(CPU_SUBTYPE))'; \
echo 'Linux-Version: $(LINUX_VERSION)'; \
$(if $(LINUX_TESTING_VERSION),echo 'Linux-Testing-Version: $(LINUX_TESTING_VERSION)';) \
echo 'Linux-Release: $(LINUX_RELEASE)'; \
echo 'Linux-Kernel-Arch: $(LINUX_KARCH)'; \
$(if $(SUBTARGET),,$(if $(DEFAULT_SUBTARGET), echo 'Default-Subtarget: $(DEFAULT_SUBTARGET)'; )) \

View File

@ -139,11 +139,11 @@ else
TOOLCHAIN_DIR_NAME:=toolchain-$(GNU_TARGET_NAME)
endif
ifeq ($(or $(CONFIG_EXTERNAL_TOOLCHAIN),$(CONFIG_TARGET_uml)),)
ifeq ($(CONFIG_GCC_USE_IREMAP),y)
iremap = -iremap$(1):$(2)
ifeq ($(or $(CONFIG_EXTERNAL_TOOLCHAIN),$(CONFIG_GCC_VERSION_4_8),$(CONFIG_TARGET_uml)),)
ifeq ($(CONFIG_GCC_USE_EMBEDDED_PATH_REMAP),y)
iremap = -fmacro-prefix-map=$(1)=$(2)
else
iremap = -ffile-prefix-map=$(1)=$(2)
iremap = -iremap$(1):$(2)
endif
endif

View File

@ -42,7 +42,7 @@ menuconfig EXTERNAL_TOOLCHAIN
bool
prompt "Use external toolchain" if DEVEL
help
If enabled, the buildroot will compile using an existing toolchain instead of
If enabled, LEDE will compile using an existing toolchain instead of
compiling one.
config NATIVE_TOOLCHAIN
@ -51,7 +51,7 @@ menuconfig EXTERNAL_TOOLCHAIN
depends on EXTERNAL_TOOLCHAIN
select NO_STRIP
help
If enabled, the buildroot will compile using the native toolchain for your
If enabled, LEDE will compile using the native toolchain for your
host instead of compiling one.
config TARGET_NAME
@ -238,6 +238,7 @@ comment "C Library"
choice
prompt "C Library implementation" if TOOLCHAINOPTS
default LIBC_USE_UCLIBC if arc
default LIBC_USE_GLIBC if powerpc64
default LIBC_USE_MUSL
help
Select the C library implementation.
@ -250,17 +251,17 @@ choice
config LIBC_USE_UCLIBC
select USE_UCLIBC
bool "Use uClibc"
depends on BROKEN || arc
depends on !(aarch64 || aarch64_be || powerpc64)
depends on BROKEN || !(arm || armeb || i386 || x86_64 || mips || mipsel || mips64 || mips64el || powerpc)
config LIBC_USE_MUSL
select USE_MUSL
bool "Use musl"
depends on !arc
depends on !(arc || powerpc64)
endchoice
source "toolchain/uClibc/Config.in"
source "toolchain/musl/Config.in"
comment "Debuggers"
depends on TOOLCHAINOPTS
@ -273,6 +274,7 @@ config GDB
Enable if you want to build the gdb.
config USE_GLIBC
default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (powerpc64)
bool
config USE_UCLIBC
@ -280,7 +282,7 @@ config USE_UCLIBC
bool
config USE_MUSL
default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc)
default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc || powerpc64)
bool
config SSP_SUPPORT

View File

@ -49,7 +49,7 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
$(curdir)/gcc/initial/compile+=$(curdir)/binutils/compile
$(curdir)/$(LIBC)/compile:=$(curdir)/gcc/initial/compile
$(curdir)/gcc/final/compile:=$(curdir)/$(LIBC)/compile $(curdir)/kernel-headers/compile
$(curdir)/gcc/final/compile:=$(curdir)/$(LIBC)/compile
$(curdir)/$(LIBC)/utils/compile:=$(curdir)/gcc/final/compile
endif

View File

@ -3,24 +3,30 @@
choice
prompt "Binutils Version" if TOOLCHAINOPTS
default BINUTILS_USE_VERSION_2_31_1 if !arc
default BINUTILS_USE_VERSION_2_32 if arc
default BINUTILS_USE_VERSION_2_29_ARC if arc
help
Select the version of binutils you wish to use.
config BINUTILS_USE_VERSION_2_29_ARC
depends on arc
bool "ARC binutils 2.29"
select BINUTILS_VERSION_2_29_ARC
config BINUTILS_USE_VERSION_2_29_1
depends on !arc
bool "Binutils 2.29.1"
select BINUTILS_VERSION_2_29_1
config BINUTILS_USE_VERSION_2_30
depends on !arc
bool "Binutils 2.30"
select BINUTILS_VERSION_2_30
config BINUTILS_USE_VERSION_2_31_1
depends on !arc
bool "Binutils 2.31.1"
select BINUTILS_VERSION_2_31_1
config BINUTILS_USE_VERSION_2_32
bool "Binutils 2.32"
select BINUTILS_VERSION_2_32
endchoice
config EXTRA_BINUTILS_CONFIG_OPTIONS

View File

@ -1,16 +1,20 @@
config BINUTILS_VERSION_2_29_ARC
default y if (!TOOLCHAINOPTS && arc)
bool
config BINUTILS_VERSION_2_29_1
bool
config BINUTILS_VERSION_2_30
bool
config BINUTILS_VERSION_2_31_1
default y if (!TOOLCHAINOPTS && !arc)
bool
config BINUTILS_VERSION_2_32
default y if (!TOOLCHAINOPTS && arc)
bool
config BINUTILS_VERSION
string
default "2.29.1" if BINUTILS_VERSION_2_29_1
default "2.30" if BINUTILS_VERSION_2_30
default "2.31.1" if BINUTILS_VERSION_2_31_1
default "2.32" if BINUTILS_VERSION_2_32
default "arc-2017.09" if BINUTILS_VERSION_2_29_ARC

View File

@ -19,12 +19,21 @@ ifeq ($(PKG_VERSION),2.29.1)
PKG_HASH:=e7010a46969f9d3e53b650a518663f98a5dde3c3ae21b7d71e5e6803bc36b577
endif
ifeq ($(PKG_VERSION),2.30)
PKG_HASH:=6e46b8aeae2f727a36f0bd9505e405768a72218f1796f0d09757d45209871ae6
endif
ifeq ($(PKG_VERSION),2.31.1)
PKG_HASH:=5d20086ecf5752cc7d9134246e9588fa201740d540f7eb84d795b1f7a93bca86
endif
ifeq ($(PKG_VERSION),2.32)
PKG_HASH:=0ab6c55dd86a92ed561972ba15b9b70a8b9f75557f896446c82e8b36e473ee04
ifneq ($(CONFIG_BINUTILS_VERSION_2_29_ARC),)
PKG_REV:=arc-2017.09-release
PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/$(PKG_REV)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_REV).tar.gz
PKG_HASH:=2ea086fd5521e942926dd6ff6922ce31c29ee7ffc754fca3d06385e0f27600f8
BINUTILS_DIR:=$(PKG_NAME)-gdb-$(PKG_REV)
HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(BINUTILS_DIR)
endif
HOST_BUILD_PARALLEL:=1
@ -33,33 +42,34 @@ PATCH_DIR:=./patches/$(PKG_VERSION)
include $(INCLUDE_DIR)/toolchain-build.mk
HOST_CONFIGURE_ARGS = \
--prefix=$(TOOLCHAIN_DIR) \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
--target=$(REAL_GNU_TARGET_NAME) \
--with-sysroot=$(TOOLCHAIN_DIR) \
--enable-deterministic-archives \
--enable-plugins \
--disable-multilib \
--disable-werror \
--disable-nls \
--disable-sim \
--disable-gdb \
$(GRAPHITE_CONFIGURE) \
$(SOFT_FLOAT_CONFIG_OPTION) \
$(call qstrip,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS))
BINUTILS_CONFIGURE:= \
./configure \
--prefix=$(TOOLCHAIN_DIR) \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
--target=$(REAL_GNU_TARGET_NAME) \
--with-sysroot=$(TOOLCHAIN_DIR) \
--enable-deterministic-archives \
--enable-plugins \
--disable-multilib \
--disable-werror \
--disable-nls \
--disable-sim \
--disable-gdb \
$(GRAPHITE_CONFIGURE) \
$(SOFT_FLOAT_CONFIG_OPTION) \
$(call qstrip,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS))
ifneq ($(CONFIG_SSP_SUPPORT),)
HOST_CONFIGURE_ARGS+= \
BINUTILS_CONFIGURE+= \
--enable-libssp
else
HOST_CONFIGURE_ARGS+= \
BINUTILS_CONFIGURE+= \
--disable-libssp
endif
ifneq ($(CONFIG_EXTRA_TARGET_ARCH),)
HOST_CONFIGURE_ARGS+= \
BINUTILS_CONFIGURE+= \
--enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-$(TARGET_SUFFIX)
endif
@ -70,6 +80,12 @@ define Host/Prepare
$(SED) 's, " Linaro.*,,' $(HOST_BUILD_DIR)/bfd/version.h
endef
define Host/Configure
(cd $(HOST_BUILD_DIR); \
$(BINUTILS_CONFIGURE) \
);
endef
define Host/Compile
+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) all
endef

View File

@ -0,0 +1,112 @@
From: Alan Modra <amodra@gmail.com>
Date: Tue, 5 Jun 2018 21:04:00 +0930
Subject: [PATCH] PR23254, ld.bfd mishandles file pointers while scanning
archive
Best practice is to not mix lseek/read with fseek/fread on the same
underlying file descriptor, as not all stdio implementations will cope.
Since the plugin uses lseek/read while bfd uses fseek/fread this patch
reopens the file for exclusive use by the plugin rather than trying to
restore the file descriptor. That allows the plugin to read the file
after plugin_call_claim_file too.
bfd/
PR 23254
* plugin.c (bfd_plugin_open_input): Allow for possibility of
nested archives. Open file again for plugin.
(try_claim): Don't save and restore file position. Close file
if not claimed.
* sysdep.h (O_BINARY): Define.
ld/
PR 23254
* plugin.c (plugin_call_claim_file): Revert 2016-07-19 patch.
(plugin_object_p): Don't dup file descriptor.
---
--- a/bfd/plugin.c
+++ b/bfd/plugin.c
@@ -165,14 +165,22 @@ bfd_plugin_open_input (bfd *ibfd, struct
bfd *iobfd;
iobfd = ibfd;
- if (ibfd->my_archive && !bfd_is_thin_archive (ibfd->my_archive))
- iobfd = ibfd->my_archive;
+ while (iobfd->my_archive
+ && !bfd_is_thin_archive (iobfd->my_archive))
+ iobfd = iobfd->my_archive;
file->name = iobfd->filename;
if (!iobfd->iostream && !bfd_open_file (iobfd))
return 0;
- file->fd = fileno ((FILE *) iobfd->iostream);
+ /* The plugin API expects that the file descriptor won't be closed
+ and reused as done by the bfd file cache. So open it again.
+ dup isn't good enough. plugin IO uses lseek/read while BFD uses
+ fseek/fread. It isn't wise to mix the unistd and stdio calls on
+ the same underlying file descriptor. */
+ file->fd = open (file->name, O_RDONLY | O_BINARY);
+ if (file->fd < 0)
+ return 0;
if (iobfd == ibfd)
{
@@ -196,12 +204,12 @@ try_claim (bfd *abfd)
int claimed = 0;
struct ld_plugin_input_file file;
+ file.handle = abfd;
if (!bfd_plugin_open_input (abfd, &file))
return 0;
- file.handle = abfd;
- off_t cur_offset = lseek (file.fd, 0, SEEK_CUR);
claim_file (&file, &claimed);
- lseek (file.fd, cur_offset, SEEK_SET);
+ if (!claimed)
+ close (file.fd);
return claimed;
}
--- a/bfd/sysdep.h
+++ b/bfd/sysdep.h
@@ -108,6 +108,10 @@ extern char *strrchr ();
#ifndef O_ACCMODE
#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
#endif
+/* Systems that don't already define this, don't need it. */
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
#ifndef SEEK_SET
#define SEEK_SET 0
--- a/ld/plugin.c
+++ b/ld/plugin.c
@@ -1053,14 +1053,10 @@ plugin_call_claim_file (const struct ld_
{
if (curplug->claim_file_handler)
{
- off_t cur_offset;
enum ld_plugin_status rv;
called_plugin = curplug;
- cur_offset = lseek (file->fd, 0, SEEK_CUR);
rv = (*curplug->claim_file_handler) (file, claimed);
- if (!*claimed)
- lseek (file->fd, cur_offset, SEEK_SET);
called_plugin = NULL;
if (rv != LDPS_OK)
set_plugin_error (curplug->name);
@@ -1126,12 +1122,6 @@ plugin_object_p (bfd *ibfd)
}
file.handle = input;
- /* The plugin API expects that the file descriptor won't be closed
- and reused as done by the bfd file cache. So dup one. */
- file.fd = dup (file.fd);
- if (file.fd < 0)
- return NULL;
-
input->abfd = abfd;
input->view_buffer.addr = NULL;
input->view_buffer.filesize = 0;

View File

@ -11,7 +11,7 @@
EMULATION_OFILES = @EMULATION_OFILES@
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -563,7 +563,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
@@ -446,7 +446,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
# We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR
# directives need to be different for native and cross linkers.

View File

@ -1,6 +1,6 @@
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -1471,6 +1471,8 @@ fragment <<EOF
@@ -1470,6 +1470,8 @@ fragment <<EOF
&& command_line.rpath == NULL)
{
path = (const char *) getenv ("LD_RUN_PATH");
@ -9,7 +9,7 @@
if (path
&& gld${EMULATION_NAME}_search_needed (path, &n, force))
break;
@@ -1746,6 +1748,8 @@ gld${EMULATION_NAME}_before_allocation (
@@ -1750,6 +1752,8 @@ gld${EMULATION_NAME}_before_allocation (
rpath = command_line.rpath;
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");

View File

@ -1,6 +1,6 @@
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -8001,6 +8001,7 @@ _bfd_mips_elf_create_dynamic_sections (b
@@ -7877,6 +7877,7 @@ _bfd_mips_elf_create_dynamic_sections (b
name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING";
bh = NULL;
@ -8,7 +8,7 @@
if (!(_bfd_generic_link_add_one_symbol
(info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, 0,
NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh)))
@@ -8013,6 +8014,7 @@ _bfd_mips_elf_create_dynamic_sections (b
@@ -7889,6 +7890,7 @@ _bfd_mips_elf_create_dynamic_sections (b
if (! bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;

View File

@ -1,6 +1,6 @@
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -919,12 +919,12 @@ case "${targ}" in
@@ -1189,12 +1189,12 @@ case "${targ}" in
targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
;;
mips64*el-*-linux*)
@ -19,7 +19,7 @@
targ_defvec=mips_elf32_trad_le_vec
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -468,11 +468,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmip
@@ -535,11 +535,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmip
mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
targ_extra_emuls="elf32elmipvxworks" ;;
mips*-*-windiss) targ_emul=elf32mipswindiss ;;

View File

@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/target.mk
PKG_NAME:=fortify-headers
PKG_VERSION:=1.1
PKG_VERSION:=1.0
PKG_RELEASE=1
PKG_SOURCE_URL:=http://dl.2f30.org/releases
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_HASH:=6ba5d860a2d2ba4c3346924b93930c34856eafe148bdbdf271ecab8065201fb6
PKG_HASH:=026e4cc0f2aa69b7922b1bc8838491048b497faf1c8b20450741114f9ea3775b
include $(INCLUDE_DIR)/toolchain-build.mk

View File

@ -2,10 +2,16 @@
choice
prompt "GCC compiler Version" if TOOLCHAINOPTS
default GCC_USE_VERSION_8
default GCC_USE_VERSION_7_1_ARC if arc
default GCC_USE_VERSION_7
help
Select the version of gcc you wish to use.
config GCC_USE_VERSION_7_1_ARC
select GCC_VERSION_7_1_ARC
bool "gcc 7.1.x with support of ARC cores"
depends on arc
config GCC_USE_VERSION_5
bool "gcc 5.x"
depends on !arc
@ -16,9 +22,7 @@ choice
config GCC_USE_VERSION_8
bool "gcc 8.x"
config GCC_USE_VERSION_9
bool "gcc 9.x"
depends on !arc
endchoice
config GCC_USE_GRAPHITE

View File

@ -1,23 +1,23 @@
config GCC_VERSION_7_1_ARC
default y if (!TOOLCHAINOPTS && arc)
bool
config GCC_VERSION_5
default y if GCC_USE_VERSION_5
bool
config GCC_VERSION_7
default y if GCC_USE_VERSION_7
config GCC_VERSION_8
default y if GCC_USE_VERSION_8
bool
config GCC_VERSION_9
default y if GCC_USE_VERSION_9
config GCC_USE_EMBEDDED_PATH_REMAP
default y if GCC_VERSION_8
default n
bool
config GCC_VERSION
string
default "5.5.0" if GCC_VERSION_5
default "7.4.0" if GCC_VERSION_7
default "9.2.0" if GCC_VERSION_9
default "8.3.0"
config GCC_USE_IREMAP
bool
default y if ( GCC_USE_VERSION_5 || GCC_USE_VERSION_7 )
default n
default "arc-2017.09-release" if GCC_VERSION_7_1_ARC
default "8.2.0" if GCC_VERSION_8
default "7.4.0"

View File

@ -36,17 +36,23 @@ ifeq ($(PKG_VERSION),7.4.0)
PKG_HASH:=eddde28d04f334aec1604456e536416549e9b1aa137fc69204e65eb0c009fe51
endif
ifeq ($(PKG_VERSION),8.3.0)
PKG_HASH:=64baadfe6cc0f4947a84cb12d7f0dfaf45bb58b7e92461639596c21e02d97d2c
ifeq ($(PKG_VERSION),8.2.0)
PKG_HASH:=196c3c04ba2613f893283977e6011b2345d1cd1af9abeac58e916b1aab3e0080
endif
ifeq ($(PKG_VERSION),9.2.0)
PKG_HASH:=ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206
ifneq ($(CONFIG_GCC_VERSION_7_1_ARC),)
PKG_VERSION:=7.1.1
PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/archive/$(GCC_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(GCC_VERSION).tar.gz
PKG_HASH:=90596af8b9c26a434cec0a3b3d37d0c7c755ab6a65496af6ca32529fab5a6cfe
PKG_REV:=2017.09-release
GCC_DIR:=gcc-arc-$(PKG_REV)
HOST_BUILD_DIR = $(BUILD_DIR_HOST)/$(PKG_NAME)-$(GCC_VERSION)
endif
PATCH_DIR=../patches/$(GCC_VERSION)
BUGURL=http://bugs.openwrt.org/
BUGURL=http://www.lede-project.org/bugs/
PKGVERSION=OpenWrt GCC $(PKG_VERSION) $(REVISION)
HOST_BUILD_PARALLEL:=1
@ -117,12 +123,15 @@ GCC_CONFIGURE:= \
--with-gmp=$(TOPDIR)/staging_dir/host \
--with-mpfr=$(TOPDIR)/staging_dir/host \
--with-mpc=$(TOPDIR)/staging_dir/host \
--disable-decimal-float \
--with-diagnostics-color=auto-if-env
--disable-decimal-float
ifneq ($(CONFIG_mips)$(CONFIG_mipsel),)
GCC_CONFIGURE += --with-mips-plt
endif
ifndef GCC_VERSION_4_8
GCC_CONFIGURE += --with-diagnostics-color=auto-if-env
endif
ifneq ($(CONFIG_GCC_DEFAULT_PIE),)
GCC_CONFIGURE+= \
--enable-default-pie
@ -165,20 +174,11 @@ ifneq ($(GCC_ARCH),)
GCC_CONFIGURE+= --with-arch=$(GCC_ARCH)
endif
ifeq ($(CONFIG_arm),y)
GCC_CONFIGURE+= \
--with-cpu=$(word 1, $(subst +," ,$(CONFIG_CPU_TYPE)))
ifneq ($(CONFIG_SOFT_FLOAT),y)
ifneq ($(CONFIG_SOFT_FLOAT),y)
ifeq ($(CONFIG_arm),y)
GCC_CONFIGURE+= \
--with-fpu=$(word 2, $(subst +, ",$(CONFIG_CPU_TYPE))) \
--with-float=hard
endif
# Do not let TARGET_CFLAGS get poisoned by extra CPU optimization flags
# that do not belong here. The cpu,fpu type should be specified via
# --with-cpu and --with-fpu for ARM and not CFLAGS.
TARGET_CFLAGS:=$(filter-out -m%,$(call qstrip,$(TARGET_CFLAGS)))
endif
ifeq ($(CONFIG_TARGET_x86)$(CONFIG_USE_GLIBC)$(CONFIG_INSTALL_GCCGO),yyy)

View File

@ -4,6 +4,7 @@ include ../common.mk
GCC_CONFIGURE += \
--with-headers=$(TOOLCHAIN_DIR)/include \
--disable-libsanitizer \
--enable-languages=$(TARGET_LANGUAGES) \
--enable-shared \
--enable-threads \
@ -11,10 +12,6 @@ GCC_CONFIGURE += \
--enable-lto \
--with-libelf=$(TOPDIR)/staging_dir/host
ifndef CONFIG_USE_GLIBC
GCC_CONFIGURE += --disable-libsanitizer
endif
ifdef CONFIG_USE_MUSL
GCC_MAKE += gcc_cv_libc_provides_ssp=yes
endif

View File

@ -1,6 +1,6 @@
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -24365,7 +24365,7 @@ rs6000_savres_strategy (rs6000_stack_t *
@@ -24501,7 +24501,7 @@ rs6000_savres_strategy (rs6000_stack_t *
/* Define cutoff for using out-of-line functions to save registers. */
if (DEFAULT_ABI == ABI_V4 || TARGET_ELF)
{

View File

@ -114,7 +114,7 @@ Date: Tue Jul 31 00:52:27 2007 +0000
; On SVR4 targets, it also controls whether or not to emit a
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -2065,6 +2065,9 @@ common_handle_option (struct gcc_options
@@ -2056,6 +2056,9 @@ common_handle_option (struct gcc_options
opts, opts_set, loc, dc);
break;
@ -126,7 +126,7 @@ Date: Tue Jul 31 00:52:27 2007 +0000
opts->x_warn_larger_than = value != -1;
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -7014,6 +7014,17 @@ This option is only supported for C and
@@ -7012,6 +7012,17 @@ This option is only supported for C and
@option{-Wall} and by @option{-Wpedantic}, which can be disabled with
@option{-Wno-pointer-sign}.

View File

@ -1,11 +0,0 @@
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -24632,7 +24632,7 @@ rs6000_savres_strategy (rs6000_stack_t *
/* Define cutoff for using out-of-line functions to save registers. */
if (DEFAULT_ABI == ABI_V4 || TARGET_ELF)
{
- if (!optimize_size)
+ if (1)
{
strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS;
strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS;

View File

@ -1,55 +0,0 @@
From d57faea9337ad595d005687247c3322252f70ba1 Mon Sep 17 00:00:00 2001
From: rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Sun, 7 Jul 2019 09:49:14 +0000
Subject: [PATCH] Fix uninitialised use in mips_split_move
While testing the fix for PR91068, I hit an rtl checking failure
while building newlib. mips_split_move was decomposing an address that
happened to be symbolic and then tried to access the REGNO of the base
register field, which wasn't initialised but which by chance pointed to
valid memory.
2019-07-07 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* config/mips/mips.c (mips_split_move): Zero-initialize addr
and check whether addr.reg is nonnull before using it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@273174 138bc75d-0d04-0410-961f-82ee72b054a4
---
gcc/ChangeLog | 5 +++++
gcc/config/mips/mips.c | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2019-07-07 Richard Sandiford <richard.sandiford@arm.com>
+
+ * config/mips/mips.c (mips_split_move): Zero-initialize addr
+ and check whether addr.reg is nonnull before using it.
+
2019-08-12 Release Manager
* GCC 9.2.0 released.
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -4849,7 +4849,7 @@ mips_split_move (rtx dest, rtx src, enum
can forward SRC for DEST. This is most useful if the next insn is a
simple store. */
rtx_insn *insn = (rtx_insn *)insn_;
- struct mips_address_info addr;
+ struct mips_address_info addr = {};
if (insn)
{
rtx_insn *next = next_nonnote_nondebug_insn_bb (insn);
@@ -4862,7 +4862,7 @@ mips_split_move (rtx dest, rtx src, enum
{
rtx tmp = XEXP (src, 0);
mips_classify_address (&addr, tmp, GET_MODE (tmp), true);
- if (REGNO (addr.reg) != REGNO (dest))
+ if (addr.reg && REGNO (addr.reg) != REGNO (dest))
validate_change (next, &SET_SRC (set), src, false);
}
else

View File

@ -1,20 +0,0 @@
Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790.
MIPS16 functions have a static assembler prologue which clobbers
registers v0 and v1. Add these register clobbers to function call
instructions.
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -3131,6 +3131,12 @@ mips_emit_call_insn (rtx pattern, rtx or
emit_insn (gen_update_got_version ());
}
+ if (TARGET_MIPS16 && TARGET_USE_GOT)
+ {
+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS16_PIC_TEMP);
+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS_PROLOGUE_TEMP (word_mode));
+ }
+
if (TARGET_MIPS16
&& TARGET_EXPLICIT_RELOCS
&& TARGET_CALL_CLOBBERED_GP)

View File

@ -1,13 +0,0 @@
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -876,7 +876,9 @@ proper position among the other output f
#endif
#ifndef LINK_SSP_SPEC
-#ifdef TARGET_LIBC_PROVIDES_SSP
+#if DEFAULT_LIBC == LIBC_MUSL
+#define LINK_SSP_SPEC "-lssp_nonshared"
+#elif defined(TARGET_LIBC_PROVIDES_SSP)
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
"|fstack-protector-strong|fstack-protector-explicit:}"
#else

View File

@ -1,11 +0,0 @@
--- a/libgcc/crtstuff.c
+++ b/libgcc/crtstuff.c
@@ -152,7 +152,7 @@ call_ ## FUNC (void) \
#endif
#if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF)
-# define USE_TM_CLONE_REGISTRY 1
+# define USE_TM_CLONE_REGISTRY 0
#endif
/* We do not want to add the weak attribute to the declarations of these

View File

@ -1,9 +0,0 @@
--- a/libgcc/config/mips/t-mips16
+++ b/libgcc/config/mips/t-mips16
@@ -43,3 +43,6 @@ SYNC_CFLAGS = -mno-mips16
# Version these symbols if building libgcc.so.
SHLIB_MAPFILES += $(srcdir)/config/mips/libgcc-mips16.ver
+
+CRTSTUFF_T_CFLAGS += -mno-mips16
+CRTSTUFF_T_CFLAGS_S += -mno-mips16

View File

@ -1,168 +0,0 @@
From c0c62fa4256f805389f16ebfc4a60cf789129b50 Mon Sep 17 00:00:00 2001
From: BangLang Huang <banglang.huang@foxmail.com>
Date: Wed, 9 Nov 2016 10:36:49 +0800
Subject: [PATCH] libffi: fix MIPS softfloat build issue
Backported from github.com/libffi/libffi#272
Signed-off-by: BangLang Huang <banglang.huang@foxmail.com>
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
---
libffi/src/mips/n32.S | 17 +++++++++++++++++
libffi/src/mips/o32.S | 17 +++++++++++++++++
2 files changed, 34 insertions(+)
--- a/libffi/src/mips/n32.S
+++ b/libffi/src/mips/n32.S
@@ -107,6 +107,16 @@ loadregs:
REG_L t6, 3*FFI_SIZEOF_ARG($fp) # load the flags word into t6.
+#ifdef __mips_soft_float
+ REG_L a0, 0*FFI_SIZEOF_ARG(t9)
+ REG_L a1, 1*FFI_SIZEOF_ARG(t9)
+ REG_L a2, 2*FFI_SIZEOF_ARG(t9)
+ REG_L a3, 3*FFI_SIZEOF_ARG(t9)
+ REG_L a4, 4*FFI_SIZEOF_ARG(t9)
+ REG_L a5, 5*FFI_SIZEOF_ARG(t9)
+ REG_L a6, 6*FFI_SIZEOF_ARG(t9)
+ REG_L a7, 7*FFI_SIZEOF_ARG(t9)
+#else
and t4, t6, ((1<<FFI_FLAG_BITS)-1)
REG_L a0, 0*FFI_SIZEOF_ARG(t9)
beqz t4, arg1_next
@@ -193,6 +203,7 @@ arg7_next:
arg8_doublep:
l.d $f19, 7*FFI_SIZEOF_ARG(t9)
arg8_next:
+#endif
callit:
# Load the function pointer
@@ -214,6 +225,7 @@ retint:
b epilogue
retfloat:
+#ifndef __mips_soft_float
bne t6, FFI_TYPE_FLOAT, retdouble
jal t9
REG_L t4, 4*FFI_SIZEOF_ARG($fp)
@@ -272,6 +284,7 @@ retstruct_f_d:
s.s $f0, 0(t4)
s.d $f2, 8(t4)
b epilogue
+#endif
retstruct_d_soft:
bne t6, FFI_TYPE_STRUCT_D_SOFT, retstruct_f_soft
@@ -429,6 +442,7 @@ ffi_closure_N32:
REG_S a6, A6_OFF2($sp)
REG_S a7, A7_OFF2($sp)
+#ifndef __mips_soft_float
# Store all possible float/double registers.
s.d $f12, F12_OFF2($sp)
s.d $f13, F13_OFF2($sp)
@@ -438,6 +452,7 @@ ffi_closure_N32:
s.d $f17, F17_OFF2($sp)
s.d $f18, F18_OFF2($sp)
s.d $f19, F19_OFF2($sp)
+#endif
# Call ffi_closure_mips_inner_N32 to do the real work.
LA t9, ffi_closure_mips_inner_N32
@@ -458,6 +473,7 @@ cls_retint:
b cls_epilogue
cls_retfloat:
+#ifndef __mips_soft_float
bne v0, FFI_TYPE_FLOAT, cls_retdouble
l.s $f0, V0_OFF2($sp)
b cls_epilogue
@@ -500,6 +516,7 @@ cls_retstruct_f_d:
l.s $f0, V0_OFF2($sp)
l.d $f2, V1_OFF2($sp)
b cls_epilogue
+#endif
cls_retstruct_small2:
REG_L v0, V0_OFF2($sp)
--- a/libffi/src/mips/o32.S
+++ b/libffi/src/mips/o32.S
@@ -82,13 +82,16 @@ sixteen:
ADDU $sp, 4 * FFI_SIZEOF_ARG # adjust $sp to new args
+#ifndef __mips_soft_float
bnez t0, pass_d # make it quick for int
+#endif
REG_L a0, 0*FFI_SIZEOF_ARG($sp) # just go ahead and load the
REG_L a1, 1*FFI_SIZEOF_ARG($sp) # four regs.
REG_L a2, 2*FFI_SIZEOF_ARG($sp)
REG_L a3, 3*FFI_SIZEOF_ARG($sp)
b call_it
+#ifndef __mips_soft_float
pass_d:
bne t0, FFI_ARGS_D, pass_f
l.d $f12, 0*FFI_SIZEOF_ARG($sp) # load $fp regs from args
@@ -130,6 +133,7 @@ pass_f_d:
# bne t0, FFI_ARGS_F_D, call_it
l.s $f12, 0*FFI_SIZEOF_ARG($sp) # load $fp regs from args
l.d $f14, 2*FFI_SIZEOF_ARG($sp) # passing double and float
+#endif
call_it:
# Load the function pointer
@@ -158,14 +162,23 @@ retfloat:
bne t2, FFI_TYPE_FLOAT, retdouble
jalr t9
REG_L t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp)
+#ifndef __mips_soft_float
s.s $f0, 0(t0)
+#else
+ REG_S v0, 0(t0)
+#endif
b epilogue
retdouble:
bne t2, FFI_TYPE_DOUBLE, noretval
jalr t9
REG_L t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp)
+#ifndef __mips_soft_float
s.d $f0, 0(t0)
+#else
+ REG_S v1, 4(t0)
+ REG_S v0, 0(t0)
+#endif
b epilogue
noretval:
@@ -261,9 +274,11 @@ $LCFI7:
li $13, 1 # FFI_O32
bne $16, $13, 1f # Skip fp save if FFI_O32_SOFT_FLOAT
+#ifndef __mips_soft_float
# Store all possible float/double registers.
s.d $f12, FA_0_0_OFF2($fp)
s.d $f14, FA_1_0_OFF2($fp)
+#endif
1:
# Call ffi_closure_mips_inner_O32 to do the work.
la t9, ffi_closure_mips_inner_O32
@@ -281,6 +296,7 @@ $LCFI7:
li $13, 1 # FFI_O32
bne $16, $13, 1f # Skip fp restore if FFI_O32_SOFT_FLOAT
+#ifndef __mips_soft_float
li $9, FFI_TYPE_FLOAT
l.s $f0, V0_OFF2($fp)
beq $8, $9, closure_done
@@ -288,6 +304,7 @@ $LCFI7:
li $9, FFI_TYPE_DOUBLE
l.d $f0, V0_OFF2($fp)
beq $8, $9, closure_done
+#endif
1:
REG_L $3, V1_OFF2($fp)
REG_L $2, V0_OFF2($fp)

View File

@ -1,67 +0,0 @@
From dda6b050cd74a352670787a294596a9c56c21327 Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Fri, 4 May 2018 18:20:53 +0800
Subject: [PATCH] gotools: fix compilation when making cross compiler
libgo is "the runtime support library for the Go programming language.
This library is intended for use with the Go frontend."
gccgo will link target files with libgo.so which depends on libgcc_s.so.1, but
the linker will complain that it cannot find it. That's because shared libgcc
is not present in the install directory yet. libgo.so was made without problem
because gcc will emit -lgcc_s when compiled with -shared option. When gotools
were being made, it was supplied with -static-libgcc thus no link option was
provided. Check LIBGO in gcc/go/gcc-spec.c for how gccgo make a builtin spec
for linking with libgo.so
- GccgoCrossCompilation, https://github.com/golang/go/wiki/GccgoCrossCompilation
- Cross-building instructions, http://www.eglibc.org/archives/patches/msg00078.html
When 3-pass GCC compilation is used, shared libgcc runtime libraries will be
available after gcc pass2 completed and will meet the gotools link requirement
at gcc pass3
---
gotools/Makefile.am | 4 +++-
gotools/Makefile.in | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
--- a/gotools/Makefile.am
+++ b/gotools/Makefile.am
@@ -26,6 +26,7 @@ PWD_COMMAND = $${PWDCMD-pwd}
STAMP = echo timestamp >
libgodir = ../$(target_noncanonical)/libgo
+libgccdir = ../$(target_noncanonical)/libgcc
LIBGODEP = $(libgodir)/libgo.la
LIBGOTOOL = $(libgodir)/libgotool.a
@@ -41,7 +42,8 @@ GOCFLAGS = $(CFLAGS_FOR_TARGET)
GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS)
AM_GOCFLAGS = -I $(libgodir)
-AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs
+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \
+ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s
GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@
libgosrcdir = $(srcdir)/../libgo/go
--- a/gotools/Makefile.in
+++ b/gotools/Makefile.in
@@ -337,6 +337,7 @@ mkinstalldirs = $(SHELL) $(toplevel_srcd
PWD_COMMAND = $${PWDCMD-pwd}
STAMP = echo timestamp >
libgodir = ../$(target_noncanonical)/libgo
+libgccdir = ../$(target_noncanonical)/libgcc
LIBGODEP = $(libgodir)/libgo.la
LIBGOTOOL = $(libgodir)/libgotool.a
@NATIVE_FALSE@GOCOMPILER = $(GOC)
@@ -346,7 +347,8 @@ LIBGOTOOL = $(libgodir)/libgotool.a
GOCFLAGS = $(CFLAGS_FOR_TARGET)
GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS)
AM_GOCFLAGS = -I $(libgodir)
-AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs
+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \
+ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s
GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@
libgosrcdir = $(srcdir)/../libgo/go
cmdsrcdir = $(libgosrcdir)/cmd

View File

@ -0,0 +1,77 @@
commit 31285a20390a5e53a74a2a71d1b5c82f366ddd5a
Author: Felix Fietkau <nbd@openwrt.org>
Date: Tue May 6 11:49:05 2014 +0000
gcc: revert an upstream patch that is causing a regression on powerpc
https://forum.openwrt.org/viewtopic.php?pid=232494#p232494
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 40709
Revert of:
commit 275035b56823b26d5fb7e90fad945b998648edf2
Author: bergner <bergner@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu Sep 5 14:09:07 2013 +0000
PR target/58139
* reginfo.c (choose_hard_reg_mode): Scan through all mode classes
looking for widest mode.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202286 138bc75d-0d04-0410-961f-82ee72b054a4
--- a/gcc/reginfo.c
+++ b/gcc/reginfo.c
@@ -637,35 +637,40 @@ choose_hard_reg_mode (unsigned int regno
mode = GET_MODE_WIDER_MODE (mode))
if ((unsigned) hard_regno_nregs[regno][mode] == nregs
&& HARD_REGNO_MODE_OK (regno, mode)
- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode))
+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)))
found_mode = mode;
+ if (found_mode != VOIDmode)
+ return found_mode;
+
for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT);
mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode))
if ((unsigned) hard_regno_nregs[regno][mode] == nregs
&& HARD_REGNO_MODE_OK (regno, mode)
- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode))
+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)))
found_mode = mode;
+ if (found_mode != VOIDmode)
+ return found_mode;
+
for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT);
mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode))
if ((unsigned) hard_regno_nregs[regno][mode] == nregs
&& HARD_REGNO_MODE_OK (regno, mode)
- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode))
+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)))
found_mode = mode;
+ if (found_mode != VOIDmode)
+ return found_mode;
+
for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT);
mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode))
if ((unsigned) hard_regno_nregs[regno][mode] == nregs
&& HARD_REGNO_MODE_OK (regno, mode)
- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode))
+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)))
found_mode = mode;
if (found_mode != VOIDmode)

View File

@ -12,7 +12,7 @@ Date: Tue Feb 26 16:16:33 2013 +0000
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -3202,18 +3202,10 @@ doc/gcc.info: $(TEXI_GCC_FILES)
@@ -3121,18 +3121,10 @@ doc/gcc.info: $(TEXI_GCC_FILES)
doc/gccint.info: $(TEXI_GCCINT_FILES)
doc/cppinternals.info: $(TEXI_CPPINT_FILES)

View File

@ -0,0 +1,28 @@
commit 1877bc9d8f2be143fbe530347a945850d0ecd234
Author: Steven Barth <cyrus@openwrt.org>
Date: Mon Jun 22 10:31:07 2015 +0000
gcc/musl: rework SSP-support
Make musl provide libssp_nonshared.a and make GCC link it unconditionally
if musl is used. This should be a no-op if SSP is disabled and seems to be
the only reliable way of dealing with SSP over all packages due to the mess
that is linkerflags handling in packages.
Signed-off-by: Steven Barth <steven@midlink.org>
SVN-Revision: 46108
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -861,7 +861,9 @@ proper position among the other output f
#endif
#ifndef LINK_SSP_SPEC
-#ifdef TARGET_LIBC_PROVIDES_SSP
+#if DEFAULT_LIBC == LIBC_MUSL
+#define LINK_SSP_SPEC "-lssp_nonshared"
+#elif defined(TARGET_LIBC_PROVIDES_SSP)
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
"|fstack-protector-strong|fstack-protector-explicit:}"
#else

View File

@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -19994,7 +19994,7 @@ mips_option_override (void)
@@ -19784,7 +19784,7 @@ mips_option_override (void)
flag_pcc_struct_return = 0;
/* Decide which rtx_costs structure to use. */

View File

@ -0,0 +1,32 @@
commit b050f87d13b5dc7ed82feb9a90f4529de58bdf25
Author: Felix Fietkau <nbd@openwrt.org>
Date: Wed Feb 19 19:20:10 2014 +0000
gcc: prevent the use of LDRD/STRD on ARMv5TE
These instructions are for 64-bit load/store. On ARMv5TE, the CPU
requires addresses to be aligned to 64-bit. When misaligned, behavior is
undefined (effectively either loads the same word twice on LDRD, or
corrupts surrounding memory on STRD).
On ARMv6 and newer, unaligned access is safe.
Removing these instructions for ARMv5TE is necessary, because GCC
ignores alignment information in pointers and does unsafe optimizations
that have shown up as bugs in various places.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 39638
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -150,7 +150,7 @@ extern tree arm_fp16_type_node;
/* Thumb-1 only. */
#define TARGET_THUMB1_ONLY (TARGET_THUMB1 && !arm_arch_notm)
-#define TARGET_LDRD (arm_arch5e && ARM_DOUBLEWORD_ALIGN \
+#define TARGET_LDRD (arm_arch6 && ARM_DOUBLEWORD_ALIGN \
&& !TARGET_THUMB1)
#define TARGET_CRC32 (arm_arch_crc)

View File

@ -8,7 +8,7 @@ Date: Mon Oct 19 23:26:09 2009 +0000
--- a/libgcc/Makefile.in
+++ b/libgcc/Makefile.in
@@ -927,11 +927,12 @@ $(libgcov-driver-objects): %$(objext): $
@@ -920,11 +920,12 @@ $(libgcov-driver-objects): %$(objext): $
# Static libraries.
libgcc.a: $(libgcc-objects)
@ -22,7 +22,7 @@ Date: Mon Oct 19 23:26:09 2009 +0000
-rm -f $@
objects="$(objects)"; \
@@ -955,7 +956,7 @@ all: libunwind.a
@@ -945,7 +946,7 @@ all: libunwind.a
endif
ifeq ($(enable_shared),yes)
@ -31,7 +31,7 @@ Date: Mon Oct 19 23:26:09 2009 +0000
ifneq ($(LIBUNWIND),)
all: libunwind$(SHLIB_EXT)
libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
@@ -1161,6 +1162,10 @@ install-shared:
@@ -1151,6 +1152,10 @@ install-shared:
chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a

View File

@ -9,7 +9,7 @@ Date: Wed Feb 2 19:34:36 2011 +0000
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
@@ -91,10 +91,15 @@
@@ -88,10 +88,15 @@
#define MUSL_DYNAMIC_LINKER \
"/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"

View File

@ -7,7 +7,7 @@ Date: Sun Feb 12 20:25:47 2012 +0000
SVN-Revision: 30486
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
@@ -129,10 +129,6 @@
@@ -126,10 +126,6 @@
"%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \
LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC)
@ -20,8 +20,8 @@ Date: Sun Feb 12 20:25:47 2012 +0000
is used. */
--- a/gcc/config/linux.h
+++ b/gcc/config/linux.h
@@ -66,6 +66,10 @@ see the files COPYING3 and COPYING.RUNTI
builtin_version ("CRuntime_Musl"); \
@@ -53,6 +53,10 @@ see the files COPYING3 and COPYING.RUNTI
builtin_assert ("system=posix"); \
} while (0)
+#ifndef LIBGCC_SPEC
@ -42,7 +42,7 @@ Date: Sun Feb 12 20:25:47 2012 +0000
}
--- a/gcc/config/rs6000/linux.h
+++ b/gcc/config/rs6000/linux.h
@@ -62,6 +62,9 @@
@@ -60,6 +60,9 @@
#undef CPP_OS_DEFAULT_SPEC
#define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)"
@ -50,5 +50,5 @@ Date: Sun Feb 12 20:25:47 2012 +0000
+#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc"
+
#undef LINK_SHLIB_SPEC
#define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}} \
%{static-pie:-static -pie --no-dynamic-linker -z text}"
#define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}"

View File

@ -0,0 +1,18 @@
commit d8c570a1531035c3e26bcd94741e5f5b9c36b5d9
Author: Felix Fietkau <nbd@openwrt.org>
Date: Mon Mar 5 00:51:01 2012 +0000
gcc: do not emit references to _savegpr_* and _restgpr_* on powerpc, as they are tricky to deal with wrt. libgcc. they cannot be linked dynamically
SVN-Revision: 30814
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -26936,7 +26936,7 @@ rs6000_savres_strategy (rs6000_stack_t *
/* Define cutoff for using out-of-line functions to save registers. */
if (DEFAULT_ABI == ABI_V4 || TARGET_ELF)
{
- if (!optimize_size)
+ if (1)
{
strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS;
strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS;

View File

@ -0,0 +1,22 @@
commit 565988ab47bd9b96b50608564aee2104aeb4b7ae
Author: Felix Fietkau <nbd@nbd.name>
Date: Tue Dec 13 14:20:49 2016 +0100
gcc: rip out transactional memory related bloat from crtbegin
Slightly improves compression for each executable, saving about 4k from
the default ar71xx rootfs
Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/libgcc/crtstuff.c
+++ b/libgcc/crtstuff.c
@@ -152,7 +152,7 @@ call_ ## FUNC (void) \
#endif
#if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF)
-# define USE_TM_CLONE_REGISTRY 1
+# define USE_TM_CLONE_REGISTRY 0
#endif
/* We do not want to add the weak attribute to the declarations of these

View File

@ -0,0 +1,30 @@
commit 9dc38e48f7a6f88b7ac7bfaced91f53660204e46
Author: Florian Fainelli <florian@openwrt.org>
Date: Fri Apr 5 12:36:06 2013 +0000
toolchain/gcc: .init and .fini need to pick one ISA
The .init and .fini sections are built by concatenating code
fragments. Putting mips16 code in the middle of a mips32 code block
doesn't work. Make gcc built the magic crt stuff in no-mips16 mode.
This is specific to 4.6-linaro but is probably portable to other gcc
flavors. Adding this to the t-libgcc-mips16 makefile fragment is a
hack not suitable for pushing upstream, but there is no mips/t-linux
or mips/t-uclibc and I am not going to touch gcc/configure for two
lines.
Signed-off-by: Jay Carlson <nop@nop.com>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 36200
--- a/libgcc/config/mips/t-mips16
+++ b/libgcc/config/mips/t-mips16
@@ -43,3 +43,6 @@ SYNC_CFLAGS = -mno-mips16
# Version these symbols if building libgcc.so.
SHLIB_MAPFILES += $(srcdir)/config/mips/libgcc-mips16.ver
+
+CRTSTUFF_T_CFLAGS += -mno-mips16
+CRTSTUFF_T_CFLAGS_S += -mno-mips16

View File

@ -17,7 +17,7 @@ Date: Tue Jul 31 00:52:27 2007 +0000
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -107,6 +107,9 @@ static dump_flags_t original_dump_flags;
@@ -108,6 +108,9 @@ static int class_dump_flags;
/* Whether any standard preincluded header has been preincluded. */
static bool done_preinclude;
@ -27,7 +27,7 @@ Date: Tue Jul 31 00:52:27 2007 +0000
static void handle_OPT_d (const char *);
static void set_std_cxx98 (int);
static void set_std_cxx11 (int);
@@ -452,6 +455,12 @@ c_common_handle_option (size_t scode, co
@@ -456,6 +459,12 @@ c_common_handle_option (size_t scode, co
flag_no_builtin = !value;
break;
@ -40,7 +40,7 @@ Date: Tue Jul 31 00:52:27 2007 +0000
case OPT_fconstant_string_class_:
constant_string_class_name = arg;
break;
@@ -1138,6 +1147,47 @@ c_common_init (void)
@@ -1084,6 +1093,47 @@ c_common_init (void)
return false;
}
@ -80,7 +80,7 @@ Date: Tue Jul 31 00:52:27 2007 +0000
+ }
+ } else if (evv == 0) {
+ if (honour_copts != 1)
+ inform (UNKNOWN_LOCATION, "someone does not honour COPTS correctly, passed %d times",
+ inform (0, "someone does not honour COPTS correctly, passed %d times",
+ honour_copts);
+ }
+ }
@ -90,9 +90,9 @@ Date: Tue Jul 31 00:52:27 2007 +0000
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -1521,6 +1521,9 @@ C++ ObjC++ Optimization Alias(fexception
@@ -1412,6 +1412,9 @@ C++ ObjC++ Optimization Alias(fexception
fhonor-std
C++ ObjC++ Deprecated
C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
+fhonour-copts
+C ObjC C++ ObjC++ RejectNegative
@ -102,7 +102,7 @@ Date: Tue Jul 31 00:52:27 2007 +0000
Assume normal C execution environment.
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -1589,6 +1589,9 @@ fguess-branch-probability
@@ -1510,6 +1510,9 @@ fguess-branch-probability
Common Report Var(flag_guess_branch_prob) Optimization
Enable guessing of branch probabilities.
@ -112,9 +112,21 @@ Date: Tue Jul 31 00:52:27 2007 +0000
; Nonzero means ignore `#ident' directives. 0 means handle them.
; Generate position-independent code for executables if possible
; On SVR4 targets, it also controls whether or not to emit a
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -1928,6 +1928,9 @@ common_handle_option (struct gcc_options
opts, opts_set, loc, dc);
break;
+ case OPT_fhonour_copts:
+ break;
+
case OPT_Wlarger_than_:
opts->x_larger_than_size = value;
opts->x_warn_larger_than = value != -1;
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -7657,6 +7657,17 @@ This option is only supported for C and
@@ -6567,6 +6567,17 @@ This option is only supported for C and
@option{-Wall} and by @option{-Wpedantic}, which can be disabled with
@option{-Wno-pointer-sign}.
@ -132,15 +144,3 @@ Date: Tue Jul 31 00:52:27 2007 +0000
@item -Wstack-protector
@opindex Wstack-protector
@opindex Wno-stack-protector
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -2314,6 +2314,9 @@ common_handle_option (struct gcc_options
/* Currently handled in a prescan. */
break;
+ case OPT_fhonour_copts:
+ break;
+
case OPT_Werror:
dc->warning_as_error_requested = value;
break;

View File

@ -7,8 +7,8 @@ Date: Sat Apr 21 03:02:39 2012 +0000
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -9318,8 +9318,10 @@ getenv_spec_function (int argc, const ch
}
@@ -9280,8 +9280,10 @@ getenv_spec_function (int argc, const ch
value = varname;
if (!value)
- fatal_error (input_location,

View File

@ -48,9 +48,9 @@ sellcey@mips.com
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -22822,6 +22822,9 @@ mips_starting_frame_offset (void)
#undef TARGET_STARTING_FRAME_OFFSET
#define TARGET_STARTING_FRAME_OFFSET mips_starting_frame_offset
@@ -22561,6 +22561,9 @@ mips_promote_function_mode (const_tree t
#undef TARGET_CUSTOM_FUNCTION_DESCRIPTORS
#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS 2
+#undef TARGET_ASM_FILE_END
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack

View File

@ -0,0 +1,33 @@
commit 548d9a008ff265e9eaa3c7e0e6e301c6bd5645e6
Author: Felix Fietkau <nbd@openwrt.org>
Date: Fri Dec 12 17:01:57 2014 +0000
gcc: don't clobber stamp-bits with a symlink to itself
Several versions of gcc have an issue in libstdc++v3 where the build may
clobber stamp-bits with a link to itself. This doesn't manifest itself
on all systems. On several Ubuntu systems, this doesn't appear to be a
problem, but it is an issue on Fedora 16 systems.
To fix the issue, we'll simply filter out stamp-bits from the symlinks
to be generated.
Note: gcc 4.4.7 is unaffected by this issue, so no fix is necessary
there.
Signed-off-by: John Szakmeister <john@szakmeister.net>
SVN-Revision: 43669
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -1476,7 +1476,7 @@ stamp-bits: ${bits_headers}
@$(STAMP) stamp-bits
stamp-bits-sup: stamp-bits ${bits_sup_headers}
- @-cd ${bits_builddir} && $(LN_S) $? . 2>/dev/null
+ @-cd ${bits_builddir} && $(LN_S) $(filter-out stamp-bits,$?) . 2>/dev/null
@$(STAMP) stamp-bits-sup
stamp-c_base: ${c_base_headers}

View File

@ -0,0 +1,181 @@
commit 331735a357a73c7b8adc205241ac3cc6543d985e
Author: Felix Fietkau <nbd@openwrt.org>
Date: Tue Nov 17 12:38:22 2015 +0000
gcc: add a patch to 5.x that supports translation of __FILE__ paths
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 47490
Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47047
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -588,6 +588,10 @@ c_common_handle_option (size_t scode, co
add_path (xstrdup (arg), SYSTEM, 0, true);
break;
+ case OPT_iremap:
+ add_cpp_remap_path (arg);
+ break;
+
case OPT_iwithprefix:
add_prefixed_path (arg, SYSTEM);
break;
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -1825,6 +1825,10 @@ iquote
C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
-iquote <dir> Add <dir> to the end of the quote include path.
+iremap
+C ObjC C++ ObjC++ Joined Separate
+-iremap <src:dst> Convert <src> to <dst> if it occurs as prefix in __FILE__.
+
iwithprefix
C ObjC C++ ObjC++ Joined Separate
-iwithprefix <dir> Add <dir> to the end of the system include path.
--- a/gcc/doc/cpp.texi
+++ b/gcc/doc/cpp.texi
@@ -4272,6 +4272,7 @@ Refer to the GCC manual for full documen
@c man begin SYNOPSIS
cpp [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}]
[@option{-I}@var{dir}@dots{}] [@option{-iquote}@var{dir}@dots{}]
+ [@option{-iremap}@var{src}:@var{dst}]
[@option{-M}|@option{-MM}] [@option{-MG}] [@option{-MF} @var{filename}]
[@option{-MP}] [@option{-MQ} @var{target}@dots{}]
[@option{-MT} @var{target}@dots{}]
--- a/gcc/doc/cppopts.texi
+++ b/gcc/doc/cppopts.texi
@@ -220,6 +220,12 @@ extensions @samp{.i}, @samp{.ii} or @sam
extensions that GCC uses for preprocessed files created by
@option{-save-temps}.
+@item -iremap @var{src}:@var{dst}
+@opindex iremap
+Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time.
+This option can be specified more than once. Processing stops at the first
+match.
+
@item -fdirectives-only
@opindex fdirectives-only
When preprocessing, handle directives, but do not expand macros.
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -11863,6 +11863,12 @@ by @option{-fplugin=@var{name}} instead
@option{-fplugin=@var{path}/@var{name}.so}. This option is not meant
to be used by the user, but only passed by the driver.
+@item -iremap @var{src}:@var{dst}
+@opindex iremap
+Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time.
+This option can be specified more than once. Processing stops at the first
+match.
+
@item -L@var{dir}
@opindex L
Add directory @var{dir} to the list of directories to be searched
--- a/libcpp/include/cpplib.h
+++ b/libcpp/include/cpplib.h
@@ -820,6 +820,9 @@ extern void cpp_set_lang (cpp_reader *,
/* Set the include paths. */
extern void cpp_set_include_chains (cpp_reader *, cpp_dir *, cpp_dir *, int);
+/* Provide src:dst pair for __FILE__ remapping. */
+extern void add_cpp_remap_path (const char *);
+
/* Call these to get pointers to the options, callback, and deps
structures for a given reader. These pointers are good until you
call cpp_finish on that reader. You can either edit the callbacks
--- a/libcpp/macro.c
+++ b/libcpp/macro.c
@@ -227,6 +227,64 @@ static const char * const monthnames[] =
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
+static size_t remap_pairs;
+static char **remap_src;
+static char **remap_dst;
+
+void
+add_cpp_remap_path (const char *arg)
+{
+ const char *arg_dst;
+ size_t len;
+
+ arg_dst = strchr(arg, ':');
+ if (arg_dst == NULL)
+ {
+ fprintf(stderr, "Invalid argument for -iremap\n");
+ exit(1);
+ }
+
+ len = arg_dst - arg;
+ ++arg_dst;
+
+ remap_src = (char **) xrealloc(remap_src, sizeof(char *) * (remap_pairs + 1));
+ remap_dst = (char **) xrealloc(remap_dst, sizeof(char *) * (remap_pairs + 1));
+
+ remap_src[remap_pairs] = (char *) xmalloc(len + 1);
+ memcpy(remap_src[remap_pairs], arg, len);
+ remap_src[remap_pairs][len] = '\0';
+ remap_dst[remap_pairs] = xstrdup(arg_dst);
+ ++remap_pairs;
+}
+
+static const char *
+cpp_remap_file (const char *arg, char **tmp_name)
+{
+ char *result;
+ size_t i, len;
+
+ for (i = 0; i < remap_pairs; ++i)
+ {
+ len = strlen (remap_src[i]);
+ if (strncmp (remap_src[i], arg, len))
+ continue;
+ if (arg[len] == '\0')
+ return xstrdup (remap_dst[i]);
+ if (arg[len] != '/')
+ continue;
+ arg += len;
+ len = strlen (remap_dst[i]);
+ result = (char *) xmalloc (len + strlen (arg) + 1);
+ memcpy(result, remap_dst[i], len);
+ strcpy(result + len, arg);
+ *tmp_name = result;
+
+ return result;
+ }
+
+ return arg;
+}
+
/* Helper function for builtin_macro. Returns the text generated by
a builtin macro. */
const uchar *
@@ -290,6 +348,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi
{
unsigned int len;
const char *name;
+ char *tmp_name = NULL;
uchar *buf;
if (node->value.builtin == BT_FILE)
@@ -301,6 +360,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi
if (!name)
abort ();
}
+ name = cpp_remap_file (name, &tmp_name);
len = strlen (name);
buf = _cpp_unaligned_alloc (pfile, len * 2 + 3);
result = buf;
@@ -308,6 +368,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi
buf = cpp_quote_string (buf + 1, (const unsigned char *) name, len);
*buf++ = '"';
*buf = '\0';
+ free (tmp_name);
}
break;

View File

@ -17,11 +17,11 @@ PKG_HASH:=7e3c2a763bf500a40c5c4591a7e22c591dafc1f214b1d514895c1096e85c883a
GDB_DIR:=binutils-$(PKG_NAME)-$(PKG_VERSION)
PATCH_DIR:=./patches-arc
else
PKG_VERSION:=8.3.1
PKG_VERSION:=8.2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/gdb
PKG_HASH:=1e55b4d7cdca7b34be12f4ceae651623aa73b2fd640152313f9f66a7149757c4
PKG_HASH:=c3a441a29c7c89720b734e5a9c6289c0a06be7e0c76ef538f7bbcef389347c39
GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION)
endif

View File

@ -1,16 +1,24 @@
--- a/sim/common/sim-arange.c
+++ b/sim/common/sim-arange.c
@@ -277,9 +277,7 @@ sim_addr_range_delete (ADDR_RANGE *ar, a
@@ -280,11 +280,7 @@ sim_addr_range_delete (ADDR_RANGE *ar, a
build_search_tree (ar);
}
-#else /* SIM_ARANGE_C_INCLUDED */
-#endif /* DEFINE_NON_INLINE_P */
-
-#if DEFINE_INLINE_P
-
-SIM_ARANGE_INLINE int
+int
sim_addr_range_hit_p (ADDR_RANGE *ar, address_word addr)
{
ADDR_RANGE_TREE *t = ar->range_tree;
@@ -301,4 +297,4 @@ sim_addr_range_hit_p (ADDR_RANGE *ar, ad
return 0;
}
-#endif /* DEFINE_INLINE_P */
+#endif /* DEFINE_NON_INLINE_P */
--- a/sim/common/sim-arange.h
+++ b/sim/common/sim-arange.h
@@ -73,7 +73,7 @@ extern void sim_addr_range_delete (ADDR_

View File

@ -1,16 +1,16 @@
--- a/gdb/configure
+++ b/gdb/configure
@@ -918,8 +918,7 @@ MAKEINFOFLAGS
@@ -915,8 +915,7 @@ MAKEINFOFLAGS
YACC
YFLAGS
XMKMF'
-ac_subdirs_all='testsuite
-gdbtk
+ac_subdirs_all='gdbtk
multi-ice
gdbserver'
# Initialize some variables set by options.
@@ -6628,7 +6627,7 @@ $as_echo "$with_auto_load_safe_path" >&6
@@ -6577,7 +6576,7 @@ $as_echo "$with_auto_load_safe_path" >&6

View File

@ -1,6 +1,6 @@
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -2511,7 +2511,7 @@ $as_echo "$as_me: error: \`$ac_var' was
@@ -2508,7 +2508,7 @@ $as_echo "$as_me: error: \`$ac_var' was
ac_cache_corrupted=: ;;
,);;
*)

View File

@ -11,8 +11,8 @@ PKG_VERSION:=2.27
PKG_SOURCE_PROTO:=git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=5b4f7382af46b4187a958e40fb3123ac3ce16810
PKG_MIRROR_HASH:=8ab4c8c1f769c4d5d482c30e7aa029f1cc2c8163c347ca5f0d8224a7b4b61ddd
PKG_SOURCE_VERSION:=3981fc3453641368d2edbe480e7089dc9abf6555
PKG_MIRROR_HASH:=9782c54e990d6b4626a7b03879fc5dfcd2d8625d49f3f3bff91f470322f1aebf
PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz

View File

@ -41,14 +41,14 @@ HOST_EXTRACFLAGS=
LINUX_HAS_HEADERS_INSTALL:=y
HOST_KMAKE := $(MAKE) -C $(HOST_BUILD_DIR) \
KMAKE := $(MAKE) -C $(HOST_BUILD_DIR) \
$(KERNEL_MAKE_FLAGS) \
CC="$(KERNEL_CC)" \
HOSTCFLAGS="$(HOST_CFLAGS)"
CFLAGS="$(TARGET_CFLAGS)"
define Host/Configure/all
mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev
$(HOST_KMAKE) \
$(KMAKE) \
INSTALL_HDR_PATH="$(BUILD_DIR_TOOLCHAIN)/linux-dev/" \
headers_install
endef
@ -82,7 +82,7 @@ endef
define Host/Configure
env
yes '' | $(HOST_KMAKE) oldconfig
yes '' | $(KMAKE) oldconfig
$(call Host/Configure/all)
$(call Host/Configure/post/$(ARCH))
endef

View File

@ -1,12 +0,0 @@
# Password crypt stubbing
config MUSL_DISABLE_CRYPT_SIZE_HACK
bool "Include crypt() support for SHA256, SHA512 and Blowfish ciphers"
depends on TOOLCHAINOPTS && USE_MUSL && !EXTERNAL_TOOLCHAIN
default n
help
Enable this option to re-include crypt() support for the SHA256, SHA512 and
Blowfish ciphers. Without this option, attempting to hash a string with a salt
requesting one of these ciphers will cause the crypt() function to call stub
implementations which will always fail with errno ENOSYS. Including the ciphers
will increase the library size by about 14KB after LZMA compression.

View File

@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/target.mk
PKG_NAME:=musl
PKG_VERSION:=1.1.24
PKG_RELEASE:=1
PKG_VERSION:=1.1.20
PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=ea9525c8bcf6170df59364c4bcd616de1acf8703
PKG_MIRROR_HASH:=6975c45b9bfe586ac00dbfcd1b1a13ab110af0528028ab3dee03e23e2c0763e5
PKG_SOURCE_URL:=https://git.musl-libc.org/git/musl
PKG_SOURCE_VERSION:=0fa1e638e87cf257e9f96b4019b2076afd674a19
PKG_MIRROR_HASH:=0a49559e845f51aaf006539176a36d6527957affd2838e71fd43275b737e90fe
PKG_SOURCE_URL:=git://git.musl-libc.org/musl
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
LIBC_SO_VERSION:=$(PKG_VERSION)
@ -29,7 +29,6 @@ include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/hardening.mk
TARGET_CFLAGS:= $(filter-out -O%,$(TARGET_CFLAGS))
TARGET_CFLAGS+= $(if $(CONFIG_MUSL_DISABLE_CRYPT_SIZE_HACK),,-DCRYPT_SIZE_HACK)
MUSL_CONFIGURE:= \
$(TARGET_CONFIGURE_OPTS) \

View File

@ -1,8 +1,8 @@
--- a/include/glob.h
+++ b/include/glob.h
@@ -34,6 +34,8 @@ void globfree(glob_t *);
#define GLOB_TILDE 0x1000
#define GLOB_TILDE_CHECK 0x4000
@@ -31,6 +31,8 @@ void globfree(glob_t *);
#define GLOB_NOESCAPE 0x40
#define GLOB_PERIOD 0x80
+#define GLOB_ONLYDIR 0x100
+

View File

@ -1,6 +1,6 @@
--- a/src/time/__tz.c
+++ b/src/time/__tz.c
@@ -25,6 +25,9 @@ static int r0[5], r1[5];
@@ -23,6 +23,9 @@ static int r0[5], r1[5];
static const unsigned char *zi, *trans, *index, *types, *abbrevs, *abbrevs_end;
static size_t map_size;

View File

@ -24,7 +24,7 @@ Signed-off-by: Steven Barth <steven@midlink.org>
+OBJ_DIRS = $(sort $(patsubst %/,%,$(dir $(ALL_LIBS) $(ALL_TOOLS) $(ALL_OBJS) $(GENH) $(GENH_INT))) obj/include obj/libssp_nonshared)
$(ALL_LIBS) $(ALL_TOOLS) $(ALL_OBJS) $(ALL_OBJS:%.o=%.lo) $(GENH) $(GENH_INT): | $(OBJ_DIRS)
@@ -113,6 +113,8 @@ obj/crt/rcrt1.o: $(srcdir)/ldso/dlstart.
obj/crt/Scrt1.o obj/crt/rcrt1.o: CFLAGS_ALL += -fPIC
@ -34,7 +34,7 @@ Signed-off-by: Steven Barth <steven@midlink.org>
OPTIMIZE_SRCS = $(wildcard $(OPTIMIZE_GLOBS:%=$(srcdir)/src/%))
$(OPTIMIZE_SRCS:$(srcdir)/%.c=obj/%.o) $(OPTIMIZE_SRCS:$(srcdir)/%.c=obj/%.lo): CFLAGS += -O3
@@ -165,6 +167,11 @@ lib/libc.a: $(AOBJS)
@@ -165,6 +166,11 @@ lib/libc.a: $(AOBJS)
$(AR) rc $@ $(AOBJS)
$(RANLIB) $@

View File

@ -87,7 +87,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
}
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -25,6 +25,14 @@ extern "C" {
@@ -21,6 +21,14 @@ extern "C" {
#include <bits/alltypes.h>
@ -102,7 +102,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
#ifdef __cplusplus
#define NULL 0L
#else
@@ -107,19 +115,19 @@ int puts(const char *);
@@ -103,19 +111,19 @@ int puts(const char *);
int printf(const char *__restrict, ...);
int fprintf(FILE *__restrict, const char *__restrict, ...);
int sprintf(char *__restrict, const char *__restrict, ...);
@ -127,7 +127,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
void perror(const char *);
@@ -140,8 +148,8 @@ int pclose(FILE *);
@@ -136,8 +144,8 @@ int pclose(FILE *);
int fileno(FILE *);
int fseeko(FILE *, off_t, int);
off_t ftello(FILE *);
@ -138,7 +138,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
void flockfile(FILE *);
int ftrylockfile(FILE *);
void funlockfile(FILE *);
@@ -180,8 +188,8 @@ int fileno_unlocked(FILE *);
@@ -176,8 +184,8 @@ int fileno_unlocked(FILE *);
int getw(FILE *);
int putw(int, FILE *);
char *fgetln(FILE *, size_t *);
@ -149,7 +149,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
#endif
#ifdef _GNU_SOURCE
@@ -203,6 +211,9 @@ typedef struct _IO_cookie_io_functions_t
@@ -199,6 +207,9 @@ typedef struct _IO_cookie_io_functions_t
FILE *fopencookie(void *, const char *, cookie_io_functions_t);
#endif

View File

@ -1,74 +1,59 @@
--- a/src/crypt/crypt_r.c
+++ b/src/crypt/crypt_r.c
@@ -19,12 +19,6 @@ char *__crypt_r(const char *key, const c
if (salt[0] == '$' && salt[1] && salt[2]) {
if (salt[1] == '1' && salt[2] == '$')
return __crypt_md5(key, salt, output);
- if (salt[1] == '2' && salt[3] == '$')
- return __crypt_blowfish(key, salt, output);
- if (salt[1] == '5' && salt[2] == '$')
- return __crypt_sha256(key, salt, output);
- if (salt[1] == '6' && salt[2] == '$')
- return __crypt_sha512(key, salt, output);
}
return __crypt_des(key, salt, output);
}
--- a/src/crypt/crypt_sha512.c
+++ b/src/crypt/crypt_sha512.c
@@ -13,6 +13,17 @@
@@ -12,6 +12,7 @@
#include <stdio.h>
#include <string.h>
#include <stdint.h>
+#if 0
+#ifdef CRYPT_SIZE_HACK
+#include <errno.h>
+
+char *__crypt_sha512(const char *key, const char *setting, char *output)
+{
+ errno = ENOSYS;
+ return NULL;
+}
+
+#else
+
/* public domain sha512 implementation based on fips180-3 */
/* >=2^64 bits messages are not supported (about 2000 peta bytes) */
@@ -369,3 +380,4 @@ char *__crypt_sha512(const char *key, co
@@ -369,3 +370,4 @@ char *__crypt_sha512(const char *key, co
return "*";
return p;
}
+#endif
--- a/src/crypt/crypt_blowfish.c
+++ b/src/crypt/crypt_blowfish.c
@@ -50,6 +50,17 @@
@@ -50,6 +50,7 @@
#include <string.h>
#include <stdint.h>
+#ifdef CRYPT_SIZE_HACK
+#include <errno.h>
+
+char *__crypt_blowfish(const char *key, const char *setting, char *output)
+{
+ errno = ENOSYS;
+ return NULL;
+}
+
+#else
+
+#if 0
typedef uint32_t BF_word;
typedef int32_t BF_word_signed;
@@ -796,3 +807,4 @@ char *__crypt_blowfish(const char *key,
@@ -796,3 +797,4 @@ char *__crypt_blowfish(const char *key,
return "*";
}
+#endif
--- a/src/crypt/crypt_sha256.c
+++ b/src/crypt/crypt_sha256.c
@@ -13,6 +13,17 @@
@@ -13,6 +13,7 @@
#include <string.h>
#include <stdint.h>
+#ifdef CRYPT_SIZE_HACK
+#include <errno.h>
+
+char *__crypt_sha256(const char *key, const char *setting, char *output)
+{
+ errno = ENOSYS;
+ return NULL;
+}
+
+#else
+
+#if 0
/* public domain sha256 implementation based on fips180-3 */
struct sha256 {
@@ -320,3 +331,4 @@ char *__crypt_sha256(const char *key, co
@@ -320,3 +321,4 @@ char *__crypt_sha256(const char *key, co
return "*";
return p;
}

View File

@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=nasm
PKG_VERSION:=2.14
PKG_VERSION:=2.13.03
PKG_SOURCE_URL:=https://www.nasm.us/pub/nasm/releasebuilds/$(PKG_VERSION)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_HASH:=97c615dbf02ef80e4e2b6c385f7e28368d51efc214daa98e600ca4572500eec0
PKG_HASH:=812ecfb0dcbc5bd409aaa8f61c7de94c5b8752a7b00c632883d15b2ed6452573
HOST_BUILD_PARALLEL:=1

View File

@ -0,0 +1,15 @@
--- a/include/nasmlib.h
+++ b/include/nasmlib.h
@@ -188,11 +188,9 @@ int64_t readnum(char *str, bool *error);
int64_t readstrnum(char *str, int length, bool *warn);
/*
- * seg_init: Initialise the segment-number allocator.
* seg_alloc: allocate a hitherto unused segment number.
*/
-void pure_func seg_init(void);
-int32_t pure_func seg_alloc(void);
+int32_t seg_alloc(void);
/*
* many output formats will be able to make use of this: a standard

View File

@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/target.mk
PKG_VERSION:=1.0.31
PKG_VERSION:=1.0.30
PKG_NAME:=uClibc-ng
PKG_SOURCE_URL = http://downloads.uclibc-ng.org/releases/$(PKG_VERSION)/
@ -16,7 +16,7 @@ CONFIG_DIR:=$(PATH_PREFIX)/config
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
LIBC_SO_VERSION:=$(PKG_VERSION)
PKG_HASH:=2215d7377118434d1697fd575f10d7a6be3f29e460d6b0e1ee9f6f5306288060
PKG_HASH:=992bd9a2889ea385902b87e3d3d30603741eb16728288fbf537ff2027f770496
HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)-$(PKG_VERSION)