Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
379
toolchain/Config.in
Normal file
379
toolchain/Config.in
Normal file
@@ -0,0 +1,379 @@
|
||||
# Copyright (C) 2006-2013 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
menuconfig TARGET_OPTIONS
|
||||
bool "Target Options" if DEVEL
|
||||
|
||||
config TARGET_OPTIMIZATION
|
||||
string "Target Optimizations" if TARGET_OPTIONS
|
||||
default DEFAULT_TARGET_OPTIMIZATION
|
||||
help
|
||||
Optimizations to use when building for the target host.
|
||||
|
||||
config SOFT_FLOAT
|
||||
bool "Use software floating point by default" if TARGET_OPTIONS
|
||||
default y if !HAS_FPU
|
||||
depends on arm || armeb || powerpc || mipsel || mips || mips64el || mips64
|
||||
help
|
||||
If your target CPU does not have a Floating Point Unit (FPU) or a
|
||||
kernel FPU emulator, but you still wish to support floating point
|
||||
functions, then everything will need to be compiled with soft floating
|
||||
point support (-msoft-float).
|
||||
|
||||
Most people will answer N.
|
||||
|
||||
config USE_MIPS16
|
||||
bool "Build packages with MIPS16 instructions" if TARGET_OPTIONS
|
||||
depends on HAS_MIPS16
|
||||
default y
|
||||
help
|
||||
If your target CPU does support the MIPS16 instruction set
|
||||
and you want to use it for packages, enable this option.
|
||||
MIPS16 produces smaller binaries thus reducing pressure on
|
||||
caches and TLB.
|
||||
|
||||
Most people will answer N.
|
||||
|
||||
|
||||
choice BPF_TOOLCHAIN
|
||||
prompt "BPF toolchain" if DEVEL
|
||||
default BPF_TOOLCHAIN_BUILD_LLVM if BUILDBOT
|
||||
default BPF_TOOLCHAIN_PREBUILT if HAS_PREBUILT_LLVM_TOOLCHAIN
|
||||
default BPF_TOOLCHAIN_NONE
|
||||
|
||||
config BPF_TOOLCHAIN_NONE
|
||||
bool "None"
|
||||
|
||||
config BPF_TOOLCHAIN_PREBUILT
|
||||
bool "Use prebuilt LLVM toolchain"
|
||||
depends on HAS_PREBUILT_LLVM_TOOLCHAIN
|
||||
select USE_LLVM_PREBUILT
|
||||
|
||||
config BPF_TOOLCHAIN_HOST
|
||||
select USE_LLVM_HOST
|
||||
bool "Use host LLVM toolchain"
|
||||
|
||||
config BPF_TOOLCHAIN_BUILD_LLVM
|
||||
select USE_LLVM_BUILD
|
||||
bool "Build LLVM toolchain for eBPF"
|
||||
help
|
||||
If enabled, a LLVM toolchain for building eBPF binaries will be built.
|
||||
If this is not enabled, eBPF packages can only be built if the host
|
||||
has a suitable toolchain
|
||||
endchoice
|
||||
|
||||
config BPF_TOOLCHAIN_HOST_PATH
|
||||
string
|
||||
depends on BPF_TOOLCHAIN_HOST
|
||||
prompt "Host LLVM toolchain path (prefix)" if DEVEL
|
||||
default "/usr/local/opt/llvm" if HOST_OS_MACOS
|
||||
default ""
|
||||
|
||||
menuconfig EXTERNAL_TOOLCHAIN
|
||||
bool
|
||||
prompt "Use external toolchain" if DEVEL
|
||||
help
|
||||
If enabled, the buildroot will compile using an existing toolchain instead of
|
||||
compiling one.
|
||||
|
||||
config NATIVE_TOOLCHAIN
|
||||
bool
|
||||
prompt "Use host's toolchain" if DEVEL
|
||||
depends on EXTERNAL_TOOLCHAIN
|
||||
select NO_STRIP
|
||||
help
|
||||
If enabled, the buildroot will compile using the native toolchain for your
|
||||
host instead of compiling one.
|
||||
|
||||
config TARGET_NAME
|
||||
string
|
||||
prompt "Target name" if DEVEL
|
||||
depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
|
||||
default "aarch64-unknown-linux-gnu" if aarch64
|
||||
default "aarch64_be-unknown-linux-gnu" if aarch64_be
|
||||
default "arm-unknown-linux-gnu" if arm
|
||||
default "armeb-unknown-linux-gnu" if armeb
|
||||
default "i486-unknown-linux-gnu" if i386
|
||||
default "loongarch64-unknown-linux-gnu" if loongarch64
|
||||
default "mips-unknown-linux-gnu" if mips
|
||||
default "mipsel-unknown-linux-gnu" if mipsel
|
||||
default "powerpc-unknown-linux-gnu" if powerpc
|
||||
default "x86_64-unknown-linux-gnu" if x86_64
|
||||
|
||||
config TOOLCHAIN_PREFIX
|
||||
string
|
||||
prompt "Toolchain prefix" if DEVEL
|
||||
depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
|
||||
default "aarch64-unknown-linux-gnu" if aarch64
|
||||
default "aarch64_be-unknown-linux-gnu" if aarch64_be
|
||||
default "arm-unknown-linux-gnu-" if arm
|
||||
default "armeb-unknown-linux-gnu-" if armeb
|
||||
default "i486-unknown-linux-gnu-" if i386
|
||||
default "loongarch64-unknown-linux-gnu-" if loongarch64
|
||||
default "mips-unknown-linux-gnu-" if mips
|
||||
default "mipsel-unknown-linux-gnu-" if mipsel
|
||||
default "powerpc-unknown-linux-gnu-" if powerpc
|
||||
default "x86_64-unknown-linux-gnu-" if x86_64
|
||||
|
||||
config TOOLCHAIN_ROOT
|
||||
string
|
||||
prompt "Toolchain root" if DEVEL
|
||||
depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
|
||||
default "/opt/cross/aarch64-unknown-linux-gnu" if aarch64
|
||||
default "/opt/cross/aarch64_be-unknown-linux-gnu" if aarch64_be
|
||||
default "/opt/cross/arm-unknown-linux-gnu" if arm
|
||||
default "/opt/cross/armeb-unknown-linux-gnu" if armeb
|
||||
default "/opt/cross/i486-unknown-linux-gnu" if i386
|
||||
default "/opt/cross/loongarch64-unknown-linux-gnu" if loongarch64
|
||||
default "/opt/cross/mips-unknown-linux-gnu" if mips
|
||||
default "/opt/cross/mipsel-unknown-linux-gnu" if mipsel
|
||||
default "/opt/cross/powerpc-unknown-linux-gnu" if powerpc
|
||||
default "/opt/cross/x86_64-unknown-linux-gnu" if x86_64
|
||||
|
||||
choice TOOLCHAIN_LIBC_TYPE
|
||||
prompt "Toolchain libc" if DEVEL
|
||||
depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
|
||||
default EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL
|
||||
help
|
||||
Specify the libc type used by the external toolchain. The given value
|
||||
is passed as -m flag to all gcc and g++ invocations. This is mainly
|
||||
intended for multilib toolchains which support glibc and uclibc at
|
||||
the same time. If no value is specified, no -m flag is passed.
|
||||
|
||||
config EXTERNAL_TOOLCHAIN_LIBC_USE_GLIBC
|
||||
bool "glibc"
|
||||
select USE_GLIBC
|
||||
|
||||
config EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL
|
||||
bool "musl"
|
||||
select USE_MUSL
|
||||
|
||||
endchoice
|
||||
|
||||
config EXTERNAL_GCC_VERSION
|
||||
string
|
||||
prompt "External Toolchain GCC Version" if DEVEL
|
||||
depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
|
||||
help
|
||||
Manually specify the GCC version used by the selected
|
||||
external toolchain.
|
||||
|
||||
config TOOLCHAIN_LIBC
|
||||
string
|
||||
depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
|
||||
default "glibc" if EXTERNAL_TOOLCHAIN_LIBC_USE_GLIBC
|
||||
default "musl" if EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL
|
||||
|
||||
config TOOLCHAIN_BIN_PATH
|
||||
string
|
||||
prompt "Toolchain program path" if DEVEL
|
||||
depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
|
||||
default "./usr/bin ./bin"
|
||||
help
|
||||
Specify additional directories searched for toolchain binaries
|
||||
(override PATH). Use ./DIR for directories relative to the root above.
|
||||
|
||||
config TOOLCHAIN_INC_PATH
|
||||
string
|
||||
prompt "Toolchain include path" if DEVEL
|
||||
depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
|
||||
default "./usr/include ./include/fortify ./include" if EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL
|
||||
default "./usr/include ./include"
|
||||
help
|
||||
Specify additional directories searched for header files (override
|
||||
CPPFLAGS). Use ./DIR for directories relative to the root above.
|
||||
|
||||
config TOOLCHAIN_LIB_PATH
|
||||
string
|
||||
prompt "Toolchain library path" if DEVEL
|
||||
depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
|
||||
default "./usr/lib ./lib"
|
||||
help
|
||||
Specify additional directories searched for libraries (override LDFLAGS).
|
||||
Use ./DIR for directories relative to the root above.
|
||||
|
||||
config NEED_TOOLCHAIN
|
||||
bool
|
||||
depends on DEVEL
|
||||
default y if !EXTERNAL_TOOLCHAIN
|
||||
|
||||
menuconfig TOOLCHAINOPTS
|
||||
bool "Toolchain Options" if DEVEL
|
||||
depends on NEED_TOOLCHAIN
|
||||
|
||||
menuconfig EXTRA_TARGET_ARCH
|
||||
bool
|
||||
prompt "Enable an extra toolchain target architecture" if TOOLCHAINOPTS
|
||||
depends on !sparc
|
||||
help
|
||||
Some builds may require a 'biarch' toolchain. This option
|
||||
allows you to specify an additional target arch.
|
||||
|
||||
Most people will answer N here.
|
||||
|
||||
config EXTRA_TARGET_ARCH_NAME
|
||||
string
|
||||
prompt "Extra architecture name" if EXTRA_TARGET_ARCH
|
||||
help
|
||||
Specify the cpu name (eg powerpc64 or x86_64) of the
|
||||
additional target architecture.
|
||||
|
||||
config EXTRA_TARGET_ARCH_OPTS
|
||||
string
|
||||
prompt "Extra architecture compiler options" if EXTRA_TARGET_ARCH
|
||||
help
|
||||
If you're specifying an addition target architecture,
|
||||
you'll probably need to also provide options to make
|
||||
the compiler use this alternate arch.
|
||||
|
||||
For example, if you're building a compiler that can build
|
||||
both powerpc and powerpc64 binaries, you'll need to
|
||||
specify -m64 here.
|
||||
|
||||
|
||||
choice
|
||||
prompt "MIPS64 user-land ABI" if TOOLCHAINOPTS && (mips64 || mips64el)
|
||||
default MIPS64_ABI_N64
|
||||
help
|
||||
MIPS64 supports 3 different user-land ABIs: o32 (legacy),
|
||||
n32 and n64.
|
||||
|
||||
config MIPS64_ABI_N64
|
||||
bool "n64"
|
||||
|
||||
config MIPS64_ABI_N32
|
||||
depends on !LIBC_USE_MUSL
|
||||
bool "n32"
|
||||
|
||||
config MIPS64_ABI_O32
|
||||
bool "o32"
|
||||
|
||||
endchoice
|
||||
|
||||
comment "Binary tools"
|
||||
depends on TOOLCHAINOPTS
|
||||
|
||||
source "toolchain/binutils/Config.in"
|
||||
|
||||
config DWARVES
|
||||
bool
|
||||
prompt "Build pahole" if TOOLCHAINOPTS
|
||||
depends on !HOST_OS_MACOS
|
||||
help
|
||||
Enable if you want to build pahole and the dwarves tools.
|
||||
|
||||
comment "Compiler"
|
||||
depends on TOOLCHAINOPTS
|
||||
|
||||
source "toolchain/gcc/Config.in"
|
||||
|
||||
config NASM
|
||||
bool
|
||||
depends on ( i386 || x86_64 )
|
||||
prompt "Build nasm" if TOOLCHAINOPTS
|
||||
default y
|
||||
help
|
||||
Enable if you want to build nasm
|
||||
|
||||
comment "C Library"
|
||||
depends on TOOLCHAINOPTS
|
||||
|
||||
choice
|
||||
prompt "C Library implementation" if TOOLCHAINOPTS
|
||||
default LIBC_USE_GLIBC if arc
|
||||
default LIBC_USE_MUSL
|
||||
help
|
||||
Select the C library implementation.
|
||||
|
||||
config LIBC_USE_GLIBC
|
||||
bool "Use glibc"
|
||||
select USE_GLIBC
|
||||
|
||||
config LIBC_USE_MUSL
|
||||
select USE_MUSL
|
||||
bool "Use musl"
|
||||
depends on !arc
|
||||
|
||||
endchoice
|
||||
|
||||
source "toolchain/musl/Config.in"
|
||||
|
||||
comment "Debuggers"
|
||||
depends on TOOLCHAINOPTS
|
||||
|
||||
config GDB
|
||||
bool
|
||||
prompt "Build gdb" if TOOLCHAINOPTS
|
||||
default y if !EXTERNAL_TOOLCHAIN
|
||||
help
|
||||
Enable if you want to build the gdb.
|
||||
|
||||
config GDB_PYTHON
|
||||
bool
|
||||
depends on GDB
|
||||
prompt "Build gdb with python binding"
|
||||
|
||||
help
|
||||
Enable the python bindings for GDB to allow using python in the gdb shell.
|
||||
|
||||
config HAS_BPF_TOOLCHAIN
|
||||
bool
|
||||
|
||||
config HAS_PREBUILT_LLVM_TOOLCHAIN
|
||||
def_bool $(shell, [ -f llvm-bpf/.llvm-version ] && echo y || echo n)
|
||||
|
||||
config USE_LLVM_HOST
|
||||
select HAS_BPF_TOOLCHAIN
|
||||
bool
|
||||
|
||||
config USE_LLVM_PREBUILT
|
||||
select HAS_BPF_TOOLCHAIN
|
||||
default y if !DEVEL && !BUILDBOT && HAS_PREBUILT_LLVM_TOOLCHAIN
|
||||
bool
|
||||
|
||||
config USE_LLVM_BUILD
|
||||
default y if !DEVEL && BUILDBOT
|
||||
select HAS_BPF_TOOLCHAIN
|
||||
bool
|
||||
|
||||
config USE_GLIBC
|
||||
default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (arc)
|
||||
bool
|
||||
|
||||
config USE_MUSL
|
||||
default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc)
|
||||
bool
|
||||
|
||||
config SSP_SUPPORT
|
||||
default y if !PKG_CC_STACKPROTECTOR_NONE
|
||||
bool
|
||||
|
||||
config USE_EXTERNAL_LIBC
|
||||
bool
|
||||
default y if EXTERNAL_TOOLCHAIN || NATIVE_TOOLCHAIN
|
||||
|
||||
source "toolchain/binutils/Config.version"
|
||||
source "toolchain/gcc/Config.version"
|
||||
|
||||
config LIBC
|
||||
string
|
||||
default "glibc" if USE_GLIBC
|
||||
default "musl" if USE_MUSL
|
||||
|
||||
config TARGET_SUFFIX
|
||||
string
|
||||
default "gnueabi" if USE_GLIBC && (arm || armeb)
|
||||
default "gnu" if USE_GLIBC && !(arm || armeb)
|
||||
default "muslgnueabi" if USE_MUSL && (arm || armeb)
|
||||
default "musl" if USE_MUSL && !(arm || armeb)
|
||||
|
||||
config MIPS64_ABI
|
||||
depends on mips64 || mips64el
|
||||
string
|
||||
default "64" if MIPS64_ABI_N64
|
||||
default "n32" if MIPS64_ABI_N32
|
||||
default "32" if MIPS64_ABI_O32
|
||||
default "64"
|
||||
92
toolchain/Makefile
Normal file
92
toolchain/Makefile
Normal file
@@ -0,0 +1,92 @@
|
||||
#
|
||||
# Copyright (C) 2007-2009 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
# Main makefile for the toolchain
|
||||
#
|
||||
# Steps:
|
||||
# 1) toolchain/binutils/compile
|
||||
# build & install binutils
|
||||
# 2) toolchain/gcc/minimal/compile
|
||||
# build & install a minimal gcc, needed for steps 3 & 4
|
||||
# 3) toolchain/kernel-headers/compile
|
||||
# install kernel headers, needed for step 4
|
||||
# 4) toolchain/libc/headers/compile
|
||||
# build & install libc headers & support files, needed for step 5
|
||||
# 5) toolchain/gcc/initial/compile
|
||||
# build & install an initial gcc, needed for step 6
|
||||
# 6) toolchain/libc/compile
|
||||
# build & install the final libc
|
||||
# 7) toolchain/gcc/final/compile
|
||||
# build & install the final gcc
|
||||
#
|
||||
# For musl, steps 2 and 4 are skipped, and step 3 is done after 5
|
||||
|
||||
curdir:=toolchain
|
||||
|
||||
# subdirectories to descend into
|
||||
$(curdir)/builddirs := $(if $(CONFIG_GDB),gdb) $(if $(CONFIG_EXTERNAL_TOOLCHAIN),wrapper,kernel-headers binutils gcc/initial gcc/final $(LIBC) fortify-headers) $(if $(CONFIG_NASM),nasm) $(if $(CONFIG_USE_MOLD),mold)
|
||||
|
||||
# builddir dependencies
|
||||
ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
|
||||
ifdef CONFIG_USE_MUSL
|
||||
$(curdir)/gcc/initial/compile:=$(curdir)/binutils/compile
|
||||
$(curdir)/kernel-headers/compile:=$(curdir)/gcc/initial/compile
|
||||
else
|
||||
$(curdir)/builddirs += $(LIBC)/headers gcc/minimal
|
||||
$(curdir)/gcc/minimal/compile:=$(curdir)/binutils/compile
|
||||
$(curdir)/kernel-headers/compile:=$(curdir)/gcc/minimal/compile
|
||||
$(curdir)/$(LIBC)/headers/compile:=$(curdir)/kernel-headers/compile
|
||||
$(curdir)/gcc/initial/compile:=$(curdir)/$(LIBC)/headers/compile
|
||||
endif
|
||||
|
||||
$(curdir)/$(LIBC)/compile:=$(curdir)/gcc/initial/compile $(curdir)/kernel-headers/compile
|
||||
$(curdir)/gcc/final/compile:=$(curdir)/$(LIBC)/compile
|
||||
endif
|
||||
|
||||
ifndef DUMP_TARGET_DB
|
||||
ifneq ($(ARCH),)
|
||||
$(TOOLCHAIN_DIR)/info.mk: .config
|
||||
@for dir in $(TOOLCHAIN_DIR); do ( \
|
||||
$(if $(QUIET),,set -x;) \
|
||||
mkdir -p "$$dir"; \
|
||||
cd "$$dir"; \
|
||||
ln -nsf lib lib64; \
|
||||
ln -nsf lib lib32; \
|
||||
mkdir -p stamp lib usr/include usr/lib ; \
|
||||
); done
|
||||
@grep GCC_VERSION $@ >/dev/null 2>&1 || $(INSTALL_DATA) $(TOPDIR)/toolchain/info.mk $@
|
||||
@touch $@
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef CONFIG_BUILDBOT
|
||||
ifneq ($(wildcard $(TOPDIR)/.git),)
|
||||
$(TOOLCHAIN_DIR)/stamp/.ver_check: $(TMP_DIR)/.build
|
||||
cd "$(TOPDIR)"; git log --format=%h -1 toolchain > $(TMP_DIR)/.ver_check
|
||||
cmp -s $(TMP_DIR)/.ver_check $@ || { \
|
||||
rm -rf $(BUILD_DIR) $(STAGING_DIR) $(TOOLCHAIN_DIR) $(BUILD_DIR_TOOLCHAIN); \
|
||||
mkdir -p $(TOOLCHAIN_DIR)/stamp; \
|
||||
mv $(TMP_DIR)/.ver_check $@; \
|
||||
}
|
||||
|
||||
$(TOOLCHAIN_DIR)/info.mk $(STAGING_DIR)/.prepared: $(TOOLCHAIN_DIR)/stamp/.ver_check
|
||||
endif
|
||||
endif
|
||||
|
||||
# prerequisites for the individual targets
|
||||
$(curdir)/ := .config prereq
|
||||
$(curdir)//compile = $(STAGING_DIR)/.prepared $(TOOLCHAIN_DIR)/info.mk $(tools/stamp-compile)
|
||||
|
||||
ifndef DUMP_TARGET_DB
|
||||
$(TOOLCHAIN_DIR)/stamp/.gcc_final_installed:
|
||||
endif
|
||||
|
||||
$(curdir)/install: $(curdir)/compile
|
||||
|
||||
$(eval $(call stampfile,$(curdir),toolchain,compile,$(TOOLCHAIN_DIR)/stamp/.gcc_final_installed,,$(TOOLCHAIN_DIR)))
|
||||
$(eval $(call stampfile,$(curdir),toolchain,check,$(TMP_DIR)/.build))
|
||||
$(eval $(call subdir,$(curdir)))
|
||||
|
||||
39
toolchain/binutils/Config.in
Normal file
39
toolchain/binutils/Config.in
Normal file
@@ -0,0 +1,39 @@
|
||||
# Choose binutils version.
|
||||
|
||||
choice
|
||||
prompt "Binutils Version" if TOOLCHAINOPTS
|
||||
default BINUTILS_USE_VERSION_2_42
|
||||
help
|
||||
Select the version of binutils you wish to use.
|
||||
|
||||
config BINUTILS_USE_VERSION_2_37
|
||||
bool "Binutils 2.37"
|
||||
select BINUTILS_VERSION_2_37
|
||||
|
||||
config BINUTILS_USE_VERSION_2_38
|
||||
bool "Binutils 2.38"
|
||||
select BINUTILS_VERSION_2_38
|
||||
|
||||
config BINUTILS_USE_VERSION_2_39
|
||||
bool "Binutils 2.39"
|
||||
select BINUTILS_VERSION_2_39
|
||||
|
||||
config BINUTILS_USE_VERSION_2_40
|
||||
bool "Binutils 2.40"
|
||||
select BINUTILS_VERSION_2_40
|
||||
|
||||
config BINUTILS_USE_VERSION_2_41
|
||||
bool "Binutils 2.41"
|
||||
select BINUTILS_VERSION_2_41
|
||||
|
||||
config BINUTILS_USE_VERSION_2_42
|
||||
bool "Binutils 2.42"
|
||||
select BINUTILS_VERSION_2_42
|
||||
endchoice
|
||||
|
||||
config EXTRA_BINUTILS_CONFIG_OPTIONS
|
||||
string
|
||||
prompt "Additional binutils configure options" if TOOLCHAINOPTS
|
||||
default ""
|
||||
help
|
||||
Any additional binutils options you may want to include....
|
||||
28
toolchain/binutils/Config.version
Normal file
28
toolchain/binutils/Config.version
Normal file
@@ -0,0 +1,28 @@
|
||||
|
||||
config BINUTILS_VERSION_2_37
|
||||
bool
|
||||
|
||||
config BINUTILS_VERSION_2_38
|
||||
bool
|
||||
|
||||
config BINUTILS_VERSION_2_39
|
||||
bool
|
||||
|
||||
config BINUTILS_VERSION_2_40
|
||||
bool
|
||||
|
||||
config BINUTILS_VERSION_2_41
|
||||
bool
|
||||
|
||||
config BINUTILS_VERSION_2_42
|
||||
default y if !TOOLCHAINOPTS
|
||||
bool
|
||||
|
||||
config BINUTILS_VERSION
|
||||
string
|
||||
default "2.37" if BINUTILS_VERSION_2_37
|
||||
default "2.38" if BINUTILS_VERSION_2_38
|
||||
default "2.39" if BINUTILS_VERSION_2_39
|
||||
default "2.40" if BINUTILS_VERSION_2_40
|
||||
default "2.41" if BINUTILS_VERSION_2_41
|
||||
default "2.42" if BINUTILS_VERSION_2_42
|
||||
115
toolchain/binutils/Makefile
Normal file
115
toolchain/binutils/Makefile
Normal file
@@ -0,0 +1,115 @@
|
||||
#
|
||||
# Copyright (C) 2006-2013 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=binutils
|
||||
PKG_VERSION:=$(call qstrip,$(CONFIG_BINUTILS_VERSION))
|
||||
BIN_VERSION:=$(PKG_VERSION)
|
||||
|
||||
PKG_SOURCE_URL:=@GNU/binutils/
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_CPE_ID:=cpe:/a:gnu:binutils
|
||||
|
||||
TAR_OPTIONS += --exclude='*.rej'
|
||||
|
||||
ifeq ($(PKG_VERSION),2.37)
|
||||
PKG_HASH:=820d9724f020a3e69cb337893a0b63c2db161dadcb0e06fc11dc29eb1e84a32c
|
||||
endif
|
||||
|
||||
ifeq ($(PKG_VERSION),2.38)
|
||||
PKG_HASH:=e316477a914f567eccc34d5d29785b8b0f5a10208d36bbacedcc39048ecfe024
|
||||
endif
|
||||
|
||||
ifeq ($(PKG_VERSION),2.39)
|
||||
PKG_HASH:=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
|
||||
endif
|
||||
|
||||
ifeq ($(PKG_VERSION),2.40)
|
||||
PKG_HASH:=0f8a4c272d7f17f369ded10a4aca28b8e304828e95526da482b0ccc4dfc9d8e1
|
||||
endif
|
||||
|
||||
ifeq ($(PKG_VERSION),2.41)
|
||||
PKG_HASH:=ae9a5789e23459e59606e6714723f2d3ffc31c03174191ef0d015bdf06007450
|
||||
endif
|
||||
|
||||
ifeq ($(PKG_VERSION),2.42)
|
||||
PKG_HASH:=f6e4d41fd5fc778b06b7891457b3620da5ecea1006c6a4a41ae998109f85a800
|
||||
endif
|
||||
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
|
||||
PATCH_DIR:=./patches/$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/toolchain-build.mk
|
||||
|
||||
ifdef CONFIG_GCC_USE_GRAPHITE
|
||||
GRAPHITE_CONFIGURE:= --with-isl=$(STAGING_DIR_HOST)
|
||||
else
|
||||
GRAPHITE_CONFIGURE:= --without-isl --without-cloog
|
||||
endif
|
||||
|
||||
HOST_CONFIGURE_ARGS = \
|
||||
--prefix=$(TOOLCHAIN_DIR) \
|
||||
--build=$(GNU_HOST_NAME) \
|
||||
--host=$(GNU_HOST_NAME) \
|
||||
--target=$(REAL_GNU_TARGET_NAME) \
|
||||
--with-sysroot=$(TOOLCHAIN_DIR) \
|
||||
--with-system-zlib \
|
||||
--with-zstd \
|
||||
--enable-deterministic-archives \
|
||||
--enable-plugins \
|
||||
--enable-lto \
|
||||
--disable-gprofng \
|
||||
--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+= \
|
||||
--enable-libssp
|
||||
else
|
||||
HOST_CONFIGURE_ARGS+= \
|
||||
--disable-libssp
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_EXTRA_TARGET_ARCH),)
|
||||
HOST_CONFIGURE_ARGS+= \
|
||||
--enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-$(TARGET_SUFFIX)
|
||||
endif
|
||||
|
||||
HOST_CONFIGURE_VARS += \
|
||||
acx_cv_cc_gcc_supports_ada=false
|
||||
|
||||
define Host/Prepare
|
||||
$(call Host/Prepare/Default)
|
||||
ln -snf $(notdir $(HOST_BUILD_DIR)) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
|
||||
$(CP) $(SCRIPT_DIR)/config.{guess,sub} $(HOST_BUILD_DIR)/
|
||||
endef
|
||||
|
||||
define Host/Compile
|
||||
+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) all
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(MAKE) -C $(HOST_BUILD_DIR) \
|
||||
install
|
||||
$(call FixupLibdir,$(TOOLCHAIN_DIR))
|
||||
$(CP) $(TOOLCHAIN_DIR)/bin/$(REAL_GNU_TARGET_NAME)-readelf $(HOST_BUILD_PREFIX)/bin/readelf
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
rm -rf \
|
||||
$(HOST_BUILD_DIR) \
|
||||
$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
@@ -0,0 +1,22 @@
|
||||
--- a/ld/Makefile.am
|
||||
+++ b/ld/Makefile.am
|
||||
@@ -50,7 +50,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.
|
||||
-scriptdir = $(tooldir)/lib
|
||||
+scriptdir = $(libdir)
|
||||
|
||||
EMUL = @EMUL@
|
||||
EMULATION_OFILES = @EMULATION_OFILES@
|
||||
--- a/ld/Makefile.in
|
||||
+++ b/ld/Makefile.in
|
||||
@@ -561,7 +561,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.
|
||||
-scriptdir = $(tooldir)/lib
|
||||
+scriptdir = $(libdir)
|
||||
BASEDIR = $(srcdir)/..
|
||||
BFDDIR = $(BASEDIR)/bfd
|
||||
INCDIR = $(BASEDIR)/include
|
||||
@@ -0,0 +1,18 @@
|
||||
--- a/bfd/elfxx-mips.c
|
||||
+++ b/bfd/elfxx-mips.c
|
||||
@@ -8057,6 +8057,7 @@ _bfd_mips_elf_create_dynamic_sections (b
|
||||
|
||||
name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING";
|
||||
bh = NULL;
|
||||
+ if (0) {
|
||||
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)))
|
||||
@@ -8069,6 +8070,7 @@ _bfd_mips_elf_create_dynamic_sections (b
|
||||
|
||||
if (! bfd_elf_link_record_dynamic_symbol (info, h))
|
||||
return false;
|
||||
+ }
|
||||
|
||||
if (! mips_elf_hash_table (info)->use_rld_obj_head)
|
||||
{
|
||||
@@ -0,0 +1,38 @@
|
||||
--- a/bfd/config.bfd
|
||||
+++ b/bfd/config.bfd
|
||||
@@ -891,12 +891,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*)
|
||||
- targ_defvec=mips_elf32_ntrad_le_vec
|
||||
- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec"
|
||||
+ targ_defvec=mips_elf64_trad_le_vec
|
||||
+ targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec"
|
||||
;;
|
||||
mips64*-*-linux*)
|
||||
- targ_defvec=mips_elf32_ntrad_be_vec
|
||||
- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
|
||||
+ targ_defvec=mips_elf64_trad_be_vec
|
||||
+ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec"
|
||||
;;
|
||||
mips*el-*-linux*)
|
||||
targ_defvec=mips_elf32_trad_le_vec
|
||||
--- a/ld/configure.tgt
|
||||
+++ b/ld/configure.tgt
|
||||
@@ -530,12 +530,12 @@ mips*-*-vxworks*) targ_emul=elf32ebmipvx
|
||||
;;
|
||||
mips*-*-windiss) targ_emul=elf32mipswindiss
|
||||
;;
|
||||
-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
|
||||
- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
|
||||
+mips64*el-*-linux-*) targ_emul=elf64ltsmip
|
||||
+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
-mips64*-*-linux-*) targ_emul=elf32btsmipn32
|
||||
- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
|
||||
+mips64*-*-linux-*) targ_emul=elf64btsmip
|
||||
+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
mips*el-*-linux-*) targ_emul=elf32ltsmip
|
||||
@@ -0,0 +1,184 @@
|
||||
From: H.J. Lu <hjl.tools@gmail.com>
|
||||
Date: Mon, 26 Jul 2021 12:59:55 +0000 (-0700)
|
||||
Subject: bfd: Close the file descriptor if there is no archive fd
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=1c611b40e6bfc8029bff7696814330b5bc0ee5c0
|
||||
|
||||
bfd: Close the file descriptor if there is no archive fd
|
||||
|
||||
Close the file descriptor if there is no archive plugin file descriptor
|
||||
to avoid running out of file descriptors on thin archives with many
|
||||
archive members.
|
||||
|
||||
bfd/
|
||||
|
||||
PR ld/28138
|
||||
* plugin.c (bfd_plugin_close_file_descriptor): Close the file
|
||||
descriptor there is no archive plugin file descriptor.
|
||||
|
||||
ld/
|
||||
|
||||
PR ld/28138
|
||||
* testsuite/ld-plugin/lto.exp: Run tmpdir/pr28138 only for
|
||||
native build.
|
||||
|
||||
PR ld/28138
|
||||
* testsuite/ld-plugin/lto.exp: Run ld/28138 tests.
|
||||
* testsuite/ld-plugin/pr28138.c: New file.
|
||||
* testsuite/ld-plugin/pr28138-1.c: Likewise.
|
||||
* testsuite/ld-plugin/pr28138-2.c: Likewise.
|
||||
* testsuite/ld-plugin/pr28138-3.c: Likewise.
|
||||
* testsuite/ld-plugin/pr28138-4.c: Likewise.
|
||||
* testsuite/ld-plugin/pr28138-5.c: Likewise.
|
||||
* testsuite/ld-plugin/pr28138-6.c: Likewise.
|
||||
* testsuite/ld-plugin/pr28138-7.c: Likewise.
|
||||
|
||||
(cherry picked from commit 5a98fb7513b559e20dfebdbaa2a471afda3b4742)
|
||||
(cherry picked from commit 7dc37e1e1209c80e0bab784df6b6bac335e836f2)
|
||||
---
|
||||
|
||||
--- a/bfd/plugin.c
|
||||
+++ b/bfd/plugin.c
|
||||
@@ -291,6 +291,14 @@ bfd_plugin_close_file_descriptor (bfd *a
|
||||
&& !bfd_is_thin_archive (abfd->my_archive))
|
||||
abfd = abfd->my_archive;
|
||||
|
||||
+ /* Close the file descriptor if there is no archive plugin file
|
||||
+ descriptor. */
|
||||
+ if (abfd->archive_plugin_fd == -1)
|
||||
+ {
|
||||
+ close (fd);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
abfd->archive_plugin_fd_open_count--;
|
||||
/* Dup the archive plugin file descriptor for later use, which
|
||||
will be closed by _bfd_archive_close_and_cleanup. */
|
||||
--- a/ld/testsuite/ld-plugin/lto.exp
|
||||
+++ b/ld/testsuite/ld-plugin/lto.exp
|
||||
@@ -687,6 +687,40 @@ if { [is_elf_format] && [check_lto_share
|
||||
}
|
||||
}
|
||||
|
||||
+run_cc_link_tests [list \
|
||||
+ [list \
|
||||
+ "Build pr28138.a" \
|
||||
+ "-T" "" \
|
||||
+ {pr28138-1.c pr28138-2.c pr28138-3.c pr28138-4.c pr28138-5.c \
|
||||
+ pr28138-6.c pr28138-7.c} {} "pr28138.a" \
|
||||
+ ] \
|
||||
+ [list \
|
||||
+ "Build pr28138.o" \
|
||||
+ "" "" \
|
||||
+ {pr28138.c} {} \
|
||||
+ ] \
|
||||
+]
|
||||
+
|
||||
+set exec_output [run_host_cmd "sh" \
|
||||
+ "-c \"ulimit -n 20; \
|
||||
+ $CC -Btmpdir/ld -o tmpdir/pr28138 \
|
||||
+ tmpdir/pr28138.o tmpdir/pr28138.a\""]
|
||||
+set exec_output [prune_warnings $exec_output]
|
||||
+if [string match "" $exec_output] then {
|
||||
+ if { [isnative] } {
|
||||
+ set exec_output [run_host_cmd "tmpdir/pr28138" ""]
|
||||
+ if [string match "PASS" $exec_output] then {
|
||||
+ pass "PR ld/28138"
|
||||
+ } else {
|
||||
+ fail "PR ld/28138"
|
||||
+ }
|
||||
+ } else {
|
||||
+ pass "PR ld/28138"
|
||||
+ }
|
||||
+} else {
|
||||
+ fail "PR ld/28138"
|
||||
+}
|
||||
+
|
||||
set testname "Build liblto-11.a"
|
||||
remote_file host delete "tmpdir/liblto-11.a"
|
||||
set catch_output [run_host_cmd "$ar" "rc $plug_opt tmpdir/liblto-11.a tmpdir/lto-11a.o tmpdir/lto-11b.o tmpdir/lto-11c.o"]
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-plugin/pr28138-1.c
|
||||
@@ -0,0 +1,6 @@
|
||||
+extern int a0(void);
|
||||
+int
|
||||
+a1(void)
|
||||
+{
|
||||
+ return 1 + a0();
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-plugin/pr28138-2.c
|
||||
@@ -0,0 +1,6 @@
|
||||
+extern int a1(void);
|
||||
+int
|
||||
+a2(void)
|
||||
+{
|
||||
+ return 1 + a1();
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-plugin/pr28138-3.c
|
||||
@@ -0,0 +1,6 @@
|
||||
+extern int a2(void);
|
||||
+int
|
||||
+a3(void)
|
||||
+{
|
||||
+ return 1 + a2();
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-plugin/pr28138-4.c
|
||||
@@ -0,0 +1,6 @@
|
||||
+extern int a3(void);
|
||||
+int
|
||||
+a4(void)
|
||||
+{
|
||||
+ return 1 + a3();
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-plugin/pr28138-5.c
|
||||
@@ -0,0 +1,6 @@
|
||||
+extern int a4(void);
|
||||
+int
|
||||
+a5(void)
|
||||
+{
|
||||
+ return 1 + a4();
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-plugin/pr28138-6.c
|
||||
@@ -0,0 +1,6 @@
|
||||
+extern int a5(void);
|
||||
+int
|
||||
+a6(void)
|
||||
+{
|
||||
+ return 1 + a5();
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-plugin/pr28138-7.c
|
||||
@@ -0,0 +1,6 @@
|
||||
+extern int a6(void);
|
||||
+int
|
||||
+a7(void)
|
||||
+{
|
||||
+ return 1 + a6();
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-plugin/pr28138.c
|
||||
@@ -0,0 +1,20 @@
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+extern int a7(void);
|
||||
+
|
||||
+int
|
||||
+a0(void)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main()
|
||||
+{
|
||||
+ if (a7() == 7)
|
||||
+ {
|
||||
+ printf ("PASS\n");
|
||||
+ return 0;
|
||||
+ }
|
||||
+ return 1;
|
||||
+}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,218 @@
|
||||
From 3c6c32951e292a51ede70b8087bb0308d7dbc4fc Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Thu, 28 Mar 2024 20:33:32 +1030
|
||||
Subject: [PATCH 2/2] PR 30569, delete _bfd_mips_elf_early_size_sections
|
||||
|
||||
PR30569 was triggered by a patch of mine 6540edd52cc0 moving the call
|
||||
to always_size_sections in bfd_elf_size_dynamic_sections earlier, made
|
||||
to support the x86 DT_RELR implementation. This broke mips16 code
|
||||
handling stubs when --export-dynamic is passed to the linker, because
|
||||
numerous symbols then became dynamic after always_size_sections. The
|
||||
mips backend fiddles with symbols in its always_size_sections. Maciej
|
||||
in 902e9fc76a0e had moved the call to always_size_sections to after
|
||||
the export-dynamic code. Prior to that, Nathan in 04c3a75556c0 moved
|
||||
it before the exec stack code, back to the start of
|
||||
bfd_elf_size_dynamic_sections which was where Ian put it originally
|
||||
in ff12f303355b. So the call has moved around a little. I'm leaving
|
||||
it where it is, and instead calling mips_elf_check_symbols from
|
||||
late_size_sections (the old size_dynamic_sections) which is now always
|
||||
called. In fact, the whole of _bfd_mips_elf_early_size_sections can
|
||||
be merged into _bfd_mips_elf_late_size_sections.
|
||||
---
|
||||
bfd/elf32-mips.c | 1 -
|
||||
bfd/elf64-mips.c | 2 --
|
||||
bfd/elfn32-mips.c | 1 -
|
||||
bfd/elfxx-mips.c | 84 +++++++++++++++++++----------------------------
|
||||
bfd/elfxx-mips.h | 2 --
|
||||
5 files changed, 34 insertions(+), 56 deletions(-)
|
||||
|
||||
--- a/bfd/elf32-mips.c
|
||||
+++ b/bfd/elf32-mips.c
|
||||
@@ -2526,7 +2526,6 @@ static const struct ecoff_debug_swap mip
|
||||
#define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag
|
||||
#define elf_backend_adjust_dynamic_symbol \
|
||||
_bfd_mips_elf_adjust_dynamic_symbol
|
||||
-#define elf_backend_early_size_sections _bfd_mips_elf_early_size_sections
|
||||
#define elf_backend_late_size_sections _bfd_mips_elf_late_size_sections
|
||||
#define elf_backend_init_index_section _bfd_elf_init_1_index_section
|
||||
#define elf_backend_relocate_section _bfd_mips_elf_relocate_section
|
||||
--- a/bfd/elf64-mips.c
|
||||
+++ b/bfd/elf64-mips.c
|
||||
@@ -4741,8 +4741,6 @@ const struct elf_size_info mips_elf64_si
|
||||
#define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag
|
||||
#define elf_backend_adjust_dynamic_symbol \
|
||||
_bfd_mips_elf_adjust_dynamic_symbol
|
||||
-#define elf_backend_early_size_sections \
|
||||
- _bfd_mips_elf_early_size_sections
|
||||
#define elf_backend_late_size_sections \
|
||||
_bfd_mips_elf_late_size_sections
|
||||
#define elf_backend_init_index_section _bfd_elf_init_1_index_section
|
||||
--- a/bfd/elfn32-mips.c
|
||||
+++ b/bfd/elfn32-mips.c
|
||||
@@ -4127,7 +4127,6 @@ static const struct ecoff_debug_swap mip
|
||||
#define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag
|
||||
#define elf_backend_adjust_dynamic_symbol \
|
||||
_bfd_mips_elf_adjust_dynamic_symbol
|
||||
-#define elf_backend_early_size_sections _bfd_mips_elf_early_size_sections
|
||||
#define elf_backend_late_size_sections _bfd_mips_elf_late_size_sections
|
||||
#define elf_backend_init_index_section _bfd_elf_init_1_index_section
|
||||
#define elf_backend_relocate_section _bfd_mips_elf_relocate_section
|
||||
--- a/bfd/elfxx-mips.c
|
||||
+++ b/bfd/elfxx-mips.c
|
||||
@@ -9545,48 +9545,6 @@ _bfd_mips_elf_adjust_dynamic_symbol (str
|
||||
return _bfd_elf_adjust_dynamic_copy (info, h, s);
|
||||
}
|
||||
|
||||
-/* This function is called after all the input files have been read,
|
||||
- and the input sections have been assigned to output sections. We
|
||||
- check for any mips16 stub sections that we can discard. */
|
||||
-
|
||||
-bool
|
||||
-_bfd_mips_elf_early_size_sections (bfd *output_bfd,
|
||||
- struct bfd_link_info *info)
|
||||
-{
|
||||
- asection *sect;
|
||||
- struct mips_elf_link_hash_table *htab;
|
||||
- struct mips_htab_traverse_info hti;
|
||||
-
|
||||
- htab = mips_elf_hash_table (info);
|
||||
- BFD_ASSERT (htab != NULL);
|
||||
-
|
||||
- /* The .reginfo section has a fixed size. */
|
||||
- sect = bfd_get_section_by_name (output_bfd, ".reginfo");
|
||||
- if (sect != NULL)
|
||||
- {
|
||||
- bfd_set_section_size (sect, sizeof (Elf32_External_RegInfo));
|
||||
- sect->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
|
||||
- }
|
||||
-
|
||||
- /* The .MIPS.abiflags section has a fixed size. */
|
||||
- sect = bfd_get_section_by_name (output_bfd, ".MIPS.abiflags");
|
||||
- if (sect != NULL)
|
||||
- {
|
||||
- bfd_set_section_size (sect, sizeof (Elf_External_ABIFlags_v0));
|
||||
- sect->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
|
||||
- }
|
||||
-
|
||||
- hti.info = info;
|
||||
- hti.output_bfd = output_bfd;
|
||||
- hti.error = false;
|
||||
- mips_elf_link_hash_traverse (mips_elf_hash_table (info),
|
||||
- mips_elf_check_symbols, &hti);
|
||||
- if (hti.error)
|
||||
- return false;
|
||||
-
|
||||
- return true;
|
||||
-}
|
||||
-
|
||||
/* If the link uses a GOT, lay it out and work out its size. */
|
||||
|
||||
static bool
|
||||
@@ -9891,7 +9849,8 @@ mips_elf_set_plt_sym_value (struct mips_
|
||||
return true;
|
||||
}
|
||||
|
||||
-/* Set the sizes of the dynamic sections. */
|
||||
+/* Set the sizes of the dynamic sections, some mips non-dynamic sections,
|
||||
+ and check for any mips16 stub sections that we can discard. */
|
||||
|
||||
bool
|
||||
_bfd_mips_elf_late_size_sections (bfd *output_bfd,
|
||||
@@ -9901,14 +9860,39 @@ _bfd_mips_elf_late_size_sections (bfd *o
|
||||
asection *s, *sreldyn;
|
||||
bool reltext;
|
||||
struct mips_elf_link_hash_table *htab;
|
||||
+ struct mips_htab_traverse_info hti;
|
||||
|
||||
htab = mips_elf_hash_table (info);
|
||||
BFD_ASSERT (htab != NULL);
|
||||
- dynobj = elf_hash_table (info)->dynobj;
|
||||
+
|
||||
+ /* The .reginfo section has a fixed size. */
|
||||
+ s = bfd_get_section_by_name (output_bfd, ".reginfo");
|
||||
+ if (s != NULL)
|
||||
+ {
|
||||
+ bfd_set_section_size (s, sizeof (Elf32_External_RegInfo));
|
||||
+ s->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
|
||||
+ }
|
||||
+
|
||||
+ /* The .MIPS.abiflags section has a fixed size. */
|
||||
+ s = bfd_get_section_by_name (output_bfd, ".MIPS.abiflags");
|
||||
+ if (s != NULL)
|
||||
+ {
|
||||
+ bfd_set_section_size (s, sizeof (Elf_External_ABIFlags_v0));
|
||||
+ s->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
|
||||
+ }
|
||||
+
|
||||
+ hti.info = info;
|
||||
+ hti.output_bfd = output_bfd;
|
||||
+ hti.error = false;
|
||||
+ mips_elf_link_hash_traverse (htab, mips_elf_check_symbols, &hti);
|
||||
+ if (hti.error)
|
||||
+ return false;
|
||||
+
|
||||
+ dynobj = htab->root.dynobj;
|
||||
if (dynobj == NULL)
|
||||
return true;
|
||||
|
||||
- if (elf_hash_table (info)->dynamic_sections_created)
|
||||
+ if (htab->root.dynamic_sections_created)
|
||||
{
|
||||
/* Set the contents of the .interp section to the interpreter. */
|
||||
if (bfd_link_executable (info) && !info->nointerp)
|
||||
@@ -10048,7 +10032,7 @@ _bfd_mips_elf_late_size_sections (bfd *o
|
||||
}
|
||||
}
|
||||
else if (bfd_link_executable (info)
|
||||
- && ! mips_elf_hash_table (info)->use_rld_obj_head
|
||||
+ && !htab->use_rld_obj_head
|
||||
&& startswith (name, ".rld_map"))
|
||||
{
|
||||
/* We add a room for __rld_map. It will be filled in by the
|
||||
@@ -10057,7 +10041,7 @@ _bfd_mips_elf_late_size_sections (bfd *o
|
||||
}
|
||||
else if (SGI_COMPAT (output_bfd)
|
||||
&& startswith (name, ".compact_rel"))
|
||||
- s->size += mips_elf_hash_table (info)->compact_rel_size;
|
||||
+ s->size += htab->compact_rel_size;
|
||||
else if (s == htab->root.splt)
|
||||
{
|
||||
/* If the last PLT entry has a branch delay slot, allocate
|
||||
@@ -10097,7 +10081,7 @@ _bfd_mips_elf_late_size_sections (bfd *o
|
||||
}
|
||||
}
|
||||
|
||||
- if (elf_hash_table (info)->dynamic_sections_created)
|
||||
+ if (htab->root.dynamic_sections_created)
|
||||
{
|
||||
/* Add some entries to the .dynamic section. We fill in the
|
||||
values later, in _bfd_mips_elf_finish_dynamic_sections, but we
|
||||
@@ -14825,7 +14809,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str
|
||||
input_section->flags &= ~SEC_HAS_CONTENTS;
|
||||
}
|
||||
|
||||
- /* Size has been set in _bfd_mips_elf_early_size_sections. */
|
||||
+ /* Size has been set in _bfd_mips_elf_late_size_sections. */
|
||||
BFD_ASSERT(o->size == sizeof (Elf_External_ABIFlags_v0));
|
||||
|
||||
/* Skip this section later on (I don't think this currently
|
||||
@@ -14884,7 +14868,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str
|
||||
input_section->flags &= ~SEC_HAS_CONTENTS;
|
||||
}
|
||||
|
||||
- /* Size has been set in _bfd_mips_elf_early_size_sections. */
|
||||
+ /* Size has been set in _bfd_mips_elf_late_size_sections. */
|
||||
BFD_ASSERT(o->size == sizeof (Elf32_External_RegInfo));
|
||||
|
||||
/* Skip this section later on (I don't think this currently
|
||||
--- a/bfd/elfxx-mips.h
|
||||
+++ b/bfd/elfxx-mips.h
|
||||
@@ -52,8 +52,6 @@ extern bool _bfd_mips_elf_check_relocs
|
||||
(bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
|
||||
extern bool _bfd_mips_elf_adjust_dynamic_symbol
|
||||
(struct bfd_link_info *, struct elf_link_hash_entry *);
|
||||
-extern bool _bfd_mips_elf_early_size_sections
|
||||
- (bfd *, struct bfd_link_info *);
|
||||
extern bool _bfd_mips_elf_late_size_sections
|
||||
(bfd *, struct bfd_link_info *);
|
||||
extern int _bfd_mips_elf_relocate_section
|
||||
@@ -0,0 +1,22 @@
|
||||
--- a/ld/Makefile.am
|
||||
+++ b/ld/Makefile.am
|
||||
@@ -50,7 +50,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.
|
||||
-scriptdir = $(tooldir)/lib
|
||||
+scriptdir = $(libdir)
|
||||
|
||||
EMUL = @EMUL@
|
||||
EMULATION_OFILES = @EMULATION_OFILES@
|
||||
--- a/ld/Makefile.in
|
||||
+++ b/ld/Makefile.in
|
||||
@@ -563,7 +563,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.
|
||||
-scriptdir = $(tooldir)/lib
|
||||
+scriptdir = $(libdir)
|
||||
BASEDIR = $(srcdir)/..
|
||||
BFDDIR = $(BASEDIR)/bfd
|
||||
INCDIR = $(BASEDIR)/include
|
||||
@@ -0,0 +1,18 @@
|
||||
--- a/bfd/elfxx-mips.c
|
||||
+++ b/bfd/elfxx-mips.c
|
||||
@@ -8057,6 +8057,7 @@ _bfd_mips_elf_create_dynamic_sections (b
|
||||
|
||||
name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING";
|
||||
bh = NULL;
|
||||
+ if (0) {
|
||||
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)))
|
||||
@@ -8069,6 +8070,7 @@ _bfd_mips_elf_create_dynamic_sections (b
|
||||
|
||||
if (! bfd_elf_link_record_dynamic_symbol (info, h))
|
||||
return false;
|
||||
+ }
|
||||
|
||||
if (! mips_elf_hash_table (info)->use_rld_obj_head)
|
||||
{
|
||||
@@ -0,0 +1,38 @@
|
||||
--- a/bfd/config.bfd
|
||||
+++ b/bfd/config.bfd
|
||||
@@ -928,12 +928,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*)
|
||||
- targ_defvec=mips_elf32_ntrad_le_vec
|
||||
- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec"
|
||||
+ targ_defvec=mips_elf64_trad_le_vec
|
||||
+ targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec"
|
||||
;;
|
||||
mips64*-*-linux*)
|
||||
- targ_defvec=mips_elf32_ntrad_be_vec
|
||||
- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
|
||||
+ targ_defvec=mips_elf64_trad_be_vec
|
||||
+ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec"
|
||||
;;
|
||||
mips*el-*-linux*)
|
||||
targ_defvec=mips_elf32_trad_le_vec
|
||||
--- a/ld/configure.tgt
|
||||
+++ b/ld/configure.tgt
|
||||
@@ -543,12 +543,12 @@ mips*-*-vxworks*) targ_emul=elf32ebmipvx
|
||||
;;
|
||||
mips*-*-windiss) targ_emul=elf32mipswindiss
|
||||
;;
|
||||
-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
|
||||
- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
|
||||
+mips64*el-*-linux-*) targ_emul=elf64ltsmip
|
||||
+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
-mips64*-*-linux-*) targ_emul=elf32btsmipn32
|
||||
- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
|
||||
+mips64*-*-linux-*) targ_emul=elf64btsmip
|
||||
+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
mips*el-*-linux-*) targ_emul=elf32ltsmip
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,218 @@
|
||||
From 3c6c32951e292a51ede70b8087bb0308d7dbc4fc Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Thu, 28 Mar 2024 20:33:32 +1030
|
||||
Subject: [PATCH 2/2] PR 30569, delete _bfd_mips_elf_early_size_sections
|
||||
|
||||
PR30569 was triggered by a patch of mine 6540edd52cc0 moving the call
|
||||
to always_size_sections in bfd_elf_size_dynamic_sections earlier, made
|
||||
to support the x86 DT_RELR implementation. This broke mips16 code
|
||||
handling stubs when --export-dynamic is passed to the linker, because
|
||||
numerous symbols then became dynamic after always_size_sections. The
|
||||
mips backend fiddles with symbols in its always_size_sections. Maciej
|
||||
in 902e9fc76a0e had moved the call to always_size_sections to after
|
||||
the export-dynamic code. Prior to that, Nathan in 04c3a75556c0 moved
|
||||
it before the exec stack code, back to the start of
|
||||
bfd_elf_size_dynamic_sections which was where Ian put it originally
|
||||
in ff12f303355b. So the call has moved around a little. I'm leaving
|
||||
it where it is, and instead calling mips_elf_check_symbols from
|
||||
late_size_sections (the old size_dynamic_sections) which is now always
|
||||
called. In fact, the whole of _bfd_mips_elf_early_size_sections can
|
||||
be merged into _bfd_mips_elf_late_size_sections.
|
||||
---
|
||||
bfd/elf32-mips.c | 1 -
|
||||
bfd/elf64-mips.c | 2 --
|
||||
bfd/elfn32-mips.c | 1 -
|
||||
bfd/elfxx-mips.c | 84 +++++++++++++++++++----------------------------
|
||||
bfd/elfxx-mips.h | 2 --
|
||||
5 files changed, 34 insertions(+), 56 deletions(-)
|
||||
|
||||
--- a/bfd/elf32-mips.c
|
||||
+++ b/bfd/elf32-mips.c
|
||||
@@ -2525,7 +2525,6 @@ static const struct ecoff_debug_swap mip
|
||||
#define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag
|
||||
#define elf_backend_adjust_dynamic_symbol \
|
||||
_bfd_mips_elf_adjust_dynamic_symbol
|
||||
-#define elf_backend_early_size_sections _bfd_mips_elf_early_size_sections
|
||||
#define elf_backend_late_size_sections _bfd_mips_elf_late_size_sections
|
||||
#define elf_backend_init_index_section _bfd_elf_init_1_index_section
|
||||
#define elf_backend_relocate_section _bfd_mips_elf_relocate_section
|
||||
--- a/bfd/elf64-mips.c
|
||||
+++ b/bfd/elf64-mips.c
|
||||
@@ -4739,8 +4739,6 @@ const struct elf_size_info mips_elf64_si
|
||||
#define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag
|
||||
#define elf_backend_adjust_dynamic_symbol \
|
||||
_bfd_mips_elf_adjust_dynamic_symbol
|
||||
-#define elf_backend_early_size_sections \
|
||||
- _bfd_mips_elf_early_size_sections
|
||||
#define elf_backend_late_size_sections \
|
||||
_bfd_mips_elf_late_size_sections
|
||||
#define elf_backend_init_index_section _bfd_elf_init_1_index_section
|
||||
--- a/bfd/elfn32-mips.c
|
||||
+++ b/bfd/elfn32-mips.c
|
||||
@@ -4125,7 +4125,6 @@ static const struct ecoff_debug_swap mip
|
||||
#define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag
|
||||
#define elf_backend_adjust_dynamic_symbol \
|
||||
_bfd_mips_elf_adjust_dynamic_symbol
|
||||
-#define elf_backend_early_size_sections _bfd_mips_elf_early_size_sections
|
||||
#define elf_backend_late_size_sections _bfd_mips_elf_late_size_sections
|
||||
#define elf_backend_init_index_section _bfd_elf_init_1_index_section
|
||||
#define elf_backend_relocate_section _bfd_mips_elf_relocate_section
|
||||
--- a/bfd/elfxx-mips.c
|
||||
+++ b/bfd/elfxx-mips.c
|
||||
@@ -9554,48 +9554,6 @@ _bfd_mips_elf_adjust_dynamic_symbol (str
|
||||
return _bfd_elf_adjust_dynamic_copy (info, h, s);
|
||||
}
|
||||
|
||||
-/* This function is called after all the input files have been read,
|
||||
- and the input sections have been assigned to output sections. We
|
||||
- check for any mips16 stub sections that we can discard. */
|
||||
-
|
||||
-bool
|
||||
-_bfd_mips_elf_early_size_sections (bfd *output_bfd,
|
||||
- struct bfd_link_info *info)
|
||||
-{
|
||||
- asection *sect;
|
||||
- struct mips_elf_link_hash_table *htab;
|
||||
- struct mips_htab_traverse_info hti;
|
||||
-
|
||||
- htab = mips_elf_hash_table (info);
|
||||
- BFD_ASSERT (htab != NULL);
|
||||
-
|
||||
- /* The .reginfo section has a fixed size. */
|
||||
- sect = bfd_get_section_by_name (output_bfd, ".reginfo");
|
||||
- if (sect != NULL)
|
||||
- {
|
||||
- bfd_set_section_size (sect, sizeof (Elf32_External_RegInfo));
|
||||
- sect->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
|
||||
- }
|
||||
-
|
||||
- /* The .MIPS.abiflags section has a fixed size. */
|
||||
- sect = bfd_get_section_by_name (output_bfd, ".MIPS.abiflags");
|
||||
- if (sect != NULL)
|
||||
- {
|
||||
- bfd_set_section_size (sect, sizeof (Elf_External_ABIFlags_v0));
|
||||
- sect->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
|
||||
- }
|
||||
-
|
||||
- hti.info = info;
|
||||
- hti.output_bfd = output_bfd;
|
||||
- hti.error = false;
|
||||
- mips_elf_link_hash_traverse (mips_elf_hash_table (info),
|
||||
- mips_elf_check_symbols, &hti);
|
||||
- if (hti.error)
|
||||
- return false;
|
||||
-
|
||||
- return true;
|
||||
-}
|
||||
-
|
||||
/* If the link uses a GOT, lay it out and work out its size. */
|
||||
|
||||
static bool
|
||||
@@ -9900,7 +9858,8 @@ mips_elf_set_plt_sym_value (struct mips_
|
||||
return true;
|
||||
}
|
||||
|
||||
-/* Set the sizes of the dynamic sections. */
|
||||
+/* Set the sizes of the dynamic sections, some mips non-dynamic sections,
|
||||
+ and check for any mips16 stub sections that we can discard. */
|
||||
|
||||
bool
|
||||
_bfd_mips_elf_late_size_sections (bfd *output_bfd,
|
||||
@@ -9910,14 +9869,39 @@ _bfd_mips_elf_late_size_sections (bfd *o
|
||||
asection *s, *sreldyn;
|
||||
bool reltext;
|
||||
struct mips_elf_link_hash_table *htab;
|
||||
+ struct mips_htab_traverse_info hti;
|
||||
|
||||
htab = mips_elf_hash_table (info);
|
||||
BFD_ASSERT (htab != NULL);
|
||||
- dynobj = elf_hash_table (info)->dynobj;
|
||||
+
|
||||
+ /* The .reginfo section has a fixed size. */
|
||||
+ s = bfd_get_section_by_name (output_bfd, ".reginfo");
|
||||
+ if (s != NULL)
|
||||
+ {
|
||||
+ bfd_set_section_size (s, sizeof (Elf32_External_RegInfo));
|
||||
+ s->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
|
||||
+ }
|
||||
+
|
||||
+ /* The .MIPS.abiflags section has a fixed size. */
|
||||
+ s = bfd_get_section_by_name (output_bfd, ".MIPS.abiflags");
|
||||
+ if (s != NULL)
|
||||
+ {
|
||||
+ bfd_set_section_size (s, sizeof (Elf_External_ABIFlags_v0));
|
||||
+ s->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
|
||||
+ }
|
||||
+
|
||||
+ hti.info = info;
|
||||
+ hti.output_bfd = output_bfd;
|
||||
+ hti.error = false;
|
||||
+ mips_elf_link_hash_traverse (htab, mips_elf_check_symbols, &hti);
|
||||
+ if (hti.error)
|
||||
+ return false;
|
||||
+
|
||||
+ dynobj = htab->root.dynobj;
|
||||
if (dynobj == NULL)
|
||||
return true;
|
||||
|
||||
- if (elf_hash_table (info)->dynamic_sections_created)
|
||||
+ if (htab->root.dynamic_sections_created)
|
||||
{
|
||||
/* Set the contents of the .interp section to the interpreter. */
|
||||
if (bfd_link_executable (info) && !info->nointerp)
|
||||
@@ -10057,7 +10041,7 @@ _bfd_mips_elf_late_size_sections (bfd *o
|
||||
}
|
||||
}
|
||||
else if (bfd_link_executable (info)
|
||||
- && ! mips_elf_hash_table (info)->use_rld_obj_head
|
||||
+ && !htab->use_rld_obj_head
|
||||
&& startswith (name, ".rld_map"))
|
||||
{
|
||||
/* We add a room for __rld_map. It will be filled in by the
|
||||
@@ -10066,7 +10050,7 @@ _bfd_mips_elf_late_size_sections (bfd *o
|
||||
}
|
||||
else if (SGI_COMPAT (output_bfd)
|
||||
&& startswith (name, ".compact_rel"))
|
||||
- s->size += mips_elf_hash_table (info)->compact_rel_size;
|
||||
+ s->size += htab->compact_rel_size;
|
||||
else if (s == htab->root.splt)
|
||||
{
|
||||
/* If the last PLT entry has a branch delay slot, allocate
|
||||
@@ -10106,7 +10090,7 @@ _bfd_mips_elf_late_size_sections (bfd *o
|
||||
}
|
||||
}
|
||||
|
||||
- if (elf_hash_table (info)->dynamic_sections_created)
|
||||
+ if (htab->root.dynamic_sections_created)
|
||||
{
|
||||
/* Add some entries to the .dynamic section. We fill in the
|
||||
values later, in _bfd_mips_elf_finish_dynamic_sections, but we
|
||||
@@ -14834,7 +14818,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str
|
||||
input_section->flags &= ~SEC_HAS_CONTENTS;
|
||||
}
|
||||
|
||||
- /* Size has been set in _bfd_mips_elf_early_size_sections. */
|
||||
+ /* Size has been set in _bfd_mips_elf_late_size_sections. */
|
||||
BFD_ASSERT(o->size == sizeof (Elf_External_ABIFlags_v0));
|
||||
|
||||
/* Skip this section later on (I don't think this currently
|
||||
@@ -14893,7 +14877,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str
|
||||
input_section->flags &= ~SEC_HAS_CONTENTS;
|
||||
}
|
||||
|
||||
- /* Size has been set in _bfd_mips_elf_early_size_sections. */
|
||||
+ /* Size has been set in _bfd_mips_elf_late_size_sections. */
|
||||
BFD_ASSERT(o->size == sizeof (Elf32_External_RegInfo));
|
||||
|
||||
/* Skip this section later on (I don't think this currently
|
||||
--- a/bfd/elfxx-mips.h
|
||||
+++ b/bfd/elfxx-mips.h
|
||||
@@ -52,8 +52,6 @@ extern bool _bfd_mips_elf_check_relocs
|
||||
(bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
|
||||
extern bool _bfd_mips_elf_adjust_dynamic_symbol
|
||||
(struct bfd_link_info *, struct elf_link_hash_entry *);
|
||||
-extern bool _bfd_mips_elf_early_size_sections
|
||||
- (bfd *, struct bfd_link_info *);
|
||||
extern bool _bfd_mips_elf_late_size_sections
|
||||
(bfd *, struct bfd_link_info *);
|
||||
extern int _bfd_mips_elf_relocate_section
|
||||
27
toolchain/binutils/patches/2.39/005-ld-fix-NEWS-typos.patch
Normal file
27
toolchain/binutils/patches/2.39/005-ld-fix-NEWS-typos.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
From 9284b63ea39cecbfc1522d9e143ecb7727d77eb5 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Liska <mliska@suse.cz>
|
||||
Date: Mon, 8 Aug 2022 13:22:26 +0200
|
||||
Subject: [PATCH 005/160] ld: fix NEWS typos
|
||||
|
||||
ld/ChangeLog:
|
||||
|
||||
* NEWS: Fix 2 typos.
|
||||
---
|
||||
ld/NEWS | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/ld/NEWS
|
||||
+++ b/ld/NEWS
|
||||
@@ -27,10 +27,10 @@ Changes in 2.39:
|
||||
--enable-warn-rwx-segments=no
|
||||
will make --no-warn-rwx-segments enabled by default.
|
||||
|
||||
- --enable-defaul-execstack=no
|
||||
+ --enable-default-execstack=no
|
||||
will stop the creation of an executable stack simply because an input file
|
||||
is missing a .note.GNU-stack section, even on architectures where this
|
||||
- ehaviour is the default.
|
||||
+ behaviour is the default.
|
||||
|
||||
* TYPE=<type> is now supported in an output section description to set the
|
||||
section type value.
|
||||
@@ -0,0 +1,90 @@
|
||||
From e8cf73215187b0c08679d726a5cc7c019fa3ea2e Mon Sep 17 00:00:00 2001
|
||||
From: Jan Beulich <jbeulich@suse.com>
|
||||
Date: Wed, 10 Aug 2022 10:34:22 +0200
|
||||
Subject: [PATCH 008/160] gas/Dwarf: properly skip zero-size functions
|
||||
|
||||
PR gas/29451
|
||||
|
||||
While out_debug_abbrev() properly skips such functions, out_debug_info()
|
||||
mistakenly didn't. It needs to calculate the high_pc expression ahead of
|
||||
time, in order to skip emitting any data for the function if the value
|
||||
is zero.
|
||||
|
||||
The one case which would still leave a zero-size entry is when
|
||||
symbol_get_obj(symp)->size ends up evaluating to zero. I hope we can
|
||||
expect that to not be the case, otherwise we'd need to have a way to
|
||||
post-process .debug_info contents between resolving expressions and
|
||||
actually writing the data out to the file. Even then it wouldn't be
|
||||
entirely obvious in which way to alter the data.
|
||||
|
||||
(cherry picked from commit d7abcbcea5ddd40a3bf28758b62f35933c59f996)
|
||||
---
|
||||
gas/dwarf2dbg.c | 39 ++++++++++++++++++++-------------------
|
||||
1 file changed, 20 insertions(+), 19 deletions(-)
|
||||
|
||||
--- a/gas/dwarf2dbg.c
|
||||
+++ b/gas/dwarf2dbg.c
|
||||
@@ -2882,6 +2882,7 @@ out_debug_info (segT info_seg, segT abbr
|
||||
{
|
||||
const char *name;
|
||||
size_t len;
|
||||
+ expressionS size = { .X_op = O_constant };
|
||||
|
||||
/* Skip warning constructs (see above). */
|
||||
if (symbol_get_bfdsym (symp)->flags & BSF_WARNING)
|
||||
@@ -2895,6 +2896,18 @@ out_debug_info (segT info_seg, segT abbr
|
||||
if (!S_IS_DEFINED (symp) || !S_IS_FUNCTION (symp))
|
||||
continue;
|
||||
|
||||
+#if defined (OBJ_ELF) /* || defined (OBJ_MAYBE_ELF) */
|
||||
+ size.X_add_number = S_GET_SIZE (symp);
|
||||
+ if (size.X_add_number == 0 && IS_ELF
|
||||
+ && symbol_get_obj (symp)->size != NULL)
|
||||
+ {
|
||||
+ size.X_op = O_add;
|
||||
+ size.X_op_symbol = make_expr_symbol (symbol_get_obj (symp)->size);
|
||||
+ }
|
||||
+#endif
|
||||
+ if (size.X_op == O_constant && size.X_add_number == 0)
|
||||
+ continue;
|
||||
+
|
||||
subseg_set (str_seg, 0);
|
||||
name_sym = symbol_temp_new_now_octets ();
|
||||
name = S_GET_NAME (symp);
|
||||
@@ -2920,29 +2933,17 @@ out_debug_info (segT info_seg, segT abbr
|
||||
emit_expr (&exp, sizeof_address);
|
||||
|
||||
/* DW_AT_high_pc */
|
||||
- exp.X_op = O_constant;
|
||||
-#if defined (OBJ_ELF) /* || defined (OBJ_MAYBE_ELF) */
|
||||
- exp.X_add_number = S_GET_SIZE (symp);
|
||||
- if (exp.X_add_number == 0 && IS_ELF
|
||||
- && symbol_get_obj (symp)->size != NULL)
|
||||
- {
|
||||
- exp.X_op = O_add;
|
||||
- exp.X_op_symbol = make_expr_symbol (symbol_get_obj (symp)->size);
|
||||
- }
|
||||
-#else
|
||||
- exp.X_add_number = 0;
|
||||
-#endif
|
||||
if (DWARF2_VERSION < 4)
|
||||
{
|
||||
- if (exp.X_op == O_constant)
|
||||
- exp.X_op = O_symbol;
|
||||
- exp.X_add_symbol = symp;
|
||||
- emit_expr (&exp, sizeof_address);
|
||||
+ if (size.X_op == O_constant)
|
||||
+ size.X_op = O_symbol;
|
||||
+ size.X_add_symbol = symp;
|
||||
+ emit_expr (&size, sizeof_address);
|
||||
}
|
||||
- else if (exp.X_op == O_constant)
|
||||
- out_uleb128 (exp.X_add_number);
|
||||
+ else if (size.X_op == O_constant)
|
||||
+ out_uleb128 (size.X_add_number);
|
||||
else
|
||||
- emit_leb128_expr (symbol_get_value_expression (exp.X_op_symbol), 0);
|
||||
+ emit_leb128_expr (symbol_get_value_expression (size.X_op_symbol), 0);
|
||||
}
|
||||
|
||||
/* End of children. */
|
||||
@@ -0,0 +1,270 @@
|
||||
From e3b5d935247084dca057dea72be61b063fe2357a Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Wed, 10 Aug 2022 10:38:52 +0930
|
||||
Subject: [PATCH 009/160] PR29462, internal error in relocate, at
|
||||
powerpc.cc:10796
|
||||
|
||||
Prior to the inline plt call support (commit 08be322439), the only
|
||||
local syms with plt entries were local ifunc symbols. There shouldn't
|
||||
be stubs for other local symbols so don't look for them. The patch
|
||||
also fixes minor bugs in get_reference_flags; Many relocs are valid
|
||||
only for ppc64 and a couple only for ppc32.
|
||||
|
||||
PR 29462
|
||||
* powerpc.cc (Target_powerpc::Relocate::relocate): Rename
|
||||
use_plt_offset to pltcal_to_direct, invert logic. For relocs
|
||||
not used with inline plt sequences against local symbols, only
|
||||
look for stubs when the symbol is an ifunc.
|
||||
(Target_powerpc::Scan::get_reference_flags): Correct reloc
|
||||
handling for relocs not valid for both 32-bit and 64-bit.
|
||||
|
||||
(cherry picked from commit 6158b25f77db11712b84e6a4609898f2615ac749)
|
||||
---
|
||||
gold/powerpc.cc | 129 ++++++++++++++++++++++++++++--------------------
|
||||
1 file changed, 75 insertions(+), 54 deletions(-)
|
||||
|
||||
--- a/gold/powerpc.cc
|
||||
+++ b/gold/powerpc.cc
|
||||
@@ -7675,22 +7675,18 @@ Target_powerpc<size, big_endian>::Scan::
|
||||
|
||||
switch (r_type)
|
||||
{
|
||||
+ case elfcpp::R_PPC64_TOC:
|
||||
+ if (size != 64)
|
||||
+ break;
|
||||
+ // Fall through.
|
||||
case elfcpp::R_POWERPC_NONE:
|
||||
case elfcpp::R_POWERPC_GNU_VTINHERIT:
|
||||
case elfcpp::R_POWERPC_GNU_VTENTRY:
|
||||
- case elfcpp::R_PPC64_TOC:
|
||||
// No symbol reference.
|
||||
break;
|
||||
|
||||
case elfcpp::R_PPC64_ADDR64:
|
||||
case elfcpp::R_PPC64_UADDR64:
|
||||
- case elfcpp::R_POWERPC_ADDR32:
|
||||
- case elfcpp::R_POWERPC_UADDR32:
|
||||
- case elfcpp::R_POWERPC_ADDR16:
|
||||
- case elfcpp::R_POWERPC_UADDR16:
|
||||
- case elfcpp::R_POWERPC_ADDR16_LO:
|
||||
- case elfcpp::R_POWERPC_ADDR16_HI:
|
||||
- case elfcpp::R_POWERPC_ADDR16_HA:
|
||||
case elfcpp::R_PPC64_ADDR16_HIGHER34:
|
||||
case elfcpp::R_PPC64_ADDR16_HIGHERA34:
|
||||
case elfcpp::R_PPC64_ADDR16_HIGHEST34:
|
||||
@@ -7700,6 +7696,16 @@ Target_powerpc<size, big_endian>::Scan::
|
||||
case elfcpp::R_PPC64_D34_HI30:
|
||||
case elfcpp::R_PPC64_D34_HA30:
|
||||
case elfcpp::R_PPC64_D28:
|
||||
+ if (size != 64)
|
||||
+ break;
|
||||
+ // Fall through.
|
||||
+ case elfcpp::R_POWERPC_ADDR32:
|
||||
+ case elfcpp::R_POWERPC_UADDR32:
|
||||
+ case elfcpp::R_POWERPC_ADDR16:
|
||||
+ case elfcpp::R_POWERPC_UADDR16:
|
||||
+ case elfcpp::R_POWERPC_ADDR16_LO:
|
||||
+ case elfcpp::R_POWERPC_ADDR16_HI:
|
||||
+ case elfcpp::R_POWERPC_ADDR16_HA:
|
||||
ref = Symbol::ABSOLUTE_REF;
|
||||
break;
|
||||
|
||||
@@ -7710,13 +7716,14 @@ Target_powerpc<size, big_endian>::Scan::
|
||||
ref = Symbol::FUNCTION_CALL | Symbol::ABSOLUTE_REF;
|
||||
break;
|
||||
|
||||
- case elfcpp::R_PPC64_REL64:
|
||||
- case elfcpp::R_POWERPC_REL32:
|
||||
case elfcpp::R_PPC_LOCAL24PC:
|
||||
- case elfcpp::R_POWERPC_REL16:
|
||||
- case elfcpp::R_POWERPC_REL16_LO:
|
||||
- case elfcpp::R_POWERPC_REL16_HI:
|
||||
- case elfcpp::R_POWERPC_REL16_HA:
|
||||
+ if (size != 32)
|
||||
+ break;
|
||||
+ // Fall through.
|
||||
+ ref = Symbol::RELATIVE_REF;
|
||||
+ break;
|
||||
+
|
||||
+ case elfcpp::R_PPC64_REL64:
|
||||
case elfcpp::R_PPC64_REL16_HIGH:
|
||||
case elfcpp::R_PPC64_REL16_HIGHA:
|
||||
case elfcpp::R_PPC64_REL16_HIGHER:
|
||||
@@ -7729,36 +7736,45 @@ Target_powerpc<size, big_endian>::Scan::
|
||||
case elfcpp::R_PPC64_REL16_HIGHEST34:
|
||||
case elfcpp::R_PPC64_REL16_HIGHESTA34:
|
||||
case elfcpp::R_PPC64_PCREL28:
|
||||
+ if (size != 64)
|
||||
+ break;
|
||||
+ // Fall through.
|
||||
+ case elfcpp::R_POWERPC_REL32:
|
||||
+ case elfcpp::R_POWERPC_REL16:
|
||||
+ case elfcpp::R_POWERPC_REL16_LO:
|
||||
+ case elfcpp::R_POWERPC_REL16_HI:
|
||||
+ case elfcpp::R_POWERPC_REL16_HA:
|
||||
ref = Symbol::RELATIVE_REF;
|
||||
break;
|
||||
|
||||
+ case elfcpp::R_PPC_PLTREL24:
|
||||
+ if (size != 32)
|
||||
+ break;
|
||||
+ ref = Symbol::FUNCTION_CALL | Symbol::RELATIVE_REF;
|
||||
+ break;
|
||||
+
|
||||
case elfcpp::R_PPC64_REL24_NOTOC:
|
||||
- if (size == 32)
|
||||
+ case elfcpp::R_PPC64_REL24_P9NOTOC:
|
||||
+ case elfcpp::R_PPC64_PLT16_LO_DS:
|
||||
+ case elfcpp::R_PPC64_PLTSEQ_NOTOC:
|
||||
+ case elfcpp::R_PPC64_PLTCALL_NOTOC:
|
||||
+ case elfcpp::R_PPC64_PLT_PCREL34:
|
||||
+ case elfcpp::R_PPC64_PLT_PCREL34_NOTOC:
|
||||
+ if (size != 64)
|
||||
break;
|
||||
// Fall through.
|
||||
- case elfcpp::R_PPC64_REL24_P9NOTOC:
|
||||
case elfcpp::R_POWERPC_REL24:
|
||||
- case elfcpp::R_PPC_PLTREL24:
|
||||
case elfcpp::R_POWERPC_REL14:
|
||||
case elfcpp::R_POWERPC_REL14_BRTAKEN:
|
||||
case elfcpp::R_POWERPC_REL14_BRNTAKEN:
|
||||
case elfcpp::R_POWERPC_PLT16_LO:
|
||||
case elfcpp::R_POWERPC_PLT16_HI:
|
||||
case elfcpp::R_POWERPC_PLT16_HA:
|
||||
- case elfcpp::R_PPC64_PLT16_LO_DS:
|
||||
case elfcpp::R_POWERPC_PLTSEQ:
|
||||
- case elfcpp::R_PPC64_PLTSEQ_NOTOC:
|
||||
case elfcpp::R_POWERPC_PLTCALL:
|
||||
- case elfcpp::R_PPC64_PLTCALL_NOTOC:
|
||||
- case elfcpp::R_PPC64_PLT_PCREL34:
|
||||
- case elfcpp::R_PPC64_PLT_PCREL34_NOTOC:
|
||||
ref = Symbol::FUNCTION_CALL | Symbol::RELATIVE_REF;
|
||||
break;
|
||||
|
||||
- case elfcpp::R_POWERPC_GOT16:
|
||||
- case elfcpp::R_POWERPC_GOT16_LO:
|
||||
- case elfcpp::R_POWERPC_GOT16_HI:
|
||||
- case elfcpp::R_POWERPC_GOT16_HA:
|
||||
case elfcpp::R_PPC64_GOT16_DS:
|
||||
case elfcpp::R_PPC64_GOT16_LO_DS:
|
||||
case elfcpp::R_PPC64_GOT_PCREL34:
|
||||
@@ -7768,11 +7784,16 @@ Target_powerpc<size, big_endian>::Scan::
|
||||
case elfcpp::R_PPC64_TOC16_HA:
|
||||
case elfcpp::R_PPC64_TOC16_DS:
|
||||
case elfcpp::R_PPC64_TOC16_LO_DS:
|
||||
+ if (size != 64)
|
||||
+ break;
|
||||
+ // Fall through.
|
||||
+ case elfcpp::R_POWERPC_GOT16:
|
||||
+ case elfcpp::R_POWERPC_GOT16_LO:
|
||||
+ case elfcpp::R_POWERPC_GOT16_HI:
|
||||
+ case elfcpp::R_POWERPC_GOT16_HA:
|
||||
ref = Symbol::RELATIVE_REF;
|
||||
break;
|
||||
|
||||
- case elfcpp::R_POWERPC_GOT_TPREL16:
|
||||
- case elfcpp::R_POWERPC_TLS:
|
||||
case elfcpp::R_PPC64_TLSGD:
|
||||
case elfcpp::R_PPC64_TLSLD:
|
||||
case elfcpp::R_PPC64_TPREL34:
|
||||
@@ -7781,6 +7802,11 @@ Target_powerpc<size, big_endian>::Scan::
|
||||
case elfcpp::R_PPC64_GOT_TLSLD_PCREL34:
|
||||
case elfcpp::R_PPC64_GOT_TPREL_PCREL34:
|
||||
case elfcpp::R_PPC64_GOT_DTPREL_PCREL34:
|
||||
+ if (size != 64)
|
||||
+ break;
|
||||
+ // Fall through.
|
||||
+ case elfcpp::R_POWERPC_GOT_TPREL16:
|
||||
+ case elfcpp::R_POWERPC_TLS:
|
||||
ref = Symbol::TLS_REF;
|
||||
break;
|
||||
|
||||
@@ -10671,10 +10697,8 @@ Target_powerpc<size, big_endian>::Reloca
|
||||
bool has_stub_value = false;
|
||||
bool localentry0 = false;
|
||||
unsigned int r_sym = elfcpp::elf_r_sym<size>(rela.get_r_info());
|
||||
- bool use_plt_offset
|
||||
- = (gsym != NULL
|
||||
- ? gsym->use_plt_offset(Scan::get_reference_flags(r_type, target))
|
||||
- : object->local_has_plt_offset(r_sym));
|
||||
+ bool pltcall_to_direct = false;
|
||||
+
|
||||
if (is_plt16_reloc<size>(r_type)
|
||||
|| r_type == elfcpp::R_PPC64_PLT_PCREL34
|
||||
|| r_type == elfcpp::R_PPC64_PLT_PCREL34_NOTOC
|
||||
@@ -10688,21 +10712,18 @@ Target_powerpc<size, big_endian>::Reloca
|
||||
// that the decision depends on the PLTCALL reloc, and we don't
|
||||
// know the address of that instruction when processing others
|
||||
// in the sequence. So the decision needs to be made in
|
||||
- // do_relax(). For now, don't optimise inline plt calls.
|
||||
- if (gsym)
|
||||
- use_plt_offset = gsym->has_plt_offset();
|
||||
- }
|
||||
- if (use_plt_offset
|
||||
- && !is_got_reloc(r_type)
|
||||
- && !is_plt16_reloc<size>(r_type)
|
||||
- && r_type != elfcpp::R_PPC64_PLT_PCREL34
|
||||
- && r_type != elfcpp::R_PPC64_PLT_PCREL34_NOTOC
|
||||
- && r_type != elfcpp::R_POWERPC_PLTSEQ
|
||||
- && r_type != elfcpp::R_POWERPC_PLTCALL
|
||||
- && r_type != elfcpp::R_PPC64_PLTSEQ_NOTOC
|
||||
- && r_type != elfcpp::R_PPC64_PLTCALL_NOTOC
|
||||
- && (!psymval->is_ifunc_symbol()
|
||||
- || Scan::reloc_needs_plt_for_ifunc(target, object, r_type, false)))
|
||||
+ // do_relax().
|
||||
+ pltcall_to_direct = !(gsym != NULL
|
||||
+ ? gsym->has_plt_offset()
|
||||
+ : object->local_has_plt_offset(r_sym));
|
||||
+ }
|
||||
+ else if ((gsym != NULL
|
||||
+ ? gsym->use_plt_offset(Scan::get_reference_flags(r_type, target))
|
||||
+ : psymval->is_ifunc_symbol() && object->local_has_plt_offset(r_sym))
|
||||
+ && !is_got_reloc(r_type)
|
||||
+ && (!psymval->is_ifunc_symbol()
|
||||
+ || Scan::reloc_needs_plt_for_ifunc(target, object, r_type,
|
||||
+ false)))
|
||||
{
|
||||
if (size == 64
|
||||
&& gsym != NULL
|
||||
@@ -10796,9 +10817,9 @@ Target_powerpc<size, big_endian>::Reloca
|
||||
gold_assert(has_stub_value || !(os->flags() & elfcpp::SHF_ALLOC));
|
||||
}
|
||||
|
||||
- if (use_plt_offset && (is_plt16_reloc<size>(r_type)
|
||||
- || r_type == elfcpp::R_PPC64_PLT_PCREL34
|
||||
- || r_type == elfcpp::R_PPC64_PLT_PCREL34_NOTOC))
|
||||
+ if (!pltcall_to_direct && (is_plt16_reloc<size>(r_type)
|
||||
+ || r_type == elfcpp::R_PPC64_PLT_PCREL34
|
||||
+ || r_type == elfcpp::R_PPC64_PLT_PCREL34_NOTOC))
|
||||
{
|
||||
const Output_data_plt_powerpc<size, big_endian>* plt;
|
||||
if (gsym)
|
||||
@@ -10826,7 +10847,7 @@ Target_powerpc<size, big_endian>::Reloca
|
||||
value -= target->toc_pointer();
|
||||
}
|
||||
}
|
||||
- else if (!use_plt_offset
|
||||
+ else if (pltcall_to_direct
|
||||
&& (is_plt16_reloc<size>(r_type)
|
||||
|| r_type == elfcpp::R_POWERPC_PLTSEQ
|
||||
|| r_type == elfcpp::R_PPC64_PLTSEQ_NOTOC))
|
||||
@@ -10835,7 +10856,7 @@ Target_powerpc<size, big_endian>::Reloca
|
||||
elfcpp::Swap<32, big_endian>::writeval(iview, nop);
|
||||
r_type = elfcpp::R_POWERPC_NONE;
|
||||
}
|
||||
- else if (!use_plt_offset
|
||||
+ else if (pltcall_to_direct
|
||||
&& (r_type == elfcpp::R_PPC64_PLT_PCREL34
|
||||
|| r_type == elfcpp::R_PPC64_PLT_PCREL34_NOTOC))
|
||||
{
|
||||
@@ -11316,8 +11337,8 @@ Target_powerpc<size, big_endian>::Reloca
|
||||
}
|
||||
else if (!has_stub_value)
|
||||
{
|
||||
- if (!use_plt_offset && (r_type == elfcpp::R_POWERPC_PLTCALL
|
||||
- || r_type == elfcpp::R_PPC64_PLTCALL_NOTOC))
|
||||
+ if (pltcall_to_direct && (r_type == elfcpp::R_POWERPC_PLTCALL
|
||||
+ || r_type == elfcpp::R_PPC64_PLTCALL_NOTOC))
|
||||
{
|
||||
// PLTCALL without plt entry => convert to direct call
|
||||
Insn* iview = reinterpret_cast<Insn*>(view);
|
||||
@@ -0,0 +1,167 @@
|
||||
From 9e855cffa1fda44629e7f9b76dfa3e5a51a440e9 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Thu, 11 Aug 2022 09:51:03 +0930
|
||||
Subject: [PATCH 011/160] PR29466, APP/NO_APP with .linefile
|
||||
|
||||
Commit 53f2b36a54b9 exposed a bug in sb_scrub_and_add_sb that could
|
||||
result in losing input. If scrubbing results in expansion past the
|
||||
holding capacity of do_scrub_chars output buffer, then do_scrub_chars
|
||||
stashes the extra input for the next call. That call never came
|
||||
because sb_scrub_and_add_sb wrongly decided it was done. Fix that by
|
||||
allowing sb_scrub_and_add_sb to see whether there is pending input.
|
||||
Also allow a little extra space so that in most cases we won't need
|
||||
to resize the output buffer.
|
||||
|
||||
sb_scrub_and_add_sb also limited output to the size of the input,
|
||||
rather than the actual output buffer size. Fixing that resulted in a
|
||||
fail of gas/testsuite/macros/dot with an extra warning: "end of file
|
||||
not at end of a line; newline inserted". OK, so the macro in dot.s
|
||||
really does finish without end-of-line. Apparently the macro
|
||||
expansion code relied on do_scrub_chars returning early. So fix that
|
||||
too by adding a newline if needed in macro_expand_body.
|
||||
|
||||
PR 29466
|
||||
* app.c (do_scrub_pending): New function.
|
||||
* as.h: Declare it.
|
||||
* input-scrub.c (input_scrub_include_sb): Add extra space for
|
||||
two .linefile directives.
|
||||
* sb.c (sb_scrub_and_add_sb): Take into account pending input.
|
||||
Allow output to max.
|
||||
* macro.c (macro_expand_body): Add terminating newline.
|
||||
* testsuite/config/default.exp (SIZE, SIZEFLAGS): Define.
|
||||
* testsuite/gas/macros/app5.d,
|
||||
* testsuite/gas/macros/app5.s: New test.
|
||||
* testsuite/gas/macros/macros.exp: Run it.
|
||||
|
||||
(cherry picked from commit 4d74aab7aa562fe79d4669cdad0c32610531cbc0)
|
||||
---
|
||||
gas/app.c | 13 +++++++++++++
|
||||
gas/as.h | 1 +
|
||||
gas/input-scrub.c | 6 ++++--
|
||||
gas/macro.c | 2 ++
|
||||
gas/sb.c | 5 +++--
|
||||
gas/testsuite/config/default.exp | 8 ++++++++
|
||||
gas/testsuite/gas/macros/app5.d | 6 ++++++
|
||||
gas/testsuite/gas/macros/app5.s | 5 +++++
|
||||
gas/testsuite/gas/macros/macros.exp | 1 +
|
||||
9 files changed, 43 insertions(+), 4 deletions(-)
|
||||
create mode 100644 gas/testsuite/gas/macros/app5.d
|
||||
create mode 100644 gas/testsuite/gas/macros/app5.s
|
||||
|
||||
--- a/gas/app.c
|
||||
+++ b/gas/app.c
|
||||
@@ -1537,3 +1537,16 @@ do_scrub_chars (size_t (*get) (char *, s
|
||||
last_char = to[-1];
|
||||
return to - tostart;
|
||||
}
|
||||
+
|
||||
+/* Return amount of pending input. */
|
||||
+
|
||||
+size_t
|
||||
+do_scrub_pending (void)
|
||||
+{
|
||||
+ size_t len = 0;
|
||||
+ if (saved_input)
|
||||
+ len += saved_input_len;
|
||||
+ if (state == -1)
|
||||
+ len += strlen (out_string);
|
||||
+ return len;
|
||||
+}
|
||||
--- a/gas/as.h
|
||||
+++ b/gas/as.h
|
||||
@@ -460,6 +460,7 @@ void input_scrub_insert_file (char *);
|
||||
char * input_scrub_new_file (const char *);
|
||||
char * input_scrub_next_buffer (char **bufp);
|
||||
size_t do_scrub_chars (size_t (*get) (char *, size_t), char *, size_t);
|
||||
+size_t do_scrub_pending (void);
|
||||
bool scan_for_multibyte_characters (const unsigned char *, const unsigned char *, bool);
|
||||
int gen_to_words (LITTLENUM_TYPE *, int, long);
|
||||
int had_err (void);
|
||||
--- a/gas/input-scrub.c
|
||||
+++ b/gas/input-scrub.c
|
||||
@@ -278,9 +278,11 @@ input_scrub_include_sb (sb *from, char *
|
||||
|
||||
next_saved_file = input_scrub_push (position);
|
||||
|
||||
- /* Allocate sufficient space: from->len + optional newline. */
|
||||
+ /* Allocate sufficient space: from->len plus optional newline
|
||||
+ plus two ".linefile " directives, plus a little more for other
|
||||
+ expansion. */
|
||||
newline = from->len >= 1 && from->ptr[0] != '\n';
|
||||
- sb_build (&from_sb, from->len + newline);
|
||||
+ sb_build (&from_sb, from->len + newline + 2 * sizeof (".linefile") + 30);
|
||||
if (expansion == expanding_repeat && from_sb_expansion >= expanding_macro)
|
||||
expansion = expanding_nested;
|
||||
from_sb_expansion = expansion;
|
||||
--- a/gas/macro.c
|
||||
+++ b/gas/macro.c
|
||||
@@ -1056,6 +1056,8 @@ macro_expand_body (sb *in, sb *out, form
|
||||
loclist = f;
|
||||
}
|
||||
|
||||
+ if (!err && (out->len == 0 || out->ptr[out->len - 1] != '\n'))
|
||||
+ sb_add_char (out, '\n');
|
||||
return err;
|
||||
}
|
||||
|
||||
--- a/gas/sb.c
|
||||
+++ b/gas/sb.c
|
||||
@@ -119,11 +119,12 @@ sb_scrub_and_add_sb (sb *ptr, sb *s)
|
||||
So we loop until the input S is consumed. */
|
||||
while (1)
|
||||
{
|
||||
- size_t copy = s->len - (scrub_position - s->ptr);
|
||||
+ size_t copy = s->len - (scrub_position - s->ptr) + do_scrub_pending ();
|
||||
if (copy == 0)
|
||||
break;
|
||||
sb_check (ptr, copy);
|
||||
- ptr->len += do_scrub_chars (scrub_from_sb, ptr->ptr + ptr->len, copy);
|
||||
+ ptr->len += do_scrub_chars (scrub_from_sb, ptr->ptr + ptr->len,
|
||||
+ ptr->max - ptr->len);
|
||||
}
|
||||
|
||||
sb_to_scrub = 0;
|
||||
--- a/gas/testsuite/config/default.exp
|
||||
+++ b/gas/testsuite/config/default.exp
|
||||
@@ -52,6 +52,14 @@ if ![info exists NMFLAGS] then {
|
||||
set NMFLAGS {}
|
||||
}
|
||||
|
||||
+if ![info exists SIZE] then {
|
||||
+ set SIZE [findfile $base_dir/size]
|
||||
+}
|
||||
+
|
||||
+if ![info exists SIZEFLAGS] then {
|
||||
+ set SIZEFLAGS ""
|
||||
+}
|
||||
+
|
||||
if ![info exists OBJCOPY] then {
|
||||
set OBJCOPY [findfile $base_dir/../../binutils/objcopy]
|
||||
}
|
||||
--- /dev/null
|
||||
+++ b/gas/testsuite/gas/macros/app5.d
|
||||
@@ -0,0 +1,6 @@
|
||||
+#name: APP with linefile
|
||||
+#xfail: tic30-*-*
|
||||
+#size: -G
|
||||
+# pr29466 just check that the test assembles
|
||||
+
|
||||
+#pass
|
||||
--- /dev/null
|
||||
+++ b/gas/testsuite/gas/macros/app5.s
|
||||
@@ -0,0 +1,5 @@
|
||||
+#NO_APP
|
||||
+#APP
|
||||
+# 5 "foo.c" 1
|
||||
+# 0 "" 2
|
||||
+#NO_APP
|
||||
--- a/gas/testsuite/gas/macros/macros.exp
|
||||
+++ b/gas/testsuite/gas/macros/macros.exp
|
||||
@@ -70,6 +70,7 @@ run_dump_test app2
|
||||
run_dump_test app3
|
||||
remote_download host "$srcdir/$subdir/app4b.s"
|
||||
run_dump_test app4
|
||||
+run_dump_test app5
|
||||
|
||||
run_list_test badarg ""
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
From 509a2ec6ad3ea7eb3f4cf59538cf636a2126e4c3 Mon Sep 17 00:00:00 2001
|
||||
From: liuzhensong <liuzhensong@loongson.cn>
|
||||
Date: Fri, 2 Sep 2022 16:29:14 +0800
|
||||
Subject: [PATCH 039/160] LoongArch:ld: Fix relocation error of pcrel.
|
||||
|
||||
Patch for branch 2.39.
|
||||
Need to reduce the address of pc when using
|
||||
reloction R_LARCH_SOP_PUSH_PCREL.
|
||||
|
||||
bfd/
|
||||
* elfnn-loongarch.c
|
||||
---
|
||||
bfd/elfnn-loongarch.c | 3 +-
|
||||
ld/testsuite/ld-loongarch-elf/pcrel-const.d | 14 +++++++
|
||||
ld/testsuite/ld-loongarch-elf/pcrel-const.lds | 14 +++++++
|
||||
ld/testsuite/ld-loongarch-elf/pcrel-const.s | 12 ++++++
|
||||
ld/testsuite/ld-loongarch-elf/pr.exp | 39 +++++++++++++++++++
|
||||
5 files changed, 81 insertions(+), 1 deletion(-)
|
||||
create mode 100644 ld/testsuite/ld-loongarch-elf/pcrel-const.d
|
||||
create mode 100644 ld/testsuite/ld-loongarch-elf/pcrel-const.lds
|
||||
create mode 100644 ld/testsuite/ld-loongarch-elf/pcrel-const.s
|
||||
create mode 100644 ld/testsuite/ld-loongarch-elf/pr.exp
|
||||
|
||||
--- a/bfd/elfnn-loongarch.c
|
||||
+++ b/bfd/elfnn-loongarch.c
|
||||
@@ -2342,9 +2342,10 @@ loongarch_elf_relocate_section (bfd *out
|
||||
case R_LARCH_SOP_PUSH_PLT_PCREL:
|
||||
unresolved_reloc = false;
|
||||
|
||||
- if (resolved_to_const)
|
||||
+ if (!is_undefweak && resolved_to_const)
|
||||
{
|
||||
relocation += rel->r_addend;
|
||||
+ relocation -= pc;
|
||||
break;
|
||||
}
|
||||
else if (is_undefweak)
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-loongarch-elf/pcrel-const.d
|
||||
@@ -0,0 +1,14 @@
|
||||
+#as: -mla-global-with-pcrel
|
||||
+#objdump: -Drsz
|
||||
+
|
||||
+.*:[ ]+file format .*
|
||||
+
|
||||
+
|
||||
+Disassembly of section .text:
|
||||
+
|
||||
+.* <foo>:
|
||||
+#...
|
||||
+[ ]+8:[ ]+02c04084[ ]+addi.d[ ]+\$a0,[ ]+\$a0,[ ]+16\(0x10\)
|
||||
+#...
|
||||
+0+14 <__sec_end>:
|
||||
+#pass
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-loongarch-elf/pcrel-const.lds
|
||||
@@ -0,0 +1,14 @@
|
||||
+ENTRY(foo);
|
||||
+SECTIONS
|
||||
+{
|
||||
+ .text : {
|
||||
+ *(.text*)
|
||||
+ }
|
||||
+
|
||||
+ .data : {
|
||||
+ __sec_start = .;
|
||||
+ *(.gzdata)
|
||||
+ __sec_end = .;
|
||||
+ }
|
||||
+}
|
||||
+PROVIDE(__sec_size = __sec_end);
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-loongarch-elf/pcrel-const.s
|
||||
@@ -0,0 +1,12 @@
|
||||
+ .text
|
||||
+ .align 2
|
||||
+ .globl foo
|
||||
+ .type foo, @function
|
||||
+foo:
|
||||
+ nop
|
||||
+ la.global $r4,__sec_size
|
||||
+ ldptr.w $r4,$r4,0
|
||||
+ jr $r1
|
||||
+ .size foo, .-foo
|
||||
+ .data
|
||||
+ .word 1
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-loongarch-elf/pr.exp
|
||||
@@ -0,0 +1,39 @@
|
||||
+# Expect script for LoongArch ELF linker tests
|
||||
+# Copyright (C) 2022 Free Software Foundation, Inc.
|
||||
+#
|
||||
+# This file is part of the GNU Binutils.
|
||||
+#
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program 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 General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program; if not, write to the Free Software
|
||||
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
+# MA 02110-1301, USA.
|
||||
+#
|
||||
+
|
||||
+if ![istarget loongarch64-*-*] {
|
||||
+ return
|
||||
+}
|
||||
+
|
||||
+set link_tests [list \
|
||||
+ [list \
|
||||
+ "pcrel const" \
|
||||
+ "-T pcrel-const.lds" "" \
|
||||
+ "-mla-global-with-pcrel" \
|
||||
+ { pcrel-const.s } \
|
||||
+ [list \
|
||||
+ [list objdump -D pcrel-const.d] \
|
||||
+ ] \
|
||||
+ "pcrel-const" \
|
||||
+ ] \
|
||||
+]
|
||||
+
|
||||
+run_ld_link_tests $link_tests
|
||||
@@ -0,0 +1,27 @@
|
||||
From 4233be14a34d754a70b8b6f6fa42d21f35c6e030 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Sat, 10 Sep 2022 07:30:57 +0930
|
||||
Subject: [PATCH 043/160] Re: PR29466, APP/NO_APP with linefile
|
||||
|
||||
It looks like I copied the SIZE init across from
|
||||
binutils/testsuite/config/default.exp without some necessary editing.
|
||||
|
||||
PR 29466
|
||||
* testsuite/config/default.exp (SIZE): Adjust relative path.
|
||||
|
||||
(cherry picked from commit 1180f540d5f2f7751b5309bdd6c38d69fcf699e7)
|
||||
---
|
||||
gas/testsuite/config/default.exp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/gas/testsuite/config/default.exp
|
||||
+++ b/gas/testsuite/config/default.exp
|
||||
@@ -53,7 +53,7 @@ if ![info exists NMFLAGS] then {
|
||||
}
|
||||
|
||||
if ![info exists SIZE] then {
|
||||
- set SIZE [findfile $base_dir/size]
|
||||
+ set SIZE [findfile $base_dir/../../binutils/size]
|
||||
}
|
||||
|
||||
if ![info exists SIZEFLAGS] then {
|
||||
@@ -0,0 +1,38 @@
|
||||
From 4d7bba23a39fba18d6d13a2941a3c232011a7064 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Fri, 16 Sep 2022 18:08:44 +0930
|
||||
Subject: [PATCH 050/160] PowerPC64 pcrel got relocs against local symbols
|
||||
|
||||
Not that anyone would want to indirect via the GOT when an address can
|
||||
be loaded directly with pla, the following:
|
||||
|
||||
pld 3,x@got@pcrel
|
||||
x:
|
||||
|
||||
leads to "Internal error in md_apply_fix", because the generic parts
|
||||
of assembler fixup handling convert the fx_pcrel fixup to one without
|
||||
a symbol. Stop that happening.
|
||||
|
||||
* config/tc-ppc.c (ppc_force_relocation): Add PLT_PCREL34 and
|
||||
assorted GOT_PCREL34 relocs.
|
||||
|
||||
(cherry picked from commit 49c3ed081fed6b8e2b48fdc48f805f11e4589514)
|
||||
---
|
||||
gas/config/tc-ppc.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
--- a/gas/config/tc-ppc.c
|
||||
+++ b/gas/config/tc-ppc.c
|
||||
@@ -6676,6 +6676,12 @@ ppc_force_relocation (fixS *fix)
|
||||
case BFD_RELOC_PPC_BA16_BRNTAKEN:
|
||||
case BFD_RELOC_24_PLT_PCREL:
|
||||
case BFD_RELOC_PPC64_TOC:
|
||||
+ case BFD_RELOC_PPC64_PLT_PCREL34:
|
||||
+ case BFD_RELOC_PPC64_GOT_PCREL34:
|
||||
+ case BFD_RELOC_PPC64_GOT_TLSGD_PCREL34:
|
||||
+ case BFD_RELOC_PPC64_GOT_TLSLD_PCREL34:
|
||||
+ case BFD_RELOC_PPC64_GOT_TPREL_PCREL34:
|
||||
+ case BFD_RELOC_PPC64_GOT_DTPREL_PCREL34:
|
||||
return 1;
|
||||
case BFD_RELOC_PPC_B26:
|
||||
case BFD_RELOC_PPC_BA26:
|
||||
@@ -0,0 +1,94 @@
|
||||
From 010db38b54b589ca3e95b498aba2831064970171 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Wed, 21 Sep 2022 09:06:29 +0930
|
||||
Subject: [PATCH 055/160] Re: PowerPC64 pcrel got relocs against local symbols
|
||||
|
||||
The last patch wasn't all that shiny. There are rather a lot more
|
||||
relocations that can hit the assertion in md_apply_fix if the symbol
|
||||
is local or absolute. Fix them all.
|
||||
|
||||
* config/tc-ppc.c (ppc_force_relocation): Add all relocs that
|
||||
expect a symbol in md_apply_fix. Remove tls pcrel relocs
|
||||
already covered in general tls match range.
|
||||
|
||||
(cherry picked from commit 8b168f1a1e09e337d2a970f204a0230c091bbe58)
|
||||
---
|
||||
gas/config/tc-ppc.c | 58 ++++++++++++++++++++++++++++++++++++++++-----
|
||||
1 file changed, 52 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/gas/config/tc-ppc.c
|
||||
+++ b/gas/config/tc-ppc.c
|
||||
@@ -6666,8 +6666,6 @@ ppc_force_relocation (fixS *fix)
|
||||
int
|
||||
ppc_force_relocation (fixS *fix)
|
||||
{
|
||||
- /* Branch prediction relocations must force a relocation, as must
|
||||
- the vtable description relocs. */
|
||||
switch (fix->fx_r_type)
|
||||
{
|
||||
case BFD_RELOC_PPC_B16_BRTAKEN:
|
||||
@@ -6676,12 +6674,60 @@ ppc_force_relocation (fixS *fix)
|
||||
case BFD_RELOC_PPC_BA16_BRNTAKEN:
|
||||
case BFD_RELOC_24_PLT_PCREL:
|
||||
case BFD_RELOC_PPC64_TOC:
|
||||
+ case BFD_RELOC_16_GOTOFF:
|
||||
+ case BFD_RELOC_LO16_GOTOFF:
|
||||
+ case BFD_RELOC_HI16_GOTOFF:
|
||||
+ case BFD_RELOC_HI16_S_GOTOFF:
|
||||
+ case BFD_RELOC_LO16_PLTOFF:
|
||||
+ case BFD_RELOC_HI16_PLTOFF:
|
||||
+ case BFD_RELOC_HI16_S_PLTOFF:
|
||||
+ case BFD_RELOC_GPREL16:
|
||||
+ case BFD_RELOC_16_BASEREL:
|
||||
+ case BFD_RELOC_LO16_BASEREL:
|
||||
+ case BFD_RELOC_HI16_BASEREL:
|
||||
+ case BFD_RELOC_HI16_S_BASEREL:
|
||||
+ case BFD_RELOC_PPC_TOC16:
|
||||
+ case BFD_RELOC_PPC64_TOC16_LO:
|
||||
+ case BFD_RELOC_PPC64_TOC16_HI:
|
||||
+ case BFD_RELOC_PPC64_TOC16_HA:
|
||||
+ case BFD_RELOC_PPC64_PLTGOT16:
|
||||
+ case BFD_RELOC_PPC64_PLTGOT16_LO:
|
||||
+ case BFD_RELOC_PPC64_PLTGOT16_HI:
|
||||
+ case BFD_RELOC_PPC64_PLTGOT16_HA:
|
||||
+ case BFD_RELOC_PPC64_GOT16_DS:
|
||||
+ case BFD_RELOC_PPC64_GOT16_LO_DS:
|
||||
+ case BFD_RELOC_PPC64_PLT16_LO_DS:
|
||||
+ case BFD_RELOC_PPC64_SECTOFF_DS:
|
||||
+ case BFD_RELOC_PPC64_SECTOFF_LO_DS:
|
||||
+ case BFD_RELOC_PPC64_TOC16_DS:
|
||||
+ case BFD_RELOC_PPC64_TOC16_LO_DS:
|
||||
+ case BFD_RELOC_PPC64_PLTGOT16_DS:
|
||||
+ case BFD_RELOC_PPC64_PLTGOT16_LO_DS:
|
||||
+ case BFD_RELOC_PPC_EMB_NADDR16:
|
||||
+ case BFD_RELOC_PPC_EMB_NADDR16_LO:
|
||||
+ case BFD_RELOC_PPC_EMB_NADDR16_HI:
|
||||
+ case BFD_RELOC_PPC_EMB_NADDR16_HA:
|
||||
+ case BFD_RELOC_PPC_EMB_SDAI16:
|
||||
+ case BFD_RELOC_PPC_EMB_SDA2I16:
|
||||
+ case BFD_RELOC_PPC_EMB_SDA2REL:
|
||||
+ case BFD_RELOC_PPC_EMB_SDA21:
|
||||
+ case BFD_RELOC_PPC_EMB_MRKREF:
|
||||
+ case BFD_RELOC_PPC_EMB_RELSEC16:
|
||||
+ case BFD_RELOC_PPC_EMB_RELST_LO:
|
||||
+ case BFD_RELOC_PPC_EMB_RELST_HI:
|
||||
+ case BFD_RELOC_PPC_EMB_RELST_HA:
|
||||
+ case BFD_RELOC_PPC_EMB_BIT_FLD:
|
||||
+ case BFD_RELOC_PPC_EMB_RELSDA:
|
||||
+ case BFD_RELOC_PPC_VLE_SDA21:
|
||||
+ case BFD_RELOC_PPC_VLE_SDA21_LO:
|
||||
+ case BFD_RELOC_PPC_VLE_SDAREL_LO16A:
|
||||
+ case BFD_RELOC_PPC_VLE_SDAREL_LO16D:
|
||||
+ case BFD_RELOC_PPC_VLE_SDAREL_HI16A:
|
||||
+ case BFD_RELOC_PPC_VLE_SDAREL_HI16D:
|
||||
+ case BFD_RELOC_PPC_VLE_SDAREL_HA16A:
|
||||
+ case BFD_RELOC_PPC_VLE_SDAREL_HA16D:
|
||||
case BFD_RELOC_PPC64_PLT_PCREL34:
|
||||
case BFD_RELOC_PPC64_GOT_PCREL34:
|
||||
- case BFD_RELOC_PPC64_GOT_TLSGD_PCREL34:
|
||||
- case BFD_RELOC_PPC64_GOT_TLSLD_PCREL34:
|
||||
- case BFD_RELOC_PPC64_GOT_TPREL_PCREL34:
|
||||
- case BFD_RELOC_PPC64_GOT_DTPREL_PCREL34:
|
||||
return 1;
|
||||
case BFD_RELOC_PPC_B26:
|
||||
case BFD_RELOC_PPC_BA26:
|
||||
@@ -0,0 +1,89 @@
|
||||
From a98316d5cf970cbc99689797d84c2ea832bcdcbb Mon Sep 17 00:00:00 2001
|
||||
From: "H.J. Lu" <hjl.tools@gmail.com>
|
||||
Date: Mon, 1 Aug 2022 16:02:39 -0700
|
||||
Subject: [PATCH 058/160] elf: Reset alignment for each PT_LOAD segment
|
||||
|
||||
Reset alignment for each PT_LOAD segment to avoid using alignment from
|
||||
the previous PT_LOAD segment.
|
||||
|
||||
bfd/
|
||||
|
||||
PR ld/29435
|
||||
* elf.c (assign_file_positions_for_load_sections): Reset
|
||||
alignment for each PT_LOAD segment.
|
||||
|
||||
ld/
|
||||
|
||||
PR ld/29435
|
||||
* testsuite/ld-elf/pr29435.d: New file.
|
||||
* testsuite/ld-elf/pr29435.s: Likewise.
|
||||
|
||||
(cherry picked from commit 59f214544c50ec7ebbca285ff2b4949f48671690)
|
||||
---
|
||||
bfd/elf.c | 7 ++++---
|
||||
ld/testsuite/ld-elf/pr29435.d | 11 +++++++++++
|
||||
ld/testsuite/ld-elf/pr29435.s | 6 ++++++
|
||||
3 files changed, 21 insertions(+), 3 deletions(-)
|
||||
create mode 100644 ld/testsuite/ld-elf/pr29435.d
|
||||
create mode 100644 ld/testsuite/ld-elf/pr29435.s
|
||||
|
||||
--- a/bfd/elf.c
|
||||
+++ b/bfd/elf.c
|
||||
@@ -5438,8 +5438,6 @@ assign_file_positions_for_load_sections
|
||||
Elf_Internal_Phdr *p;
|
||||
file_ptr off; /* Octets. */
|
||||
bfd_size_type maxpagesize;
|
||||
- bfd_size_type p_align;
|
||||
- bool p_align_p = false;
|
||||
unsigned int alloc, actual;
|
||||
unsigned int i, j;
|
||||
struct elf_segment_map **sorted_seg_map;
|
||||
@@ -5524,7 +5522,6 @@ assign_file_positions_for_load_sections
|
||||
qsort (sorted_seg_map, alloc, sizeof (*sorted_seg_map),
|
||||
elf_sort_segments);
|
||||
|
||||
- p_align = bed->p_align;
|
||||
maxpagesize = 1;
|
||||
if ((abfd->flags & D_PAGED) != 0)
|
||||
{
|
||||
@@ -5559,6 +5556,8 @@ assign_file_positions_for_load_sections
|
||||
asection **secpp;
|
||||
bfd_vma off_adjust; /* Octets. */
|
||||
bool no_contents;
|
||||
+ bfd_size_type p_align;
|
||||
+ bool p_align_p;
|
||||
|
||||
/* An ELF segment (described by Elf_Internal_Phdr) may contain a
|
||||
number of sections with contents contributing to both p_filesz
|
||||
@@ -5569,6 +5568,8 @@ assign_file_positions_for_load_sections
|
||||
p = phdrs + m->idx;
|
||||
p->p_type = m->p_type;
|
||||
p->p_flags = m->p_flags;
|
||||
+ p_align = bed->p_align;
|
||||
+ p_align_p = false;
|
||||
|
||||
if (m->count == 0)
|
||||
p->p_vaddr = m->p_vaddr_offset * opb;
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-elf/pr29435.d
|
||||
@@ -0,0 +1,11 @@
|
||||
+#ld: -shared -z separate-code -z relro
|
||||
+#xfail: ![check_shared_lib_support]
|
||||
+#xfail: ![check_relro_support]
|
||||
+#readelf: -Wl
|
||||
+
|
||||
+#failif
|
||||
+#...
|
||||
+ +LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ .* 0x8000
|
||||
+#...
|
||||
+ +LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ .* 0x8000
|
||||
+#...
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-elf/pr29435.s
|
||||
@@ -0,0 +1,6 @@
|
||||
+ .text
|
||||
+ .balign 0x8000
|
||||
+ .globl foo
|
||||
+ .type foo, %function
|
||||
+foo:
|
||||
+ .byte 0
|
||||
@@ -0,0 +1,29 @@
|
||||
From 041c22e35de06d22566f4c71e4425c3351215e66 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Sun, 25 Sep 2022 12:07:36 +0930
|
||||
Subject: [PATCH 063/160] PR29542, PowerPC gold internal error in
|
||||
get_output_view,
|
||||
|
||||
We were attempting to set a BSS style section contents.
|
||||
|
||||
PR 29542
|
||||
* powerpc.cc (Output_data_plt_powerpc::do_write): Don't set .plt,
|
||||
.iplt or .lplt section contents when position independent.
|
||||
|
||||
(cherry picked from commit c21736aed1d4877e090df60362413669dbdc391d)
|
||||
---
|
||||
gold/powerpc.cc | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/gold/powerpc.cc
|
||||
+++ b/gold/powerpc.cc
|
||||
@@ -4338,7 +4338,8 @@ template<int size, bool big_endian>
|
||||
void
|
||||
Output_data_plt_powerpc<size, big_endian>::do_write(Output_file* of)
|
||||
{
|
||||
- if (!this->sym_ents_.empty())
|
||||
+ if (!this->sym_ents_.empty()
|
||||
+ && !parameters->options().output_is_position_independent())
|
||||
{
|
||||
const section_size_type offset = this->offset();
|
||||
const section_size_type oview_size
|
||||
@@ -0,0 +1,301 @@
|
||||
From 88ac930a725b8aac8284a2738f03b843f4343dd0 Mon Sep 17 00:00:00 2001
|
||||
From: Victor Do Nascimento <Victor.DoNascimento@arm.com>
|
||||
Date: Thu, 17 Nov 2022 14:48:37 +0000
|
||||
Subject: [PATCH 116/160] arm: Use DWARF numbering convention for
|
||||
pseudo-register representation
|
||||
|
||||
The patch, initially submitted to trunk in
|
||||
https://sourceware.org/pipermail/binutils/2022-July/122092.html ensures correct
|
||||
support for handling .save directives for mixed-register type lists involving
|
||||
the ra_auth_code pseudo-register, whereby the support first introduced in 2.39
|
||||
(https://sourceware.org/pipermail/binutils/2022-May/120672.html) led to the
|
||||
generation of unwinder code popping registers in reversed order.
|
||||
|
||||
gas/Changelog:
|
||||
|
||||
* config/tc-arm.c (REG_RA_AUTH_CODE): New.
|
||||
(parse_dot_save): Likewise.
|
||||
(parse_reg_list): Remove obsolete code.
|
||||
(reg_names): Set ra_auth_code to 143.
|
||||
(s_arm_unwind_save): Handle core and pseudo-register lists via
|
||||
parse_dot_save.
|
||||
(s_arm_unwind_save_mixed): Deleted.
|
||||
(s_arm_unwind_save_pseudo): Handle one register at a time.
|
||||
* testsuite/gas/arm/unwind-pacbti-m-readelf.d: Fix test.
|
||||
* testsuite/gas/arm/unwind-pacbti-m.d: Likewise.
|
||||
|
||||
(cherry picked from commit 3a368c4c248f6e9f4bda3a5369befa17a4560293)
|
||||
---
|
||||
gas/config/tc-arm.c | 159 ++++++++++--------
|
||||
.../gas/arm/unwind-pacbti-m-readelf.d | 4 +-
|
||||
gas/testsuite/gas/arm/unwind-pacbti-m.d | 2 +-
|
||||
3 files changed, 95 insertions(+), 70 deletions(-)
|
||||
|
||||
--- a/gas/config/tc-arm.c
|
||||
+++ b/gas/config/tc-arm.c
|
||||
@@ -742,6 +742,7 @@ const char * const reg_expected_msgs[] =
|
||||
#define REG_SP 13
|
||||
#define REG_LR 14
|
||||
#define REG_PC 15
|
||||
+#define REG_RA_AUTH_CODE 143
|
||||
|
||||
/* ARM instructions take 4bytes in the object file, Thumb instructions
|
||||
take 2: */
|
||||
@@ -1943,21 +1944,6 @@ parse_reg_list (char ** strp, enum reg_l
|
||||
|
||||
reg = arm_reg_parse (&str, rt);
|
||||
|
||||
- /* Skip over allowed registers of alternative types in mixed-type
|
||||
- register lists. */
|
||||
- if (reg == FAIL && rt == REG_TYPE_PSEUDO
|
||||
- && ((reg = arm_reg_parse (&str, REG_TYPE_RN)) != FAIL))
|
||||
- {
|
||||
- cur_reg = reg;
|
||||
- continue;
|
||||
- }
|
||||
- else if (reg == FAIL && rt == REG_TYPE_RN
|
||||
- && ((reg = arm_reg_parse (&str, REG_TYPE_PSEUDO)) != FAIL))
|
||||
- {
|
||||
- cur_reg = reg;
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
if (etype == REGLIST_CLRM)
|
||||
{
|
||||
if (reg == REG_SP || reg == REG_PC)
|
||||
@@ -4139,7 +4125,6 @@ s_arm_unwind_fnstart (int ignored ATTRIB
|
||||
unwind.sp_restored = 0;
|
||||
}
|
||||
|
||||
-
|
||||
/* Parse a handlerdata directive. Creates the exception handling table entry
|
||||
for the function. */
|
||||
|
||||
@@ -4297,15 +4282,19 @@ s_arm_unwind_personality (int ignored AT
|
||||
/* Parse a directive saving pseudo registers. */
|
||||
|
||||
static void
|
||||
-s_arm_unwind_save_pseudo (long range)
|
||||
+s_arm_unwind_save_pseudo (int regno)
|
||||
{
|
||||
valueT op;
|
||||
|
||||
- if (range & (1 << 12))
|
||||
+ switch (regno)
|
||||
{
|
||||
+ case REG_RA_AUTH_CODE:
|
||||
/* Opcode for restoring RA_AUTH_CODE. */
|
||||
op = 0xb4;
|
||||
add_unwind_opcode (op, 1);
|
||||
+ break;
|
||||
+ default:
|
||||
+ as_bad (_("Unknown register %d encountered\n"), regno);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4375,6 +4364,80 @@ s_arm_unwind_save_core (long range)
|
||||
}
|
||||
}
|
||||
|
||||
+/* Implement correct handling of .save lists enabling the split into
|
||||
+sublists where necessary, while preserving correct sublist ordering. */
|
||||
+
|
||||
+static void
|
||||
+parse_dot_save (char **str_p, int prev_reg)
|
||||
+{
|
||||
+ long core_regs = 0;
|
||||
+ int reg;
|
||||
+ int in_range = 0;
|
||||
+
|
||||
+ if (**str_p == ',')
|
||||
+ *str_p += 1;
|
||||
+ if (**str_p == '}')
|
||||
+ {
|
||||
+ *str_p += 1;
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ while ((reg = arm_reg_parse (str_p, REG_TYPE_RN)) != FAIL)
|
||||
+ {
|
||||
+ if (!in_range)
|
||||
+ {
|
||||
+ if (core_regs & (1 << reg))
|
||||
+ as_tsktsk (_("Warning: duplicated register (r%d) in register list"),
|
||||
+ reg);
|
||||
+ else if (reg <= prev_reg)
|
||||
+ as_tsktsk (_("Warning: register list not in ascending order"));
|
||||
+
|
||||
+ core_regs |= (1 << reg);
|
||||
+ prev_reg = reg;
|
||||
+ if (skip_past_char(str_p, '-') != FAIL)
|
||||
+ in_range = 1;
|
||||
+ else if (skip_past_comma(str_p) == FAIL)
|
||||
+ first_error (_("bad register list"));
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ int i;
|
||||
+ if (reg <= prev_reg)
|
||||
+ first_error (_("bad range in register list"));
|
||||
+ for (i = prev_reg + 1; i <= reg; i++)
|
||||
+ {
|
||||
+ if (core_regs & (1 << i))
|
||||
+ as_tsktsk (_("Warning: duplicated register (r%d) in register list"),
|
||||
+ i);
|
||||
+ else
|
||||
+ core_regs |= 1 << i;
|
||||
+ }
|
||||
+ in_range = 0;
|
||||
+ }
|
||||
+ }
|
||||
+ if (core_regs)
|
||||
+ {
|
||||
+ /* Higher register numbers go in higher memory addresses. When splitting a list,
|
||||
+ right-most sublist should therefore be .saved first. Use recursion for this. */
|
||||
+ parse_dot_save (str_p, reg);
|
||||
+ /* We're back from recursion, so emit .save insn for sublist. */
|
||||
+ s_arm_unwind_save_core (core_regs);
|
||||
+ return;
|
||||
+ }
|
||||
+ /* Handle pseudo-regs, under assumption these are emitted singly. */
|
||||
+ else if ((reg = arm_reg_parse (str_p, REG_TYPE_PSEUDO)) != FAIL)
|
||||
+ {
|
||||
+ /* Recurse for remainder of input. Note: No assumption is made regarding which
|
||||
+ register in core register set holds pseudo-register. It's not considered in
|
||||
+ ordering check beyond ensuring it's not sandwiched between 2 consecutive
|
||||
+ registers. */
|
||||
+ parse_dot_save (str_p, prev_reg + 1);
|
||||
+ s_arm_unwind_save_pseudo (reg);
|
||||
+ return;
|
||||
+ }
|
||||
+ else
|
||||
+ as_bad (BAD_SYNTAX);
|
||||
+}
|
||||
|
||||
/* Parse a directive saving FPA registers. */
|
||||
|
||||
@@ -4716,39 +4779,13 @@ s_arm_unwind_save_mmxwcg (void)
|
||||
ignore_rest_of_line ();
|
||||
}
|
||||
|
||||
-/* Convert range and mask_range into a sequence of s_arm_unwind_core
|
||||
- and s_arm_unwind_pseudo operations. We assume that mask_range will
|
||||
- not have consecutive bits set, or that one operation per bit is
|
||||
- acceptable. */
|
||||
-
|
||||
-static void
|
||||
-s_arm_unwind_save_mixed (long range, long mask_range)
|
||||
-{
|
||||
- while (mask_range)
|
||||
- {
|
||||
- long mask_bit = mask_range & -mask_range;
|
||||
- long subrange = range & (mask_bit - 1);
|
||||
-
|
||||
- if (subrange)
|
||||
- s_arm_unwind_save_core (subrange);
|
||||
-
|
||||
- s_arm_unwind_save_pseudo (mask_bit);
|
||||
- range &= ~subrange;
|
||||
- mask_range &= ~mask_bit;
|
||||
- }
|
||||
-
|
||||
- if (range)
|
||||
- s_arm_unwind_save_core (range);
|
||||
-}
|
||||
-
|
||||
/* Parse an unwind_save directive.
|
||||
If the argument is non-zero, this is a .vsave directive. */
|
||||
|
||||
static void
|
||||
s_arm_unwind_save (int arch_v6)
|
||||
{
|
||||
- char *peek, *mask_peek;
|
||||
- long range, mask_range;
|
||||
+ char *peek;
|
||||
struct reg_entry *reg;
|
||||
bool had_brace = false;
|
||||
|
||||
@@ -4756,7 +4793,7 @@ s_arm_unwind_save (int arch_v6)
|
||||
as_bad (MISSING_FNSTART);
|
||||
|
||||
/* Figure out what sort of save we have. */
|
||||
- peek = mask_peek = input_line_pointer;
|
||||
+ peek = input_line_pointer;
|
||||
|
||||
if (*peek == '{')
|
||||
{
|
||||
@@ -4788,20 +4825,13 @@ s_arm_unwind_save (int arch_v6)
|
||||
|
||||
case REG_TYPE_PSEUDO:
|
||||
case REG_TYPE_RN:
|
||||
- mask_range = parse_reg_list (&mask_peek, REGLIST_PSEUDO);
|
||||
- range = parse_reg_list (&input_line_pointer, REGLIST_RN);
|
||||
-
|
||||
- if (range == FAIL || mask_range == FAIL)
|
||||
- {
|
||||
- as_bad (_("expected register list"));
|
||||
- ignore_rest_of_line ();
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- demand_empty_rest_of_line ();
|
||||
-
|
||||
- s_arm_unwind_save_mixed (range, mask_range);
|
||||
- return;
|
||||
+ {
|
||||
+ if (had_brace)
|
||||
+ input_line_pointer++;
|
||||
+ parse_dot_save (&input_line_pointer, -1);
|
||||
+ demand_empty_rest_of_line ();
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
case REG_TYPE_VFD:
|
||||
if (arch_v6)
|
||||
@@ -23993,12 +24023,8 @@ static const struct reg_entry reg_names[
|
||||
/* XScale accumulator registers. */
|
||||
REGNUM(acc,0,XSCALE), REGNUM(ACC,0,XSCALE),
|
||||
|
||||
- /* DWARF ABI defines RA_AUTH_CODE to 143. It also reserves 134-142 for future
|
||||
- expansion. RA_AUTH_CODE here is given the value 143 % 134 to make it easy
|
||||
- for tc_arm_regname_to_dw2regnum to translate to DWARF reg number using
|
||||
- 134 + reg_number should the range 134 to 142 be used for more pseudo regs
|
||||
- in the future. This also helps fit RA_AUTH_CODE into a bitmask. */
|
||||
- REGDEF(ra_auth_code,12,PSEUDO),
|
||||
+ /* AADWARF32 defines RA_AUTH_CODE to 143. */
|
||||
+ REGDEF(ra_auth_code,143,PSEUDO),
|
||||
};
|
||||
#undef REGDEF
|
||||
#undef REGNUM
|
||||
@@ -27905,7 +27931,6 @@ create_unwind_entry (int have_data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-
|
||||
/* Initialize the DWARF-2 unwind information for this procedure. */
|
||||
|
||||
void
|
||||
--- a/gas/testsuite/gas/arm/unwind-pacbti-m-readelf.d
|
||||
+++ b/gas/testsuite/gas/arm/unwind-pacbti-m-readelf.d
|
||||
@@ -10,11 +10,11 @@ Unwind section '.ARM.exidx' at offset 0x
|
||||
|
||||
0x0 <foo>: @0x0
|
||||
Compact model index: 1
|
||||
- 0x84 0x00 pop {r14}
|
||||
0xb4 pop {ra_auth_code}
|
||||
0x84 0x00 pop {r14}
|
||||
- 0xb4 pop {ra_auth_code}
|
||||
0xa3 pop {r4, r5, r6, r7}
|
||||
0xb4 pop {ra_auth_code}
|
||||
+ 0x84 0x00 pop {r14}
|
||||
+ 0xb4 pop {ra_auth_code}
|
||||
0xa8 pop {r4, r14}
|
||||
0xb0 finish
|
||||
--- a/gas/testsuite/gas/arm/unwind-pacbti-m.d
|
||||
+++ b/gas/testsuite/gas/arm/unwind-pacbti-m.d
|
||||
@@ -8,4 +8,4 @@
|
||||
.*: file format.*
|
||||
|
||||
Contents of section .ARM.extab:
|
||||
- 0000 (00840281 b40084b4 b0a8b4a3|81028400 b48400b4 a3b4a8b0) 00000000 .*
|
||||
+ 0000 (84b40281 84b4a300 b0a8b400|8102b484 00a3b484 00b4a8b0) 00000000 .*
|
||||
@@ -0,0 +1,22 @@
|
||||
--- a/ld/Makefile.am
|
||||
+++ b/ld/Makefile.am
|
||||
@@ -50,7 +50,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.
|
||||
-scriptdir = $(tooldir)/lib
|
||||
+scriptdir = $(libdir)
|
||||
|
||||
EMUL = @EMUL@
|
||||
EMULATION_OFILES = @EMULATION_OFILES@
|
||||
--- a/ld/Makefile.in
|
||||
+++ b/ld/Makefile.in
|
||||
@@ -569,7 +569,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.
|
||||
-scriptdir = $(tooldir)/lib
|
||||
+scriptdir = $(libdir)
|
||||
BASEDIR = $(srcdir)/..
|
||||
BFDDIR = $(BASEDIR)/bfd
|
||||
INCDIR = $(BASEDIR)/include
|
||||
@@ -0,0 +1,18 @@
|
||||
--- a/bfd/elfxx-mips.c
|
||||
+++ b/bfd/elfxx-mips.c
|
||||
@@ -8066,6 +8066,7 @@ _bfd_mips_elf_create_dynamic_sections (b
|
||||
|
||||
name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING";
|
||||
bh = NULL;
|
||||
+ if (0) {
|
||||
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)))
|
||||
@@ -8078,6 +8079,7 @@ _bfd_mips_elf_create_dynamic_sections (b
|
||||
|
||||
if (! bfd_elf_link_record_dynamic_symbol (info, h))
|
||||
return false;
|
||||
+ }
|
||||
|
||||
if (! mips_elf_hash_table (info)->use_rld_obj_head)
|
||||
{
|
||||
@@ -0,0 +1,38 @@
|
||||
--- a/bfd/config.bfd
|
||||
+++ b/bfd/config.bfd
|
||||
@@ -928,12 +928,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*)
|
||||
- targ_defvec=mips_elf32_ntrad_le_vec
|
||||
- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec"
|
||||
+ targ_defvec=mips_elf64_trad_le_vec
|
||||
+ targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec"
|
||||
;;
|
||||
mips64*-*-linux*)
|
||||
- targ_defvec=mips_elf32_ntrad_be_vec
|
||||
- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
|
||||
+ targ_defvec=mips_elf64_trad_be_vec
|
||||
+ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec"
|
||||
;;
|
||||
mips*el-*-linux*)
|
||||
targ_defvec=mips_elf32_trad_le_vec
|
||||
--- a/ld/configure.tgt
|
||||
+++ b/ld/configure.tgt
|
||||
@@ -580,12 +580,12 @@ mips*-*-vxworks*) targ_emul=elf32ebmipvx
|
||||
;;
|
||||
mips*-*-windiss) targ_emul=elf32mipswindiss
|
||||
;;
|
||||
-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
|
||||
- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
|
||||
+mips64*el-*-linux-*) targ_emul=elf64ltsmip
|
||||
+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
-mips64*-*-linux-*) targ_emul=elf32btsmipn32
|
||||
- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
|
||||
+mips64*-*-linux-*) targ_emul=elf64btsmip
|
||||
+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
mips*el-*-linux-*) targ_emul=elf32ltsmip
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,218 @@
|
||||
From 3c6c32951e292a51ede70b8087bb0308d7dbc4fc Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Thu, 28 Mar 2024 20:33:32 +1030
|
||||
Subject: [PATCH 2/2] PR 30569, delete _bfd_mips_elf_early_size_sections
|
||||
|
||||
PR30569 was triggered by a patch of mine 6540edd52cc0 moving the call
|
||||
to always_size_sections in bfd_elf_size_dynamic_sections earlier, made
|
||||
to support the x86 DT_RELR implementation. This broke mips16 code
|
||||
handling stubs when --export-dynamic is passed to the linker, because
|
||||
numerous symbols then became dynamic after always_size_sections. The
|
||||
mips backend fiddles with symbols in its always_size_sections. Maciej
|
||||
in 902e9fc76a0e had moved the call to always_size_sections to after
|
||||
the export-dynamic code. Prior to that, Nathan in 04c3a75556c0 moved
|
||||
it before the exec stack code, back to the start of
|
||||
bfd_elf_size_dynamic_sections which was where Ian put it originally
|
||||
in ff12f303355b. So the call has moved around a little. I'm leaving
|
||||
it where it is, and instead calling mips_elf_check_symbols from
|
||||
late_size_sections (the old size_dynamic_sections) which is now always
|
||||
called. In fact, the whole of _bfd_mips_elf_early_size_sections can
|
||||
be merged into _bfd_mips_elf_late_size_sections.
|
||||
---
|
||||
bfd/elf32-mips.c | 1 -
|
||||
bfd/elf64-mips.c | 2 --
|
||||
bfd/elfn32-mips.c | 1 -
|
||||
bfd/elfxx-mips.c | 84 +++++++++++++++++++----------------------------
|
||||
bfd/elfxx-mips.h | 2 --
|
||||
5 files changed, 34 insertions(+), 56 deletions(-)
|
||||
|
||||
--- a/bfd/elf32-mips.c
|
||||
+++ b/bfd/elf32-mips.c
|
||||
@@ -2534,7 +2534,6 @@ static const struct ecoff_debug_swap mip
|
||||
#define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag
|
||||
#define elf_backend_adjust_dynamic_symbol \
|
||||
_bfd_mips_elf_adjust_dynamic_symbol
|
||||
-#define elf_backend_early_size_sections _bfd_mips_elf_early_size_sections
|
||||
#define elf_backend_late_size_sections _bfd_mips_elf_late_size_sections
|
||||
#define elf_backend_init_index_section _bfd_elf_init_1_index_section
|
||||
#define elf_backend_relocate_section _bfd_mips_elf_relocate_section
|
||||
--- a/bfd/elf64-mips.c
|
||||
+++ b/bfd/elf64-mips.c
|
||||
@@ -4745,8 +4745,6 @@ const struct elf_size_info mips_elf64_si
|
||||
#define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag
|
||||
#define elf_backend_adjust_dynamic_symbol \
|
||||
_bfd_mips_elf_adjust_dynamic_symbol
|
||||
-#define elf_backend_early_size_sections \
|
||||
- _bfd_mips_elf_early_size_sections
|
||||
#define elf_backend_late_size_sections \
|
||||
_bfd_mips_elf_late_size_sections
|
||||
#define elf_backend_init_index_section _bfd_elf_init_1_index_section
|
||||
--- a/bfd/elfn32-mips.c
|
||||
+++ b/bfd/elfn32-mips.c
|
||||
@@ -4131,7 +4131,6 @@ static const struct ecoff_debug_swap mip
|
||||
#define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag
|
||||
#define elf_backend_adjust_dynamic_symbol \
|
||||
_bfd_mips_elf_adjust_dynamic_symbol
|
||||
-#define elf_backend_early_size_sections _bfd_mips_elf_early_size_sections
|
||||
#define elf_backend_late_size_sections _bfd_mips_elf_late_size_sections
|
||||
#define elf_backend_init_index_section _bfd_elf_init_1_index_section
|
||||
#define elf_backend_relocate_section _bfd_mips_elf_relocate_section
|
||||
--- a/bfd/elfxx-mips.c
|
||||
+++ b/bfd/elfxx-mips.c
|
||||
@@ -9614,48 +9614,6 @@ _bfd_mips_elf_adjust_dynamic_symbol (str
|
||||
return _bfd_elf_adjust_dynamic_copy (info, h, s);
|
||||
}
|
||||
|
||||
-/* This function is called after all the input files have been read,
|
||||
- and the input sections have been assigned to output sections. We
|
||||
- check for any mips16 stub sections that we can discard. */
|
||||
-
|
||||
-bool
|
||||
-_bfd_mips_elf_early_size_sections (bfd *output_bfd,
|
||||
- struct bfd_link_info *info)
|
||||
-{
|
||||
- asection *sect;
|
||||
- struct mips_elf_link_hash_table *htab;
|
||||
- struct mips_htab_traverse_info hti;
|
||||
-
|
||||
- htab = mips_elf_hash_table (info);
|
||||
- BFD_ASSERT (htab != NULL);
|
||||
-
|
||||
- /* The .reginfo section has a fixed size. */
|
||||
- sect = bfd_get_section_by_name (output_bfd, ".reginfo");
|
||||
- if (sect != NULL)
|
||||
- {
|
||||
- bfd_set_section_size (sect, sizeof (Elf32_External_RegInfo));
|
||||
- sect->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
|
||||
- }
|
||||
-
|
||||
- /* The .MIPS.abiflags section has a fixed size. */
|
||||
- sect = bfd_get_section_by_name (output_bfd, ".MIPS.abiflags");
|
||||
- if (sect != NULL)
|
||||
- {
|
||||
- bfd_set_section_size (sect, sizeof (Elf_External_ABIFlags_v0));
|
||||
- sect->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
|
||||
- }
|
||||
-
|
||||
- hti.info = info;
|
||||
- hti.output_bfd = output_bfd;
|
||||
- hti.error = false;
|
||||
- mips_elf_link_hash_traverse (mips_elf_hash_table (info),
|
||||
- mips_elf_check_symbols, &hti);
|
||||
- if (hti.error)
|
||||
- return false;
|
||||
-
|
||||
- return true;
|
||||
-}
|
||||
-
|
||||
/* If the link uses a GOT, lay it out and work out its size. */
|
||||
|
||||
static bool
|
||||
@@ -9960,7 +9918,8 @@ mips_elf_set_plt_sym_value (struct mips_
|
||||
return true;
|
||||
}
|
||||
|
||||
-/* Set the sizes of the dynamic sections. */
|
||||
+/* Set the sizes of the dynamic sections, some mips non-dynamic sections,
|
||||
+ and check for any mips16 stub sections that we can discard. */
|
||||
|
||||
bool
|
||||
_bfd_mips_elf_late_size_sections (bfd *output_bfd,
|
||||
@@ -9970,14 +9929,39 @@ _bfd_mips_elf_late_size_sections (bfd *o
|
||||
asection *s, *sreldyn;
|
||||
bool reltext;
|
||||
struct mips_elf_link_hash_table *htab;
|
||||
+ struct mips_htab_traverse_info hti;
|
||||
|
||||
htab = mips_elf_hash_table (info);
|
||||
BFD_ASSERT (htab != NULL);
|
||||
- dynobj = elf_hash_table (info)->dynobj;
|
||||
+
|
||||
+ /* The .reginfo section has a fixed size. */
|
||||
+ s = bfd_get_section_by_name (output_bfd, ".reginfo");
|
||||
+ if (s != NULL)
|
||||
+ {
|
||||
+ bfd_set_section_size (s, sizeof (Elf32_External_RegInfo));
|
||||
+ s->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
|
||||
+ }
|
||||
+
|
||||
+ /* The .MIPS.abiflags section has a fixed size. */
|
||||
+ s = bfd_get_section_by_name (output_bfd, ".MIPS.abiflags");
|
||||
+ if (s != NULL)
|
||||
+ {
|
||||
+ bfd_set_section_size (s, sizeof (Elf_External_ABIFlags_v0));
|
||||
+ s->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
|
||||
+ }
|
||||
+
|
||||
+ hti.info = info;
|
||||
+ hti.output_bfd = output_bfd;
|
||||
+ hti.error = false;
|
||||
+ mips_elf_link_hash_traverse (htab, mips_elf_check_symbols, &hti);
|
||||
+ if (hti.error)
|
||||
+ return false;
|
||||
+
|
||||
+ dynobj = htab->root.dynobj;
|
||||
if (dynobj == NULL)
|
||||
return true;
|
||||
|
||||
- if (elf_hash_table (info)->dynamic_sections_created)
|
||||
+ if (htab->root.dynamic_sections_created)
|
||||
{
|
||||
/* Set the contents of the .interp section to the interpreter. */
|
||||
if (bfd_link_executable (info) && !info->nointerp)
|
||||
@@ -10117,7 +10101,7 @@ _bfd_mips_elf_late_size_sections (bfd *o
|
||||
}
|
||||
}
|
||||
else if (bfd_link_executable (info)
|
||||
- && ! mips_elf_hash_table (info)->use_rld_obj_head
|
||||
+ && !htab->use_rld_obj_head
|
||||
&& startswith (name, ".rld_map"))
|
||||
{
|
||||
/* We add a room for __rld_map. It will be filled in by the
|
||||
@@ -10126,7 +10110,7 @@ _bfd_mips_elf_late_size_sections (bfd *o
|
||||
}
|
||||
else if (SGI_COMPAT (output_bfd)
|
||||
&& startswith (name, ".compact_rel"))
|
||||
- s->size += mips_elf_hash_table (info)->compact_rel_size;
|
||||
+ s->size += htab->compact_rel_size;
|
||||
else if (s == htab->root.splt)
|
||||
{
|
||||
/* If the last PLT entry has a branch delay slot, allocate
|
||||
@@ -10166,7 +10150,7 @@ _bfd_mips_elf_late_size_sections (bfd *o
|
||||
}
|
||||
}
|
||||
|
||||
- if (elf_hash_table (info)->dynamic_sections_created)
|
||||
+ if (htab->root.dynamic_sections_created)
|
||||
{
|
||||
/* Add some entries to the .dynamic section. We fill in the
|
||||
values later, in _bfd_mips_elf_finish_dynamic_sections, but we
|
||||
@@ -14900,7 +14884,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str
|
||||
input_section->flags &= ~SEC_HAS_CONTENTS;
|
||||
}
|
||||
|
||||
- /* Size has been set in _bfd_mips_elf_early_size_sections. */
|
||||
+ /* Size has been set in _bfd_mips_elf_late_size_sections. */
|
||||
BFD_ASSERT(o->size == sizeof (Elf_External_ABIFlags_v0));
|
||||
|
||||
/* Skip this section later on (I don't think this currently
|
||||
@@ -14959,7 +14943,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str
|
||||
input_section->flags &= ~SEC_HAS_CONTENTS;
|
||||
}
|
||||
|
||||
- /* Size has been set in _bfd_mips_elf_early_size_sections. */
|
||||
+ /* Size has been set in _bfd_mips_elf_late_size_sections. */
|
||||
BFD_ASSERT(o->size == sizeof (Elf32_External_RegInfo));
|
||||
|
||||
/* Skip this section later on (I don't think this currently
|
||||
--- a/bfd/elfxx-mips.h
|
||||
+++ b/bfd/elfxx-mips.h
|
||||
@@ -61,8 +61,6 @@ extern bool _bfd_mips_elf_check_relocs
|
||||
(bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
|
||||
extern bool _bfd_mips_elf_adjust_dynamic_symbol
|
||||
(struct bfd_link_info *, struct elf_link_hash_entry *);
|
||||
-extern bool _bfd_mips_elf_early_size_sections
|
||||
- (bfd *, struct bfd_link_info *);
|
||||
extern bool _bfd_mips_elf_late_size_sections
|
||||
(bfd *, struct bfd_link_info *);
|
||||
extern int _bfd_mips_elf_relocate_section
|
||||
@@ -0,0 +1,70 @@
|
||||
From f7c5db99b76e8dde89335d794c82fcbfbf53c612 Mon Sep 17 00:00:00 2001
|
||||
From: Enze Li <enze.li@hotmail.com>
|
||||
Date: Sat, 14 Jan 2023 11:33:48 +0800
|
||||
Subject: [PATCH 05/50] libctf: update regexp to allow makeinfo to build
|
||||
document
|
||||
|
||||
While trying to build gdb on latest openSUSE Tumbleweed, I noticed the
|
||||
following warning,
|
||||
|
||||
checking for makeinfo... makeinfo --split-size=5000000
|
||||
configure: WARNING:
|
||||
*** Makeinfo is too old. Info documentation will not be built.
|
||||
|
||||
then I checked the version of makeinfo, it said,
|
||||
======
|
||||
$ makeinfo --version
|
||||
texi2any (GNU texinfo) 7.0.1
|
||||
|
||||
Copyright (C) 2022 Free Software Foundation, Inc.
|
||||
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law.
|
||||
======
|
||||
|
||||
After digging a little bit, it became quite obvious that a dot is
|
||||
missing in regexp that makes it impossible to match versions higher than
|
||||
7.0, and here's the solution:
|
||||
|
||||
- | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
|
||||
+ | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]\.[0-9])' >/dev/null 2>&1; then
|
||||
|
||||
However, Eli pointed out that the solution above has another problem: it
|
||||
will stop working when Texinfo 10.1 will be released. Meanwhile, he
|
||||
suggested to solve this problem permanently. That is, we don't care
|
||||
about the minor version for Texinfo > 6.9, we only care about the major
|
||||
version.
|
||||
|
||||
In this way, the problem will be resolved permanently, thanks to Eli.
|
||||
|
||||
libctf/ChangeLog:
|
||||
|
||||
* configure: Regenerated.
|
||||
* configure.ac: Update regexp to match versions higher than 7.0.
|
||||
---
|
||||
libctf/configure | 2 +-
|
||||
libctf/configure.ac | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/libctf/configure
|
||||
+++ b/libctf/configure
|
||||
@@ -14865,7 +14865,7 @@ esac
|
||||
# We require texinfo to be 6.3 or later, for a working synindex
|
||||
# and validatemenus: otherwise we fall back to /bin/true.
|
||||
if ${MAKEINFO} --version \
|
||||
- | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
|
||||
+ | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]|[1-6][0-9])' >/dev/null 2>&1; then
|
||||
build_info=yes
|
||||
else
|
||||
build_info=
|
||||
--- a/libctf/configure.ac
|
||||
+++ b/libctf/configure.ac
|
||||
@@ -184,7 +184,7 @@ changequote(,)
|
||||
# We require texinfo to be 6.3 or later, for a working synindex
|
||||
# and validatemenus: otherwise we fall back to /bin/true.
|
||||
if ${MAKEINFO} --version \
|
||||
- | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
|
||||
+ | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]|[1-6][0-9])' >/dev/null 2>&1; then
|
||||
build_info=yes
|
||||
else
|
||||
build_info=
|
||||
@@ -0,0 +1,444 @@
|
||||
From 59706683feafb6252d0ad369cf8759f75fd147be Mon Sep 17 00:00:00 2001
|
||||
From: Nick Clifton <nickc@redhat.com>
|
||||
Date: Tue, 17 Jan 2023 12:02:56 +0000
|
||||
Subject: [PATCH 07/50] Fix version number snafu in some configuration files:
|
||||
2.40.00 should be 2.40
|
||||
|
||||
---
|
||||
binutils/configure | 20 ++++++++++----------
|
||||
gprof/configure | 20 ++++++++++----------
|
||||
gprofng/configure | 20 ++++++++++----------
|
||||
gprofng/doc/version.texi | 4 ++--
|
||||
gprofng/libcollector/configure | 20 ++++++++++----------
|
||||
ld/configure | 20 ++++++++++----------
|
||||
6 files changed, 52 insertions(+), 52 deletions(-)
|
||||
|
||||
--- a/binutils/configure
|
||||
+++ b/binutils/configure
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
-# Generated by GNU Autoconf 2.69 for binutils 2.40.00.
|
||||
+# Generated by GNU Autoconf 2.69 for binutils 2.40.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
@@ -587,8 +587,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='binutils'
|
||||
PACKAGE_TARNAME='binutils'
|
||||
-PACKAGE_VERSION='2.40.00'
|
||||
-PACKAGE_STRING='binutils 2.40.00'
|
||||
+PACKAGE_VERSION='2.40'
|
||||
+PACKAGE_STRING='binutils 2.40'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -1401,7 +1401,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
-\`configure' configures binutils 2.40.00 to adapt to many kinds of systems.
|
||||
+\`configure' configures binutils 2.40 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1472,7 +1472,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
- short | recursive ) echo "Configuration of binutils 2.40.00:";;
|
||||
+ short | recursive ) echo "Configuration of binutils 2.40:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1631,7 +1631,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
-binutils configure 2.40.00
|
||||
+binutils configure 2.40
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -2099,7 +2099,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
-It was created by binutils $as_me 2.40.00, which was
|
||||
+It was created by binutils $as_me 2.40, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -3081,7 +3081,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='binutils'
|
||||
- VERSION='2.40.00'
|
||||
+ VERSION='2.40'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -15326,7 +15326,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
-This file was extended by binutils $as_me 2.40.00, which was
|
||||
+This file was extended by binutils $as_me 2.40, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -15392,7 +15392,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
-binutils config.status 2.40.00
|
||||
+binutils config.status 2.40
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
--- a/gprof/configure
|
||||
+++ b/gprof/configure
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
-# Generated by GNU Autoconf 2.69 for gprof 2.40.00.
|
||||
+# Generated by GNU Autoconf 2.69 for gprof 2.40.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
@@ -587,8 +587,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='gprof'
|
||||
PACKAGE_TARNAME='gprof'
|
||||
-PACKAGE_VERSION='2.40.00'
|
||||
-PACKAGE_STRING='gprof 2.40.00'
|
||||
+PACKAGE_VERSION='2.40'
|
||||
+PACKAGE_STRING='gprof 2.40'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -1338,7 +1338,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
-\`configure' configures gprof 2.40.00 to adapt to many kinds of systems.
|
||||
+\`configure' configures gprof 2.40 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1409,7 +1409,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
- short | recursive ) echo "Configuration of gprof 2.40.00:";;
|
||||
+ short | recursive ) echo "Configuration of gprof 2.40:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1520,7 +1520,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
-gprof configure 2.40.00
|
||||
+gprof configure 2.40
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -1885,7 +1885,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
-It was created by gprof $as_me 2.40.00, which was
|
||||
+It was created by gprof $as_me 2.40, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -2864,7 +2864,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='gprof'
|
||||
- VERSION='2.40.00'
|
||||
+ VERSION='2.40'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -12572,7 +12572,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
-This file was extended by gprof $as_me 2.40.00, which was
|
||||
+This file was extended by gprof $as_me 2.40, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -12638,7 +12638,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
-gprof config.status 2.40.00
|
||||
+gprof config.status 2.40
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
--- a/gprofng/configure
|
||||
+++ b/gprofng/configure
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
-# Generated by GNU Autoconf 2.69 for gprofng 2.40.00.
|
||||
+# Generated by GNU Autoconf 2.69 for gprofng 2.40.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
@@ -587,8 +587,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='gprofng'
|
||||
PACKAGE_TARNAME='gprofng'
|
||||
-PACKAGE_VERSION='2.40.00'
|
||||
-PACKAGE_STRING='gprofng 2.40.00'
|
||||
+PACKAGE_VERSION='2.40'
|
||||
+PACKAGE_STRING='gprofng 2.40'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -1362,7 +1362,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
-\`configure' configures gprofng 2.40.00 to adapt to many kinds of systems.
|
||||
+\`configure' configures gprofng 2.40 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1433,7 +1433,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
- short | recursive ) echo "Configuration of gprofng 2.40.00:";;
|
||||
+ short | recursive ) echo "Configuration of gprofng 2.40:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1547,7 +1547,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
-gprofng configure 2.40.00
|
||||
+gprofng configure 2.40
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -2079,7 +2079,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
-It was created by gprofng $as_me 2.40.00, which was
|
||||
+It was created by gprofng $as_me 2.40, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -3052,7 +3052,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='gprofng'
|
||||
- VERSION='2.40.00'
|
||||
+ VERSION='2.40'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -17467,7 +17467,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
-This file was extended by gprofng $as_me 2.40.00, which was
|
||||
+This file was extended by gprofng $as_me 2.40, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -17533,7 +17533,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
-gprofng config.status 2.40.00
|
||||
+gprofng config.status 2.40
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
--- a/gprofng/doc/version.texi
|
||||
+++ b/gprofng/doc/version.texi
|
||||
@@ -1,4 +1,4 @@
|
||||
@set UPDATED 5 January 2023
|
||||
@set UPDATED-MONTH January 2023
|
||||
-@set EDITION 2.40.00
|
||||
-@set VERSION 2.40.00
|
||||
+@set EDITION 2.40
|
||||
+@set VERSION 2.40
|
||||
--- a/gprofng/libcollector/configure
|
||||
+++ b/gprofng/libcollector/configure
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
-# Generated by GNU Autoconf 2.69 for gprofng 2.40.00.
|
||||
+# Generated by GNU Autoconf 2.69 for gprofng 2.40.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
@@ -587,8 +587,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='gprofng'
|
||||
PACKAGE_TARNAME='gprofng'
|
||||
-PACKAGE_VERSION='2.40.00'
|
||||
-PACKAGE_STRING='gprofng 2.40.00'
|
||||
+PACKAGE_VERSION='2.40'
|
||||
+PACKAGE_STRING='gprofng 2.40'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -1325,7 +1325,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
-\`configure' configures gprofng 2.40.00 to adapt to many kinds of systems.
|
||||
+\`configure' configures gprofng 2.40 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1396,7 +1396,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
- short | recursive ) echo "Configuration of gprofng 2.40.00:";;
|
||||
+ short | recursive ) echo "Configuration of gprofng 2.40:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1505,7 +1505,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
-gprofng configure 2.40.00
|
||||
+gprofng configure 2.40
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -1991,7 +1991,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
-It was created by gprofng $as_me 2.40.00, which was
|
||||
+It was created by gprofng $as_me 2.40, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -2968,7 +2968,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='gprofng'
|
||||
- VERSION='2.40.00'
|
||||
+ VERSION='2.40'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -16098,7 +16098,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
-This file was extended by gprofng $as_me 2.40.00, which was
|
||||
+This file was extended by gprofng $as_me 2.40, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -16164,7 +16164,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
-gprofng config.status 2.40.00
|
||||
+gprofng config.status 2.40
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
--- a/ld/configure
|
||||
+++ b/ld/configure
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
-# Generated by GNU Autoconf 2.69 for ld 2.40.00.
|
||||
+# Generated by GNU Autoconf 2.69 for ld 2.40.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
@@ -587,8 +587,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='ld'
|
||||
PACKAGE_TARNAME='ld'
|
||||
-PACKAGE_VERSION='2.40.00'
|
||||
-PACKAGE_STRING='ld 2.40.00'
|
||||
+PACKAGE_VERSION='2.40'
|
||||
+PACKAGE_STRING='ld 2.40'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -1423,7 +1423,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
-\`configure' configures ld 2.40.00 to adapt to many kinds of systems.
|
||||
+\`configure' configures ld 2.40 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1494,7 +1494,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
- short | recursive ) echo "Configuration of ld 2.40.00:";;
|
||||
+ short | recursive ) echo "Configuration of ld 2.40:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1661,7 +1661,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
-ld configure 2.40.00
|
||||
+ld configure 2.40
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -2376,7 +2376,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
-It was created by ld $as_me 2.40.00, which was
|
||||
+It was created by ld $as_me 2.40, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -3359,7 +3359,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='ld'
|
||||
- VERSION='2.40.00'
|
||||
+ VERSION='2.40'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -18083,7 +18083,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
-This file was extended by ld $as_me 2.40.00, which was
|
||||
+This file was extended by ld $as_me 2.40, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -18149,7 +18149,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
-ld config.status 2.40.00
|
||||
+ld config.status 2.40
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
From bcea253f5fa194e57f9564e8461c718e228bd26e Mon Sep 17 00:00:00 2001
|
||||
From: Indu Bhagat <indu.bhagat@oracle.com>
|
||||
Date: Wed, 18 Jan 2023 23:17:49 -0800
|
||||
Subject: [PATCH 10/50] toplevel: Makefile.def: add install-strip dependency on
|
||||
libsframe
|
||||
|
||||
As noted in PR libsframe/30014 - FTBFS: install-strip fails because
|
||||
bfdlib relinks and fails to find libsframe, the install time
|
||||
dependencies of libbfd need to be updated.
|
||||
|
||||
PR libsframe/30014
|
||||
* Makefile.def: Reflect that libsframe needs to installed before
|
||||
libbfd. Reorder a bit to better track libsframe dependencies.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
(cherry picked from commit b8d21eb0cd10d6127e77cc437d82e949adb0c454)
|
||||
---
|
||||
Makefile.def | 5 ++++-
|
||||
Makefile.in | 3 ++-
|
||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/Makefile.def
|
||||
+++ b/Makefile.def
|
||||
@@ -493,7 +493,6 @@ dependencies = { module=install-binutils
|
||||
dependencies = { module=install-strip-binutils; on=install-strip-opcodes; };
|
||||
|
||||
// Likewise for ld, libctf, and bfd.
|
||||
-dependencies = { module=install-bfd; on=install-libsframe; };
|
||||
dependencies = { module=install-libctf; on=install-bfd; };
|
||||
dependencies = { module=install-ld; on=install-bfd; };
|
||||
dependencies = { module=install-ld; on=install-libctf; };
|
||||
@@ -501,6 +500,10 @@ dependencies = { module=install-strip-li
|
||||
dependencies = { module=install-strip-ld; on=install-strip-bfd; };
|
||||
dependencies = { module=install-strip-ld; on=install-strip-libctf; };
|
||||
|
||||
+// libbfd depends on libsframe
|
||||
+dependencies = { module=install-bfd; on=install-libsframe; };
|
||||
+dependencies = { module=install-strip-bfd; on=install-strip-libsframe; };
|
||||
+
|
||||
// libopcodes depends on libbfd
|
||||
dependencies = { module=configure-opcodes; on=configure-bfd; hard=true; };
|
||||
dependencies = { module=install-opcodes; on=install-bfd; };
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -64549,13 +64549,14 @@ all-stageautoprofile-binutils: maybe-all
|
||||
all-stageautofeedback-binutils: maybe-all-stageautofeedback-libsframe
|
||||
install-binutils: maybe-install-opcodes
|
||||
install-strip-binutils: maybe-install-strip-opcodes
|
||||
-install-bfd: maybe-install-libsframe
|
||||
install-libctf: maybe-install-bfd
|
||||
install-ld: maybe-install-bfd
|
||||
install-ld: maybe-install-libctf
|
||||
install-strip-libctf: maybe-install-strip-bfd
|
||||
install-strip-ld: maybe-install-strip-bfd
|
||||
install-strip-ld: maybe-install-strip-libctf
|
||||
+install-bfd: maybe-install-libsframe
|
||||
+install-strip-bfd: maybe-install-strip-libsframe
|
||||
configure-opcodes: configure-bfd
|
||||
configure-stage1-opcodes: configure-stage1-bfd
|
||||
configure-stage2-opcodes: configure-stage2-bfd
|
||||
@@ -0,0 +1,703 @@
|
||||
From c6e269febbc946a54ed9dbbb2dc70feba6017607 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
|
||||
Date: Fri, 20 Jan 2023 15:39:55 -0800
|
||||
Subject: [PATCH 18/50] gprofng: PR29521 [docs] man pages are not in the
|
||||
release tarball
|
||||
|
||||
gprofng/ChangeLog
|
||||
2023-01-20 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
|
||||
|
||||
PR gprofng/29521
|
||||
* configure.ac: Check if $MAKEINFO and $HELP2MAN are missing.
|
||||
* Makefile.am: Build doc if $MAKEINFO exists.
|
||||
* doc/gprofng.texi: Update documentation for gprofng.
|
||||
* doc/Makefile.am: Build gprofng.1.
|
||||
* src/Makefile.am: Move the build of gprofng.1 to doc/Makefile.am.
|
||||
* configure: Rebuild.
|
||||
* Makefile.in: Rebuild.
|
||||
* doc/Makefile.in: Rebuild.
|
||||
* src/Makefile.in: Rebuild.
|
||||
---
|
||||
gprofng/Makefile.am | 2 +-
|
||||
gprofng/Makefile.in | 2 +-
|
||||
gprofng/configure | 79 +++++++++++++++---
|
||||
gprofng/configure.ac | 21 +++--
|
||||
gprofng/doc/Makefile.am | 24 +++++-
|
||||
gprofng/doc/Makefile.in | 93 ++++++++++++++++++---
|
||||
gprofng/doc/gprofng.texi | 169 +++++++++++++++++++++++++++++++++++++++
|
||||
gprofng/src/Makefile.am | 8 +-
|
||||
gprofng/src/Makefile.in | 8 +-
|
||||
9 files changed, 364 insertions(+), 42 deletions(-)
|
||||
|
||||
--- a/gprofng/Makefile.am
|
||||
+++ b/gprofng/Makefile.am
|
||||
@@ -23,7 +23,7 @@ AUTOMAKE_OPTIONS = dejagnu foreign
|
||||
if BUILD_COLLECTOR
|
||||
COLLECTOR_SUBDIRS = libcollector
|
||||
endif
|
||||
-if BUILD_MAN
|
||||
+if BUILD_DOC
|
||||
DOC_SUBDIR = doc
|
||||
endif
|
||||
if BUILD_SRC
|
||||
--- a/gprofng/Makefile.in
|
||||
+++ b/gprofng/Makefile.in
|
||||
@@ -381,7 +381,7 @@ zlibinc = @zlibinc@
|
||||
ACLOCAL_AMFLAGS = -I . -I ..
|
||||
AUTOMAKE_OPTIONS = dejagnu foreign
|
||||
@BUILD_COLLECTOR_TRUE@COLLECTOR_SUBDIRS = libcollector
|
||||
-@BUILD_MAN_TRUE@DOC_SUBDIR = doc
|
||||
+@BUILD_DOC_TRUE@DOC_SUBDIR = doc
|
||||
@BUILD_SRC_TRUE@SRC_SUBDIRS = src gp-display-html $(DOC_SUBDIR)
|
||||
SUBDIRS = $(COLLECTOR_SUBDIRS) $(SRC_SUBDIRS)
|
||||
DIST_SUBDIRS = libcollector src gp-display-html $(DOC_SUBDIR)
|
||||
--- a/gprofng/configure
|
||||
+++ b/gprofng/configure
|
||||
@@ -639,6 +639,8 @@ GPROFNG_CPPFLAGS
|
||||
GPROFNG_NO_FORMAT_TRUNCATION_CFLAGS
|
||||
GPROFNG_CFLAGS
|
||||
LD_NO_AS_NEEDED
|
||||
+BUILD_DOC_FALSE
|
||||
+BUILD_DOC_TRUE
|
||||
BUILD_MAN_FALSE
|
||||
BUILD_MAN_TRUE
|
||||
HELP2MAN
|
||||
@@ -12221,7 +12223,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
-#line 12224 "configure"
|
||||
+#line 12226 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@@ -12327,7 +12329,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
-#line 12330 "configure"
|
||||
+#line 12332 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@@ -16737,9 +16739,58 @@ fi
|
||||
|
||||
# Generate manpages, if possible.
|
||||
build_man=false
|
||||
+build_doc=false
|
||||
if test $cross_compiling = no; then
|
||||
+ for ac_prog in help2man
|
||||
+do
|
||||
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
+set dummy $ac_prog; ac_word=$2
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
+$as_echo_n "checking for $ac_word... " >&6; }
|
||||
+if ${ac_cv_prog_HELP2MAN+:} false; then :
|
||||
+ $as_echo_n "(cached) " >&6
|
||||
+else
|
||||
+ if test -n "$HELP2MAN"; then
|
||||
+ ac_cv_prog_HELP2MAN="$HELP2MAN" # Let the user override the test.
|
||||
+else
|
||||
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
+for as_dir in $PATH
|
||||
+do
|
||||
+ IFS=$as_save_IFS
|
||||
+ test -z "$as_dir" && as_dir=.
|
||||
+ for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
+ ac_cv_prog_HELP2MAN="$ac_prog"
|
||||
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
+ break 2
|
||||
+ fi
|
||||
+done
|
||||
+ done
|
||||
+IFS=$as_save_IFS
|
||||
+
|
||||
+fi
|
||||
+fi
|
||||
+HELP2MAN=$ac_cv_prog_HELP2MAN
|
||||
+if test -n "$HELP2MAN"; then
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HELP2MAN" >&5
|
||||
+$as_echo "$HELP2MAN" >&6; }
|
||||
+else
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
+$as_echo "no" >&6; }
|
||||
+fi
|
||||
|
||||
-HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"}
|
||||
+
|
||||
+ test -n "$HELP2MAN" && break
|
||||
+done
|
||||
+test -n "$HELP2MAN" || HELP2MAN="$MISSING help2man"
|
||||
+
|
||||
+ case "x$HELP2MAN" in
|
||||
+ x | */missing\ help2man* )
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gprofng: help2man is missing. Man pages will not be built." >&5
|
||||
+$as_echo "$as_me: WARNING: gprofng: help2man is missing. Man pages will not be built." >&2;}
|
||||
+ ;;
|
||||
+ * ) build_man=true ;;
|
||||
+ esac
|
||||
|
||||
for ac_prog in makeinfo
|
||||
do
|
||||
@@ -16782,10 +16833,10 @@ fi
|
||||
|
||||
test -n "$MAKEINFO" && break
|
||||
done
|
||||
-test -n "$MAKEINFO" || MAKEINFO=""@echo makeinfo missing; true""
|
||||
+test -n "$MAKEINFO" || MAKEINFO="$MISSING makeinfo"
|
||||
|
||||
- case "$MAKEINFO" in
|
||||
- *true)
|
||||
+ case "x$MAKEINFO" in
|
||||
+ x | */missing\ makeinfo*)
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gprofng: makeinfo is missing. Info documentation will not be built." >&5
|
||||
$as_echo "$as_me: WARNING: gprofng: makeinfo is missing. Info documentation will not be built." >&2;}
|
||||
;;
|
||||
@@ -16796,9 +16847,7 @@ $as_echo "$as_me: WARNING: gprofng: make
|
||||
$as_echo "$as_me: WARNING: gprofng: $MAKEINFO is too old. Info documentation will not be built." >&2;}
|
||||
MAKEINFO="@echo $MAKEINFO is too old, 6.5 or newer required; true"
|
||||
;;
|
||||
- x* )
|
||||
- build_man=true
|
||||
- ;;
|
||||
+ x* ) build_doc=true ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
@@ -16812,6 +16861,14 @@ else
|
||||
BUILD_MAN_FALSE=
|
||||
fi
|
||||
|
||||
+ if test x$build_doc = xtrue; then
|
||||
+ BUILD_DOC_TRUE=
|
||||
+ BUILD_DOC_FALSE='#'
|
||||
+else
|
||||
+ BUILD_DOC_TRUE='#'
|
||||
+ BUILD_DOC_FALSE=
|
||||
+fi
|
||||
+
|
||||
|
||||
LD_NO_AS_NEEDED=${no_as_needed}
|
||||
|
||||
@@ -17070,6 +17127,10 @@ if test -z "${BUILD_MAN_TRUE}" && test -
|
||||
as_fn_error $? "conditional \"BUILD_MAN\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
+if test -z "${BUILD_DOC_TRUE}" && test -z "${BUILD_DOC_FALSE}"; then
|
||||
+ as_fn_error $? "conditional \"BUILD_DOC\" was never defined.
|
||||
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
+fi
|
||||
|
||||
: "${CONFIG_STATUS=./config.status}"
|
||||
ac_write_fail=0
|
||||
--- a/gprofng/configure.ac
|
||||
+++ b/gprofng/configure.ac
|
||||
@@ -210,11 +210,19 @@ AM_ZLIB
|
||||
|
||||
# Generate manpages, if possible.
|
||||
build_man=false
|
||||
+build_doc=false
|
||||
if test $cross_compiling = no; then
|
||||
- AM_MISSING_PROG(HELP2MAN, help2man)
|
||||
- AC_CHECK_PROGS([MAKEINFO], makeinfo, ["@echo makeinfo missing; true"])
|
||||
- case "$MAKEINFO" in
|
||||
- *true)
|
||||
+ AC_CHECK_PROGS([HELP2MAN], help2man, [$MISSING help2man])
|
||||
+ case "x$HELP2MAN" in
|
||||
+ x | */missing\ help2man* )
|
||||
+ AC_MSG_WARN([gprofng: help2man is missing. Man pages will not be built.])
|
||||
+ ;;
|
||||
+ * ) build_man=true ;;
|
||||
+ esac
|
||||
+
|
||||
+ AC_CHECK_PROGS([MAKEINFO], makeinfo, [$MISSING makeinfo])
|
||||
+ case "x$MAKEINFO" in
|
||||
+ x | */missing\ makeinfo*)
|
||||
AC_MSG_WARN([gprofng: makeinfo is missing. Info documentation will not be built.])
|
||||
;;
|
||||
*)
|
||||
@@ -223,15 +231,14 @@ if test $cross_compiling = no; then
|
||||
AC_MSG_WARN([gprofng: $MAKEINFO is too old. Info documentation will not be built.])
|
||||
MAKEINFO="@echo $MAKEINFO is too old, 6.5 or newer required; true"
|
||||
;;
|
||||
- x* )
|
||||
- build_man=true
|
||||
- ;;
|
||||
+ x* ) build_doc=true ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(MAKEINFO)
|
||||
fi
|
||||
AM_CONDITIONAL([BUILD_MAN], [test x$build_man = xtrue])
|
||||
+AM_CONDITIONAL([BUILD_DOC], [test x$build_doc = xtrue])
|
||||
|
||||
AC_SUBST(LD_NO_AS_NEEDED, [${no_as_needed}])
|
||||
AC_SUBST(GPROFNG_CFLAGS, [${gprofng_cflags}])
|
||||
--- a/gprofng/doc/Makefile.am
|
||||
+++ b/gprofng/doc/Makefile.am
|
||||
@@ -19,9 +19,31 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = info-in-builddir foreign no-texinfo.tex
|
||||
|
||||
+# Options to extract the man page
|
||||
+MANCONF = -Dman
|
||||
+
|
||||
+TEXI2POD = perl $(srcdir)/../../etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
|
||||
+POD2MAN = pod2man --center="User Commands" \
|
||||
+ --release="binutils-$(VERSION)" --section=1
|
||||
+
|
||||
info_TEXINFOS = gprofng.texi
|
||||
gprofng_TEXINFOS = fdl.texi
|
||||
TEXINFO_TEX = .
|
||||
MAKEINFOHTML = $(MAKEINFO) --html --no-split
|
||||
|
||||
-MAINTAINERCLEANFILES = gprofng.info
|
||||
+man_MANS = gprofng.1
|
||||
+
|
||||
+# Build the man page from the texinfo file
|
||||
+# The sed command removes the no-adjust Nroff command so that
|
||||
+# the man output looks standard.
|
||||
+gprofng.1: $(srcdir)/gprofng.texi
|
||||
+ $(AM_V_GEN)touch $@
|
||||
+ $(AM_V_at)-$(TEXI2POD) $(MANCONF) < $(srcdir)/gprofng.texi > gprofng.pod
|
||||
+ $(AM_V_at)-($(POD2MAN) gprofng.pod | \
|
||||
+ sed -e '/^.if n .na/d' > $@.tmp && \
|
||||
+ mv -f $@.tmp $@) || (rm -f $@.tmp && exit 1)
|
||||
+ $(AM_V_at)rm -f gprofng.pod
|
||||
+
|
||||
+MAINTAINERCLEANFILES = gprofng.info $(man_MANS)
|
||||
+
|
||||
+info: $(man_MANS)
|
||||
--- a/gprofng/doc/Makefile.in
|
||||
+++ b/gprofng/doc/Makefile.in
|
||||
@@ -182,7 +182,7 @@ am__can_run_installinfo = \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
-am__installdirs = "$(DESTDIR)$(infodir)"
|
||||
+am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
@@ -210,6 +210,9 @@ am__uninstall_files_from_dir = { \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
+man1dir = $(mandir)/man1
|
||||
+NROFF = nroff
|
||||
+MANS = $(man_MANS)
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
am__DIST_COMMON = $(gprofng_TEXINFOS) $(srcdir)/Makefile.in \
|
||||
$(top_srcdir)/../mkinstalldirs mdate-sh texinfo.tex
|
||||
@@ -361,11 +364,19 @@ top_srcdir = @top_srcdir@
|
||||
zlibdir = @zlibdir@
|
||||
zlibinc = @zlibinc@
|
||||
AUTOMAKE_OPTIONS = info-in-builddir foreign no-texinfo.tex
|
||||
+
|
||||
+# Options to extract the man page
|
||||
+MANCONF = -Dman
|
||||
+TEXI2POD = perl $(srcdir)/../../etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
|
||||
+POD2MAN = pod2man --center="User Commands" \
|
||||
+ --release="binutils-$(VERSION)" --section=1
|
||||
+
|
||||
info_TEXINFOS = gprofng.texi
|
||||
gprofng_TEXINFOS = fdl.texi
|
||||
TEXINFO_TEX = .
|
||||
MAKEINFOHTML = $(MAKEINFO) --html --no-split
|
||||
-MAINTAINERCLEANFILES = gprofng.info
|
||||
+man_MANS = gprofng.1
|
||||
+MAINTAINERCLEANFILES = gprofng.info $(man_MANS)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
@@ -558,6 +569,49 @@ maintainer-clean-aminfo:
|
||||
echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
|
||||
rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
|
||||
done
|
||||
+install-man1: $(man_MANS)
|
||||
+ @$(NORMAL_INSTALL)
|
||||
+ @list1=''; \
|
||||
+ list2='$(man_MANS)'; \
|
||||
+ test -n "$(man1dir)" \
|
||||
+ && test -n "`echo $$list1$$list2`" \
|
||||
+ || exit 0; \
|
||||
+ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
|
||||
+ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
|
||||
+ { for i in $$list1; do echo "$$i"; done; \
|
||||
+ if test -n "$$list2"; then \
|
||||
+ for i in $$list2; do echo "$$i"; done \
|
||||
+ | sed -n '/\.1[a-z]*$$/p'; \
|
||||
+ fi; \
|
||||
+ } | while read p; do \
|
||||
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
+ echo "$$d$$p"; echo "$$p"; \
|
||||
+ done | \
|
||||
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
|
||||
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||
+ sed 'N;N;s,\n, ,g' | { \
|
||||
+ list=; while read file base inst; do \
|
||||
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
|
||||
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
|
||||
+ fi; \
|
||||
+ done; \
|
||||
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||
+ while read files; do \
|
||||
+ test -z "$$files" || { \
|
||||
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
|
||||
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
|
||||
+ done; }
|
||||
+
|
||||
+uninstall-man1:
|
||||
+ @$(NORMAL_UNINSTALL)
|
||||
+ @list=''; test -n "$(man1dir)" || exit 0; \
|
||||
+ files=`{ for i in $$list; do echo "$$i"; done; \
|
||||
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
+ sed -n '/\.1[a-z]*$$/p'; \
|
||||
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
|
||||
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
+ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
|
||||
tags TAGS:
|
||||
|
||||
ctags CTAGS:
|
||||
@@ -600,9 +654,9 @@ distdir: $(DISTFILES)
|
||||
dist-info
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
-all-am: Makefile $(INFO_DEPS)
|
||||
+all-am: Makefile $(INFO_DEPS) $(MANS)
|
||||
installdirs:
|
||||
- for dir in "$(DESTDIR)$(infodir)"; do \
|
||||
+ for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
@@ -652,11 +706,9 @@ html: html-am
|
||||
|
||||
html-am: $(HTMLS)
|
||||
|
||||
-info: info-am
|
||||
-
|
||||
info-am: $(INFO_DEPS)
|
||||
|
||||
-install-data-am: install-info-am
|
||||
+install-data-am: install-info-am install-man
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
@@ -739,7 +791,7 @@ install-info-am: $(INFO_DEPS)
|
||||
install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
|
||||
done; \
|
||||
else : ; fi
|
||||
-install-man:
|
||||
+install-man: install-man1
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
@@ -794,7 +846,9 @@ ps: ps-am
|
||||
ps-am: $(PSS)
|
||||
|
||||
uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
|
||||
- uninstall-pdf-am uninstall-ps-am
|
||||
+ uninstall-man uninstall-pdf-am uninstall-ps-am
|
||||
+
|
||||
+uninstall-man: uninstall-man1
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
@@ -804,19 +858,32 @@ uninstall-am: uninstall-dvi-am uninstall
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
- install-info-am install-man install-pdf install-pdf-am \
|
||||
- install-ps install-ps-am install-strip installcheck \
|
||||
- installcheck-am installdirs maintainer-clean \
|
||||
+ install-info-am install-man install-man1 install-pdf \
|
||||
+ install-pdf-am install-ps install-ps-am install-strip \
|
||||
+ installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-aminfo maintainer-clean-generic \
|
||||
maintainer-clean-vti mostlyclean mostlyclean-aminfo \
|
||||
mostlyclean-generic mostlyclean-libtool mostlyclean-vti pdf \
|
||||
pdf-am ps ps-am tags-am uninstall uninstall-am \
|
||||
uninstall-dvi-am uninstall-html-am uninstall-info-am \
|
||||
- uninstall-pdf-am uninstall-ps-am
|
||||
+ uninstall-man uninstall-man1 uninstall-pdf-am uninstall-ps-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
+# Build the man page from the texinfo file
|
||||
+# The sed command removes the no-adjust Nroff command so that
|
||||
+# the man output looks standard.
|
||||
+gprofng.1: $(srcdir)/gprofng.texi
|
||||
+ $(AM_V_GEN)touch $@
|
||||
+ $(AM_V_at)-$(TEXI2POD) $(MANCONF) < $(srcdir)/gprofng.texi > gprofng.pod
|
||||
+ $(AM_V_at)-($(POD2MAN) gprofng.pod | \
|
||||
+ sed -e '/^.if n .na/d' > $@.tmp && \
|
||||
+ mv -f $@.tmp $@) || (rm -f $@.tmp && exit 1)
|
||||
+ $(AM_V_at)rm -f gprofng.pod
|
||||
+
|
||||
+info: $(man_MANS)
|
||||
+
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
--- a/gprofng/doc/gprofng.texi
|
||||
+++ b/gprofng/doc/gprofng.texi
|
||||
@@ -1,5 +1,8 @@
|
||||
\input texinfo @c -*-texinfo-*-
|
||||
|
||||
+@c for $sect (qw(NAME SYNOPSIS TARGET DESCRIPTION OPTIONS ENVIRONMENT FILES
|
||||
+@c BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) {
|
||||
+
|
||||
@c ----------------------------------------------------------------------------
|
||||
@c This is the Texinfo source file for the GPROFNG manual.
|
||||
@c
|
||||
@@ -59,6 +62,10 @@ gprofng
|
||||
@cindex \label\, \string\
|
||||
@end macro
|
||||
|
||||
+@macro gcctabopt{body}
|
||||
+@code{\body\}
|
||||
+@end macro
|
||||
+
|
||||
@c -- Get the version information ---------------------------------------------
|
||||
@include version.texi
|
||||
|
||||
@@ -99,6 +106,20 @@ section entitled ``GNU Free Documentatio
|
||||
@page
|
||||
@vskip 0pt plus 1filll
|
||||
@insertcopying
|
||||
+
|
||||
+@c man begin COPYRIGHT
|
||||
+
|
||||
+Copyright @copyright{} 2022-2023 Free Software Foundation, Inc.
|
||||
+
|
||||
+Permission is granted to copy, distribute and/or modify this document
|
||||
+under the terms of the GNU Free Documentation License, Version 1.3
|
||||
+or any later version published by the Free Software Foundation;
|
||||
+with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
+Back-Cover Texts. A copy of the license is included in the
|
||||
+section entitled ``GNU Free Documentation License''.
|
||||
+
|
||||
+@c man end
|
||||
+
|
||||
@end titlepage
|
||||
|
||||
@c -- Generate the Table of Contents ------------------------------------------
|
||||
@@ -163,6 +184,154 @@ Terminology
|
||||
@end menu
|
||||
@end ifinfo
|
||||
|
||||
+@ifset man
|
||||
+
|
||||
+@c man title gprofng the driver for the gprofng tool suite
|
||||
+
|
||||
+@c man begin SYNOPSIS
|
||||
+gprofng [OPTION(S)] ACTION [@b{QUALIFIER}] [ARGUMENTS] TARGET
|
||||
+@c man end
|
||||
+
|
||||
+@c man begin DESCRIPTION
|
||||
+This is the driver for the GPROFNG tools suite to gather and analyze performance data.
|
||||
+
|
||||
+The driver executes the action specified. An example of an action is @code{collect}
|
||||
+to collect performance data. Depending on the action, a qualifier may be needed to
|
||||
+define the command. Several qualifiers support options. The last item on the command
|
||||
+is the target the command applies to.
|
||||
+
|
||||
+For example, to collect performance data for an application called @code{a.out} and
|
||||
+store the results in experiment directory @code{mydata.er}, the following command may
|
||||
+be used:
|
||||
+
|
||||
+@smallexample
|
||||
+$ gprofng collect app -o mydata.er a.out
|
||||
+@end smallexample
|
||||
+
|
||||
+In this example, the action is @code{collect}, the qualifier is @code{app}, the single
|
||||
+argument is @code{-o mydata.er} and the target is @code{a.out}.
|
||||
+
|
||||
+If gprofng is executed without any additional option, action, or target, a usage
|
||||
+overview is printed.
|
||||
+
|
||||
+@c man end
|
||||
+
|
||||
+@c man begin OPTIONS
|
||||
+
|
||||
+@table @gcctabopt
|
||||
+
|
||||
+@item @var{--version}
|
||||
+print the version number and exit.
|
||||
+
|
||||
+@item @var{--help}
|
||||
+print usage information and exit.
|
||||
+
|
||||
+@end table
|
||||
+
|
||||
+@c man end
|
||||
+
|
||||
+@c man begin NOTES
|
||||
+
|
||||
+The gprofng driver supports the following commands.
|
||||
+
|
||||
+@c The man pages for the commands below can be viewed using the command name with "gprofng" replaced by "gp" and the spaces replaced by a dash ("-"). For example the man page
|
||||
+@c name for "gprofng collect app" is "gp-collect-app".
|
||||
+
|
||||
+Collect performance data:
|
||||
+
|
||||
+@table @code
|
||||
+
|
||||
+@item gprofng collect app
|
||||
+collect application performance data.
|
||||
+
|
||||
+@end table
|
||||
+
|
||||
+Display the performance results:
|
||||
+
|
||||
+@table @code
|
||||
+
|
||||
+@item gprofng display text
|
||||
+display the performance data in ASCII format.
|
||||
+
|
||||
+@item gprofng display html
|
||||
+generate an HTML file from one or more experiments.
|
||||
+
|
||||
+@end table
|
||||
+
|
||||
+Miscellaneous commands:
|
||||
+
|
||||
+@table @code
|
||||
+
|
||||
+@item gprofng display src
|
||||
+display source or disassembly with compiler annotations.
|
||||
+
|
||||
+@item gprofng archive
|
||||
+include binaries and source code in an experiment directory.
|
||||
+
|
||||
+@end table
|
||||
+
|
||||
+It is also possible to invoke the lower level commands directly, but since
|
||||
+these are subject to change, in particular the options, we recommend to
|
||||
+use the driver.
|
||||
+
|
||||
+@c man end
|
||||
+
|
||||
+@c man begin ENVIRONMENT
|
||||
+The following environment variables are supported:
|
||||
+
|
||||
+@table @code
|
||||
+
|
||||
+@item @env{GPROFNG_MAX_CALL_STACK_DEPTH}
|
||||
+set the depth of the call stack (default is 256).
|
||||
+
|
||||
+@item @env{GPROFNG_USE_JAVA_OPTIONS}
|
||||
+may be set when profiling a C/C++ application that uses dlopen() to execute Java code.
|
||||
+
|
||||
+@item @env{GPROFNG_SSH_REMOTE_DISPLAY}
|
||||
+use this variable to define the ssh command executed by the remote display tool.
|
||||
+
|
||||
+@item @env{GPROFNG_SKIP_VALIDATION}
|
||||
+set this variable to disable checking hardware, system, and Java versions.
|
||||
+
|
||||
+@item @env{GPROFNG_ALLOW_CORE_DUMP}
|
||||
+set this variable to allow a core file to be generated; otherwise an error report is created on /tmp.
|
||||
+
|
||||
+@item @env{GPROFNG_ARCHIVE}
|
||||
+use this variable to define the settings for automatic archiving upon experiment recording completion.
|
||||
+
|
||||
+@item @env{GPROFNG_ARCHIVE_COMMON_DIR}
|
||||
+set this variable to the location of the common archive.
|
||||
+
|
||||
+@item @env{GPROFNG_JAVA_MAX_CALL_STACK_DEPTH}
|
||||
+set the depth of the Java call stack; the default is 256; set to 0 to disable capturing of call stacks.
|
||||
+
|
||||
+@item @env{GPROFNG_JAVA_NATIVE_MAX_CALL_STACK_DEPTH}
|
||||
+set the depth of the Java native call stack; the default is 256; set to 0 to disable capturing of call stacks (JNI and assembly call stacks are not captured).
|
||||
+
|
||||
+@end table
|
||||
+
|
||||
+@c man end
|
||||
+
|
||||
+@c man begin SEEALSO
|
||||
+The man pages for the various gprofng commands are not available yet, but
|
||||
+the @option{--help} option supported on each of the commands lists the options
|
||||
+and provides more information.
|
||||
+
|
||||
+For example this displays the options supported on the @command{gprofng collect app}
|
||||
+command:
|
||||
+
|
||||
+@smallexample
|
||||
+$ gprofng collect app --help
|
||||
+@end smallexample
|
||||
+
|
||||
+The user guide is available as an Info entry for @file{gprofng}.
|
||||
+@c man end
|
||||
+
|
||||
+@end ifset
|
||||
+
|
||||
+@c man begin DESCRIPTION
|
||||
+@c man end
|
||||
+
|
||||
@c -- A new node --------------------------------------------------------------
|
||||
@node Introduction
|
||||
@chapter Introduction
|
||||
--- a/gprofng/src/Makefile.am
|
||||
+++ b/gprofng/src/Makefile.am
|
||||
@@ -160,7 +160,7 @@ gp_display_text_LDADD = $(LIBGPROFNG) $(
|
||||
|
||||
if BUILD_MAN
|
||||
|
||||
-man_MANS = gprofng.1 \
|
||||
+man_MANS = \
|
||||
gp-archive.1 \
|
||||
gp-collect-app.1 \
|
||||
gp-display-src.1 \
|
||||
@@ -191,10 +191,6 @@ H2M_FILTER = | sed 's/\.TP/\.TP\n.B/' |
|
||||
| sed 's/See also:/\.SH SEE ALSO/' | sed 's/Documentation:/.SH DOCUMENTATION/' \
|
||||
| sed 's/Limitations:/.SH LIMITATIONS/'
|
||||
|
||||
-gprofng.1: $(srcdir)/gprofng.cc $(common_mandeps) | ./gprofng$(EXEEXT)
|
||||
- $(AM_V_GEN)_BUILDING_MANPAGE=1 $(HELP2MAN) $(HELP2MAN_OPT) \
|
||||
- --name=$(TEXT_GPROFNG) ./gprofng$(EXEEXT) $(H2M_FILTER) > $@
|
||||
-
|
||||
gp-archive.1: $(srcdir)/gp-archive.cc $(common_mandeps) | ./gp-archive$(EXEEXT)
|
||||
$(AM_V_GEN)_BUILDING_MANPAGE=1 $(HELP2MAN) $(HELP2MAN_OPT) \
|
||||
--name=$(TEXT_GP_ARCHIVE) ./gp-archive$(EXEEXT) $(H2M_FILTER) > $@
|
||||
@@ -223,3 +219,5 @@ dist-hook: $(LIBGPROFNG)
|
||||
|
||||
install-data-local: install-pkglibLTLIBRARIES
|
||||
rm -f $(DESTDIR)/$(pkglibdir)/*.la $(DESTDIR)/$(pkglibdir)/*.a
|
||||
+
|
||||
+$(srcdir)/DbeSession.cc: QLParser.tab.hh
|
||||
--- a/gprofng/src/Makefile.in
|
||||
+++ b/gprofng/src/Makefile.in
|
||||
@@ -572,7 +572,7 @@ gp_display_src_SOURCES = gp-display-src.
|
||||
gp_display_src_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK) $(ZLIB)
|
||||
gp_display_text_SOURCES = gp-display-text.cc ipc.cc ipcio.cc
|
||||
gp_display_text_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK) $(ZLIB)
|
||||
-@BUILD_MAN_TRUE@man_MANS = gprofng.1 \
|
||||
+@BUILD_MAN_TRUE@man_MANS = \
|
||||
@BUILD_MAN_TRUE@ gp-archive.1 \
|
||||
@BUILD_MAN_TRUE@ gp-collect-app.1 \
|
||||
@BUILD_MAN_TRUE@ gp-display-src.1 \
|
||||
@@ -1176,10 +1176,6 @@ uninstall-man: uninstall-man1
|
||||
QLParser.tab.cc QLParser.tab.hh: QLParser.yy
|
||||
$(BISON) $^
|
||||
|
||||
-@BUILD_MAN_TRUE@gprofng.1: $(srcdir)/gprofng.cc $(common_mandeps) | ./gprofng$(EXEEXT)
|
||||
-@BUILD_MAN_TRUE@ $(AM_V_GEN)_BUILDING_MANPAGE=1 $(HELP2MAN) $(HELP2MAN_OPT) \
|
||||
-@BUILD_MAN_TRUE@ --name=$(TEXT_GPROFNG) ./gprofng$(EXEEXT) $(H2M_FILTER) > $@
|
||||
-
|
||||
@BUILD_MAN_TRUE@gp-archive.1: $(srcdir)/gp-archive.cc $(common_mandeps) | ./gp-archive$(EXEEXT)
|
||||
@BUILD_MAN_TRUE@ $(AM_V_GEN)_BUILDING_MANPAGE=1 $(HELP2MAN) $(HELP2MAN_OPT) \
|
||||
@BUILD_MAN_TRUE@ --name=$(TEXT_GP_ARCHIVE) ./gp-archive$(EXEEXT) $(H2M_FILTER) > $@
|
||||
@@ -1207,6 +1203,8 @@ dist-hook: $(LIBGPROFNG)
|
||||
install-data-local: install-pkglibLTLIBRARIES
|
||||
rm -f $(DESTDIR)/$(pkglibdir)/*.la $(DESTDIR)/$(pkglibdir)/*.a
|
||||
|
||||
+$(srcdir)/DbeSession.cc: QLParser.tab.hh
|
||||
+
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -0,0 +1,212 @@
|
||||
From edd36b26f3506eeb259534ba2493e15c728cd280 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
|
||||
Date: Wed, 25 Jan 2023 19:21:38 -0800
|
||||
Subject: [PATCH 20/50] gprofng: PR30043 libgprofng.so.* are installed to a
|
||||
wrong location
|
||||
|
||||
gprofng/ChangeLog
|
||||
2023-01-25 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
|
||||
|
||||
PR gprofng/30043
|
||||
PR gprofng/28972
|
||||
* src/Makefile.am: Use lib_LTLIBRARIES instead of pkglib_LTLIBRARIES.
|
||||
* src/Makefile.in: Rebuild.
|
||||
---
|
||||
gprofng/src/Makefile.am | 7 +---
|
||||
gprofng/src/Makefile.in | 76 +++++++++++++++++++----------------------
|
||||
2 files changed, 37 insertions(+), 46 deletions(-)
|
||||
|
||||
--- a/gprofng/src/Makefile.am
|
||||
+++ b/gprofng/src/Makefile.am
|
||||
@@ -124,7 +124,7 @@ BUILT_SOURCES = QLParser.tab.hh
|
||||
EXTRA_DIST = QLParser.yy $(man_MANS)
|
||||
|
||||
|
||||
-pkglib_LTLIBRARIES = $(LIBGPROFNG)
|
||||
+lib_LTLIBRARIES = $(LIBGPROFNG)
|
||||
libgprofng_la_SOURCES = $(CCSOURCES) $(CSOURCES)
|
||||
libgprofng_la_LDFLAGS = -version-info 0:0:0
|
||||
|
||||
@@ -215,9 +215,4 @@ endif
|
||||
# so ensure that the necessary libraries are built at dist time.
|
||||
dist-hook: $(LIBGPROFNG)
|
||||
|
||||
-.PHONY: install-data-local
|
||||
-
|
||||
-install-data-local: install-pkglibLTLIBRARIES
|
||||
- rm -f $(DESTDIR)/$(pkglibdir)/*.la $(DESTDIR)/$(pkglibdir)/*.a
|
||||
-
|
||||
$(srcdir)/DbeSession.cc: QLParser.tab.hh
|
||||
--- a/gprofng/src/Makefile.in
|
||||
+++ b/gprofng/src/Makefile.in
|
||||
@@ -155,9 +155,9 @@ am__uninstall_files_from_dir = { \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
-am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" \
|
||||
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
|
||||
"$(DESTDIR)$(man1dir)" "$(DESTDIR)$(dbedir)"
|
||||
-LTLIBRARIES = $(pkglib_LTLIBRARIES)
|
||||
+LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
am__DEPENDENCIES_1 =
|
||||
libgprofng_la_DEPENDENCIES = $(top_builddir)/../opcodes/libopcodes.la \
|
||||
$(top_builddir)/../bfd/libbfd.la $(am__DEPENDENCIES_1)
|
||||
@@ -548,7 +548,7 @@ AM_CFLAGS = $(GPROFNG_CFLAGS) $(PTHREAD_
|
||||
AM_CXXFLAGS = $(AM_CFLAGS)
|
||||
BUILT_SOURCES = QLParser.tab.hh
|
||||
EXTRA_DIST = QLParser.yy $(man_MANS)
|
||||
-pkglib_LTLIBRARIES = $(LIBGPROFNG)
|
||||
+lib_LTLIBRARIES = $(LIBGPROFNG)
|
||||
libgprofng_la_SOURCES = $(CCSOURCES) $(CSOURCES)
|
||||
libgprofng_la_LDFLAGS = -version-info 0:0:0
|
||||
|
||||
@@ -636,33 +636,33 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
-install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
|
||||
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
- @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
|
||||
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
list2=; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
list2="$$list2 $$p"; \
|
||||
else :; fi; \
|
||||
done; \
|
||||
test -z "$$list2" || { \
|
||||
- echo " $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'"; \
|
||||
- $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" || exit 1; \
|
||||
- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \
|
||||
- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \
|
||||
+ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
|
||||
+ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
|
||||
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
|
||||
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
|
||||
}
|
||||
|
||||
-uninstall-pkglibLTLIBRARIES:
|
||||
+uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
- @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
|
||||
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
|
||||
- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
|
||||
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
|
||||
done
|
||||
|
||||
-clean-pkglibLTLIBRARIES:
|
||||
- -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
|
||||
- @list='$(pkglib_LTLIBRARIES)'; \
|
||||
+clean-libLTLIBRARIES:
|
||||
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
+ @list='$(lib_LTLIBRARIES)'; \
|
||||
locs=`for p in $$list; do echo $$p; done | \
|
||||
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
|
||||
sort -u`; \
|
||||
@@ -672,7 +672,7 @@ clean-pkglibLTLIBRARIES:
|
||||
}
|
||||
|
||||
libgprofng.la: $(libgprofng_la_OBJECTS) $(libgprofng_la_DEPENDENCIES) $(EXTRA_libgprofng_la_DEPENDENCIES)
|
||||
- $(AM_V_CXXLD)$(libgprofng_la_LINK) -rpath $(pkglibdir) $(libgprofng_la_OBJECTS) $(libgprofng_la_LIBADD) $(LIBS)
|
||||
+ $(AM_V_CXXLD)$(libgprofng_la_LINK) -rpath $(libdir) $(libgprofng_la_OBJECTS) $(libgprofng_la_LIBADD) $(LIBS)
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
||||
@@ -1039,8 +1039,10 @@ check-am: all-am
|
||||
check: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-am
|
||||
all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(DATA)
|
||||
+install-binPROGRAMS: install-libLTLIBRARIES
|
||||
+
|
||||
installdirs:
|
||||
- for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(dbedir)"; do \
|
||||
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(dbedir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: $(BUILT_SOURCES)
|
||||
@@ -1078,8 +1080,8 @@ maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
clean: clean-am
|
||||
|
||||
-clean-am: clean-binPROGRAMS clean-generic clean-libtool \
|
||||
- clean-pkglibLTLIBRARIES mostlyclean-am
|
||||
+clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \
|
||||
+ clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
@@ -1099,13 +1101,13 @@ info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
-install-data-am: install-data-local install-dbeDATA install-man
|
||||
+install-data-am: install-dbeDATA install-man
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
-install-exec-am: install-binPROGRAMS install-pkglibLTLIBRARIES
|
||||
+install-exec-am: install-binPROGRAMS install-libLTLIBRARIES
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
@@ -1145,30 +1147,29 @@ ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
-uninstall-am: uninstall-binPROGRAMS uninstall-dbeDATA uninstall-man \
|
||||
- uninstall-pkglibLTLIBRARIES
|
||||
+uninstall-am: uninstall-binPROGRAMS uninstall-dbeDATA \
|
||||
+ uninstall-libLTLIBRARIES uninstall-man
|
||||
|
||||
uninstall-man: uninstall-man1
|
||||
|
||||
.MAKE: all check install install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
|
||||
- clean-binPROGRAMS clean-generic clean-libtool \
|
||||
- clean-pkglibLTLIBRARIES cscopelist-am ctags ctags-am dist-hook \
|
||||
- distclean distclean-compile distclean-generic \
|
||||
- distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
- html-am info info-am install install-am install-binPROGRAMS \
|
||||
- install-data install-data-am install-data-local \
|
||||
- install-dbeDATA install-dvi install-dvi-am install-exec \
|
||||
- install-exec-am install-html install-html-am install-info \
|
||||
- install-info-am install-man install-man1 install-pdf \
|
||||
- install-pdf-am install-pkglibLTLIBRARIES install-ps \
|
||||
+ clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \
|
||||
+ clean-libtool cscopelist-am ctags ctags-am dist-hook distclean \
|
||||
+ distclean-compile distclean-generic distclean-libtool \
|
||||
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
+ install install-am install-binPROGRAMS install-data \
|
||||
+ install-data-am install-dbeDATA install-dvi install-dvi-am \
|
||||
+ install-exec install-exec-am install-html install-html-am \
|
||||
+ install-info install-info-am install-libLTLIBRARIES \
|
||||
+ install-man install-man1 install-pdf install-pdf-am install-ps \
|
||||
install-ps-am install-strip installcheck installcheck-am \
|
||||
installdirs maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
|
||||
uninstall-am uninstall-binPROGRAMS uninstall-dbeDATA \
|
||||
- uninstall-man uninstall-man1 uninstall-pkglibLTLIBRARIES
|
||||
+ uninstall-libLTLIBRARIES uninstall-man uninstall-man1
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
@@ -1198,11 +1199,6 @@ QLParser.tab.cc QLParser.tab.hh: QLParse
|
||||
# so ensure that the necessary libraries are built at dist time.
|
||||
dist-hook: $(LIBGPROFNG)
|
||||
|
||||
-.PHONY: install-data-local
|
||||
-
|
||||
-install-data-local: install-pkglibLTLIBRARIES
|
||||
- rm -f $(DESTDIR)/$(pkglibdir)/*.la $(DESTDIR)/$(pkglibdir)/*.a
|
||||
-
|
||||
$(srcdir)/DbeSession.cc: QLParser.tab.hh
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
@@ -0,0 +1,115 @@
|
||||
From 27f59ec47a18277b6ea3548f405263ef558f5217 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Beulich <jbeulich@suse.com>
|
||||
Date: Tue, 31 Jan 2023 09:47:22 +0100
|
||||
Subject: [PATCH 26/50] RISC-V: make C-extension JAL available again for
|
||||
(32-bit) assembly
|
||||
|
||||
Along with the normal JAL alias, the C-extension one should have been
|
||||
moved as well by 839189bc932e ("RISC-V: re-arrange opcode table for
|
||||
consistent alias handling"), for the assembler to actually be able to
|
||||
use it where/when possible.
|
||||
|
||||
Since neither this nor any other compressed branch insn was being tested
|
||||
so far, take the opportunity and introduce a new testcase covering those.
|
||||
---
|
||||
gas/config/tc-riscv.c | 3 +++
|
||||
gas/testsuite/gas/riscv/c-branch-na.d | 20 ++++++++++++++++++++
|
||||
gas/testsuite/gas/riscv/c-branch.d | 19 +++++++++++++++++++
|
||||
gas/testsuite/gas/riscv/c-branch.s | 11 +++++++++++
|
||||
opcodes/riscv-opc.c | 2 +-
|
||||
5 files changed, 54 insertions(+), 1 deletion(-)
|
||||
create mode 100644 gas/testsuite/gas/riscv/c-branch-na.d
|
||||
create mode 100644 gas/testsuite/gas/riscv/c-branch.d
|
||||
create mode 100644 gas/testsuite/gas/riscv/c-branch.s
|
||||
|
||||
--- a/gas/config/tc-riscv.c
|
||||
+++ b/gas/config/tc-riscv.c
|
||||
@@ -2762,6 +2762,8 @@ riscv_ip (char *str, struct riscv_cl_ins
|
||||
case 'p':
|
||||
goto branch;
|
||||
case 'a':
|
||||
+ if (oparg == insn->args + 1)
|
||||
+ goto jump_check_gpr;
|
||||
goto jump;
|
||||
case 'S': /* Floating-point RS1 x8-x15. */
|
||||
if (!reg_lookup (&asarg, RCLASS_FPR, ®no)
|
||||
@@ -3271,6 +3273,7 @@ riscv_ip (char *str, struct riscv_cl_ins
|
||||
but the 2nd (with 2 operands) might. */
|
||||
if (oparg == insn->args)
|
||||
{
|
||||
+ jump_check_gpr:
|
||||
asargStart = asarg;
|
||||
if (reg_lookup (&asarg, RCLASS_GPR, NULL)
|
||||
&& (*asarg == ',' || (ISSPACE (*asarg) && asarg[1] == ',')))
|
||||
--- /dev/null
|
||||
+++ b/gas/testsuite/gas/riscv/c-branch-na.d
|
||||
@@ -0,0 +1,20 @@
|
||||
+#as: -march=rv32ic
|
||||
+#source: c-branch.s
|
||||
+#objdump: -drw -Mno-aliases
|
||||
+
|
||||
+.*:[ ]+file format .*
|
||||
+
|
||||
+
|
||||
+Disassembly of section .text:
|
||||
+
|
||||
+0+ <target>:
|
||||
+[ ]+[0-9a-f]+:[ ]+c001[ ]+c\.beqz[ ]+s0,0 <target>[ ]+0: R_RISCV_RVC_BRANCH .*
|
||||
+[ ]+[0-9a-f]+:[ ]+dcfd[ ]+c\.beqz[ ]+s1,0 <target>[ ]+2: R_RISCV_RVC_BRANCH .*
|
||||
+[ ]+[0-9a-f]+:[ ]+fc75[ ]+c\.bnez[ ]+s0,0 <target>[ ]+4: R_RISCV_RVC_BRANCH .*
|
||||
+[ ]+[0-9a-f]+:[ ]+fced[ ]+c\.bnez[ ]+s1,0 <target>[ ]+6: R_RISCV_RVC_BRANCH .*
|
||||
+[ ]+[0-9a-f]+:[ ]+bfe5[ ]+c\.j[ ]+0 <target>[ ]+8: R_RISCV_RVC_JUMP .*
|
||||
+[ ]+[0-9a-f]+:[ ]+3fdd[ ]+c\.jal[ ]+0 <target>[ ]+a: R_RISCV_RVC_JUMP .*
|
||||
+[ ]+[0-9a-f]+:[ ]+9302[ ]+c\.jalr[ ]+t1
|
||||
+[ ]+[0-9a-f]+:[ ]+8382[ ]+c\.jr[ ]+t2
|
||||
+[ ]+[0-9a-f]+:[ ]+8082[ ]+c\.jr[ ]+ra
|
||||
+#...
|
||||
--- /dev/null
|
||||
+++ b/gas/testsuite/gas/riscv/c-branch.d
|
||||
@@ -0,0 +1,19 @@
|
||||
+#as: -march=rv64ic
|
||||
+#objdump: -drw
|
||||
+
|
||||
+.*:[ ]+file format .*
|
||||
+
|
||||
+
|
||||
+Disassembly of section .text:
|
||||
+
|
||||
+0+ <target>:
|
||||
+[ ]+[0-9a-f]+:[ ]+c001[ ]+beqz[ ]+s0,0 <target>[ ]+0: R_RISCV_RVC_BRANCH .*
|
||||
+[ ]+[0-9a-f]+:[ ]+dcfd[ ]+beqz[ ]+s1,0 <target>[ ]+2: R_RISCV_RVC_BRANCH .*
|
||||
+[ ]+[0-9a-f]+:[ ]+fc75[ ]+bnez[ ]+s0,0 <target>[ ]+4: R_RISCV_RVC_BRANCH .*
|
||||
+[ ]+[0-9a-f]+:[ ]+fced[ ]+bnez[ ]+s1,0 <target>[ ]+6: R_RISCV_RVC_BRANCH .*
|
||||
+[ ]+[0-9a-f]+:[ ]+bfe5[ ]+j[ ]+0 <target>[ ]+8: R_RISCV_RVC_JUMP .*
|
||||
+[ ]+[0-9a-f]+:[ ]+ff7ff0ef[ ]+jal[ ]+0 <target>[ ]+a: R_RISCV_JAL .*
|
||||
+[ ]+[0-9a-f]+:[ ]+9302[ ]+jalr[ ]+t1
|
||||
+[ ]+[0-9a-f]+:[ ]+8382[ ]+jr[ ]+t2
|
||||
+[ ]+[0-9a-f]+:[ ]+8082[ ]+ret
|
||||
+#...
|
||||
--- /dev/null
|
||||
+++ b/gas/testsuite/gas/riscv/c-branch.s
|
||||
@@ -0,0 +1,11 @@
|
||||
+ .text
|
||||
+target:
|
||||
+ beq x8, x0, target
|
||||
+ beqz x9, target
|
||||
+ bne x8, x0, target
|
||||
+ bnez x9, target
|
||||
+ j target
|
||||
+ jal target
|
||||
+ jalr x6
|
||||
+ jr x7
|
||||
+ ret
|
||||
--- a/opcodes/riscv-opc.c
|
||||
+++ b/opcodes/riscv-opc.c
|
||||
@@ -340,9 +340,9 @@ const struct riscv_opcode riscv_opcodes[
|
||||
{"jalr", 0, INSN_CLASS_I, "d,s,j", MATCH_JALR, MASK_JALR, match_opcode, INSN_JSR },
|
||||
{"j", 0, INSN_CLASS_C, "Ca", MATCH_C_J, MASK_C_J, match_opcode, INSN_ALIAS|INSN_BRANCH },
|
||||
{"j", 0, INSN_CLASS_I, "a", MATCH_JAL, MASK_JAL|MASK_RD, match_opcode, INSN_ALIAS|INSN_BRANCH },
|
||||
+{"jal", 32, INSN_CLASS_C, "Ca", MATCH_C_JAL, MASK_C_JAL, match_opcode, INSN_ALIAS|INSN_JSR },
|
||||
{"jal", 0, INSN_CLASS_I, "a", MATCH_JAL|(X_RA << OP_SH_RD), MASK_JAL|MASK_RD, match_opcode, INSN_ALIAS|INSN_JSR },
|
||||
{"jal", 0, INSN_CLASS_I, "d,a", MATCH_JAL, MASK_JAL, match_opcode, INSN_JSR },
|
||||
-{"jal", 32, INSN_CLASS_C, "Ca", MATCH_C_JAL, MASK_C_JAL, match_opcode, INSN_ALIAS|INSN_JSR },
|
||||
{"call", 0, INSN_CLASS_I, "d,c", (X_T1 << OP_SH_RS1), (int) M_CALL, match_never, INSN_MACRO },
|
||||
{"call", 0, INSN_CLASS_I, "c", (X_RA << OP_SH_RS1)|(X_RA << OP_SH_RD), (int) M_CALL, match_never, INSN_MACRO },
|
||||
{"tail", 0, INSN_CLASS_I, "c", (X_T1 << OP_SH_RS1), (int) M_CALL, match_never, INSN_MACRO },
|
||||
@@ -0,0 +1,209 @@
|
||||
From 3e888977f165594cf44dbe8f67e3a4960b22c11f Mon Sep 17 00:00:00 2001
|
||||
From: "Guillermo E. Martinez" <guillermo.e.martinez@oracle.com>
|
||||
Date: Fri, 3 Feb 2023 11:17:49 -0600
|
||||
Subject: [PATCH 34/50] bpf: fix error conversion from long unsigned int to
|
||||
unsigned int [-Werror=overflow]
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Regenerating BPF target using the maintainer mode emits:
|
||||
.../opcodes/bpf-opc.c:57:11: error: conversion from ‘long unsigned int’ to ‘unsigned int’ changes value from ‘18446744073709486335’ to ‘4294902015’ [-Werror=overflow]
|
||||
57 | 64, 64, 0xffffffffffff00ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
|
||||
The use of a narrow size to handle the mask CGEN in instruction format
|
||||
is causing this error. Additionally eBPF `call' instructions
|
||||
constructed by expressions using symbols (BPF_PSEUDO_CALL) emits
|
||||
annotations in `src' field of the instruction, used to identify BPF
|
||||
target endianness.
|
||||
|
||||
cpu/
|
||||
* bpf.cpu (define-call-insn): Remove `src' field from
|
||||
instruction mask.
|
||||
|
||||
include/
|
||||
*opcode/cge.h (CGEN_IFMT): Adjust mask bit width.
|
||||
|
||||
opcodes/
|
||||
* bpf-opc.c: Regenerate.
|
||||
|
||||
(cherry picked from commit 7f6ebecd56e690012b05af0a492280765b17f186)
|
||||
---
|
||||
cpu/bpf.cpu | 2 +-
|
||||
include/opcode/cgen.h | 2 +-
|
||||
opcodes/bpf-opc.c | 54 +++++++++++++++++++++++--------------------
|
||||
opcodes/cgen-dis.c | 2 +-
|
||||
4 files changed, 32 insertions(+), 28 deletions(-)
|
||||
|
||||
--- a/cpu/bpf.cpu
|
||||
+++ b/cpu/bpf.cpu
|
||||
@@ -768,7 +768,7 @@
|
||||
"call"
|
||||
(endian-isas x-endian)
|
||||
"call $disp32"
|
||||
- (+ disp32 (f-offset16 0) (f-regs 0)
|
||||
+ (+ disp32 (f-offset16 0) (.sym src x-endian) ((.sym f-dst x-endian) 0)
|
||||
OP_CLASS_JMP OP_SRC_K OP_CODE_CALL)
|
||||
(c-call VOID
|
||||
"bpfbf_call" disp32 (ifield (.sym f-src x-endian)))
|
||||
--- a/include/opcode/cgen.h
|
||||
+++ b/include/opcode/cgen.h
|
||||
@@ -914,7 +914,7 @@ typedef struct
|
||||
Each insn's value is stored with the insn.
|
||||
The first step in recognizing an insn for disassembly is
|
||||
(opcode & mask) == value. */
|
||||
- CGEN_INSN_INT mask;
|
||||
+ CGEN_INSN_LGUINT mask;
|
||||
#define CGEN_IFMT_MASK(ifmt) ((ifmt)->mask)
|
||||
|
||||
/* Instruction fields.
|
||||
--- a/opcodes/bpf-opc.c
|
||||
+++ b/opcodes/bpf-opc.c
|
||||
@@ -50,99 +50,103 @@ static const CGEN_IFMT ifmt_empty ATTRIB
|
||||
};
|
||||
|
||||
static const CGEN_IFMT ifmt_addile ATTRIBUTE_UNUSED = {
|
||||
- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+ 64, 64, 0xfffff0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
};
|
||||
|
||||
static const CGEN_IFMT ifmt_addrle ATTRIBUTE_UNUSED = {
|
||||
- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+ 64, 64, 0xffffffffffff00ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
};
|
||||
|
||||
static const CGEN_IFMT ifmt_negle ATTRIBUTE_UNUSED = {
|
||||
- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+ 64, 64, 0xfffffffffffff0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
};
|
||||
|
||||
static const CGEN_IFMT ifmt_addibe ATTRIBUTE_UNUSED = {
|
||||
- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+ 64, 64, 0xffff0fff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
};
|
||||
|
||||
static const CGEN_IFMT ifmt_addrbe ATTRIBUTE_UNUSED = {
|
||||
- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+ 64, 64, 0xffffffffffff00ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
};
|
||||
|
||||
static const CGEN_IFMT ifmt_negbe ATTRIBUTE_UNUSED = {
|
||||
- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+ 64, 64, 0xffffffffffff0fff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
};
|
||||
|
||||
static const CGEN_IFMT ifmt_endlele ATTRIBUTE_UNUSED = {
|
||||
- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+ 64, 64, 0xfffff0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
};
|
||||
|
||||
static const CGEN_IFMT ifmt_endlebe ATTRIBUTE_UNUSED = {
|
||||
- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+ 64, 64, 0xffff0fff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
};
|
||||
|
||||
static const CGEN_IFMT ifmt_lddwle ATTRIBUTE_UNUSED = {
|
||||
- 64, 128, 0xff, { { F (F_IMM64) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+ 64, 128, 0xfffff0ff, { { F (F_IMM64) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
};
|
||||
|
||||
static const CGEN_IFMT ifmt_lddwbe ATTRIBUTE_UNUSED = {
|
||||
- 64, 128, 0xff, { { F (F_IMM64) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+ 64, 128, 0xffff0fff, { { F (F_IMM64) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
};
|
||||
|
||||
static const CGEN_IFMT ifmt_ldabsw ATTRIBUTE_UNUSED = {
|
||||
- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+ 64, 64, 0xffffffff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
};
|
||||
|
||||
static const CGEN_IFMT ifmt_ldindwle ATTRIBUTE_UNUSED = {
|
||||
- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+ 64, 64, 0xffff0fff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
};
|
||||
|
||||
static const CGEN_IFMT ifmt_ldindwbe ATTRIBUTE_UNUSED = {
|
||||
- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+ 64, 64, 0xfffff0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
};
|
||||
|
||||
static const CGEN_IFMT ifmt_ldxwle ATTRIBUTE_UNUSED = {
|
||||
- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+ 64, 64, 0xffffffff000000ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
};
|
||||
|
||||
static const CGEN_IFMT ifmt_ldxwbe ATTRIBUTE_UNUSED = {
|
||||
- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+ 64, 64, 0xffffffff000000ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
};
|
||||
|
||||
static const CGEN_IFMT ifmt_stble ATTRIBUTE_UNUSED = {
|
||||
- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+ 64, 64, 0xf0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
};
|
||||
|
||||
static const CGEN_IFMT ifmt_stbbe ATTRIBUTE_UNUSED = {
|
||||
- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+ 64, 64, 0xfff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
};
|
||||
|
||||
static const CGEN_IFMT ifmt_jeqile ATTRIBUTE_UNUSED = {
|
||||
- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+ 64, 64, 0xf0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
};
|
||||
|
||||
static const CGEN_IFMT ifmt_jeqrle ATTRIBUTE_UNUSED = {
|
||||
- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+ 64, 64, 0xffffffff000000ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
};
|
||||
|
||||
static const CGEN_IFMT ifmt_jeqibe ATTRIBUTE_UNUSED = {
|
||||
- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+ 64, 64, 0xfff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
};
|
||||
|
||||
static const CGEN_IFMT ifmt_jeqrbe ATTRIBUTE_UNUSED = {
|
||||
- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+ 64, 64, 0xffffffff000000ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
};
|
||||
|
||||
static const CGEN_IFMT ifmt_callle ATTRIBUTE_UNUSED = {
|
||||
- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_CODE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+ 64, 64, 0xffff0fff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+};
|
||||
+
|
||||
+static const CGEN_IFMT ifmt_callbe ATTRIBUTE_UNUSED = {
|
||||
+ 64, 64, 0xfffff0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
};
|
||||
|
||||
static const CGEN_IFMT ifmt_ja ATTRIBUTE_UNUSED = {
|
||||
- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_CODE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+ 64, 64, 0xffffffff0000ffff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_CODE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
};
|
||||
|
||||
static const CGEN_IFMT ifmt_exit ATTRIBUTE_UNUSED = {
|
||||
- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_CODE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
+ 64, 64, 0xffffffffffffffff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_CODE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
|
||||
};
|
||||
|
||||
#undef F
|
||||
@@ -1646,7 +1650,7 @@ static const CGEN_OPCODE bpf_cgen_insn_o
|
||||
{
|
||||
{ 0, 0, 0, 0 },
|
||||
{ { MNEM, ' ', OP (DISP32), 0 } },
|
||||
- & ifmt_callle, { 0x85 }
|
||||
+ & ifmt_callbe, { 0x85 }
|
||||
},
|
||||
/* call $dstle */
|
||||
{
|
||||
--- a/opcodes/cgen-dis.c
|
||||
+++ b/opcodes/cgen-dis.c
|
||||
@@ -39,7 +39,7 @@ static void add_insn_to_hash_chain (CG
|
||||
static int
|
||||
count_decodable_bits (const CGEN_INSN *insn)
|
||||
{
|
||||
- unsigned mask = CGEN_INSN_BASE_MASK (insn);
|
||||
+ CGEN_INSN_LGUINT mask = CGEN_INSN_BASE_MASK (insn);
|
||||
#if GCC_VERSION >= 3004
|
||||
return __builtin_popcount (mask);
|
||||
#else
|
||||
@@ -0,0 +1,50 @@
|
||||
From e1815414077347097e5bf0d75162add955e241d9 Mon Sep 17 00:00:00 2001
|
||||
From: Romain Geissler <romain.geissler@amadeus.com>
|
||||
Date: Sun, 5 Feb 2023 13:56:34 +0000
|
||||
Subject: [PATCH 35/50] Pass $JANSSON_LIBS and $ZSTD_LIBS to
|
||||
ld-bootstrap/bootrap.exp
|
||||
|
||||
---
|
||||
ld/Makefile.am | 1 +
|
||||
ld/Makefile.in | 1 +
|
||||
ld/testsuite/ld-bootstrap/bootstrap.exp | 4 ++--
|
||||
3 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/ld/Makefile.am
|
||||
+++ b/ld/Makefile.am
|
||||
@@ -992,6 +992,7 @@ check-DEJAGNU: site.exp
|
||||
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
|
||||
OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" CTFLIB="$(TESTCTFLIB) $(ZLIB)" \
|
||||
SFRAMELIB="$(TESTSFRAMELIB)" \
|
||||
+ JANSSON_LIBS="$(JANSSON_LIBS)" ZSTD_LIBS="$(ZSTD_LIBS)" \
|
||||
LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \
|
||||
DO_COMPARE="`echo '$(do_compare)' | sed -e 's,\\$$,,g'`" \
|
||||
$(RUNTESTFLAGS); \
|
||||
--- a/ld/Makefile.in
|
||||
+++ b/ld/Makefile.in
|
||||
@@ -2645,6 +2645,7 @@ check-DEJAGNU: site.exp
|
||||
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
|
||||
OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" CTFLIB="$(TESTCTFLIB) $(ZLIB)" \
|
||||
SFRAMELIB="$(TESTSFRAMELIB)" \
|
||||
+ JANSSON_LIBS="$(JANSSON_LIBS)" ZSTD_LIBS="$(ZSTD_LIBS)" \
|
||||
LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \
|
||||
DO_COMPARE="`echo '$(do_compare)' | sed -e 's,\\$$,,g'`" \
|
||||
$(RUNTESTFLAGS); \
|
||||
--- a/ld/testsuite/ld-bootstrap/bootstrap.exp
|
||||
+++ b/ld/testsuite/ld-bootstrap/bootstrap.exp
|
||||
@@ -162,13 +162,13 @@ foreach flags $test_flags {
|
||||
}
|
||||
|
||||
if { [lindex [remote_exec build grep "-q \"HAVE_ZSTD 1\" config.h" ] 0] == 0 } then {
|
||||
- set extralibs "$extralibs -lzstd"
|
||||
+ set extralibs "$extralibs $ZSTD_LIBS"
|
||||
}
|
||||
|
||||
# Check if the system's jansson library is used. If so, the object files will
|
||||
# be using symbols from it, so link to it.
|
||||
if { [lindex [remote_exec build grep "-q \"HAVE_JANSSON 1\" config.h" ] 0] == 0 } then {
|
||||
- set extralibs "$extralibs -ljansson"
|
||||
+ set extralibs "$extralibs $JANSSON_LIBS"
|
||||
}
|
||||
|
||||
# Plugin support requires linking with libdl.
|
||||
714
toolchain/binutils/patches/2.40/036-Regen-config-files.patch
Normal file
714
toolchain/binutils/patches/2.40/036-Regen-config-files.patch
Normal file
@@ -0,0 +1,714 @@
|
||||
From 1fc096a4c590f28e0efb1823cdca653f2db9de74 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Mon, 6 Feb 2023 10:48:59 +1030
|
||||
Subject: [PATCH 36/50] Regen config files
|
||||
|
||||
For the version update to 2.40.0
|
||||
---
|
||||
bfd/configure | 20 ++++++++++----------
|
||||
binutils/configure | 20 ++++++++++----------
|
||||
gas/configure | 20 ++++++++++----------
|
||||
gprof/configure | 20 ++++++++++----------
|
||||
gprofng/configure | 20 ++++++++++----------
|
||||
gprofng/doc/version.texi | 8 ++++----
|
||||
gprofng/libcollector/configure | 20 ++++++++++----------
|
||||
intl/configure | 3 +++
|
||||
ld/configure | 20 ++++++++++----------
|
||||
opcodes/configure | 20 ++++++++++----------
|
||||
10 files changed, 87 insertions(+), 84 deletions(-)
|
||||
|
||||
--- a/bfd/configure
|
||||
+++ b/bfd/configure
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
-# Generated by GNU Autoconf 2.69 for bfd 2.40.
|
||||
+# Generated by GNU Autoconf 2.69 for bfd 2.40.0.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
@@ -587,8 +587,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='bfd'
|
||||
PACKAGE_TARNAME='bfd'
|
||||
-PACKAGE_VERSION='2.40'
|
||||
-PACKAGE_STRING='bfd 2.40'
|
||||
+PACKAGE_VERSION='2.40.0'
|
||||
+PACKAGE_STRING='bfd 2.40.0'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -1400,7 +1400,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
-\`configure' configures bfd 2.40 to adapt to many kinds of systems.
|
||||
+\`configure' configures bfd 2.40.0 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1471,7 +1471,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
- short | recursive ) echo "Configuration of bfd 2.40:";;
|
||||
+ short | recursive ) echo "Configuration of bfd 2.40.0:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1608,7 +1608,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
-bfd configure 2.40
|
||||
+bfd configure 2.40.0
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -2202,7 +2202,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
-It was created by bfd $as_me 2.40, which was
|
||||
+It was created by bfd $as_me 2.40.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -3184,7 +3184,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='bfd'
|
||||
- VERSION='2.40'
|
||||
+ VERSION='2.40.0'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -15906,7 +15906,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
-This file was extended by bfd $as_me 2.40, which was
|
||||
+This file was extended by bfd $as_me 2.40.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -15972,7 +15972,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
-bfd config.status 2.40
|
||||
+bfd config.status 2.40.0
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
--- a/binutils/configure
|
||||
+++ b/binutils/configure
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
-# Generated by GNU Autoconf 2.69 for binutils 2.40.
|
||||
+# Generated by GNU Autoconf 2.69 for binutils 2.40.0.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
@@ -587,8 +587,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='binutils'
|
||||
PACKAGE_TARNAME='binutils'
|
||||
-PACKAGE_VERSION='2.40'
|
||||
-PACKAGE_STRING='binutils 2.40'
|
||||
+PACKAGE_VERSION='2.40.0'
|
||||
+PACKAGE_STRING='binutils 2.40.0'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -1401,7 +1401,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
-\`configure' configures binutils 2.40 to adapt to many kinds of systems.
|
||||
+\`configure' configures binutils 2.40.0 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1472,7 +1472,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
- short | recursive ) echo "Configuration of binutils 2.40:";;
|
||||
+ short | recursive ) echo "Configuration of binutils 2.40.0:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1631,7 +1631,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
-binutils configure 2.40
|
||||
+binutils configure 2.40.0
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -2099,7 +2099,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
-It was created by binutils $as_me 2.40, which was
|
||||
+It was created by binutils $as_me 2.40.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -3081,7 +3081,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='binutils'
|
||||
- VERSION='2.40'
|
||||
+ VERSION='2.40.0'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -15326,7 +15326,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
-This file was extended by binutils $as_me 2.40, which was
|
||||
+This file was extended by binutils $as_me 2.40.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -15392,7 +15392,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
-binutils config.status 2.40
|
||||
+binutils config.status 2.40.0
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
--- a/gas/configure
|
||||
+++ b/gas/configure
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
-# Generated by GNU Autoconf 2.69 for gas 2.40.
|
||||
+# Generated by GNU Autoconf 2.69 for gas 2.40.0.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
@@ -587,8 +587,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='gas'
|
||||
PACKAGE_TARNAME='gas'
|
||||
-PACKAGE_VERSION='2.40'
|
||||
-PACKAGE_STRING='gas 2.40'
|
||||
+PACKAGE_VERSION='2.40.0'
|
||||
+PACKAGE_STRING='gas 2.40.0'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -1381,7 +1381,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
-\`configure' configures gas 2.40 to adapt to many kinds of systems.
|
||||
+\`configure' configures gas 2.40.0 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1452,7 +1452,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
- short | recursive ) echo "Configuration of gas 2.40:";;
|
||||
+ short | recursive ) echo "Configuration of gas 2.40.0:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1600,7 +1600,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
-gas configure 2.40
|
||||
+gas configure 2.40.0
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -2011,7 +2011,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
-It was created by gas $as_me 2.40, which was
|
||||
+It was created by gas $as_me 2.40.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -2990,7 +2990,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='gas'
|
||||
- VERSION='2.40'
|
||||
+ VERSION='2.40.0'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -14910,7 +14910,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
-This file was extended by gas $as_me 2.40, which was
|
||||
+This file was extended by gas $as_me 2.40.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -14976,7 +14976,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
-gas config.status 2.40
|
||||
+gas config.status 2.40.0
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
--- a/gprof/configure
|
||||
+++ b/gprof/configure
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
-# Generated by GNU Autoconf 2.69 for gprof 2.40.
|
||||
+# Generated by GNU Autoconf 2.69 for gprof 2.40.0.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
@@ -587,8 +587,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='gprof'
|
||||
PACKAGE_TARNAME='gprof'
|
||||
-PACKAGE_VERSION='2.40'
|
||||
-PACKAGE_STRING='gprof 2.40'
|
||||
+PACKAGE_VERSION='2.40.0'
|
||||
+PACKAGE_STRING='gprof 2.40.0'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -1338,7 +1338,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
-\`configure' configures gprof 2.40 to adapt to many kinds of systems.
|
||||
+\`configure' configures gprof 2.40.0 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1409,7 +1409,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
- short | recursive ) echo "Configuration of gprof 2.40:";;
|
||||
+ short | recursive ) echo "Configuration of gprof 2.40.0:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1520,7 +1520,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
-gprof configure 2.40
|
||||
+gprof configure 2.40.0
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -1885,7 +1885,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
-It was created by gprof $as_me 2.40, which was
|
||||
+It was created by gprof $as_me 2.40.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -2864,7 +2864,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='gprof'
|
||||
- VERSION='2.40'
|
||||
+ VERSION='2.40.0'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -12572,7 +12572,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
-This file was extended by gprof $as_me 2.40, which was
|
||||
+This file was extended by gprof $as_me 2.40.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -12638,7 +12638,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
-gprof config.status 2.40
|
||||
+gprof config.status 2.40.0
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
--- a/gprofng/configure
|
||||
+++ b/gprofng/configure
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
-# Generated by GNU Autoconf 2.69 for gprofng 2.40.
|
||||
+# Generated by GNU Autoconf 2.69 for gprofng 2.40.0.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
@@ -587,8 +587,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='gprofng'
|
||||
PACKAGE_TARNAME='gprofng'
|
||||
-PACKAGE_VERSION='2.40'
|
||||
-PACKAGE_STRING='gprofng 2.40'
|
||||
+PACKAGE_VERSION='2.40.0'
|
||||
+PACKAGE_STRING='gprofng 2.40.0'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -1364,7 +1364,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
-\`configure' configures gprofng 2.40 to adapt to many kinds of systems.
|
||||
+\`configure' configures gprofng 2.40.0 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1435,7 +1435,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
- short | recursive ) echo "Configuration of gprofng 2.40:";;
|
||||
+ short | recursive ) echo "Configuration of gprofng 2.40.0:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1549,7 +1549,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
-gprofng configure 2.40
|
||||
+gprofng configure 2.40.0
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -2081,7 +2081,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
-It was created by gprofng $as_me 2.40, which was
|
||||
+It was created by gprofng $as_me 2.40.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -3054,7 +3054,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='gprofng'
|
||||
- VERSION='2.40'
|
||||
+ VERSION='2.40.0'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -17528,7 +17528,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
-This file was extended by gprofng $as_me 2.40, which was
|
||||
+This file was extended by gprofng $as_me 2.40.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -17594,7 +17594,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
-gprofng config.status 2.40
|
||||
+gprofng config.status 2.40.0
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
--- a/gprofng/doc/version.texi
|
||||
+++ b/gprofng/doc/version.texi
|
||||
@@ -1,4 +1,4 @@
|
||||
-@set UPDATED 5 January 2023
|
||||
-@set UPDATED-MONTH January 2023
|
||||
-@set EDITION 2.40
|
||||
-@set VERSION 2.40
|
||||
+@set UPDATED 1 February 2023
|
||||
+@set UPDATED-MONTH February 2023
|
||||
+@set EDITION 2.40.0
|
||||
+@set VERSION 2.40.0
|
||||
--- a/gprofng/libcollector/configure
|
||||
+++ b/gprofng/libcollector/configure
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
-# Generated by GNU Autoconf 2.69 for gprofng 2.40.
|
||||
+# Generated by GNU Autoconf 2.69 for gprofng 2.40.0.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
@@ -587,8 +587,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='gprofng'
|
||||
PACKAGE_TARNAME='gprofng'
|
||||
-PACKAGE_VERSION='2.40'
|
||||
-PACKAGE_STRING='gprofng 2.40'
|
||||
+PACKAGE_VERSION='2.40.0'
|
||||
+PACKAGE_STRING='gprofng 2.40.0'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -1325,7 +1325,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
-\`configure' configures gprofng 2.40 to adapt to many kinds of systems.
|
||||
+\`configure' configures gprofng 2.40.0 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1396,7 +1396,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
- short | recursive ) echo "Configuration of gprofng 2.40:";;
|
||||
+ short | recursive ) echo "Configuration of gprofng 2.40.0:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1505,7 +1505,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
-gprofng configure 2.40
|
||||
+gprofng configure 2.40.0
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -1991,7 +1991,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
-It was created by gprofng $as_me 2.40, which was
|
||||
+It was created by gprofng $as_me 2.40.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -2968,7 +2968,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='gprofng'
|
||||
- VERSION='2.40'
|
||||
+ VERSION='2.40.0'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -16098,7 +16098,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
-This file was extended by gprofng $as_me 2.40, which was
|
||||
+This file was extended by gprofng $as_me 2.40.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -16164,7 +16164,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
-gprofng config.status 2.40
|
||||
+gprofng config.status 2.40.0
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
--- a/intl/configure
|
||||
+++ b/intl/configure
|
||||
@@ -6857,6 +6857,9 @@ case "${host}" in
|
||||
# sets the default TLS model and affects inlining.
|
||||
PICFLAG=-fPIC
|
||||
;;
|
||||
+ loongarch*-*-*)
|
||||
+ PICFLAG=-fpic
|
||||
+ ;;
|
||||
mips-sgi-irix6*)
|
||||
# PIC is the default.
|
||||
;;
|
||||
--- a/ld/configure
|
||||
+++ b/ld/configure
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
-# Generated by GNU Autoconf 2.69 for ld 2.40.
|
||||
+# Generated by GNU Autoconf 2.69 for ld 2.40.0.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
@@ -587,8 +587,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='ld'
|
||||
PACKAGE_TARNAME='ld'
|
||||
-PACKAGE_VERSION='2.40'
|
||||
-PACKAGE_STRING='ld 2.40'
|
||||
+PACKAGE_VERSION='2.40.0'
|
||||
+PACKAGE_STRING='ld 2.40.0'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -1423,7 +1423,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
-\`configure' configures ld 2.40 to adapt to many kinds of systems.
|
||||
+\`configure' configures ld 2.40.0 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1494,7 +1494,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
- short | recursive ) echo "Configuration of ld 2.40:";;
|
||||
+ short | recursive ) echo "Configuration of ld 2.40.0:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1661,7 +1661,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
-ld configure 2.40
|
||||
+ld configure 2.40.0
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -2376,7 +2376,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
-It was created by ld $as_me 2.40, which was
|
||||
+It was created by ld $as_me 2.40.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -3359,7 +3359,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='ld'
|
||||
- VERSION='2.40'
|
||||
+ VERSION='2.40.0'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -18083,7 +18083,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
-This file was extended by ld $as_me 2.40, which was
|
||||
+This file was extended by ld $as_me 2.40.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -18149,7 +18149,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
-ld config.status 2.40
|
||||
+ld config.status 2.40.0
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
--- a/opcodes/configure
|
||||
+++ b/opcodes/configure
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
-# Generated by GNU Autoconf 2.69 for opcodes 2.40.
|
||||
+# Generated by GNU Autoconf 2.69 for opcodes 2.40.0.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
@@ -587,8 +587,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='opcodes'
|
||||
PACKAGE_TARNAME='opcodes'
|
||||
-PACKAGE_VERSION='2.40'
|
||||
-PACKAGE_STRING='opcodes 2.40'
|
||||
+PACKAGE_VERSION='2.40.0'
|
||||
+PACKAGE_STRING='opcodes 2.40.0'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -1360,7 +1360,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
-\`configure' configures opcodes 2.40 to adapt to many kinds of systems.
|
||||
+\`configure' configures opcodes 2.40.0 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1431,7 +1431,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
- short | recursive ) echo "Configuration of opcodes 2.40:";;
|
||||
+ short | recursive ) echo "Configuration of opcodes 2.40.0:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1545,7 +1545,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
-opcodes configure 2.40
|
||||
+opcodes configure 2.40.0
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -2139,7 +2139,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
-It was created by opcodes $as_me 2.40, which was
|
||||
+It was created by opcodes $as_me 2.40.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -3118,7 +3118,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='opcodes'
|
||||
- VERSION='2.40'
|
||||
+ VERSION='2.40.0'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -13191,7 +13191,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
-This file was extended by opcodes $as_me 2.40, which was
|
||||
+This file was extended by opcodes $as_me 2.40.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -13257,7 +13257,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
-opcodes config.status 2.40
|
||||
+opcodes config.status 2.40.0
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
From 17294931e3e361bee6810b1a39493e214b38c5e5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= <chigot@adacore.com>
|
||||
Date: Tue, 3 Jan 2023 14:24:43 +0100
|
||||
Subject: [PATCH 40/50] configure: remove dependencies on gmp and mpfr when gdb
|
||||
is disabled
|
||||
|
||||
Since 991180627851801f1999d1ebbc0e569a17e47c74, the configure checks
|
||||
about GMP and MPFR for gdb builds have been moved to the toplevel
|
||||
configure.
|
||||
However, it doesn't take into account the --disable-gdb option. Meaning
|
||||
that a build without gdb will require these libraries even if not
|
||||
needed.
|
||||
|
||||
ChangeLog:
|
||||
|
||||
* configure.ac: Skip GMP and MPFR when --disable-gdb is
|
||||
provided.
|
||||
* configure: Regenerate.
|
||||
|
||||
(cherry picked from commit 5fb0e308577143ceb313fde5538dc9ecb038f29f)
|
||||
---
|
||||
configure | 4 +++-
|
||||
configure.ac | 4 +++-
|
||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -8032,7 +8032,9 @@ if test -d ${srcdir}/gcc ; then
|
||||
require_mpc=yes
|
||||
fi
|
||||
if test -d ${srcdir}/gdb ; then
|
||||
- require_gmp=yes
|
||||
+ if test "x$enable_gdb" != xno; then
|
||||
+ require_gmp=yes
|
||||
+ fi
|
||||
fi
|
||||
|
||||
gmplibs="-lmpfr -lgmp"
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1585,7 +1585,9 @@ if test -d ${srcdir}/gcc ; then
|
||||
require_mpc=yes
|
||||
fi
|
||||
if test -d ${srcdir}/gdb ; then
|
||||
- require_gmp=yes
|
||||
+ if test "x$enable_gdb" != xno; then
|
||||
+ require_gmp=yes
|
||||
+ fi
|
||||
fi
|
||||
|
||||
gmplibs="-lmpfr -lgmp"
|
||||
@@ -0,0 +1,46 @@
|
||||
From b2bc62b7b4e7638c3a249d2d2728ceb4d5f2b22c Mon Sep 17 00:00:00 2001
|
||||
From: Jan Beulich <jbeulich@suse.com>
|
||||
Date: Tue, 14 Feb 2023 08:35:02 +0100
|
||||
Subject: [PATCH 46/50] gas: correct symbol name comparison in
|
||||
.startof./.sizeof. handling
|
||||
|
||||
In 162c6aef1f3a ("gas: fold symbol table entries generated for
|
||||
.startof.() / .sizeof.()") I screwed up quite badly, inverting the case
|
||||
sensitive and case insensitive comparison functions.
|
||||
---
|
||||
gas/expr.c | 4 ++--
|
||||
gas/testsuite/gas/elf/startof.d | 2 ++
|
||||
gas/testsuite/gas/elf/startof.s | 3 +++
|
||||
3 files changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/gas/expr.c
|
||||
+++ b/gas/expr.c
|
||||
@@ -149,8 +149,8 @@ symbol_lookup_or_make (const char *name,
|
||||
|
||||
name = S_GET_NAME (symbolP);
|
||||
if ((symbols_case_sensitive
|
||||
- ? strcasecmp (buf, name)
|
||||
- : strcmp (buf, name)) == 0)
|
||||
+ ? strcmp (buf, name)
|
||||
+ : strcasecmp (buf, name)) == 0)
|
||||
{
|
||||
free (buf);
|
||||
return symbolP;
|
||||
--- a/gas/testsuite/gas/elf/startof.d
|
||||
+++ b/gas/testsuite/gas/elf/startof.d
|
||||
@@ -7,4 +7,6 @@ Symbol table .*
|
||||
#...
|
||||
[1-8]: 0+ .* UND \.startof\.\.text
|
||||
[2-9]: 0+ .* UND \.sizeof\.\.text
|
||||
+ +[1-9][0-9]*: 0+ .* UND \.startof\.\.Text
|
||||
+ +[1-9][0-9]*: 0+ .* UND \.sizeof\.\.TEXT
|
||||
#pass
|
||||
--- a/gas/testsuite/gas/elf/startof.s
|
||||
+++ b/gas/testsuite/gas/elf/startof.s
|
||||
@@ -4,3 +4,6 @@
|
||||
.dc.a 0
|
||||
.dc.a .sizeof.(.text)
|
||||
.dc.a .startof.(.text)
|
||||
+ .dc.a 0
|
||||
+ .dc.a .startof.(.Text)
|
||||
+ .dc.a .sizeof.(.TEXT)
|
||||
@@ -0,0 +1,22 @@
|
||||
--- a/ld/Makefile.am
|
||||
+++ b/ld/Makefile.am
|
||||
@@ -50,7 +50,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.
|
||||
-scriptdir = $(tooldir)/lib
|
||||
+scriptdir = $(libdir)
|
||||
|
||||
EMUL = @EMUL@
|
||||
EMULATION_OFILES = @EMULATION_OFILES@
|
||||
--- a/ld/Makefile.in
|
||||
+++ b/ld/Makefile.in
|
||||
@@ -573,7 +573,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.
|
||||
-scriptdir = $(tooldir)/lib
|
||||
+scriptdir = $(libdir)
|
||||
BASEDIR = $(srcdir)/..
|
||||
BFDDIR = $(BASEDIR)/bfd
|
||||
INCDIR = $(BASEDIR)/include
|
||||
@@ -0,0 +1,18 @@
|
||||
--- a/bfd/elfxx-mips.c
|
||||
+++ b/bfd/elfxx-mips.c
|
||||
@@ -8119,6 +8119,7 @@ _bfd_mips_elf_create_dynamic_sections (b
|
||||
|
||||
name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING";
|
||||
bh = NULL;
|
||||
+ if (0) {
|
||||
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)))
|
||||
@@ -8131,6 +8132,7 @@ _bfd_mips_elf_create_dynamic_sections (b
|
||||
|
||||
if (! bfd_elf_link_record_dynamic_symbol (info, h))
|
||||
return false;
|
||||
+ }
|
||||
|
||||
if (! mips_elf_hash_table (info)->use_rld_obj_head)
|
||||
{
|
||||
@@ -0,0 +1,38 @@
|
||||
--- a/bfd/config.bfd
|
||||
+++ b/bfd/config.bfd
|
||||
@@ -944,12 +944,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*)
|
||||
- targ_defvec=mips_elf32_ntrad_le_vec
|
||||
- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec"
|
||||
+ targ_defvec=mips_elf64_trad_le_vec
|
||||
+ targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec"
|
||||
;;
|
||||
mips64*-*-linux*)
|
||||
- targ_defvec=mips_elf32_ntrad_be_vec
|
||||
- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
|
||||
+ targ_defvec=mips_elf64_trad_be_vec
|
||||
+ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec"
|
||||
;;
|
||||
mips*el-*-linux*)
|
||||
targ_defvec=mips_elf32_trad_le_vec
|
||||
--- a/ld/configure.tgt
|
||||
+++ b/ld/configure.tgt
|
||||
@@ -585,12 +585,12 @@ mips*-*-vxworks*) targ_emul=elf32ebmipvx
|
||||
;;
|
||||
mips*-*-windiss) targ_emul=elf32mipswindiss
|
||||
;;
|
||||
-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
|
||||
- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
|
||||
+mips64*el-*-linux-*) targ_emul=elf64ltsmip
|
||||
+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
-mips64*-*-linux-*) targ_emul=elf32btsmipn32
|
||||
- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
|
||||
+mips64*-*-linux-*) targ_emul=elf64btsmip
|
||||
+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
mips*el-*-linux-*) targ_emul=elf32ltsmip
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,218 @@
|
||||
From 3c6c32951e292a51ede70b8087bb0308d7dbc4fc Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Thu, 28 Mar 2024 20:33:32 +1030
|
||||
Subject: [PATCH 2/2] PR 30569, delete _bfd_mips_elf_early_size_sections
|
||||
|
||||
PR30569 was triggered by a patch of mine 6540edd52cc0 moving the call
|
||||
to always_size_sections in bfd_elf_size_dynamic_sections earlier, made
|
||||
to support the x86 DT_RELR implementation. This broke mips16 code
|
||||
handling stubs when --export-dynamic is passed to the linker, because
|
||||
numerous symbols then became dynamic after always_size_sections. The
|
||||
mips backend fiddles with symbols in its always_size_sections. Maciej
|
||||
in 902e9fc76a0e had moved the call to always_size_sections to after
|
||||
the export-dynamic code. Prior to that, Nathan in 04c3a75556c0 moved
|
||||
it before the exec stack code, back to the start of
|
||||
bfd_elf_size_dynamic_sections which was where Ian put it originally
|
||||
in ff12f303355b. So the call has moved around a little. I'm leaving
|
||||
it where it is, and instead calling mips_elf_check_symbols from
|
||||
late_size_sections (the old size_dynamic_sections) which is now always
|
||||
called. In fact, the whole of _bfd_mips_elf_early_size_sections can
|
||||
be merged into _bfd_mips_elf_late_size_sections.
|
||||
---
|
||||
bfd/elf32-mips.c | 1 -
|
||||
bfd/elf64-mips.c | 2 --
|
||||
bfd/elfn32-mips.c | 1 -
|
||||
bfd/elfxx-mips.c | 84 +++++++++++++++++++----------------------------
|
||||
bfd/elfxx-mips.h | 2 --
|
||||
5 files changed, 34 insertions(+), 56 deletions(-)
|
||||
|
||||
--- a/bfd/elf32-mips.c
|
||||
+++ b/bfd/elf32-mips.c
|
||||
@@ -2537,7 +2537,6 @@ static const struct ecoff_debug_swap mip
|
||||
#define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag
|
||||
#define elf_backend_adjust_dynamic_symbol \
|
||||
_bfd_mips_elf_adjust_dynamic_symbol
|
||||
-#define elf_backend_early_size_sections _bfd_mips_elf_early_size_sections
|
||||
#define elf_backend_late_size_sections _bfd_mips_elf_late_size_sections
|
||||
#define elf_backend_init_index_section _bfd_elf_init_1_index_section
|
||||
#define elf_backend_relocate_section _bfd_mips_elf_relocate_section
|
||||
--- a/bfd/elf64-mips.c
|
||||
+++ b/bfd/elf64-mips.c
|
||||
@@ -4748,8 +4748,6 @@ const struct elf_size_info mips_elf64_si
|
||||
#define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag
|
||||
#define elf_backend_adjust_dynamic_symbol \
|
||||
_bfd_mips_elf_adjust_dynamic_symbol
|
||||
-#define elf_backend_early_size_sections \
|
||||
- _bfd_mips_elf_early_size_sections
|
||||
#define elf_backend_late_size_sections \
|
||||
_bfd_mips_elf_late_size_sections
|
||||
#define elf_backend_init_index_section _bfd_elf_init_1_index_section
|
||||
--- a/bfd/elfn32-mips.c
|
||||
+++ b/bfd/elfn32-mips.c
|
||||
@@ -4138,7 +4138,6 @@ static const struct ecoff_debug_swap mip
|
||||
#define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag
|
||||
#define elf_backend_adjust_dynamic_symbol \
|
||||
_bfd_mips_elf_adjust_dynamic_symbol
|
||||
-#define elf_backend_early_size_sections _bfd_mips_elf_early_size_sections
|
||||
#define elf_backend_late_size_sections _bfd_mips_elf_late_size_sections
|
||||
#define elf_backend_init_index_section _bfd_elf_init_1_index_section
|
||||
#define elf_backend_relocate_section _bfd_mips_elf_relocate_section
|
||||
--- a/bfd/elfxx-mips.c
|
||||
+++ b/bfd/elfxx-mips.c
|
||||
@@ -9639,48 +9639,6 @@ _bfd_mips_elf_adjust_dynamic_symbol (str
|
||||
return _bfd_elf_adjust_dynamic_copy (info, h, s);
|
||||
}
|
||||
|
||||
-/* This function is called after all the input files have been read,
|
||||
- and the input sections have been assigned to output sections. We
|
||||
- check for any mips16 stub sections that we can discard. */
|
||||
-
|
||||
-bool
|
||||
-_bfd_mips_elf_early_size_sections (bfd *output_bfd,
|
||||
- struct bfd_link_info *info)
|
||||
-{
|
||||
- asection *sect;
|
||||
- struct mips_elf_link_hash_table *htab;
|
||||
- struct mips_htab_traverse_info hti;
|
||||
-
|
||||
- htab = mips_elf_hash_table (info);
|
||||
- BFD_ASSERT (htab != NULL);
|
||||
-
|
||||
- /* The .reginfo section has a fixed size. */
|
||||
- sect = bfd_get_section_by_name (output_bfd, ".reginfo");
|
||||
- if (sect != NULL)
|
||||
- {
|
||||
- bfd_set_section_size (sect, sizeof (Elf32_External_RegInfo));
|
||||
- sect->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
|
||||
- }
|
||||
-
|
||||
- /* The .MIPS.abiflags section has a fixed size. */
|
||||
- sect = bfd_get_section_by_name (output_bfd, ".MIPS.abiflags");
|
||||
- if (sect != NULL)
|
||||
- {
|
||||
- bfd_set_section_size (sect, sizeof (Elf_External_ABIFlags_v0));
|
||||
- sect->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
|
||||
- }
|
||||
-
|
||||
- hti.info = info;
|
||||
- hti.output_bfd = output_bfd;
|
||||
- hti.error = false;
|
||||
- mips_elf_link_hash_traverse (mips_elf_hash_table (info),
|
||||
- mips_elf_check_symbols, &hti);
|
||||
- if (hti.error)
|
||||
- return false;
|
||||
-
|
||||
- return true;
|
||||
-}
|
||||
-
|
||||
/* If the link uses a GOT, lay it out and work out its size. */
|
||||
|
||||
static bool
|
||||
@@ -9985,7 +9943,8 @@ mips_elf_set_plt_sym_value (struct mips_
|
||||
return true;
|
||||
}
|
||||
|
||||
-/* Set the sizes of the dynamic sections. */
|
||||
+/* Set the sizes of the dynamic sections, some mips non-dynamic sections,
|
||||
+ and check for any mips16 stub sections that we can discard. */
|
||||
|
||||
bool
|
||||
_bfd_mips_elf_late_size_sections (bfd *output_bfd,
|
||||
@@ -9995,14 +9954,39 @@ _bfd_mips_elf_late_size_sections (bfd *o
|
||||
asection *s, *sreldyn;
|
||||
bool reltext;
|
||||
struct mips_elf_link_hash_table *htab;
|
||||
+ struct mips_htab_traverse_info hti;
|
||||
|
||||
htab = mips_elf_hash_table (info);
|
||||
BFD_ASSERT (htab != NULL);
|
||||
- dynobj = elf_hash_table (info)->dynobj;
|
||||
+
|
||||
+ /* The .reginfo section has a fixed size. */
|
||||
+ s = bfd_get_section_by_name (output_bfd, ".reginfo");
|
||||
+ if (s != NULL)
|
||||
+ {
|
||||
+ bfd_set_section_size (s, sizeof (Elf32_External_RegInfo));
|
||||
+ s->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
|
||||
+ }
|
||||
+
|
||||
+ /* The .MIPS.abiflags section has a fixed size. */
|
||||
+ s = bfd_get_section_by_name (output_bfd, ".MIPS.abiflags");
|
||||
+ if (s != NULL)
|
||||
+ {
|
||||
+ bfd_set_section_size (s, sizeof (Elf_External_ABIFlags_v0));
|
||||
+ s->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
|
||||
+ }
|
||||
+
|
||||
+ hti.info = info;
|
||||
+ hti.output_bfd = output_bfd;
|
||||
+ hti.error = false;
|
||||
+ mips_elf_link_hash_traverse (htab, mips_elf_check_symbols, &hti);
|
||||
+ if (hti.error)
|
||||
+ return false;
|
||||
+
|
||||
+ dynobj = htab->root.dynobj;
|
||||
if (dynobj == NULL)
|
||||
return true;
|
||||
|
||||
- if (elf_hash_table (info)->dynamic_sections_created)
|
||||
+ if (htab->root.dynamic_sections_created)
|
||||
{
|
||||
/* Set the contents of the .interp section to the interpreter. */
|
||||
if (bfd_link_executable (info) && !info->nointerp)
|
||||
@@ -10142,7 +10126,7 @@ _bfd_mips_elf_late_size_sections (bfd *o
|
||||
}
|
||||
}
|
||||
else if (bfd_link_executable (info)
|
||||
- && ! mips_elf_hash_table (info)->use_rld_obj_head
|
||||
+ && !htab->use_rld_obj_head
|
||||
&& startswith (name, ".rld_map"))
|
||||
{
|
||||
/* We add a room for __rld_map. It will be filled in by the
|
||||
@@ -10151,7 +10135,7 @@ _bfd_mips_elf_late_size_sections (bfd *o
|
||||
}
|
||||
else if (SGI_COMPAT (output_bfd)
|
||||
&& startswith (name, ".compact_rel"))
|
||||
- s->size += mips_elf_hash_table (info)->compact_rel_size;
|
||||
+ s->size += htab->compact_rel_size;
|
||||
else if (s == htab->root.splt)
|
||||
{
|
||||
/* If the last PLT entry has a branch delay slot, allocate
|
||||
@@ -10191,7 +10175,7 @@ _bfd_mips_elf_late_size_sections (bfd *o
|
||||
}
|
||||
}
|
||||
|
||||
- if (elf_hash_table (info)->dynamic_sections_created)
|
||||
+ if (htab->root.dynamic_sections_created)
|
||||
{
|
||||
/* Add some entries to the .dynamic section. We fill in the
|
||||
values later, in _bfd_mips_elf_finish_dynamic_sections, but we
|
||||
@@ -14934,7 +14918,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str
|
||||
input_section->flags &= ~SEC_HAS_CONTENTS;
|
||||
}
|
||||
|
||||
- /* Size has been set in _bfd_mips_elf_early_size_sections. */
|
||||
+ /* Size has been set in _bfd_mips_elf_late_size_sections. */
|
||||
BFD_ASSERT(o->size == sizeof (Elf_External_ABIFlags_v0));
|
||||
|
||||
/* Skip this section later on (I don't think this currently
|
||||
@@ -14993,7 +14977,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str
|
||||
input_section->flags &= ~SEC_HAS_CONTENTS;
|
||||
}
|
||||
|
||||
- /* Size has been set in _bfd_mips_elf_early_size_sections. */
|
||||
+ /* Size has been set in _bfd_mips_elf_late_size_sections. */
|
||||
BFD_ASSERT(o->size == sizeof (Elf32_External_RegInfo));
|
||||
|
||||
/* Skip this section later on (I don't think this currently
|
||||
--- a/bfd/elfxx-mips.h
|
||||
+++ b/bfd/elfxx-mips.h
|
||||
@@ -67,8 +67,6 @@ extern bool _bfd_mips_elf_check_relocs
|
||||
(bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
|
||||
extern bool _bfd_mips_elf_adjust_dynamic_symbol
|
||||
(struct bfd_link_info *, struct elf_link_hash_entry *);
|
||||
-extern bool _bfd_mips_elf_early_size_sections
|
||||
- (bfd *, struct bfd_link_info *);
|
||||
extern bool _bfd_mips_elf_late_size_sections
|
||||
(bfd *, struct bfd_link_info *);
|
||||
extern int _bfd_mips_elf_relocate_section
|
||||
@@ -0,0 +1,22 @@
|
||||
--- a/ld/Makefile.am
|
||||
+++ b/ld/Makefile.am
|
||||
@@ -50,7 +50,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.
|
||||
-scriptdir = $(tooldir)/lib
|
||||
+scriptdir = $(libdir)
|
||||
|
||||
EMUL = @EMUL@
|
||||
EMULATION_OFILES = @EMULATION_OFILES@
|
||||
--- a/ld/Makefile.in
|
||||
+++ b/ld/Makefile.in
|
||||
@@ -573,7 +573,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.
|
||||
-scriptdir = $(tooldir)/lib
|
||||
+scriptdir = $(libdir)
|
||||
BASEDIR = $(srcdir)/..
|
||||
BFDDIR = $(BASEDIR)/bfd
|
||||
INCDIR = $(BASEDIR)/include
|
||||
@@ -0,0 +1,18 @@
|
||||
--- a/bfd/elfxx-mips.c
|
||||
+++ b/bfd/elfxx-mips.c
|
||||
@@ -8144,6 +8144,7 @@ _bfd_mips_elf_create_dynamic_sections (b
|
||||
|
||||
name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING";
|
||||
bh = NULL;
|
||||
+ if (0) {
|
||||
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)))
|
||||
@@ -8156,6 +8157,7 @@ _bfd_mips_elf_create_dynamic_sections (b
|
||||
|
||||
if (! bfd_elf_link_record_dynamic_symbol (info, h))
|
||||
return false;
|
||||
+ }
|
||||
|
||||
if (! mips_elf_hash_table (info)->use_rld_obj_head)
|
||||
{
|
||||
@@ -0,0 +1,48 @@
|
||||
--- a/bfd/config.bfd
|
||||
+++ b/bfd/config.bfd
|
||||
@@ -947,8 +947,8 @@ case "${targ}" in
|
||||
want64=true
|
||||
;;
|
||||
mips64*el-*-linux*)
|
||||
- targ_defvec=mips_elf32_ntrad_le_vec
|
||||
- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec"
|
||||
+ targ_defvec=mips_elf64_trad_le_vec
|
||||
+ targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec"
|
||||
;;
|
||||
mips64*-*-linux*-gnuabi64)
|
||||
targ_defvec=mips_elf64_trad_be_vec
|
||||
@@ -956,8 +956,8 @@ case "${targ}" in
|
||||
want64=true
|
||||
;;
|
||||
mips64*-*-linux*)
|
||||
- targ_defvec=mips_elf32_ntrad_be_vec
|
||||
- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
|
||||
+ targ_defvec=mips_elf64_trad_be_vec
|
||||
+ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec"
|
||||
;;
|
||||
mips*el-*-linux*)
|
||||
targ_defvec=mips_elf32_trad_le_vec
|
||||
--- a/ld/configure.tgt
|
||||
+++ b/ld/configure.tgt
|
||||
@@ -585,8 +585,8 @@ mips64*el-*-linux-gnuabi64)
|
||||
targ_extra_emuls="elf64btsmip elf32ltsmipn32 elf32btsmipn32 elf32ltsmip elf32btsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
|
||||
- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
|
||||
+mips64*el-*-linux-*) targ_emul=elf64ltsmip
|
||||
+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
mips64*-*-linux-gnuabi64)
|
||||
@@ -594,8 +594,8 @@ mips64*-*-linux-gnuabi64)
|
||||
targ_extra_emuls="elf64ltsmip elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
-mips64*-*-linux-*) targ_emul=elf32btsmipn32
|
||||
- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
|
||||
+mips64*-*-linux-*) targ_emul=elf64btsmip
|
||||
+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
mips*el-*-linux-*) targ_emul=elf32ltsmip
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,218 @@
|
||||
From 3c6c32951e292a51ede70b8087bb0308d7dbc4fc Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Thu, 28 Mar 2024 20:33:32 +1030
|
||||
Subject: [PATCH 2/2] PR 30569, delete _bfd_mips_elf_early_size_sections
|
||||
|
||||
PR30569 was triggered by a patch of mine 6540edd52cc0 moving the call
|
||||
to always_size_sections in bfd_elf_size_dynamic_sections earlier, made
|
||||
to support the x86 DT_RELR implementation. This broke mips16 code
|
||||
handling stubs when --export-dynamic is passed to the linker, because
|
||||
numerous symbols then became dynamic after always_size_sections. The
|
||||
mips backend fiddles with symbols in its always_size_sections. Maciej
|
||||
in 902e9fc76a0e had moved the call to always_size_sections to after
|
||||
the export-dynamic code. Prior to that, Nathan in 04c3a75556c0 moved
|
||||
it before the exec stack code, back to the start of
|
||||
bfd_elf_size_dynamic_sections which was where Ian put it originally
|
||||
in ff12f303355b. So the call has moved around a little. I'm leaving
|
||||
it where it is, and instead calling mips_elf_check_symbols from
|
||||
late_size_sections (the old size_dynamic_sections) which is now always
|
||||
called. In fact, the whole of _bfd_mips_elf_early_size_sections can
|
||||
be merged into _bfd_mips_elf_late_size_sections.
|
||||
---
|
||||
bfd/elf32-mips.c | 1 -
|
||||
bfd/elf64-mips.c | 2 --
|
||||
bfd/elfn32-mips.c | 1 -
|
||||
bfd/elfxx-mips.c | 84 +++++++++++++++++++----------------------------
|
||||
bfd/elfxx-mips.h | 2 --
|
||||
5 files changed, 34 insertions(+), 56 deletions(-)
|
||||
|
||||
--- a/bfd/elf32-mips.c
|
||||
+++ b/bfd/elf32-mips.c
|
||||
@@ -2537,7 +2537,6 @@ static const struct ecoff_debug_swap mip
|
||||
#define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag
|
||||
#define elf_backend_adjust_dynamic_symbol \
|
||||
_bfd_mips_elf_adjust_dynamic_symbol
|
||||
-#define elf_backend_early_size_sections _bfd_mips_elf_early_size_sections
|
||||
#define elf_backend_late_size_sections _bfd_mips_elf_late_size_sections
|
||||
#define elf_backend_init_index_section _bfd_elf_init_1_index_section
|
||||
#define elf_backend_relocate_section _bfd_mips_elf_relocate_section
|
||||
--- a/bfd/elf64-mips.c
|
||||
+++ b/bfd/elf64-mips.c
|
||||
@@ -4748,8 +4748,6 @@ const struct elf_size_info mips_elf64_si
|
||||
#define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag
|
||||
#define elf_backend_adjust_dynamic_symbol \
|
||||
_bfd_mips_elf_adjust_dynamic_symbol
|
||||
-#define elf_backend_early_size_sections \
|
||||
- _bfd_mips_elf_early_size_sections
|
||||
#define elf_backend_late_size_sections \
|
||||
_bfd_mips_elf_late_size_sections
|
||||
#define elf_backend_init_index_section _bfd_elf_init_1_index_section
|
||||
--- a/bfd/elfn32-mips.c
|
||||
+++ b/bfd/elfn32-mips.c
|
||||
@@ -4138,7 +4138,6 @@ static const struct ecoff_debug_swap mip
|
||||
#define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag
|
||||
#define elf_backend_adjust_dynamic_symbol \
|
||||
_bfd_mips_elf_adjust_dynamic_symbol
|
||||
-#define elf_backend_early_size_sections _bfd_mips_elf_early_size_sections
|
||||
#define elf_backend_late_size_sections _bfd_mips_elf_late_size_sections
|
||||
#define elf_backend_init_index_section _bfd_elf_init_1_index_section
|
||||
#define elf_backend_relocate_section _bfd_mips_elf_relocate_section
|
||||
--- a/bfd/elfxx-mips.c
|
||||
+++ b/bfd/elfxx-mips.c
|
||||
@@ -9644,48 +9644,6 @@ _bfd_mips_elf_adjust_dynamic_symbol (str
|
||||
return _bfd_elf_adjust_dynamic_copy (info, h, s);
|
||||
}
|
||||
|
||||
-/* This function is called after all the input files have been read,
|
||||
- and the input sections have been assigned to output sections. We
|
||||
- check for any mips16 stub sections that we can discard. */
|
||||
-
|
||||
-bool
|
||||
-_bfd_mips_elf_early_size_sections (bfd *output_bfd,
|
||||
- struct bfd_link_info *info)
|
||||
-{
|
||||
- asection *sect;
|
||||
- struct mips_elf_link_hash_table *htab;
|
||||
- struct mips_htab_traverse_info hti;
|
||||
-
|
||||
- htab = mips_elf_hash_table (info);
|
||||
- BFD_ASSERT (htab != NULL);
|
||||
-
|
||||
- /* The .reginfo section has a fixed size. */
|
||||
- sect = bfd_get_section_by_name (output_bfd, ".reginfo");
|
||||
- if (sect != NULL)
|
||||
- {
|
||||
- bfd_set_section_size (sect, sizeof (Elf32_External_RegInfo));
|
||||
- sect->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
|
||||
- }
|
||||
-
|
||||
- /* The .MIPS.abiflags section has a fixed size. */
|
||||
- sect = bfd_get_section_by_name (output_bfd, ".MIPS.abiflags");
|
||||
- if (sect != NULL)
|
||||
- {
|
||||
- bfd_set_section_size (sect, sizeof (Elf_External_ABIFlags_v0));
|
||||
- sect->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
|
||||
- }
|
||||
-
|
||||
- hti.info = info;
|
||||
- hti.output_bfd = output_bfd;
|
||||
- hti.error = false;
|
||||
- mips_elf_link_hash_traverse (mips_elf_hash_table (info),
|
||||
- mips_elf_check_symbols, &hti);
|
||||
- if (hti.error)
|
||||
- return false;
|
||||
-
|
||||
- return true;
|
||||
-}
|
||||
-
|
||||
/* If the link uses a GOT, lay it out and work out its size. */
|
||||
|
||||
static bool
|
||||
@@ -9990,7 +9948,8 @@ mips_elf_set_plt_sym_value (struct mips_
|
||||
return true;
|
||||
}
|
||||
|
||||
-/* Set the sizes of the dynamic sections. */
|
||||
+/* Set the sizes of the dynamic sections, some mips non-dynamic sections,
|
||||
+ and check for any mips16 stub sections that we can discard. */
|
||||
|
||||
bool
|
||||
_bfd_mips_elf_late_size_sections (bfd *output_bfd,
|
||||
@@ -10000,14 +9959,39 @@ _bfd_mips_elf_late_size_sections (bfd *o
|
||||
asection *s, *sreldyn;
|
||||
bool reltext;
|
||||
struct mips_elf_link_hash_table *htab;
|
||||
+ struct mips_htab_traverse_info hti;
|
||||
|
||||
htab = mips_elf_hash_table (info);
|
||||
BFD_ASSERT (htab != NULL);
|
||||
- dynobj = elf_hash_table (info)->dynobj;
|
||||
+
|
||||
+ /* The .reginfo section has a fixed size. */
|
||||
+ s = bfd_get_section_by_name (output_bfd, ".reginfo");
|
||||
+ if (s != NULL)
|
||||
+ {
|
||||
+ bfd_set_section_size (s, sizeof (Elf32_External_RegInfo));
|
||||
+ s->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
|
||||
+ }
|
||||
+
|
||||
+ /* The .MIPS.abiflags section has a fixed size. */
|
||||
+ s = bfd_get_section_by_name (output_bfd, ".MIPS.abiflags");
|
||||
+ if (s != NULL)
|
||||
+ {
|
||||
+ bfd_set_section_size (s, sizeof (Elf_External_ABIFlags_v0));
|
||||
+ s->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
|
||||
+ }
|
||||
+
|
||||
+ hti.info = info;
|
||||
+ hti.output_bfd = output_bfd;
|
||||
+ hti.error = false;
|
||||
+ mips_elf_link_hash_traverse (htab, mips_elf_check_symbols, &hti);
|
||||
+ if (hti.error)
|
||||
+ return false;
|
||||
+
|
||||
+ dynobj = htab->root.dynobj;
|
||||
if (dynobj == NULL)
|
||||
return true;
|
||||
|
||||
- if (elf_hash_table (info)->dynamic_sections_created)
|
||||
+ if (htab->root.dynamic_sections_created)
|
||||
{
|
||||
/* Set the contents of the .interp section to the interpreter. */
|
||||
if (bfd_link_executable (info) && !info->nointerp)
|
||||
@@ -10147,7 +10131,7 @@ _bfd_mips_elf_late_size_sections (bfd *o
|
||||
}
|
||||
}
|
||||
else if (bfd_link_executable (info)
|
||||
- && ! mips_elf_hash_table (info)->use_rld_obj_head
|
||||
+ && !htab->use_rld_obj_head
|
||||
&& startswith (name, ".rld_map"))
|
||||
{
|
||||
/* We add a room for __rld_map. It will be filled in by the
|
||||
@@ -10156,7 +10140,7 @@ _bfd_mips_elf_late_size_sections (bfd *o
|
||||
}
|
||||
else if (SGI_COMPAT (output_bfd)
|
||||
&& startswith (name, ".compact_rel"))
|
||||
- s->size += mips_elf_hash_table (info)->compact_rel_size;
|
||||
+ s->size += htab->compact_rel_size;
|
||||
else if (s == htab->root.splt)
|
||||
{
|
||||
/* If the last PLT entry has a branch delay slot, allocate
|
||||
@@ -10196,7 +10180,7 @@ _bfd_mips_elf_late_size_sections (bfd *o
|
||||
}
|
||||
}
|
||||
|
||||
- if (elf_hash_table (info)->dynamic_sections_created)
|
||||
+ if (htab->root.dynamic_sections_created)
|
||||
{
|
||||
/* Add some entries to the .dynamic section. We fill in the
|
||||
values later, in _bfd_mips_elf_finish_dynamic_sections, but we
|
||||
@@ -14939,7 +14923,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str
|
||||
input_section->flags &= ~SEC_HAS_CONTENTS;
|
||||
}
|
||||
|
||||
- /* Size has been set in _bfd_mips_elf_early_size_sections. */
|
||||
+ /* Size has been set in _bfd_mips_elf_late_size_sections. */
|
||||
BFD_ASSERT(o->size == sizeof (Elf_External_ABIFlags_v0));
|
||||
|
||||
/* Skip this section later on (I don't think this currently
|
||||
@@ -14998,7 +14982,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str
|
||||
input_section->flags &= ~SEC_HAS_CONTENTS;
|
||||
}
|
||||
|
||||
- /* Size has been set in _bfd_mips_elf_early_size_sections. */
|
||||
+ /* Size has been set in _bfd_mips_elf_late_size_sections. */
|
||||
BFD_ASSERT(o->size == sizeof (Elf32_External_RegInfo));
|
||||
|
||||
/* Skip this section later on (I don't think this currently
|
||||
--- a/bfd/elfxx-mips.h
|
||||
+++ b/bfd/elfxx-mips.h
|
||||
@@ -67,8 +67,6 @@ extern bool _bfd_mips_elf_check_relocs
|
||||
(bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
|
||||
extern bool _bfd_mips_elf_adjust_dynamic_symbol
|
||||
(struct bfd_link_info *, struct elf_link_hash_entry *);
|
||||
-extern bool _bfd_mips_elf_early_size_sections
|
||||
- (bfd *, struct bfd_link_info *);
|
||||
extern bool _bfd_mips_elf_late_size_sections
|
||||
(bfd *, struct bfd_link_info *);
|
||||
extern int _bfd_mips_elf_relocate_section
|
||||
@@ -0,0 +1,22 @@
|
||||
--- a/ld/Makefile.am
|
||||
+++ b/ld/Makefile.am
|
||||
@@ -50,7 +50,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CFLAGS)
|
||||
# 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.
|
||||
-scriptdir = $(tooldir)/lib
|
||||
+scriptdir = $(libdir)
|
||||
|
||||
EMUL = @EMUL@
|
||||
EMULATION_OFILES = @EMULATION_OFILES@
|
||||
--- a/ld/Makefile.in
|
||||
+++ b/ld/Makefile.in
|
||||
@@ -583,7 +583,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CFLAGS)
|
||||
# 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.
|
||||
-scriptdir = $(tooldir)/lib
|
||||
+scriptdir = $(libdir)
|
||||
BASEDIR = $(srcdir)/..
|
||||
BFDDIR = $(BASEDIR)/bfd
|
||||
INCDIR = $(BASEDIR)/include
|
||||
@@ -0,0 +1,18 @@
|
||||
--- a/bfd/elfxx-mips.c
|
||||
+++ b/bfd/elfxx-mips.c
|
||||
@@ -8149,6 +8149,7 @@ _bfd_mips_elf_create_dynamic_sections (b
|
||||
|
||||
name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING";
|
||||
bh = NULL;
|
||||
+ if (0) {
|
||||
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)))
|
||||
@@ -8161,6 +8162,7 @@ _bfd_mips_elf_create_dynamic_sections (b
|
||||
|
||||
if (! bfd_elf_link_record_dynamic_symbol (info, h))
|
||||
return false;
|
||||
+ }
|
||||
|
||||
if (! mips_elf_hash_table (info)->use_rld_obj_head)
|
||||
{
|
||||
@@ -0,0 +1,48 @@
|
||||
--- a/bfd/config.bfd
|
||||
+++ b/bfd/config.bfd
|
||||
@@ -962,8 +962,8 @@ case "${targ}" in
|
||||
want64=true
|
||||
;;
|
||||
mips64*el-*-linux*)
|
||||
- targ_defvec=mips_elf32_ntrad_le_vec
|
||||
- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec"
|
||||
+ targ_defvec=mips_elf64_trad_le_vec
|
||||
+ targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec"
|
||||
;;
|
||||
mips64*-*-linux*-gnuabi64)
|
||||
targ_defvec=mips_elf64_trad_be_vec
|
||||
@@ -971,8 +971,8 @@ case "${targ}" in
|
||||
want64=true
|
||||
;;
|
||||
mips64*-*-linux*)
|
||||
- targ_defvec=mips_elf32_ntrad_be_vec
|
||||
- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
|
||||
+ targ_defvec=mips_elf64_trad_be_vec
|
||||
+ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec"
|
||||
;;
|
||||
mips*el-*-linux*)
|
||||
targ_defvec=mips_elf32_trad_le_vec
|
||||
--- a/ld/configure.tgt
|
||||
+++ b/ld/configure.tgt
|
||||
@@ -597,8 +597,8 @@ mips64*el-*-linux-gnuabi64)
|
||||
targ_extra_emuls="elf64btsmip elf32ltsmipn32 elf32btsmipn32 elf32ltsmip elf32btsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
|
||||
- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
|
||||
+mips64*el-*-linux-*) targ_emul=elf64ltsmip
|
||||
+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
mips64*-*-linux-gnuabi64)
|
||||
@@ -606,8 +606,8 @@ mips64*-*-linux-gnuabi64)
|
||||
targ_extra_emuls="elf64ltsmip elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
-mips64*-*-linux-*) targ_emul=elf32btsmipn32
|
||||
- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
|
||||
+mips64*-*-linux-*) targ_emul=elf64btsmip
|
||||
+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
mips*el-*-linux-*) targ_emul=elf32ltsmip
|
||||
1
toolchain/build_version
Normal file
1
toolchain/build_version
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
28
toolchain/fortify-headers/Makefile
Normal file
28
toolchain/fortify-headers/Makefile
Normal file
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
PKG_NAME:=fortify-headers
|
||||
PKG_VERSION:=1.1
|
||||
PKG_RELEASE=3
|
||||
|
||||
PKG_SOURCE_URL:=https://dl.2f30.org/releases
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_HASH:=6ba5d860a2d2ba4c3346924b93930c34856eafe148bdbdf271ecab8065201fb6
|
||||
|
||||
include $(INCLUDE_DIR)/toolchain-build.mk
|
||||
|
||||
define Host/Compile
|
||||
true
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(MAKE) -C $(HOST_BUILD_DIR) PREFIX="" DESTDIR="$(TOOLCHAIN_DIR)" install
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
11
toolchain/fortify-headers/patches/001-__ppoll_time64.patch
Normal file
11
toolchain/fortify-headers/patches/001-__ppoll_time64.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/include/poll.h
|
||||
+++ b/include/poll.h
|
||||
@@ -39,7 +39,7 @@ _FORTIFY_FN(poll) int poll(struct pollfd
|
||||
return __orig_poll(__f, __n, __s);
|
||||
}
|
||||
|
||||
-#ifdef _GNU_SOURCE
|
||||
+#if defined(_GNU_SOURCE) && !(defined(_REDIR_TIME64) && _REDIR_TIME64)
|
||||
#undef ppoll
|
||||
_FORTIFY_FN(ppoll) int ppoll(struct pollfd *__f, nfds_t __n, const struct timespec *__s,
|
||||
const sigset_t *__m)
|
||||
@@ -0,0 +1,29 @@
|
||||
From 9ee4b9bd8df55ebbd5f6426fda4a36e1958b64c5 Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Van Parys <matthias.vanparys@softathome.com>
|
||||
Date: Mon, 10 Jul 2023 14:31:05 +0200
|
||||
Subject: [PATCH] strings.h: Add __extension__ mark to include_next to silence
|
||||
-pedantic
|
||||
|
||||
Add __extension__ before #include-next in strings.h as was done for all other header files in commits
|
||||
7fd984fcb532be01f68cddc194c09a7ca10c1ea6 and a9ffac8596b094da8563aa5dd5d81c946670afe
|
||||
---
|
||||
include/strings.h | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/include/strings.h b/include/strings.h
|
||||
index a16e1ad..d1902db 100644
|
||||
--- a/include/strings.h
|
||||
+++ b/include/strings.h
|
||||
@@ -16,6 +16,9 @@
|
||||
#ifndef _FORTIFY_STRINGS_H
|
||||
#define _FORTIFY_STRINGS_H
|
||||
|
||||
+#ifndef __cplusplus
|
||||
+__extension__
|
||||
+#endif
|
||||
#include_next <strings.h>
|
||||
|
||||
#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0
|
||||
--
|
||||
2.34.1
|
||||
|
||||
64
toolchain/gcc/Config.in
Normal file
64
toolchain/gcc/Config.in
Normal file
@@ -0,0 +1,64 @@
|
||||
# Choose gcc version.
|
||||
|
||||
choice
|
||||
prompt "GCC compiler Version" if TOOLCHAINOPTS
|
||||
default GCC_USE_VERSION_13
|
||||
help
|
||||
Select the version of gcc you wish to use.
|
||||
|
||||
config GCC_USE_VERSION_11
|
||||
bool "gcc 11.x"
|
||||
|
||||
config GCC_USE_VERSION_12
|
||||
bool "gcc 12.x"
|
||||
|
||||
config GCC_USE_VERSION_13
|
||||
bool "gcc 13.x"
|
||||
|
||||
config GCC_USE_VERSION_14
|
||||
bool "gcc 14.x"
|
||||
endchoice
|
||||
|
||||
config GCC_USE_GRAPHITE
|
||||
bool
|
||||
prompt "Compile in support for the new Graphite framework in GCC 4.4+" if TOOLCHAINOPTS
|
||||
|
||||
config EXTRA_GCC_CONFIG_OPTIONS
|
||||
string
|
||||
prompt "Additional gcc configure options" if TOOLCHAINOPTS
|
||||
default ""
|
||||
help
|
||||
Any additional gcc options you may want to include....
|
||||
|
||||
config GCC_DEFAULT_PIE
|
||||
bool
|
||||
prompt "Build executable with PIE enabled by default" if TOOLCHAINOPTS
|
||||
help
|
||||
Use gcc configure option --enable-default-pie to turn on -fPIE and -pie by default.
|
||||
|
||||
config GCC_DEFAULT_SSP
|
||||
bool
|
||||
prompt "Build executable with Stack-Smashing Protection enabled by default" if TOOLCHAINOPTS
|
||||
help
|
||||
Use gcc configure option --enable-default-ssp to turn on -fstack-protector-strong by default.
|
||||
|
||||
config SJLJ_EXCEPTIONS
|
||||
bool
|
||||
prompt "Use setjump()/longjump() exceptions" if TOOLCHAINOPTS
|
||||
help
|
||||
Use old setjump()/longjump() exceptions instead of the newer
|
||||
frame unwinding exceptions handling routines. Warning: increases
|
||||
code size and runtime memory usage.
|
||||
|
||||
config INSTALL_GFORTRAN
|
||||
bool
|
||||
prompt "Build/install fortran compiler?" if TOOLCHAINOPTS
|
||||
help
|
||||
Build/install GNU fortran compiler ?
|
||||
|
||||
config INSTALL_GCCGO
|
||||
bool
|
||||
prompt "Build/install Go compiler?" if TOOLCHAINOPTS
|
||||
depends on USE_GLIBC || BROKEN
|
||||
help
|
||||
Build/install GNU gccgo compiler ?
|
||||
24
toolchain/gcc/Config.version
Normal file
24
toolchain/gcc/Config.version
Normal file
@@ -0,0 +1,24 @@
|
||||
config GCC_VERSION_11
|
||||
default y if GCC_USE_VERSION_11
|
||||
bool
|
||||
|
||||
config GCC_VERSION_12
|
||||
default y if GCC_USE_VERSION_12
|
||||
bool
|
||||
|
||||
config GCC_VERSION_14
|
||||
default y if GCC_USE_VERSION_14
|
||||
bool
|
||||
|
||||
config GCC_VERSION
|
||||
string
|
||||
default EXTERNAL_GCC_VERSION if EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
|
||||
default "11.3.0" if GCC_VERSION_11
|
||||
default "12.3.0" if GCC_VERSION_12
|
||||
default "14.1.0" if GCC_VERSION_14
|
||||
default "13.3.0"
|
||||
|
||||
config GCC_USE_DEFAULT_VERSION
|
||||
bool
|
||||
default y if !TOOLCHAINOPTS || GCC_USE_VERSION_13
|
||||
imply KERNEL_WERROR
|
||||
238
toolchain/gcc/common.mk
Normal file
238
toolchain/gcc/common.mk
Normal file
@@ -0,0 +1,238 @@
|
||||
#
|
||||
# Copyright (C) 2002-2003 Erik Andersen <andersen@uclibc.org>
|
||||
# Copyright (C) 2004 Manuel Novoa III <mjn3@uclibc.org>
|
||||
# Copyright (C) 2005-2006 Felix Fietkau <nbd@nbd.name>
|
||||
# Copyright (C) 2006-2014 OpenWrt.org
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program 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
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gcc
|
||||
GCC_VERSION:=$(call qstrip,$(CONFIG_GCC_VERSION))
|
||||
PKG_VERSION:=$(firstword $(subst +, ,$(GCC_VERSION)))
|
||||
GCC_MAJOR_VERSION:=$(word 1,$(subst ., ,$(PKG_VERSION)))
|
||||
GCC_DIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_SOURCE_URL:=@GNU/gcc/gcc-$(PKG_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_CPE_ID:=cpe:/a:gnu:gcc
|
||||
|
||||
ifeq ($(PKG_VERSION),11.3.0)
|
||||
PKG_HASH:=b47cf2818691f5b1e21df2bb38c795fac2cfbd640ede2d0a5e1c89e338a3ac39
|
||||
endif
|
||||
|
||||
ifeq ($(PKG_VERSION),12.3.0)
|
||||
PKG_HASH:=949a5d4f99e786421a93b532b22ffab5578de7321369975b91aec97adfda8c3b
|
||||
endif
|
||||
|
||||
ifeq ($(PKG_VERSION),13.3.0)
|
||||
PKG_HASH:=0845e9621c9543a13f484e94584a49ffc0129970e9914624235fc1d061a0c083
|
||||
endif
|
||||
|
||||
ifeq ($(PKG_VERSION),14.1.0)
|
||||
PKG_HASH:=e283c654987afe3de9d8080bc0bd79534b5ca0d681a73a11ff2b5d3767426840
|
||||
endif
|
||||
|
||||
PATCH_DIR=../patches-$(GCC_MAJOR_VERSION).x
|
||||
|
||||
BUGURL=http://bugs.openwrt.org/
|
||||
PKGVERSION=OpenWrt GCC $(PKG_VERSION) $(REVISION)
|
||||
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/toolchain-build.mk
|
||||
|
||||
HOST_SOURCE_DIR:=$(HOST_BUILD_DIR)
|
||||
ifeq ($(GCC_VARIANT),minimal)
|
||||
GCC_BUILD_DIR:=$(HOST_BUILD_DIR)-$(GCC_VARIANT)
|
||||
else
|
||||
HOST_BUILD_DIR:=$(HOST_BUILD_DIR)-$(GCC_VARIANT)
|
||||
GCC_BUILD_DIR:=$(HOST_BUILD_DIR)
|
||||
endif
|
||||
|
||||
HOST_STAMP_PREPARED:=$(HOST_BUILD_DIR)/.prepared
|
||||
HOST_STAMP_BUILT:=$(GCC_BUILD_DIR)/.built
|
||||
HOST_STAMP_CONFIGURED:=$(GCC_BUILD_DIR)/.configured
|
||||
HOST_STAMP_INSTALLED:=$(HOST_BUILD_PREFIX)/stamp/.gcc_$(GCC_VARIANT)_installed
|
||||
|
||||
SEP:=,
|
||||
TARGET_LANGUAGES:="c,c++$(if $(CONFIG_INSTALL_GFORTRAN),$(SEP)fortran)$(if $(CONFIG_INSTALL_GCCGO),$(SEP)go)"
|
||||
|
||||
TAR_OPTIONS += \
|
||||
--exclude-from='$(CURDIR)/../exclude-testsuite' --exclude=gcc/ada/*.ad* \
|
||||
--exclude=libjava
|
||||
|
||||
# this needs to be without -L/-lzstd flags or other parts fail to build
|
||||
# use an absolute path to ensure it really picks up our version
|
||||
export ac_cv_search_ZSTD_compress=$(STAGING_DIR_HOST)/lib/libzstd.a -pthread
|
||||
export libgcc_cv_fixed_point=no
|
||||
ifdef CONFIG_INSTALL_GCCGO
|
||||
export libgo_cv_c_split_stack_supported=no
|
||||
endif
|
||||
|
||||
ifdef CONFIG_GCC_USE_GRAPHITE
|
||||
GRAPHITE_CONFIGURE:= --with-isl=$(STAGING_DIR_HOST)
|
||||
else
|
||||
GRAPHITE_CONFIGURE:= --without-isl --without-cloog
|
||||
endif
|
||||
|
||||
GCC_CONFIGURE:= \
|
||||
SHELL="$(BASH)" \
|
||||
$(HOST_SOURCE_DIR)/configure \
|
||||
--with-bugurl=$(BUGURL) \
|
||||
--with-pkgversion="$(PKGVERSION)" \
|
||||
--prefix=$(TOOLCHAIN_DIR) \
|
||||
--build=$(GNU_HOST_NAME) \
|
||||
--host=$(GNU_HOST_NAME) \
|
||||
--target=$(REAL_GNU_TARGET_NAME) \
|
||||
--with-gnu-ld \
|
||||
--enable-target-optspace \
|
||||
--disable-libgomp \
|
||||
--disable-libmudflap \
|
||||
--disable-multilib \
|
||||
--disable-libmpx \
|
||||
--disable-nls \
|
||||
--disable-libssp \
|
||||
$(GRAPHITE_CONFIGURE) \
|
||||
--with-host-libstdcxx=-lstdc++ \
|
||||
$(SOFT_FLOAT_CONFIG_OPTION) \
|
||||
$(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \
|
||||
$(if $(CONFIG_mips64)$(CONFIG_mips64el),--with-arch=mips64 \
|
||||
--with-abi=$(call qstrip,$(CONFIG_MIPS64_ABI))) \
|
||||
$(if $(CONFIG_arc),--with-cpu=$(CONFIG_CPU_TYPE)) \
|
||||
$(if $(CONFIG_powerpc64), $(if $(CONFIG_USE_MUSL),--with-abi=elfv2)) \
|
||||
--with-system-zlib=$(STAGING_DIR_HOST) \
|
||||
--with-zstd=$(STAGING_DIR_HOST) \
|
||||
--with-gmp=$(STAGING_DIR_HOST) \
|
||||
--with-mpfr=$(STAGING_DIR_HOST) \
|
||||
--with-mpc=$(STAGING_DIR_HOST) \
|
||||
--disable-decimal-float \
|
||||
--with-diagnostics-color=auto-if-env \
|
||||
--enable-__cxa_atexit \
|
||||
--enable-libstdcxx-dual-abi \
|
||||
--with-default-libstdcxx-abi=new
|
||||
ifneq ($(CONFIG_mips)$(CONFIG_mipsel),)
|
||||
GCC_CONFIGURE += --with-mips-plt
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_GCC_DEFAULT_PIE),)
|
||||
GCC_CONFIGURE+= \
|
||||
--enable-default-pie
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_GCC_DEFAULT_SSP),)
|
||||
GCC_CONFIGURE+= \
|
||||
--enable-default-ssp
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_EXTRA_TARGET_ARCH),)
|
||||
GCC_CONFIGURE+= \
|
||||
--enable-biarch \
|
||||
--enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-$(TARGET_SUFFIX)
|
||||
endif
|
||||
|
||||
ifdef CONFIG_sparc
|
||||
GCC_CONFIGURE+= \
|
||||
--enable-targets=all \
|
||||
--with-long-double-128
|
||||
endif
|
||||
|
||||
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)
|
||||
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)
|
||||
TARGET_CFLAGS+=-fno-split-stack
|
||||
endif
|
||||
|
||||
CFLAGS:=$(HOST_CFLAGS) -pipe
|
||||
ifneq ($(shell gcc --version 2>&1 | grep -E "Apple.(LLVM|clang)"),)
|
||||
CFLAGS+= -fbracket-depth=512
|
||||
endif
|
||||
|
||||
GCC_CONFIGURE+= \
|
||||
CFLAGS="$(CFLAGS)" \
|
||||
CXXFLAGS="$(CFLAGS)" \
|
||||
CFLAGS_FOR_TARGET="$(TARGET_CFLAGS)" \
|
||||
CXXFLAGS_FOR_TARGET="$(TARGET_CFLAGS)" \
|
||||
GOCFLAGS_FOR_TARGET="$(TARGET_CFLAGS)"
|
||||
|
||||
GCC_MAKE:= \
|
||||
export SHELL="$(BASH)"; \
|
||||
$(MAKE)
|
||||
|
||||
define Host/SetToolchainInfo
|
||||
$(SED) 's,TARGET_CROSS=.*,TARGET_CROSS=$(REAL_GNU_TARGET_NAME)-,' $(TOOLCHAIN_DIR)/info.mk
|
||||
$(SED) 's,GCC_VERSION=.*,GCC_VERSION=$(GCC_VERSION),' $(TOOLCHAIN_DIR)/info.mk
|
||||
endef
|
||||
|
||||
|
||||
ifeq ($(GCC_MAJOR_VERSION),11)
|
||||
GCC_VERSION_FILE:=gcc/version.c
|
||||
else
|
||||
GCC_VERSION_FILE:=gcc/genversion.cc
|
||||
endif
|
||||
|
||||
ifneq ($(GCC_PREPARE),)
|
||||
define Host/Prepare
|
||||
$(call Host/SetToolchainInfo)
|
||||
$(call Host/Prepare/Default)
|
||||
ln -snf $(GCC_DIR) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
|
||||
$(CP) $(SCRIPT_DIR)/config.{guess,sub} $(HOST_SOURCE_DIR)/
|
||||
$(SED) 's,^MULTILIB_OSDIRNAMES,# MULTILIB_OSDIRNAMES,' $(HOST_SOURCE_DIR)/gcc/config/*/t-*
|
||||
$(SED) 'd' $(HOST_SOURCE_DIR)/gcc/DEV-PHASE
|
||||
$(SED) 's, DATESTAMP,,' $(HOST_SOURCE_DIR)/$(GCC_VERSION_FILE)
|
||||
$(SED) 's,gcc_no_link=yes,gcc_no_link=no,' $(HOST_SOURCE_DIR)/libstdc++-v3/configure
|
||||
mkdir -p $(GCC_BUILD_DIR)
|
||||
endef
|
||||
else
|
||||
define Host/Prepare
|
||||
mkdir -p $(GCC_BUILD_DIR)
|
||||
endef
|
||||
endif
|
||||
|
||||
define Host/Configure
|
||||
(cd $(GCC_BUILD_DIR) && rm -f config.cache; \
|
||||
$(GCC_CONFIGURE) \
|
||||
);
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
rm -rf $(if $(GCC_PREPARE),$(HOST_SOURCE_DIR)) \
|
||||
$(HOST_BUILD_PREFIX)/stamp/.gcc_* \
|
||||
$(HOST_BUILD_PREFIX)/stamp/.binutils_* \
|
||||
$(GCC_BUILD_DIR) \
|
||||
$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) \
|
||||
$(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME) \
|
||||
$(TOOLCHAIN_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gc* \
|
||||
$(TOOLCHAIN_DIR)/bin/$(REAL_GNU_TARGET_NAME)-c*
|
||||
endef
|
||||
9
toolchain/gcc/exclude-testsuite
Normal file
9
toolchain/gcc/exclude-testsuite
Normal file
@@ -0,0 +1,9 @@
|
||||
gcc-*/gcc/testsuite/ada
|
||||
gcc-*/gcc/testsuite/brig.dg
|
||||
gcc-*/gcc/testsuite/c-c++-common
|
||||
gcc-*/gcc/testsuite/ChangeLog*
|
||||
gcc-*/gcc/testsuite/config
|
||||
gcc-*/gcc/testsuite/g*
|
||||
gcc-*/gcc/testsuite/jit.dg
|
||||
gcc-*/gcc/testsuite/lib
|
||||
gcc-*/gcc/testsuite/o*
|
||||
3
toolchain/gcc/files/alternate-arch-cc.in
Normal file
3
toolchain/gcc/files/alternate-arch-cc.in
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
exec @CC_BASE@ @EXTRA_ARCH_OPTS@ "$@"
|
||||
91
toolchain/gcc/final/Makefile
Normal file
91
toolchain/gcc/final/Makefile
Normal file
@@ -0,0 +1,91 @@
|
||||
GCC_VARIANT:=final
|
||||
|
||||
include ../common.mk
|
||||
|
||||
GCC_CONFIGURE += \
|
||||
--with-headers=$(TOOLCHAIN_DIR)/include \
|
||||
--enable-languages=$(TARGET_LANGUAGES) \
|
||||
--enable-shared \
|
||||
--enable-threads \
|
||||
--with-slibdir=$(TOOLCHAIN_DIR)/lib \
|
||||
--enable-plugins \
|
||||
--enable-lto \
|
||||
--with-libelf=$(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
|
||||
|
||||
ifneq ($(CONFIG_SJLJ_EXCEPTIONS),)
|
||||
GCC_CONFIGURE += \
|
||||
--enable-sjlj-exceptions
|
||||
endif
|
||||
|
||||
define CleanupToolchain
|
||||
$(INSTALL_DIR) $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)
|
||||
# Important! Required for limits.h to be fixed.
|
||||
rm -rf $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include
|
||||
ln -sf ../include $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include
|
||||
rm -rf $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/lib
|
||||
ln -sf ../lib $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/lib
|
||||
$(if $(CONFIG_ARCH_64BIT),ln -sf ../lib64 $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/lib64)
|
||||
endef
|
||||
|
||||
define Host/Configure
|
||||
$(CleanupToolchain)
|
||||
mkdir -p $(GCC_BUILD_DIR)
|
||||
(cd $(GCC_BUILD_DIR) && rm -f config.cache; \
|
||||
$(GCC_CONFIGURE) \
|
||||
);
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_USE_GLIBC)$(CONFIG_INSTALL_GCCGO),yy)
|
||||
define FixGogccCrt
|
||||
# link crtX.o for gotools
|
||||
mkdir -p $(GCC_BUILD_DIR)/gotools
|
||||
$(foreach crt, i 1 n, ln -sf ../../glibc-dev/lib/crt$(crt).o $(GCC_BUILD_DIR)/gotools/ ; )
|
||||
endef
|
||||
endif
|
||||
|
||||
define Host/Compile
|
||||
$(FixGogccCrt)
|
||||
+$(GCC_MAKE) $(HOST_JOBS) -C $(GCC_BUILD_DIR) all
|
||||
endef
|
||||
|
||||
define SetupExtraArch
|
||||
for app in $(TOOLCHAIN_DIR)/bin/$(OPTIMIZE_FOR_CPU)*-{gcc,gcc-*,g++}; do \
|
||||
[ -e $$$$app ] || continue; \
|
||||
old_base=$$$$(basename $$$$app); \
|
||||
new_base=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-$$$${old_base##$(OPTIMIZE_FOR_CPU)-}; \
|
||||
sed -e "s/@CC_BASE@/$$$$old_base/" \
|
||||
-e 's/@EXTRA_ARCH_OPTS@/$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_OPTS))/' \
|
||||
../files/alternate-arch-cc.in > \
|
||||
$(TOOLCHAIN_DIR)/bin/$$$$new_base; \
|
||||
chmod a+x $(TOOLCHAIN_DIR)/bin/$$$$new_base; \
|
||||
done
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(CleanupToolchain)
|
||||
+$(GCC_MAKE) $(HOST_JOBS) -C $(GCC_BUILD_DIR) install
|
||||
# Set up the symlinks to enable lying about target name.
|
||||
set -e; \
|
||||
(cd $(TOOLCHAIN_DIR); \
|
||||
ln -sf $(REAL_GNU_TARGET_NAME) $(GNU_TARGET_NAME); \
|
||||
cd bin; \
|
||||
for app in $(REAL_GNU_TARGET_NAME)-* ; do \
|
||||
ln -sf $$$${app} \
|
||||
$(GNU_TARGET_NAME)$$$${app##$(REAL_GNU_TARGET_NAME)}; \
|
||||
done; \
|
||||
);
|
||||
$(if $(CONFIG_EXTRA_TARGET_ARCH),$(call SetupExtraArch))
|
||||
$(RM) $(TOOLCHAIN_DIR)/lib/libiberty.a
|
||||
$(SCRIPT_DIR)/patch-specs.sh "$(TOOLCHAIN_DIR)"
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
||||
28
toolchain/gcc/initial/Makefile
Normal file
28
toolchain/gcc/initial/Makefile
Normal file
@@ -0,0 +1,28 @@
|
||||
GCC_VARIANT:=initial
|
||||
GCC_PREPARE=$(CONFIG_USE_MUSL)
|
||||
|
||||
include ../common.mk
|
||||
|
||||
GCC_CONFIGURE += \
|
||||
--with-newlib \
|
||||
--with-sysroot=$(TOOLCHAIN_DIR) \
|
||||
--enable-languages=c \
|
||||
--disable-shared \
|
||||
--disable-threads \
|
||||
|
||||
define Host/Compile
|
||||
+$(GCC_MAKE) $(HOST_JOBS) -C $(GCC_BUILD_DIR) \
|
||||
all-build-libiberty \
|
||||
all-gcc \
|
||||
all-target-libgcc
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
+$(GCC_MAKE) $(HOST_JOBS) -C $(GCC_BUILD_DIR) \
|
||||
install-gcc \
|
||||
install-target-libgcc
|
||||
|
||||
$(call FixupLibdir,$(TOOLCHAIN_DIR))
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
29
toolchain/gcc/minimal/Makefile
Normal file
29
toolchain/gcc/minimal/Makefile
Normal file
@@ -0,0 +1,29 @@
|
||||
GCC_VARIANT:=minimal
|
||||
GCC_PREPARE=$(if $(CONFIG_USE_MUSL),,1)
|
||||
|
||||
include ../common.mk
|
||||
|
||||
GCC_CONFIGURE += \
|
||||
--with-newlib \
|
||||
--without-headers \
|
||||
--enable-languages=c \
|
||||
--disable-libsanitizer \
|
||||
--disable-libssp \
|
||||
--disable-shared \
|
||||
--disable-threads
|
||||
|
||||
define Host/Compile
|
||||
+$(GCC_MAKE) $(HOST_JOBS) -C $(GCC_BUILD_DIR) all-gcc all-target-libgcc
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(GCC_MAKE) -C $(GCC_BUILD_DIR) install-gcc install-target-libgcc
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
rm -rf \
|
||||
$(HOST_BUILD_DIR) \
|
||||
$(GCC_BUILD_DIR)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
24
toolchain/gcc/patches-11.x/002-case_insensitive.patch
Normal file
24
toolchain/gcc/patches-11.x/002-case_insensitive.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
commit 81cc26c706b2bc8c8c1eb1a322e5c5157900836e
|
||||
Author: Felix Fietkau <nbd@openwrt.org>
|
||||
Date: Sun Oct 19 21:45:51 2014 +0000
|
||||
|
||||
gcc: do not assume that the Mac OS X filesystem is case insensitive
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
||||
|
||||
SVN-Revision: 42973
|
||||
|
||||
--- a/include/filenames.h
|
||||
+++ b/include/filenames.h
|
||||
@@ -44,11 +44,6 @@ extern "C" {
|
||||
# define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c)
|
||||
# define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f)
|
||||
#else /* not DOSish */
|
||||
-# if defined(__APPLE__)
|
||||
-# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM
|
||||
-# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1
|
||||
-# endif
|
||||
-# endif /* __APPLE__ */
|
||||
# define HAS_DRIVE_SPEC(f) (0)
|
||||
# define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c)
|
||||
# define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f)
|
||||
35
toolchain/gcc/patches-11.x/010-documentation.patch
Normal file
35
toolchain/gcc/patches-11.x/010-documentation.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
commit 098bd91f5eae625c7d2ee621e10930fc4434e5e2
|
||||
Author: Luka Perkov <luka@openwrt.org>
|
||||
Date: Tue Feb 26 16:16:33 2013 +0000
|
||||
|
||||
gcc: don't build documentation
|
||||
|
||||
This closes #13039.
|
||||
|
||||
Signed-off-by: Luka Perkov <luka@openwrt.org>
|
||||
|
||||
SVN-Revision: 35807
|
||||
|
||||
--- a/gcc/Makefile.in
|
||||
+++ b/gcc/Makefile.in
|
||||
@@ -3348,18 +3348,10 @@ doc/gcc.info: $(TEXI_GCC_FILES)
|
||||
doc/gccint.info: $(TEXI_GCCINT_FILES)
|
||||
doc/cppinternals.info: $(TEXI_CPPINT_FILES)
|
||||
|
||||
-doc/%.info: %.texi
|
||||
- if [ x$(BUILD_INFO) = xinfo ]; then \
|
||||
- $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \
|
||||
- -I $(gcc_docdir)/include -o $@ $<; \
|
||||
- fi
|
||||
+doc/%.info:
|
||||
|
||||
# Duplicate entry to handle renaming of gccinstall.info
|
||||
-doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES)
|
||||
- if [ x$(BUILD_INFO) = xinfo ]; then \
|
||||
- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \
|
||||
- -I $(gcc_docdir)/include -o $@ $<; \
|
||||
- fi
|
||||
+doc/gccinstall.info:
|
||||
|
||||
doc/cpp.dvi: $(TEXI_CPP_FILES)
|
||||
doc/gcc.dvi: $(TEXI_GCC_FILES)
|
||||
@@ -0,0 +1,46 @@
|
||||
From ea650cae26da4a8fc04f0c4666f4dd776d0b5fc0 Mon Sep 17 00:00:00 2001
|
||||
From: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
|
||||
Date: Sun, 14 Nov 2021 21:54:25 -0800
|
||||
Subject: [PATCH] configure: define TARGET_LIBC_GNUSTACK on musl
|
||||
|
||||
musl only uses PT_GNU_STACK to set default thread stack size and has no
|
||||
executable stack support[0], so there is no reason not to emit the
|
||||
.note.GNU-stack section on musl builds.
|
||||
|
||||
[0]: https://lore.kernel.org/all/20190423192534.GN23599@brightrain.aerifal.cx/T/#u
|
||||
|
||||
gcc/ChangeLog:
|
||||
|
||||
* configure: Regenerate.
|
||||
* configure.ac: define TARGET_LIBC_GNUSTACK on musl
|
||||
|
||||
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
|
||||
---
|
||||
gcc/configure | 3 +++
|
||||
gcc/configure.ac | 3 +++
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
--- a/gcc/configure
|
||||
+++ b/gcc/configure
|
||||
@@ -31533,6 +31533,9 @@ fi
|
||||
# Check if the target LIBC handles PT_GNU_STACK.
|
||||
gcc_cv_libc_gnustack=unknown
|
||||
case "$target" in
|
||||
+ mips*-*-linux-musl*)
|
||||
+ gcc_cv_libc_gnustack=yes
|
||||
+ ;;
|
||||
mips*-*-linux*)
|
||||
|
||||
if test $glibc_version_major -gt 2 \
|
||||
--- a/gcc/configure.ac
|
||||
+++ b/gcc/configure.ac
|
||||
@@ -7023,6 +7023,9 @@ fi
|
||||
# Check if the target LIBC handles PT_GNU_STACK.
|
||||
gcc_cv_libc_gnustack=unknown
|
||||
case "$target" in
|
||||
+ mips*-*-linux-musl*)
|
||||
+ gcc_cv_libc_gnustack=yes
|
||||
+ ;;
|
||||
mips*-*-linux*)
|
||||
GCC_GLIBC_VERSION_GTE_IFELSE([2], [31], [gcc_cv_libc_gnustack=yes], )
|
||||
;;
|
||||
@@ -0,0 +1,139 @@
|
||||
From 9970b576b7e4ae337af1268395ff221348c4b34a Mon Sep 17 00:00:00 2001
|
||||
From: Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
||||
Date: Thu, 7 Mar 2024 14:36:03 +0100
|
||||
Subject: [PATCH] Include safe-ctype.h after C++ standard headers, to avoid
|
||||
over-poisoning
|
||||
|
||||
When building gcc's C++ sources against recent libc++, the poisoning of
|
||||
the ctype macros due to including safe-ctype.h before including C++
|
||||
standard headers such as <list>, <map>, etc, causes many compilation
|
||||
errors, similar to:
|
||||
|
||||
In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23:
|
||||
In file included from /home/dim/src/gcc/master/gcc/system.h:233:
|
||||
In file included from /usr/include/c++/v1/vector:321:
|
||||
In file included from
|
||||
/usr/include/c++/v1/__format/formatter_bool.h:20:
|
||||
In file included from
|
||||
/usr/include/c++/v1/__format/formatter_integral.h:32:
|
||||
In file included from /usr/include/c++/v1/locale:202:
|
||||
/usr/include/c++/v1/__locale:546:5: error: '__abi_tag__' attribute
|
||||
only applies to structs, variables, functions, and namespaces
|
||||
546 | _LIBCPP_INLINE_VISIBILITY
|
||||
| ^
|
||||
/usr/include/c++/v1/__config:813:37: note: expanded from macro
|
||||
'_LIBCPP_INLINE_VISIBILITY'
|
||||
813 | # define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
|
||||
| ^
|
||||
/usr/include/c++/v1/__config:792:26: note: expanded from macro
|
||||
'_LIBCPP_HIDE_FROM_ABI'
|
||||
792 |
|
||||
__attribute__((__abi_tag__(_LIBCPP_TOSTRING(
|
||||
_LIBCPP_VERSIONED_IDENTIFIER))))
|
||||
| ^
|
||||
In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23:
|
||||
In file included from /home/dim/src/gcc/master/gcc/system.h:233:
|
||||
In file included from /usr/include/c++/v1/vector:321:
|
||||
In file included from
|
||||
/usr/include/c++/v1/__format/formatter_bool.h:20:
|
||||
In file included from
|
||||
/usr/include/c++/v1/__format/formatter_integral.h:32:
|
||||
In file included from /usr/include/c++/v1/locale:202:
|
||||
/usr/include/c++/v1/__locale:547:37: error: expected ';' at end of
|
||||
declaration list
|
||||
547 | char_type toupper(char_type __c) const
|
||||
| ^
|
||||
/usr/include/c++/v1/__locale:553:48: error: too many arguments
|
||||
provided to function-like macro invocation
|
||||
553 | const char_type* toupper(char_type* __low, const
|
||||
char_type* __high) const
|
||||
| ^
|
||||
/home/dim/src/gcc/master/gcc/../include/safe-ctype.h:146:9: note:
|
||||
macro 'toupper' defined here
|
||||
146 | #define toupper(c) do_not_use_toupper_with_safe_ctype
|
||||
| ^
|
||||
|
||||
This is because libc++ uses different transitive includes than
|
||||
libstdc++, and some of those transitive includes pull in various ctype
|
||||
declarations (typically via <locale>).
|
||||
|
||||
There was already a special case for including <string> before
|
||||
safe-ctype.h, so move the rest of the C++ standard header includes to
|
||||
the same location, to fix the problem.
|
||||
|
||||
gcc/ChangeLog:
|
||||
|
||||
* system.h: Include safe-ctype.h after C++ standard headers.
|
||||
|
||||
Signed-off-by: Dimitry Andric <dimitry@andric.com>
|
||||
---
|
||||
gcc/system.h | 39 ++++++++++++++++++---------------------
|
||||
1 file changed, 18 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/gcc/system.h b/gcc/system.h
|
||||
index b0edab02885..ab29fc19776 100644
|
||||
--- a/gcc/system.h
|
||||
+++ b/gcc/system.h
|
||||
@@ -194,27 +194,8 @@ extern int fprintf_unlocked (FILE *, const char *, ...);
|
||||
#undef fread_unlocked
|
||||
#undef fwrite_unlocked
|
||||
|
||||
-/* Include <string> before "safe-ctype.h" to avoid GCC poisoning
|
||||
- the ctype macros through safe-ctype.h */
|
||||
-
|
||||
-#ifdef __cplusplus
|
||||
-#ifdef INCLUDE_STRING
|
||||
-# include <string>
|
||||
-#endif
|
||||
-#endif
|
||||
-
|
||||
-/* There are an extraordinary number of issues with <ctype.h>.
|
||||
- The last straw is that it varies with the locale. Use libiberty's
|
||||
- replacement instead. */
|
||||
-#include "safe-ctype.h"
|
||||
-
|
||||
-#include <sys/types.h>
|
||||
-
|
||||
-#include <errno.h>
|
||||
-
|
||||
-#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
|
||||
-extern int errno;
|
||||
-#endif
|
||||
+/* Include C++ standard headers before "safe-ctype.h" to avoid GCC
|
||||
+ poisoning the ctype macros through safe-ctype.h */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined (INCLUDE_ALGORITHM) || !defined (HAVE_SWAP_IN_UTILITY)
|
||||
@@ -229,6 +210,9 @@ extern int errno;
|
||||
#ifdef INCLUDE_SET
|
||||
# include <set>
|
||||
#endif
|
||||
+#ifdef INCLUDE_STRING
|
||||
+# include <string>
|
||||
+#endif
|
||||
#ifdef INCLUDE_VECTOR
|
||||
# include <vector>
|
||||
#endif
|
||||
@@ -244,6 +228,19 @@ extern int errno;
|
||||
# include <type_traits>
|
||||
#endif
|
||||
|
||||
+/* There are an extraordinary number of issues with <ctype.h>.
|
||||
+ The last straw is that it varies with the locale. Use libiberty's
|
||||
+ replacement instead. */
|
||||
+#include "safe-ctype.h"
|
||||
+
|
||||
+#include <sys/types.h>
|
||||
+
|
||||
+#include <errno.h>
|
||||
+
|
||||
+#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
|
||||
+extern int errno;
|
||||
+#endif
|
||||
+
|
||||
/* Some of glibc's string inlines cause warnings. Plus we'd rather
|
||||
rely on (and therefore test) GCC's string builtins. */
|
||||
#define __NO_STRING_INLINES
|
||||
--
|
||||
2.39.3
|
||||
|
||||
20
toolchain/gcc/patches-11.x/110-Fix-MIPS-PR-84790.patch
Normal file
20
toolchain/gcc/patches-11.x/110-Fix-MIPS-PR-84790.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
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
|
||||
@@ -3132,6 +3132,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)
|
||||
13
toolchain/gcc/patches-11.x/230-musl_libssp.patch
Normal file
13
toolchain/gcc/patches-11.x/230-musl_libssp.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
--- a/gcc/gcc.c
|
||||
+++ b/gcc/gcc.c
|
||||
@@ -978,7 +978,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
|
||||
@@ -0,0 +1,21 @@
|
||||
commit ecf7671b769fe96f7b5134be442089f8bdba55d2
|
||||
Author: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Thu Aug 4 20:29:45 2016 +0200
|
||||
|
||||
gcc: add a patch to generate better code with Os on mips
|
||||
|
||||
Also happens to reduce compressed code size a bit
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/gcc/config/mips/mips.c
|
||||
+++ b/gcc/config/mips/mips.c
|
||||
@@ -20041,7 +20041,7 @@ mips_option_override (void)
|
||||
flag_pcc_struct_return = 0;
|
||||
|
||||
/* Decide which rtx_costs structure to use. */
|
||||
- if (optimize_size)
|
||||
+ if (0 && optimize_size)
|
||||
mips_cost = &mips_rtx_cost_optimize_size;
|
||||
else
|
||||
mips_cost = &mips_rtx_cost_data[mips_tune];
|
||||
@@ -0,0 +1,39 @@
|
||||
From d2356ebb0084a0d80dbfe33040c9afe938c15d19 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Liska <mliska@suse.cz>
|
||||
Date: Mon, 11 Jul 2022 22:03:14 +0200
|
||||
Subject: [PATCH] libsanitizer: cherry-pick 9cf13067cb5088626ba7 from upstream
|
||||
|
||||
9cf13067cb5088626ba7ee1ec4c42ec59c7995a0 [sanitizer] Remove #include <linux/fs.h> to resolve fsconfig_command/mount_attr conflict with glibc 2.36
|
||||
|
||||
(cherry picked from commit 2701442d0cf6292f6624443c15813d6d1a3562fe)
|
||||
---
|
||||
.../sanitizer_platform_limits_posix.cpp | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp
|
||||
@@ -72,7 +72,9 @@
|
||||
#include <sys/vt.h>
|
||||
#include <linux/cdrom.h>
|
||||
#include <linux/fd.h>
|
||||
+#if SANITIZER_ANDROID
|
||||
#include <linux/fs.h>
|
||||
+#endif
|
||||
#include <linux/hdreg.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/ioctl.h>
|
||||
@@ -828,10 +830,10 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
|
||||
unsigned IOCTL_EVIOCGPROP = IOCTL_NOT_PRESENT;
|
||||
unsigned IOCTL_EVIOCSKEYCODE_V2 = IOCTL_NOT_PRESENT;
|
||||
#endif
|
||||
- unsigned IOCTL_FS_IOC_GETFLAGS = FS_IOC_GETFLAGS;
|
||||
- unsigned IOCTL_FS_IOC_GETVERSION = FS_IOC_GETVERSION;
|
||||
- unsigned IOCTL_FS_IOC_SETFLAGS = FS_IOC_SETFLAGS;
|
||||
- unsigned IOCTL_FS_IOC_SETVERSION = FS_IOC_SETVERSION;
|
||||
+ unsigned IOCTL_FS_IOC_GETFLAGS = _IOR('f', 1, long);
|
||||
+ unsigned IOCTL_FS_IOC_GETVERSION = _IOR('v', 1, long);
|
||||
+ unsigned IOCTL_FS_IOC_SETFLAGS = _IOW('f', 2, long);
|
||||
+ unsigned IOCTL_FS_IOC_SETVERSION = _IOW('v', 2, long);
|
||||
unsigned IOCTL_GIO_CMAP = GIO_CMAP;
|
||||
unsigned IOCTL_GIO_FONT = GIO_FONT;
|
||||
unsigned IOCTL_GIO_UNIMAP = GIO_UNIMAP;
|
||||
2021
toolchain/gcc/patches-11.x/700-RISCV-Inline-subword-atomic-ops.patch
Normal file
2021
toolchain/gcc/patches-11.x/700-RISCV-Inline-subword-atomic-ops.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,36 @@
|
||||
From 203f3060dd363361b172f7295f42bb6bf5ac0b3b Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Schwab <schwab@suse.de>
|
||||
Date: Sat, 23 Apr 2022 15:48:42 +0200
|
||||
Subject: [PATCH] riscv/linux: Don't add -latomic with -pthread
|
||||
|
||||
Now that we have support for inline subword atomic operations, it is no
|
||||
longer necessary to link against libatomic. This also fixes testsuite
|
||||
failures because the framework does not properly set up the linker flags
|
||||
for finding libatomic.
|
||||
The use of atomic operations is also independent of the use of libpthread.
|
||||
|
||||
gcc/
|
||||
* config/riscv/linux.h (LIB_SPEC): Don't redefine.
|
||||
---
|
||||
gcc/config/riscv/linux.h | 10 ----------
|
||||
1 file changed, 10 deletions(-)
|
||||
|
||||
--- a/gcc/config/riscv/linux.h
|
||||
+++ b/gcc/config/riscv/linux.h
|
||||
@@ -35,16 +35,6 @@ along with GCC; see the file COPYING3.
|
||||
#undef MUSL_DYNAMIC_LINKER
|
||||
#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-riscv" XLEN_SPEC MUSL_ABI_SUFFIX ".so.1"
|
||||
|
||||
-/* Because RISC-V only has word-sized atomics, it requries libatomic where
|
||||
- others do not. So link libatomic by default, as needed. */
|
||||
-#undef LIB_SPEC
|
||||
-#ifdef LD_AS_NEEDED_OPTION
|
||||
-#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC \
|
||||
- " %{pthread:" LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION "}"
|
||||
-#else
|
||||
-#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC " -latomic "
|
||||
-#endif
|
||||
-
|
||||
#define ICACHE_FLUSH_FUNC "__riscv_flush_icache"
|
||||
|
||||
#define CPP_SPEC "%{pthread:-D_REENTRANT}"
|
||||
33
toolchain/gcc/patches-11.x/810-arm-softfloat-libgcc.patch
Normal file
33
toolchain/gcc/patches-11.x/810-arm-softfloat-libgcc.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
commit 8570c4be394cff7282f332f97da2ff569a927ddb
|
||||
Author: Imre Kaloz <kaloz@openwrt.org>
|
||||
Date: Wed Feb 2 20:06:12 2011 +0000
|
||||
|
||||
fixup arm soft-float symbols
|
||||
|
||||
SVN-Revision: 25325
|
||||
|
||||
--- a/libgcc/config/arm/t-linux
|
||||
+++ b/libgcc/config/arm/t-linux
|
||||
@@ -1,6 +1,10 @@
|
||||
LIB1ASMSRC = arm/lib1funcs.S
|
||||
LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \
|
||||
- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3
|
||||
+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \
|
||||
+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \
|
||||
+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \
|
||||
+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \
|
||||
+ _arm_fixsfsi _arm_fixunssfsi
|
||||
|
||||
# Just for these, we omit the frame pointer since it makes such a big
|
||||
# difference.
|
||||
--- a/gcc/config/arm/linux-elf.h
|
||||
+++ b/gcc/config/arm/linux-elf.h
|
||||
@@ -58,8 +58,6 @@
|
||||
%{shared:-lc} \
|
||||
%{!shared:%{profile:-lc_p}%{!profile:-lc}}"
|
||||
|
||||
-#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
|
||||
-
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
|
||||
#define LINUX_TARGET_LINK_SPEC "%{h*} \
|
||||
44
toolchain/gcc/patches-11.x/820-libgcc_pic.patch
Normal file
44
toolchain/gcc/patches-11.x/820-libgcc_pic.patch
Normal file
@@ -0,0 +1,44 @@
|
||||
commit c96312958c0621e72c9b32da5bc224ffe2161384
|
||||
Author: Felix Fietkau <nbd@openwrt.org>
|
||||
Date: Mon Oct 19 23:26:09 2009 +0000
|
||||
|
||||
gcc: create a proper libgcc_pic.a static library for relinking (4.3.3+ for now, backport will follow)
|
||||
|
||||
SVN-Revision: 18086
|
||||
|
||||
--- a/libgcc/Makefile.in
|
||||
+++ b/libgcc/Makefile.in
|
||||
@@ -930,11 +930,12 @@ $(libgcov-driver-objects): %$(objext): $
|
||||
|
||||
# Static libraries.
|
||||
libgcc.a: $(libgcc-objects)
|
||||
+libgcc_pic.a: $(libgcc-s-objects)
|
||||
libgcov.a: $(libgcov-objects)
|
||||
libunwind.a: $(libunwind-objects)
|
||||
libgcc_eh.a: $(libgcc-eh-objects)
|
||||
|
||||
-libgcc.a libgcov.a libunwind.a libgcc_eh.a:
|
||||
+libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a:
|
||||
-rm -f $@
|
||||
|
||||
objects="$(objects)"; \
|
||||
@@ -958,7 +959,7 @@ all: libunwind.a
|
||||
endif
|
||||
|
||||
ifeq ($(enable_shared),yes)
|
||||
-all: libgcc_eh.a libgcc_s$(SHLIB_EXT)
|
||||
+all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT)
|
||||
ifneq ($(LIBUNWIND),)
|
||||
all: libunwind$(SHLIB_EXT)
|
||||
libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
|
||||
@@ -1164,6 +1165,10 @@ install-shared:
|
||||
chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
|
||||
$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
|
||||
|
||||
+ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/
|
||||
+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a
|
||||
+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a
|
||||
+
|
||||
$(subst @multilib_dir@,$(MULTIDIR),$(subst \
|
||||
@shlib_base_name@,libgcc_s,$(subst \
|
||||
@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL))))
|
||||
@@ -0,0 +1,28 @@
|
||||
commit 7edc8ca5456d9743dd0075eb3cc5b04f4f24c8cc
|
||||
Author: Imre Kaloz <kaloz@openwrt.org>
|
||||
Date: Wed Feb 2 19:34:36 2011 +0000
|
||||
|
||||
add armv4 fixup patches
|
||||
|
||||
SVN-Revision: 25322
|
||||
|
||||
|
||||
--- a/gcc/config/arm/linux-eabi.h
|
||||
+++ b/gcc/config/arm/linux-eabi.h
|
||||
@@ -91,10 +91,15 @@
|
||||
#define MUSL_DYNAMIC_LINKER \
|
||||
"/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1"
|
||||
|
||||
+/* For armv4 we pass --fix-v4bx to linker to support EABI */
|
||||
+#undef TARGET_FIX_V4BX_SPEC
|
||||
+#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\
|
||||
+ "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}"
|
||||
+
|
||||
/* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
|
||||
use the GNU/Linux version, not the generic BPABI version. */
|
||||
#undef LINK_SPEC
|
||||
-#define LINK_SPEC EABI_LINK_SPEC \
|
||||
+#define LINK_SPEC EABI_LINK_SPEC TARGET_FIX_V4BX_SPEC \
|
||||
LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \
|
||||
LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
|
||||
|
||||
54
toolchain/gcc/patches-11.x/850-use_shared_libgcc.patch
Normal file
54
toolchain/gcc/patches-11.x/850-use_shared_libgcc.patch
Normal file
@@ -0,0 +1,54 @@
|
||||
commit dcfc40358b5a3cae7320c17f8d1cebd5ad5540cd
|
||||
Author: Felix Fietkau <nbd@openwrt.org>
|
||||
Date: Sun Feb 12 20:25:47 2012 +0000
|
||||
|
||||
gcc 4.6: port over the missing patch 850-use_shared_libgcc.patch to prevent libgcc crap from leaking into every single binary
|
||||
|
||||
SVN-Revision: 30486
|
||||
--- a/gcc/config/arm/linux-eabi.h
|
||||
+++ b/gcc/config/arm/linux-eabi.h
|
||||
@@ -132,10 +132,6 @@
|
||||
"%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \
|
||||
LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC)
|
||||
|
||||
-/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we
|
||||
- do not use -lfloat. */
|
||||
-#undef LIBGCC_SPEC
|
||||
-
|
||||
/* Clear the instruction cache from `beg' to `end'. This is
|
||||
implemented in lib1funcs.S, so ensure an error if this definition
|
||||
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"); \
|
||||
} while (0)
|
||||
|
||||
+#ifndef LIBGCC_SPEC
|
||||
+#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}"
|
||||
+#endif
|
||||
+
|
||||
/* Determine which dynamic linker to use depending on whether GLIBC or
|
||||
uClibc or Bionic or musl is the default C library and whether
|
||||
-muclibc or -mglibc or -mbionic or -mmusl has been passed to change
|
||||
--- a/libgcc/mkmap-symver.awk
|
||||
+++ b/libgcc/mkmap-symver.awk
|
||||
@@ -136,5 +136,5 @@ function output(lib) {
|
||||
else if (inherit[lib])
|
||||
printf("} %s;\n", inherit[lib]);
|
||||
else
|
||||
- printf ("\n local:\n\t*;\n};\n");
|
||||
+ printf ("\n\t*;\n};\n");
|
||||
}
|
||||
--- a/gcc/config/rs6000/linux.h
|
||||
+++ b/gcc/config/rs6000/linux.h
|
||||
@@ -62,6 +62,9 @@
|
||||
#undef CPP_OS_DEFAULT_SPEC
|
||||
#define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)"
|
||||
|
||||
+#undef LIBGCC_SPEC
|
||||
+#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}"
|
||||
22
toolchain/gcc/patches-11.x/851-libgcc_no_compat.patch
Normal file
22
toolchain/gcc/patches-11.x/851-libgcc_no_compat.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
commit 64661de100da1ec1061ef3e5e400285dce115e6b
|
||||
Author: Felix Fietkau <nbd@openwrt.org>
|
||||
Date: Sun May 10 13:16:35 2015 +0000
|
||||
|
||||
gcc: add some size optimization patches
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
||||
|
||||
SVN-Revision: 45664
|
||||
|
||||
--- a/libgcc/config/t-libunwind
|
||||
+++ b/libgcc/config/t-libunwind
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER
|
||||
|
||||
-LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \
|
||||
- $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c
|
||||
+LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
|
||||
LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
|
||||
|
||||
# Override the default value from t-slibgcc-elf-ver and mention -lunwind
|
||||
11
toolchain/gcc/patches-11.x/870-ppc_no_crtsavres.patch
Normal file
11
toolchain/gcc/patches-11.x/870-ppc_no_crtsavres.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/gcc/config/rs6000/rs6000-logue.c
|
||||
+++ b/gcc/config/rs6000/rs6000-logue.c
|
||||
@@ -348,7 +348,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;
|
||||
11
toolchain/gcc/patches-11.x/881-no_tm_section.patch
Normal file
11
toolchain/gcc/patches-11.x/881-no_tm_section.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- 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
|
||||
#elif !defined(USE_TM_CLONE_REGISTRY)
|
||||
# define USE_TM_CLONE_REGISTRY 0
|
||||
#endif
|
||||
9
toolchain/gcc/patches-11.x/900-bad-mips16-crt.patch
Normal file
9
toolchain/gcc/patches-11.x/900-bad-mips16-crt.patch
Normal file
@@ -0,0 +1,9 @@
|
||||
--- 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
|
||||
146
toolchain/gcc/patches-11.x/910-mbsd_multi.patch
Normal file
146
toolchain/gcc/patches-11.x/910-mbsd_multi.patch
Normal file
@@ -0,0 +1,146 @@
|
||||
commit 99368862e44740ff4fd33760893f04e14f9dbdf1
|
||||
Author: Felix Fietkau <nbd@openwrt.org>
|
||||
Date: Tue Jul 31 00:52:27 2007 +0000
|
||||
|
||||
Port the mbsd_multi patch from freewrt, which adds -fhonour-copts. This will emit warnings in packages that don't use our target cflags properly
|
||||
|
||||
SVN-Revision: 8256
|
||||
|
||||
This patch brings over a feature from MirBSD:
|
||||
* -fhonour-copts
|
||||
If this option is not given, it's warned (depending
|
||||
on environment variables). This is to catch errors
|
||||
of misbuilt packages which override CFLAGS themselves.
|
||||
|
||||
This patch was authored by Thorsten Glaser <tg at mirbsd.de>
|
||||
with copyright assignment to the FSF in effect.
|
||||
|
||||
--- 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;
|
||||
/* Whether any standard preincluded header has been preincluded. */
|
||||
static bool done_preinclude;
|
||||
|
||||
+/* Check if a port honours COPTS. */
|
||||
+static int honour_copts = 0;
|
||||
+
|
||||
static void handle_OPT_d (const char *);
|
||||
static void set_std_cxx98 (int);
|
||||
static void set_std_cxx11 (int);
|
||||
@@ -469,6 +472,12 @@ c_common_handle_option (size_t scode, co
|
||||
flag_no_builtin = !value;
|
||||
break;
|
||||
|
||||
+ case OPT_fhonour_copts:
|
||||
+ if (c_language == clk_c) {
|
||||
+ honour_copts++;
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
case OPT_fconstant_string_class_:
|
||||
constant_string_class_name = arg;
|
||||
break;
|
||||
@@ -1198,6 +1207,47 @@ c_common_init (void)
|
||||
return false;
|
||||
}
|
||||
|
||||
+ if (c_language == clk_c) {
|
||||
+ char *ev = getenv ("GCC_HONOUR_COPTS");
|
||||
+ int evv;
|
||||
+ if (ev == NULL)
|
||||
+ evv = -1;
|
||||
+ else if ((*ev == '0') || (*ev == '\0'))
|
||||
+ evv = 0;
|
||||
+ else if (*ev == '1')
|
||||
+ evv = 1;
|
||||
+ else if (*ev == '2')
|
||||
+ evv = 2;
|
||||
+ else if (*ev == 's')
|
||||
+ evv = -1;
|
||||
+ else {
|
||||
+ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1");
|
||||
+ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */
|
||||
+ }
|
||||
+ if (evv == 1) {
|
||||
+ if (honour_copts == 0) {
|
||||
+ error ("someone does not honour COPTS at all in lenient mode");
|
||||
+ return false;
|
||||
+ } else if (honour_copts != 1) {
|
||||
+ warning (0, "someone does not honour COPTS correctly, passed %d times",
|
||||
+ honour_copts);
|
||||
+ }
|
||||
+ } else if (evv == 2) {
|
||||
+ if (honour_copts == 0) {
|
||||
+ error ("someone does not honour COPTS at all in strict mode");
|
||||
+ return false;
|
||||
+ } else if (honour_copts != 1) {
|
||||
+ error ("someone does not honour COPTS correctly, passed %d times",
|
||||
+ honour_copts);
|
||||
+ return false;
|
||||
+ }
|
||||
+ } else if (evv == 0) {
|
||||
+ if (honour_copts != 1)
|
||||
+ inform (UNKNOWN_LOCATION, "someone does not honour COPTS correctly, passed %d times",
|
||||
+ honour_copts);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
return true;
|
||||
}
|
||||
|
||||
--- a/gcc/c-family/c.opt
|
||||
+++ b/gcc/c-family/c.opt
|
||||
@@ -1663,6 +1663,9 @@ C++ ObjC++ Optimization Alias(fexception
|
||||
fhonor-std
|
||||
C++ ObjC++ WarnRemoved
|
||||
|
||||
+fhonour-copts
|
||||
+C ObjC C++ ObjC++ RejectNegative
|
||||
+
|
||||
fhosted
|
||||
C ObjC
|
||||
Assume normal C execution environment.
|
||||
--- a/gcc/common.opt
|
||||
+++ b/gcc/common.opt
|
||||
@@ -1698,6 +1698,9 @@ fguess-branch-probability
|
||||
Common Var(flag_guess_branch_prob) Optimization
|
||||
Enable guessing of branch probabilities.
|
||||
|
||||
+fhonour-copts
|
||||
+Common RejectNegative
|
||||
+
|
||||
; 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/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -9059,6 +9059,17 @@ This option is only supported for C and
|
||||
@option{-Wall} and by @option{-Wpedantic}, which can be disabled with
|
||||
@option{-Wno-pointer-sign}.
|
||||
|
||||
+@item -fhonour-copts
|
||||
+@opindex fhonour-copts
|
||||
+If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not
|
||||
+given at least once, and warn if it is given more than once.
|
||||
+If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not
|
||||
+given exactly once.
|
||||
+If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option
|
||||
+is not given exactly once.
|
||||
+The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}.
|
||||
+This flag and environment variable only affect the C language.
|
||||
+
|
||||
@item -Wstack-protector
|
||||
@opindex Wstack-protector
|
||||
@opindex Wno-stack-protector
|
||||
--- a/gcc/opts.c
|
||||
+++ b/gcc/opts.c
|
||||
@@ -2448,6 +2448,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;
|
||||
22
toolchain/gcc/patches-11.x/920-specs_nonfatal_getenv.patch
Normal file
22
toolchain/gcc/patches-11.x/920-specs_nonfatal_getenv.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
Author: Jo-Philipp Wich <jow@openwrt.org>
|
||||
Date: Sat Apr 21 03:02:39 2012 +0000
|
||||
|
||||
gcc: add patch to make the getenv() spec function nonfatal if requested environment variable is unset
|
||||
|
||||
SVN-Revision: 31390
|
||||
|
||||
--- a/gcc/gcc.c
|
||||
+++ b/gcc/gcc.c
|
||||
@@ -10106,8 +10106,10 @@ getenv_spec_function (int argc, const ch
|
||||
}
|
||||
|
||||
if (!value)
|
||||
- fatal_error (input_location,
|
||||
- "environment variable %qs not defined", varname);
|
||||
+ {
|
||||
+ warning (input_location, "environment variable %qs not defined", varname);
|
||||
+ value = "";
|
||||
+ }
|
||||
|
||||
/* We have to escape every character of the environment variable so
|
||||
they are not interpreted as active spec characters. A
|
||||
@@ -0,0 +1,168 @@
|
||||
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)
|
||||
@@ -0,0 +1,67 @@
|
||||
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
|
||||
@@ -0,0 +1,45 @@
|
||||
commit 9c6e71079b46ad5433165feaa2001450f2017b56
|
||||
Author: Przemysław Buczkowski <prem@prem.moe>
|
||||
Date: Mon Aug 16 13:16:21 2021 +0100
|
||||
|
||||
GCC: Patch for Apple Silicon compatibility
|
||||
|
||||
This patch fixes a linker error occuring when compiling
|
||||
the cross-compiler on macOS and ARM64 architecture.
|
||||
|
||||
Adapted from:
|
||||
https://github.com/richfelker/musl-cross-make/issues/116#issuecomment-823612404
|
||||
|
||||
Change-Id: Ia3ee98a163bbb62689f42e2da83a5ef36beb0913
|
||||
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/4329
|
||||
Reviewed-by: John Scipione <jscipione@gmail.com>
|
||||
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
|
||||
|
||||
--- a/gcc/config/aarch64/aarch64.h
|
||||
+++ b/gcc/config/aarch64/aarch64.h
|
||||
@@ -1236,7 +1236,7 @@ extern const char *aarch64_rewrite_mcpu
|
||||
#define MCPU_TO_MARCH_SPEC_FUNCTIONS \
|
||||
{ "rewrite_mcpu", aarch64_rewrite_mcpu },
|
||||
|
||||
-#if defined(__aarch64__)
|
||||
+#if defined(__aarch64__) && ! defined(__APPLE__)
|
||||
extern const char *host_detect_local_cpu (int argc, const char **argv);
|
||||
#define HAVE_LOCAL_CPU_DETECT
|
||||
# define EXTRA_SPEC_FUNCTIONS \
|
||||
--- a/gcc/config/host-darwin.c
|
||||
+++ b/gcc/config/host-darwin.c
|
||||
@@ -22,6 +22,8 @@
|
||||
#include "coretypes.h"
|
||||
#include "diagnostic-core.h"
|
||||
#include "config/host-darwin.h"
|
||||
+#include "hosthooks.h"
|
||||
+#include "hosthooks-def.h"
|
||||
|
||||
/* Yes, this is really supposed to work. */
|
||||
/* This allows for a pagesize of 16384, which we have on Darwin20, but should
|
||||
@@ -79,3 +81,5 @@ darwin_gt_pch_use_address (void *addr, s
|
||||
|
||||
return ret;
|
||||
}
|
||||
+
|
||||
+const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;
|
||||
24
toolchain/gcc/patches-12.x/002-case_insensitive.patch
Normal file
24
toolchain/gcc/patches-12.x/002-case_insensitive.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
commit 81cc26c706b2bc8c8c1eb1a322e5c5157900836e
|
||||
Author: Felix Fietkau <nbd@openwrt.org>
|
||||
Date: Sun Oct 19 21:45:51 2014 +0000
|
||||
|
||||
gcc: do not assume that the Mac OS X filesystem is case insensitive
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
||||
|
||||
SVN-Revision: 42973
|
||||
|
||||
--- a/include/filenames.h
|
||||
+++ b/include/filenames.h
|
||||
@@ -44,11 +44,6 @@ extern "C" {
|
||||
# define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c)
|
||||
# define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f)
|
||||
#else /* not DOSish */
|
||||
-# if defined(__APPLE__)
|
||||
-# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM
|
||||
-# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1
|
||||
-# endif
|
||||
-# endif /* __APPLE__ */
|
||||
# define HAS_DRIVE_SPEC(f) (0)
|
||||
# define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c)
|
||||
# define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f)
|
||||
35
toolchain/gcc/patches-12.x/010-documentation.patch
Normal file
35
toolchain/gcc/patches-12.x/010-documentation.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
commit 098bd91f5eae625c7d2ee621e10930fc4434e5e2
|
||||
Author: Luka Perkov <luka@openwrt.org>
|
||||
Date: Tue Feb 26 16:16:33 2013 +0000
|
||||
|
||||
gcc: don't build documentation
|
||||
|
||||
This closes #13039.
|
||||
|
||||
Signed-off-by: Luka Perkov <luka@openwrt.org>
|
||||
|
||||
SVN-Revision: 35807
|
||||
|
||||
--- a/gcc/Makefile.in
|
||||
+++ b/gcc/Makefile.in
|
||||
@@ -3366,18 +3366,10 @@ doc/gcc.info: $(TEXI_GCC_FILES)
|
||||
doc/gccint.info: $(TEXI_GCCINT_FILES)
|
||||
doc/cppinternals.info: $(TEXI_CPPINT_FILES)
|
||||
|
||||
-doc/%.info: %.texi
|
||||
- if [ x$(BUILD_INFO) = xinfo ]; then \
|
||||
- $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \
|
||||
- -I $(gcc_docdir)/include -o $@ $<; \
|
||||
- fi
|
||||
+doc/%.info:
|
||||
|
||||
# Duplicate entry to handle renaming of gccinstall.info
|
||||
-doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES)
|
||||
- if [ x$(BUILD_INFO) = xinfo ]; then \
|
||||
- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \
|
||||
- -I $(gcc_docdir)/include -o $@ $<; \
|
||||
- fi
|
||||
+doc/gccinstall.info:
|
||||
|
||||
doc/cpp.dvi: $(TEXI_CPP_FILES)
|
||||
doc/gcc.dvi: $(TEXI_GCC_FILES)
|
||||
@@ -0,0 +1,139 @@
|
||||
From 9970b576b7e4ae337af1268395ff221348c4b34a Mon Sep 17 00:00:00 2001
|
||||
From: Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
||||
Date: Thu, 7 Mar 2024 14:36:03 +0100
|
||||
Subject: [PATCH] Include safe-ctype.h after C++ standard headers, to avoid
|
||||
over-poisoning
|
||||
|
||||
When building gcc's C++ sources against recent libc++, the poisoning of
|
||||
the ctype macros due to including safe-ctype.h before including C++
|
||||
standard headers such as <list>, <map>, etc, causes many compilation
|
||||
errors, similar to:
|
||||
|
||||
In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23:
|
||||
In file included from /home/dim/src/gcc/master/gcc/system.h:233:
|
||||
In file included from /usr/include/c++/v1/vector:321:
|
||||
In file included from
|
||||
/usr/include/c++/v1/__format/formatter_bool.h:20:
|
||||
In file included from
|
||||
/usr/include/c++/v1/__format/formatter_integral.h:32:
|
||||
In file included from /usr/include/c++/v1/locale:202:
|
||||
/usr/include/c++/v1/__locale:546:5: error: '__abi_tag__' attribute
|
||||
only applies to structs, variables, functions, and namespaces
|
||||
546 | _LIBCPP_INLINE_VISIBILITY
|
||||
| ^
|
||||
/usr/include/c++/v1/__config:813:37: note: expanded from macro
|
||||
'_LIBCPP_INLINE_VISIBILITY'
|
||||
813 | # define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
|
||||
| ^
|
||||
/usr/include/c++/v1/__config:792:26: note: expanded from macro
|
||||
'_LIBCPP_HIDE_FROM_ABI'
|
||||
792 |
|
||||
__attribute__((__abi_tag__(_LIBCPP_TOSTRING(
|
||||
_LIBCPP_VERSIONED_IDENTIFIER))))
|
||||
| ^
|
||||
In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23:
|
||||
In file included from /home/dim/src/gcc/master/gcc/system.h:233:
|
||||
In file included from /usr/include/c++/v1/vector:321:
|
||||
In file included from
|
||||
/usr/include/c++/v1/__format/formatter_bool.h:20:
|
||||
In file included from
|
||||
/usr/include/c++/v1/__format/formatter_integral.h:32:
|
||||
In file included from /usr/include/c++/v1/locale:202:
|
||||
/usr/include/c++/v1/__locale:547:37: error: expected ';' at end of
|
||||
declaration list
|
||||
547 | char_type toupper(char_type __c) const
|
||||
| ^
|
||||
/usr/include/c++/v1/__locale:553:48: error: too many arguments
|
||||
provided to function-like macro invocation
|
||||
553 | const char_type* toupper(char_type* __low, const
|
||||
char_type* __high) const
|
||||
| ^
|
||||
/home/dim/src/gcc/master/gcc/../include/safe-ctype.h:146:9: note:
|
||||
macro 'toupper' defined here
|
||||
146 | #define toupper(c) do_not_use_toupper_with_safe_ctype
|
||||
| ^
|
||||
|
||||
This is because libc++ uses different transitive includes than
|
||||
libstdc++, and some of those transitive includes pull in various ctype
|
||||
declarations (typically via <locale>).
|
||||
|
||||
There was already a special case for including <string> before
|
||||
safe-ctype.h, so move the rest of the C++ standard header includes to
|
||||
the same location, to fix the problem.
|
||||
|
||||
gcc/ChangeLog:
|
||||
|
||||
* system.h: Include safe-ctype.h after C++ standard headers.
|
||||
|
||||
Signed-off-by: Dimitry Andric <dimitry@andric.com>
|
||||
---
|
||||
gcc/system.h | 39 ++++++++++++++++++---------------------
|
||||
1 file changed, 18 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/gcc/system.h b/gcc/system.h
|
||||
index b0edab02885..ab29fc19776 100644
|
||||
--- a/gcc/system.h
|
||||
+++ b/gcc/system.h
|
||||
@@ -194,27 +194,8 @@ extern int fprintf_unlocked (FILE *, const char *, ...);
|
||||
#undef fread_unlocked
|
||||
#undef fwrite_unlocked
|
||||
|
||||
-/* Include <string> before "safe-ctype.h" to avoid GCC poisoning
|
||||
- the ctype macros through safe-ctype.h */
|
||||
-
|
||||
-#ifdef __cplusplus
|
||||
-#ifdef INCLUDE_STRING
|
||||
-# include <string>
|
||||
-#endif
|
||||
-#endif
|
||||
-
|
||||
-/* There are an extraordinary number of issues with <ctype.h>.
|
||||
- The last straw is that it varies with the locale. Use libiberty's
|
||||
- replacement instead. */
|
||||
-#include "safe-ctype.h"
|
||||
-
|
||||
-#include <sys/types.h>
|
||||
-
|
||||
-#include <errno.h>
|
||||
-
|
||||
-#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
|
||||
-extern int errno;
|
||||
-#endif
|
||||
+/* Include C++ standard headers before "safe-ctype.h" to avoid GCC
|
||||
+ poisoning the ctype macros through safe-ctype.h */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined (INCLUDE_ALGORITHM) || !defined (HAVE_SWAP_IN_UTILITY)
|
||||
@@ -229,6 +210,9 @@ extern int errno;
|
||||
#ifdef INCLUDE_SET
|
||||
# include <set>
|
||||
#endif
|
||||
+#ifdef INCLUDE_STRING
|
||||
+# include <string>
|
||||
+#endif
|
||||
#ifdef INCLUDE_VECTOR
|
||||
# include <vector>
|
||||
#endif
|
||||
@@ -245,6 +229,19 @@ extern int errno;
|
||||
# include <type_traits>
|
||||
#endif
|
||||
|
||||
+/* There are an extraordinary number of issues with <ctype.h>.
|
||||
+ The last straw is that it varies with the locale. Use libiberty's
|
||||
+ replacement instead. */
|
||||
+#include "safe-ctype.h"
|
||||
+
|
||||
+#include <sys/types.h>
|
||||
+
|
||||
+#include <errno.h>
|
||||
+
|
||||
+#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
|
||||
+extern int errno;
|
||||
+#endif
|
||||
+
|
||||
/* Some of glibc's string inlines cause warnings. Plus we'd rather
|
||||
rely on (and therefore test) GCC's string builtins. */
|
||||
#define __NO_STRING_INLINES
|
||||
--
|
||||
2.39.3
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
From 5213047b1d50af63dfabb5e5649821a6cb157e33 Mon Sep 17 00:00:00 2001
|
||||
From: Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
||||
Date: Sat, 16 Mar 2024 09:50:00 +0100
|
||||
Subject: [PATCH] libcc1: fix <vector> include
|
||||
|
||||
Use INCLUDE_VECTOR before including system.h, instead of directly
|
||||
including <vector>, to avoid running into poisoned identifiers.
|
||||
|
||||
Signed-off-by: Dimitry Andric <dimitry@andric.com>
|
||||
|
||||
libcc1/ChangeLog:
|
||||
|
||||
PR middle-end/111632
|
||||
* libcc1plugin.cc: Fix include.
|
||||
* libcp1plugin.cc: Fix include.
|
||||
---
|
||||
libcc1/libcc1plugin.cc | 3 +--
|
||||
libcc1/libcp1plugin.cc | 3 +--
|
||||
2 files changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/libcc1/libcc1plugin.cc b/libcc1/libcc1plugin.cc
|
||||
index 72d17c3b81c..e64847466f4 100644
|
||||
--- a/libcc1/libcc1plugin.cc
|
||||
+++ b/libcc1/libcc1plugin.cc
|
||||
@@ -32,6 +32,7 @@
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
#define INCLUDE_MEMORY
|
||||
+#define INCLUDE_VECTOR
|
||||
#include "gcc-plugin.h"
|
||||
#include "system.h"
|
||||
#include "coretypes.h"
|
||||
@@ -69,8 +70,6 @@
|
||||
#include "gcc-c-interface.h"
|
||||
#include "context.hh"
|
||||
|
||||
-#include <vector>
|
||||
-
|
||||
using namespace cc1_plugin;
|
||||
|
||||
|
||||
diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc
|
||||
index 0eff7c68d29..da68c5d0ac1 100644
|
||||
--- a/libcc1/libcp1plugin.cc
|
||||
+++ b/libcc1/libcp1plugin.cc
|
||||
@@ -33,6 +33,7 @@
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
#define INCLUDE_MEMORY
|
||||
+#define INCLUDE_VECTOR
|
||||
#include "gcc-plugin.h"
|
||||
#include "system.h"
|
||||
#include "coretypes.h"
|
||||
@@ -71,8 +72,6 @@
|
||||
#include "rpc.hh"
|
||||
#include "context.hh"
|
||||
|
||||
-#include <vector>
|
||||
-
|
||||
using namespace cc1_plugin;
|
||||
|
||||
|
||||
--
|
||||
2.39.3
|
||||
|
||||
20
toolchain/gcc/patches-12.x/110-Fix-MIPS-PR-84790.patch
Normal file
20
toolchain/gcc/patches-12.x/110-Fix-MIPS-PR-84790.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
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.cc
|
||||
+++ b/gcc/config/mips/mips.cc
|
||||
@@ -3134,6 +3134,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)
|
||||
13
toolchain/gcc/patches-12.x/230-musl_libssp.patch
Normal file
13
toolchain/gcc/patches-12.x/230-musl_libssp.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -987,7 +987,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
|
||||
@@ -0,0 +1,21 @@
|
||||
commit ecf7671b769fe96f7b5134be442089f8bdba55d2
|
||||
Author: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Thu Aug 4 20:29:45 2016 +0200
|
||||
|
||||
gcc: add a patch to generate better code with Os on mips
|
||||
|
||||
Also happens to reduce compressed code size a bit
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/gcc/config/mips/mips.cc
|
||||
+++ b/gcc/config/mips/mips.cc
|
||||
@@ -20216,7 +20216,7 @@ mips_option_override (void)
|
||||
flag_pcc_struct_return = 0;
|
||||
|
||||
/* Decide which rtx_costs structure to use. */
|
||||
- if (optimize_size)
|
||||
+ if (0 && optimize_size)
|
||||
mips_cost = &mips_rtx_cost_optimize_size;
|
||||
else
|
||||
mips_cost = &mips_rtx_cost_data[mips_tune];
|
||||
2021
toolchain/gcc/patches-12.x/700-RISCV-Inline-subword-atomic-ops.patch
Normal file
2021
toolchain/gcc/patches-12.x/700-RISCV-Inline-subword-atomic-ops.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,36 @@
|
||||
From 203f3060dd363361b172f7295f42bb6bf5ac0b3b Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Schwab <schwab@suse.de>
|
||||
Date: Sat, 23 Apr 2022 15:48:42 +0200
|
||||
Subject: [PATCH] riscv/linux: Don't add -latomic with -pthread
|
||||
|
||||
Now that we have support for inline subword atomic operations, it is no
|
||||
longer necessary to link against libatomic. This also fixes testsuite
|
||||
failures because the framework does not properly set up the linker flags
|
||||
for finding libatomic.
|
||||
The use of atomic operations is also independent of the use of libpthread.
|
||||
|
||||
gcc/
|
||||
* config/riscv/linux.h (LIB_SPEC): Don't redefine.
|
||||
---
|
||||
gcc/config/riscv/linux.h | 10 ----------
|
||||
1 file changed, 10 deletions(-)
|
||||
|
||||
--- a/gcc/config/riscv/linux.h
|
||||
+++ b/gcc/config/riscv/linux.h
|
||||
@@ -35,16 +35,6 @@ along with GCC; see the file COPYING3.
|
||||
#undef MUSL_DYNAMIC_LINKER
|
||||
#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-riscv" XLEN_SPEC MUSL_ABI_SUFFIX ".so.1"
|
||||
|
||||
-/* Because RISC-V only has word-sized atomics, it requries libatomic where
|
||||
- others do not. So link libatomic by default, as needed. */
|
||||
-#undef LIB_SPEC
|
||||
-#ifdef LD_AS_NEEDED_OPTION
|
||||
-#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC \
|
||||
- " %{pthread:" LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION "}"
|
||||
-#else
|
||||
-#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC " -latomic "
|
||||
-#endif
|
||||
-
|
||||
#define ICACHE_FLUSH_FUNC "__riscv_flush_icache"
|
||||
|
||||
#define CPP_SPEC "%{pthread:-D_REENTRANT}"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user