diff --git a/.github/workflows/build-toolchains.yml b/.github/workflows/build-toolchains.yml index da90cfa39e..6718307971 100644 --- a/.github/workflows/build-toolchains.yml +++ b/.github/workflows/build-toolchains.yml @@ -19,25 +19,26 @@ jobs: runs-on: ${{ matrix.host }} strategy: matrix: - host: ["ubuntu-22.04", "macos-12"] + # host: ["ubuntu-22.04", "macos-14"] + host: ["ubuntu-22.04"] sample: ${{ fromJSON(inputs.samples) }} exclude: # Exclude both glibc & uClibc ARC Linux toolchains as # there's no known use of ARC Linux toolchains on Mac, # and anyway glibc fails to build for ARC700, # see https://github.com/crosstool-ng/crosstool-ng/pull/1456#issuecomment-779150246 - - {host: "macos-12", sample: "arc-multilib-linux-gnu"} - - {host: "macos-12", sample: "arc-multilib-linux-uclibc"} + - {host: "macos-14", sample: "arc-multilib-linux-gnu"} + - {host: "macos-14", sample: "arc-multilib-linux-uclibc"} # Exclude mips*-*-linux-gnu because of usage in # elf-entry.c for linux kernel headers. is a GNU # extension and doesn't exist on MacOS X - - {host: "macos-12", sample: "mips-unknown-linux-gnu"} - - {host: "macos-12", sample: "mips64-unknown-linux-gnu"} + - {host: "macos-14", sample: "mips-unknown-linux-gnu"} + - {host: "macos-14", sample: "mips64-unknown-linux-gnu"} # Exclude x86_64-w64-mingw32,x86_64-pc-linux-gnu because it crashes on m4 build with # a Segmentation fault - - {host: "macos-12", sample: "x86_64-w64-mingw32,x86_64-pc-linux-gnu"} + - {host: "macos-14", sample: "x86_64-w64-mingw32,x86_64-pc-linux-gnu"} steps: - name: create case sensitive workspace volume for macOS if: ${{ runner.os == 'macOS' }} @@ -72,7 +73,7 @@ jobs: if: ${{ runner.os == 'macOS' }} run: | brew install autoconf automake bash binutils gawk gnu-sed \ - gnu-tar help2man make ncurses pkg-config texinfo libtool + gnu-tar help2man make meson ncurses ninja pkg-config texinfo libtool echo "${{ github.workspace }}/.local/bin" >> "$GITHUB_PATH" - name: download x86_64-w64-mingw32.${{ matrix.host }} tarball if: ${{ inputs.canadian-cross }} @@ -94,7 +95,7 @@ jobs: sed -i -e '/CT_LOCAL_TARBALLS_DIR/s/HOME/CT_TOP_DIR/' .config sed -i -e '/CT_PREFIX_DIR/s/HOME/CT_TOP_DIR/' .config sed -i -e '/CT_GLIBC_ENABLE_DEBUG/s/y$/n/' .config - test ${{ matrix.host }} = "macos-12" && sed -i -e '/CT_GDB_CROSS_PYTHON/s/y$/n/' .config + test ${{ matrix.host }} = "macos-14" && sed -i -e '/CT_GDB_CROSS_PYTHON/s/y$/n/' .config ct-ng build - name: create ${{ matrix.sample }}.${{ matrix.host }} tarball if: ${{ matrix.sample == 'x86_64-w64-mingw32' }} diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index c25a721b71..bf6d65afaf 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -10,7 +10,8 @@ jobs: runs-on: ${{ matrix.host }} strategy: matrix: - host: ["ubuntu-22.04", "macos-12"] + # host: ["ubuntu-22.04", "macos-14"] + host: ["ubuntu-22.04"] steps: - name: "clone" uses: actions/checkout@v4 @@ -22,7 +23,7 @@ jobs: if: ${{ runner.os == 'macOS' }} run: | brew install autoconf automake bash binutils gawk gnu-sed \ - gnu-tar help2man make ncurses texinfo libtool + gnu-tar help2man libtool make meson ncurses ninja texinfo - name: "build ct-ng" run: | if [ "$RUNNER_OS" == "macOS" ]; then @@ -85,7 +86,7 @@ jobs: - name: "ct-ng source" run: | mkdir -p src - for sample in aarch64-unknown-linux-gnu arm-picolibc-eabi \ + for sample in aarch64-unknown-linux-gnu arm-none-eabi \ arm-unknown-linux-musleabi armv6-nommu-linux-uclibcgnueabi \ x86_64-w64-mingw32; do \ ct-ng $sample; \ @@ -95,6 +96,7 @@ jobs: sed -i -e 's/^.*CT_COMP_TOOLS_BISON.*$/CT_COMP_TOOLS_BISON=y/' .config; \ sed -i -e 's/^.*CT_COMP_TOOLS_M4.*$/CT_COMP_TOOLS_M4=y/' .config; \ sed -i -e 's/^.*CT_COMP_TOOLS_MAKE.*$/CT_COMP_TOOLS_MAKE=y/' .config; \ + sed -i -e 's/^.*CT_DOWNLOAD_WGET_OPTIONS.*$/CT_DOWNLOAD_WGET_OPTIONS="--tries=3 -nc --progress=dot:binary --no-use-server-timestamps"/' .config; \ ct-ng olddefconfig; \ ct-ng source; \ done @@ -129,6 +131,7 @@ jobs: "powerpc64-unknown-linux-musl", "riscv32-unknown-elf", "riscv64-unknown-elf", + "riscv64-unknown-linux-gnu", "s390-unknown-linux-gnu", "sh-unknown-elf", "sparc-unknown-linux-gnu", diff --git a/Makefile.am b/Makefile.am index 6f21739d63..caf266792d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -65,7 +65,7 @@ bash-completion/ct-ng: bash-completion/ct-ng.in Makefile # Also, lintian is picky about execute-bit on the scripts install-data-hook: rm -f $(DESTDIR)$(man1dir)/$(ctng_progname).1.gz - gzip -9 $(DESTDIR)$(man1dir)/$(ctng_progname).1 + gzip -n -9 $(DESTDIR)$(man1dir)/$(ctng_progname).1 chmod a+x $(DESTDIR)$(pkgdatadir)/scripts/config.guess chmod a+x $(DESTDIR)$(pkgdatadir)/scripts/config.sub rm -f $(DESTDIR)$(pkgdatadir)/LICENSE diff --git a/README.md b/README.md index 1320c0712c..41233dd739 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,7 @@ Crosstool-NG aims at building toolchains. Toolchains are an essential component Refer to [documentation at crosstool-NG website](http://crosstool-ng.github.io/docs/) for more information on how to configure, install and use crosstool-NG. -**Note 1:** If you elect to build a uClibc-based toolchain, you will have to prepare a config file for uClibc with <= crosstool-NG-1.21.0. In >= crosstool-NG-1.22.0 you only need to prepare a config file for uClibc(or uClibc-ng) if you really need a custom config for uClibc. - -**Note 2:** If you call `ct-ng --help` you will get help for `make(2)`. This is because ct-ng is in fact a `make(2)` script. There is no clean workaround for this. +**Note:** If you call `ct-ng --help` you will get help for `make(2)`. This is because ct-ng is in fact a `make(2)` script. There is no clean workaround for this. ## Repository layout diff --git a/config/arch/bpf.in b/config/arch/bpf.in index 9d0d7373dd..75cae2afad 100644 --- a/config/arch/bpf.in +++ b/config/arch/bpf.in @@ -3,7 +3,7 @@ ## no-package ## select ARCH_SUPPORTS_EITHER_ENDIAN ## select ARCH_DEFAULT_LE -## select GCC_VERY_NEW -## select BINUTILS_VERY_NEW +## select GCC_REQUIRE_12_or_later +## select BINUTILS_REQUIRE_2_41_or_later ## ## help The BPF architecture. diff --git a/config/arch/lm32.in b/config/arch/lm32.in new file mode 100644 index 0000000000..a2ae3b2d9d --- /dev/null +++ b/config/arch/lm32.in @@ -0,0 +1,10 @@ +# LatticeMico32 soft-core architecture + +## no-package +## select ARCH_SUPPORTS_32 +## select ARCH_DEFAULT_32 +## select ARCH_DEFAULT_BE +## depends on EXPERIMENTAL + +## help The LatticeMico32 soft-core architecture: +## help https://www.latticesemi.com/en/Products/DesignSoftwareAndIP/IntellectualProperty/IPCore/IPCores02/LatticeMico32.aspx diff --git a/config/arch/nios2.in b/config/arch/nios2.in index de28246f13..b5ebedb537 100644 --- a/config/arch/nios2.in +++ b/config/arch/nios2.in @@ -7,6 +7,10 @@ ## select ARCH_DEFAULT_LE ## select ARCH_SUPPORTS_WITH_ARCH ## select ARCH_SUPPORTS_FLAT_FORMAT +## select GCC_REQUIRE_older_than_15 +## select GDB_REQUIRE_older_than_16 if DEBUG_GDB +## select GLIBC_REQUIRE_older_than_2_41 if LIBC_GLIBC +## select BINUTILS_REQUIRE_older_than_2_44 ## ## help The NIOS2 architecture, as defined by: ## help http://www.altera.com diff --git a/config/arch/openrisc.in b/config/arch/openrisc.in new file mode 100644 index 0000000000..d4623ed17c --- /dev/null +++ b/config/arch/openrisc.in @@ -0,0 +1,13 @@ +# OpenRISC specific configuration file + +## no-package +## select ARCH_SUPPORTS_32 +## select ARCH_DEFAULT_32 +## select ARCH_SUPPORTS_BOTH_MMU +## select ARCH_DEFAULT_BE +## select ARCH_SUPPORTS_WITH_ARCH +## select ARCH_SUPPORTS_FLAT_FORMAT +## depends on EXPERIMENTAL +## +## help The OpenRISC architecture +## help https://openrisc.io/ diff --git a/config/arch/rx.in b/config/arch/rx.in new file mode 100644 index 0000000000..6e58d6280b --- /dev/null +++ b/config/arch/rx.in @@ -0,0 +1,11 @@ +## no-package +## select ARCH_SUPPORTS_32 +## select ARCH_DEFAULT_32 +## select ARCH_SUPPORTS_FLAT_FORMAT +## select ARCH_SUPPORTS_EITHER_ENDIAN +## select ARCH_DEFAULT_LE +## select ARCH_REQUIRES_MULTILIB +## select ARCH_SUPPORTS_WITH_ENDIAN + +## help The RX architecture, as defined by: +## help https://www.renesas.com/en/products/microcontrollers-microprocessors/rx-32-bit-performance-efficiency-mcus diff --git a/config/arch/sh.in b/config/arch/sh.in index ff2ec14272..8ebdd74424 100644 --- a/config/arch/sh.in +++ b/config/arch/sh.in @@ -3,8 +3,6 @@ ## no-package ## select ARCH_SUPPORTS_32 ## select ARCH_DEFAULT_32 -## select ARCH_SUPPORTS_BOTH_MMU -## select ARCH_DEFAULT_HAS_MMU ## select ARCH_SUPPORTS_FLAT_FORMAT ## select ARCH_SUPPORTS_EITHER_ENDIAN ## select ARCH_DEFAULT_LE @@ -21,6 +19,8 @@ choice # GCC supports both endiannesses even if a specific CPU is selected (so long # as that CPU can be both BE/LE), but the binutils (or specifically, ld) # configures for both endiannesses only if sh-*-linux target is selected. +# --with-cpu can be used to set the mmu and precision options, +# so dont include the options aswell config ARCH_SH_SH bool prompt "unspecified" @@ -62,16 +62,45 @@ config ARCH_SH_SH4A bool prompt "sh4a" +config ARCH_SH_SH4AL + bool + prompt "sh4al" + endchoice config ARCH_SH_VARIANT string - default "sh" if ARCH_SH_SH + default "sh" if ARCH_SH_SH default "sh1" if ARCH_SH_SH1 default "sh2" if ARCH_SH_SH2 - default "sh2e" if ARCH_SH_SH2E - default "sh2a" if ARCH_SH_SH2A + default "sh2e" if ARCH_SH_SH2E + default "sh2a" if ARCH_SH_SH2A default "sh3" if ARCH_SH_SH3 - default "sh3e" if ARCH_SH_SH3E + default "sh3e" if ARCH_SH_SH3E default "sh4" if ARCH_SH_SH4 default "sh4a" if ARCH_SH_SH4A + default "sh4al" if ARCH_SH_SH4AL + +config ARCH_SH_ENABLE_FPU_OPTIONS + bool + default y if ARCH_SH_SH2A + default y if ARCH_SH_SH4 + default y if ARCH_SH_SH4A + select ARCH_SUPPORTS_BOTH_MMU + select ARCH_DEFAULT_HAS_MMU + +config ARCH_SH_ENABLE_PRECISION_OPTIONS + bool + default y if ARCH_USE_MMU + select ARCH_SUPPORTS_WITH_FLOATING_PRECISION + select ARCH_SUPPORTS_PRECISION_UNSPECIFIED + select ARCH_SUPPORTS_PRECISION_SINGLE_ONLY + select ARCH_SUPPORTS_PRECISION_SINGLE_WITH_DOUBLE + select ARCH_DEFAULT_PRECISION_UNSPECIFIED + +config ARCH_SH_FLOAT_SUFFIX + string + default "" if !ARCH_SH_ENABLE_FPU_OPTIONS + default "_nofpu" if !ARCH_USE_MMU + default "_single" if ARCH_FLOATING_PRECISION_SINGLE_WITH_DOUBLE + default "_single_only" if ARCH_FLOATING_PRECISION_SINGLE_ONLY diff --git a/config/arch/tricore.in b/config/arch/tricore.in new file mode 100644 index 0000000000..cff8ca63c9 --- /dev/null +++ b/config/arch/tricore.in @@ -0,0 +1,10 @@ +# tricore specific configuration file + +## no-package +## depends on EXPERIMENTAL +## +## select ARCH_SUPPORTS_32 +## select ARCH_SUPPORTS_BOTH_ENDIAN +## select ARCH_DEFAULT_LE +## select ARCH_SUPPORTS_FLAT_FORMAT + diff --git a/config/binutils/binutils.in b/config/binutils/binutils.in index 4a91a8f7ab..623c594214 100644 --- a/config/binutils/binutils.in +++ b/config/binutils/binutils.in @@ -13,10 +13,16 @@ config BINUTILS_GOLD_SUPPORTS_ARCH default y if ARCH_SPARC default y if ARCH_X86 +# Support for gold was deprecated and removed from binutils 2.44. +config BINUTILS_HAS_GOLD + bool + default y if !BINUTILS_2_44_or_later + default y if !BINUTILS_SRC_RELEASE + config BINUTILS_GOLD_SUPPORT bool default y - depends on BINUTILS_GOLD_SUPPORTS_ARCH + depends on BINUTILS_GOLD_SUPPORTS_ARCH && BINUTILS_HAS_GOLD # Force using the BFD linker if needed. There are two options: # - For some C libraries (eg. glibc at least), BFD ld must be @@ -34,6 +40,11 @@ config BINUTILS_DEP_BISON depends on BINUTILS_2_39_or_later && !CONFIGURE_has_bison_3_0_4_or_newer && (ARCH_X86 || (ARCH_ARM && ARCH_64)) select COMP_TOOLS_BISON +if BINUTILS_2_44_or_later && BINUTILS_GOLD_SUPPORT && !BINUTILS_SRC_RELEASE +comment "WARNING! For binutils >= 2.44 only enable gold support if supplied" +comment "| through custom source tree." +endif + choice bool prompt "Linkers to enable" @@ -132,6 +143,7 @@ config BINUTILS_LINKER_DEFAULT config BINUTILS_PLUGINS bool prompt "Enable support for plugins" + depends on !STATIC_TOOLCHAIN help binutils can be extended through the use of plugins. Especially, gold can use the lto-plugin, as installed @@ -175,6 +187,14 @@ config BINUTILS_FOR_TARGET Some utilities may need binutils libraries to be available on the target, eg. oprofile. +config BINUTILS_GPROFNG + bool + prompt "Enable the gprofng profiler" + help + The next generation GNU application profiling tool + Disabled by default since it contains non-portable code + (i.e. requires glibc on the host) + if BINUTILS_FOR_TARGET config BINUTILS_FOR_TARGET_IBERTY diff --git a/config/cc/gcc.in b/config/cc/gcc.in index 6e6bb8283d..7928468c1e 100644 --- a/config/cc/gcc.in +++ b/config/cc/gcc.in @@ -53,15 +53,6 @@ config CC_GCC_ENABLE_CXX_FLAGS Note: just pass in the option _value_, that is only the part that goes after the '=' sign. -config CC_GCC_EXTRA_LIBSTDCXX - bool "Re-enable libstdcxx" - default n - depends on LIBC_AVR_LIBC - select CC_CORE_PASS_2_NEEDED - help - libstdcxx is normally disabled on avr systems due to size limitations. - Set this option to re-enable libstdcxx support. - config CC_GCC_CORE_EXTRA_CONFIG_ARRAY string "Core gcc extra config" default "" @@ -240,6 +231,48 @@ config CC_GCC_ENABLE_TARGET_OPTSPACE This will compile crossgcc's libs with -Os. +config CC_GCC_LIBSTDCXX + tristate "Build libstdcxx" + default n if ARCH_AVR || LIBC_NONE + default m + depends on CC_LANG_CXX + select CC_CORE_NEEDED if ARCH_AVR + help + libstdcxx is normally disabled on some systems, like avr, due to size + limitations or it being not supported. + Set this option to force libstdcxx support. + + Option | libstdcxx build | Associated ./configure switch + ---------+--------------------+-------------------------------- + Y | forcibly | --enable-libstdcxx + M | auto | (none, ./configure decides) + N | forcibly not | --disable-libstdcxx + +config CC_GCC_LIBSTDCXX_HOSTED_DISABLE + bool "Build freestanding libstdcxx" + default y if LIBC_AVR_LIBC + default n + depends on CC_GCC_LIBSTDCXX + help + libstdcxx can be compiled in two modes: hosted and freestanding. + Hosted mode is the default, and is used when the OS is available. + Freestanding mode is used when the OS is not available, like in + bare-metal systems. + + Some architectures, like avr, do not support hosted mode, but default + to it, and will fail to build libstdcxx in hosted mode. + + Answer 'y' here to force freestanding mode, otherwise answer let + ./configure decide. + +config CC_GCC_LIBSTDCXX_TARGET_CXXFLAGS + string + prompt "Target CXXFLAGS for libstdc++" + default "" + help + Used to add extra CXXFLAGS when compiling the target libstdc++ + library (e.g. -fno-exceptions). + config CC_GCC_LIBMUDFLAP bool prompt "Compile libmudflap" diff --git a/config/comp_libs/gmp.in b/config/comp_libs/gmp.in index f49d1a71e6..7baac528aa 100644 --- a/config/comp_libs/gmp.in +++ b/config/comp_libs/gmp.in @@ -1 +1,6 @@ # GMP options +config GMP_EXTRA_CFLAGS + string "extra target CFLAGS" + default "-std=gnu17" if GCC_15_or_later + help + Extra target CFLAGS to use when building. diff --git a/config/comp_libs/mpc.in b/config/comp_libs/mpc.in index 422935f0d0..2d948a7884 100644 --- a/config/comp_libs/mpc.in +++ b/config/comp_libs/mpc.in @@ -1,3 +1 @@ # MPC options -# MPC 1.0.x and earlier break with MPFR 4.0.0. -## select MPFR_REQUIRE_older_than_4_0_0 if MPFR_NEEDED && !MPC_1_1_0_or_later diff --git a/config/comp_libs/ncurses.in b/config/comp_libs/ncurses.in index 4e7e6d47ba..3d257439bc 100644 --- a/config/comp_libs/ncurses.in +++ b/config/comp_libs/ncurses.in @@ -55,3 +55,8 @@ config NCURSES_TARGET_FALLBACKS List of terminal descriptions that will be compiled into the curses library for the target. +config NCURSES_EXTRA_CFLAGS + string "extra target CFLAGS" + default "-std=gnu17" if GCC_15_or_later + help + Extra target CFLAGS fto use when building. diff --git a/config/comp_libs/picolibc.in b/config/comp_libs/picolibc.in index 4b283aecc7..c978c35b09 100644 --- a/config/comp_libs/picolibc.in +++ b/config/comp_libs/picolibc.in @@ -27,6 +27,14 @@ config LIBC_PICOLIBC_GCC_LIBSTDCXX the picolibc companion library. This version is linked when "--specs=picolibcpp.specs" is specified. +config LIBC_PICOLIBC_GCC_LIBSTDCXX_TARGET_CXXFLAGS + string + prompt "Target CXXFLAGS for libstdc++ picolibc variant" + default "" + help + Used to add extra CXXFLAGS when compiling the target libstdc++ + picolibc library (e.g. -fno-exceptions). + comment "Configuration for picolibc can be found under" comment "* -> C-library" comment "* -> picolibc" diff --git a/config/contrib/gcc-test-suite.in b/config/contrib/gcc-test-suite.in new file mode 100644 index 0000000000..6a4c876f64 --- /dev/null +++ b/config/contrib/gcc-test-suite.in @@ -0,0 +1,47 @@ +choice + bool "How to execute tests" + default TEST_SUITE_GCC_SSH + +config TEST_SUITE_GCC_SSH + bool "Run test suite on remote host" + help + Select this option to execute GCC tests on a remote host, + specified by TEST_SUITE_GCC_HOST. + +config TEST_SUITE_GCC_QEMU + bool "Run test suite using qemu" + help + Select this option to execute GCC tests using qemu on the local + host. + +endchoice + +config TEST_SUITE_GCC_TARGET_HOSTNAME + string "Remote host to execute GCC tests" + default "127.0.0.1" + depends on TEST_SUITE_GCC_SSH + help + Set this to the remote host name where gcc tests will be run. + +config TEST_SUITE_GCC_TARGET_USERNAME + string "Username on remote host" + default "root" + depends on TEST_SUITE_GCC_SSH + help + Set this to the username on the remote hosts for GCC tests. + +config TEST_SUITE_GCC_QEMU_PROGRAM + string "Qemu program" + depends on TEST_SUITE_GCC_QEMU + help + Specifies the qemu program name. If unset, this will be "qemu-" + followed by the first component of the target name. + +config TEST_SUITE_GCC_QEMU_ARGS + string "Qemu program args" + depends on TEST_SUITE_GCC_QEMU + default "-L @SYSROOT@" + help + Specifies any arguments needed by qemu before the executable + filename. If unset, this will be "-L" followed by the path to + the sysroot in the installed toolchain. diff --git a/config/debug/ltrace.in b/config/debug/ltrace.in index 61f5531d37..cdea71977a 100644 --- a/config/debug/ltrace.in +++ b/config/debug/ltrace.in @@ -1,5 +1,6 @@ # ltrace +## depends on ! BARE_METAL ## select LIBELF_TARGET ## ## help ltrace is a program that simply runs the specified command until it exits. diff --git a/config/global/download.in b/config/global/download.in index 57f42e6fd3..9a4d6cecda 100644 --- a/config/global/download.in +++ b/config/global/download.in @@ -67,7 +67,7 @@ if DOWNLOAD_AGENT_WGET config DOWNLOAD_WGET_OPTIONS string "Extra options to wget" - default "--passive-ftp --tries=3 -nc --progress=dot:binary" + default "--tries=3 -nc --progress=dot:binary" endif diff --git a/config/kernel/linux.in b/config/kernel/linux.in index 0f85ff89a8..6e929c23c9 100644 --- a/config/kernel/linux.in +++ b/config/kernel/linux.in @@ -1,6 +1,6 @@ # Linux kernel options -## depends on !ARCH_AVR && !ARCH_MSP430 && !ARCH_MOXIE && !ARCH_PRU +## depends on !ARCH_AVR && !ARCH_LM32 && !ARCH_MSP430 && !ARCH_MOXIE && !ARCH_PRU ## select KERNEL_SUPPORTS_SHARED_LIBS ## help Build a toolchain targeting systems running Linux as a kernel. diff --git a/config/kernel/windows.in b/config/kernel/windows.in index 66275cc4c1..8bb2881291 100644 --- a/config/kernel/windows.in +++ b/config/kernel/windows.in @@ -1,7 +1,7 @@ # windows config options ## no-package -## depends on ARCH_X86 +## depends on ARCH_X86 || (ARCH_ARM && ARCH_64) ## depends on EXPERIMENTAL ## ## select WINDOWS diff --git a/config/libc/glibc.in b/config/libc/glibc.in index 06709b4cb1..dab8985660 100644 --- a/config/libc/glibc.in +++ b/config/libc/glibc.in @@ -33,6 +33,7 @@ config GLIBC_DEP_KERNEL_HEADERS_VERSION config GLIBC_DEP_BINUTILS def_bool y select BINUTILS_REQUIRE_2_25_or_later if GLIBC_2_26_or_later + select BINUTILS_REQUIRE_2_39_or_later if GLIBC_2_42_or_later select BINUTILS_REQUIRE_older_than_2_30 if GLIBC_older_than_2_26 && ARCH_ARM && ARCH_64 # Glibc 2.26 requires GCC4.9 or newer @@ -45,6 +46,7 @@ config GLIBC_DEP_GCC select GCC_REQUIRE_5_or_later if GLIBC_2_29_or_later select GCC_REQUIRE_6_or_later if GLIBC_2_29_or_later && ARCH_POWERPC && ARCH_64 && ARCH_LE select GCC_REQUIRE_6_or_later if GLIBC_2_30_or_later + select GCC_REQUIRE_12_or_later if GLIBC_2_42_or_later # Glibc 2.29 requires bison 2.7 or later. All versions in ct-ng satisfy that # version requirement. @@ -168,11 +170,11 @@ config GLIBC_HAS_DEPRECATED_LIBCRYPT def_bool y depends on GLIBC_2_28_or_later -# As of 2.38 libcrypt is no longer built by default. It will likely be removed in a future -# version. +# As of 2.38 libcrypt is no longer built by default. It was completely removed +# as of 2.39 config GLIBC_HAS_OBSOLETE_LIBCRYPT def_bool y - depends on GLIBC_2_38_or_later + depends on GLIBC_2_38_or_later && !GLIBC_2_39_or_later select XCRYPT_TARGET config GLIBC_EXTRA_CONFIG_ARRAY @@ -312,6 +314,12 @@ comment "| Building GLIBC locales requires that GLIBC supports " comment "| the build machine as the target. " endif # LIBC_GLIBC && GLIBC_LOCALES +# Older Glibc versions are incompatible with newer makeinfo versions. Skip +# building the user manual if needed. +config GLIBC_MAKEINFO_WORKAROUND + def_bool y + depends on GLIBC_2_23_or_older + if KERNEL_LINUX choice GLIBC_SUPPORTED_KERNEL diff --git a/config/libc/picolibc.in b/config/libc/picolibc.in index 6c4c6cac79..c3014b1181 100644 --- a/config/libc/picolibc.in +++ b/config/libc/picolibc.in @@ -40,31 +40,47 @@ config LIBC_PICOLIBC_IO_C99FMT config LIBC_PICOLIBC_REGISTER_FINI bool - prompt "Enable finalization function registration using atexit" + prompt "Enable finalization function registration using atexit [unused]" help Enable finalization function registration using atexit. + This would be used when building with the legacy newlib exit + handling code which cannot be enabled in crosstool-ng, so + this option doesn't do anything. + config LIBC_PICOLIBC_ATEXIT_DYNAMIC_ALLOC bool - prompt "Enable dynamic allocation of atexit entries" + prompt "Enable dynamic allocation of atexit entries [unused]" help Enable dynamic allocation of atexit entries. + This would be used when building with the legacy newlib exit + handling code which cannot be enabled in crosstool-ng, so + this option doesn't do anything. + config LIBC_PICOLIBC_GLOBAL_ATEXIT bool - prompt "Enable atexit data structure as global variable" + prompt "Enable atexit data structure as global variable [unused]" help Enable atexit data structure as global variable, instead of being thread-local. + This would be used when building with the legacy newlib exit + handling code which cannot be enabled in crosstool-ng, so + this option doesn't do anything. + config LIBC_PICOLIBC_LITE_EXIT bool - prompt "Enable lite exit" + prompt "Enable lite exit [unused]" default y help Enable lite exit, a size-reduced implementation of exit that doesn't invoke clean-up functions such as _fini or global destructors. + This would be used when building with the legacy newlib exit + handling code which cannot be enabled in crosstool-ng, so + this option doesn't do anything. + config LIBC_PICOLIBC_MULTITHREAD bool prompt "Enable support for multiple threads" @@ -74,12 +90,15 @@ config LIBC_PICOLIBC_MULTITHREAD config LIBC_PICOLIBC_RETARGETABLE_LOCKING bool - prompt "Enable retargetable locking" + prompt "Enable retargetable locking [unused]" default y help Enable retargetable locking to allow the operating system to override the dummy lock functions defined within picolibc. + This value was always required to match + LIBC_PICOLIBC_MULTITHREAD, so it is no longer used. + config LIBC_PICOLIBC_EXTRA_SECTIONS bool prompt "Place each function & data element in their own section" diff --git a/config/target.in b/config/target.in index 2130262298..ed41539417 100644 --- a/config/target.in +++ b/config/target.in @@ -434,6 +434,132 @@ config ARCH_FLOAT_SW endchoice +#-------------------------------------- + +config ARCH_SUPPORTS_WITH_FLOATING_PRECISION + bool + +config ARCH_SUPPORTS_PRECISION_AUTO + bool + +config ARCH_SUPPORTS_PRECISION_SINGLE_ONLY + bool + +config ARCH_SUPPORTS_PRECISION_DOUBLE_ONLY + bool + +config ARCH_SUPPORTS_PRECISION_BOTH + bool + +config ARCH_SUPPORTS_PRECISION_SINGLE_WITH_DOUBLE + bool + +config ARCH_SUPPORTS_PRECISION_DOUBLE_WITH_SINGLE + bool + +config ARCH_SUPPORTS_PRECISION_UNSPECIFIED + bool + +config ARCH_DEFAULT_PRECISION_AUTO + bool + +config ARCH_DEFAULT_PRECISION_SINGLE_ONLY + bool + +config ARCH_DEFAULT_PRECISION_DOUBLE_ONLY + bool + +config ARCH_DEFAULT_PRECISION_BOTH + bool + +config ARCH_DEFAULT_PRECISION_SINGLE_WITH_DOUBLE + bool + +config ARCH_DEFAULT_PRECISION_DOUBLE_WITH_SINGLE + bool + +config ARCH_DEFAULT_PRECISION_UNSPECIFIED + bool + +choice + bool + prompt "Floating point precision:" + depends on ARCH_SUPPORTS_WITH_FLOATING_PRECISION + default ARCH_FLOATING_PRECISION_AUTO if ARCH_DEFAULT_PRECISION_AUTO + default ARCH_FLOATING_PRECISION_SINGLE_ONLY if ARCH_DEFAULT_PRECISION_SINGLE_ONLY + default ARCH_FLOATING_PRECISION_DOUBLE_ONLY if ARCH_DEFAULT_PRECISION_DOUBLE_ONLY + default ARCH_FLOATING_PRECISION_BOTH if ARCH_DEFAULT_PRECISION_BOTH + default ARCH_FLOATING_PRECISION_SINGLE_WITH_DOUBLE if ARCH_DEFAULT_PRECISION_SINGLE_WITH_DOUBLE + default ARCH_FLOATING_PRECISION_DOUBLE_WITH_SINGLE if ARCH_DEFAULT_PRECISION_DOUBLE_WITH_SINGLE + default ARCH_FLOATING_PRECISION_UNSPECIFIED if ARCH_DEFAULT_PRECISION_UNSPECIFIED + +config ARCH_FLOATING_PRECISION_AUTO + bool + prompt "auto (let gcc decide)" + depends on ARCH_SUPPORTS_PRECISION_AUTO + help + Instead of explicitly passing a float precision option, don't + pass any float precision options and let gcc figure it out. + +config ARCH_FLOATING_PRECISION_SINGLE_ONLY + bool + prompt "single (32-bit)" + depends on ARCH_SUPPORTS_PRECISION_SINGLE_ONLY + help + Use single precision floating point operations. + +config ARCH_FLOATING_PRECISION_DOUBLE_ONLY + bool + prompt "double (64-bit)" + depends on ARCH_SUPPORTS_PRECISION_DOUBLE_ONLY + help + Use double precision floating point operations. + +config ARCH_FLOATING_PRECISION_BOTH + bool + prompt "single and double (32-bit and 64-bit)" + depends on ARCH_SUPPORTS_PRECISION_BOTH + help + Use both single and double precision floating point operations. + +config ARCH_FLOATING_PRECISION_SINGLE_WITH_DOUBLE + bool + prompt "single with double (32-bit with 64-bit)" + depends on ARCH_SUPPORTS_PRECISION_SINGLE_WITH_DOUBLE + help + Use single precision floating point operations, but allow double + precision floating point operations when needed. + +config ARCH_FLOATING_PRECISION_DOUBLE_WITH_SINGLE + bool + prompt "double with single (64-bit with 32-bit)" + depends on ARCH_SUPPORTS_PRECISION_DOUBLE_WITH_SINGLE + help + Use double precision floating point operations, but allow single + precision floating point operations when needed. + +config ARCH_FLOATING_PRECISION_UNSPECIFIED + bool + prompt "default (leave unspecified)" + depends on ARCH_SUPPORTS_PRECISION_UNSPECIFIED + help + Use the default floating point precision for the architecture. + +endchoice + +config ARCH_FLOATING_PRECISION + string + depends on ARCH_SUPPORTS_WITH_FLOATING_PRECISION + default "auto" if ARCH_FLOATING_PRECISION_AUTO + default "single" if ARCH_FLOATING_PRECISION_SINGLE_ONLY + default "double" if ARCH_FLOATING_PRECISION_DOUBLE_ONLY + default "both" if ARCH_FLOATING_PRECISION_BOTH + default "single,double" if ARCH_FLOATING_PRECISION_SINGLE_WITH_DOUBLE + default "double,single" if ARCH_FLOATING_PRECISION_DOUBLE_WITH_SINGLE + default "" if ARCH_FLOATING_PRECISION_UNSPECIFIED + +#-------------------------------------- + config TARGET_CFLAGS string prompt "Target CFLAGS" diff --git a/config/test_suite.in b/config/test_suite.in index 978635d37e..8cfe14342e 100644 --- a/config/test_suite.in +++ b/config/test_suite.in @@ -17,11 +17,14 @@ config TEST_SUITE_GCC The GCC test suite includes a collection of various toolchain tests for GCC - it utilizes the DejaGnu test framework. - For some tests a network enabled target with ssh server is required. - A helper Makefile is provided for running the tests - please see the included README for information on how to run the test suite. +if TEST_SUITE_GCC +source "config/contrib/gcc-test-suite.in" +endif + endmenu endif + diff --git a/config/toolchain.in b/config/toolchain.in index 36a4782e1d..0042d769c4 100644 --- a/config/toolchain.in +++ b/config/toolchain.in @@ -333,4 +333,15 @@ config TOOLCHAIN_ENABLE_NLS help Say 'Y' here to enable native language support (nls). +config TOOLCHAIN_CMAKE_TOOLCHAIN_FILE + bool + prompt "Install cmake toolchain file" + default y if EXPERIMENTAL + help + Say 'Y' here if you want to have a simple toolchain file for + cmake build system. The file will be installed at + ${CT_PREFIX_DIR}/toolchain.cmake. Since paths in this file are + relative, it is safe to move the entire toolchain to other location, + but toolchain.cmake must be kept at the toplevel. + endmenu diff --git a/contrib/gcc-test-suite/Makefile b/contrib/gcc-test-suite/Makefile index c3e1794238..7dc836bc95 100644 --- a/contrib/gcc-test-suite/Makefile +++ b/contrib/gcc-test-suite/Makefile @@ -13,16 +13,23 @@ # # Internal configuration -TARGET:=@@DG_TARGET@@ TOPDIR:=$(shell pwd) LOGDIR:=$(TOPDIR)/tmp # Include default configuration include default.cfg +TARGET:=$(DG_TARGET) + # Add toolchain to path PATH:=$(shell cd ../../bin && pwd):$(PATH) +# Set sysroot +SYSROOT:=$(shell cd ../../$(TARGET)/sysroot && pwd) + +# Set qemu +DG_QEMU_PROGRAM:=qemu-$(shell echo $(TARGET) | sed 's/-.*$$//') + # Select test set ifeq ($(DG_TOOLNAME),gcc) DG_TESTS:=$(DG_C_TESTS) @@ -31,6 +38,12 @@ ifeq ($(DG_TOOLNAME),g++) DG_TESTS:=$(DG_CPP_TESTS) endif +ifeq ($(DG_QEMU),y) + TARGET_BOARD=unix +else + TARGET_BOARD=board +endif + # Check that we have 'runtest' installed RUNTEST=$(shell which runtest) ifeq ($(RUNTEST),) @@ -48,6 +61,7 @@ $(LOGDIR)/site.exp: $(TOPDIR)/default.cfg $(LOGDIR) echo 'set tmpdir "$(TOPDIR)"'; \ echo 'set target_alias $(TARGET)'; } > $@ +# Create config for remote execution $(LOGDIR)/board.exp: $(TOPDIR)/default.cfg $(LOGDIR) @{ echo 'load_generic_config "unix"'; \ echo 'process_multilib_options ""'; \ @@ -57,19 +71,26 @@ $(LOGDIR)/board.exp: $(TOPDIR)/default.cfg $(LOGDIR) echo 'set_board_info hostname $(DG_TARGET_HOSTNAME)'; \ echo 'set_board_info username $(DG_TARGET_USERNAME)'; } > $@ +# create config for local execution via qemu +$(LOGDIR)/unix.exp: $(TOPDIR)/default.cfg $(LOGDIR) + @{ echo 'load_generic_config "unix"'; \ + echo 'process_multilib_options ""'; \ + echo 'set_board_info bmk,use_alarm 1'; \ + echo 'set_board_info exec_shell "$(DG_QEMU_PROGRAM) $(DG_QEMU_ARGS)"'; } > $@ + # As Martin puts it: # > The thing is that when you run 50k+ test cases the odds are that at # > least one will fail and thus runtest basically always return an error # > despite the fact that the test session has executed successfully. # So just ignore any error reported by runtest -test: $(LOGDIR)/board.exp $(LOGDIR)/site.exp $(LOGDIR) +test: $(LOGDIR)/$(TARGET_BOARD).exp $(LOGDIR)/site.exp $(LOGDIR) @runtest --tool $(DG_TOOLNAME) \ --srcdir $(TOPDIR)/testsuite \ --objdir $(LOGDIR) \ --outdir $(LOGDIR) \ --all \ --target $(TARGET) \ - --target_board board \ + --target_board $(TARGET_BOARD) \ $(DG_TESTS) \ GXX_UNDER_TEST=$(TARGET)-g++ || true @printf "Result files available in '%s'\n" "$(LOGDIR)" diff --git a/contrib/gcc-test-suite/default.cfg b/contrib/gcc-test-suite/default.cfg index d523008b92..2089d77a01 100644 --- a/contrib/gcc-test-suite/default.cfg +++ b/contrib/gcc-test-suite/default.cfg @@ -1,9 +1,16 @@ # Default test suite configuration +DG_TARGET = @@DG_TARGET@@ + # Default DejaGnu configuration DG_TOOLNAME = gcc -DG_TARGET_HOSTNAME = 127.0.0.1 -DG_TARGET_USERNAME = root +DG_SSH = @@DG_SSH@@ +DG_QEMU = @@DG_QEMU@@ +DG_TARGET_HOSTNAME = @@DG_TARGET_HOSTNAME@@ +DG_TARGET_USERNAME = @@DG_TARGET_USERNAME@@ + +DG_QEMU_PROGRAM = @@DG_QEMU_PROGRAM@@ +DG_QEMU_ARGS = @@DG_QEMU_ARGS@@ # Default tests DG_C_TESTS = diff --git a/m4/ctng_python.m4 b/m4/ctng_python.m4 index a223b2be5f..c2dbbd1903 100644 --- a/m4/ctng_python.m4 +++ b/m4/ctng_python.m4 @@ -60,15 +60,17 @@ AC_DEFUN([CTNG_PYTHON], [ AC_MSG_CHECKING(for python build information) AC_MSG_RESULT([]) - for python in python3.12 python3.11 python3.10 python3.9 python3.8 python3.7 dnl + for python in python3.14 python3.13 python3.12 python3.11 python3.10 python3.9 python3.8 python3.7 dnl python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 dnl python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python; do AC_PATH_PROGS(PYTHON_BIN, [$python]) + AC_CHECK_PROGS(PYTHON_BIN_, [$python]) ctng_python_bin=$PYTHON_BIN + ctng_python_bin_=$PYTHON_BIN_ if test "$ctng_python_bin" != ""; then - AC_CHECK_LIB($ctng_python_bin, main, ctng_python_lib=$ctng_python_bin, ctng_python_lib=no) + AC_CHECK_LIB($ctng_python_bin_, main, ctng_python_lib=$ctng_python_bin_, ctng_python_lib=no) if test "$ctng_python_lib" = "no"; then - AC_CHECK_LIB(${ctng_python_bin}m, main, ctng_python_lib=${ctng_python_bin}m, ctng_python_lib=no) + AC_CHECK_LIB(${ctng_python_bin_}m, main, ctng_python_lib=${ctng_python_bin_}m, ctng_python_lib=no) fi if test "$ctng_python_lib" != "no"; then $ctng_python_bin -c 'import sysconfig' 2>&1 diff --git a/m4/ctng_python_version.m4 b/m4/ctng_python_version.m4 index b07cc36845..796c76382e 100644 --- a/m4/ctng_python_version.m4 +++ b/m4/ctng_python_version.m4 @@ -6,12 +6,16 @@ AC_DEFUN([CTNG_PYTHON_VERSION], [ AC_MSG_CHECKING(for python version greater than $1.$2) - pyvermajor=$($PYTHON_BIN -c "import sys; print(sys.version_info.major)") - pyverminor=$($PYTHON_BIN -c "import sys; print(sys.version_info.minor)") + AS_IF([test -n "$PYTHON_BIN"], + pyvermajor=$($PYTHON_BIN -c "import sys; print(sys.version_info.major)") + pyverminor=$($PYTHON_BIN -c "import sys; print(sys.version_info.minor)"), + pyvermajor=0 + pyverminor=0) AS_IF([test $pyvermajor -ge $1 -a $pyverminor -ge $2], eval "python_$1_$2_or_newer=y" - [CTNG_SET_KCONFIG_OPTION([python_$1_$2_or_newer]) - AC_MSG_RESULT([yes: ${pyvermajor}.${pyverminor}])], - AC_MSG_RESULT([no: ${pyvermajor}.${pyverminor}])) + AC_MSG_RESULT([yes: ${pyvermajor}.${pyverminor}]), + AC_MSG_RESULT([no])) + + CTNG_SET_KCONFIG_OPTION([python_$1_$2_or_newer]) ])dnl diff --git a/m4/host-cpu-c-abi.m4 b/m4/host-cpu-c-abi.m4 new file mode 100644 index 0000000000..6db2aa25ae --- /dev/null +++ b/m4/host-cpu-c-abi.m4 @@ -0,0 +1,675 @@ +# host-cpu-c-abi.m4 serial 13 +dnl Copyright (C) 2002-2020 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible and Sam Steingold. + +dnl Sets the HOST_CPU variable to the canonical name of the CPU. +dnl Sets the HOST_CPU_C_ABI variable to the canonical name of the CPU with its +dnl C language ABI (application binary interface). +dnl Also defines __${HOST_CPU}__ and __${HOST_CPU_C_ABI}__ as C macros in +dnl config.h. +dnl +dnl This canonical name can be used to select a particular assembly language +dnl source file that will interoperate with C code on the given host. +dnl +dnl For example: +dnl * 'i386' and 'sparc' are different canonical names, because code for i386 +dnl will not run on SPARC CPUs and vice versa. They have different +dnl instruction sets. +dnl * 'sparc' and 'sparc64' are different canonical names, because code for +dnl 'sparc' and code for 'sparc64' cannot be linked together: 'sparc' code +dnl contains 32-bit instructions, whereas 'sparc64' code contains 64-bit +dnl instructions. A process on a SPARC CPU can be in 32-bit mode or in 64-bit +dnl mode, but not both. +dnl * 'mips' and 'mipsn32' are different canonical names, because they use +dnl different argument passing and return conventions for C functions, and +dnl although the instruction set of 'mips' is a large subset of the +dnl instruction set of 'mipsn32'. +dnl * 'mipsn32' and 'mips64' are different canonical names, because they use +dnl different sizes for the C types like 'int' and 'void *', and although +dnl the instruction sets of 'mipsn32' and 'mips64' are the same. +dnl * The same canonical name is used for different endiannesses. You can +dnl determine the endianness through preprocessor symbols: +dnl - 'arm': test __ARMEL__. +dnl - 'mips', 'mipsn32', 'mips64': test _MIPSEB vs. _MIPSEL. +dnl - 'powerpc64': test _BIG_ENDIAN vs. _LITTLE_ENDIAN. +dnl * The same name 'i386' is used for CPUs of type i386, i486, i586 +dnl (Pentium), AMD K7, Pentium II, Pentium IV, etc., because +dnl - Instructions that do not exist on all of these CPUs (cmpxchg, +dnl MMX, SSE, SSE2, 3DNow! etc.) are not frequently used. If your +dnl assembly language source files use such instructions, you will +dnl need to make the distinction. +dnl - Speed of execution of the common instruction set is reasonable across +dnl the entire family of CPUs. If you have assembly language source files +dnl that are optimized for particular CPU types (like GNU gmp has), you +dnl will need to make the distinction. +dnl See . +AC_DEFUN([gl_HOST_CPU_C_ABI], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([gl_C_ASM]) + AC_CACHE_CHECK([host CPU and C ABI], [gl_cv_host_cpu_c_abi], + [case "$host_cpu" in + +changequote(,)dnl + i[34567]86 ) +changequote([,])dnl + gl_cv_host_cpu_c_abi=i386 + ;; + + x86_64 ) + # On x86_64 systems, the C compiler may be generating code in one of + # these ABIs: + # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. + # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 + # with native Windows (mingw, MSVC). + # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if (defined __x86_64__ || defined __amd64__ \ + || defined _M_X64 || defined _M_AMD64) + int ok; + #else + error fail + #endif + ]])], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __ILP32__ || defined _ILP32 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=x86_64-x32], + [gl_cv_host_cpu_c_abi=x86_64])], + [gl_cv_host_cpu_c_abi=i386]) + ;; + +changequote(,)dnl + alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] ) +changequote([,])dnl + gl_cv_host_cpu_c_abi=alpha + ;; + + arm* | aarch64 ) + # Assume arm with EABI. + # On arm64 systems, the C compiler may be generating code in one of + # these ABIs: + # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. + # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef __aarch64__ + int ok; + #else + error fail + #endif + ]])], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __ILP32__ || defined _ILP32 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=arm64-ilp32], + [gl_cv_host_cpu_c_abi=arm64])], + [# Don't distinguish little-endian and big-endian arm, since they + # don't require different machine code for simple operations and + # since the user can distinguish them through the preprocessor + # defines __ARMEL__ vs. __ARMEB__. + # But distinguish arm which passes floating-point arguments and + # return values in integer registers (r0, r1, ...) - this is + # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which + # passes them in float registers (s0, s1, ...) and double registers + # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer + # sets the preprocessor defines __ARM_PCS (for the first case) and + # __ARM_PCS_VFP (for the second case), but older GCC does not. + echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c + # Look for a reference to the register d0 in the .s file. + AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1 + if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then + gl_cv_host_cpu_c_abi=armhf + else + gl_cv_host_cpu_c_abi=arm + fi + rm -f conftest* + ]) + ;; + + hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) + # On hppa, the C compiler may be generating 32-bit code or 64-bit + # code. In the latter case, it defines _LP64 and __LP64__. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef __LP64__ + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=hppa64], + [gl_cv_host_cpu_c_abi=hppa]) + ;; + + ia64* ) + # On ia64 on HP-UX, the C compiler may be generating 64-bit code or + # 32-bit code. In the latter case, it defines _ILP32. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef _ILP32 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=ia64-ilp32], + [gl_cv_host_cpu_c_abi=ia64]) + ;; + + mips* ) + # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this + # at 32. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=mips64], + [# In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but + # may later get defined by ), and _MIPS_SIM == _ABIN32. + # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but + # may later get defined by ), and _MIPS_SIM == _ABIO32. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if (_MIPS_SIM == _ABIN32) + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=mipsn32], + [gl_cv_host_cpu_c_abi=mips])]) + ;; + + powerpc* ) + # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. + # No need to distinguish them here; the caller may distinguish + # them based on the OS. + # On powerpc64 systems, the C compiler may still be generating + # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may + # be generating 64-bit code. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __powerpc64__ || defined _ARCH_PPC64 + int ok; + #else + error fail + #endif + ]])], + [# On powerpc64, there are two ABIs on Linux: The AIX compatible + # one and the ELFv2 one. The latter defines _CALL_ELF=2. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined _CALL_ELF && _CALL_ELF == 2 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=powerpc64-elfv2], + [gl_cv_host_cpu_c_abi=powerpc64]) + ], + [gl_cv_host_cpu_c_abi=powerpc]) + ;; + + rs6000 ) + gl_cv_host_cpu_c_abi=powerpc + ;; + + riscv32 | riscv64 ) + # There are 2 architectures (with variants): rv32* and rv64*. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if __riscv_xlen == 64 + int ok; + #else + error fail + #endif + ]])], + [cpu=riscv64], + [cpu=riscv32]) + # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. + # Size of 'long' and 'void *': + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __LP64__ + int ok; + #else + error fail + #endif + ]])], + [main_abi=lp64], + [main_abi=ilp32]) + # Float ABIs: + # __riscv_float_abi_double: + # 'float' and 'double' are passed in floating-point registers. + # __riscv_float_abi_single: + # 'float' are passed in floating-point registers. + # __riscv_float_abi_soft: + # No values are passed in floating-point registers. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __riscv_float_abi_double + int ok; + #else + error fail + #endif + ]])], + [float_abi=d], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __riscv_float_abi_single + int ok; + #else + error fail + #endif + ]])], + [float_abi=f], + [float_abi='']) + ]) + gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}" + ;; + + s390* ) + # On s390x, the C compiler may be generating 64-bit (= s390x) code + # or 31-bit (= s390) code. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __LP64__ || defined __s390x__ + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=s390x], + [gl_cv_host_cpu_c_abi=s390]) + ;; + + sparc | sparc64 ) + # UltraSPARCs running Linux have `uname -m` = "sparc64", but the + # C compiler still generates 32-bit code. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __sparcv9 || defined __arch64__ + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=sparc64], + [gl_cv_host_cpu_c_abi=sparc]) + ;; + + *) + gl_cv_host_cpu_c_abi="$host_cpu" + ;; + esac + ]) + + dnl In most cases, $HOST_CPU and $HOST_CPU_C_ABI are the same. + HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'` + HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi" + AC_SUBST([HOST_CPU]) + AC_SUBST([HOST_CPU_C_ABI]) + + # This was + # AC_DEFINE_UNQUOTED([__${HOST_CPU}__]) + # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__]) + # earlier, but KAI C++ 3.2d doesn't like this. + sed -e 's/-/_/g' >> confdefs.h < +Date: Mon, 8 Aug 2022 20:31:10 +1200 +Subject: [PATCH 0/8] sh conf + +--- + configure | 2 +- + configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/configure ++++ b/configure +@@ -4056,7 +4056,7 @@ case "${target}" in + nvptx*-*-*) + noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc" + ;; +- sh-*-*) ++ sh*-*-*) + case "${target}" in + sh*-*-elf) + ;; +--- a/configure.ac ++++ b/configure.ac +@@ -1278,7 +1278,7 @@ case "${target}" in + nvptx*-*-*) + noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc" + ;; +- sh-*-*) ++ sh*-*-*) + case "${target}" in + sh*-*-elf) + ;; diff --git a/packages/binutils/2.44/0001-check_ldrunpath_length.patch b/packages/binutils/2.44/0001-check_ldrunpath_length.patch new file mode 100644 index 0000000000..69c9d76a2a --- /dev/null +++ b/packages/binutils/2.44/0001-check_ldrunpath_length.patch @@ -0,0 +1,29 @@ +From aad130ddadd19ae40e5405a7b9ddd5ae1ec138f0 Mon Sep 17 00:00:00 2001 +From: Chris Packham +Date: Mon, 8 Aug 2022 20:36:31 +1200 +Subject: [PATCH 1/8] check_ldrunpath_length + +--- + ld/ldelf.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/ld/ldelf.c ++++ b/ld/ldelf.c +@@ -1134,6 +1134,8 @@ ldelf_handle_dt_needed (struct elf_link_ + && command_line.rpath == NULL) + { + path = (const char *) getenv ("LD_RUN_PATH"); ++ if (path && *path == '\0') ++ path = NULL; + if (path + && ldelf_search_needed (path, &n, force, + is_linux, elfsize)) +@@ -1811,6 +1813,8 @@ ldelf_before_allocation (char *audit, ch + rpath = command_line.rpath; + if (rpath == NULL) + rpath = (const char *) getenv ("LD_RUN_PATH"); ++ if (rpath && *rpath == '\0') ++ rpath = NULL; + + for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next) + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) diff --git a/packages/binutils/2.44/0002-Don-t-link-to-libfl-as-it-s-unnecessary.patch b/packages/binutils/2.44/0002-Don-t-link-to-libfl-as-it-s-unnecessary.patch new file mode 100644 index 0000000000..e089b50f2a --- /dev/null +++ b/packages/binutils/2.44/0002-Don-t-link-to-libfl-as-it-s-unnecessary.patch @@ -0,0 +1,110 @@ +From 3a84b957286a337379d36b530358c32576154b00 Mon Sep 17 00:00:00 2001 +From: Chris Packham +Date: Mon, 8 Aug 2022 20:37:24 +1200 +Subject: [PATCH 3/8] Don't link to libfl as it's unnecessary + +--- + binutils/configure | 3 +++ + binutils/configure.ac | 3 +++ + gas/configure | 3 +++ + gas/configure.ac | 3 +++ + ld/configure | 3 +++ + ld/configure.ac | 3 +++ + 6 files changed, 18 insertions(+) + +--- a/binutils/configure ++++ b/binutils/configure +@@ -12529,6 +12529,7 @@ fi + done + test -n "$YACC" || YACC="yacc" + ++save_LIBS=$LIBS + for ac_prog in flex lex + do + # Extract the first word of "$ac_prog", so it can be a program name with args. +@@ -12692,6 +12693,8 @@ esac + if test "$LEX" = :; then + LEX=${am_missing_run}flex + fi ++LIBS=$save_LIBS ++LEXLIB= + + ALL_LINGUAS="bg ca da es fi fr hr id it ja pt ro ru rw sk sr sv tr uk vi zh_CN zh_TW" + +--- a/binutils/configure.ac ++++ b/binutils/configure.ac +@@ -153,7 +153,10 @@ if test -z "$host" ; then + fi + + AC_PROG_YACC ++save_LIBS=$LIBS + AM_PROG_LEX ++LIBS=$save_LIBS ++LEXLIB= + + ALL_LINGUAS="bg ca da es fi fr hr id it ja pt ro ru rw sk sr sv tr uk vi zh_CN zh_TW" + ZW_GNU_GETTEXT_SISTER_DIR +--- a/gas/configure ++++ b/gas/configure +@@ -13033,6 +13033,7 @@ fi + done + test -n "$YACC" || YACC="yacc" + ++save_LIBS=$LIBS + for ac_prog in flex lex + do + # Extract the first word of "$ac_prog", so it can be a program name with args. +@@ -13196,6 +13197,8 @@ esac + if test "$LEX" = :; then + LEX=${am_missing_run}flex + fi ++LIBS=$save_LIBS ++LEXLIB= + + ALL_LINGUAS="es fi fr id ja ru rw sv tr uk zh_CN" + +--- a/gas/configure.ac ++++ b/gas/configure.ac +@@ -935,7 +935,10 @@ AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${tar + AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}", [Target OS.]) + + AC_PROG_YACC ++save_LIBS=$LIBS + AM_PROG_LEX ++LIBS=$save_LIBS ++LEXLIB= + + ALL_LINGUAS="es fi fr id ja ru rw sv tr uk zh_CN" + ZW_GNU_GETTEXT_SISTER_DIR +--- a/ld/configure ++++ b/ld/configure +@@ -18501,6 +18501,7 @@ fi + done + test -n "$YACC" || YACC="yacc" + ++save_LIBS=$LIBS + for ac_prog in flex lex + do + # Extract the first word of "$ac_prog", so it can be a program name with args. +@@ -18664,6 +18665,8 @@ esac + if test "$LEX" = :; then + LEX=${am_missing_run}flex + fi ++LIBS=$save_LIBS ++LEXLIB= + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +--- a/ld/configure.ac ++++ b/ld/configure.ac +@@ -394,7 +394,10 @@ AM_PO_SUBDIRS + AC_EXEEXT + + AC_PROG_YACC ++save_LIBS=$LIBS + AM_PROG_LEX ++LIBS=$save_LIBS ++LEXLIB= + + AM_MAINTAINER_MODE + AM_CONDITIONAL(GENINSRC_NEVER, false) diff --git a/packages/binutils/2.44/0003-Fix-darwin-build.patch b/packages/binutils/2.44/0003-Fix-darwin-build.patch new file mode 100644 index 0000000000..5f6cc8d231 --- /dev/null +++ b/packages/binutils/2.44/0003-Fix-darwin-build.patch @@ -0,0 +1,46 @@ +From caeb8d1403fa6ce3334ac8527bc89d3103b3c604 Mon Sep 17 00:00:00 2001 +From: Andrew Hsieh +Date: Wed, 18 Mar 2015 10:57:24 +0800 +Subject: [PATCH 5/8] Fix darwin build + +1. In Drawin PTHREAD_ONCE_INIT is {0x30B1BCBA, {0}} and the GCC < 4.4 + doesn't support ended initializer list +2. wcsncasecmp doesn't exist in MacSDK10.6.x + +Change-Id: I69204a72f853f5263dffedc448379d75ed4eca2e +--- + bfd/peXXigen.c | 22 ++++++++++++++++++++++ + gold/gold-threads.cc | 15 ++++++++++++--- + 2 files changed, 34 insertions(+), 3 deletions(-) + +--- a/bfd/peXXigen.c ++++ b/bfd/peXXigen.c +@@ -3681,6 +3681,28 @@ u16_mbtouc (wint_t * puc, const unsigned + } + #endif /* not Cygwin/Mingw */ + ++#if defined __APPLE__ && __DARWIN_C_LEVEL < 200809L ++/* wcsncasecmp isn't always defined in Mac SDK */ ++static int ++wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n) ++{ ++ wchar_t c1, c2; ++ ++ if (n == 0) ++ return (0); ++ for (; *s1; s1++, s2++) ++ { ++ c1 = towlower(*s1); ++ c2 = towlower(*s2); ++ if (c1 != c2) ++ return ((int)c1 - c2); ++ if (--n == 0) ++ return (0); ++ } ++ return (-*s2); ++} ++#endif ++ + /* Perform a comparison of two entries. */ + static signed int + rsrc_cmp (bool is_name, rsrc_entry * a, rsrc_entry * b) diff --git a/packages/binutils/2.44/0004-sysroot.patch b/packages/binutils/2.44/0004-sysroot.patch new file mode 100644 index 0000000000..1cf3f673ab --- /dev/null +++ b/packages/binutils/2.44/0004-sysroot.patch @@ -0,0 +1,45 @@ +From 880742786662b8adc996cc639d123d1884559344 Mon Sep 17 00:00:00 2001 +From: Sven Rebhan +Date: Mon, 8 Aug 2022 20:46:29 +1200 +Subject: [PATCH 6/8] sysroot + +Always try to prepend the sysroot prefix to absolute filenames first. + +http://bugs.gentoo.org/275666 +http://sourceware.org/bugzilla/show_bug.cgi?id=10340 + +Signed-off-by: Sven Rebhan +--- + ld/ldfile.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -569,18 +569,25 @@ ldfile_open_file_search (const char *arc + directory first. */ + if (!entry->flags.maybe_archive) + { +- if (entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename)) ++ /* For absolute pathnames, try to always open the file in the ++ sysroot first. If this fails, try to open the file at the ++ given location. */ ++ entry->flags.sysrooted = is_sysrooted_pathname (entry->filename); ++ if (!entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename) ++ && ld_sysroot) + { + char *name = concat (ld_sysroot, entry->filename, + (const char *) NULL); + if (ldfile_try_open_bfd (name, entry)) + { + entry->filename = name; ++ entry->flags.sysrooted = true; + return true; + } + free (name); + } +- else if (ldfile_try_open_bfd (entry->filename, entry)) ++ ++ if (ldfile_try_open_bfd (entry->filename, entry)) + return true; + + if (IS_ABSOLUTE_PATH (entry->filename)) diff --git a/packages/binutils/2.44/0005-poison-system-directories.patch b/packages/binutils/2.44/0005-poison-system-directories.patch new file mode 100644 index 0000000000..f3d557a856 --- /dev/null +++ b/packages/binutils/2.44/0005-poison-system-directories.patch @@ -0,0 +1,282 @@ +From 35d98249aecc005e426df0fba31e68af7370d7d7 Mon Sep 17 00:00:00 2001 +From: Scott Garman +Date: Mon, 8 Aug 2022 20:48:32 +1200 +Subject: [PATCH 7/8] poison system directories + +Patch adapted to binutils 2.23.2 and extended to use +BR_COMPILER_PARANOID_UNSAFE_PATH by Thomas Petazzoni. + +[Gustavo: adapt to binutils 2.25] +Signed-off-by: Thomas Petazzoni +Signed-off-by: Gustavo Zacarias + +Upstream-Status: Inappropriate [distribution: codesourcery] + +Patch originally created by Mark Hatle, forward-ported to +binutils 2.21 by Scott Garman. + +purpose: warn for uses of system directories when cross linking + +Code Merged from Sourcery G++ binutils 2.19 - 4.4-277 + +2008-07-02 Joseph Myers + + ld/ + * ld.h (args_type): Add error_poison_system_directories. + * ld.texinfo (--error-poison-system-directories): Document. + * ldfile.c (ldfile_add_library_path): Check + command_line.error_poison_system_directories. + * ldmain.c (main): Initialize + command_line.error_poison_system_directories. + * lexsup.c (enum option_values): Add + OPTION_ERROR_POISON_SYSTEM_DIRECTORIES. + (ld_options): Add --error-poison-system-directories. + (parse_args): Handle new option. + +2007-06-13 Joseph Myers + + ld/ + * config.in: Regenerate. + * ld.h (args_type): Add poison_system_directories. + * ld.texinfo (--no-poison-system-directories): Document. + * ldfile.c (ldfile_add_library_path): Check + command_line.poison_system_directories. + * ldmain.c (main): Initialize + command_line.poison_system_directories. + * lexsup.c (enum option_values): Add + OPTION_NO_POISON_SYSTEM_DIRECTORIES. + (ld_options): Add --no-poison-system-directories. + (parse_args): Handle new option. + +2007-04-20 Joseph Myers + + Merge from Sourcery G++ binutils 2.17: + + 2007-03-20 Joseph Myers + Based on patch by Mark Hatle . + ld/ + * configure.ac (--enable-poison-system-directories): New option. + * configure, config.in: Regenerate. + * ldfile.c (ldfile_add_library_path): If + ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib, + /usr/lib, /usr/local/lib or /usr/X11R6/lib. + +Signed-off-by: Mark Hatle +Signed-off-by: Scott Garman +--- + ld/config.in | 3 +++ + ld/configure | 14 ++++++++++++++ + ld/configure.ac | 10 ++++++++++ + ld/ld.h | 8 ++++++++ + ld/ld.texi | 12 ++++++++++++ + ld/ldfile.c | 16 ++++++++++++++++ + ld/ldlex.h | 2 ++ + ld/ldmain.c | 2 ++ + ld/lexsup.c | 21 +++++++++++++++++++++ + 9 files changed, 88 insertions(+) + +--- a/ld/config.in ++++ b/ld/config.in +@@ -78,6 +78,9 @@ + language is requested. */ + #undef ENABLE_NLS + ++/* Define to warn for use of native system library directories */ ++#undef ENABLE_POISON_SYSTEM_DIRECTORIES ++ + /* Additional extension a shared object might have. */ + #undef EXTRA_SHLIB_EXTENSION + +--- a/ld/configure ++++ b/ld/configure +@@ -844,6 +844,7 @@ with_lib_path + enable_targets + enable_64_bit_bfd + with_sysroot ++enable_poison_system_directories + enable_gold + enable_got + enable_compressed_debug_sections +@@ -1537,6 +1538,8 @@ Optional Features: + --enable-checking enable run-time checks + --enable-targets alternative target configurations + --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) ++ --enable-poison-system-directories ++ warn for use of native system library directories + --enable-gold[=ARG] build gold [ARG={default,yes,no}] + --enable-got= GOT handling scheme (target, single, negative, + multigot) +@@ -15592,7 +15595,18 @@ else + fi + + ++# Check whether --enable-poison-system-directories was given. ++if test "${enable_poison_system_directories+set}" = set; then : ++ enableval=$enable_poison_system_directories; ++else ++ enable_poison_system_directories=no ++fi ++ ++if test "x${enable_poison_system_directories}" = "xyes"; then + ++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h ++ ++fi + + # Check whether --enable-got was given. + if test "${enable_got+set}" = set; then : +--- a/ld/configure.ac ++++ b/ld/configure.ac +@@ -102,6 +102,16 @@ AC_SUBST(use_sysroot) + AC_SUBST(TARGET_SYSTEM_ROOT) + AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) + ++AC_ARG_ENABLE([poison-system-directories], ++ AS_HELP_STRING([--enable-poison-system-directories], ++ [warn for use of native system library directories]),, ++ [enable_poison_system_directories=no]) ++if test "x${enable_poison_system_directories}" = "xyes"; then ++ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], ++ [1], ++ [Define to warn for use of native system library directories]) ++fi ++ + dnl Use --enable-gold to decide if this linker should be the default. + dnl "install_as_default" is set to false if gold is the default linker. + dnl "installed_linker" is the installed BFD linker name. +--- a/ld/ld.h ++++ b/ld/ld.h +@@ -161,6 +161,14 @@ typedef struct + /* If set, display the target memory usage (per memory region). */ + bool print_memory_usage; + ++ /* If TRUE (the default) warn for uses of system directories when ++ cross linking. */ ++ bool poison_system_directories; ++ ++ /* If TRUE (default FALSE) give an error for uses of system ++ directories when cross linking instead of a warning. */ ++ bool error_poison_system_directories; ++ + /* Should we force section groups to be resolved? Controlled with + --force-group-allocation on the command line or FORCE_GROUP_ALLOCATION + in the linker script. */ +--- a/ld/ld.texi ++++ b/ld/ld.texi +@@ -3279,6 +3279,18 @@ creation of the metadata note, if one ha + occurrence of the --package-metadata option. + If the linker has been built with libjansson, then the JSON string + will be validated. ++ ++@kindex --no-poison-system-directories ++@item --no-poison-system-directories ++Do not warn for @option{-L} options using system directories such as ++@file{/usr/lib} when cross linking. This option is intended for use ++in chroot environments when such directories contain the correct ++libraries for the target system rather than the host. ++ ++@kindex --error-poison-system-directories ++@item --error-poison-system-directories ++Give an error instead of a warning for @option{-L} options using ++system directories when cross linking. + @end table + + @c man end +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -328,6 +328,22 @@ ldfile_add_library_path (const char *nam + new_dirs->name = concat (ld_sysroot, name + strlen ("$SYSROOT"), (const char *) NULL); + else + new_dirs->name = xstrdup (name); ++ ++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES ++ if (command_line.poison_system_directories ++ && ((!strncmp (name, "/lib", 4)) ++ || (!strncmp (name, "/usr/lib", 8)) ++ || (!strncmp (name, "/usr/local/lib", 14)) ++ || (!strncmp (name, "/usr/X11R6/lib", 14)))) ++ { ++ if (command_line.error_poison_system_directories) ++ einfo (_("%X%P: error: library search path \"%s\" is unsafe for " ++ "cross-compilation\n"), name); ++ else ++ einfo (_("%P: warning: library search path \"%s\" is unsafe for " ++ "cross-compilation\n"), name); ++ } ++#endif + } + + static void +--- a/ld/ldlex.h ++++ b/ld/ldlex.h +@@ -471,6 +471,8 @@ enum option_values + OPTION_NO_LITERAL_MOVEMENT, + OPTION_ABI_WINDOWED, + OPTION_ABI_CALL0, ++ OPTION_NO_POISON_SYSTEM_DIRECTORIES, ++ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES, + }; + + /* The initial parser states. */ +--- a/ld/ldmain.c ++++ b/ld/ldmain.c +@@ -351,6 +351,8 @@ main (int argc, char **argv) + command_line.warn_mismatch = true; + command_line.warn_search_mismatch = true; + command_line.check_section_addresses = -1; ++ command_line.poison_system_directories = true; ++ command_line.error_poison_system_directories = true; + + /* We initialize DEMANGLING based on the environment variable + COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the +--- a/ld/lexsup.c ++++ b/ld/lexsup.c +@@ -650,6 +650,14 @@ static const struct ld_option ld_options + " is: share-unconflicted (default),\n" + " share-duplicated"), + TWO_DASHES }, ++ { {"no-poison-system-directories", no_argument, NULL, ++ OPTION_NO_POISON_SYSTEM_DIRECTORIES}, ++ '\0', NULL, N_("Do not warn for -L options using system directories"), ++ TWO_DASHES }, ++ { {"error-poison-system-directories", no_argument, NULL, ++ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES}, ++ '\0', NULL, N_("Give an error for -L options using system directories"), ++ TWO_DASHES }, + }; + + #define OPTION_COUNT ARRAY_SIZE (ld_options) +@@ -662,6 +670,7 @@ parse_args (unsigned argc, char **argv) + int ingroup = 0; + char *default_dirlist = NULL; + char *shortopts; ++ char *BR_paranoid_env; + struct option *longopts; + struct option *really_longopts; + int last_optind; +@@ -1789,6 +1798,14 @@ parse_args (unsigned argc, char **argv) + } + break; + ++ case OPTION_NO_POISON_SYSTEM_DIRECTORIES: ++ command_line.poison_system_directories = false; ++ break; ++ ++ case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES: ++ command_line.error_poison_system_directories = true; ++ break; ++ + case OPTION_PUSH_STATE: + input_flags.pushed = xmemdup (&input_flags, + sizeof (input_flags), +@@ -1933,6 +1950,10 @@ parse_args (unsigned argc, char **argv) + command_line.soname = NULL; + } + ++ BR_paranoid_env = getenv("BR_COMPILER_PARANOID_UNSAFE_PATH"); ++ if (BR_paranoid_env && strlen(BR_paranoid_env) > 0) ++ command_line.error_poison_system_directories = true; ++ + while (ingroup) + { + einfo (_("%P: missing --end-group; added as last command line option\n")); diff --git a/packages/binutils/2.44/chksum b/packages/binutils/2.44/chksum new file mode 100644 index 0000000000..d254e370de --- /dev/null +++ b/packages/binutils/2.44/chksum @@ -0,0 +1,12 @@ +md5 binutils-2.44.tar.xz 49912ce774666a30806141f106124294 +sha1 binutils-2.44.tar.xz c8c9f5ae46ab9e3722c71821982d2c270e267748 +sha256 binutils-2.44.tar.xz ce2017e059d63e67ddb9240e9d4ec49c2893605035cd60e92ad53177f4377237 +sha512 binutils-2.44.tar.xz b85d3bbc0e334cf67a96219d3c7c65fbf3e832b2c98a7417bf131f3645a0307057ec81cd2b29ff2563cec53e3d42f73e2c60cc5708e80d4a730efdcc6ae14ad7 +md5 binutils-2.44.tar.bz2 3cdb76e72469be836be726d456caf4ed +sha1 binutils-2.44.tar.bz2 8657069418bb4b198dddca6ff38cd355c2d5a04c +sha256 binutils-2.44.tar.bz2 f66390a661faa117d00fab2e79cf2dc9d097b42cc296bf3f8677d1e7b452dc3a +sha512 binutils-2.44.tar.bz2 d1783e109c28c5706bacadf31d2652afe8f09ca3dfa6fb8b4e530904280207b2e1825d202faa92ff753e4ee6261a68a8429be4cd564446c6e040d75f6c2afc2d +md5 binutils-2.44.tar.gz 6c02ef5e0de5096f0e9cd6f9d48a4be3 +sha1 binutils-2.44.tar.gz 568ba0a286cf79520572c1597a203c1aafd462de +sha256 binutils-2.44.tar.gz 0cdd76777a0dfd3dd3a63f215f030208ddb91c2361d2bcc02acec0f1c16b6a2e +sha512 binutils-2.44.tar.gz c8e394c12493bc5e87d49834068ba8f72e8e93be9141d3bd68d4d6fa2e53b3b42360d168a5381da043c596b82e7386f8dbce31ccbdbfdee1e6a89763326d46a7 diff --git a/packages/gdb/15.1/version.desc b/packages/binutils/2.44/version.desc similarity index 100% rename from packages/gdb/15.1/version.desc rename to packages/binutils/2.44/version.desc diff --git a/packages/binutils/2.45/0000-sh-conf.patch b/packages/binutils/2.45/0000-sh-conf.patch new file mode 100644 index 0000000000..4622e21344 --- /dev/null +++ b/packages/binutils/2.45/0000-sh-conf.patch @@ -0,0 +1,39 @@ +From 0f4f6c1cc9888c9637d5e9304661888597c5dde1 Mon Sep 17 00:00:00 2001 +From: Chris Packham +Date: Mon, 8 Aug 2022 20:31:10 +1200 +Subject: [PATCH 0/5] sh conf + +--- + configure | 2 +- + configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index bbfb5979..bcd95684 100755 +--- a/configure ++++ b/configure +@@ -4056,7 +4056,7 @@ case "${target}" in + nvptx*-*-*) + noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc" + ;; +- sh-*-*) ++ sh*-*-*) + case "${target}" in + sh*-*-elf) + ;; +diff --git a/configure.ac b/configure.ac +index 659388f7..eb1c20af 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1278,7 +1278,7 @@ case "${target}" in + nvptx*-*-*) + noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc" + ;; +- sh-*-*) ++ sh*-*-*) + case "${target}" in + sh*-*-elf) + ;; +-- +2.50.1 + diff --git a/packages/binutils/2.45/0001-check_ldrunpath_length.patch b/packages/binutils/2.45/0001-check_ldrunpath_length.patch new file mode 100644 index 0000000000..3ff8e23cf7 --- /dev/null +++ b/packages/binutils/2.45/0001-check_ldrunpath_length.patch @@ -0,0 +1,34 @@ +From 822af88496022f8f2d267d3b399d36ab36248805 Mon Sep 17 00:00:00 2001 +From: Chris Packham +Date: Mon, 8 Aug 2022 20:36:31 +1200 +Subject: [PATCH 1/5] check_ldrunpath_length + +--- + ld/ldelf.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/ld/ldelf.c b/ld/ldelf.c +index f4f27fc3..8e69b879 100644 +--- a/ld/ldelf.c ++++ b/ld/ldelf.c +@@ -1134,6 +1134,8 @@ ldelf_handle_dt_needed (struct elf_link_hash_table *htab, + && command_line.rpath == NULL) + { + path = (const char *) getenv ("LD_RUN_PATH"); ++ if (path && *path == '\0') ++ path = NULL; + if (path + && ldelf_search_needed (path, &n, force, + is_linux, elfsize)) +@@ -1808,6 +1810,8 @@ ldelf_before_allocation (char **audit, char **depaudit, + rpath = command_line.rpath; + if (rpath == NULL) + rpath = (const char *) getenv ("LD_RUN_PATH"); ++ if (rpath && *rpath == '\0') ++ rpath = NULL; + + for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next) + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) +-- +2.50.1 + diff --git a/packages/binutils/2.45/0002-Don-t-link-to-libfl-as-it-s-unnecessary.patch b/packages/binutils/2.45/0002-Don-t-link-to-libfl-as-it-s-unnecessary.patch new file mode 100644 index 0000000000..9a1ad01085 --- /dev/null +++ b/packages/binutils/2.45/0002-Don-t-link-to-libfl-as-it-s-unnecessary.patch @@ -0,0 +1,125 @@ +From 3d87c27335a19a13c928baa2a6ff1427a1354940 Mon Sep 17 00:00:00 2001 +From: Chris Packham +Date: Mon, 8 Aug 2022 20:37:24 +1200 +Subject: [PATCH 2/5] Don't link to libfl as it's unnecessary + +--- + binutils/configure | 3 +++ + binutils/configure.ac | 3 +++ + gas/configure | 3 +++ + gas/configure.ac | 3 +++ + ld/configure | 3 +++ + ld/configure.ac | 3 +++ + 6 files changed, 18 insertions(+) + +diff --git a/binutils/configure b/binutils/configure +index 94be2250..0a3540ee 100755 +--- a/binutils/configure ++++ b/binutils/configure +@@ -12529,6 +12529,7 @@ fi + done + test -n "$YACC" || YACC="yacc" + ++save_LIBS=$LIBS + for ac_prog in flex lex + do + # Extract the first word of "$ac_prog", so it can be a program name with args. +@@ -12692,6 +12693,8 @@ esac + if test "$LEX" = :; then + LEX=${am_missing_run}flex + fi ++LIBS=$save_LIBS ++LEXLIB= + + ALL_LINGUAS="bg ca da es fi fr hr id it ja pt ro ru rw sk sr sv tr uk vi zh_CN zh_TW" + +diff --git a/binutils/configure.ac b/binutils/configure.ac +index cb65e503..8317d1be 100644 +--- a/binutils/configure.ac ++++ b/binutils/configure.ac +@@ -153,7 +153,10 @@ if test -z "$host" ; then + fi + + AC_PROG_YACC ++save_LIBS=$LIBS + AM_PROG_LEX ++LIBS=$save_LIBS ++LEXLIB= + + ALL_LINGUAS="bg ca da es fi fr hr id it ja pt ro ru rw sk sr sv tr uk vi zh_CN zh_TW" + AM_PO_SUBDIRS +diff --git a/gas/configure b/gas/configure +index 9c640c87..8fb28d6f 100755 +--- a/gas/configure ++++ b/gas/configure +@@ -13036,6 +13036,7 @@ fi + done + test -n "$YACC" || YACC="yacc" + ++save_LIBS=$LIBS + for ac_prog in flex lex + do + # Extract the first word of "$ac_prog", so it can be a program name with args. +@@ -13199,6 +13200,8 @@ esac + if test "$LEX" = :; then + LEX=${am_missing_run}flex + fi ++LIBS=$save_LIBS ++LEXLIB= + + ALL_LINGUAS="es fi fr id ja ru rw sv tr uk zh_CN" + +diff --git a/gas/configure.ac b/gas/configure.ac +index 30fa5eb1..293babec 100644 +--- a/gas/configure.ac ++++ b/gas/configure.ac +@@ -938,7 +938,10 @@ AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}", [Target vendor.]) + AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}", [Target OS.]) + + AC_PROG_YACC ++save_LIBS=$LIBS + AM_PROG_LEX ++LIBS=$save_LIBS ++LEXLIB= + + ALL_LINGUAS="es fi fr id ja ru rw sv tr uk zh_CN" + AM_PO_SUBDIRS +diff --git a/ld/configure b/ld/configure +index 78b54b39..956b8b1c 100755 +--- a/ld/configure ++++ b/ld/configure +@@ -18016,6 +18016,7 @@ fi + done + test -n "$YACC" || YACC="yacc" + ++save_LIBS=$LIBS + for ac_prog in flex lex + do + # Extract the first word of "$ac_prog", so it can be a program name with args. +@@ -18179,6 +18180,8 @@ esac + if test "$LEX" = :; then + LEX=${am_missing_run}flex + fi ++LIBS=$save_LIBS ++LEXLIB= + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +diff --git a/ld/configure.ac b/ld/configure.ac +index 3ee84958..a8f64fe7 100644 +--- a/ld/configure.ac ++++ b/ld/configure.ac +@@ -407,7 +407,10 @@ ZW_GNU_GETTEXT_SISTER_DIR + AC_EXEEXT + + AC_PROG_YACC ++save_LIBS=$LIBS + AM_PROG_LEX ++LIBS=$save_LIBS ++LEXLIB= + + AM_MAINTAINER_MODE + AM_CONDITIONAL(GENINSRC_NEVER, false) +-- +2.50.1 + diff --git a/packages/binutils/2.45/0003-Fix-darwin-build.patch b/packages/binutils/2.45/0003-Fix-darwin-build.patch new file mode 100644 index 0000000000..83a987d979 --- /dev/null +++ b/packages/binutils/2.45/0003-Fix-darwin-build.patch @@ -0,0 +1,50 @@ +From dcfc968ba2e71e1bae88f87b07d11f36758a74cd Mon Sep 17 00:00:00 2001 +From: Andrew Hsieh +Date: Wed, 18 Mar 2015 10:57:24 +0800 +Subject: [PATCH 3/5] Fix darwin build + +1. In Drawin PTHREAD_ONCE_INIT is {0x30B1BCBA, {0}} and the GCC < 4.4 + doesn't support ended initializer list +2. wcsncasecmp doesn't exist in MacSDK10.6.x + +Change-Id: I69204a72f853f5263dffedc448379d75ed4eca2e +--- + bfd/peXXigen.c | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c +index c337fc5b..5a0c4538 100644 +--- a/bfd/peXXigen.c ++++ b/bfd/peXXigen.c +@@ -3688,6 +3688,28 @@ u16_mbtouc (wint_t * puc, const unsigned short * s, unsigned int n) + } + #endif /* not Cygwin/Mingw */ + ++#if defined __APPLE__ && __DARWIN_C_LEVEL < 200809L ++/* wcsncasecmp isn't always defined in Mac SDK */ ++static int ++wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n) ++{ ++ wchar_t c1, c2; ++ ++ if (n == 0) ++ return (0); ++ for (; *s1; s1++, s2++) ++ { ++ c1 = towlower(*s1); ++ c2 = towlower(*s2); ++ if (c1 != c2) ++ return ((int)c1 - c2); ++ if (--n == 0) ++ return (0); ++ } ++ return (-*s2); ++} ++#endif ++ + /* Perform a comparison of two entries. */ + static signed int + rsrc_cmp (bool is_name, rsrc_entry * a, rsrc_entry * b) +-- +2.50.1 + diff --git a/packages/binutils/2.45/0004-sysroot.patch b/packages/binutils/2.45/0004-sysroot.patch new file mode 100644 index 0000000000..83a413dd74 --- /dev/null +++ b/packages/binutils/2.45/0004-sysroot.patch @@ -0,0 +1,50 @@ +From 471d1d6d49821cfadfc232d2e44eaaa76f6e4186 Mon Sep 17 00:00:00 2001 +From: Sven Rebhan +Date: Mon, 8 Aug 2022 20:46:29 +1200 +Subject: [PATCH 4/5] sysroot + +Always try to prepend the sysroot prefix to absolute filenames first. + +http://bugs.gentoo.org/275666 +http://sourceware.org/bugzilla/show_bug.cgi?id=10340 + +Signed-off-by: Sven Rebhan +--- + ld/ldfile.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/ld/ldfile.c b/ld/ldfile.c +index 75fd360d..6d208be3 100644 +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -556,18 +556,25 @@ ldfile_open_file_search (const char *arch, + directory first. */ + if (!entry->flags.maybe_archive) + { +- if (entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename)) ++ /* For absolute pathnames, try to always open the file in the ++ sysroot first. If this fails, try to open the file at the ++ given location. */ ++ entry->flags.sysrooted = is_sysrooted_pathname (entry->filename); ++ if (!entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename) ++ && ld_sysroot) + { + char *name = concat (ld_sysroot, entry->filename, + (const char *) NULL); + if (ldfile_try_open_bfd (name, entry)) + { + entry->filename = name; ++ entry->flags.sysrooted = true; + return true; + } + free (name); + } +- else if (ldfile_try_open_bfd (entry->filename, entry)) ++ ++ if (ldfile_try_open_bfd (entry->filename, entry)) + return true; + + if (IS_ABSOLUTE_PATH (entry->filename)) +-- +2.50.1 + diff --git a/packages/binutils/2.45/0005-poison-system-directories.patch b/packages/binutils/2.45/0005-poison-system-directories.patch new file mode 100644 index 0000000000..fccdaa289a --- /dev/null +++ b/packages/binutils/2.45/0005-poison-system-directories.patch @@ -0,0 +1,303 @@ +From 9a03e19656e8af3193ba7f8c30b56fb0b4153978 Mon Sep 17 00:00:00 2001 +From: Scott Garman +Date: Mon, 8 Aug 2022 20:48:32 +1200 +Subject: [PATCH 5/5] poison system directories + +Patch adapted to binutils 2.23.2 and extended to use +BR_COMPILER_PARANOID_UNSAFE_PATH by Thomas Petazzoni. + +[Gustavo: adapt to binutils 2.25] +Signed-off-by: Thomas Petazzoni +Signed-off-by: Gustavo Zacarias + +Upstream-Status: Inappropriate [distribution: codesourcery] + +Patch originally created by Mark Hatle, forward-ported to +binutils 2.21 by Scott Garman. + +purpose: warn for uses of system directories when cross linking + +Code Merged from Sourcery G++ binutils 2.19 - 4.4-277 + +2008-07-02 Joseph Myers + + ld/ + * ld.h (args_type): Add error_poison_system_directories. + * ld.texinfo (--error-poison-system-directories): Document. + * ldfile.c (ldfile_add_library_path): Check + command_line.error_poison_system_directories. + * ldmain.c (main): Initialize + command_line.error_poison_system_directories. + * lexsup.c (enum option_values): Add + OPTION_ERROR_POISON_SYSTEM_DIRECTORIES. + (ld_options): Add --error-poison-system-directories. + (parse_args): Handle new option. + +2007-06-13 Joseph Myers + + ld/ + * config.in: Regenerate. + * ld.h (args_type): Add poison_system_directories. + * ld.texinfo (--no-poison-system-directories): Document. + * ldfile.c (ldfile_add_library_path): Check + command_line.poison_system_directories. + * ldmain.c (main): Initialize + command_line.poison_system_directories. + * lexsup.c (enum option_values): Add + OPTION_NO_POISON_SYSTEM_DIRECTORIES. + (ld_options): Add --no-poison-system-directories. + (parse_args): Handle new option. + +2007-04-20 Joseph Myers + + Merge from Sourcery G++ binutils 2.17: + + 2007-03-20 Joseph Myers + Based on patch by Mark Hatle . + ld/ + * configure.ac (--enable-poison-system-directories): New option. + * configure, config.in: Regenerate. + * ldfile.c (ldfile_add_library_path): If + ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib, + /usr/lib, /usr/local/lib or /usr/X11R6/lib. + +Signed-off-by: Mark Hatle +Signed-off-by: Scott Garman +--- + ld/config.in | 3 +++ + ld/configure | 14 ++++++++++++++ + ld/configure.ac | 10 ++++++++++ + ld/ld.h | 8 ++++++++ + ld/ld.texi | 12 ++++++++++++ + ld/ldfile.c | 16 ++++++++++++++++ + ld/ldlex.h | 2 ++ + ld/ldmain.c | 2 ++ + ld/lexsup.c | 21 +++++++++++++++++++++ + 9 files changed, 88 insertions(+) + +diff --git a/ld/config.in b/ld/config.in +index 37812241..be895711 100644 +--- a/ld/config.in ++++ b/ld/config.in +@@ -78,6 +78,9 @@ + language is requested. */ + #undef ENABLE_NLS + ++/* Define to warn for use of native system library directories */ ++#undef ENABLE_POISON_SYSTEM_DIRECTORIES ++ + /* Additional extension a shared object might have. */ + #undef EXTRA_SHLIB_EXTENSION + +diff --git a/ld/configure b/ld/configure +index 956b8b1c..4e019fce 100755 +--- a/ld/configure ++++ b/ld/configure +@@ -841,6 +841,7 @@ enable_checking + with_lib_path + enable_targets + with_sysroot ++enable_poison_system_directories + enable_gold + enable_got + enable_compressed_debug_sections +@@ -1533,6 +1534,8 @@ Optional Features: + --disable-largefile omit support for large files + --enable-checking enable run-time checks + --enable-targets alternative target configurations ++ --enable-poison-system-directories ++ warn for use of native system library directories + --enable-gold[=ARG] build gold [ARG={default,yes,no}] + --enable-got= GOT handling scheme (target, single, negative, + multigot) +@@ -15388,7 +15391,18 @@ else + fi + + ++# Check whether --enable-poison-system-directories was given. ++if test "${enable_poison_system_directories+set}" = set; then : ++ enableval=$enable_poison_system_directories; ++else ++ enable_poison_system_directories=no ++fi ++ ++if test "x${enable_poison_system_directories}" = "xyes"; then + ++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h ++ ++fi + + # Check whether --enable-got was given. + if test "${enable_got+set}" = set; then : +diff --git a/ld/configure.ac b/ld/configure.ac +index a8f64fe7..ee5a18cd 100644 +--- a/ld/configure.ac ++++ b/ld/configure.ac +@@ -115,6 +115,16 @@ AC_SUBST(use_sysroot) + AC_SUBST(TARGET_SYSTEM_ROOT) + AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) + ++AC_ARG_ENABLE([poison-system-directories], ++ AS_HELP_STRING([--enable-poison-system-directories], ++ [warn for use of native system library directories]),, ++ [enable_poison_system_directories=no]) ++if test "x${enable_poison_system_directories}" = "xyes"; then ++ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], ++ [1], ++ [Define to warn for use of native system library directories]) ++fi ++ + dnl Use --enable-gold to decide if this linker should be the default. + dnl "install_as_default" is set to false if gold is the default linker. + dnl "installed_linker" is the installed BFD linker name. +diff --git a/ld/ld.h b/ld/ld.h +index c8688153..1edce28b 100644 +--- a/ld/ld.h ++++ b/ld/ld.h +@@ -161,6 +161,14 @@ typedef struct + /* If set, display the target memory usage (per memory region). */ + bool print_memory_usage; + ++ /* If TRUE (the default) warn for uses of system directories when ++ cross linking. */ ++ bool poison_system_directories; ++ ++ /* If TRUE (default FALSE) give an error for uses of system ++ directories when cross linking instead of a warning. */ ++ bool error_poison_system_directories; ++ + /* Should we force section groups to be resolved? Controlled with + --force-group-allocation on the command line or FORCE_GROUP_ALLOCATION + in the linker script. */ +diff --git a/ld/ld.texi b/ld/ld.texi +index 413335ad..7bea7fd7 100644 +--- a/ld/ld.texi ++++ b/ld/ld.texi +@@ -3350,6 +3350,18 @@ creation of the metadata note, if one had been enabled by an earlier + occurrence of the --package-metadata option. + If the linker has been built with libjansson, then the JSON string + will be validated. ++ ++@kindex --no-poison-system-directories ++@item --no-poison-system-directories ++Do not warn for @option{-L} options using system directories such as ++@file{/usr/lib} when cross linking. This option is intended for use ++in chroot environments when such directories contain the correct ++libraries for the target system rather than the host. ++ ++@kindex --error-poison-system-directories ++@item --error-poison-system-directories ++Give an error instead of a warning for @option{-L} options using ++system directories when cross linking. + @end table + + @c man end +diff --git a/ld/ldfile.c b/ld/ldfile.c +index 6d208be3..7e3e39b5 100644 +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -328,6 +328,22 @@ ldfile_add_library_path (const char *name, bool cmdline) + new_dirs->name = concat (ld_sysroot, name + strlen ("$SYSROOT"), (const char *) NULL); + else + new_dirs->name = xstrdup (name); ++ ++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES ++ if (command_line.poison_system_directories ++ && ((!strncmp (name, "/lib", 4)) ++ || (!strncmp (name, "/usr/lib", 8)) ++ || (!strncmp (name, "/usr/local/lib", 14)) ++ || (!strncmp (name, "/usr/X11R6/lib", 14)))) ++ { ++ if (command_line.error_poison_system_directories) ++ einfo (_("%X%P: error: library search path \"%s\" is unsafe for " ++ "cross-compilation\n"), name); ++ else ++ einfo (_("%P: warning: library search path \"%s\" is unsafe for " ++ "cross-compilation\n"), name); ++ } ++#endif + } + + static void +diff --git a/ld/ldlex.h b/ld/ldlex.h +index 815da76a..fe1df191 100644 +--- a/ld/ldlex.h ++++ b/ld/ldlex.h +@@ -471,6 +471,8 @@ enum option_values + OPTION_NO_LITERAL_MOVEMENT, + OPTION_ABI_WINDOWED, + OPTION_ABI_CALL0, ++ OPTION_NO_POISON_SYSTEM_DIRECTORIES, ++ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES, + }; + + /* The initial parser states. */ +diff --git a/ld/ldmain.c b/ld/ldmain.c +index 67c60c3f..58f7e9fe 100644 +--- a/ld/ldmain.c ++++ b/ld/ldmain.c +@@ -671,6 +671,8 @@ main (int argc, char **argv) + command_line.warn_mismatch = true; + command_line.warn_search_mismatch = true; + command_line.check_section_addresses = -1; ++ command_line.poison_system_directories = true; ++ command_line.error_poison_system_directories = true; + + /* We initialize DEMANGLING based on the environment variable + COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the +diff --git a/ld/lexsup.c b/ld/lexsup.c +index bde20465..422866f4 100644 +--- a/ld/lexsup.c ++++ b/ld/lexsup.c +@@ -652,6 +652,14 @@ static const struct ld_option ld_options[] = + " is: share-unconflicted (default),\n" + " share-duplicated"), + TWO_DASHES }, ++ { {"no-poison-system-directories", no_argument, NULL, ++ OPTION_NO_POISON_SYSTEM_DIRECTORIES}, ++ '\0', NULL, N_("Do not warn for -L options using system directories"), ++ TWO_DASHES }, ++ { {"error-poison-system-directories", no_argument, NULL, ++ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES}, ++ '\0', NULL, N_("Give an error for -L options using system directories"), ++ TWO_DASHES }, + }; + + #define OPTION_COUNT ARRAY_SIZE (ld_options) +@@ -664,6 +672,7 @@ parse_args (unsigned argc, char **argv) + int ingroup = 0; + char *default_dirlist = NULL; + char *shortopts; ++ char *BR_paranoid_env; + struct option *longopts; + struct option *really_longopts; + int last_optind; +@@ -1800,6 +1809,14 @@ parse_args (unsigned argc, char **argv) + } + break; + ++ case OPTION_NO_POISON_SYSTEM_DIRECTORIES: ++ command_line.poison_system_directories = false; ++ break; ++ ++ case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES: ++ command_line.error_poison_system_directories = true; ++ break; ++ + case OPTION_PUSH_STATE: + input_flags.pushed = xmemdup (&input_flags, + sizeof (input_flags), +@@ -1944,6 +1961,10 @@ parse_args (unsigned argc, char **argv) + command_line.soname = NULL; + } + ++ BR_paranoid_env = getenv("BR_COMPILER_PARANOID_UNSAFE_PATH"); ++ if (BR_paranoid_env && strlen(BR_paranoid_env) > 0) ++ command_line.error_poison_system_directories = true; ++ + while (ingroup) + { + einfo (_("%P: missing --end-group; added as last command line option\n")); +-- +2.50.1 + diff --git a/packages/binutils/2.45/0006-Adjust-pdata-function-table-entries-sorting-for-AArch64.patch b/packages/binutils/2.45/0006-Adjust-pdata-function-table-entries-sorting-for-AArch64.patch new file mode 100644 index 0000000000..2f1cc7f9bc --- /dev/null +++ b/packages/binutils/2.45/0006-Adjust-pdata-function-table-entries-sorting-for-AArch64.patch @@ -0,0 +1,51 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Evgeny Karpov +Date: Fri, 9 May 2025 12:51:00 +0200 +Subject: [PATCH v2 1/7] Adjust pdata function table entries sorting for AArch64 + +The .pdata section contains an array of function table entries that +are used for exception handling. The entries should be sorted by +begin address, which is usually the first 4 bytes RVA in the entry. +Entry sizes are different for x64 and AArch64. +This difference is addressed in this patch. + +bfd/ChangeLog: + + * peXXigen.c (defined): New. + (_bfd_XXi_final_link_postscript): Use + FUNCTION_TABLE_ENTRY_SIZE. +--- + bfd/peXXigen.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c +index 9938108ce6b..3230f465d63 100644 +--- a/bfd/peXXigen.c ++++ b/bfd/peXXigen.c +@@ -4655,6 +4655,13 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo) + #if !defined(COFF_WITH_pep) && (defined(COFF_WITH_pex64) || defined(COFF_WITH_peAArch64) || defined(COFF_WITH_peLoongArch64) || defined (COFF_WITH_peRiscV64)) + { + asection *sec = bfd_get_section_by_name (abfd, ".pdata"); ++#if defined (COFF_WITH_peAArch64) ++/* https://learn.microsoft.com/en-us/cpp/build/arm64-exception-handling#pdata-records. */ ++ #define FUNCTION_TABLE_ENTRY_SIZE 8 ++#else ++/* https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#the-pdata-section. */ ++ #define FUNCTION_TABLE_ENTRY_SIZE 12 ++#endif + + if (sec) + { +@@ -4664,8 +4671,8 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo) + if (bfd_malloc_and_get_section (abfd, sec, &tmp_data)) + { + qsort (tmp_data, +- (size_t) (x / 12), +- 12, sort_x64_pdata); ++ (size_t) (x / FUNCTION_TABLE_ENTRY_SIZE), ++ FUNCTION_TABLE_ENTRY_SIZE, sort_x64_pdata); + bfd_set_section_contents (pfinfo->output_bfd, sec, + tmp_data, 0, x); + free (tmp_data); +-- +2.34.1 diff --git a/packages/binutils/2.45/0007-Define-unwinding-and-SEH-data-structures-for-aarch64.patch b/packages/binutils/2.45/0007-Define-unwinding-and-SEH-data-structures-for-aarch64.patch new file mode 100644 index 0000000000..6842d22247 --- /dev/null +++ b/packages/binutils/2.45/0007-Define-unwinding-and-SEH-data-structures-for-aarch64.patch @@ -0,0 +1,245 @@ +From 1111111111111111111111111111111111111111 Mon Sep 17 00:00:00 2001 +From: Evgeny Karpov +Date: Fri, 9 May 2025 12:57:00 +0200 +Subject: [PATCH v2 2/7] Define unwinding and SEH data structures for aarch64 + +This patch adds unwinding codes and records that are needed to emit +SEH data to pdata and xdata sections, and an arm64 context to store +data required for emitting. + +gas/ChangeLog: + + * config/obj-coff-seh.h (ARM64_MAX_UNWIND_CODES): New. + (ARM64_MAX_EPILOGUE_SCOPES): New. + (ARM64_UNOP_ALLOCS): New. + (ARM64_UNOP_SAVER19R20X): New. + (ARM64_UNOP_SAVEFPLR): New. + (ARM64_UNOP_SAVEFPLRX): New. + (ARM64_UNOP_ALLOCM): New. + (ARM64_UNOP_SAVEREGP): New. + (ARM64_UNOP_SAVEREGPX): New. + (ARM64_UNOP_SAVEREG): New. + (ARM64_UNOP_SAVEREGX): New. + (ARM64_UNOP_SAVELRPAIR): New. + (ARM64_UNOP_SAVEFREGP): New. + (ARM64_UNOP_SAVEFREGPX): New. + (ARM64_UNOP_SAVEFREG): New. + (ARM64_UNOP_SAVEFREGX): New. + (ARM64_UNOP_ALLOCL): New. + (ARM64_UNOP_SETFP): New. + (ARM64_UNOP_ADDFP): New. + (ARM64_UNOP_NOP): New. + (ARM64_UNOP_END): New. + (ARM64_UNOP_ENDC): New. + (ARM64_UNOP_SAVENEXT): New. + (ARM64_UNOP_PACSIGNLR): New. +--- + gas/config/obj-coff-seh.h | 154 +++++++++++++++++++++++++++++++++++++- + 1 file changed, 152 insertions(+), 2 deletions(-) + +diff --git a/gas/config/obj-coff-seh.h b/gas/config/obj-coff-seh.h +index 598870ae4e0..f926fc8622c 100644 +--- a/gas/config/obj-coff-seh.h ++++ b/gas/config/obj-coff-seh.h +@@ -19,12 +19,13 @@ + 02110-1301, USA. */ + + /* Short overview: +- There are at the moment three different function entry formats preset. ++ There are at the moment four different function entry formats preset. + The first is the MIPS one. The second version + is for ARM, PPC, SH3, and SH4 mainly for Windows CE. + The third is the IA64 and x64 version. Note, the IA64 isn't implemented yet, + but to find information about it, please see specification about IA64 on + http://download.intel.com/design/Itanium/Downloads/245358.pdf file. ++ The fourth is the Arm64 version. + + The first version has just entries in the pdata section: BeginAddress, + EndAddress, ExceptionHandler, HandlerData, and PrologueEndAddress. Each +@@ -57,8 +58,43 @@ + .seh_savexmm + .seh_pushframe + .seh_code ++ ++ The fourth version for Arm64 partially intersects with the x64 ++ version, however it has a different extension to the unwind codes. ++ It emits SEH data to pdata and xdata sections. In some cases SEH ++ data could be emitted to a packed record in the pdata section ++ without the need for data in the xdata section. However, the packed ++ pdata record is not implemented yet. ++ + */ + ++typedef enum seh_arm64_unwind_types ++{ ++ alloc_s, ++ alloc_m, ++ alloc_l, ++ save_reg, ++ save_reg_x, ++ save_regp, ++ save_regp_x, ++ save_fregp, ++ save_fregp_x, ++ save_freg, ++ save_freg_x, ++ save_lrpair, ++ save_fplr, ++ save_fplr_x, ++ save_r19r20_x, ++ add_fp, ++ set_fp, ++ save_next, ++ nop, ++ pac_sign_lr, ++ end, ++ end_c, ++ unwind_last_type = end_c ++} seh_arm64_unwind_types; ++ + /* architecture specific pdata/xdata handling. */ + #define SEH_CMDS \ + {"seh_proc", obj_coff_seh_proc, 0}, \ +@@ -87,6 +123,91 @@ typedef struct seh_prologue_element + symbolS *pc_addr; + } seh_prologue_element; + ++typedef struct seh_arm64_unwind_code ++{ ++ uint32_t value; ++ seh_arm64_unwind_types type; ++} seh_arm64_unwind_code; ++ ++typedef struct seh_arm64_packed_unwind_data ++{ ++ uint32_t flag : 2; ++ uint32_t func_length : 11; ++ uint32_t frame_size : 9; ++ uint32_t cr : 2; ++ uint32_t h : 1; ++ uint32_t regI : 4; ++ uint32_t regF : 3; ++} seh_arm64_packed_unwind_data; ++ ++typedef struct seh_arm64_except_info ++{ ++ uint32_t flag : 2; ++ uint32_t except_info_rva : 30; ++} seh_arm64_except_info; ++ ++typedef union seh_arm64_unwind_info ++{ ++ seh_arm64_except_info except_info; ++ seh_arm64_packed_unwind_data packed_unwind_data; ++} seh_arm64_unwind_info; ++ ++typedef struct seh_arm64_pdata ++{ ++ unsigned int func_start_rva; ++ seh_arm64_unwind_info except_info_unwind; ++} seh_arm64_pdata; ++ ++typedef struct seh_arm64_xdata_header ++{ ++ uint32_t func_length : 18; ++ uint32_t vers : 2; ++ uint32_t x : 1; ++ uint32_t e : 1; ++ uint32_t epilogue_count : 5; ++ uint32_t code_words : 5; ++ uint32_t ext_epilogue_count : 16; ++ uint32_t ext_code_words : 8; ++ uint32_t reserved : 8; ++} seh_arm64_xdata_header; ++ ++typedef struct seh_arm64_epilogue_scope ++{ ++ uint32_t epilogue_start_offset_reduced : 18; ++ uint32_t reserved : 4; ++ uint32_t epilogue_start_index : 10; ++ uintptr_t epilogue_start_offset; ++ uintptr_t epilogue_end_offset; ++} seh_arm64_epilogue_scope; ++ ++typedef struct seh_arm64_func_fragment ++{ ++ uintptr_t offset; ++ symbolS *xdata_addr; ++ struct seh_arm64_func_fragment *next; ++} seh_arm64_func_fragment; ++ ++#define ARM64_MAX_UNWIND_CODES 286 ++#define ARM64_MAX_EPILOGUE_SCOPES 32 ++ ++typedef struct seh_arm64_context ++{ ++ seh_arm64_pdata pdata; ++ union { ++ seh_arm64_xdata_header xdata_header; ++ valueT xdata_header_value; ++ }; ++ unsigned int unwind_codes_count; ++ unsigned int unwind_codes_byte_count; ++ seh_arm64_unwind_code unwind_codes[ARM64_MAX_UNWIND_CODES]; ++ unsigned int epilogue_scopes_count; ++ seh_arm64_epilogue_scope epilogue_scopes[ARM64_MAX_EPILOGUE_SCOPES]; ++ expressionS except_handler; ++ expressionS except_handler_data; ++ /* The function fragments. */ ++ seh_arm64_func_fragment func_fragment; ++} seh_arm64_context; ++ + typedef struct seh_context + { + /* Initial code-segment. */ +@@ -126,13 +247,17 @@ typedef struct seh_context + int elems_count; + int elems_max; + seh_prologue_element *elems; ++ ++ /* arm64-specific context. */ ++ seh_arm64_context arm64_ctx; + } seh_context; + + typedef enum seh_kind { + seh_kind_unknown = 0, + seh_kind_mips = 1, /* Used for MIPS and x86 pdata generation. */ + seh_kind_arm = 2, /* Used for ARM, PPC, SH3, and SH4 pdata (PDATA_EH) generation. */ +- seh_kind_x64 = 3 /* Used for IA64 and x64 pdata/xdata generation. */ ++ seh_kind_x64 = 3, /* Used for IA64 and x64 pdata/xdata generation. */ ++ seh_kind_arm64 = 4 /* Used for ARM64 pdata/xdata generation. */ + } seh_kind; + + /* Forward declarations. */ +@@ -201,4 +326,29 @@ static void obj_coff_seh_code (int); + (PEX64_OFFSET_TO_SCOPE_COUNT(COUNTOFUNWINDCODES) + \ + PEX64_SCOPE_ENTRY_SIZE * (IDX)) + ++/* arm64 unwind code structs. */ ++ ++#define ARM64_UNOP_ALLOCS 0b000U ++#define ARM64_UNOP_SAVER19R20X 0b001U ++#define ARM64_UNOP_SAVEFPLR 0b01U ++#define ARM64_UNOP_SAVEFPLRX 0b10U ++#define ARM64_UNOP_ALLOCM 0b11000U ++#define ARM64_UNOP_SAVEREGP 0b110010U ++#define ARM64_UNOP_SAVEREGPX 0b110011U ++#define ARM64_UNOP_SAVEREG 0b110100U ++#define ARM64_UNOP_SAVEREGX 0b1101010U ++#define ARM64_UNOP_SAVELRPAIR 0b1101011U ++#define ARM64_UNOP_SAVEFREGP 0b1101100U ++#define ARM64_UNOP_SAVEFREGPX 0b1101101U ++#define ARM64_UNOP_SAVEFREG 0b1101110U ++#define ARM64_UNOP_SAVEFREGX 0b11011110U ++#define ARM64_UNOP_ALLOCL 0b11100000U ++#define ARM64_UNOP_SETFP 0b11100001U ++#define ARM64_UNOP_ADDFP 0b11100010U ++#define ARM64_UNOP_NOP 0b11100011U ++#define ARM64_UNOP_END 0b11100100U ++#define ARM64_UNOP_ENDC 0b11100101U ++#define ARM64_UNOP_SAVENEXT 0b11100110U ++#define ARM64_UNOP_PACSIGNLR 0b11111100U ++ + #endif +-- +2.34.1 diff --git a/packages/binutils/2.45/0008-Adjust-x64-SEH-implementation-for-AArch64.patch b/packages/binutils/2.45/0008-Adjust-x64-SEH-implementation-for-AArch64.patch new file mode 100644 index 0000000000..a98fac033a --- /dev/null +++ b/packages/binutils/2.45/0008-Adjust-x64-SEH-implementation-for-AArch64.patch @@ -0,0 +1,448 @@ +From 2222222222222222222222222222222222222222 Mon Sep 17 00:00:00 2001 +From: Evgeny Karpov +Date: Fri, 9 May 2025 13:03:00 +0200 +Subject: [PATCH v2 3/7] Adjust x64 SEH implementation for AArch64 + +This patch defines the required unwind codes for AArch64 and updates handlers +for SEH commands that are used by both x64 and AArch64. +It implements encoding for unwind elements that will be emitted +to pdata/xdata sections. + +gas/ChangeLog: + + * config/obj-coff-seh.c (struct unwind_code_pack_info): New. + (defined): Add COFFAARCH64 guard. + (obj_coff_seh_code): Update. + (seh_get_target_kind): Update. + (verify_context_and_targets): New. + (obj_coff_seh_eh): Add COFFAARCH64 guard. + (obj_coff_seh_handler): Update. + (obj_coff_seh_handlerdata): Update. + (seh_arm64_add_unwind_element): New. + (obj_coff_seh_proc): Update. + (obj_coff_seh_endprologue): Update. + (obj_coff_seh_save): Add COFFAARCH64 guard. + (obj_coff_seh_setframe): Likewise. + * config/obj-coff-seh.h (obj_coff_seh_setframe): Add COFFAARCH64 guard. + (obj_coff_seh_endproc): Likewise. + (obj_coff_seh_proc): Likewise. + (obj_coff_seh_handler): Likewise. + (obj_coff_seh_handlerdata): Likewise. + (defined): Likewise. + (obj_coff_seh_code): Likewise. +--- + gas/config/obj-coff-seh.c | 260 +++++++++++++++++++++++++++++++++++--- + gas/config/obj-coff-seh.h | 12 +- + 2 files changed, 246 insertions(+), 26 deletions(-) + +diff --git a/gas/config/obj-coff-seh.c b/gas/config/obj-coff-seh.c +index 70cb4e4aa64..d861be4418e 100644 +--- a/gas/config/obj-coff-seh.c ++++ b/gas/config/obj-coff-seh.c +@@ -28,6 +28,20 @@ struct seh_seg_list { + char *seg_name; + }; + ++struct unwind_code_pack_info { ++ const char *directive; ++ int offset_bits; ++ int reg_bits; ++ int code_bits; ++ int code; ++ int offset_right_shift; ++ int offset; ++ int reg_right_shift; ++ int reg_offset; ++ int type; ++ int size; ++}; ++ + /* Local data. */ + static seh_context *seh_ctx_cur = NULL; + +@@ -36,6 +50,51 @@ static htab_t seh_hash; + static struct seh_seg_list *x_segcur = NULL; + static struct seh_seg_list *p_segcur = NULL; + ++const struct unwind_code_pack_info unwind_code_pack_infos[] = { ++ {NULL, 5, 0, 3, ARM64_UNOP_ALLOCS, 4, 0, 0, 0, ++ alloc_s, 1}, ++ {NULL, 11, 0, 5, ARM64_UNOP_ALLOCM, 4, 0, 0, 0, ++ alloc_m, 2}, ++ {NULL, 24, 0, 8, ARM64_UNOP_ALLOCL, 4, 0, 0, 0, ++ alloc_l, 4}, ++ {".seh_save_reg", 6, 4, 6, ARM64_UNOP_SAVEREG, 3, 0, 0, 19, ++ save_reg, 2}, ++ {".seh_save_reg_x", 5, 4, 7, ARM64_UNOP_SAVEREGX, 3, 1, 0, 19, ++ save_reg_x, 2}, ++ {".seh_save_regp", 6, 4, 6, ARM64_UNOP_SAVEREGP, 3, 0, 0, 19, ++ save_regp, 2}, ++ {".seh_save_regp_x", 6, 4, 6, ARM64_UNOP_SAVEREGPX, 3, 1, 0, 19, ++ save_regp_x, 2}, ++ {".seh_save_lrpair", 6, 3, 7, ARM64_UNOP_SAVELRPAIR, 3, 0, 1, 19, ++ save_lrpair, 2}, ++ {".seh_save_fregp", 6, 3, 7, ARM64_UNOP_SAVEFREGP, 3, 0, 0, 8, ++ save_fregp, 2}, ++ {".seh_save_fregp_x", 6, 3, 7, ARM64_UNOP_SAVEFREGPX, 3, 1, 0, 8, ++ save_fregp_x, 2}, ++ {".seh_save_freg", 6, 3, 7, ARM64_UNOP_SAVEFREG, 3, 0, 0, 8, ++ save_freg, 2}, ++ {".seh_save_freg_x", 5, 3, 8, ARM64_UNOP_SAVEFREGX, 3, 1, 0, 8, ++ save_freg_x, 2}, ++ {".seh_save_fplr", 6, 0, 2, ARM64_UNOP_SAVEFPLR, 3, 0, 0, 0, ++ save_fplr, 1}, ++ {".seh_save_fplr_x", 6, 0, 6, ARM64_UNOP_SAVEFPLRX, 3, 1, 0, 0, ++ save_fplr_x, 1}, ++ {".seh_save_r19r20_x", 5, 0, 3, ARM64_UNOP_SAVER19R20X, 3, 0, 0, 0, ++ save_r19r20_x, 1}, ++ {".seh_add_fp", 8, 0, 8, ARM64_UNOP_ADDFP, 0, 0, 0, 0, ++ add_fp, 2}, ++ {".seh_set_fp", 0, 0, 8, ARM64_UNOP_SETFP, 0, 0, 0, 0, ++ set_fp, 1}, ++ {".seh_save_next", 0, 0, 8, ARM64_UNOP_SAVENEXT, 0, 0, 0, 0, ++ save_next, 1}, ++ {".seh_nop", 0, 0, 8, ARM64_UNOP_NOP, 0, 0, 0, 0, ++ nop, 1}, ++ {".seh_pac_sign_lr", 0, 0, 8, ARM64_UNOP_PACSIGNLR, 0, 0, 0, 0, ++ pac_sign_lr, 1}, ++ {NULL, 0, 0, 8, ARM64_UNOP_END, 0, 0, 0, 0, ++ end, 1}, ++}; ++ + static void write_function_xdata (seh_context *); + static void write_function_pdata (seh_context *); + +@@ -164,12 +223,14 @@ seh_validate_seg (const char *directive) + return 0; + } + ++#if !defined (COFFAARCH64) + /* Switch back to the code section, whatever that may be. */ + static void + obj_coff_seh_code (int ignored ATTRIBUTE_UNUSED) + { + subseg_set (seh_ctx_cur->code_seg, 0); + } ++#endif + + static void + switch_xdata (int subseg, segT code_seg) +@@ -200,6 +261,8 @@ seh_get_target_kind (void) + switch (bfd_get_arch (stdoutput)) + { + case bfd_arch_aarch64: ++ return seh_kind_arm64; ++ + case bfd_arch_arm: + case bfd_arch_powerpc: + case bfd_arch_sh: +@@ -270,6 +333,32 @@ verify_context_and_target (const char *directive, seh_kind target) + return verify_context (directive); + } + ++/* Verify mulitple targets. */ ++ ++static int ++verify_context_and_targets (const char *directive, const seh_kind targets[], ++ int count_targets) ++{ ++ bool match = false; ++ for (int i = 0; i < count_targets; ++i) ++ { ++ if (seh_get_target_kind () == targets[i]) ++ { ++ match = true; ++ break; ++ } ++ } ++ ++ if (!match) ++ { ++ as_warn (_("%s ignored for this target"), directive); ++ ignore_rest_of_line (); ++ return 0; ++ } ++ ++ return verify_context (directive); ++} ++ + /* Skip whitespace and a comma. Error if the comma is not seen. */ + + static int +@@ -292,6 +381,7 @@ skip_whitespace_and_comma (int required) + return 0; + } + ++#if !defined (COFFAARCH64) + /* Mark current context to use 32-bit instruction (arm). */ + + static void +@@ -320,6 +410,7 @@ obj_coff_seh_eh (int what ATTRIBUTE_UNUSED) + + demand_empty_rest_of_line (); + } ++#endif + + /* Set for current context the default handler (x64). */ + +@@ -362,6 +453,10 @@ obj_coff_seh_handler (int what ATTRIBUTE_UNUSED) + else + expression (&seh_ctx_cur->handler); + ++ const seh_kind target_kind = seh_get_target_kind (); ++ if (target_kind == seh_kind_arm64) ++ seh_ctx_cur->arm64_ctx.xdata_header.x = 1; ++ + seh_ctx_cur->handler_data.X_op = O_constant; + seh_ctx_cur->handler_data.X_add_number = 0; + seh_ctx_cur->handler_flags = 0; +@@ -369,7 +464,7 @@ obj_coff_seh_handler (int what ATTRIBUTE_UNUSED) + if (!skip_whitespace_and_comma (0)) + return; + +- if (seh_get_target_kind () == seh_kind_x64) ++ if (target_kind == seh_kind_x64 || target_kind == seh_kind_arm64) + { + do + { +@@ -401,13 +496,65 @@ obj_coff_seh_handler (int what ATTRIBUTE_UNUSED) + static void + obj_coff_seh_handlerdata (int what ATTRIBUTE_UNUSED) + { +- if (!verify_context_and_target (".seh_handlerdata", seh_kind_x64)) ++ const seh_kind targets[] = { seh_kind_x64, seh_kind_arm64 }; ++ if (!verify_context_and_targets (".seh_handlerdata", targets, ++ sizeof (targets) / sizeof (seh_kind))) + return; + demand_empty_rest_of_line (); + + switch_xdata (seh_ctx_cur->subsection + 1, seh_ctx_cur->code_seg); + } + ++/* Obtain available unwind element. */ ++ ++static void ++seh_arm64_add_unwind_element (seh_arm64_unwind_types unwind_type, int offset, ++ int reg) ++{ ++ if (seh_ctx_cur == NULL ++ || seh_ctx_cur->arm64_ctx.unwind_codes_count >= ARM64_MAX_UNWIND_CODES) ++ { ++ as_warn (_("no unwind element available.")); ++ return; ++ } ++ ++ seh_arm64_unwind_code *arm64_element = seh_ctx_cur->arm64_ctx.unwind_codes ++ + seh_ctx_cur->arm64_ctx.unwind_codes_count++; ++ const struct unwind_code_pack_info *unwind_code_pack_info; ++ unwind_code_pack_info = unwind_code_pack_infos + unwind_type; ++ arm64_element->value = 0; ++ int value_offset_bits = 0; ++ ++ if (unwind_code_pack_info->offset_bits) ++ { ++ offset = (offset >> unwind_code_pack_info->offset_right_shift) ++ - unwind_code_pack_info->offset; ++ offset &= (1 << unwind_code_pack_info->offset_bits) - 1; ++ arm64_element->value |= offset << value_offset_bits; ++ value_offset_bits += unwind_code_pack_info->offset_bits; ++ } ++ ++ if (unwind_code_pack_info->reg_bits) ++ { ++ reg = (reg >> unwind_code_pack_info->reg_right_shift) ++ - unwind_code_pack_info->reg_offset; ++ reg &= (1 << unwind_code_pack_info->reg_bits) - 1; ++ arm64_element->value |= reg << value_offset_bits; ++ value_offset_bits += unwind_code_pack_info->reg_bits; ++ } ++ ++ if (unwind_code_pack_info->code_bits) ++ { ++ int code = unwind_code_pack_info->code; ++ code &= (1 << unwind_code_pack_info->code_bits) - 1; ++ arm64_element->value |= code << value_offset_bits; ++ } ++ ++ arm64_element->type = unwind_code_pack_info->type; ++ seh_ctx_cur->arm64_ctx.unwind_codes_byte_count += unwind_code_pack_info->size; ++} ++ ++ + /* Mark end of current context. */ + + static void +@@ -419,6 +566,16 @@ do_seh_endproc (void) + write_function_pdata (seh_ctx_cur); + free (seh_ctx_cur->elems); + free (seh_ctx_cur->func_name); ++#if defined (COFFAARCH64) ++ seh_arm64_func_fragment *fragment; ++ fragment = seh_ctx_cur->arm64_ctx.func_fragment.next; ++ while (fragment) ++ { ++ seh_arm64_func_fragment *next = fragment->next; ++ XDELETE (fragment); ++ fragment = next; ++ } ++#endif + free (seh_ctx_cur); + seh_ctx_cur = NULL; + } +@@ -465,11 +622,18 @@ obj_coff_seh_proc (int what ATTRIBUTE_UNUSED) + + seh_ctx_cur->code_seg = now_seg; + +- if (seh_get_target_kind () == seh_kind_x64) ++ seh_kind kind = seh_get_target_kind (); ++ if (kind == seh_kind_x64 || kind == seh_kind_arm64) + { + x_segcur = seh_hash_find_or_make (seh_ctx_cur->code_seg, ".xdata"); + seh_ctx_cur->subsection = x_segcur->subseg; + x_segcur->subseg += 2; ++ ++ if (kind == seh_kind_arm64) ++ { ++ seh_ctx_cur->arm64_ctx.unwind_codes_count = 0; ++ seh_ctx_cur->arm64_ctx.epilogue_scopes_count = 0; ++ } + } + + SKIP_WHITESPACE (); +@@ -498,6 +662,23 @@ obj_coff_seh_endprologue (int what ATTRIBUTE_UNUSED) + as_warn (_("duplicate .seh_endprologue in .seh_proc block")); + else + seh_ctx_cur->endprologue_addr = symbol_temp_new_now (); ++ ++ if (seh_get_target_kind () == seh_kind_arm64) ++ { ++ const int n = seh_ctx_cur->arm64_ctx.unwind_codes_count; ++ ++ /* Unwind codes need to be reversed. */ ++ for (int i = 0; i < n / 2; ++i) ++ { ++ seh_arm64_unwind_code *unwind_codes; ++ unwind_codes = seh_ctx_cur->arm64_ctx.unwind_codes; ++ seh_arm64_unwind_code temp = unwind_codes[i]; ++ unwind_codes[i] = unwind_codes[n-i-1]; ++ unwind_codes[n-i-1] = temp; ++ } ++ ++ seh_arm64_add_unwind_element (end, 0, 0); ++ } + } + + /* End-of-file hook. */ +@@ -533,6 +714,7 @@ seh_x64_make_prologue_element (int code, int info, offsetT off) + n->pc_addr = symbol_temp_new_now (); + } + ++#if !defined (COFFAARCH64) + /* Helper to read a register name from input stream (x64). */ + + static int +@@ -682,6 +864,7 @@ obj_coff_seh_save (int what) + + seh_x64_make_prologue_element (code, reg, off); + } ++#endif + + /* Add a stack-allocation token to current context. */ + +@@ -691,36 +874,69 @@ obj_coff_seh_stackalloc (int what ATTRIBUTE_UNUSED) + offsetT off; + int code, info; + +- if (!verify_context_and_target (".seh_stackalloc", seh_kind_x64) ++ const seh_kind targets[] = { seh_kind_x64, seh_kind_arm64 }; ++ if (!verify_context_and_targets (".seh_stackalloc", targets, ++ sizeof (targets) / sizeof (seh_kind)) + || !seh_validate_seg (".seh_stackalloc")) + return; + + off = get_absolute_expression (); + demand_empty_rest_of_line (); + +- if (off == 0) +- return; +- if (off < 0) ++ switch (seh_get_target_kind ()) + { +- as_bad (_(".seh_stackalloc offset is negative")); +- return; +- } ++ case seh_kind_x64: ++ if (off == 0) ++ return; ++ if (off < 0) ++ { ++ as_bad (_(".seh_stackalloc offset is negative")); ++ return; ++ } + +- if ((off & 7) == 0 && off <= 128) +- code = UWOP_ALLOC_SMALL, info = (off - 8) >> 3, off = 0; +- else if ((off & 7) == 0 && off <= (offsetT) (0xffff * 8)) +- code = UWOP_ALLOC_LARGE, info = 0, off >>= 3; +- else if (off <= (offsetT) 0xffffffff) +- code = UWOP_ALLOC_LARGE, info = 1; +- else +- { +- as_bad (_(".seh_stackalloc offset out of range")); ++ if ((off & 7) == 0 && off <= 128) ++ code = UWOP_ALLOC_SMALL, info = (off - 8) >> 3, off = 0; ++ else if ((off & 7) == 0 && off <= (offsetT) (0xffff * 8)) ++ code = UWOP_ALLOC_LARGE, info = 0, off >>= 3; ++ else if (off <= (offsetT) 0xffffffff) ++ code = UWOP_ALLOC_LARGE, info = 1; ++ else ++ { ++ as_bad (_(".seh_stackalloc offset out of range")); ++ return; ++ } ++ ++ seh_x64_make_prologue_element (code, info, off); ++ break; ++ ++ case seh_kind_arm64: ++ /* arm64 offset should be encoded in multiples of sixteen. */ ++ if ((off & 0xf) != 0) ++ { ++ as_bad (_(".seh_stackalloc offset < 16-byte stack alignment")); ++ return; ++ } ++ ++ if (off < 0x200) ++ seh_arm64_add_unwind_element (alloc_s, off, 0); ++ else if (off < 0x8000) ++ seh_arm64_add_unwind_element (alloc_m, off, 0); ++ else if (off < 0x10000000) ++ seh_arm64_add_unwind_element (alloc_l, off, 0); ++ else ++ { ++ as_bad (_(".seh_stackalloc offset out of range")); ++ return; ++ } ++ break; ++ ++ default: ++ as_bad (_(".seh_stackalloc invalid target")); + return; + } +- +- seh_x64_make_prologue_element (code, info, off); + } + ++#if !defined (COFFAARCH64) + /* Add a frame-pointer token to current context. */ + + static void +@@ -758,7 +974,7 @@ obj_coff_seh_setframe (int what ATTRIBUTE_UNUSED) + seh_x64_make_prologue_element (UWOP_SET_FPREG, 0, 0); + } + } +- ++#endif + /* Data writing routines. */ + + /* Output raw integers in 1, 2, or 4 bytes. */ diff --git a/packages/binutils/2.45/0009-Add-aarch64-specific-SEH-commands.patch b/packages/binutils/2.45/0009-Add-aarch64-specific-SEH-commands.patch new file mode 100644 index 0000000000..53de4220fa --- /dev/null +++ b/packages/binutils/2.45/0009-Add-aarch64-specific-SEH-commands.patch @@ -0,0 +1,178 @@ +From 3333333333333333333333333333333333333333 Mon Sep 17 00:00:00 2001 +From: Evgeny Karpov +Date: Fri, 9 May 2025 13:07:00 +0200 +Subject: [PATCH v2 4/7] Add aarch64-specific SEH commands + +Implementation for aarch64 contains SEH commands that are not present for +x64 architecture, such as .seh_startepilogue/.seh_endepilogue, +.seh_save_reg*, .seh_save_freg*, and others. + +gas/ChangeLog: + + * config/obj-coff-seh.c (defined): Use COFFAARCH64 guard. + (obj_coff_seh_startepilogue): New. + (obj_coff_seh_endepilogue): New. + (obj_coff_seh_endfunclet): New. + (obj_coff_seh_save_reg): New. +--- + gas/config/obj-coff-seh.c | 138 ++++++++++++++++++++++++++++++++++++++ + 1 file changed, 138 insertions(+) + +diff --git a/gas/config/obj-coff-seh.c b/gas/config/obj-coff-seh.c +index d861be4418e..8f9562ee234 100644 +--- a/gas/config/obj-coff-seh.c ++++ b/gas/config/obj-coff-seh.c +@@ -681,6 +681,86 @@ obj_coff_seh_endprologue (int what ATTRIBUTE_UNUSED) + } + } + ++#if defined (COFFAARCH64) ++static void ++obj_coff_seh_startepilogue (int what ATTRIBUTE_UNUSED) ++{ ++ symbolS *epilogue_start_addr; ++ expressionS exp; ++ ++ if (!verify_context (".seh_startepilogue") ++ || !seh_validate_seg (".seh_startepilogue")) ++ return; ++ demand_empty_rest_of_line (); ++ ++ if (seh_get_target_kind () != seh_kind_arm64) ++ return; ++ ++ epilogue_start_addr = symbol_temp_new_now (); ++ exp.X_op = O_subtract; ++ exp.X_add_symbol = epilogue_start_addr; ++ exp.X_op_symbol = seh_ctx_cur->start_addr; ++ exp.X_add_number = 0; ++ ++ if (!resolve_expression (&exp) || exp.X_op != O_constant ++ || exp.X_add_number < 0) ++ as_bad (_(".seh_startepilog offset expression for %s " ++ "does not evaluate to a non-negative constant"), ++ S_GET_NAME (epilogue_start_addr)); ++ ++ seh_arm64_epilogue_scope *epilogue_scope; ++ epilogue_scope = seh_ctx_cur->arm64_ctx.epilogue_scopes ++ + seh_ctx_cur->arm64_ctx.epilogue_scopes_count; ++ epilogue_scope->epilogue_start_offset = exp.X_add_number / 4; ++ epilogue_scope->reserved = 0; ++ epilogue_scope->epilogue_start_index ++ = seh_ctx_cur->arm64_ctx.unwind_codes_byte_count; ++ seh_ctx_cur->arm64_ctx.epilogue_scopes_count++; ++} ++ ++static void ++obj_coff_seh_endepilogue (int what ATTRIBUTE_UNUSED) ++{ ++ if (!verify_context (".seh_endepilogue") ++ || !seh_validate_seg (".seh_endepilogue")) ++ return; ++ ++ demand_empty_rest_of_line (); ++ ++ expressionS exp; ++ symbolS *epilogue_end_addr = symbol_temp_new_now (); ++ exp.X_op = O_subtract; ++ exp.X_add_symbol = epilogue_end_addr; ++ exp.X_op_symbol = seh_ctx_cur->start_addr; ++ exp.X_add_number = 0; ++ ++ if (!resolve_expression (&exp) || exp.X_op != O_constant ++ || exp.X_add_number < 0) ++ as_bad (_(".seh_endepilogue offset expression for %s " ++ "does not evaluate to a non-negative constant"), ++ S_GET_NAME (epilogue_end_addr)); ++ ++ seh_arm64_epilogue_scope *epilogue_scope; ++ epilogue_scope = seh_ctx_cur->arm64_ctx.epilogue_scopes ++ + seh_ctx_cur->arm64_ctx.epilogue_scopes_count - 1; ++ ++ epilogue_scope->epilogue_end_offset = exp.X_add_number; ++ ++ /* End code. */ ++ seh_arm64_add_unwind_element (end, 0, 0); ++} ++ ++static void ++obj_coff_seh_endfunclet (int what ATTRIBUTE_UNUSED) ++{ ++ if (!verify_context (".seh_endfunclet") ++ || !seh_validate_seg (".seh_endfunclet")) ++ return; ++ ++ demand_empty_rest_of_line (); ++} ++#endif ++ + /* End-of-file hook. */ + + void +@@ -866,6 +946,64 @@ obj_coff_seh_save (int what) + } + #endif + ++#if defined (COFFAARCH64) ++static void ++obj_coff_seh_save_reg (int type) ++{ ++ if (type < 0 || type > unwind_last_type) ++ { ++ as_bad (_("invalid pseudo operation.")); ++ return; ++ } ++ ++ const struct unwind_code_pack_info *unwind_code_pack_info; ++ unwind_code_pack_info = unwind_code_pack_infos + type; ++ ++ if (!unwind_code_pack_info->directive ++ || !verify_context_and_target (unwind_code_pack_info->directive, ++ seh_kind_arm64) ++ || !seh_validate_seg (unwind_code_pack_info->directive)) ++ return; ++ ++ SKIP_WHITESPACE (); ++ ++ char *symbol_name = NULL; ++ int reg = -1; ++ ++ if (unwind_code_pack_info->reg_bits) ++ { ++ char name_end = get_symbol_name (&symbol_name); ++ reg = atoi (symbol_name + 1); ++ (void) restore_line_pointer (name_end); ++ ++ if (!skip_whitespace_and_comma (1)) ++ return; ++ ++ if (reg < 0) ++ { ++ as_bad (_("register is negative")); ++ return; ++ } ++ } ++ ++ offsetT off = -1; ++ if (unwind_code_pack_info->offset_bits) ++ { ++ off = get_absolute_expression (); ++ ++ if (off < 0) ++ { ++ as_bad (_("offset is negative")); ++ return; ++ } ++ } ++ ++ demand_empty_rest_of_line (); ++ ++ seh_arm64_add_unwind_element (type, off, reg); ++} ++#endif ++ + /* Add a stack-allocation token to current context. */ + + static void +-- +2.34.1 diff --git a/packages/binutils/2.45/0010-Write-SEH-records-to-pdata-xdata.patch b/packages/binutils/2.45/0010-Write-SEH-records-to-pdata-xdata.patch new file mode 100644 index 0000000000..66c24945c0 --- /dev/null +++ b/packages/binutils/2.45/0010-Write-SEH-records-to-pdata-xdata.patch @@ -0,0 +1,366 @@ +From 4444444444444444444444444444444444444444 Mon Sep 17 00:00:00 2001 +From: Evgeny Karpov +Date: Fri, 9 May 2025 13:09:00 +0200 +Subject: [PATCH v2 5/7] Write SEH records to pdata/xdata + +The patch emits the required records to the pdata/xdata sections that contain +unwinding information for SEH. + +gas/ChangeLog: + + * config/obj-coff-seh.c (seh_arm64_emit_epilog_scopes): New. + (seh_arm64_emit_unwind_codes): New. + (seh_arm64_write_function_xdata): New. + (write_function_xdata): Update. + (write_function_pdata): Update. +--- + gas/config/obj-coff-seh.c | 308 +++++++++++++++++++++++++++++++++++++- + 1 file changed, 306 insertions(+), 2 deletions(-) + +diff --git a/gas/config/obj-coff-seh.c b/gas/config/obj-coff-seh.c +index 8f9562ee234..0ce70564368 100644 +--- a/gas/config/obj-coff-seh.c ++++ b/gas/config/obj-coff-seh.c +@@ -1192,6 +1192,78 @@ seh_x64_write_prologue_data (const seh_context *c) + } + } + ++static void ++seh_arm64_emit_epilog_scopes (uint64_t fragment_offset, ++ uint32_t prolog_size, ++ unsigned int first_fragment_scope, ++ unsigned int last_fragment_scope, ++ bool has_phantom_prolog) ++{ ++ int32_t start_index_offset = 0; ++ const ++ seh_arm64_epilogue_scope *scopes = seh_ctx_cur->arm64_ctx.epilogue_scopes; ++ if (first_fragment_scope < seh_ctx_cur->arm64_ctx.epilogue_scopes_count) ++ start_index_offset = scopes[first_fragment_scope].epilogue_start_index ++ - prolog_size; ++ if (has_phantom_prolog) ++ start_index_offset -= 1; ++ for (unsigned int i = first_fragment_scope; i < last_fragment_scope; ++i) ++ { ++ seh_arm64_epilogue_scope scope; ++ scope = seh_ctx_cur->arm64_ctx.epilogue_scopes[i]; ++ scope.epilogue_start_offset_reduced = (scope.epilogue_start_offset ++ - fragment_offset) >> 2; ++ scope.epilogue_start_index -= start_index_offset; ++ uint32_t scope_code; ++ memcpy (&scope_code, &scope, sizeof (scope_code)); ++ out_four (scope_code); ++ } ++} ++ ++static void ++seh_arm64_emit_unwind_codes (const seh_context *c, uint32_t prolog_size, ++ uint32_t first_epilog_index, ++ uint32_t last_epilog_index, ++ bool has_phantom_prolog) ++{ ++ uint32_t total_byte_count = 0; ++ ++ if (has_phantom_prolog) ++ { ++ ++total_byte_count; ++ md_number_to_chars (frag_more (1), ARM64_UNOP_ENDC, 1); ++ } ++ ++ uint32_t unwind_bytes_offset = 0; ++ for (int i = 0; i < (int)c->arm64_ctx.unwind_codes_count; ++i) ++ { ++ const seh_arm64_unwind_code *code = c->arm64_ctx.unwind_codes + i; ++ const int byte_count = unwind_code_pack_infos[code->type].size; ++ unwind_bytes_offset += byte_count; ++ ++ if (unwind_bytes_offset > last_epilog_index) ++ break; ++ ++ if (unwind_bytes_offset > prolog_size ++ && unwind_bytes_offset <= first_epilog_index) ++ continue; ++ ++ /* emit unwind code bytes in big endian. */ ++ number_to_chars_bigendian (frag_more (byte_count), code->value, ++ byte_count); ++ total_byte_count += byte_count; ++ } ++ ++ /* handle word alignment. */ ++ int required_padding = (4 - total_byte_count % 4) % 4; ++ if (required_padding) ++ { ++ const uint32_t nop_chain = 0xe3e3e3e3; ++ md_number_to_chars (frag_more (required_padding), nop_chain, ++ required_padding); ++ } ++} ++ + static int + seh_x64_size_prologue_data (const seh_context *c) + { +@@ -1286,6 +1358,205 @@ seh_x64_write_function_xdata (seh_context *c) + /* Handler data will be tacked in here by subsections. */ + } + ++/* Write out the xdata information for one function (arm64). */ ++static void ++seh_arm64_write_function_xdata (seh_context *c) ++{ ++ if (!seh_ctx_cur->arm64_ctx.unwind_codes_byte_count) ++ return; ++ ++ /* Set 4-byte alignment. */ ++ frag_align (2, 0, 0); ++ ++ uintptr_t func_length = 0; ++ expressionS exp; ++ exp.X_op = O_subtract; ++ exp.X_add_symbol = c->end_addr; ++ exp.X_op_symbol = c->start_addr; ++ exp.X_add_number = 0; ++ if (!resolve_expression (&exp) || exp.X_op != O_constant ++ || exp.X_add_number < 0) ++ as_bad (_("the function size expression for %s " ++ "does not evaluate to a non-negative constant"), ++ S_GET_NAME (c->start_addr)); ++ ++ func_length = exp.X_add_number; ++ ++ const uint32_t max_frag_size = ((1 << 18) - 1) << 2; ++ uintptr_t fragment_offset = 0; ++ bool is_fragmented_function = func_length > max_frag_size; ++ ++ /* [first_fragment_scope, last_fragment_scope). */ ++ unsigned int first_fragment_scope = 0; ++ unsigned int last_fragment_scope = 0; ++ uint32_t prolog_size = 0; ++ uint32_t prolog_insruction_count = 0; ++ for (unsigned int i = 0; i < c->arm64_ctx.unwind_codes_count; ++i) ++ { ++ if (c->arm64_ctx.unwind_codes[i].type == end) ++ { ++ prolog_insruction_count = i + 1; ++ break; ++ } ++ } ++ ++ if (c->arm64_ctx.epilogue_scopes_count) ++ prolog_size = c->arm64_ctx.epilogue_scopes[0].epilogue_start_index; ++ else ++ prolog_size = c->arm64_ctx.unwind_codes_byte_count; ++ ++ seh_arm64_func_fragment *fragment; ++ fragment = &seh_ctx_cur->arm64_ctx.func_fragment; ++ ++ while (true) ++ { ++ fragment->xdata_addr = symbol_temp_new_now (); ++ fragment->offset = fragment_offset; ++ fragment->next = NULL; ++ ++ uintptr_t frag_size = func_length - fragment_offset; ++ if (frag_size > max_frag_size) ++ frag_size = max_frag_size; ++ ++ bool is_first_frag = fragment_offset == 0; ++ bool is_last_frag = (fragment_offset + frag_size) == func_length; ++ ++ if (!is_fragmented_function) ++ last_fragment_scope = c->arm64_ctx.epilogue_scopes_count; ++ else ++ { ++ first_fragment_scope = last_fragment_scope; ++ for (unsigned int i = first_fragment_scope; ++ i < c->arm64_ctx.epilogue_scopes_count; ++i) ++ { ++ const seh_arm64_epilogue_scope *scope; ++ scope = c->arm64_ctx.epilogue_scopes; ++ scope += i; ++ if (scope->epilogue_start_offset >= (fragment_offset + frag_size)) ++ break; ++ ++ if (scope->epilogue_end_offset >= (fragment_offset + frag_size)) ++ { ++ frag_size = scope->epilogue_start_offset - fragment_offset; ++ break; ++ } ++ ++ if (scope->epilogue_start_offset >= fragment_offset) ++ last_fragment_scope = i + 1; ++ } ++ } ++ ++ seh_arm64_xdata_header *header = &c->arm64_ctx.xdata_header; ++ const ++ seh_arm64_epilogue_scope *scopes = seh_ctx_cur->arm64_ctx.epilogue_scopes; ++ ++ header->func_length = frag_size >> 2; ++ header->vers = 0; ++ header->e = 0; ++ header->code_words = 0; ++ header->epilogue_count = 0; ++ ++ header->ext_code_words = 0; ++ header->ext_epilogue_count = last_fragment_scope ++ - first_fragment_scope; ++ header->reserved = 0; ++ ++ uint32_t first_epilog_index = 0; ++ uint32_t last_epilog_index = 0; ++ if (!header->ext_epilogue_count) ++ { ++ first_epilog_index = prolog_size; ++ last_epilog_index = prolog_size; ++ } ++ else ++ { ++ const seh_arm64_epilogue_scope *scope; ++ scope = scopes + first_fragment_scope; ++ first_epilog_index = scope->epilogue_start_index; ++ if (last_fragment_scope == c->arm64_ctx.epilogue_scopes_count) ++ last_epilog_index = c->arm64_ctx.unwind_codes_byte_count; ++ else ++ { ++ scope = scopes + last_fragment_scope; ++ last_epilog_index = scope->epilogue_start_index; ++ } ++ } ++ ++ uint32_t unwind_bytes = 0; ++ if (is_first_frag || is_last_frag) ++ unwind_bytes += prolog_size; ++ ++ if (header->ext_epilogue_count) ++ unwind_bytes += last_epilog_index - first_epilog_index; ++ ++ if (is_fragmented_function && is_last_frag && unwind_bytes) ++ { ++ unwind_bytes += 1; ++ ++header->ext_epilogue_count; ++ } ++ ++ header->ext_code_words = (unwind_bytes + 3) / 4; ++ ++ if ((header->ext_code_words == 0 && header->ext_epilogue_count == 0) ++ || header->ext_code_words > 31 ++ || header->ext_epilogue_count > 31) ++ md_number_to_chars (frag_more (8), c->arm64_ctx.xdata_header_value, 8); ++ else ++ { ++ header->code_words = header->ext_code_words; ++ header->epilogue_count = header->ext_epilogue_count; ++ if (header->epilogue_count == 1) ++ { ++ header->e = 1; ++ if (is_fragmented_function && is_last_frag) ++ header->ext_epilogue_count = 0; ++ else ++ { ++ const seh_arm64_epilogue_scope *scope; ++ scope = scopes + first_fragment_scope; ++ header->ext_epilogue_count = scope->epilogue_start_index; ++ } ++ } ++ out_four (c->arm64_ctx.xdata_header_value); ++ } ++ ++ bool has_phantom_prolog = is_fragmented_function && is_last_frag; ++ if (header->ext_epilogue_count && !header->e) ++ { ++ seh_arm64_emit_epilog_scopes (fragment_offset, prolog_size, ++ first_fragment_scope, ++ last_fragment_scope, ++ has_phantom_prolog); ++ if (is_fragmented_function && is_last_frag) ++ { ++ uint32_t epilog_start_offset; ++ epilog_start_offset = frag_size - prolog_insruction_count * 4; ++ md_number_to_chars (frag_more (4), ++ (1 << 22) | (epilog_start_offset >> 2), 4); ++ } ++ } ++ ++ if (header->ext_code_words) ++ seh_arm64_emit_unwind_codes (c, prolog_size, first_epilog_index, ++ last_epilog_index, has_phantom_prolog); ++ ++ if (header->x == 1) ++ { ++ if (c->handler.X_op == O_symbol) ++ c->handler.X_op = O_symbol_rva; ++ ++ emit_expr (&c->handler, 4); ++ } ++ ++ fragment_offset += frag_size; ++ if (fragment_offset == func_length) ++ break; ++ ++ fragment->next = XCNEW (seh_arm64_func_fragment); ++ fragment = fragment->next; ++ } ++} ++ + /* Write out xdata for one function. */ + + static void +@@ -1294,13 +1565,25 @@ write_function_xdata (seh_context *c) + segT save_seg = now_seg; + int save_subseg = now_subseg; + ++ seh_kind target_kind = seh_get_target_kind (); ++ + /* MIPS, SH, ARM don't have xdata. */ +- if (seh_get_target_kind () != seh_kind_x64) ++ if ((target_kind != seh_kind_x64) && (target_kind != seh_kind_arm64)) + return; + + switch_xdata (c->subsection, c->code_seg); + +- seh_x64_write_function_xdata (c); ++ switch (target_kind) ++ { ++ case seh_kind_x64: ++ seh_x64_write_function_xdata (c); ++ break; ++ case seh_kind_arm64: ++ seh_arm64_write_function_xdata (c); ++ break; ++ default: ++ break; ++ } + + subseg_set (save_seg, save_subseg); + } +@@ -1385,6 +1668,27 @@ write_function_pdata (seh_context *c) + emit_expr (&exp, 4); + break; + ++ case seh_kind_arm64: ++ if (!seh_ctx_cur->arm64_ctx.unwind_codes_byte_count) ++ break; ++ ++ seh_arm64_func_fragment *fragment = &seh_ctx_cur->arm64_ctx.func_fragment; ++ while (fragment) ++ { ++ exp.X_op = O_symbol_rva; ++ exp.X_add_number = fragment->offset; ++ exp.X_add_symbol = c->start_addr; ++ emit_expr (&exp, 4); ++ ++ exp.X_op = O_symbol_rva; ++ /* TODO: Implementing packed unwind data. */ ++ exp.X_add_number = 0; ++ exp.X_add_symbol = fragment->xdata_addr; ++ emit_expr (&exp, 4); ++ fragment = fragment->next; ++ } ++ break; ++ + case seh_kind_mips: + exp.X_op = O_symbol; + exp.X_add_number = 0; +-- +2.34.1 diff --git a/packages/binutils/2.45/0011-Apply-SEH-to-AArch64.patch b/packages/binutils/2.45/0011-Apply-SEH-to-AArch64.patch new file mode 100644 index 0000000000..47b0edf09a --- /dev/null +++ b/packages/binutils/2.45/0011-Apply-SEH-to-AArch64.patch @@ -0,0 +1,59 @@ +From 5555555555555555555555555555555555555555 Mon Sep 17 00:00:00 2001 +From: Evgeny Karpov +Date: Fri, 9 May 2025 13:11:00 +0200 +Subject: [PATCH v2 6/7] Apply SEH to AArch64 + +This change introduces the required commands for SEH on AArch64. + +gas/ChangeLog: + + * config/obj-coff-seh.h (defined): Use COFFAARCH64 guard. + (SEH_CMDS): New. +--- + gas/config/obj-coff-seh.h | 31 +++++++++++++++++++++++++++++++ + 1 file changed, 31 insertions(+) + +diff --git a/gas/config/obj-coff-seh.h b/gas/config/obj-coff-seh.h +index 63af8780a75..3d090c0d5ed 100644 +--- a/gas/config/obj-coff-seh.h ++++ b/gas/config/obj-coff-seh.h +@@ -113,6 +113,37 @@ typedef enum seh_arm64_unwind_types + {"seh_code", obj_coff_seh_code, 0}, \ + {"seh_handlerdata", obj_coff_seh_handlerdata, 0}, + ++#if defined (COFFAARCH64) ++#undef SEH_CMDS ++#define SEH_CMDS \ ++ {"seh_proc", obj_coff_seh_proc, 0}, \ ++ {"seh_endproc", obj_coff_seh_endproc, 0}, \ ++ {"seh_endprologue", obj_coff_seh_endprologue, 0}, \ ++ {"seh_startepilogue", obj_coff_seh_startepilogue, 0}, \ ++ {"seh_endepilogue", obj_coff_seh_endepilogue, 0}, \ ++ {"seh_stackalloc", obj_coff_seh_stackalloc, 0}, \ ++ {"seh_handler", obj_coff_seh_handler, 0}, \ ++ {"seh_handlerdata", obj_coff_seh_handlerdata, 0}, \ ++ {"seh_endfunclet", obj_coff_seh_endfunclet, 0}, \ ++ {"seh_save_reg", obj_coff_seh_save_reg, save_reg}, \ ++ {"seh_save_reg_x", obj_coff_seh_save_reg, save_reg_x}, \ ++ {"seh_save_regp", obj_coff_seh_save_reg, save_regp}, \ ++ {"seh_save_regp_x", obj_coff_seh_save_reg, save_regp_x}, \ ++ {"seh_save_lrpair", obj_coff_seh_save_reg, save_lrpair}, \ ++ {"seh_save_fregp", obj_coff_seh_save_reg, save_fregp}, \ ++ {"seh_save_fregp_x", obj_coff_seh_save_reg, save_fregp_x}, \ ++ {"seh_save_freg", obj_coff_seh_save_reg, save_freg}, \ ++ {"seh_save_freg_x", obj_coff_seh_save_reg, save_freg_x}, \ ++ {"seh_save_fplr", obj_coff_seh_save_reg, save_fplr}, \ ++ {"seh_save_fplr_x", obj_coff_seh_save_reg, save_fplr_x}, \ ++ {"seh_save_r19r20_x", obj_coff_seh_save_reg, save_r19r20_x}, \ ++ {"seh_add_fp", obj_coff_seh_save_reg, add_fp}, \ ++ {"seh_nop", obj_coff_seh_save_reg, nop}, \ ++ {"seh_pac_sign_lr", obj_coff_seh_save_reg, pac_sign_lr}, \ ++ {"seh_set_fp", obj_coff_seh_save_reg, set_fp}, \ ++ {"seh_save_next", obj_coff_seh_save_reg, save_next}, ++#endif ++ + /* Type definitions. */ + + typedef struct seh_prologue_element +-- +2.34.1 diff --git a/packages/binutils/2.45/0012-Fix-the-calculation-of-the-function-length.patch b/packages/binutils/2.45/0012-Fix-the-calculation-of-the-function-length.patch new file mode 100644 index 0000000000..6e8073d502 --- /dev/null +++ b/packages/binutils/2.45/0012-Fix-the-calculation-of-the-function-length.patch @@ -0,0 +1,40 @@ +From 6666666666666666666666666666666666666666 Mon Sep 17 00:00:00 2001 +From: Evgeny Karpov +Date: Fri, 9 May 2025 13:13:00 +0200 +Subject: [PATCH v2 7/7] Fix the calculation of the function length + +The patch fixes an issue when alignment is applied in the middle of +executed code, affecting the calculation of the function length. +It can be resolved by using the MAP_DATA state. + +gas/ChangeLog: + + * config/tc-aarch64.h (HANDLE_ALIGN): Update. +--- + gas/config/tc-aarch64.h | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/gas/config/tc-aarch64.h b/gas/config/tc-aarch64.h +index 3cd7be5ba34..32e3aafc545 100644 +--- a/gas/config/tc-aarch64.h ++++ b/gas/config/tc-aarch64.h +@@ -210,10 +210,16 @@ struct aarch64_frag_type + (fr_fix) plus 4 bytes to contain the repeating NOP (fr_var). */ + #define MAX_MEM_FOR_RS_ALIGN_CODE(p2align, max) (3 + 4) + ++/* Sections are assumed to start aligned. In executable section, there is no ++ MAP_DATA symbol pending. So we only align the address during ++ MAP_DATA --> MAP_INSN transition. ++ For other sections, this is not guaranteed. */ + #define md_do_align(N, FILL, LEN, MAX, LABEL) \ + if (FILL == NULL && (N) != 0 && ! need_pass_2 && subseg_text_p (now_seg)) \ + { \ +- frag_align_code (N, MAX); \ ++ enum mstate mapstate = seg_info (now_seg)->tc_segment_info_data.mapstate;\ ++ if (mapstate == MAP_DATA) \ ++ frag_align_code (N, MAX); \ + goto LABEL; \ + } + +-- +2.34.1 diff --git a/packages/binutils/2.45/0013-zlib-darwin-fdopen.patch b/packages/binutils/2.45/0013-zlib-darwin-fdopen.patch new file mode 100644 index 0000000000..141b6acbb6 --- /dev/null +++ b/packages/binutils/2.45/0013-zlib-darwin-fdopen.patch @@ -0,0 +1,29 @@ +From 3fd6f6f8e0a8a6e0b62b0e3a1a9aa04a6b7c9a3a Mon Sep 17 00:00:00 2001 +From: Ahmed ARIF +Date: Sat, 20 Dec 2025 20:05:00 +0100 +Subject: [PATCH] zlib: do not redefine fdopen on Darwin + +Apple clang predefines TARGET_OS_MAC, which triggers the classic-Mac +fallback in zutil.h that defines fdopen() to NULL. When stdio.h is later +included, the fdopen prototype gets macro-expanded and the build fails. + +Skip the classic-Mac block on Darwin (where fdopen is available). +--- + zlib/zutil.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/zlib/zutil.h b/zlib/zutil.h +index 0b5b8ad..4e5f4f3 100644 +--- a/zlib/zutil.h ++++ b/zlib/zutil.h +@@ -137,7 +137,7 @@ + #endif + +-#if defined(MACOS) || defined(TARGET_OS_MAC) ++#if (defined(MACOS) || defined(TARGET_OS_MAC)) && !(defined(__APPLE__) && defined(__MACH__)) + # define OS_CODE 7 + # ifndef Z_SOLO + # if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os + # include /* for fdopen */ +-- +2.50.1 diff --git a/packages/binutils/2.45/chksum b/packages/binutils/2.45/chksum new file mode 100644 index 0000000000..73b89542e2 --- /dev/null +++ b/packages/binutils/2.45/chksum @@ -0,0 +1,12 @@ +md5 binutils-2.45.tar.bz2 6a58b4ae5c4be0ec3fd06cfa2bccb830 +sha1 binutils-2.45.tar.bz2 7117fc18f6008e83a6a3239cfaf9d7e2e22a57df +sha256 binutils-2.45.tar.bz2 1393f90db70c2ebd785fb434d6127f8888c559d5eeb9c006c354b203bab3473e +sha512 binutils-2.45.tar.bz2 b804005b94fd8d77f055716c90709e3f08a4c2f2f3beae9260ca43843d0903121a27429425c766fada3c9b15cfd51d37146e6f8f41ffb1e9840bfb90929ee523 +md5 binutils-2.45.tar.gz 1e548acef5d308fa1a002122126de22c +sha1 binutils-2.45.tar.gz 80bb9891aeaeceee6374a32302c0a918c9e70b67 +sha256 binutils-2.45.tar.gz 8a3eb4b10e7053312790f21ee1a38f7e2bbd6f4096abb590d3429e5119592d96 +sha512 binutils-2.45.tar.gz 5c71ec80884c0b4c0f7a4f8600946f1f6feebe584261b63185b0942cba4062d5b6cf2337539132d0ca03505c0a74f3c2760bc62ed08843c3b7db03df7f5798ad +md5 binutils-2.45.tar.xz dee5b4267e0305a99a3c9d6131f45759 +sha1 binutils-2.45.tar.xz 09fd8a50a95be4a94412fe3847d16280996679c5 +sha256 binutils-2.45.tar.xz c50c0e7f9cb188980e2cc97e4537626b1672441815587f1eab69d2a1bfbef5d2 +sha512 binutils-2.45.tar.xz c7b10a7466d9fd398d7a0b3f2a43318432668d714f2ec70069a31bdc93c86d28e0fe83792195727167743707fbae45337c0873a0786416db53bbf22860c16ce7 diff --git a/packages/linux/4.19.318/version.desc b/packages/binutils/2.45/version.desc similarity index 100% rename from packages/linux/4.19.318/version.desc rename to packages/binutils/2.45/version.desc diff --git a/packages/binutils/2.46.0/0000-sh-conf.patch b/packages/binutils/2.46.0/0000-sh-conf.patch new file mode 100644 index 0000000000..f278187d28 --- /dev/null +++ b/packages/binutils/2.46.0/0000-sh-conf.patch @@ -0,0 +1,39 @@ +From bdb18461e4d78d701c7d4a43667b55af6eb2ad13 Mon Sep 17 00:00:00 2001 +From: Chris Packham +Date: Mon, 8 Aug 2022 20:31:10 +1200 +Subject: [PATCH 0/5] sh conf + +--- + configure | 2 +- + configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index 2551fe02..4d50547e 100755 +--- a/configure ++++ b/configure +@@ -4196,7 +4196,7 @@ case "${target}" in + nvptx*-*-*) + noconfigdirs="$noconfigdirs target-libssp" + ;; +- sh-*-*) ++ sh*-*-*) + case "${target}" in + sh*-*-elf) + ;; +diff --git a/configure.ac b/configure.ac +index fe7c1cb4..e5f1e828 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1365,7 +1365,7 @@ case "${target}" in + nvptx*-*-*) + noconfigdirs="$noconfigdirs target-libssp" + ;; +- sh-*-*) ++ sh*-*-*) + case "${target}" in + sh*-*-elf) + ;; +-- +2.53.0 + diff --git a/packages/binutils/2.46.0/0001-check_ldrunpath_length.patch b/packages/binutils/2.46.0/0001-check_ldrunpath_length.patch new file mode 100644 index 0000000000..2e068bb2a9 --- /dev/null +++ b/packages/binutils/2.46.0/0001-check_ldrunpath_length.patch @@ -0,0 +1,34 @@ +From d1902b4290c4008b5014caf22fa45a4a8355c943 Mon Sep 17 00:00:00 2001 +From: Chris Packham +Date: Mon, 8 Aug 2022 20:36:31 +1200 +Subject: [PATCH 1/5] check_ldrunpath_length + +--- + ld/ldelf.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/ld/ldelf.c b/ld/ldelf.c +index a623d37c..8a7ca72e 100644 +--- a/ld/ldelf.c ++++ b/ld/ldelf.c +@@ -1134,6 +1134,8 @@ ldelf_handle_dt_needed (struct elf_link_hash_table *htab, + && command_line.rpath == NULL) + { + path = (const char *) getenv ("LD_RUN_PATH"); ++ if (path && *path == '\0') ++ path = NULL; + if (path + && ldelf_search_needed (path, &n, force, + is_linux, elfsize)) +@@ -1807,6 +1809,8 @@ ldelf_before_allocation (char **audit, char **depaudit, + rpath = command_line.rpath; + if (rpath == NULL) + rpath = (const char *) getenv ("LD_RUN_PATH"); ++ if (rpath && *rpath == '\0') ++ rpath = NULL; + + for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next) + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) +-- +2.53.0 + diff --git a/packages/binutils/2.46.0/0002-Don-t-link-to-libfl-as-it-s-unnecessary.patch b/packages/binutils/2.46.0/0002-Don-t-link-to-libfl-as-it-s-unnecessary.patch new file mode 100644 index 0000000000..1a141e864b --- /dev/null +++ b/packages/binutils/2.46.0/0002-Don-t-link-to-libfl-as-it-s-unnecessary.patch @@ -0,0 +1,125 @@ +From db91403b2a4958f12601c65a0fb11cbd89828118 Mon Sep 17 00:00:00 2001 +From: Chris Packham +Date: Mon, 8 Aug 2022 20:37:24 +1200 +Subject: [PATCH 2/5] Don't link to libfl as it's unnecessary + +--- + binutils/configure | 3 +++ + binutils/configure.ac | 3 +++ + gas/configure | 3 +++ + gas/configure.ac | 3 +++ + ld/configure | 3 +++ + ld/configure.ac | 3 +++ + 6 files changed, 18 insertions(+) + +diff --git a/binutils/configure b/binutils/configure +index 196cd142..6a6c774d 100755 +--- a/binutils/configure ++++ b/binutils/configure +@@ -12903,6 +12903,7 @@ fi + done + test -n "$YACC" || YACC="yacc" + ++save_LIBS=$LIBS + for ac_prog in flex lex + do + # Extract the first word of "$ac_prog", so it can be a program name with args. +@@ -13066,6 +13067,8 @@ esac + if test "$LEX" = :; then + LEX=${am_missing_run}flex + fi ++LIBS=$save_LIBS ++LEXLIB= + + ALL_LINGUAS="bg ca da es fi fr hr id it ja pt ro ru rw sk sr sv tr uk vi zh_CN zh_TW" + +diff --git a/binutils/configure.ac b/binutils/configure.ac +index 5553942b..857ffc17 100644 +--- a/binutils/configure.ac ++++ b/binutils/configure.ac +@@ -153,7 +153,10 @@ if test -z "$host" ; then + fi + + AC_PROG_YACC ++save_LIBS=$LIBS + AM_PROG_LEX ++LIBS=$save_LIBS ++LEXLIB= + + ALL_LINGUAS="bg ca da es fi fr hr id it ja pt ro ru rw sk sr sv tr uk vi zh_CN zh_TW" + ZW_GNU_GETTEXT_SISTER_DIR +diff --git a/gas/configure b/gas/configure +index b97a2c6e..cb6f23c4 100755 +--- a/gas/configure ++++ b/gas/configure +@@ -13399,6 +13399,7 @@ fi + done + test -n "$YACC" || YACC="yacc" + ++save_LIBS=$LIBS + for ac_prog in flex lex + do + # Extract the first word of "$ac_prog", so it can be a program name with args. +@@ -13562,6 +13563,8 @@ esac + if test "$LEX" = :; then + LEX=${am_missing_run}flex + fi ++LIBS=$save_LIBS ++LEXLIB= + + ALL_LINGUAS="es fi fr id ja ru rw sv tr uk zh_CN" + +diff --git a/gas/configure.ac b/gas/configure.ac +index 7fb573f8..e072b05d 100644 +--- a/gas/configure.ac ++++ b/gas/configure.ac +@@ -929,7 +929,10 @@ AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}", [Target vendor.]) + AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}", [Target OS.]) + + AC_PROG_YACC ++save_LIBS=$LIBS + AM_PROG_LEX ++LIBS=$save_LIBS ++LEXLIB= + + ALL_LINGUAS="es fi fr id ja ru rw sv tr uk zh_CN" + ZW_GNU_GETTEXT_SISTER_DIR +diff --git a/ld/configure b/ld/configure +index 85584402..d0e9072d 100755 +--- a/ld/configure ++++ b/ld/configure +@@ -18419,6 +18419,7 @@ fi + done + test -n "$YACC" || YACC="yacc" + ++save_LIBS=$LIBS + for ac_prog in flex lex + do + # Extract the first word of "$ac_prog", so it can be a program name with args. +@@ -18582,6 +18583,8 @@ esac + if test "$LEX" = :; then + LEX=${am_missing_run}flex + fi ++LIBS=$save_LIBS ++LEXLIB= + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +diff --git a/ld/configure.ac b/ld/configure.ac +index 8c5e9606..6dc69290 100644 +--- a/ld/configure.ac ++++ b/ld/configure.ac +@@ -427,7 +427,10 @@ ZW_GNU_GETTEXT_SISTER_DIR + AC_EXEEXT + + AC_PROG_YACC ++save_LIBS=$LIBS + AM_PROG_LEX ++LIBS=$save_LIBS ++LEXLIB= + + AM_MAINTAINER_MODE + AM_CONDITIONAL(GENINSRC_NEVER, false) +-- +2.53.0 + diff --git a/packages/binutils/2.46.0/0003-Fix-darwin-build.patch b/packages/binutils/2.46.0/0003-Fix-darwin-build.patch new file mode 100644 index 0000000000..6cf2504340 --- /dev/null +++ b/packages/binutils/2.46.0/0003-Fix-darwin-build.patch @@ -0,0 +1,50 @@ +From 05a49a0ff165fc67775d37382e15b1f2c444c85d Mon Sep 17 00:00:00 2001 +From: Andrew Hsieh +Date: Wed, 18 Mar 2015 10:57:24 +0800 +Subject: [PATCH 3/5] Fix darwin build + +1. In Drawin PTHREAD_ONCE_INIT is {0x30B1BCBA, {0}} and the GCC < 4.4 + doesn't support ended initializer list +2. wcsncasecmp doesn't exist in MacSDK10.6.x + +Change-Id: I69204a72f853f5263dffedc448379d75ed4eca2e +--- + bfd/peXXigen.c | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c +index 2ab0dd50..4540a7ac 100644 +--- a/bfd/peXXigen.c ++++ b/bfd/peXXigen.c +@@ -3698,6 +3698,28 @@ u16_mbtouc (wint_t * puc, const unsigned short * s, unsigned int n) + } + #endif /* not Cygwin/Mingw */ + ++#if defined __APPLE__ && __DARWIN_C_LEVEL < 200809L ++/* wcsncasecmp isn't always defined in Mac SDK */ ++static int ++wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n) ++{ ++ wchar_t c1, c2; ++ ++ if (n == 0) ++ return (0); ++ for (; *s1; s1++, s2++) ++ { ++ c1 = towlower(*s1); ++ c2 = towlower(*s2); ++ if (c1 != c2) ++ return ((int)c1 - c2); ++ if (--n == 0) ++ return (0); ++ } ++ return (-*s2); ++} ++#endif ++ + /* Perform a comparison of two entries. */ + static signed int + rsrc_cmp (bool is_name, rsrc_entry * a, rsrc_entry * b) +-- +2.53.0 + diff --git a/packages/binutils/2.46.0/0004-sysroot.patch b/packages/binutils/2.46.0/0004-sysroot.patch new file mode 100644 index 0000000000..d4f120d371 --- /dev/null +++ b/packages/binutils/2.46.0/0004-sysroot.patch @@ -0,0 +1,50 @@ +From c4c80ba1a902cb1c35452eb2ad415cce52e792a6 Mon Sep 17 00:00:00 2001 +From: Sven Rebhan +Date: Mon, 8 Aug 2022 20:46:29 +1200 +Subject: [PATCH 4/5] sysroot + +Always try to prepend the sysroot prefix to absolute filenames first. + +http://bugs.gentoo.org/275666 +http://sourceware.org/bugzilla/show_bug.cgi?id=10340 + +Signed-off-by: Sven Rebhan +--- + ld/ldfile.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/ld/ldfile.c b/ld/ldfile.c +index f47e860d..9672d032 100644 +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -548,18 +548,25 @@ ldfile_open_file_search (const char *arch, + directory first. */ + if (!entry->flags.maybe_archive) + { +- if (entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename)) ++ /* For absolute pathnames, try to always open the file in the ++ sysroot first. If this fails, try to open the file at the ++ given location. */ ++ entry->flags.sysrooted = is_sysrooted_pathname (entry->filename); ++ if (!entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename) ++ && ld_sysroot) + { + char *name = concat (ld_sysroot, entry->filename, + (const char *) NULL); + if (ldfile_try_open_bfd (name, entry)) + { + entry->filename = name; ++ entry->flags.sysrooted = true; + return true; + } + free (name); + } +- else if (ldfile_try_open_bfd (entry->filename, entry)) ++ ++ if (ldfile_try_open_bfd (entry->filename, entry)) + return true; + + if (IS_ABSOLUTE_PATH (entry->filename)) +-- +2.53.0 + diff --git a/packages/binutils/2.46.0/0005-poison-system-directories.patch b/packages/binutils/2.46.0/0005-poison-system-directories.patch new file mode 100644 index 0000000000..5695abd18f --- /dev/null +++ b/packages/binutils/2.46.0/0005-poison-system-directories.patch @@ -0,0 +1,303 @@ +From 07623e4f03619d7ef92d4eecb7d4678ca7eeca8a Mon Sep 17 00:00:00 2001 +From: Scott Garman +Date: Mon, 8 Aug 2022 20:48:32 +1200 +Subject: [PATCH 5/5] poison system directories + +Patch adapted to binutils 2.23.2 and extended to use +BR_COMPILER_PARANOID_UNSAFE_PATH by Thomas Petazzoni. + +[Gustavo: adapt to binutils 2.25] +Signed-off-by: Thomas Petazzoni +Signed-off-by: Gustavo Zacarias + +Upstream-Status: Inappropriate [distribution: codesourcery] + +Patch originally created by Mark Hatle, forward-ported to +binutils 2.21 by Scott Garman. + +purpose: warn for uses of system directories when cross linking + +Code Merged from Sourcery G++ binutils 2.19 - 4.4-277 + +2008-07-02 Joseph Myers + + ld/ + * ld.h (args_type): Add error_poison_system_directories. + * ld.texinfo (--error-poison-system-directories): Document. + * ldfile.c (ldfile_add_library_path): Check + command_line.error_poison_system_directories. + * ldmain.c (main): Initialize + command_line.error_poison_system_directories. + * lexsup.c (enum option_values): Add + OPTION_ERROR_POISON_SYSTEM_DIRECTORIES. + (ld_options): Add --error-poison-system-directories. + (parse_args): Handle new option. + +2007-06-13 Joseph Myers + + ld/ + * config.in: Regenerate. + * ld.h (args_type): Add poison_system_directories. + * ld.texinfo (--no-poison-system-directories): Document. + * ldfile.c (ldfile_add_library_path): Check + command_line.poison_system_directories. + * ldmain.c (main): Initialize + command_line.poison_system_directories. + * lexsup.c (enum option_values): Add + OPTION_NO_POISON_SYSTEM_DIRECTORIES. + (ld_options): Add --no-poison-system-directories. + (parse_args): Handle new option. + +2007-04-20 Joseph Myers + + Merge from Sourcery G++ binutils 2.17: + + 2007-03-20 Joseph Myers + Based on patch by Mark Hatle . + ld/ + * configure.ac (--enable-poison-system-directories): New option. + * configure, config.in: Regenerate. + * ldfile.c (ldfile_add_library_path): If + ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib, + /usr/lib, /usr/local/lib or /usr/X11R6/lib. + +Signed-off-by: Mark Hatle +Signed-off-by: Scott Garman +--- + ld/config.in | 3 +++ + ld/configure | 14 ++++++++++++++ + ld/configure.ac | 10 ++++++++++ + ld/ld.h | 8 ++++++++ + ld/ld.texi | 12 ++++++++++++ + ld/ldfile.c | 16 ++++++++++++++++ + ld/ldlex.h | 2 ++ + ld/ldmain.c | 2 ++ + ld/lexsup.c | 21 +++++++++++++++++++++ + 9 files changed, 88 insertions(+) + +diff --git a/ld/config.in b/ld/config.in +index 7fac3b5c..630190b5 100644 +--- a/ld/config.in ++++ b/ld/config.in +@@ -86,6 +86,9 @@ + language is requested. */ + #undef ENABLE_NLS + ++/* Define to warn for use of native system library directories */ ++#undef ENABLE_POISON_SYSTEM_DIRECTORIES ++ + /* Additional extension a shared object might have. */ + #undef EXTRA_SHLIB_EXTENSION + +diff --git a/ld/configure b/ld/configure +index d0e9072d..7aab1c4a 100755 +--- a/ld/configure ++++ b/ld/configure +@@ -843,6 +843,7 @@ enable_checking + with_lib_path + enable_targets + with_sysroot ++enable_poison_system_directories + enable_gold + enable_got + enable_compressed_debug_sections +@@ -1537,6 +1538,8 @@ Optional Features: + --disable-largefile omit support for large files + --enable-checking enable run-time checks + --enable-targets alternative target configurations ++ --enable-poison-system-directories ++ warn for use of native system library directories + --enable-gold[=ARG] build gold [ARG={default,yes,no}] + --enable-got= GOT handling scheme (target, single, negative, + multigot) +@@ -15768,7 +15771,18 @@ else + fi + + ++# Check whether --enable-poison-system-directories was given. ++if test "${enable_poison_system_directories+set}" = set; then : ++ enableval=$enable_poison_system_directories; ++else ++ enable_poison_system_directories=no ++fi ++ ++if test "x${enable_poison_system_directories}" = "xyes"; then + ++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h ++ ++fi + + # Check whether --enable-got was given. + if test "${enable_got+set}" = set; then : +diff --git a/ld/configure.ac b/ld/configure.ac +index 6dc69290..dca39fba 100644 +--- a/ld/configure.ac ++++ b/ld/configure.ac +@@ -115,6 +115,16 @@ AC_SUBST(use_sysroot) + AC_SUBST(TARGET_SYSTEM_ROOT) + AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) + ++AC_ARG_ENABLE([poison-system-directories], ++ AS_HELP_STRING([--enable-poison-system-directories], ++ [warn for use of native system library directories]),, ++ [enable_poison_system_directories=no]) ++if test "x${enable_poison_system_directories}" = "xyes"; then ++ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], ++ [1], ++ [Define to warn for use of native system library directories]) ++fi ++ + dnl Use --enable-gold to decide if this linker should be the default. + dnl "install_as_default" is set to false if gold is the default linker. + dnl "installed_linker" is the installed BFD linker name. +diff --git a/ld/ld.h b/ld/ld.h +index 76825e42..9869d6cf 100644 +--- a/ld/ld.h ++++ b/ld/ld.h +@@ -161,6 +161,14 @@ typedef struct + /* If set, display the target memory usage (per memory region). */ + bool print_memory_usage; + ++ /* If TRUE (the default) warn for uses of system directories when ++ cross linking. */ ++ bool poison_system_directories; ++ ++ /* If TRUE (default FALSE) give an error for uses of system ++ directories when cross linking instead of a warning. */ ++ bool error_poison_system_directories; ++ + /* Should we force section groups to be resolved? Controlled with + --force-group-allocation on the command line or FORCE_GROUP_ALLOCATION + in the linker script. */ +diff --git a/ld/ld.texi b/ld/ld.texi +index 3dc76a1f..f0b30d3f 100644 +--- a/ld/ld.texi ++++ b/ld/ld.texi +@@ -3391,6 +3391,18 @@ creation of the metadata note, if one had been enabled by an earlier + occurrence of the --package-metadata option. + If the linker has been built with libjansson, then the JSON string + will be validated. ++ ++@kindex --no-poison-system-directories ++@item --no-poison-system-directories ++Do not warn for @option{-L} options using system directories such as ++@file{/usr/lib} when cross linking. This option is intended for use ++in chroot environments when such directories contain the correct ++libraries for the target system rather than the host. ++ ++@kindex --error-poison-system-directories ++@item --error-poison-system-directories ++Give an error instead of a warning for @option{-L} options using ++system directories when cross linking. + @end table + + @c man end +diff --git a/ld/ldfile.c b/ld/ldfile.c +index 9672d032..0eba3c83 100644 +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -326,6 +326,22 @@ ldfile_add_library_path (const char *name, bool cmdline) + new_dirs->name = concat (ld_sysroot, name + strlen ("$SYSROOT"), (const char *) NULL); + else + new_dirs->name = xstrdup (name); ++ ++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES ++ if (command_line.poison_system_directories ++ && ((!strncmp (name, "/lib", 4)) ++ || (!strncmp (name, "/usr/lib", 8)) ++ || (!strncmp (name, "/usr/local/lib", 14)) ++ || (!strncmp (name, "/usr/X11R6/lib", 14)))) ++ { ++ if (command_line.error_poison_system_directories) ++ einfo (_("%X%P: error: library search path \"%s\" is unsafe for " ++ "cross-compilation\n"), name); ++ else ++ einfo (_("%P: warning: library search path \"%s\" is unsafe for " ++ "cross-compilation\n"), name); ++ } ++#endif + } + + static void +diff --git a/ld/ldlex.h b/ld/ldlex.h +index 85e06b6f..e8346424 100644 +--- a/ld/ldlex.h ++++ b/ld/ldlex.h +@@ -477,6 +477,8 @@ enum option_values + /* Used by emultempl/elf-i386-glibc.em. */ + OPTION_GNU_TLS_VERSION_TAG, + OPTION_NO_GNU_TLS_VERSION_TAG, ++ OPTION_NO_POISON_SYSTEM_DIRECTORIES, ++ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES, + }; + + /* The initial parser states. */ +diff --git a/ld/ldmain.c b/ld/ldmain.c +index a2711d23..c113c742 100644 +--- a/ld/ldmain.c ++++ b/ld/ldmain.c +@@ -749,6 +749,8 @@ main (int argc, char **argv) + command_line.warn_mismatch = true; + command_line.warn_search_mismatch = true; + command_line.check_section_addresses = -1; ++ command_line.poison_system_directories = true; ++ command_line.error_poison_system_directories = true; + + /* We initialize DEMANGLING based on the environment variable + COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the +diff --git a/ld/lexsup.c b/ld/lexsup.c +index 158abb6d..d5e9df75 100644 +--- a/ld/lexsup.c ++++ b/ld/lexsup.c +@@ -643,6 +643,14 @@ static const struct ld_option ld_options[] = + " is: share-unconflicted (default),\n" + " share-duplicated"), + TWO_DASHES }, ++ { {"no-poison-system-directories", no_argument, NULL, ++ OPTION_NO_POISON_SYSTEM_DIRECTORIES}, ++ '\0', NULL, N_("Do not warn for -L options using system directories"), ++ TWO_DASHES }, ++ { {"error-poison-system-directories", no_argument, NULL, ++ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES}, ++ '\0', NULL, N_("Give an error for -L options using system directories"), ++ TWO_DASHES }, + }; + + #define OPTION_COUNT ARRAY_SIZE (ld_options) +@@ -655,6 +663,7 @@ parse_args (unsigned argc, char **argv) + int ingroup = 0; + char *default_dirlist = NULL; + char *shortopts; ++ char *BR_paranoid_env; + struct option *longopts; + struct option *really_longopts; + int last_optind; +@@ -1789,6 +1798,14 @@ parse_args (unsigned argc, char **argv) + } + break; + ++ case OPTION_NO_POISON_SYSTEM_DIRECTORIES: ++ command_line.poison_system_directories = false; ++ break; ++ ++ case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES: ++ command_line.error_poison_system_directories = true; ++ break; ++ + case OPTION_PUSH_STATE: + input_flags.pushed = xmemdup (&input_flags, + sizeof (input_flags), +@@ -1933,6 +1950,10 @@ parse_args (unsigned argc, char **argv) + command_line.soname = NULL; + } + ++ BR_paranoid_env = getenv("BR_COMPILER_PARANOID_UNSAFE_PATH"); ++ if (BR_paranoid_env && strlen(BR_paranoid_env) > 0) ++ command_line.error_poison_system_directories = true; ++ + while (ingroup) + { + einfo (_("%P: missing --end-group; added as last command line option\n")); +-- +2.53.0 + diff --git a/packages/binutils/2.46.0/0006-Adjust-pdata-function-table-entries-sorting-for-AArch64.patch b/packages/binutils/2.46.0/0006-Adjust-pdata-function-table-entries-sorting-for-AArch64.patch new file mode 100644 index 0000000000..2f1cc7f9bc --- /dev/null +++ b/packages/binutils/2.46.0/0006-Adjust-pdata-function-table-entries-sorting-for-AArch64.patch @@ -0,0 +1,51 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Evgeny Karpov +Date: Fri, 9 May 2025 12:51:00 +0200 +Subject: [PATCH v2 1/7] Adjust pdata function table entries sorting for AArch64 + +The .pdata section contains an array of function table entries that +are used for exception handling. The entries should be sorted by +begin address, which is usually the first 4 bytes RVA in the entry. +Entry sizes are different for x64 and AArch64. +This difference is addressed in this patch. + +bfd/ChangeLog: + + * peXXigen.c (defined): New. + (_bfd_XXi_final_link_postscript): Use + FUNCTION_TABLE_ENTRY_SIZE. +--- + bfd/peXXigen.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c +index 9938108ce6b..3230f465d63 100644 +--- a/bfd/peXXigen.c ++++ b/bfd/peXXigen.c +@@ -4655,6 +4655,13 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo) + #if !defined(COFF_WITH_pep) && (defined(COFF_WITH_pex64) || defined(COFF_WITH_peAArch64) || defined(COFF_WITH_peLoongArch64) || defined (COFF_WITH_peRiscV64)) + { + asection *sec = bfd_get_section_by_name (abfd, ".pdata"); ++#if defined (COFF_WITH_peAArch64) ++/* https://learn.microsoft.com/en-us/cpp/build/arm64-exception-handling#pdata-records. */ ++ #define FUNCTION_TABLE_ENTRY_SIZE 8 ++#else ++/* https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#the-pdata-section. */ ++ #define FUNCTION_TABLE_ENTRY_SIZE 12 ++#endif + + if (sec) + { +@@ -4664,8 +4671,8 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo) + if (bfd_malloc_and_get_section (abfd, sec, &tmp_data)) + { + qsort (tmp_data, +- (size_t) (x / 12), +- 12, sort_x64_pdata); ++ (size_t) (x / FUNCTION_TABLE_ENTRY_SIZE), ++ FUNCTION_TABLE_ENTRY_SIZE, sort_x64_pdata); + bfd_set_section_contents (pfinfo->output_bfd, sec, + tmp_data, 0, x); + free (tmp_data); +-- +2.34.1 diff --git a/packages/binutils/2.46.0/0007-Define-unwinding-and-SEH-data-structures-for-aarch64.patch b/packages/binutils/2.46.0/0007-Define-unwinding-and-SEH-data-structures-for-aarch64.patch new file mode 100644 index 0000000000..6842d22247 --- /dev/null +++ b/packages/binutils/2.46.0/0007-Define-unwinding-and-SEH-data-structures-for-aarch64.patch @@ -0,0 +1,245 @@ +From 1111111111111111111111111111111111111111 Mon Sep 17 00:00:00 2001 +From: Evgeny Karpov +Date: Fri, 9 May 2025 12:57:00 +0200 +Subject: [PATCH v2 2/7] Define unwinding and SEH data structures for aarch64 + +This patch adds unwinding codes and records that are needed to emit +SEH data to pdata and xdata sections, and an arm64 context to store +data required for emitting. + +gas/ChangeLog: + + * config/obj-coff-seh.h (ARM64_MAX_UNWIND_CODES): New. + (ARM64_MAX_EPILOGUE_SCOPES): New. + (ARM64_UNOP_ALLOCS): New. + (ARM64_UNOP_SAVER19R20X): New. + (ARM64_UNOP_SAVEFPLR): New. + (ARM64_UNOP_SAVEFPLRX): New. + (ARM64_UNOP_ALLOCM): New. + (ARM64_UNOP_SAVEREGP): New. + (ARM64_UNOP_SAVEREGPX): New. + (ARM64_UNOP_SAVEREG): New. + (ARM64_UNOP_SAVEREGX): New. + (ARM64_UNOP_SAVELRPAIR): New. + (ARM64_UNOP_SAVEFREGP): New. + (ARM64_UNOP_SAVEFREGPX): New. + (ARM64_UNOP_SAVEFREG): New. + (ARM64_UNOP_SAVEFREGX): New. + (ARM64_UNOP_ALLOCL): New. + (ARM64_UNOP_SETFP): New. + (ARM64_UNOP_ADDFP): New. + (ARM64_UNOP_NOP): New. + (ARM64_UNOP_END): New. + (ARM64_UNOP_ENDC): New. + (ARM64_UNOP_SAVENEXT): New. + (ARM64_UNOP_PACSIGNLR): New. +--- + gas/config/obj-coff-seh.h | 154 +++++++++++++++++++++++++++++++++++++- + 1 file changed, 152 insertions(+), 2 deletions(-) + +diff --git a/gas/config/obj-coff-seh.h b/gas/config/obj-coff-seh.h +index 598870ae4e0..f926fc8622c 100644 +--- a/gas/config/obj-coff-seh.h ++++ b/gas/config/obj-coff-seh.h +@@ -19,12 +19,13 @@ + 02110-1301, USA. */ + + /* Short overview: +- There are at the moment three different function entry formats preset. ++ There are at the moment four different function entry formats preset. + The first is the MIPS one. The second version + is for ARM, PPC, SH3, and SH4 mainly for Windows CE. + The third is the IA64 and x64 version. Note, the IA64 isn't implemented yet, + but to find information about it, please see specification about IA64 on + http://download.intel.com/design/Itanium/Downloads/245358.pdf file. ++ The fourth is the Arm64 version. + + The first version has just entries in the pdata section: BeginAddress, + EndAddress, ExceptionHandler, HandlerData, and PrologueEndAddress. Each +@@ -57,8 +58,43 @@ + .seh_savexmm + .seh_pushframe + .seh_code ++ ++ The fourth version for Arm64 partially intersects with the x64 ++ version, however it has a different extension to the unwind codes. ++ It emits SEH data to pdata and xdata sections. In some cases SEH ++ data could be emitted to a packed record in the pdata section ++ without the need for data in the xdata section. However, the packed ++ pdata record is not implemented yet. ++ + */ + ++typedef enum seh_arm64_unwind_types ++{ ++ alloc_s, ++ alloc_m, ++ alloc_l, ++ save_reg, ++ save_reg_x, ++ save_regp, ++ save_regp_x, ++ save_fregp, ++ save_fregp_x, ++ save_freg, ++ save_freg_x, ++ save_lrpair, ++ save_fplr, ++ save_fplr_x, ++ save_r19r20_x, ++ add_fp, ++ set_fp, ++ save_next, ++ nop, ++ pac_sign_lr, ++ end, ++ end_c, ++ unwind_last_type = end_c ++} seh_arm64_unwind_types; ++ + /* architecture specific pdata/xdata handling. */ + #define SEH_CMDS \ + {"seh_proc", obj_coff_seh_proc, 0}, \ +@@ -87,6 +123,91 @@ typedef struct seh_prologue_element + symbolS *pc_addr; + } seh_prologue_element; + ++typedef struct seh_arm64_unwind_code ++{ ++ uint32_t value; ++ seh_arm64_unwind_types type; ++} seh_arm64_unwind_code; ++ ++typedef struct seh_arm64_packed_unwind_data ++{ ++ uint32_t flag : 2; ++ uint32_t func_length : 11; ++ uint32_t frame_size : 9; ++ uint32_t cr : 2; ++ uint32_t h : 1; ++ uint32_t regI : 4; ++ uint32_t regF : 3; ++} seh_arm64_packed_unwind_data; ++ ++typedef struct seh_arm64_except_info ++{ ++ uint32_t flag : 2; ++ uint32_t except_info_rva : 30; ++} seh_arm64_except_info; ++ ++typedef union seh_arm64_unwind_info ++{ ++ seh_arm64_except_info except_info; ++ seh_arm64_packed_unwind_data packed_unwind_data; ++} seh_arm64_unwind_info; ++ ++typedef struct seh_arm64_pdata ++{ ++ unsigned int func_start_rva; ++ seh_arm64_unwind_info except_info_unwind; ++} seh_arm64_pdata; ++ ++typedef struct seh_arm64_xdata_header ++{ ++ uint32_t func_length : 18; ++ uint32_t vers : 2; ++ uint32_t x : 1; ++ uint32_t e : 1; ++ uint32_t epilogue_count : 5; ++ uint32_t code_words : 5; ++ uint32_t ext_epilogue_count : 16; ++ uint32_t ext_code_words : 8; ++ uint32_t reserved : 8; ++} seh_arm64_xdata_header; ++ ++typedef struct seh_arm64_epilogue_scope ++{ ++ uint32_t epilogue_start_offset_reduced : 18; ++ uint32_t reserved : 4; ++ uint32_t epilogue_start_index : 10; ++ uintptr_t epilogue_start_offset; ++ uintptr_t epilogue_end_offset; ++} seh_arm64_epilogue_scope; ++ ++typedef struct seh_arm64_func_fragment ++{ ++ uintptr_t offset; ++ symbolS *xdata_addr; ++ struct seh_arm64_func_fragment *next; ++} seh_arm64_func_fragment; ++ ++#define ARM64_MAX_UNWIND_CODES 286 ++#define ARM64_MAX_EPILOGUE_SCOPES 32 ++ ++typedef struct seh_arm64_context ++{ ++ seh_arm64_pdata pdata; ++ union { ++ seh_arm64_xdata_header xdata_header; ++ valueT xdata_header_value; ++ }; ++ unsigned int unwind_codes_count; ++ unsigned int unwind_codes_byte_count; ++ seh_arm64_unwind_code unwind_codes[ARM64_MAX_UNWIND_CODES]; ++ unsigned int epilogue_scopes_count; ++ seh_arm64_epilogue_scope epilogue_scopes[ARM64_MAX_EPILOGUE_SCOPES]; ++ expressionS except_handler; ++ expressionS except_handler_data; ++ /* The function fragments. */ ++ seh_arm64_func_fragment func_fragment; ++} seh_arm64_context; ++ + typedef struct seh_context + { + /* Initial code-segment. */ +@@ -126,13 +247,17 @@ typedef struct seh_context + int elems_count; + int elems_max; + seh_prologue_element *elems; ++ ++ /* arm64-specific context. */ ++ seh_arm64_context arm64_ctx; + } seh_context; + + typedef enum seh_kind { + seh_kind_unknown = 0, + seh_kind_mips = 1, /* Used for MIPS and x86 pdata generation. */ + seh_kind_arm = 2, /* Used for ARM, PPC, SH3, and SH4 pdata (PDATA_EH) generation. */ +- seh_kind_x64 = 3 /* Used for IA64 and x64 pdata/xdata generation. */ ++ seh_kind_x64 = 3, /* Used for IA64 and x64 pdata/xdata generation. */ ++ seh_kind_arm64 = 4 /* Used for ARM64 pdata/xdata generation. */ + } seh_kind; + + /* Forward declarations. */ +@@ -201,4 +326,29 @@ static void obj_coff_seh_code (int); + (PEX64_OFFSET_TO_SCOPE_COUNT(COUNTOFUNWINDCODES) + \ + PEX64_SCOPE_ENTRY_SIZE * (IDX)) + ++/* arm64 unwind code structs. */ ++ ++#define ARM64_UNOP_ALLOCS 0b000U ++#define ARM64_UNOP_SAVER19R20X 0b001U ++#define ARM64_UNOP_SAVEFPLR 0b01U ++#define ARM64_UNOP_SAVEFPLRX 0b10U ++#define ARM64_UNOP_ALLOCM 0b11000U ++#define ARM64_UNOP_SAVEREGP 0b110010U ++#define ARM64_UNOP_SAVEREGPX 0b110011U ++#define ARM64_UNOP_SAVEREG 0b110100U ++#define ARM64_UNOP_SAVEREGX 0b1101010U ++#define ARM64_UNOP_SAVELRPAIR 0b1101011U ++#define ARM64_UNOP_SAVEFREGP 0b1101100U ++#define ARM64_UNOP_SAVEFREGPX 0b1101101U ++#define ARM64_UNOP_SAVEFREG 0b1101110U ++#define ARM64_UNOP_SAVEFREGX 0b11011110U ++#define ARM64_UNOP_ALLOCL 0b11100000U ++#define ARM64_UNOP_SETFP 0b11100001U ++#define ARM64_UNOP_ADDFP 0b11100010U ++#define ARM64_UNOP_NOP 0b11100011U ++#define ARM64_UNOP_END 0b11100100U ++#define ARM64_UNOP_ENDC 0b11100101U ++#define ARM64_UNOP_SAVENEXT 0b11100110U ++#define ARM64_UNOP_PACSIGNLR 0b11111100U ++ + #endif +-- +2.34.1 diff --git a/packages/binutils/2.46.0/0008-Adjust-x64-SEH-implementation-for-AArch64.patch b/packages/binutils/2.46.0/0008-Adjust-x64-SEH-implementation-for-AArch64.patch new file mode 100644 index 0000000000..a98fac033a --- /dev/null +++ b/packages/binutils/2.46.0/0008-Adjust-x64-SEH-implementation-for-AArch64.patch @@ -0,0 +1,448 @@ +From 2222222222222222222222222222222222222222 Mon Sep 17 00:00:00 2001 +From: Evgeny Karpov +Date: Fri, 9 May 2025 13:03:00 +0200 +Subject: [PATCH v2 3/7] Adjust x64 SEH implementation for AArch64 + +This patch defines the required unwind codes for AArch64 and updates handlers +for SEH commands that are used by both x64 and AArch64. +It implements encoding for unwind elements that will be emitted +to pdata/xdata sections. + +gas/ChangeLog: + + * config/obj-coff-seh.c (struct unwind_code_pack_info): New. + (defined): Add COFFAARCH64 guard. + (obj_coff_seh_code): Update. + (seh_get_target_kind): Update. + (verify_context_and_targets): New. + (obj_coff_seh_eh): Add COFFAARCH64 guard. + (obj_coff_seh_handler): Update. + (obj_coff_seh_handlerdata): Update. + (seh_arm64_add_unwind_element): New. + (obj_coff_seh_proc): Update. + (obj_coff_seh_endprologue): Update. + (obj_coff_seh_save): Add COFFAARCH64 guard. + (obj_coff_seh_setframe): Likewise. + * config/obj-coff-seh.h (obj_coff_seh_setframe): Add COFFAARCH64 guard. + (obj_coff_seh_endproc): Likewise. + (obj_coff_seh_proc): Likewise. + (obj_coff_seh_handler): Likewise. + (obj_coff_seh_handlerdata): Likewise. + (defined): Likewise. + (obj_coff_seh_code): Likewise. +--- + gas/config/obj-coff-seh.c | 260 +++++++++++++++++++++++++++++++++++--- + gas/config/obj-coff-seh.h | 12 +- + 2 files changed, 246 insertions(+), 26 deletions(-) + +diff --git a/gas/config/obj-coff-seh.c b/gas/config/obj-coff-seh.c +index 70cb4e4aa64..d861be4418e 100644 +--- a/gas/config/obj-coff-seh.c ++++ b/gas/config/obj-coff-seh.c +@@ -28,6 +28,20 @@ struct seh_seg_list { + char *seg_name; + }; + ++struct unwind_code_pack_info { ++ const char *directive; ++ int offset_bits; ++ int reg_bits; ++ int code_bits; ++ int code; ++ int offset_right_shift; ++ int offset; ++ int reg_right_shift; ++ int reg_offset; ++ int type; ++ int size; ++}; ++ + /* Local data. */ + static seh_context *seh_ctx_cur = NULL; + +@@ -36,6 +50,51 @@ static htab_t seh_hash; + static struct seh_seg_list *x_segcur = NULL; + static struct seh_seg_list *p_segcur = NULL; + ++const struct unwind_code_pack_info unwind_code_pack_infos[] = { ++ {NULL, 5, 0, 3, ARM64_UNOP_ALLOCS, 4, 0, 0, 0, ++ alloc_s, 1}, ++ {NULL, 11, 0, 5, ARM64_UNOP_ALLOCM, 4, 0, 0, 0, ++ alloc_m, 2}, ++ {NULL, 24, 0, 8, ARM64_UNOP_ALLOCL, 4, 0, 0, 0, ++ alloc_l, 4}, ++ {".seh_save_reg", 6, 4, 6, ARM64_UNOP_SAVEREG, 3, 0, 0, 19, ++ save_reg, 2}, ++ {".seh_save_reg_x", 5, 4, 7, ARM64_UNOP_SAVEREGX, 3, 1, 0, 19, ++ save_reg_x, 2}, ++ {".seh_save_regp", 6, 4, 6, ARM64_UNOP_SAVEREGP, 3, 0, 0, 19, ++ save_regp, 2}, ++ {".seh_save_regp_x", 6, 4, 6, ARM64_UNOP_SAVEREGPX, 3, 1, 0, 19, ++ save_regp_x, 2}, ++ {".seh_save_lrpair", 6, 3, 7, ARM64_UNOP_SAVELRPAIR, 3, 0, 1, 19, ++ save_lrpair, 2}, ++ {".seh_save_fregp", 6, 3, 7, ARM64_UNOP_SAVEFREGP, 3, 0, 0, 8, ++ save_fregp, 2}, ++ {".seh_save_fregp_x", 6, 3, 7, ARM64_UNOP_SAVEFREGPX, 3, 1, 0, 8, ++ save_fregp_x, 2}, ++ {".seh_save_freg", 6, 3, 7, ARM64_UNOP_SAVEFREG, 3, 0, 0, 8, ++ save_freg, 2}, ++ {".seh_save_freg_x", 5, 3, 8, ARM64_UNOP_SAVEFREGX, 3, 1, 0, 8, ++ save_freg_x, 2}, ++ {".seh_save_fplr", 6, 0, 2, ARM64_UNOP_SAVEFPLR, 3, 0, 0, 0, ++ save_fplr, 1}, ++ {".seh_save_fplr_x", 6, 0, 6, ARM64_UNOP_SAVEFPLRX, 3, 1, 0, 0, ++ save_fplr_x, 1}, ++ {".seh_save_r19r20_x", 5, 0, 3, ARM64_UNOP_SAVER19R20X, 3, 0, 0, 0, ++ save_r19r20_x, 1}, ++ {".seh_add_fp", 8, 0, 8, ARM64_UNOP_ADDFP, 0, 0, 0, 0, ++ add_fp, 2}, ++ {".seh_set_fp", 0, 0, 8, ARM64_UNOP_SETFP, 0, 0, 0, 0, ++ set_fp, 1}, ++ {".seh_save_next", 0, 0, 8, ARM64_UNOP_SAVENEXT, 0, 0, 0, 0, ++ save_next, 1}, ++ {".seh_nop", 0, 0, 8, ARM64_UNOP_NOP, 0, 0, 0, 0, ++ nop, 1}, ++ {".seh_pac_sign_lr", 0, 0, 8, ARM64_UNOP_PACSIGNLR, 0, 0, 0, 0, ++ pac_sign_lr, 1}, ++ {NULL, 0, 0, 8, ARM64_UNOP_END, 0, 0, 0, 0, ++ end, 1}, ++}; ++ + static void write_function_xdata (seh_context *); + static void write_function_pdata (seh_context *); + +@@ -164,12 +223,14 @@ seh_validate_seg (const char *directive) + return 0; + } + ++#if !defined (COFFAARCH64) + /* Switch back to the code section, whatever that may be. */ + static void + obj_coff_seh_code (int ignored ATTRIBUTE_UNUSED) + { + subseg_set (seh_ctx_cur->code_seg, 0); + } ++#endif + + static void + switch_xdata (int subseg, segT code_seg) +@@ -200,6 +261,8 @@ seh_get_target_kind (void) + switch (bfd_get_arch (stdoutput)) + { + case bfd_arch_aarch64: ++ return seh_kind_arm64; ++ + case bfd_arch_arm: + case bfd_arch_powerpc: + case bfd_arch_sh: +@@ -270,6 +333,32 @@ verify_context_and_target (const char *directive, seh_kind target) + return verify_context (directive); + } + ++/* Verify mulitple targets. */ ++ ++static int ++verify_context_and_targets (const char *directive, const seh_kind targets[], ++ int count_targets) ++{ ++ bool match = false; ++ for (int i = 0; i < count_targets; ++i) ++ { ++ if (seh_get_target_kind () == targets[i]) ++ { ++ match = true; ++ break; ++ } ++ } ++ ++ if (!match) ++ { ++ as_warn (_("%s ignored for this target"), directive); ++ ignore_rest_of_line (); ++ return 0; ++ } ++ ++ return verify_context (directive); ++} ++ + /* Skip whitespace and a comma. Error if the comma is not seen. */ + + static int +@@ -292,6 +381,7 @@ skip_whitespace_and_comma (int required) + return 0; + } + ++#if !defined (COFFAARCH64) + /* Mark current context to use 32-bit instruction (arm). */ + + static void +@@ -320,6 +410,7 @@ obj_coff_seh_eh (int what ATTRIBUTE_UNUSED) + + demand_empty_rest_of_line (); + } ++#endif + + /* Set for current context the default handler (x64). */ + +@@ -362,6 +453,10 @@ obj_coff_seh_handler (int what ATTRIBUTE_UNUSED) + else + expression (&seh_ctx_cur->handler); + ++ const seh_kind target_kind = seh_get_target_kind (); ++ if (target_kind == seh_kind_arm64) ++ seh_ctx_cur->arm64_ctx.xdata_header.x = 1; ++ + seh_ctx_cur->handler_data.X_op = O_constant; + seh_ctx_cur->handler_data.X_add_number = 0; + seh_ctx_cur->handler_flags = 0; +@@ -369,7 +464,7 @@ obj_coff_seh_handler (int what ATTRIBUTE_UNUSED) + if (!skip_whitespace_and_comma (0)) + return; + +- if (seh_get_target_kind () == seh_kind_x64) ++ if (target_kind == seh_kind_x64 || target_kind == seh_kind_arm64) + { + do + { +@@ -401,13 +496,65 @@ obj_coff_seh_handler (int what ATTRIBUTE_UNUSED) + static void + obj_coff_seh_handlerdata (int what ATTRIBUTE_UNUSED) + { +- if (!verify_context_and_target (".seh_handlerdata", seh_kind_x64)) ++ const seh_kind targets[] = { seh_kind_x64, seh_kind_arm64 }; ++ if (!verify_context_and_targets (".seh_handlerdata", targets, ++ sizeof (targets) / sizeof (seh_kind))) + return; + demand_empty_rest_of_line (); + + switch_xdata (seh_ctx_cur->subsection + 1, seh_ctx_cur->code_seg); + } + ++/* Obtain available unwind element. */ ++ ++static void ++seh_arm64_add_unwind_element (seh_arm64_unwind_types unwind_type, int offset, ++ int reg) ++{ ++ if (seh_ctx_cur == NULL ++ || seh_ctx_cur->arm64_ctx.unwind_codes_count >= ARM64_MAX_UNWIND_CODES) ++ { ++ as_warn (_("no unwind element available.")); ++ return; ++ } ++ ++ seh_arm64_unwind_code *arm64_element = seh_ctx_cur->arm64_ctx.unwind_codes ++ + seh_ctx_cur->arm64_ctx.unwind_codes_count++; ++ const struct unwind_code_pack_info *unwind_code_pack_info; ++ unwind_code_pack_info = unwind_code_pack_infos + unwind_type; ++ arm64_element->value = 0; ++ int value_offset_bits = 0; ++ ++ if (unwind_code_pack_info->offset_bits) ++ { ++ offset = (offset >> unwind_code_pack_info->offset_right_shift) ++ - unwind_code_pack_info->offset; ++ offset &= (1 << unwind_code_pack_info->offset_bits) - 1; ++ arm64_element->value |= offset << value_offset_bits; ++ value_offset_bits += unwind_code_pack_info->offset_bits; ++ } ++ ++ if (unwind_code_pack_info->reg_bits) ++ { ++ reg = (reg >> unwind_code_pack_info->reg_right_shift) ++ - unwind_code_pack_info->reg_offset; ++ reg &= (1 << unwind_code_pack_info->reg_bits) - 1; ++ arm64_element->value |= reg << value_offset_bits; ++ value_offset_bits += unwind_code_pack_info->reg_bits; ++ } ++ ++ if (unwind_code_pack_info->code_bits) ++ { ++ int code = unwind_code_pack_info->code; ++ code &= (1 << unwind_code_pack_info->code_bits) - 1; ++ arm64_element->value |= code << value_offset_bits; ++ } ++ ++ arm64_element->type = unwind_code_pack_info->type; ++ seh_ctx_cur->arm64_ctx.unwind_codes_byte_count += unwind_code_pack_info->size; ++} ++ ++ + /* Mark end of current context. */ + + static void +@@ -419,6 +566,16 @@ do_seh_endproc (void) + write_function_pdata (seh_ctx_cur); + free (seh_ctx_cur->elems); + free (seh_ctx_cur->func_name); ++#if defined (COFFAARCH64) ++ seh_arm64_func_fragment *fragment; ++ fragment = seh_ctx_cur->arm64_ctx.func_fragment.next; ++ while (fragment) ++ { ++ seh_arm64_func_fragment *next = fragment->next; ++ XDELETE (fragment); ++ fragment = next; ++ } ++#endif + free (seh_ctx_cur); + seh_ctx_cur = NULL; + } +@@ -465,11 +622,18 @@ obj_coff_seh_proc (int what ATTRIBUTE_UNUSED) + + seh_ctx_cur->code_seg = now_seg; + +- if (seh_get_target_kind () == seh_kind_x64) ++ seh_kind kind = seh_get_target_kind (); ++ if (kind == seh_kind_x64 || kind == seh_kind_arm64) + { + x_segcur = seh_hash_find_or_make (seh_ctx_cur->code_seg, ".xdata"); + seh_ctx_cur->subsection = x_segcur->subseg; + x_segcur->subseg += 2; ++ ++ if (kind == seh_kind_arm64) ++ { ++ seh_ctx_cur->arm64_ctx.unwind_codes_count = 0; ++ seh_ctx_cur->arm64_ctx.epilogue_scopes_count = 0; ++ } + } + + SKIP_WHITESPACE (); +@@ -498,6 +662,23 @@ obj_coff_seh_endprologue (int what ATTRIBUTE_UNUSED) + as_warn (_("duplicate .seh_endprologue in .seh_proc block")); + else + seh_ctx_cur->endprologue_addr = symbol_temp_new_now (); ++ ++ if (seh_get_target_kind () == seh_kind_arm64) ++ { ++ const int n = seh_ctx_cur->arm64_ctx.unwind_codes_count; ++ ++ /* Unwind codes need to be reversed. */ ++ for (int i = 0; i < n / 2; ++i) ++ { ++ seh_arm64_unwind_code *unwind_codes; ++ unwind_codes = seh_ctx_cur->arm64_ctx.unwind_codes; ++ seh_arm64_unwind_code temp = unwind_codes[i]; ++ unwind_codes[i] = unwind_codes[n-i-1]; ++ unwind_codes[n-i-1] = temp; ++ } ++ ++ seh_arm64_add_unwind_element (end, 0, 0); ++ } + } + + /* End-of-file hook. */ +@@ -533,6 +714,7 @@ seh_x64_make_prologue_element (int code, int info, offsetT off) + n->pc_addr = symbol_temp_new_now (); + } + ++#if !defined (COFFAARCH64) + /* Helper to read a register name from input stream (x64). */ + + static int +@@ -682,6 +864,7 @@ obj_coff_seh_save (int what) + + seh_x64_make_prologue_element (code, reg, off); + } ++#endif + + /* Add a stack-allocation token to current context. */ + +@@ -691,36 +874,69 @@ obj_coff_seh_stackalloc (int what ATTRIBUTE_UNUSED) + offsetT off; + int code, info; + +- if (!verify_context_and_target (".seh_stackalloc", seh_kind_x64) ++ const seh_kind targets[] = { seh_kind_x64, seh_kind_arm64 }; ++ if (!verify_context_and_targets (".seh_stackalloc", targets, ++ sizeof (targets) / sizeof (seh_kind)) + || !seh_validate_seg (".seh_stackalloc")) + return; + + off = get_absolute_expression (); + demand_empty_rest_of_line (); + +- if (off == 0) +- return; +- if (off < 0) ++ switch (seh_get_target_kind ()) + { +- as_bad (_(".seh_stackalloc offset is negative")); +- return; +- } ++ case seh_kind_x64: ++ if (off == 0) ++ return; ++ if (off < 0) ++ { ++ as_bad (_(".seh_stackalloc offset is negative")); ++ return; ++ } + +- if ((off & 7) == 0 && off <= 128) +- code = UWOP_ALLOC_SMALL, info = (off - 8) >> 3, off = 0; +- else if ((off & 7) == 0 && off <= (offsetT) (0xffff * 8)) +- code = UWOP_ALLOC_LARGE, info = 0, off >>= 3; +- else if (off <= (offsetT) 0xffffffff) +- code = UWOP_ALLOC_LARGE, info = 1; +- else +- { +- as_bad (_(".seh_stackalloc offset out of range")); ++ if ((off & 7) == 0 && off <= 128) ++ code = UWOP_ALLOC_SMALL, info = (off - 8) >> 3, off = 0; ++ else if ((off & 7) == 0 && off <= (offsetT) (0xffff * 8)) ++ code = UWOP_ALLOC_LARGE, info = 0, off >>= 3; ++ else if (off <= (offsetT) 0xffffffff) ++ code = UWOP_ALLOC_LARGE, info = 1; ++ else ++ { ++ as_bad (_(".seh_stackalloc offset out of range")); ++ return; ++ } ++ ++ seh_x64_make_prologue_element (code, info, off); ++ break; ++ ++ case seh_kind_arm64: ++ /* arm64 offset should be encoded in multiples of sixteen. */ ++ if ((off & 0xf) != 0) ++ { ++ as_bad (_(".seh_stackalloc offset < 16-byte stack alignment")); ++ return; ++ } ++ ++ if (off < 0x200) ++ seh_arm64_add_unwind_element (alloc_s, off, 0); ++ else if (off < 0x8000) ++ seh_arm64_add_unwind_element (alloc_m, off, 0); ++ else if (off < 0x10000000) ++ seh_arm64_add_unwind_element (alloc_l, off, 0); ++ else ++ { ++ as_bad (_(".seh_stackalloc offset out of range")); ++ return; ++ } ++ break; ++ ++ default: ++ as_bad (_(".seh_stackalloc invalid target")); + return; + } +- +- seh_x64_make_prologue_element (code, info, off); + } + ++#if !defined (COFFAARCH64) + /* Add a frame-pointer token to current context. */ + + static void +@@ -758,7 +974,7 @@ obj_coff_seh_setframe (int what ATTRIBUTE_UNUSED) + seh_x64_make_prologue_element (UWOP_SET_FPREG, 0, 0); + } + } +- ++#endif + /* Data writing routines. */ + + /* Output raw integers in 1, 2, or 4 bytes. */ diff --git a/packages/binutils/2.46.0/0009-Add-aarch64-specific-SEH-commands.patch b/packages/binutils/2.46.0/0009-Add-aarch64-specific-SEH-commands.patch new file mode 100644 index 0000000000..53de4220fa --- /dev/null +++ b/packages/binutils/2.46.0/0009-Add-aarch64-specific-SEH-commands.patch @@ -0,0 +1,178 @@ +From 3333333333333333333333333333333333333333 Mon Sep 17 00:00:00 2001 +From: Evgeny Karpov +Date: Fri, 9 May 2025 13:07:00 +0200 +Subject: [PATCH v2 4/7] Add aarch64-specific SEH commands + +Implementation for aarch64 contains SEH commands that are not present for +x64 architecture, such as .seh_startepilogue/.seh_endepilogue, +.seh_save_reg*, .seh_save_freg*, and others. + +gas/ChangeLog: + + * config/obj-coff-seh.c (defined): Use COFFAARCH64 guard. + (obj_coff_seh_startepilogue): New. + (obj_coff_seh_endepilogue): New. + (obj_coff_seh_endfunclet): New. + (obj_coff_seh_save_reg): New. +--- + gas/config/obj-coff-seh.c | 138 ++++++++++++++++++++++++++++++++++++++ + 1 file changed, 138 insertions(+) + +diff --git a/gas/config/obj-coff-seh.c b/gas/config/obj-coff-seh.c +index d861be4418e..8f9562ee234 100644 +--- a/gas/config/obj-coff-seh.c ++++ b/gas/config/obj-coff-seh.c +@@ -681,6 +681,86 @@ obj_coff_seh_endprologue (int what ATTRIBUTE_UNUSED) + } + } + ++#if defined (COFFAARCH64) ++static void ++obj_coff_seh_startepilogue (int what ATTRIBUTE_UNUSED) ++{ ++ symbolS *epilogue_start_addr; ++ expressionS exp; ++ ++ if (!verify_context (".seh_startepilogue") ++ || !seh_validate_seg (".seh_startepilogue")) ++ return; ++ demand_empty_rest_of_line (); ++ ++ if (seh_get_target_kind () != seh_kind_arm64) ++ return; ++ ++ epilogue_start_addr = symbol_temp_new_now (); ++ exp.X_op = O_subtract; ++ exp.X_add_symbol = epilogue_start_addr; ++ exp.X_op_symbol = seh_ctx_cur->start_addr; ++ exp.X_add_number = 0; ++ ++ if (!resolve_expression (&exp) || exp.X_op != O_constant ++ || exp.X_add_number < 0) ++ as_bad (_(".seh_startepilog offset expression for %s " ++ "does not evaluate to a non-negative constant"), ++ S_GET_NAME (epilogue_start_addr)); ++ ++ seh_arm64_epilogue_scope *epilogue_scope; ++ epilogue_scope = seh_ctx_cur->arm64_ctx.epilogue_scopes ++ + seh_ctx_cur->arm64_ctx.epilogue_scopes_count; ++ epilogue_scope->epilogue_start_offset = exp.X_add_number / 4; ++ epilogue_scope->reserved = 0; ++ epilogue_scope->epilogue_start_index ++ = seh_ctx_cur->arm64_ctx.unwind_codes_byte_count; ++ seh_ctx_cur->arm64_ctx.epilogue_scopes_count++; ++} ++ ++static void ++obj_coff_seh_endepilogue (int what ATTRIBUTE_UNUSED) ++{ ++ if (!verify_context (".seh_endepilogue") ++ || !seh_validate_seg (".seh_endepilogue")) ++ return; ++ ++ demand_empty_rest_of_line (); ++ ++ expressionS exp; ++ symbolS *epilogue_end_addr = symbol_temp_new_now (); ++ exp.X_op = O_subtract; ++ exp.X_add_symbol = epilogue_end_addr; ++ exp.X_op_symbol = seh_ctx_cur->start_addr; ++ exp.X_add_number = 0; ++ ++ if (!resolve_expression (&exp) || exp.X_op != O_constant ++ || exp.X_add_number < 0) ++ as_bad (_(".seh_endepilogue offset expression for %s " ++ "does not evaluate to a non-negative constant"), ++ S_GET_NAME (epilogue_end_addr)); ++ ++ seh_arm64_epilogue_scope *epilogue_scope; ++ epilogue_scope = seh_ctx_cur->arm64_ctx.epilogue_scopes ++ + seh_ctx_cur->arm64_ctx.epilogue_scopes_count - 1; ++ ++ epilogue_scope->epilogue_end_offset = exp.X_add_number; ++ ++ /* End code. */ ++ seh_arm64_add_unwind_element (end, 0, 0); ++} ++ ++static void ++obj_coff_seh_endfunclet (int what ATTRIBUTE_UNUSED) ++{ ++ if (!verify_context (".seh_endfunclet") ++ || !seh_validate_seg (".seh_endfunclet")) ++ return; ++ ++ demand_empty_rest_of_line (); ++} ++#endif ++ + /* End-of-file hook. */ + + void +@@ -866,6 +946,64 @@ obj_coff_seh_save (int what) + } + #endif + ++#if defined (COFFAARCH64) ++static void ++obj_coff_seh_save_reg (int type) ++{ ++ if (type < 0 || type > unwind_last_type) ++ { ++ as_bad (_("invalid pseudo operation.")); ++ return; ++ } ++ ++ const struct unwind_code_pack_info *unwind_code_pack_info; ++ unwind_code_pack_info = unwind_code_pack_infos + type; ++ ++ if (!unwind_code_pack_info->directive ++ || !verify_context_and_target (unwind_code_pack_info->directive, ++ seh_kind_arm64) ++ || !seh_validate_seg (unwind_code_pack_info->directive)) ++ return; ++ ++ SKIP_WHITESPACE (); ++ ++ char *symbol_name = NULL; ++ int reg = -1; ++ ++ if (unwind_code_pack_info->reg_bits) ++ { ++ char name_end = get_symbol_name (&symbol_name); ++ reg = atoi (symbol_name + 1); ++ (void) restore_line_pointer (name_end); ++ ++ if (!skip_whitespace_and_comma (1)) ++ return; ++ ++ if (reg < 0) ++ { ++ as_bad (_("register is negative")); ++ return; ++ } ++ } ++ ++ offsetT off = -1; ++ if (unwind_code_pack_info->offset_bits) ++ { ++ off = get_absolute_expression (); ++ ++ if (off < 0) ++ { ++ as_bad (_("offset is negative")); ++ return; ++ } ++ } ++ ++ demand_empty_rest_of_line (); ++ ++ seh_arm64_add_unwind_element (type, off, reg); ++} ++#endif ++ + /* Add a stack-allocation token to current context. */ + + static void +-- +2.34.1 diff --git a/packages/binutils/2.46.0/0010-Write-SEH-records-to-pdata-xdata.patch b/packages/binutils/2.46.0/0010-Write-SEH-records-to-pdata-xdata.patch new file mode 100644 index 0000000000..66c24945c0 --- /dev/null +++ b/packages/binutils/2.46.0/0010-Write-SEH-records-to-pdata-xdata.patch @@ -0,0 +1,366 @@ +From 4444444444444444444444444444444444444444 Mon Sep 17 00:00:00 2001 +From: Evgeny Karpov +Date: Fri, 9 May 2025 13:09:00 +0200 +Subject: [PATCH v2 5/7] Write SEH records to pdata/xdata + +The patch emits the required records to the pdata/xdata sections that contain +unwinding information for SEH. + +gas/ChangeLog: + + * config/obj-coff-seh.c (seh_arm64_emit_epilog_scopes): New. + (seh_arm64_emit_unwind_codes): New. + (seh_arm64_write_function_xdata): New. + (write_function_xdata): Update. + (write_function_pdata): Update. +--- + gas/config/obj-coff-seh.c | 308 +++++++++++++++++++++++++++++++++++++- + 1 file changed, 306 insertions(+), 2 deletions(-) + +diff --git a/gas/config/obj-coff-seh.c b/gas/config/obj-coff-seh.c +index 8f9562ee234..0ce70564368 100644 +--- a/gas/config/obj-coff-seh.c ++++ b/gas/config/obj-coff-seh.c +@@ -1192,6 +1192,78 @@ seh_x64_write_prologue_data (const seh_context *c) + } + } + ++static void ++seh_arm64_emit_epilog_scopes (uint64_t fragment_offset, ++ uint32_t prolog_size, ++ unsigned int first_fragment_scope, ++ unsigned int last_fragment_scope, ++ bool has_phantom_prolog) ++{ ++ int32_t start_index_offset = 0; ++ const ++ seh_arm64_epilogue_scope *scopes = seh_ctx_cur->arm64_ctx.epilogue_scopes; ++ if (first_fragment_scope < seh_ctx_cur->arm64_ctx.epilogue_scopes_count) ++ start_index_offset = scopes[first_fragment_scope].epilogue_start_index ++ - prolog_size; ++ if (has_phantom_prolog) ++ start_index_offset -= 1; ++ for (unsigned int i = first_fragment_scope; i < last_fragment_scope; ++i) ++ { ++ seh_arm64_epilogue_scope scope; ++ scope = seh_ctx_cur->arm64_ctx.epilogue_scopes[i]; ++ scope.epilogue_start_offset_reduced = (scope.epilogue_start_offset ++ - fragment_offset) >> 2; ++ scope.epilogue_start_index -= start_index_offset; ++ uint32_t scope_code; ++ memcpy (&scope_code, &scope, sizeof (scope_code)); ++ out_four (scope_code); ++ } ++} ++ ++static void ++seh_arm64_emit_unwind_codes (const seh_context *c, uint32_t prolog_size, ++ uint32_t first_epilog_index, ++ uint32_t last_epilog_index, ++ bool has_phantom_prolog) ++{ ++ uint32_t total_byte_count = 0; ++ ++ if (has_phantom_prolog) ++ { ++ ++total_byte_count; ++ md_number_to_chars (frag_more (1), ARM64_UNOP_ENDC, 1); ++ } ++ ++ uint32_t unwind_bytes_offset = 0; ++ for (int i = 0; i < (int)c->arm64_ctx.unwind_codes_count; ++i) ++ { ++ const seh_arm64_unwind_code *code = c->arm64_ctx.unwind_codes + i; ++ const int byte_count = unwind_code_pack_infos[code->type].size; ++ unwind_bytes_offset += byte_count; ++ ++ if (unwind_bytes_offset > last_epilog_index) ++ break; ++ ++ if (unwind_bytes_offset > prolog_size ++ && unwind_bytes_offset <= first_epilog_index) ++ continue; ++ ++ /* emit unwind code bytes in big endian. */ ++ number_to_chars_bigendian (frag_more (byte_count), code->value, ++ byte_count); ++ total_byte_count += byte_count; ++ } ++ ++ /* handle word alignment. */ ++ int required_padding = (4 - total_byte_count % 4) % 4; ++ if (required_padding) ++ { ++ const uint32_t nop_chain = 0xe3e3e3e3; ++ md_number_to_chars (frag_more (required_padding), nop_chain, ++ required_padding); ++ } ++} ++ + static int + seh_x64_size_prologue_data (const seh_context *c) + { +@@ -1286,6 +1358,205 @@ seh_x64_write_function_xdata (seh_context *c) + /* Handler data will be tacked in here by subsections. */ + } + ++/* Write out the xdata information for one function (arm64). */ ++static void ++seh_arm64_write_function_xdata (seh_context *c) ++{ ++ if (!seh_ctx_cur->arm64_ctx.unwind_codes_byte_count) ++ return; ++ ++ /* Set 4-byte alignment. */ ++ frag_align (2, 0, 0); ++ ++ uintptr_t func_length = 0; ++ expressionS exp; ++ exp.X_op = O_subtract; ++ exp.X_add_symbol = c->end_addr; ++ exp.X_op_symbol = c->start_addr; ++ exp.X_add_number = 0; ++ if (!resolve_expression (&exp) || exp.X_op != O_constant ++ || exp.X_add_number < 0) ++ as_bad (_("the function size expression for %s " ++ "does not evaluate to a non-negative constant"), ++ S_GET_NAME (c->start_addr)); ++ ++ func_length = exp.X_add_number; ++ ++ const uint32_t max_frag_size = ((1 << 18) - 1) << 2; ++ uintptr_t fragment_offset = 0; ++ bool is_fragmented_function = func_length > max_frag_size; ++ ++ /* [first_fragment_scope, last_fragment_scope). */ ++ unsigned int first_fragment_scope = 0; ++ unsigned int last_fragment_scope = 0; ++ uint32_t prolog_size = 0; ++ uint32_t prolog_insruction_count = 0; ++ for (unsigned int i = 0; i < c->arm64_ctx.unwind_codes_count; ++i) ++ { ++ if (c->arm64_ctx.unwind_codes[i].type == end) ++ { ++ prolog_insruction_count = i + 1; ++ break; ++ } ++ } ++ ++ if (c->arm64_ctx.epilogue_scopes_count) ++ prolog_size = c->arm64_ctx.epilogue_scopes[0].epilogue_start_index; ++ else ++ prolog_size = c->arm64_ctx.unwind_codes_byte_count; ++ ++ seh_arm64_func_fragment *fragment; ++ fragment = &seh_ctx_cur->arm64_ctx.func_fragment; ++ ++ while (true) ++ { ++ fragment->xdata_addr = symbol_temp_new_now (); ++ fragment->offset = fragment_offset; ++ fragment->next = NULL; ++ ++ uintptr_t frag_size = func_length - fragment_offset; ++ if (frag_size > max_frag_size) ++ frag_size = max_frag_size; ++ ++ bool is_first_frag = fragment_offset == 0; ++ bool is_last_frag = (fragment_offset + frag_size) == func_length; ++ ++ if (!is_fragmented_function) ++ last_fragment_scope = c->arm64_ctx.epilogue_scopes_count; ++ else ++ { ++ first_fragment_scope = last_fragment_scope; ++ for (unsigned int i = first_fragment_scope; ++ i < c->arm64_ctx.epilogue_scopes_count; ++i) ++ { ++ const seh_arm64_epilogue_scope *scope; ++ scope = c->arm64_ctx.epilogue_scopes; ++ scope += i; ++ if (scope->epilogue_start_offset >= (fragment_offset + frag_size)) ++ break; ++ ++ if (scope->epilogue_end_offset >= (fragment_offset + frag_size)) ++ { ++ frag_size = scope->epilogue_start_offset - fragment_offset; ++ break; ++ } ++ ++ if (scope->epilogue_start_offset >= fragment_offset) ++ last_fragment_scope = i + 1; ++ } ++ } ++ ++ seh_arm64_xdata_header *header = &c->arm64_ctx.xdata_header; ++ const ++ seh_arm64_epilogue_scope *scopes = seh_ctx_cur->arm64_ctx.epilogue_scopes; ++ ++ header->func_length = frag_size >> 2; ++ header->vers = 0; ++ header->e = 0; ++ header->code_words = 0; ++ header->epilogue_count = 0; ++ ++ header->ext_code_words = 0; ++ header->ext_epilogue_count = last_fragment_scope ++ - first_fragment_scope; ++ header->reserved = 0; ++ ++ uint32_t first_epilog_index = 0; ++ uint32_t last_epilog_index = 0; ++ if (!header->ext_epilogue_count) ++ { ++ first_epilog_index = prolog_size; ++ last_epilog_index = prolog_size; ++ } ++ else ++ { ++ const seh_arm64_epilogue_scope *scope; ++ scope = scopes + first_fragment_scope; ++ first_epilog_index = scope->epilogue_start_index; ++ if (last_fragment_scope == c->arm64_ctx.epilogue_scopes_count) ++ last_epilog_index = c->arm64_ctx.unwind_codes_byte_count; ++ else ++ { ++ scope = scopes + last_fragment_scope; ++ last_epilog_index = scope->epilogue_start_index; ++ } ++ } ++ ++ uint32_t unwind_bytes = 0; ++ if (is_first_frag || is_last_frag) ++ unwind_bytes += prolog_size; ++ ++ if (header->ext_epilogue_count) ++ unwind_bytes += last_epilog_index - first_epilog_index; ++ ++ if (is_fragmented_function && is_last_frag && unwind_bytes) ++ { ++ unwind_bytes += 1; ++ ++header->ext_epilogue_count; ++ } ++ ++ header->ext_code_words = (unwind_bytes + 3) / 4; ++ ++ if ((header->ext_code_words == 0 && header->ext_epilogue_count == 0) ++ || header->ext_code_words > 31 ++ || header->ext_epilogue_count > 31) ++ md_number_to_chars (frag_more (8), c->arm64_ctx.xdata_header_value, 8); ++ else ++ { ++ header->code_words = header->ext_code_words; ++ header->epilogue_count = header->ext_epilogue_count; ++ if (header->epilogue_count == 1) ++ { ++ header->e = 1; ++ if (is_fragmented_function && is_last_frag) ++ header->ext_epilogue_count = 0; ++ else ++ { ++ const seh_arm64_epilogue_scope *scope; ++ scope = scopes + first_fragment_scope; ++ header->ext_epilogue_count = scope->epilogue_start_index; ++ } ++ } ++ out_four (c->arm64_ctx.xdata_header_value); ++ } ++ ++ bool has_phantom_prolog = is_fragmented_function && is_last_frag; ++ if (header->ext_epilogue_count && !header->e) ++ { ++ seh_arm64_emit_epilog_scopes (fragment_offset, prolog_size, ++ first_fragment_scope, ++ last_fragment_scope, ++ has_phantom_prolog); ++ if (is_fragmented_function && is_last_frag) ++ { ++ uint32_t epilog_start_offset; ++ epilog_start_offset = frag_size - prolog_insruction_count * 4; ++ md_number_to_chars (frag_more (4), ++ (1 << 22) | (epilog_start_offset >> 2), 4); ++ } ++ } ++ ++ if (header->ext_code_words) ++ seh_arm64_emit_unwind_codes (c, prolog_size, first_epilog_index, ++ last_epilog_index, has_phantom_prolog); ++ ++ if (header->x == 1) ++ { ++ if (c->handler.X_op == O_symbol) ++ c->handler.X_op = O_symbol_rva; ++ ++ emit_expr (&c->handler, 4); ++ } ++ ++ fragment_offset += frag_size; ++ if (fragment_offset == func_length) ++ break; ++ ++ fragment->next = XCNEW (seh_arm64_func_fragment); ++ fragment = fragment->next; ++ } ++} ++ + /* Write out xdata for one function. */ + + static void +@@ -1294,13 +1565,25 @@ write_function_xdata (seh_context *c) + segT save_seg = now_seg; + int save_subseg = now_subseg; + ++ seh_kind target_kind = seh_get_target_kind (); ++ + /* MIPS, SH, ARM don't have xdata. */ +- if (seh_get_target_kind () != seh_kind_x64) ++ if ((target_kind != seh_kind_x64) && (target_kind != seh_kind_arm64)) + return; + + switch_xdata (c->subsection, c->code_seg); + +- seh_x64_write_function_xdata (c); ++ switch (target_kind) ++ { ++ case seh_kind_x64: ++ seh_x64_write_function_xdata (c); ++ break; ++ case seh_kind_arm64: ++ seh_arm64_write_function_xdata (c); ++ break; ++ default: ++ break; ++ } + + subseg_set (save_seg, save_subseg); + } +@@ -1385,6 +1668,27 @@ write_function_pdata (seh_context *c) + emit_expr (&exp, 4); + break; + ++ case seh_kind_arm64: ++ if (!seh_ctx_cur->arm64_ctx.unwind_codes_byte_count) ++ break; ++ ++ seh_arm64_func_fragment *fragment = &seh_ctx_cur->arm64_ctx.func_fragment; ++ while (fragment) ++ { ++ exp.X_op = O_symbol_rva; ++ exp.X_add_number = fragment->offset; ++ exp.X_add_symbol = c->start_addr; ++ emit_expr (&exp, 4); ++ ++ exp.X_op = O_symbol_rva; ++ /* TODO: Implementing packed unwind data. */ ++ exp.X_add_number = 0; ++ exp.X_add_symbol = fragment->xdata_addr; ++ emit_expr (&exp, 4); ++ fragment = fragment->next; ++ } ++ break; ++ + case seh_kind_mips: + exp.X_op = O_symbol; + exp.X_add_number = 0; +-- +2.34.1 diff --git a/packages/binutils/2.46.0/0011-Apply-SEH-to-AArch64.patch b/packages/binutils/2.46.0/0011-Apply-SEH-to-AArch64.patch new file mode 100644 index 0000000000..47b0edf09a --- /dev/null +++ b/packages/binutils/2.46.0/0011-Apply-SEH-to-AArch64.patch @@ -0,0 +1,59 @@ +From 5555555555555555555555555555555555555555 Mon Sep 17 00:00:00 2001 +From: Evgeny Karpov +Date: Fri, 9 May 2025 13:11:00 +0200 +Subject: [PATCH v2 6/7] Apply SEH to AArch64 + +This change introduces the required commands for SEH on AArch64. + +gas/ChangeLog: + + * config/obj-coff-seh.h (defined): Use COFFAARCH64 guard. + (SEH_CMDS): New. +--- + gas/config/obj-coff-seh.h | 31 +++++++++++++++++++++++++++++++ + 1 file changed, 31 insertions(+) + +diff --git a/gas/config/obj-coff-seh.h b/gas/config/obj-coff-seh.h +index 63af8780a75..3d090c0d5ed 100644 +--- a/gas/config/obj-coff-seh.h ++++ b/gas/config/obj-coff-seh.h +@@ -113,6 +113,37 @@ typedef enum seh_arm64_unwind_types + {"seh_code", obj_coff_seh_code, 0}, \ + {"seh_handlerdata", obj_coff_seh_handlerdata, 0}, + ++#if defined (COFFAARCH64) ++#undef SEH_CMDS ++#define SEH_CMDS \ ++ {"seh_proc", obj_coff_seh_proc, 0}, \ ++ {"seh_endproc", obj_coff_seh_endproc, 0}, \ ++ {"seh_endprologue", obj_coff_seh_endprologue, 0}, \ ++ {"seh_startepilogue", obj_coff_seh_startepilogue, 0}, \ ++ {"seh_endepilogue", obj_coff_seh_endepilogue, 0}, \ ++ {"seh_stackalloc", obj_coff_seh_stackalloc, 0}, \ ++ {"seh_handler", obj_coff_seh_handler, 0}, \ ++ {"seh_handlerdata", obj_coff_seh_handlerdata, 0}, \ ++ {"seh_endfunclet", obj_coff_seh_endfunclet, 0}, \ ++ {"seh_save_reg", obj_coff_seh_save_reg, save_reg}, \ ++ {"seh_save_reg_x", obj_coff_seh_save_reg, save_reg_x}, \ ++ {"seh_save_regp", obj_coff_seh_save_reg, save_regp}, \ ++ {"seh_save_regp_x", obj_coff_seh_save_reg, save_regp_x}, \ ++ {"seh_save_lrpair", obj_coff_seh_save_reg, save_lrpair}, \ ++ {"seh_save_fregp", obj_coff_seh_save_reg, save_fregp}, \ ++ {"seh_save_fregp_x", obj_coff_seh_save_reg, save_fregp_x}, \ ++ {"seh_save_freg", obj_coff_seh_save_reg, save_freg}, \ ++ {"seh_save_freg_x", obj_coff_seh_save_reg, save_freg_x}, \ ++ {"seh_save_fplr", obj_coff_seh_save_reg, save_fplr}, \ ++ {"seh_save_fplr_x", obj_coff_seh_save_reg, save_fplr_x}, \ ++ {"seh_save_r19r20_x", obj_coff_seh_save_reg, save_r19r20_x}, \ ++ {"seh_add_fp", obj_coff_seh_save_reg, add_fp}, \ ++ {"seh_nop", obj_coff_seh_save_reg, nop}, \ ++ {"seh_pac_sign_lr", obj_coff_seh_save_reg, pac_sign_lr}, \ ++ {"seh_set_fp", obj_coff_seh_save_reg, set_fp}, \ ++ {"seh_save_next", obj_coff_seh_save_reg, save_next}, ++#endif ++ + /* Type definitions. */ + + typedef struct seh_prologue_element +-- +2.34.1 diff --git a/packages/binutils/2.46.0/0012-Fix-the-calculation-of-the-function-length.patch b/packages/binutils/2.46.0/0012-Fix-the-calculation-of-the-function-length.patch new file mode 100644 index 0000000000..6e8073d502 --- /dev/null +++ b/packages/binutils/2.46.0/0012-Fix-the-calculation-of-the-function-length.patch @@ -0,0 +1,40 @@ +From 6666666666666666666666666666666666666666 Mon Sep 17 00:00:00 2001 +From: Evgeny Karpov +Date: Fri, 9 May 2025 13:13:00 +0200 +Subject: [PATCH v2 7/7] Fix the calculation of the function length + +The patch fixes an issue when alignment is applied in the middle of +executed code, affecting the calculation of the function length. +It can be resolved by using the MAP_DATA state. + +gas/ChangeLog: + + * config/tc-aarch64.h (HANDLE_ALIGN): Update. +--- + gas/config/tc-aarch64.h | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/gas/config/tc-aarch64.h b/gas/config/tc-aarch64.h +index 3cd7be5ba34..32e3aafc545 100644 +--- a/gas/config/tc-aarch64.h ++++ b/gas/config/tc-aarch64.h +@@ -210,10 +210,16 @@ struct aarch64_frag_type + (fr_fix) plus 4 bytes to contain the repeating NOP (fr_var). */ + #define MAX_MEM_FOR_RS_ALIGN_CODE(p2align, max) (3 + 4) + ++/* Sections are assumed to start aligned. In executable section, there is no ++ MAP_DATA symbol pending. So we only align the address during ++ MAP_DATA --> MAP_INSN transition. ++ For other sections, this is not guaranteed. */ + #define md_do_align(N, FILL, LEN, MAX, LABEL) \ + if (FILL == NULL && (N) != 0 && ! need_pass_2 && subseg_text_p (now_seg)) \ + { \ +- frag_align_code (N, MAX); \ ++ enum mstate mapstate = seg_info (now_seg)->tc_segment_info_data.mapstate;\ ++ if (mapstate == MAP_DATA) \ ++ frag_align_code (N, MAX); \ + goto LABEL; \ + } + +-- +2.34.1 diff --git a/packages/binutils/2.46.0/chksum b/packages/binutils/2.46.0/chksum new file mode 100644 index 0000000000..04f5870edd --- /dev/null +++ b/packages/binutils/2.46.0/chksum @@ -0,0 +1,12 @@ +md5 binutils-2.46.0.tar.bz2 a77b618847835bb29f43853a3666c190 +sha1 binutils-2.46.0.tar.bz2 0a64618bb1d511a9ebe9eba12b54cdd9847b329d +sha256 binutils-2.46.0.tar.bz2 0f3152632a2a9ce066f20963e9bb40af7cf85b9b6c409ed892fd0676e84ecd12 +sha512 binutils-2.46.0.tar.bz2 0706f565112981eea5f6f412a928f14ffcd7afec0e289259709c5d6a41fd54d0ebe675de0580684affe20ac71b7686e235555f8f3ca20537f99330ca46491ab9 +md5 binutils-2.46.0.tar.gz f2.46.007e7260febe074568d224dc6d35 +sha1 binutils-2.46.0.tar.gz 1a5915371e906516ad6870b59aa450c96dc1d56e +sha256 binutils-2.46.0.tar.gz 8608fe44ab7de645f6ad0a898313b75338842490d609adb85c9fb2827c376af2 +sha512 binutils-2.46.0.tar.gz 30d24f7461d459dcbd04e506bb74e487a92748ed411878aacf7388a79ac5b73f968569f43385c9f12c669a5c0b0295d3083a8a4f3ab1be1bb826b3a15ec1f029 +md5 binutils-2.46.0.tar.xz 81bb6810bcd1119819dc0804956e1c92 +sha1 binutils-2.46.0.tar.xz ca9c3b9f829d4243adfec46108417cec7c6985bb +sha256 binutils-2.46.0.tar.xz d75a94f4d73e7a4086f7513e67e439e8fcdcbb726ffe63f4661744e6256b2cf2 +sha512 binutils-2.46.0.tar.xz 32f880bb4f69351f4ae54a5d00359625c6c49d8e76624fb5cffdf174c79c8d3212f66225b81c12933c6ed59604ab652560773dd92fab384b930c97a9d4e1fdf2 diff --git a/packages/linux/5.10.222/version.desc b/packages/binutils/2.46.0/version.desc similarity index 100% rename from packages/linux/5.10.222/version.desc rename to packages/binutils/2.46.0/version.desc diff --git a/packages/binutils/package.desc b/packages/binutils/package.desc index 259ce6c7f4..3ec49c63bb 100644 --- a/packages/binutils/package.desc +++ b/packages/binutils/package.desc @@ -2,6 +2,6 @@ repository='git git://sourceware.org/git/binutils-gdb.git' mirrors='$(CT_Mirrors GNU binutils) $(CT_Mirrors sourceware binutils/releases)' relevantpattern='*.*|.' origin='GNU' -milestones='2.26 2.27 2.30 2.39' +milestones='2.26 2.27 2.30 2.39 2.41 2.44 2.45 2.46.0' archive_formats='.tar.xz .tar.bz2 .tar.gz' signature_format='packed/.sig' diff --git a/packages/bison/3.8.2/chksum b/packages/bison/3.8.2/chksum new file mode 100644 index 0000000000..11c5aeb94b --- /dev/null +++ b/packages/bison/3.8.2/chksum @@ -0,0 +1,8 @@ +md5 bison-3.8.2.tar.xz c28f119f405a2304ff0a7ccdcc629713 +sha1 bison-3.8.2.tar.xz da1522a00f8c23c1abf69dbd2e99078d2a484b96 +sha256 bison-3.8.2.tar.xz 9bba0214ccf7f1079c5d59210045227bcf619519840ebfa80cd3849cff5a5bf2 +sha512 bison-3.8.2.tar.xz d4d23af6671406e97257892f90651b67f2ab95219831372be032190b7156c10a3435d457857e677445df8b2327aacccc15344acbbc3808a6f332a93cce23b444 +md5 bison-3.8.2.tar.gz 1e541a097cda9eca675d29dd2832921f +sha1 bison-3.8.2.tar.gz 8e4b861eb765a7797ea0a6257ec600b3ff5ee37d +sha256 bison-3.8.2.tar.gz 06c9e13bdf7eb24d4ceb6b59205a4f67c2c7e7213119644430fe82fbd14a0abb +sha512 bison-3.8.2.tar.gz bdf21dc063d12cc3fe742d3716cf44c3ddc642e1b236825460f6b9a74c4412b891cd9b8f7e139b02e7897176cd0be202bf4838179c355d89fdfb128cf3649971 diff --git a/packages/linux/5.15.163/version.desc b/packages/bison/3.8.2/version.desc similarity index 100% rename from packages/linux/5.15.163/version.desc rename to packages/bison/3.8.2/version.desc diff --git a/packages/cloog/0.18.1/chksum b/packages/cloog/0.18.1/chksum new file mode 100644 index 0000000000..8c4fa5afb2 --- /dev/null +++ b/packages/cloog/0.18.1/chksum @@ -0,0 +1,4 @@ +md5 cloog-0.18.1.tar.gz e34fca0540d840e5d0f6427e98c92252 +sha1 cloog-0.18.1.tar.gz 2dc70313e8e2c6610b856d627bce9c9c3f848077 +sha256 cloog-0.18.1.tar.gz 02500a4edd14875f94fe84cbeda4290425cb0c1c2474c6f75d75a303d64b4196 +sha512 cloog-0.18.1.tar.gz 0b12d9f3c39a2425e28e1d7c0a2b3787287fe3e6e3052f094d2ab6cffeb205ce19044100cbfd805659b3e6b3d21ac2f5a3c92848f476de54edfe6b1cbd2172e9 diff --git a/packages/gnuprumcu/0.5.0/version.desc b/packages/cloog/0.18.1/version.desc similarity index 100% rename from packages/gnuprumcu/0.5.0/version.desc rename to packages/cloog/0.18.1/version.desc diff --git a/packages/dtc/1.4.7/version.desc b/packages/dtc/1.4.7/version.desc index e69de29bb2..fcfe38915a 100644 --- a/packages/dtc/1.4.7/version.desc +++ b/packages/dtc/1.4.7/version.desc @@ -0,0 +1 @@ +obsolete='yes' diff --git a/packages/dtc/1.5.1/version.desc b/packages/dtc/1.5.1/version.desc index e69de29bb2..fcfe38915a 100644 --- a/packages/dtc/1.5.1/version.desc +++ b/packages/dtc/1.5.1/version.desc @@ -0,0 +1 @@ +obsolete='yes' diff --git a/packages/dtc/1.6.1/version.desc b/packages/dtc/1.6.1/version.desc index e69de29bb2..fcfe38915a 100644 --- a/packages/dtc/1.6.1/version.desc +++ b/packages/dtc/1.6.1/version.desc @@ -0,0 +1 @@ +obsolete='yes' diff --git a/packages/dtc/1.7.2/chksum b/packages/dtc/1.7.2/chksum new file mode 100644 index 0000000000..9b369ff18e --- /dev/null +++ b/packages/dtc/1.7.2/chksum @@ -0,0 +1,8 @@ +md5 dtc-1.7.2.tar.xz 0f193be84172556027da22d4fe3464e0 +sha1 dtc-1.7.2.tar.xz 531ef5c31a080d7fd25955a75a29c56f0e0f9f97 +sha256 dtc-1.7.2.tar.xz 92d8ca769805ae1f176204230438fe52808f4e1c7944053c9eec0e649b237539 +sha512 dtc-1.7.2.tar.xz 30f3611175a5c29556282f3f2894701a5837eb869608d89d78c280af448bbc3a5b6c83f51c28f991847c0eb7c42aa57599bbc31433f1b3b2c8d162cb2169b91f +md5 dtc-1.7.2.tar.gz 81a06ba696bd91d55b4531cdc0b09dc6 +sha1 dtc-1.7.2.tar.gz 8a4e9432aec9d81a48a57f6afd685f9cfb5f0bea +sha256 dtc-1.7.2.tar.gz f200e5ebd7afd20d4b3804a3085af0870fcf3c194f8d7f0f6985cf8bbb4ac0f4 +sha512 dtc-1.7.2.tar.gz 87c9a8d99bc275a5ff155d58ac1206749ff5be4a0874e8a66b4d4509f92e746a55e9d4ae04be9745be61c35d172786a5d5ef6613931bac201280a253b22c041a diff --git a/packages/linux/5.4.280/version.desc b/packages/dtc/1.7.2/version.desc similarity index 100% rename from packages/linux/5.4.280/version.desc rename to packages/dtc/1.7.2/version.desc diff --git a/packages/expat/2.5.0/chksum b/packages/expat/2.5.0/chksum index e81826d7fe..d485ea74c0 100644 --- a/packages/expat/2.5.0/chksum +++ b/packages/expat/2.5.0/chksum @@ -14,4 +14,3 @@ md5 expat-2.5.0.tar.gz 686e9d986f85966c7924dfc041cdc15e sha1 expat-2.5.0.tar.gz 061c1232188dff35e44aa7137aec7757d3d90d27 sha256 expat-2.5.0.tar.gz 6b902ab103843592be5e99504f846ec109c1abb692e85347587f237a4ffa1033 sha512 expat-2.5.0.tar.gz f1ff7da5fafb47dcd6e0f0d892826aba6de76509c8497bc00382f1109ab8e2a93d396943dbb52216457044993a39d73728048adf650d8e83e28189edc7b78402 - diff --git a/packages/expat/2.6.4/chksum b/packages/expat/2.6.4/chksum new file mode 100644 index 0000000000..5a4aa3cfa2 --- /dev/null +++ b/packages/expat/2.6.4/chksum @@ -0,0 +1,16 @@ +md5 expat-2.6.4.tar.xz 101fe3e320a2800f36af8cf4045b45c7 +sha1 expat-2.6.4.tar.xz 97d653e8f5a30dfdec7d6e525151efeac7890942 +sha256 expat-2.6.4.tar.xz a695629dae047055b37d50a0ff4776d1d45d0a4c842cf4ccee158441f55ff7ee +sha512 expat-2.6.4.tar.xz 620da34d98524478b445038bf1dd439790fe11169496516425fca922226797835c27549fc5fb825792b516563b24eb922d9ad8f27d20a0229e7ee8cd640dfb25 +md5 expat-2.6.4.tar.lz b39fd697eedc931fa8dd5a2cce866234 +sha1 expat-2.6.4.tar.lz 883349d398cd35e2c5c258984ab25780be138bc5 +sha256 expat-2.6.4.tar.lz 80a5bec283c7cababb3c6ec145feb4f34a7741eae69f9e6654cc82f5890f05e2 +sha512 expat-2.6.4.tar.lz 6790db69fe3de70f5422306aec9092cf9ca0aea1ab28874604c6dfa36e048024f034b1e5fc3afca2623b41856b2b52d3582ab1a384bc93e2e13553359d6b49a7 +md5 expat-2.6.4.tar.bz2 f1acfb75967648230d37629e02afbadc +sha1 expat-2.6.4.tar.bz2 93082742ac825a8d399ab8f94c41d9f246c6d8bc +sha256 expat-2.6.4.tar.bz2 8dc480b796163d4436e6f1352e71800a774f73dbae213f1860b60607d2a83ada +sha512 expat-2.6.4.tar.bz2 cd21a5cfafe15b747e6e8964e35eed52a446373811d02bc3730b3e616ccd066f07e4cdbd48f445d6fddfb931841b28072016248b19a8add9cf087cbf83ba18da +md5 expat-2.6.4.tar.gz 943af565caffb46dca104c6b946dacaf +sha1 expat-2.6.4.tar.gz 963c5d99c2f206367bbc504d3b8dc74a51300c02 +sha256 expat-2.6.4.tar.gz fd03b7172b3bd7427a3e7a812063f74754f24542429b634e0db6511b53fb2278 +sha512 expat-2.6.4.tar.gz b6dd72dd7b691bd1d619c4a2d0a08357e47d7fab9839a43d456cb6b804508124889fc923e9ba2388872d4e7602e4b0a902bdc92d31bdbda81555be27bcc557e1 diff --git a/packages/linux/6.1.100/version.desc b/packages/expat/2.6.4/version.desc similarity index 100% rename from packages/linux/6.1.100/version.desc rename to packages/expat/2.6.4/version.desc diff --git a/packages/expat/2.7.1/chksum b/packages/expat/2.7.1/chksum new file mode 100644 index 0000000000..c7e1aa59dd --- /dev/null +++ b/packages/expat/2.7.1/chksum @@ -0,0 +1,16 @@ +md5 expat-2.7.1.tar.xz 9f0c266ff4b9720beae0c6bd53ae4469 +sha1 expat-2.7.1.tar.xz 4a6170d6b2abf6dc1ca665aa1b6285768f00c2d4 +sha256 expat-2.7.1.tar.xz 354552544b8f99012e5062f7d570ec77f14b412a3ff5c7d8d0dae62c0d217c30 +sha512 expat-2.7.1.tar.xz 4c9a6c1c1769d2c4404da083dd3013dbc73883da50e2b7353db2349a420e9b6d27cac7dbcb645991d6c7cdbf79bd88486fc1ac353084ce48e61081fb56e13d46 +md5 expat-2.7.1.tar.lz 5299a3fcb2a7877d840526ab1493ba4a +sha1 expat-2.7.1.tar.lz dff036b5ab6873a9dcd0ee7fbe3b9bc507908b5c +sha256 expat-2.7.1.tar.lz baacdd8d98d5d3b753f2a2780d84b0bc7731be11cacdc1b98cb8ad73f0504e68 +sha512 expat-2.7.1.tar.lz f82efd9c05168d68598301bf5e841d96d4cd6a8218ab73fe9f8295b0ecb73567fea45a67ec93a5cb57d84e9328d78b06bc2c1e42d97ba70415f207e9dbd913db +md5 expat-2.7.1.tar.bz2 e01e02f2a7012f76bdb44b08415097be +sha1 expat-2.7.1.tar.bz2 8a91a899f3f6650a246d56152d1677df0b19992e +sha256 expat-2.7.1.tar.bz2 45c98ae1e9b5127325d25186cf8c511fa814078e9efeae7987a574b482b79b3d +sha512 expat-2.7.1.tar.bz2 ea78781ca03367a014afc1bb37c2306883b6f666d7cd90dc84a39c4abc6b7ec261636b8668540aa286c708a41dd02baae8249dc4391306da56431700460a0f23 +md5 expat-2.7.1.tar.gz 7dffeee9daf061217fb123b83414a736 +sha1 expat-2.7.1.tar.gz d03e5df29d98ecc652efbe8bd836df1e15fc0d5e +sha256 expat-2.7.1.tar.gz 0cce2e6e69b327fc607b8ff264f4b66bdf71ead55a87ffd5f3143f535f15cfa2 +sha512 expat-2.7.1.tar.gz 1b6b94f3253ac3ab3f8c69d1c852db2334c99cb7990b9656f5f2458198d1eb854e79cce0e39151aef0d5e01a740fc965651c6a57fda585f9a24c543f2693f78c diff --git a/packages/linux/6.10/version.desc b/packages/expat/2.7.1/version.desc similarity index 100% rename from packages/linux/6.10/version.desc rename to packages/expat/2.7.1/version.desc diff --git a/packages/expat/package.desc b/packages/expat/package.desc index 84dba8ff3c..4b7026b412 100644 --- a/packages/expat/package.desc +++ b/packages/expat/package.desc @@ -1,6 +1,6 @@ repository='git https://github.com/libexpat/libexpat.git' repository_subdir='expat' -bootstrap='./buildconf.sh && make -C doc all' +bootstrap='./buildconf.sh' mirrors='http://downloads.sourceforge.net/project/expat/expat/${CT_EXPAT_VERSION} https://github.com/libexpat/libexpat/releases/download/R_${CT_EXPAT_VERSION//./_}' archive_formats='.tar.xz .tar.lz .tar.bz2 .tar.gz' relevantpattern='*.*|.' diff --git a/packages/gcc/12.4.0/chksum b/packages/gcc/12.4.0/chksum deleted file mode 100644 index 228b42d4a7..0000000000 --- a/packages/gcc/12.4.0/chksum +++ /dev/null @@ -1,8 +0,0 @@ -md5 gcc-12.4.0.tar.xz fd7779aee878db67456575922281fa71 -sha1 gcc-12.4.0.tar.xz b373d4ac29bb06ca64d288621906cbf63ab5a1f5 -sha256 gcc-12.4.0.tar.xz 704f652604ccbccb14bdabf3478c9511c89788b12cb3bbffded37341916a9175 -sha512 gcc-12.4.0.tar.xz 5bd29402cad2deb5d9388d0236c7146414d77e5b8d5f1c6c941c7a1f47691c3389f08656d5f6e8e2d6717bf2c81f018d326f632fb468f42925b40bd217fc4853 -md5 gcc-12.4.0.tar.gz 2c34e2879ee25358417dc53ed8896d9a -sha1 gcc-12.4.0.tar.gz 02f5483b3114a1704943e832dff95a512f3e6ae7 -sha256 gcc-12.4.0.tar.gz 5a30de2be740062bb3ddd3fd13c9b1bb4584d8f85616d33f23a713439d714148 -sha512 gcc-12.4.0.tar.gz 13b2054a761b96d1d9b448999ea9978027deb54c5ea21af5344997efc74ca7da2df6fea462e4513c8307c672a35a74a1354de46e23d4005c60b9d50c8e5a89c8 diff --git a/packages/gcc/12.4.0/0000-libtool-leave-framework-alone.patch b/packages/gcc/12.5.0/0000-libtool-leave-framework-alone.patch similarity index 100% rename from packages/gcc/12.4.0/0000-libtool-leave-framework-alone.patch rename to packages/gcc/12.5.0/0000-libtool-leave-framework-alone.patch diff --git a/packages/gcc/12.4.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch b/packages/gcc/12.5.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch similarity index 100% rename from packages/gcc/12.4.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch rename to packages/gcc/12.5.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch diff --git a/packages/gcc/12.4.0/0002-arm-softfloat-libgcc.patch b/packages/gcc/12.5.0/0002-arm-softfloat-libgcc.patch similarity index 100% rename from packages/gcc/12.4.0/0002-arm-softfloat-libgcc.patch rename to packages/gcc/12.5.0/0002-arm-softfloat-libgcc.patch diff --git a/packages/gcc/12.4.0/0003-libgcc-disable-split-stack-nothreads.patch b/packages/gcc/12.5.0/0003-libgcc-disable-split-stack-nothreads.patch similarity index 100% rename from packages/gcc/12.4.0/0003-libgcc-disable-split-stack-nothreads.patch rename to packages/gcc/12.5.0/0003-libgcc-disable-split-stack-nothreads.patch diff --git a/packages/gcc/12.4.0/0004-Remove-use-of-include_next-from-c-headers.patch b/packages/gcc/12.5.0/0004-Remove-use-of-include_next-from-c-headers.patch similarity index 100% rename from packages/gcc/12.4.0/0004-Remove-use-of-include_next-from-c-headers.patch rename to packages/gcc/12.5.0/0004-Remove-use-of-include_next-from-c-headers.patch diff --git a/packages/gcc/12.4.0/0005-Allow-default-libc-to-be-specified-to-configure.patch b/packages/gcc/12.5.0/0005-Allow-default-libc-to-be-specified-to-configure.patch similarity index 100% rename from packages/gcc/12.4.0/0005-Allow-default-libc-to-be-specified-to-configure.patch rename to packages/gcc/12.5.0/0005-Allow-default-libc-to-be-specified-to-configure.patch diff --git a/packages/gcc/12.4.0/0006-driver-Extend-getenv-function-to-allow-default-value.patch b/packages/gcc/12.5.0/0006-driver-Extend-getenv-function-to-allow-default-value.patch similarity index 100% rename from packages/gcc/12.4.0/0006-driver-Extend-getenv-function-to-allow-default-value.patch rename to packages/gcc/12.5.0/0006-driver-Extend-getenv-function-to-allow-default-value.patch diff --git a/packages/gcc/12.4.0/0007-Add-newlib-and-picolibc-as-default-C-library-choices.patch b/packages/gcc/12.5.0/0007-Add-newlib-and-picolibc-as-default-C-library-choices.patch similarity index 100% rename from packages/gcc/12.4.0/0007-Add-newlib-and-picolibc-as-default-C-library-choices.patch rename to packages/gcc/12.5.0/0007-Add-newlib-and-picolibc-as-default-C-library-choices.patch diff --git a/packages/gcc/12.4.0/0008-Support-picolibc-targets.patch b/packages/gcc/12.5.0/0008-Support-picolibc-targets.patch similarity index 100% rename from packages/gcc/12.4.0/0008-Support-picolibc-targets.patch rename to packages/gcc/12.5.0/0008-Support-picolibc-targets.patch diff --git a/packages/gcc/12.4.0/0009-gcc-Allow-g-to-work-differently-from-gcc.patch b/packages/gcc/12.5.0/0009-gcc-Allow-g-to-work-differently-from-gcc.patch similarity index 100% rename from packages/gcc/12.4.0/0009-gcc-Allow-g-to-work-differently-from-gcc.patch rename to packages/gcc/12.5.0/0009-gcc-Allow-g-to-work-differently-from-gcc.patch diff --git a/packages/gcc/12.4.0/0010-Remove-crypt-and-crypt_r-interceptors.patch b/packages/gcc/12.5.0/0010-Remove-crypt-and-crypt_r-interceptors.patch similarity index 100% rename from packages/gcc/12.4.0/0010-Remove-crypt-and-crypt_r-interceptors.patch rename to packages/gcc/12.5.0/0010-Remove-crypt-and-crypt_r-interceptors.patch diff --git a/packages/gcc/12.5.0/0011-always-define-win32-lean-and-mean-before-windows-h.patch b/packages/gcc/12.5.0/0011-always-define-win32-lean-and-mean-before-windows-h.patch new file mode 100644 index 0000000000..688ad8fee9 --- /dev/null +++ b/packages/gcc/12.5.0/0011-always-define-win32-lean-and-mean-before-windows-h.patch @@ -0,0 +1,379 @@ +Original patch for GCC 13 by LIU Hao + +Recently, mingw-w64 has got updated from Wine which is included +indirectly by if `WIN32_LEAN_AND_MEAN` is not defined. The +`IXMLDOMDocument` class has a member function named `abort()`, which gets +affected by our `abort()` macro in "system.h". + +`WIN32_LEAN_AND_MEAN` should, nevertheless, always be defined. This +can exclude 'APIs such as Cryptography, DDE, RPC, Shell, and Windows +Sockets' [1], and speed up compilation of these files a bit. + +[1] https://learn.microsoft.com/en-us/windows/win32/winprog/using-the-windows-headers + +--- a/gcc/ada/adaint.c ++++ b/gcc/ada/adaint.c +@@ -227,6 +227,7 @@ UINT __gnat_current_ccs_encoding; + + #elif defined (_WIN32) + ++#define WIN32_LEAN_AND_MEAN + #include + #include + #include +--- a/gcc/ada/cio.c ++++ b/gcc/ada/cio.c +@@ -67,6 +67,7 @@ extern "C" { + #endif + + #ifdef RTX ++#define WIN32_LEAN_AND_MEAN + #include + #include + #endif +--- a/gcc/ada/ctrl_c.c ++++ b/gcc/ada/ctrl_c.c +@@ -126,6 +126,7 @@ __gnat_uninstall_int_handler (void) + + #elif defined (__MINGW32__) + ++#define WIN32_LEAN_AND_MEAN + #include "mingw32.h" + #include + +--- a/gcc/ada/expect.c ++++ b/gcc/ada/expect.c +@@ -71,6 +71,7 @@ + + #ifdef _WIN32 + ++#define WIN32_LEAN_AND_MEAN + #include + #include + #include +--- a/gcc/ada/gsocket.h ++++ b/gcc/ada/gsocket.h +@@ -167,6 +167,7 @@ + + #endif + ++#define WIN32_LEAN_AND_MEAN + #include + + #elif defined(VMS) +--- a/gcc/ada/mingw32.h ++++ b/gcc/ada/mingw32.h +@@ -53,6 +53,7 @@ + #define _X86INTRIN_H_INCLUDED + #define _EMMINTRIN_H_INCLUDED + #endif ++#define WIN32_LEAN_AND_MEAN + #include + + /* After including this file it is possible to use the character t as prefix +--- a/gcc/ada/mkdir.c ++++ b/gcc/ada/mkdir.c +@@ -43,6 +43,7 @@ + #endif + + #ifdef __MINGW32__ ++#define WIN32_LEAN_AND_MEAN + #include "mingw32.h" + #include + #ifdef MAXPATHLEN +--- a/gcc/ada/rtfinal.c ++++ b/gcc/ada/rtfinal.c +@@ -46,6 +46,7 @@ extern int __gnat_rt_init_count; + /* see initialize.c */ + + #if defined (__MINGW32__) ++#define WIN32_LEAN_AND_MEAN + #include "mingw32.h" + #include + +--- a/gcc/ada/rtinit.c ++++ b/gcc/ada/rtinit.c +@@ -70,6 +70,7 @@ int __gnat_rt_init_count = 0; + and finalize properly the run-time. */ + + #if defined (__MINGW32__) ++#define WIN32_LEAN_AND_MEAN + #include "mingw32.h" + #include + +--- a/gcc/ada/seh_init.c ++++ b/gcc/ada/seh_init.c +@@ -34,6 +34,7 @@ + + #if defined (_WIN32) || (defined (__CYGWIN__) && defined (__SEH__)) + /* Include system headers, before system.h poisons malloc. */ ++#define WIN32_LEAN_AND_MEAN + #include + #include + #endif +--- a/gcc/ada/sysdep.c ++++ b/gcc/ada/sysdep.c +@@ -217,6 +217,7 @@ __gnat_ttyname (int filedes) + #endif /* __CYGWIN__ */ + + #if defined (__CYGWIN__) || defined (__MINGW32__) ++#define WIN32_LEAN_AND_MEAN + #include + + int __gnat_is_windows_xp (void); +@@ -589,6 +590,7 @@ getc_immediate_common (FILE *stream, + Ada programs. */ + + #ifdef WINNT ++#define WIN32_LEAN_AND_MEAN + #include + + /* Provide functions to echo the values passed to WinMain (windows bindings +--- a/gcc/ada/terminals.c ++++ b/gcc/ada/terminals.c +@@ -151,6 +151,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED, + #include + #include + ++#define WIN32_LEAN_AND_MEAN + #include + #include + #include +--- a/gcc/ada/tracebak.c ++++ b/gcc/ada/tracebak.c +@@ -93,6 +93,7 @@ extern void (*Unlock_Task) (void); + + #if defined (_WIN64) && defined (__SEH__) + ++#define WIN32_LEAN_AND_MEAN + #include + + #define IS_BAD_PTR(ptr) (IsBadCodePtr((FARPROC)ptr)) +@@ -455,6 +456,7 @@ struct layout + #elif defined (__i386__) || defined (__x86_64__) + + #if defined (__WIN32) ++#define WIN32_LEAN_AND_MEAN + #include + #define IS_BAD_PTR(ptr) (IsBadCodePtr((FARPROC)ptr)) + #elif defined (__sun__) +--- a/gcc/diagnostic-color.cc ++++ b/gcc/diagnostic-color.cc +@@ -22,6 +22,7 @@ + #include "diagnostic-url.h" + + #ifdef __MINGW32__ ++# define WIN32_LEAN_AND_MEAN + # include + #endif + +--- a/gcc/jit/jit-w32.h ++++ b/gcc/jit/jit-w32.h +@@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see + + #include "config.h" + ++#define WIN32_LEAN_AND_MEAN + #include + + namespace gcc { +--- a/gcc/plugin.cc ++++ b/gcc/plugin.cc +@@ -41,6 +41,7 @@ along with GCC; see the file COPYING3. If not see + #ifndef NOMINMAX + #define NOMINMAX + #endif ++#define WIN32_LEAN_AND_MEAN + #include + #endif + +--- a/gcc/prefix.cc ++++ b/gcc/prefix.cc +@@ -67,6 +67,7 @@ License along with GCC; see the file COPYING3. If not see + #include "system.h" + #include "coretypes.h" + #if defined(_WIN32) && defined(ENABLE_WIN32_REGISTRY) ++#define WIN32_LEAN_AND_MEAN + #include + #endif + #include "prefix.h" +--- a/libatomic/config/mingw/lock.c ++++ b/libatomic/config/mingw/lock.c +@@ -23,6 +23,7 @@ + . */ + + #define UWORD __shadow_UWORD ++#define WIN32_LEAN_AND_MEAN + #include + #undef UWORD + #include "libatomic_i.h" +--- a/libffi/src/aarch64/ffi.c ++++ b/libffi/src/aarch64/ffi.c +@@ -28,6 +28,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + #include + #include "internal.h" + #ifdef _WIN32 ++#define WIN32_LEAN_AND_MEAN + #include /* FlushInstructionCache */ + #endif + #include +--- a/libgcc/config/i386/enable-execute-stack-mingw32.c ++++ b/libgcc/config/i386/enable-execute-stack-mingw32.c +@@ -22,6 +22,7 @@ + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + ++#define WIN32_LEAN_AND_MEAN + #include + + extern void __enable_execute_stack (void *); +--- a/libgcc/libgcc2.c ++++ b/libgcc/libgcc2.c +@@ -2273,6 +2273,7 @@ __clear_cache (void *beg __attribute__((__unused__)), + /* Jump to a trampoline, loading the static chain address. */ + + #if defined(WINNT) && ! defined(__CYGWIN__) ++#define WIN32_LEAN_AND_MEAN + #include + int getpagesize (void); + int mprotect (char *,int, int); +--- a/libgcc/unwind-generic.h ++++ b/libgcc/unwind-generic.h +@@ -30,6 +30,7 @@ + + #if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__) + /* Only for _GCC_specific_handler. */ ++#define WIN32_LEAN_AND_MEAN + #include + #endif + +--- a/libgfortran/intrinsics/sleep.c ++++ b/libgfortran/intrinsics/sleep.c +@@ -30,6 +30,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #endif + + #ifdef __MINGW32__ ++# define WIN32_LEAN_AND_MEAN + # include + # undef sleep + # define sleep(x) Sleep(1000*(x)) +--- a/libgo/misc/cgo/test/callback_c.c ++++ b/libgo/misc/cgo/test/callback_c.c +@@ -32,6 +32,7 @@ IntoC(void) + } + + #ifdef WIN32 ++#define WIN32_LEAN_AND_MEAN + #include + long long + mysleep(int seconds) { +--- a/libgomp/config/mingw32/proc.c ++++ b/libgomp/config/mingw32/proc.c +@@ -30,6 +30,7 @@ + The following implementation uses win32 API routines. */ + + #include "libgomp.h" ++#define WIN32_LEAN_AND_MEAN + #include + + /* Count the CPU's currently available to this process. */ +--- a/libiberty/make-temp-file.c ++++ b/libiberty/make-temp-file.c +@@ -37,6 +37,7 @@ Boston, MA 02110-1301, USA. */ + #include /* May get R_OK, etc. on some systems. */ + #endif + #if defined(_WIN32) && !defined(__CYGWIN__) ++#define WIN32_LEAN_AND_MEAN + #include + #endif + #if HAVE_SYS_STAT_H +--- a/libiberty/pex-win32.c ++++ b/libiberty/pex-win32.c +@@ -20,6 +20,7 @@ Boston, MA 02110-1301, USA. */ + + #include "pex-common.h" + ++#define WIN32_LEAN_AND_MEAN + #include + + #ifdef HAVE_STDLIB_H +--- a/libssp/ssp.c ++++ b/libssp/ssp.c +@@ -55,6 +55,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + /* Native win32 apps don't know about /dev/tty but can print directly + to the console using "CONOUT$" */ + #if defined (_WIN32) && !defined (__CYGWIN__) ++#define WIN32_LEAN_AND_MEAN + #include + #include + # define _PATH_TTY "CONOUT$" +--- a/libstdc++-v3/src/c++11/system_error.cc ++++ b/libstdc++-v3/src/c++11/system_error.cc +@@ -33,6 +33,7 @@ + #undef __sso_string + + #if defined(_WIN32) && !defined(__CYGWIN__) ++#define WIN32_LEAN_AND_MEAN + #include + #include + #endif +--- a/libstdc++-v3/src/c++11/thread.cc ++++ b/libstdc++-v3/src/c++11/thread.cc +@@ -34,6 +34,7 @@ + # ifdef _GLIBCXX_HAVE_SLEEP + # include + # elif defined(_GLIBCXX_HAVE_WIN32_SLEEP) ++# define WIN32_LEAN_AND_MEAN + # include + # elif defined _GLIBCXX_NO_SLEEP && defined _GLIBCXX_HAS_GTHREADS + // We expect to be able to sleep for targets that support multiple threads: +--- a/libstdc++-v3/src/c++17/fs_ops.cc ++++ b/libstdc++-v3/src/c++17/fs_ops.cc +@@ -54,6 +54,7 @@ + # include // utime + #endif + #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++# define WIN32_LEAN_AND_MEAN + # include + #endif + +--- a/libstdc++-v3/src/filesystem/ops.cc ++++ b/libstdc++-v3/src/filesystem/ops.cc +@@ -55,6 +55,7 @@ + # include // utime + #endif + #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++# define WIN32_LEAN_AND_MEAN + # include + #endif + +--- a/libvtv/vtv_malloc.cc ++++ b/libvtv/vtv_malloc.cc +@@ -33,6 +33,7 @@ + #include + #include + #if defined (__CYGWIN__) || defined (__MINGW32__) ++#define WIN32_LEAN_AND_MEAN + #include + #else + #include +--- a/libvtv/vtv_rts.cc ++++ b/libvtv/vtv_rts.cc +@@ -121,6 +121,7 @@ + #include + #include + #if defined (__CYGWIN__) || defined (__MINGW32__) ++#define WIN32_LEAN_AND_MEAN + #include + #include + #include +--- a/libvtv/vtv_utils.cc ++++ b/libvtv/vtv_utils.cc +@@ -33,6 +33,7 @@ + #include + #include + #if defined (__CYGWIN__) || defined (__MINGW32__) ++#define WIN32_LEAN_AND_MEAN + #include + #else + #include diff --git a/packages/gcc/12.5.0/chksum b/packages/gcc/12.5.0/chksum new file mode 100644 index 0000000000..f9b85c5004 --- /dev/null +++ b/packages/gcc/12.5.0/chksum @@ -0,0 +1,8 @@ +md5 gcc-12.5.0.tar.xz 605d4923d9daabcd8c8c22d844af57e5 +sha1 gcc-12.5.0.tar.xz a045ea36603aaea19b1b0994e22a87600dd93bd0 +sha256 gcc-12.5.0.tar.xz 71cd373d0f04615e66c5b5b14d49c1a4c1a08efa7b30625cd240b11bab4062b3 +sha512 gcc-12.5.0.tar.xz c76020e4c844b53485502cb8a4e295221c9d37487d66c9f4559031fb14c85de20602e6387310005386cb0ef25e55067d2cfef141423bb445f3b77e7456a23533 +md5 gcc-12.5.0.tar.gz 5bead3e14af6d18a1f925e888a74efba +sha1 gcc-12.5.0.tar.gz 8ddf92c626dac1a3ebc60bc7750a510e51680d0a +sha256 gcc-12.5.0.tar.gz f2dfac9c026c58b04251732aa459db614ae1017d32a18a296b1ae5af3dcad927 +sha512 gcc-12.5.0.tar.gz d95040f3ac5004158ccea0b28569b933a2b36c7dc003aebbadab07712039c63b753f99c44ae0c3fc7be079332067e0ccb6b378d27e2a3ded7b584b373de61bda diff --git a/packages/gcc/12.4.0/experimental/0001-picolibc-Add-custom-spec-file-fragments-for-using-pi.patch b/packages/gcc/12.5.0/experimental/0001-picolibc-Add-custom-spec-file-fragments-for-using-pi.patch similarity index 100% rename from packages/gcc/12.4.0/experimental/0001-picolibc-Add-custom-spec-file-fragments-for-using-pi.patch rename to packages/gcc/12.5.0/experimental/0001-picolibc-Add-custom-spec-file-fragments-for-using-pi.patch diff --git a/packages/linux/6.2.12/version.desc b/packages/gcc/12.5.0/version.desc similarity index 100% rename from packages/linux/6.2.12/version.desc rename to packages/gcc/12.5.0/version.desc diff --git a/packages/gcc/13.3.0/chksum b/packages/gcc/13.3.0/chksum deleted file mode 100644 index edfec5ca29..0000000000 --- a/packages/gcc/13.3.0/chksum +++ /dev/null @@ -1,8 +0,0 @@ -md5 gcc-13.3.0.tar.xz 726726a73eaaacad4259fe5d7e978020 -sha1 gcc-13.3.0.tar.xz 6501872415823c95d48be28853ce3ebd6c1040c4 -sha256 gcc-13.3.0.tar.xz 0845e9621c9543a13f484e94584a49ffc0129970e9914624235fc1d061a0c083 -sha512 gcc-13.3.0.tar.xz ed5f2f4c6ed2c796fcf2c93707159e9dbd3ddb1ba063d549804dd68cdabbb6d550985ae1c8465ae9a336cfe29274a6eb0f42e21924360574ebd8e5d5c7c9a801 -md5 gcc-13.3.0.tar.gz f6e5402827861cd5397b3947bc7b8ff2 -sha1 gcc-13.3.0.tar.gz 19ae2771e6bc4b803576cc0250d214a67cc7617d -sha256 gcc-13.3.0.tar.gz 3a2b10cab86e32358fdac871546d57e2700e9bdb5875ef33fff5b601265b9e32 -sha512 gcc-13.3.0.tar.gz a2973a57b028ae20920f00402c15a36e7a37f86c8d26f8ba1947fe2fb6ed06c474dea06cccb178a2b9144103ca213e32b5f263735139f5c67e27254959e76bdb diff --git a/packages/gcc/13.3.0/0000-libtool-leave-framework-alone.patch b/packages/gcc/13.4.0/0000-libtool-leave-framework-alone.patch similarity index 100% rename from packages/gcc/13.3.0/0000-libtool-leave-framework-alone.patch rename to packages/gcc/13.4.0/0000-libtool-leave-framework-alone.patch diff --git a/packages/gcc/13.3.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch b/packages/gcc/13.4.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch similarity index 100% rename from packages/gcc/13.3.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch rename to packages/gcc/13.4.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch diff --git a/packages/gcc/13.3.0/0002-arm-softfloat-libgcc.patch b/packages/gcc/13.4.0/0002-arm-softfloat-libgcc.patch similarity index 100% rename from packages/gcc/13.3.0/0002-arm-softfloat-libgcc.patch rename to packages/gcc/13.4.0/0002-arm-softfloat-libgcc.patch diff --git a/packages/gcc/13.3.0/0003-libgcc-disable-split-stack-nothreads.patch b/packages/gcc/13.4.0/0003-libgcc-disable-split-stack-nothreads.patch similarity index 100% rename from packages/gcc/13.3.0/0003-libgcc-disable-split-stack-nothreads.patch rename to packages/gcc/13.4.0/0003-libgcc-disable-split-stack-nothreads.patch diff --git a/packages/gcc/13.3.0/0004-Remove-use-of-include_next-from-c-headers.patch b/packages/gcc/13.4.0/0004-Remove-use-of-include_next-from-c-headers.patch similarity index 100% rename from packages/gcc/13.3.0/0004-Remove-use-of-include_next-from-c-headers.patch rename to packages/gcc/13.4.0/0004-Remove-use-of-include_next-from-c-headers.patch diff --git a/packages/gcc/13.3.0/0005-Allow-default-libc-to-be-specified-to-configure.patch b/packages/gcc/13.4.0/0005-Allow-default-libc-to-be-specified-to-configure.patch similarity index 100% rename from packages/gcc/13.3.0/0005-Allow-default-libc-to-be-specified-to-configure.patch rename to packages/gcc/13.4.0/0005-Allow-default-libc-to-be-specified-to-configure.patch diff --git a/packages/gcc/13.3.0/0006-driver-Extend-getenv-function-to-allow-default-value.patch b/packages/gcc/13.4.0/0006-driver-Extend-getenv-function-to-allow-default-value.patch similarity index 100% rename from packages/gcc/13.3.0/0006-driver-Extend-getenv-function-to-allow-default-value.patch rename to packages/gcc/13.4.0/0006-driver-Extend-getenv-function-to-allow-default-value.patch diff --git a/packages/gcc/13.3.0/0007-Add-newlib-and-picolibc-as-default-C-library-choices.patch b/packages/gcc/13.4.0/0007-Add-newlib-and-picolibc-as-default-C-library-choices.patch similarity index 100% rename from packages/gcc/13.3.0/0007-Add-newlib-and-picolibc-as-default-C-library-choices.patch rename to packages/gcc/13.4.0/0007-Add-newlib-and-picolibc-as-default-C-library-choices.patch diff --git a/packages/gcc/13.3.0/0008-Support-picolibc-targets.patch b/packages/gcc/13.4.0/0008-Support-picolibc-targets.patch similarity index 100% rename from packages/gcc/13.3.0/0008-Support-picolibc-targets.patch rename to packages/gcc/13.4.0/0008-Support-picolibc-targets.patch diff --git a/packages/gcc/13.3.0/0009-gcc-Allow-g-to-work-differently-from-gcc.patch b/packages/gcc/13.4.0/0009-gcc-Allow-g-to-work-differently-from-gcc.patch similarity index 100% rename from packages/gcc/13.3.0/0009-gcc-Allow-g-to-work-differently-from-gcc.patch rename to packages/gcc/13.4.0/0009-gcc-Allow-g-to-work-differently-from-gcc.patch diff --git a/packages/gcc/13.3.0/0010-RISC-V-fix-build-issue-with-gcc-4.9.x.patch b/packages/gcc/13.4.0/0010-RISC-V-fix-build-issue-with-gcc-4.9.x.patch similarity index 100% rename from packages/gcc/13.3.0/0010-RISC-V-fix-build-issue-with-gcc-4.9.x.patch rename to packages/gcc/13.4.0/0010-RISC-V-fix-build-issue-with-gcc-4.9.x.patch diff --git a/packages/gcc/13.3.0/0011-Remove-crypt-and-crypt_r-interceptors.patch b/packages/gcc/13.4.0/0011-Remove-crypt-and-crypt_r-interceptors.patch similarity index 100% rename from packages/gcc/13.3.0/0011-Remove-crypt-and-crypt_r-interceptors.patch rename to packages/gcc/13.4.0/0011-Remove-crypt-and-crypt_r-interceptors.patch diff --git a/packages/gcc/13.3.0/0012-libgcc-m68k-Fixes-for-soft-float.patch b/packages/gcc/13.4.0/0012-libgcc-m68k-Fixes-for-soft-float.patch similarity index 100% rename from packages/gcc/13.3.0/0012-libgcc-m68k-Fixes-for-soft-float.patch rename to packages/gcc/13.4.0/0012-libgcc-m68k-Fixes-for-soft-float.patch diff --git a/packages/gcc/13.3.0/0013-libgcc-Exclude-UCLIBC-from-GLIBC-thread-check.patch b/packages/gcc/13.4.0/0013-libgcc-Exclude-UCLIBC-from-GLIBC-thread-check.patch similarity index 100% rename from packages/gcc/13.3.0/0013-libgcc-Exclude-UCLIBC-from-GLIBC-thread-check.patch rename to packages/gcc/13.4.0/0013-libgcc-Exclude-UCLIBC-from-GLIBC-thread-check.patch diff --git a/packages/gcc/13.3.0/0014-LoongArch-Use-lib-instead-of-lib64-as-the-library-se.patch b/packages/gcc/13.4.0/0014-LoongArch-Use-lib-instead-of-lib64-as-the-library-se.patch similarity index 100% rename from packages/gcc/13.3.0/0014-LoongArch-Use-lib-instead-of-lib64-as-the-library-se.patch rename to packages/gcc/13.4.0/0014-LoongArch-Use-lib-instead-of-lib64-as-the-library-se.patch diff --git a/packages/gcc/13.4.0/chksum b/packages/gcc/13.4.0/chksum new file mode 100644 index 0000000000..32b23f25f2 --- /dev/null +++ b/packages/gcc/13.4.0/chksum @@ -0,0 +1,8 @@ +md5 gcc-13.4.0.tar.xz 260096adee8b1cf3dde6e61c11cccca6 +sha1 gcc-13.4.0.tar.xz 419c4f1a4b58134a34c00afa7327c6848a58050a +sha256 gcc-13.4.0.tar.xz 9c4ce6dbb040568fdc545588ac03c5cbc95a8dbf0c7aa490170843afb59ca8f5 +sha512 gcc-13.4.0.tar.xz 9b4b83ecf51ef355b868608b8d257b2fa435c06d2719cb86657a7c2c2a0828ff4ce04e9bac1055bbcad8ed5b4da524cafaef654785e23a50233d95d89201e35f +md5 gcc-13.4.0.tar.gz b5109687acfc3fc61c891b9a0dfe71b2 +sha1 gcc-13.4.0.tar.gz 36712b3b575715b8dc555113403e2082138ce9d1 +sha256 gcc-13.4.0.tar.gz bf0baf3e570c9c74c17c8201f0196c6924b4bd98c90e69d6b2ac0cd823f33bbc +sha512 gcc-13.4.0.tar.gz c4c1ab3c65690c4d872988113db0c402206fd250110ed3cd6c4df47a5030ce95865869bb3638873f123f75d5983bcb8c8c99a6e7f8978efd9f3cbb66faa9a8fb diff --git a/packages/gcc/13.3.0/experimental/0001-picolibc-Add-custom-spec-file-fragments-for-using-pi.patch b/packages/gcc/13.4.0/experimental/0001-picolibc-Add-custom-spec-file-fragments-for-using-pi.patch similarity index 100% rename from packages/gcc/13.3.0/experimental/0001-picolibc-Add-custom-spec-file-fragments-for-using-pi.patch rename to packages/gcc/13.4.0/experimental/0001-picolibc-Add-custom-spec-file-fragments-for-using-pi.patch diff --git a/packages/linux/6.3.9/version.desc b/packages/gcc/13.4.0/version.desc similarity index 100% rename from packages/linux/6.3.9/version.desc rename to packages/gcc/13.4.0/version.desc diff --git a/packages/gcc/14.2.0/0011-aarch64-Fix-invalid-nested-subregs-PR115464.patch b/packages/gcc/14.2.0/0011-aarch64-Fix-invalid-nested-subregs-PR115464.patch deleted file mode 100644 index 2625c308fb..0000000000 --- a/packages/gcc/14.2.0/0011-aarch64-Fix-invalid-nested-subregs-PR115464.patch +++ /dev/null @@ -1,139 +0,0 @@ -From cb547fed9177c2a28f376c881facfcf4b64e70a9 Mon Sep 17 00:00:00 2001 -From: Richard Sandiford -Date: Thu, 13 Jun 2024 12:48:21 +0100 -Subject: [PATCH 11/16] aarch64: Fix invalid nested subregs [PR115464] - -The testcase extracts one arm_neon.h vector from a pair (one subreg) -and then reinterprets the result as an SVE vector (another subreg). -Each subreg makes sense individually, but we can't fold them together -into a single subreg: it's 32 bytes -> 16 bytes -> 16*N bytes, -but the interpretation of 32 bytes -> 16*N bytes depends on -whether N==1 or N>1. - -Since the second subreg makes sense individually, simplify_subreg -should bail out rather than ICE on it. simplify_gen_subreg will -then do the same (because it already checks validate_subreg). -This leaves simplify_gen_subreg returning null, requiring the -caller to take appropriate action. - -I think this is relatively likely to occur elsewhere, so the patch -adds a helper for forcing a subreg, allowing a temporary pseudo to -be created where necessary. - -I'll follow up by using force_subreg in more places. This patch -is intended to be a minimal backportable fix for the PR. - -gcc/ - PR target/115464 - * simplify-rtx.cc (simplify_context::simplify_subreg): Don't try - to fold two subregs together if their relationship isn't known - at compile time. - * explow.h (force_subreg): Declare. - * explow.cc (force_subreg): New function. - * config/aarch64/aarch64-sve-builtins-base.cc - (svset_neonq_impl::expand): Use it instead of simplify_gen_subreg. - -gcc/testsuite/ - PR target/115464 - * gcc.target/aarch64/sve/acle/general/pr115464.c: New test. - -(cherry picked from commit 0970ff46ba6330fc80e8736fc05b2eaeeae0b6a0) ---- - gcc/config/aarch64/aarch64-sve-builtins-base.cc | 2 +- - gcc/explow.cc | 15 +++++++++++++++ - gcc/explow.h | 2 ++ - gcc/simplify-rtx.cc | 5 +++++ - .../aarch64/sve/acle/general/pr115464.c | 13 +++++++++++++ - 5 files changed, 36 insertions(+), 1 deletion(-) - create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c - -diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc -index 0d2edf3f19e..c9182594bc1 100644 ---- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc -+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc -@@ -1174,7 +1174,7 @@ public: - Advanced SIMD argument as an SVE vector. */ - if (!BYTES_BIG_ENDIAN - && is_undef (CALL_EXPR_ARG (e.call_expr, 0))) -- return simplify_gen_subreg (mode, e.args[1], GET_MODE (e.args[1]), 0); -+ return force_subreg (mode, e.args[1], GET_MODE (e.args[1]), 0); - - rtx_vector_builder builder (VNx16BImode, 16, 2); - for (unsigned int i = 0; i < 16; i++) -diff --git a/gcc/explow.cc b/gcc/explow.cc -index 8e5f6b8e680..f6843398c4b 100644 ---- a/gcc/explow.cc -+++ b/gcc/explow.cc -@@ -745,6 +745,21 @@ force_reg (machine_mode mode, rtx x) - return temp; - } - -+/* Like simplify_gen_subreg, but force OP into a new register if the -+ subreg cannot be formed directly. */ -+ -+rtx -+force_subreg (machine_mode outermode, rtx op, -+ machine_mode innermode, poly_uint64 byte) -+{ -+ rtx x = simplify_gen_subreg (outermode, op, innermode, byte); -+ if (x) -+ return x; -+ -+ op = copy_to_mode_reg (innermode, op); -+ return simplify_gen_subreg (outermode, op, innermode, byte); -+} -+ - /* If X is a memory ref, copy its contents to a new temp reg and return - that reg. Otherwise, return X. */ - -diff --git a/gcc/explow.h b/gcc/explow.h -index 16aa02cfb68..cbd1fcb7eb3 100644 ---- a/gcc/explow.h -+++ b/gcc/explow.h -@@ -42,6 +42,8 @@ extern rtx copy_to_suggested_reg (rtx, rtx, machine_mode); - Args are mode (in case value is a constant) and the value. */ - extern rtx force_reg (machine_mode, rtx); - -+extern rtx force_subreg (machine_mode, rtx, machine_mode, poly_uint64); -+ - /* Return given rtx, copied into a new temp reg if it was in memory. */ - extern rtx force_not_mem (rtx); - -diff --git a/gcc/simplify-rtx.cc b/gcc/simplify-rtx.cc -index dceaa13333c..729d408aa55 100644 ---- a/gcc/simplify-rtx.cc -+++ b/gcc/simplify-rtx.cc -@@ -7612,6 +7612,11 @@ simplify_context::simplify_subreg (machine_mode outermode, rtx op, - poly_uint64 innermostsize = GET_MODE_SIZE (innermostmode); - rtx newx; - -+ /* Make sure that the relationship between the two subregs is -+ known at compile time. */ -+ if (!ordered_p (outersize, innermostsize)) -+ return NULL_RTX; -+ - if (outermode == innermostmode - && known_eq (byte, 0U) - && known_eq (SUBREG_BYTE (op), 0)) -diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c -new file mode 100644 -index 00000000000..d728d1325ed ---- /dev/null -+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c -@@ -0,0 +1,13 @@ -+/* { dg-options "-O2" } */ -+ -+#include -+#include -+#include -+ -+svuint16_t -+convolve4_4_x (uint16x8x2_t permute_tbl) -+{ -+ return svset_neonq_u16 (svundef_u16 (), permute_tbl.val[1]); -+} -+ -+/* { dg-final { scan-assembler {\tmov\tz0\.d, z1\.d\n} } } */ --- -2.44.2 - diff --git a/packages/gcc/14.2.0/0012-aarch64-Use-force_subreg-in-more-places.patch b/packages/gcc/14.2.0/0012-aarch64-Use-force_subreg-in-more-places.patch deleted file mode 100644 index bddf39775f..0000000000 --- a/packages/gcc/14.2.0/0012-aarch64-Use-force_subreg-in-more-places.patch +++ /dev/null @@ -1,114 +0,0 @@ -From 12d860b5b700b5218461a0b9e4a1a3ddb55eb211 Mon Sep 17 00:00:00 2001 -From: Richard Sandiford -Date: Tue, 18 Jun 2024 12:22:30 +0100 -Subject: [PATCH 12/16] aarch64: Use force_subreg in more places - -This patch makes the aarch64 code use force_subreg instead of -simplify_gen_subreg in more places. The criteria were: - -(1) The code is obviously specific to expand (where new pseudos - can be created). - -(2) The value is obviously an rvalue rather than an lvalue. - -(3) The offset wasn't a simple lowpart or highpart calculation; - a later patch will deal with those. - -gcc/ - * config/aarch64/aarch64-builtins.cc (aarch64_expand_fcmla_builtin): - Use force_subreg instead of simplify_gen_subreg. - * config/aarch64/aarch64-simd.md (ctz2): Likewise. - * config/aarch64/aarch64-sve-builtins-base.cc - (svget_impl::expand): Likewise. - (svget_neonq_impl::expand): Likewise. - * config/aarch64/aarch64-sve-builtins-functions.h - (multireg_permute::expand): Likewise. - -(cherry picked from commit 1474a8eead4ab390e59ee014befa8c40346679f4) ---- - gcc/config/aarch64/aarch64-builtins.cc | 4 ++-- - gcc/config/aarch64/aarch64-simd.md | 4 ++-- - gcc/config/aarch64/aarch64-sve-builtins-base.cc | 8 +++----- - gcc/config/aarch64/aarch64-sve-builtins-functions.h | 6 +++--- - 4 files changed, 10 insertions(+), 12 deletions(-) - -diff --git a/gcc/config/aarch64/aarch64-builtins.cc b/gcc/config/aarch64/aarch64-builtins.cc -index 75d21de1401..b2e46a073a8 100644 ---- a/gcc/config/aarch64/aarch64-builtins.cc -+++ b/gcc/config/aarch64/aarch64-builtins.cc -@@ -2510,12 +2510,12 @@ aarch64_expand_fcmla_builtin (tree exp, rtx target, int fcode) - rtx temp2 = gen_reg_rtx (DImode); - temp1 = simplify_gen_subreg (d->mode, op2, quadmode, - subreg_lowpart_offset (d->mode, quadmode)); -- temp1 = simplify_gen_subreg (V2DImode, temp1, d->mode, 0); -+ temp1 = force_subreg (V2DImode, temp1, d->mode, 0); - if (BYTES_BIG_ENDIAN) - emit_insn (gen_aarch64_get_lanev2di (temp2, temp1, const0_rtx)); - else - emit_insn (gen_aarch64_get_lanev2di (temp2, temp1, const1_rtx)); -- op2 = simplify_gen_subreg (d->mode, temp2, GET_MODE (temp2), 0); -+ op2 = force_subreg (d->mode, temp2, GET_MODE (temp2), 0); - - /* And recalculate the index. */ - lane -= nunits / 4; -diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md -index 33ab0741e87..5b9efe0b165 100644 ---- a/gcc/config/aarch64/aarch64-simd.md -+++ b/gcc/config/aarch64/aarch64-simd.md -@@ -412,8 +412,8 @@ - "TARGET_SIMD" - { - emit_insn (gen_bswap2 (operands[0], operands[1])); -- rtx op0_castsi2qi = simplify_gen_subreg(mode, operands[0], -- mode, 0); -+ rtx op0_castsi2qi = force_subreg (mode, operands[0], -+ mode, 0); - emit_insn (gen_aarch64_rbit (op0_castsi2qi, op0_castsi2qi)); - emit_insn (gen_clz2 (operands[0], operands[0])); - DONE; -diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc -index c9182594bc1..2c95da79572 100644 ---- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc -+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc -@@ -1121,9 +1121,8 @@ public: - expand (function_expander &e) const override - { - /* Fold the access into a subreg rvalue. */ -- return simplify_gen_subreg (e.vector_mode (0), e.args[0], -- GET_MODE (e.args[0]), -- INTVAL (e.args[1]) * BYTES_PER_SVE_VECTOR); -+ return force_subreg (e.vector_mode (0), e.args[0], GET_MODE (e.args[0]), -+ INTVAL (e.args[1]) * BYTES_PER_SVE_VECTOR); - } - }; - -@@ -1157,8 +1156,7 @@ public: - e.add_fixed_operand (indices); - return e.generate_insn (icode); - } -- return simplify_gen_subreg (e.result_mode (), e.args[0], -- GET_MODE (e.args[0]), 0); -+ return force_subreg (e.result_mode (), e.args[0], GET_MODE (e.args[0]), 0); - } - }; - -diff --git a/gcc/config/aarch64/aarch64-sve-builtins-functions.h b/gcc/config/aarch64/aarch64-sve-builtins-functions.h -index 3b8e575e98e..7d06a57ff83 100644 ---- a/gcc/config/aarch64/aarch64-sve-builtins-functions.h -+++ b/gcc/config/aarch64/aarch64-sve-builtins-functions.h -@@ -639,9 +639,9 @@ public: - { - machine_mode elt_mode = e.vector_mode (0); - rtx arg = e.args[0]; -- e.args[0] = simplify_gen_subreg (elt_mode, arg, GET_MODE (arg), 0); -- e.args.safe_push (simplify_gen_subreg (elt_mode, arg, GET_MODE (arg), -- GET_MODE_SIZE (elt_mode))); -+ e.args[0] = force_subreg (elt_mode, arg, GET_MODE (arg), 0); -+ e.args.safe_push (force_subreg (elt_mode, arg, GET_MODE (arg), -+ GET_MODE_SIZE (elt_mode))); - } - return e.use_exact_insn (icode); - } --- -2.44.2 - diff --git a/packages/gcc/14.2.0/0013-aarch64-Add-some-uses-of-force_lowpart_subreg.patch b/packages/gcc/14.2.0/0013-aarch64-Add-some-uses-of-force_lowpart_subreg.patch deleted file mode 100644 index fd4d984721..0000000000 --- a/packages/gcc/14.2.0/0013-aarch64-Add-some-uses-of-force_lowpart_subreg.patch +++ /dev/null @@ -1,167 +0,0 @@ -From eb49bbb886ef374eddb93e866c9c9f5f314c8014 Mon Sep 17 00:00:00 2001 -From: Richard Sandiford -Date: Tue, 18 Jun 2024 12:22:31 +0100 -Subject: [PATCH 13/16] aarch64: Add some uses of force_lowpart_subreg - -This patch makes more use of force_lowpart_subreg, similarly -to the recent patch for force_subreg. The criteria were: - -(1) The code is obviously specific to expand (where new pseudos - can be created). - -(2) The value is obviously an rvalue rather than an lvalue. - -gcc/ - PR target/115464 - * config/aarch64/aarch64-builtins.cc (aarch64_expand_fcmla_builtin) - (aarch64_expand_rwsr_builtin): Use force_lowpart_subreg instead of - simplify_gen_subreg and lowpart_subreg. - * config/aarch64/aarch64-sve-builtins-base.cc - (svset_neonq_impl::expand): Likewise. - * config/aarch64/aarch64-sve-builtins-sme.cc - (add_load_store_slice_operand): Likewise. - * config/aarch64/aarch64.cc (aarch64_sve_reinterpret): Likewise. - (aarch64_addti_scratch_regs, aarch64_subvti_scratch_regs): Likewise. - -gcc/testsuite/ - PR target/115464 - * gcc.target/aarch64/sve/acle/general/pr115464_2.c: New test. - -(cherry picked from commit 6bd4fbae45d11795a9a6f54b866308d4d7134def) ---- - gcc/config/aarch64/aarch64-builtins.cc | 11 +++++------ - gcc/config/aarch64/aarch64-sve-builtins-base.cc | 2 +- - gcc/config/aarch64/aarch64-sve-builtins-sme.cc | 2 +- - gcc/config/aarch64/aarch64.cc | 14 +++++--------- - .../aarch64/sve/acle/general/pr115464_2.c | 11 +++++++++++ - 5 files changed, 23 insertions(+), 17 deletions(-) - create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c - -diff --git a/gcc/config/aarch64/aarch64-builtins.cc b/gcc/config/aarch64/aarch64-builtins.cc -index b2e46a073a8..264b9560709 100644 ---- a/gcc/config/aarch64/aarch64-builtins.cc -+++ b/gcc/config/aarch64/aarch64-builtins.cc -@@ -2497,8 +2497,7 @@ aarch64_expand_fcmla_builtin (tree exp, rtx target, int fcode) - int lane = INTVAL (lane_idx); - - if (lane < nunits / 4) -- op2 = simplify_gen_subreg (d->mode, op2, quadmode, -- subreg_lowpart_offset (d->mode, quadmode)); -+ op2 = force_lowpart_subreg (d->mode, op2, quadmode); - else - { - /* Select the upper 64 bits, either a V2SF or V4HF, this however -@@ -2508,8 +2507,7 @@ aarch64_expand_fcmla_builtin (tree exp, rtx target, int fcode) - gen_highpart_mode generates code that isn't optimal. */ - rtx temp1 = gen_reg_rtx (d->mode); - rtx temp2 = gen_reg_rtx (DImode); -- temp1 = simplify_gen_subreg (d->mode, op2, quadmode, -- subreg_lowpart_offset (d->mode, quadmode)); -+ temp1 = force_lowpart_subreg (d->mode, op2, quadmode); - temp1 = force_subreg (V2DImode, temp1, d->mode, 0); - if (BYTES_BIG_ENDIAN) - emit_insn (gen_aarch64_get_lanev2di (temp2, temp1, const0_rtx)); -@@ -2754,7 +2752,7 @@ aarch64_expand_rwsr_builtin (tree exp, rtx target, int fcode) - case AARCH64_WSR64: - case AARCH64_WSRF64: - case AARCH64_WSR128: -- subreg = lowpart_subreg (sysreg_mode, input_val, mode); -+ subreg = force_lowpart_subreg (sysreg_mode, input_val, mode); - break; - case AARCH64_WSRF: - subreg = gen_lowpart_SUBREG (SImode, input_val); -@@ -2789,7 +2787,8 @@ aarch64_expand_rwsr_builtin (tree exp, rtx target, int fcode) - case AARCH64_RSR64: - case AARCH64_RSRF64: - case AARCH64_RSR128: -- return lowpart_subreg (TYPE_MODE (TREE_TYPE (exp)), target, sysreg_mode); -+ return force_lowpart_subreg (TYPE_MODE (TREE_TYPE (exp)), -+ target, sysreg_mode); - case AARCH64_RSRF: - subreg = gen_lowpart_SUBREG (SImode, target); - return gen_lowpart_SUBREG (SFmode, subreg); -diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc -index 2c95da79572..3c970e9c5f8 100644 ---- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc -+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc -@@ -1183,7 +1183,7 @@ public: - if (BYTES_BIG_ENDIAN) - return e.use_exact_insn (code_for_aarch64_sve_set_neonq (mode)); - insn_code icode = code_for_vcond_mask (mode, mode); -- e.args[1] = lowpart_subreg (mode, e.args[1], GET_MODE (e.args[1])); -+ e.args[1] = force_lowpart_subreg (mode, e.args[1], GET_MODE (e.args[1])); - e.add_output_operand (icode); - e.add_input_operand (icode, e.args[1]); - e.add_input_operand (icode, e.args[0]); -diff --git a/gcc/config/aarch64/aarch64-sve-builtins-sme.cc b/gcc/config/aarch64/aarch64-sve-builtins-sme.cc -index f4c91bcbb95..b66b35ae60b 100644 ---- a/gcc/config/aarch64/aarch64-sve-builtins-sme.cc -+++ b/gcc/config/aarch64/aarch64-sve-builtins-sme.cc -@@ -112,7 +112,7 @@ add_load_store_slice_operand (function_expander &e, insn_code icode, - rtx base = e.args[argno]; - if (e.mode_suffix_id == MODE_vnum) - { -- rtx vnum = lowpart_subreg (SImode, e.args[vnum_argno], DImode); -+ rtx vnum = force_lowpart_subreg (SImode, e.args[vnum_argno], DImode); - base = simplify_gen_binary (PLUS, SImode, base, vnum); - } - e.add_input_operand (icode, base); -diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc -index 1beec94629d..a064aeecbc0 100644 ---- a/gcc/config/aarch64/aarch64.cc -+++ b/gcc/config/aarch64/aarch64.cc -@@ -3284,7 +3284,7 @@ aarch64_sve_reinterpret (machine_mode mode, rtx x) - /* can_change_mode_class must only return true if subregs and svreinterprets - have the same semantics. */ - if (targetm.can_change_mode_class (GET_MODE (x), mode, FP_REGS)) -- return lowpart_subreg (mode, x, GET_MODE (x)); -+ return force_lowpart_subreg (mode, x, GET_MODE (x)); - - rtx res = gen_reg_rtx (mode); - x = force_reg (GET_MODE (x), x); -@@ -26979,9 +26979,8 @@ aarch64_addti_scratch_regs (rtx op1, rtx op2, rtx *low_dest, - rtx *high_in2) - { - *low_dest = gen_reg_rtx (DImode); -- *low_in1 = gen_lowpart (DImode, op1); -- *low_in2 = simplify_gen_subreg (DImode, op2, TImode, -- subreg_lowpart_offset (DImode, TImode)); -+ *low_in1 = force_lowpart_subreg (DImode, op1, TImode); -+ *low_in2 = force_lowpart_subreg (DImode, op2, TImode); - *high_dest = gen_reg_rtx (DImode); - *high_in1 = gen_highpart (DImode, op1); - *high_in2 = simplify_gen_subreg (DImode, op2, TImode, -@@ -27013,11 +27012,8 @@ aarch64_subvti_scratch_regs (rtx op1, rtx op2, rtx *low_dest, - rtx *high_in2) - { - *low_dest = gen_reg_rtx (DImode); -- *low_in1 = simplify_gen_subreg (DImode, op1, TImode, -- subreg_lowpart_offset (DImode, TImode)); -- -- *low_in2 = simplify_gen_subreg (DImode, op2, TImode, -- subreg_lowpart_offset (DImode, TImode)); -+ *low_in1 = force_lowpart_subreg (DImode, op1, TImode); -+ *low_in2 = force_lowpart_subreg (DImode, op2, TImode); - *high_dest = gen_reg_rtx (DImode); - - *high_in1 = simplify_gen_subreg (DImode, op1, TImode, -diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c -new file mode 100644 -index 00000000000..f561c34f732 ---- /dev/null -+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c -@@ -0,0 +1,11 @@ -+/* { dg-options "-O2" } */ -+ -+#include -+#include -+#include -+ -+svuint16_t -+convolve4_4_x (uint16x8x2_t permute_tbl, svuint16_t a) -+{ -+ return svset_neonq_u16 (a, permute_tbl.val[1]); -+} --- -2.44.2 - diff --git a/packages/gcc/14.2.0/0014-Add-force_lowpart_subreg.patch b/packages/gcc/14.2.0/0014-Add-force_lowpart_subreg.patch deleted file mode 100644 index 17fc7b64f9..0000000000 --- a/packages/gcc/14.2.0/0014-Add-force_lowpart_subreg.patch +++ /dev/null @@ -1,121 +0,0 @@ -From 2dcdf9d026ed2e881b0bd8b378ed072e410490fe Mon Sep 17 00:00:00 2001 -From: Richard Sandiford -Date: Tue, 18 Jun 2024 12:22:31 +0100 -Subject: [PATCH 14/16] Add force_lowpart_subreg - -optabs had a local function called lowpart_subreg_maybe_copy -that is very similar to the lowpart version of force_subreg. -This patch adds a force_lowpart_subreg wrapper around -force_subreg and uses it in optabs.cc. - -The only difference between the old and new functions is that -the old one asserted success while the new one doesn't. -It's common not to assert elsewhere when taking subregs; -normally a null result is enough. - -Later patches will make more use of the new function. - -gcc/ - * explow.h (force_lowpart_subreg): Declare. - * explow.cc (force_lowpart_subreg): New function. - * optabs.cc (lowpart_subreg_maybe_copy): Delete. - (expand_absneg_bit): Use force_lowpart_subreg instead of - lowpart_subreg_maybe_copy. - (expand_copysign_bit): Likewise. - -(cherry picked from commit 5f40d1c0cc6ce91ef28d326b8707b3f05e6f239c) ---- - gcc/explow.cc | 14 ++++++++++++++ - gcc/explow.h | 1 + - gcc/optabs.cc | 24 ++---------------------- - 3 files changed, 17 insertions(+), 22 deletions(-) - -diff --git a/gcc/explow.cc b/gcc/explow.cc -index f6843398c4b..5fdfa81f69b 100644 ---- a/gcc/explow.cc -+++ b/gcc/explow.cc -@@ -760,6 +760,20 @@ force_subreg (machine_mode outermode, rtx op, - return simplify_gen_subreg (outermode, op, innermode, byte); - } - -+/* Try to return an rvalue expression for the OUTERMODE lowpart of OP, -+ which has mode INNERMODE. Allow OP to be forced into a new register -+ if necessary. -+ -+ Return null on failure. */ -+ -+rtx -+force_lowpart_subreg (machine_mode outermode, rtx op, -+ machine_mode innermode) -+{ -+ auto byte = subreg_lowpart_offset (outermode, innermode); -+ return force_subreg (outermode, op, innermode, byte); -+} -+ - /* If X is a memory ref, copy its contents to a new temp reg and return - that reg. Otherwise, return X. */ - -diff --git a/gcc/explow.h b/gcc/explow.h -index cbd1fcb7eb3..dd654649b06 100644 ---- a/gcc/explow.h -+++ b/gcc/explow.h -@@ -43,6 +43,7 @@ extern rtx copy_to_suggested_reg (rtx, rtx, machine_mode); - extern rtx force_reg (machine_mode, rtx); - - extern rtx force_subreg (machine_mode, rtx, machine_mode, poly_uint64); -+extern rtx force_lowpart_subreg (machine_mode, rtx, machine_mode); - - /* Return given rtx, copied into a new temp reg if it was in memory. */ - extern rtx force_not_mem (rtx); -diff --git a/gcc/optabs.cc b/gcc/optabs.cc -index ce91f94ed43..804c0dc73ba 100644 ---- a/gcc/optabs.cc -+++ b/gcc/optabs.cc -@@ -3096,26 +3096,6 @@ expand_ffs (scalar_int_mode mode, rtx op0, rtx target) - return 0; - } - --/* Extract the OMODE lowpart from VAL, which has IMODE. Under certain -- conditions, VAL may already be a SUBREG against which we cannot generate -- a further SUBREG. In this case, we expect forcing the value into a -- register will work around the situation. */ -- --static rtx --lowpart_subreg_maybe_copy (machine_mode omode, rtx val, -- machine_mode imode) --{ -- rtx ret; -- ret = lowpart_subreg (omode, val, imode); -- if (ret == NULL) -- { -- val = force_reg (imode, val); -- ret = lowpart_subreg (omode, val, imode); -- gcc_assert (ret != NULL); -- } -- return ret; --} -- - /* Expand a floating point absolute value or negation operation via a - logical operation on the sign bit. */ - -@@ -3204,7 +3184,7 @@ expand_absneg_bit (enum rtx_code code, scalar_float_mode mode, - gen_lowpart (imode, op0), - immed_wide_int_const (mask, imode), - gen_lowpart (imode, target), 1, OPTAB_LIB_WIDEN); -- target = lowpart_subreg_maybe_copy (mode, temp, imode); -+ target = force_lowpart_subreg (mode, temp, imode); - - set_dst_reg_note (get_last_insn (), REG_EQUAL, - gen_rtx_fmt_e (code, mode, copy_rtx (op0)), -@@ -4043,7 +4023,7 @@ expand_copysign_bit (scalar_float_mode mode, rtx op0, rtx op1, rtx target, - - temp = expand_binop (imode, ior_optab, op0, op1, - gen_lowpart (imode, target), 1, OPTAB_LIB_WIDEN); -- target = lowpart_subreg_maybe_copy (mode, temp, imode); -+ target = force_lowpart_subreg (mode, temp, imode); - } - - return target; --- -2.44.2 - diff --git a/packages/gcc/14.2.0/0015-Make-more-use-of-force_subreg.patch b/packages/gcc/14.2.0/0015-Make-more-use-of-force_subreg.patch deleted file mode 100644 index 697c87604c..0000000000 --- a/packages/gcc/14.2.0/0015-Make-more-use-of-force_subreg.patch +++ /dev/null @@ -1,194 +0,0 @@ -From d02fe5a6bfdfcae086e5374db3f8fd076df9b1a5 Mon Sep 17 00:00:00 2001 -From: Richard Sandiford -Date: Tue, 18 Jun 2024 12:22:30 +0100 -Subject: [PATCH 15/16] Make more use of force_subreg - -This patch makes target-independent code use force_subreg instead -of simplify_gen_subreg in some places. The criteria were: - -(1) The code is obviously specific to expand (where new pseudos - can be created), or at least would be invalid to call when - !can_create_pseudo_p () and temporaries are needed. - -(2) The value is obviously an rvalue rather than an lvalue. - -(3) The offset wasn't a simple lowpart or highpart calculation; - a later patch will deal with those. - -Doing this should reduce the likelihood of bugs like PR115464 -occuring in other situations. - -gcc/ - * expmed.cc (store_bit_field_using_insv): Use force_subreg - instead of simplify_gen_subreg. - (store_bit_field_1): Likewise. - (extract_bit_field_as_subreg): Likewise. - (extract_integral_bit_field): Likewise. - (emit_store_flag_1): Likewise. - * expr.cc (convert_move): Likewise. - (convert_modes): Likewise. - (emit_group_load_1): Likewise. - (emit_group_store): Likewise. - (expand_assignment): Likewise. - -(cherry picked from commit d4047da6a070175aae7121c739d1cad6b08ff4b2) ---- - gcc/expmed.cc | 22 ++++++++-------------- - gcc/expr.cc | 27 ++++++++++++--------------- - 2 files changed, 20 insertions(+), 29 deletions(-) - -diff --git a/gcc/expmed.cc b/gcc/expmed.cc -index 19765311b95..bd190722de6 100644 ---- a/gcc/expmed.cc -+++ b/gcc/expmed.cc -@@ -695,13 +695,7 @@ store_bit_field_using_insv (const extraction_insn *insv, rtx op0, - if we must narrow it, be sure we do it correctly. */ - - if (GET_MODE_SIZE (value_mode) < GET_MODE_SIZE (op_mode)) -- { -- tmp = simplify_subreg (op_mode, value1, value_mode, 0); -- if (! tmp) -- tmp = simplify_gen_subreg (op_mode, -- force_reg (value_mode, value1), -- value_mode, 0); -- } -+ tmp = force_subreg (op_mode, value1, value_mode, 0); - else - { - tmp = gen_lowpart_if_possible (op_mode, value1); -@@ -800,7 +794,7 @@ store_bit_field_1 (rtx str_rtx, poly_uint64 bitsize, poly_uint64 bitnum, - if (known_eq (bitnum, 0U) - && known_eq (bitsize, GET_MODE_BITSIZE (GET_MODE (op0)))) - { -- sub = simplify_gen_subreg (GET_MODE (op0), value, fieldmode, 0); -+ sub = force_subreg (GET_MODE (op0), value, fieldmode, 0); - if (sub) - { - if (reverse) -@@ -1627,7 +1621,7 @@ extract_bit_field_as_subreg (machine_mode mode, rtx op0, - && known_eq (bitsize, GET_MODE_BITSIZE (mode)) - && lowpart_bit_field_p (bitnum, bitsize, op0_mode) - && TRULY_NOOP_TRUNCATION_MODES_P (mode, op0_mode)) -- return simplify_gen_subreg (mode, op0, op0_mode, bytenum); -+ return force_subreg (mode, op0, op0_mode, bytenum); - return NULL_RTX; - } - -@@ -1994,11 +1988,11 @@ extract_integral_bit_field (rtx op0, opt_scalar_int_mode op0_mode, - return convert_extracted_bit_field (target, mode, tmode, unsignedp); - } - /* If OP0 is a hard register, copy it to a pseudo before calling -- simplify_gen_subreg. */ -+ force_subreg. */ - if (REG_P (op0) && HARD_REGISTER_P (op0)) - op0 = copy_to_reg (op0); -- op0 = simplify_gen_subreg (word_mode, op0, op0_mode.require (), -- bitnum / BITS_PER_WORD * UNITS_PER_WORD); -+ op0 = force_subreg (word_mode, op0, op0_mode.require (), -+ bitnum / BITS_PER_WORD * UNITS_PER_WORD); - op0_mode = word_mode; - bitnum %= BITS_PER_WORD; - } -@@ -5759,8 +5753,8 @@ emit_store_flag_1 (rtx target, enum rtx_code code, rtx op0, rtx op1, - - /* Do a logical OR or AND of the two words and compare the - result. */ -- op00 = simplify_gen_subreg (word_mode, op0, int_mode, 0); -- op01 = simplify_gen_subreg (word_mode, op0, int_mode, UNITS_PER_WORD); -+ op00 = force_subreg (word_mode, op0, int_mode, 0); -+ op01 = force_subreg (word_mode, op0, int_mode, UNITS_PER_WORD); - tem = expand_binop (word_mode, - op1 == const0_rtx ? ior_optab : and_optab, - op00, op01, NULL_RTX, unsignedp, -diff --git a/gcc/expr.cc b/gcc/expr.cc -index 9f66d479445..8ffa76b1bb8 100644 ---- a/gcc/expr.cc -+++ b/gcc/expr.cc -@@ -302,7 +302,7 @@ convert_move (rtx to, rtx from, int unsignedp) - GET_MODE_BITSIZE (to_mode))); - - if (VECTOR_MODE_P (to_mode)) -- from = simplify_gen_subreg (to_mode, from, GET_MODE (from), 0); -+ from = force_subreg (to_mode, from, GET_MODE (from), 0); - else - to = simplify_gen_subreg (from_mode, to, GET_MODE (to), 0); - -@@ -936,7 +936,7 @@ convert_modes (machine_mode mode, machine_mode oldmode, rtx x, int unsignedp) - { - gcc_assert (known_eq (GET_MODE_BITSIZE (mode), - GET_MODE_BITSIZE (oldmode))); -- return simplify_gen_subreg (mode, x, oldmode, 0); -+ return force_subreg (mode, x, oldmode, 0); - } - - temp = gen_reg_rtx (mode); -@@ -3076,8 +3076,8 @@ emit_group_load_1 (rtx *tmps, rtx dst, rtx orig_src, tree type, - } - } - else if (CONSTANT_P (src) && GET_MODE (dst) != BLKmode -- && XVECLEN (dst, 0) > 1) -- tmps[i] = simplify_gen_subreg (mode, src, GET_MODE (dst), bytepos); -+ && XVECLEN (dst, 0) > 1) -+ tmps[i] = force_subreg (mode, src, GET_MODE (dst), bytepos); - else if (CONSTANT_P (src)) - { - if (known_eq (bytelen, ssize)) -@@ -3301,7 +3301,7 @@ emit_group_store (rtx orig_dst, rtx src, tree type ATTRIBUTE_UNUSED, - if (known_eq (rtx_to_poly_int64 (XEXP (XVECEXP (src, 0, start), 1)), - bytepos)) - { -- temp = simplify_gen_subreg (outer, tmps[start], inner, 0); -+ temp = force_subreg (outer, tmps[start], inner, 0); - if (temp) - { - emit_move_insn (dst, temp); -@@ -3321,7 +3321,7 @@ emit_group_store (rtx orig_dst, rtx src, tree type ATTRIBUTE_UNUSED, - finish - 1), 1)), - bytepos)) - { -- temp = simplify_gen_subreg (outer, tmps[finish - 1], inner, 0); -+ temp = force_subreg (outer, tmps[finish - 1], inner, 0); - if (temp) - { - emit_move_insn (dst, temp); -@@ -6195,11 +6195,9 @@ expand_assignment (tree to, tree from, bool nontemporal) - to_mode = GET_MODE_INNER (to_mode); - machine_mode from_mode = GET_MODE_INNER (GET_MODE (result)); - rtx from_real -- = simplify_gen_subreg (to_mode, XEXP (result, 0), -- from_mode, 0); -+ = force_subreg (to_mode, XEXP (result, 0), from_mode, 0); - rtx from_imag -- = simplify_gen_subreg (to_mode, XEXP (result, 1), -- from_mode, 0); -+ = force_subreg (to_mode, XEXP (result, 1), from_mode, 0); - if (!from_real || !from_imag) - goto concat_store_slow; - emit_move_insn (XEXP (to_rtx, 0), from_real); -@@ -6215,8 +6213,7 @@ expand_assignment (tree to, tree from, bool nontemporal) - if (MEM_P (result)) - from_rtx = change_address (result, to_mode, NULL_RTX); - else -- from_rtx -- = simplify_gen_subreg (to_mode, result, from_mode, 0); -+ from_rtx = force_subreg (to_mode, result, from_mode, 0); - if (from_rtx) - { - emit_move_insn (XEXP (to_rtx, 0), -@@ -6228,10 +6225,10 @@ expand_assignment (tree to, tree from, bool nontemporal) - { - to_mode = GET_MODE_INNER (to_mode); - rtx from_real -- = simplify_gen_subreg (to_mode, result, from_mode, 0); -+ = force_subreg (to_mode, result, from_mode, 0); - rtx from_imag -- = simplify_gen_subreg (to_mode, result, from_mode, -- GET_MODE_SIZE (to_mode)); -+ = force_subreg (to_mode, result, from_mode, -+ GET_MODE_SIZE (to_mode)); - if (!from_real || !from_imag) - goto concat_store_slow; - emit_move_insn (XEXP (to_rtx, 0), from_real); --- -2.44.2 - diff --git a/packages/gcc/14.2.0/0016-Revert-one-of-the-force_subreg-changes.patch b/packages/gcc/14.2.0/0016-Revert-one-of-the-force_subreg-changes.patch deleted file mode 100644 index 629cfbdadf..0000000000 --- a/packages/gcc/14.2.0/0016-Revert-one-of-the-force_subreg-changes.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 5468439a1f987b7d801c6c76d6c989e57af8916a Mon Sep 17 00:00:00 2001 -From: Richard Sandiford -Date: Tue, 25 Jun 2024 09:41:21 +0100 -Subject: [PATCH 16/16] Revert one of the force_subreg changes - -One of the changes in g:d4047da6a070175aae7121c739d1cad6b08ff4b2 -caused a regression in ft32-elf; see: - - https://gcc.gnu.org/pipermail/gcc-patches/2024-June/655418.html - -for details. This change was different from the others in that the -original call was to simplify_subreg rather than simplify_lowpart_subreg. -The old code would therefore go on to do the force_reg for more cases -than the new code would. - -gcc/ - * expmed.cc (store_bit_field_using_insv): Revert earlier change - to use force_subreg instead of simplify_gen_subreg. - -(cherry picked from commit b694bf417cdd7d0a4d78e9927bab6bc202b7df6c) ---- - gcc/expmed.cc | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/gcc/expmed.cc b/gcc/expmed.cc -index bd190722de6..85ec2614a3f 100644 ---- a/gcc/expmed.cc -+++ b/gcc/expmed.cc -@@ -695,7 +695,13 @@ store_bit_field_using_insv (const extraction_insn *insv, rtx op0, - if we must narrow it, be sure we do it correctly. */ - - if (GET_MODE_SIZE (value_mode) < GET_MODE_SIZE (op_mode)) -- tmp = force_subreg (op_mode, value1, value_mode, 0); -+ { -+ tmp = simplify_subreg (op_mode, value1, value_mode, 0); -+ if (! tmp) -+ tmp = simplify_gen_subreg (op_mode, -+ force_reg (value_mode, value1), -+ value_mode, 0); -+ } - else - { - tmp = gen_lowpart_if_possible (op_mode, value1); --- -2.44.2 - diff --git a/packages/gcc/14.2.0/chksum b/packages/gcc/14.2.0/chksum deleted file mode 100644 index 40000f5ce5..0000000000 --- a/packages/gcc/14.2.0/chksum +++ /dev/null @@ -1,8 +0,0 @@ -md5 gcc-14.2.0.tar.xz 2268420ba02dc01821960e274711bde0 -sha1 gcc-14.2.0.tar.xz d91ecc3d20ce6298bd95f9b09cc51dc6d3c73ae3 -sha256 gcc-14.2.0.tar.xz a7b39bc69cbf9e25826c5a60ab26477001f7c08d85cec04bc0e29cabed6f3cc9 -sha512 gcc-14.2.0.tar.xz 932bdef0cda94bacedf452ab17f103c0cb511ff2cec55e9112fc0328cbf1d803b42595728ea7b200e0a057c03e85626f937012e49a7515bc5dd256b2bf4bc396 -md5 gcc-14.2.0.tar.gz b89ddcdaf5c1b6214abad40d9761a6ba -sha1 gcc-14.2.0.tar.gz d4d09500ace1dc9ab69f6c4c791de012da8607ed -sha256 gcc-14.2.0.tar.gz 7d376d445f93126dc545e2c0086d0f647c3094aae081cdb78f42ce2bc25e7293 -sha512 gcc-14.2.0.tar.gz d6828a5702ff4b667cc3e1e7e9f180191041b7efb68ffdc54248a42aa1799f41db6743acfe9ab74ea59977ba06f425fcf943a9fe3a77f9db706fc6bdbd657c1a diff --git a/packages/gcc/14.3.0/0000-libtool-leave-framework-alone.patch b/packages/gcc/14.3.0/0000-libtool-leave-framework-alone.patch new file mode 100644 index 0000000000..a5f6f66b96 --- /dev/null +++ b/packages/gcc/14.3.0/0000-libtool-leave-framework-alone.patch @@ -0,0 +1,21 @@ +--- + libtool-ldflags | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/libtool-ldflags b/libtool-ldflags +index 5de9e2978d40..0dde24bedfc5 100755 +--- a/libtool-ldflags ++++ b/libtool-ldflags +@@ -36,6 +36,11 @@ prev_arg= + for arg + do + case $arg in ++ -framework) ++ # libtool handles this option. It should not be prefixed with ++ # -Xcompiler, as that would split it from the argument that ++ # follows. ++ ;; + -f*|--*|-static-lib*|-shared-lib*|-B*) + # Libtool does not ascribe any special meaning options + # that begin with -f or with a double-dash. So, it will + diff --git a/packages/gcc/14.3.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch b/packages/gcc/14.3.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch new file mode 100644 index 0000000000..181d6332b1 --- /dev/null +++ b/packages/gcc/14.3.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch @@ -0,0 +1,17 @@ +--- + libcc1/connection.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libcc1/connection.cc b/libcc1/connection.cc +index 175e7a176b9e..60e37c2ce0c5 100644 +--- a/libcc1/connection.cc ++++ b/libcc1/connection.cc +@@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see + #include + #include + #include ++#include + #include + #include + #include "marshall.hh" + diff --git a/packages/gcc/14.3.0/0002-0002-arm-softfloat-libgcc.patch.patch b/packages/gcc/14.3.0/0002-0002-arm-softfloat-libgcc.patch.patch new file mode 100644 index 0000000000..d2a7dfce55 --- /dev/null +++ b/packages/gcc/14.3.0/0002-0002-arm-softfloat-libgcc.patch.patch @@ -0,0 +1,43 @@ +From c18ad43db5808bf40b9ceb877df7bcd438b59cdd Mon Sep 17 00:00:00 2001 +From: Chris Packham +Date: Sun, 25 May 2025 10:34:00 +1200 +Subject: [PATCH] 0002-arm-softfloat-libgcc.patch + +--- + gcc/config/arm/linux-elf.h | 2 +- + libgcc/config/arm/t-linux | 7 ++++++- + 2 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h +index ccae8abf6f6c..fcd180dff243 100644 +--- a/gcc/config/arm/linux-elf.h ++++ b/gcc/config/arm/linux-elf.h +@@ -58,7 +58,7 @@ + %{shared:-lc} \ + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" + +-#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" ++#define LIBGCC_SPEC "-lgcc" + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + +diff --git a/libgcc/config/arm/t-linux b/libgcc/config/arm/t-linux +index 3d520decafbc..e7bc042d4e40 100644 +--- a/libgcc/config/arm/t-linux ++++ b/libgcc/config/arm/t-linux +@@ -1,6 +1,11 @@ + LIB1ASMSRC = arm/lib1funcs.S + LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ +- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 ++ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ ++ _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. +-- +2.49.0 + diff --git a/packages/gcc/14.3.0/0003-0003-libgcc-disable-split-stack-nothreads.patch.patch b/packages/gcc/14.3.0/0003-0003-libgcc-disable-split-stack-nothreads.patch.patch new file mode 100644 index 0000000000..2fea1b630d --- /dev/null +++ b/packages/gcc/14.3.0/0003-0003-libgcc-disable-split-stack-nothreads.patch.patch @@ -0,0 +1,23 @@ +From 9b74f600cb69cf86c9a8e29e8cea775effd780c2 Mon Sep 17 00:00:00 2001 +From: Chris Packham +Date: Sun, 25 May 2025 10:34:01 +1200 +Subject: [PATCH] 0003-libgcc-disable-split-stack-nothreads.patch + +--- + libgcc/config/t-stack | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libgcc/config/t-stack b/libgcc/config/t-stack +index cc0366b4cd81..f3f97e86d60e 100644 +--- a/libgcc/config/t-stack ++++ b/libgcc/config/t-stack +@@ -1,4 +1,6 @@ + # Makefile fragment to provide generic support for -fsplit-stack. + # This should be used in config.host for any host which supports + # -fsplit-stack. ++ifeq ($(enable_threads),yes) + LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c ++endif +-- +2.49.0 + diff --git a/packages/gcc/14.3.0/0004-Remove-use-of-include_next-from-c-headers.patch b/packages/gcc/14.3.0/0004-Remove-use-of-include_next-from-c-headers.patch new file mode 100644 index 0000000000..2dbe28a545 --- /dev/null +++ b/packages/gcc/14.3.0/0004-Remove-use-of-include_next-from-c-headers.patch @@ -0,0 +1,307 @@ +From a9766b7fd69768ec614f838edcb6a38fd7b3cb0d Mon Sep 17 00:00:00 2001 +From: Keith Packard +Date: Sun, 24 Jan 2021 14:20:33 -0800 +Subject: [PATCH] Remove use of include_next from c++ headers + +Using include_next bypasses the default header search path and lets +files later in the include path take priority over earlier files. + +This makes replacing libc impossible as the default libc headers will +occur after the libstdc++ headers, and so be picked up in place of +headers inserted at the begining of the search path or appended to the +end of the search path. + +Using include_next is a hack to work-around broken combinations of +libraries, and is not necessary in a well constructed toolchain. + +Signed-off-by: Keith Packard +--- + libstdc++-v3/include/bits/std_abs.h | 4 ++-- + libstdc++-v3/include/c/cassert | 2 +- + libstdc++-v3/include/c/cctype | 2 +- + libstdc++-v3/include/c/cerrno | 2 +- + libstdc++-v3/include/c/cfloat | 2 +- + libstdc++-v3/include/c/climits | 2 +- + libstdc++-v3/include/c/clocale | 2 +- + libstdc++-v3/include/c/cmath | 2 +- + libstdc++-v3/include/c/csetjmp | 2 +- + libstdc++-v3/include/c/csignal | 2 +- + libstdc++-v3/include/c/cstdarg | 2 +- + libstdc++-v3/include/c/cstddef | 2 +- + libstdc++-v3/include/c/cstdio | 2 +- + libstdc++-v3/include/c/cstdlib | 2 +- + libstdc++-v3/include/c/cstring | 2 +- + libstdc++-v3/include/c/ctime | 2 +- + libstdc++-v3/include/c/cuchar | 2 +- + libstdc++-v3/include/c/cwchar | 2 +- + libstdc++-v3/include/c/cwctype | 2 +- + libstdc++-v3/include/c_global/cmath | 2 +- + libstdc++-v3/include/c_global/cstdlib | 2 +- + 21 files changed, 22 insertions(+), 22 deletions(-) + +diff --git a/libstdc++-v3/include/bits/std_abs.h b/libstdc++-v3/include/bits/std_abs.h +index 48d44160baba..d30c44e51896 100644 +--- a/libstdc++-v3/include/bits/std_abs.h ++++ b/libstdc++-v3/include/bits/std_abs.h +@@ -35,9 +35,9 @@ + #include + + #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS +-#include_next ++#include + #ifdef __CORRECT_ISO_CPP_MATH_H_PROTO +-# include_next ++# include + #endif + #undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS + +diff --git a/libstdc++-v3/include/c/cassert b/libstdc++-v3/include/c/cassert +index 5cd11fff9ece..01d8c7fa5fcd 100644 +--- a/libstdc++-v3/include/c/cassert ++++ b/libstdc++-v3/include/c/cassert +@@ -31,4 +31,4 @@ + #pragma GCC system_header + + #include +-#include_next ++#include +diff --git a/libstdc++-v3/include/c/cctype b/libstdc++-v3/include/c/cctype +index c6f650394357..1540a3259454 100644 +--- a/libstdc++-v3/include/c/cctype ++++ b/libstdc++-v3/include/c/cctype +@@ -31,6 +31,6 @@ + + #pragma GCC system_header + +-#include_next ++#include + + #endif +diff --git a/libstdc++-v3/include/c/cerrno b/libstdc++-v3/include/c/cerrno +index 9e47b182d25c..250ea5d7744a 100644 +--- a/libstdc++-v3/include/c/cerrno ++++ b/libstdc++-v3/include/c/cerrno +@@ -41,7 +41,7 @@ + #pragma GCC system_header + + #include +-#include_next ++#include + + // Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998 + #ifndef errno +diff --git a/libstdc++-v3/include/c/cfloat b/libstdc++-v3/include/c/cfloat +index 81d9772ed9f6..660440fc810b 100644 +--- a/libstdc++-v3/include/c/cfloat ++++ b/libstdc++-v3/include/c/cfloat +@@ -32,6 +32,6 @@ + #pragma GCC system_header + + #include +-#include_next ++#include + + #endif +diff --git a/libstdc++-v3/include/c/climits b/libstdc++-v3/include/c/climits +index 255bed411259..919e1ec4855d 100644 +--- a/libstdc++-v3/include/c/climits ++++ b/libstdc++-v3/include/c/climits +@@ -32,6 +32,6 @@ + #pragma GCC system_header + + #include +-#include_next ++#include + + #endif +diff --git a/libstdc++-v3/include/c/clocale b/libstdc++-v3/include/c/clocale +index 4258df1958b6..95357d40ca1b 100644 +--- a/libstdc++-v3/include/c/clocale ++++ b/libstdc++-v3/include/c/clocale +@@ -31,6 +31,6 @@ + + #pragma GCC system_header + +-#include_next ++#include + + #endif +diff --git a/libstdc++-v3/include/c/cmath b/libstdc++-v3/include/c/cmath +index 43020eee9d29..619031ba8e4a 100644 +--- a/libstdc++-v3/include/c/cmath ++++ b/libstdc++-v3/include/c/cmath +@@ -33,7 +33,7 @@ + + #include + +-#include_next ++#include + + // Get rid of those macros defined in in lieu of real functions. + #undef abs +diff --git a/libstdc++-v3/include/c/csetjmp b/libstdc++-v3/include/c/csetjmp +index 4a5b0334590f..4a7744ba1c7e 100644 +--- a/libstdc++-v3/include/c/csetjmp ++++ b/libstdc++-v3/include/c/csetjmp +@@ -31,7 +31,7 @@ + + #pragma GCC system_header + +-#include_next ++#include + + // Get rid of those macros defined in in lieu of real functions. + #undef longjmp +diff --git a/libstdc++-v3/include/c/csignal b/libstdc++-v3/include/c/csignal +index 040b48368f94..afe91f7c7866 100644 +--- a/libstdc++-v3/include/c/csignal ++++ b/libstdc++-v3/include/c/csignal +@@ -31,6 +31,6 @@ + + #pragma GCC system_header + +-#include_next ++#include + + #endif +diff --git a/libstdc++-v3/include/c/cstdarg b/libstdc++-v3/include/c/cstdarg +index 5d97e043da84..568dc07994f6 100644 +--- a/libstdc++-v3/include/c/cstdarg ++++ b/libstdc++-v3/include/c/cstdarg +@@ -32,6 +32,6 @@ + #pragma GCC system_header + + #undef __need___va_list +-#include_next ++#include + + #endif +diff --git a/libstdc++-v3/include/c/cstddef b/libstdc++-v3/include/c/cstddef +index 4fd889a1dffc..28997b73a647 100644 +--- a/libstdc++-v3/include/c/cstddef ++++ b/libstdc++-v3/include/c/cstddef +@@ -35,6 +35,6 @@ + #define __need_ptrdiff_t + #define __need_NULL + #define __need_offsetof +-#include_next ++#include + + #endif +diff --git a/libstdc++-v3/include/c/cstdio b/libstdc++-v3/include/c/cstdio +index 01293054d501..6632e5b09586 100644 +--- a/libstdc++-v3/include/c/cstdio ++++ b/libstdc++-v3/include/c/cstdio +@@ -31,7 +31,7 @@ + + #pragma GCC system_header + +-#include_next ++#include + + // Get rid of those macros defined in in lieu of real functions. + #undef clearerr +diff --git a/libstdc++-v3/include/c/cstdlib b/libstdc++-v3/include/c/cstdlib +index f5707f8a8ce4..4156882e09aa 100644 +--- a/libstdc++-v3/include/c/cstdlib ++++ b/libstdc++-v3/include/c/cstdlib +@@ -31,6 +31,6 @@ + + #pragma GCC system_header + +-#include_next ++#include + + #endif +diff --git a/libstdc++-v3/include/c/cstring b/libstdc++-v3/include/c/cstring +index 0082080fcab0..209ccd112faa 100644 +--- a/libstdc++-v3/include/c/cstring ++++ b/libstdc++-v3/include/c/cstring +@@ -31,6 +31,6 @@ + + #pragma GCC system_header + +-#include_next ++#include + + #endif +diff --git a/libstdc++-v3/include/c/ctime b/libstdc++-v3/include/c/ctime +index 5476ff7da399..33c61aa08d73 100644 +--- a/libstdc++-v3/include/c/ctime ++++ b/libstdc++-v3/include/c/ctime +@@ -31,6 +31,6 @@ + + #pragma GCC system_header + +-#include_next ++#include + + #endif +diff --git a/libstdc++-v3/include/c/cuchar b/libstdc++-v3/include/c/cuchar +index 430d1ff50ba1..7b2c9d738269 100644 +--- a/libstdc++-v3/include/c/cuchar ++++ b/libstdc++-v3/include/c/cuchar +@@ -39,7 +39,7 @@ + #include + + #if _GLIBCXX_USE_C11_UCHAR_CXX11 +-# include_next ++# include + #endif + + #endif // C++11 +diff --git a/libstdc++-v3/include/c/cwchar b/libstdc++-v3/include/c/cwchar +index 7a62eb74abbf..c1857099ef12 100644 +--- a/libstdc++-v3/include/c/cwchar ++++ b/libstdc++-v3/include/c/cwchar +@@ -36,7 +36,7 @@ + #include + + #if _GLIBCXX_HAVE_WCHAR_H +-#include_next ++#include + #endif + + // Need to do a bit of trickery here with mbstate_t as char_traits +diff --git a/libstdc++-v3/include/c/cwctype b/libstdc++-v3/include/c/cwctype +index 011ceadbb1b4..6a67549ea4bd 100644 +--- a/libstdc++-v3/include/c/cwctype ++++ b/libstdc++-v3/include/c/cwctype +@@ -34,7 +34,7 @@ + #include + + #if _GLIBCXX_HAVE_WCTYPE_H +-#include_next ++#include + #endif + + #endif +diff --git a/libstdc++-v3/include/c_global/cmath b/libstdc++-v3/include/c_global/cmath +index 114b0693151e..bea5665a293d 100644 +--- a/libstdc++-v3/include/c_global/cmath ++++ b/libstdc++-v3/include/c_global/cmath +@@ -44,7 +44,7 @@ + #include + #include + #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS +-#include_next ++#include + #undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS + #include + +diff --git a/libstdc++-v3/include/c_global/cstdlib b/libstdc++-v3/include/c_global/cstdlib +index 7bb11f5b788a..5a6a28898221 100644 +--- a/libstdc++-v3/include/c_global/cstdlib ++++ b/libstdc++-v3/include/c_global/cstdlib +@@ -76,7 +76,7 @@ namespace std + // Need to ensure this finds the C library's not a libstdc++ + // wrapper that might already be installed later in the include search path. + #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS +-#include_next ++#include + #undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS + #include + +-- +2.49.0 + diff --git a/packages/gcc/14.3.0/0005-Allow-default-libc-to-be-specified-to-configure.patch b/packages/gcc/14.3.0/0005-Allow-default-libc-to-be-specified-to-configure.patch new file mode 100644 index 0000000000..b55b8a1b97 --- /dev/null +++ b/packages/gcc/14.3.0/0005-Allow-default-libc-to-be-specified-to-configure.patch @@ -0,0 +1,141 @@ +From d87c4fb35576c61b75c0a003f9bbccea8321b3a3 Mon Sep 17 00:00:00 2001 +From: Keith Packard +Date: Fri, 2 Sep 2022 23:07:05 -0700 +Subject: [PATCH] Allow default libc to be specified to configure + +The default C library is normally computed based on the target +triplet. However, for embedded systems, it can be useful to leave the +triplet alone while changing which C library is used by default. Other +C libraries may still be available on the system so the compiler and +can be used by specifying suitable include and library paths at build +time. + +If an unknown --with-default-libc= value is provided, emit an error +and stop. + +Signed-off-by: Keith Packard +--- + gcc/config.gcc | 48 ++++++++++++++++++++++++++++++++++++++++-------- + gcc/configure.ac | 4 ++++ + 2 files changed, 44 insertions(+), 8 deletions(-) + +diff --git a/gcc/config.gcc b/gcc/config.gcc +index a3566f5c77da..f993b4b26c4c 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -695,6 +695,8 @@ esac + # Common C libraries. + tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4" + ++default_libc="" ++ + # 32-bit x86 processors supported by --with-arch=. Each processor + # MUST be separated by exactly one space. + x86_archs="athlon athlon-4 athlon-fx athlon-mp athlon-tbird \ +@@ -911,16 +913,16 @@ case ${target} in + esac + case $target in + *-*-*android*) +- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_BIONIC" ++ default_libc=LIBC_BIONIC + ;; + *-*-*uclibc* | *-*-uclinuxfdpiceabi) +- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC" ++ default_libc=LIBC_UCLIBC + ;; + *-*-*musl*) +- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL" ++ default_libc=LIBC_MUSL + ;; + *) +- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC" ++ default_libc=LIBC_GLIBC + ;; + esac + # Assume that glibc or uClibc or Bionic are being used and so __cxa_atexit +@@ -1035,7 +1037,8 @@ case ${target} in + case ${enable_threads} in + "" | yes | posix) thread_file='posix' ;; + esac +- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC SINGLE_LIBC" ++ tm_defines="$tm_defines SINGLE_LIBC" ++ default_libc=LIBC_UCLIBC + ;; + *-*-rdos*) + use_gcc_stdint=wrap +@@ -1721,13 +1724,13 @@ csky-*-*) + + case ${target} in + csky-*-linux-gnu*) +- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC" ++ default_libc=LIBC_GLIBC + # Force .init_array support. The configure script cannot always + # automatically detect that GAS supports it, yet we require it. + gcc_cv_initfini_array=yes + ;; + csky-*-linux-uclibc*) +- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC" ++ default_libc=LIBC_UCLIBC + default_use_cxa_atexit=no + ;; + *) +@@ -3125,7 +3128,7 @@ powerpc*-wrs-vxworks7r*) + tmake_file="${tmake_file} t-linux rs6000/t-linux64 rs6000/t-fprules rs6000/t-ppccomm" + tmake_file="${tmake_file} rs6000/t-vxworks" + +- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC" ++ default_libc=LIBC_GLIBC + extra_objs="$extra_objs linux.o rs6000-linux.o" + ;; + powerpc-wrs-vxworks*) +@@ -6079,3 +6082,32 @@ i[34567]86-*-* | x86_64-*-*) + fi + ;; + esac ++ ++case "${with_default_libc}" in ++glibc) ++ default_libc=LIBC_GLIBC ++ ;; ++uclibc) ++ default_libc=LIBC_UCLIBC ++ ;; ++bionic) ++ default_libc=LIBC_BIONIC ++ ;; ++musl) ++ default_libc=LIBC_MUSL ++ ;; ++"") ++ ;; ++*) ++ echo "Unknown libc in --with-default-libc=$with_default_libc" 1>&2 ++ exit 1 ++ ;; ++esac ++ ++case "$default_libc" in ++"") ++ ;; ++*) ++ tm_defines="$tm_defines DEFAULT_LIBC=$default_libc" ++ ;; ++esac +diff --git a/gcc/configure.ac b/gcc/configure.ac +index cb743b5a875a..5213bf64a6d4 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -2561,6 +2561,10 @@ if { { test x$host != x$target && test "x$with_sysroot" = x ; } || + fi + AC_SUBST(inhibit_libc) + ++AC_ARG_WITH(default-libc, ++ [AS_HELP_STRING([--with-default-libc], ++ [Use specified default C library])]) ++ + # When building gcc with a cross-compiler, we need to adjust things so + # that the generator programs are still built with the native compiler. + # Also, we cannot run fixincludes. +-- +2.49.0 + diff --git a/packages/gcc/14.3.0/0006-driver-Extend-getenv-function-to-allow-default-value.patch b/packages/gcc/14.3.0/0006-driver-Extend-getenv-function-to-allow-default-value.patch new file mode 100644 index 0000000000..e262eb5847 --- /dev/null +++ b/packages/gcc/14.3.0/0006-driver-Extend-getenv-function-to-allow-default-value.patch @@ -0,0 +1,102 @@ +From 2663eed443ff0cb465f28c0598713dc6ca83feeb Mon Sep 17 00:00:00 2001 +From: Keith Packard +Date: Fri, 26 Aug 2022 14:30:03 -0700 +Subject: [PATCH] driver: Extend 'getenv' function to allow default value + +Right now, a missing environment variable provided to the 'getenv' +function in a .specs file causes a fatal error. That makes writing a +spec file that uses the GCC_EXEC_PREFIX value difficult as that +variable is only set when the driver has been relocated, but not when +run from the defined location. This makes building a relocatable +toolchain difficult to extend to other ancilary pieces which use specs +files to locate header and library files adjacent to the toolchain. + +This patch adds an optional third argument to the getenv function that +can be used to fall back to the standard installation path when the +driver hasn't set GCC_EXEC_PREFIX in the environment. + +For example, if an alternate C library is installed in +${prefix}/extra, then this change allows the specs file to locate that +relative to the gcc directory, if gcc is located in the original +installation directory (which would leave GCC_EXEC_PREFIX unset), or +if the gcc tree has been moved to a different location (where gcc +would set GCC_EXEC_PREFIX itself): + +*cpp: +-isystem %:getenv(GCC_EXEC_PREFIX ../../extra/include ${prefix}/extra/include) + +I considered changing the behavior of either the %R sequence so that +it had a defined behavior when there was no sysroot defined, or making +the driver always set the GCC_EXEC_PREFIX environment variable and +decided that the approach of adding functionality to getenv where it +was previously invalid would cause the least potential for affecting +existing usage. + +Signed-off-by: Keith Packard +--- + gcc/doc/invoke.texi | 18 +++++++++++------- + gcc/gcc.cc | 10 +++++++++- + 2 files changed, 20 insertions(+), 8 deletions(-) + +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index 64728fead512..3f487db6cad7 100644 +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -37065,17 +37065,21 @@ The following built-in spec functions are provided: + + @table @code + @item @code{getenv} +-The @code{getenv} spec function takes two arguments: an environment +-variable name and a string. If the environment variable is not +-defined, a fatal error is issued. Otherwise, the return value is the +-value of the environment variable concatenated with the string. For +-example, if @env{TOPDIR} is defined as @file{/path/to/top}, then: ++ ++The @code{getenv} spec function takes two or three arguments: an ++environment variable name, a string and an optional default value. If ++the environment variable is not defined and a default value is ++provided, that is used as the return value; otherwise a fatal error is ++issued. Otherwise, the return value is the value of the environment ++variable concatenated with the string. For example, if @env{TOPDIR} ++is defined as @file{/path/to/top}, then: + + @smallexample +-%:getenv(TOPDIR /include) ++%:getenv(TOPDIR /include /path/to/default/include) + @end smallexample + +-expands to @file{/path/to/top/include}. ++expands to @file{/path/to/top/include}. If @env{TOPDIR} is not ++defined, then this expands to @file{/path/to/default/include}. + + @item @code{if-exists} + The @code{if-exists} spec function takes one argument, an absolute +diff --git a/gcc/gcc.cc b/gcc/gcc.cc +index fc9f1f545dc8..8e6e25d935be 100644 +--- a/gcc/gcc.cc ++++ b/gcc/gcc.cc +@@ -10318,12 +10318,20 @@ getenv_spec_function (int argc, const char **argv) + char *ptr; + size_t len; + +- if (argc != 2) ++ if (argc != 2 && argc != 3) + return NULL; + + varname = argv[0]; + value = env.get (varname); + ++ if (!value && argc == 3) ++ { ++ value = argv[2]; ++ result = XNEWVAR(char, strlen(value) + 1); ++ strcpy(result, value); ++ return result; ++ } ++ + /* If the variable isn't defined and this is allowed, craft our expected + return value. Assume variable names used in specs strings don't contain + any active spec character so don't need escaping. */ +-- +2.49.0 + diff --git a/packages/gcc/14.3.0/0007-Add-newlib-and-picolibc-as-default-C-library-choices.patch b/packages/gcc/14.3.0/0007-Add-newlib-and-picolibc-as-default-C-library-choices.patch new file mode 100644 index 0000000000..cfc815574c --- /dev/null +++ b/packages/gcc/14.3.0/0007-Add-newlib-and-picolibc-as-default-C-library-choices.patch @@ -0,0 +1,42 @@ +From d4b4b5159d270bb4bfec71847d041b4b2d71759d Mon Sep 17 00:00:00 2001 +From: Keith Packard +Date: Tue, 23 Aug 2022 22:12:06 -0700 +Subject: [PATCH] Add newlib and picolibc as default C library choices + +Signed-off-by: Keith Packard +--- + gcc/config.gcc | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/gcc/config.gcc b/gcc/config.gcc +index f993b4b26c4c..bcf23f9d0a42 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -693,7 +693,7 @@ case ${target} in + esac + + # Common C libraries. +-tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4" ++tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4 LIBC_NEWLIB=5 LIBC_PICOLIBC=6" + + default_libc="" + +@@ -6096,6 +6096,15 @@ bionic) + musl) + default_libc=LIBC_MUSL + ;; ++newlib) ++ # Newlib configurations don't set the DEFAULT_LIBC variable, so ++ # avoid changing those by allowing --with-default-libc=newlib but ++ # not actually setting the DEFAULT_LIBC variable. ++ default_libc= ++ ;; ++picolibc) ++ default_libc=LIBC_PICOLIBC ++ ;; + "") + ;; + *) +-- +2.49.0 + diff --git a/packages/gcc/14.3.0/0008-Support-picolibc-targets.patch b/packages/gcc/14.3.0/0008-Support-picolibc-targets.patch new file mode 100644 index 0000000000..20914c3772 --- /dev/null +++ b/packages/gcc/14.3.0/0008-Support-picolibc-targets.patch @@ -0,0 +1,38 @@ +From a3fb1dcf2b7146c1ae6014c655957a775e1ea6b0 Mon Sep 17 00:00:00 2001 +From: Keith Packard +Date: Sun, 12 Feb 2023 14:23:32 -0800 +Subject: [PATCH] Support picolibc targets + +Match *-picolibc-* and select picolibc as the default C library, plus continuing to use +the newlib-based logic for other configuration items. + +Signed-off-by: Keith Packard +--- + gcc/config.gcc | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/gcc/config.gcc b/gcc/config.gcc +index bcf23f9d0a42..f770d21e5d4c 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -1168,6 +1168,17 @@ case ${target} in + ;; + esac + ;; ++*-picolibc-*) ++ # __cxa_atexit is provided. ++ default_use_cxa_atexit=yes ++ use_gcc_stdint=wrap ++ default_libc=LIBC_PICOLIBC ++ case "${with_newlib}-${with_headers}" in ++ no-no) use_gcc_stdint=provide ;; ++ *) ;; ++ esac ++ ;; ++ + *-*-elf|arc*-*-elf*) + # Assume that newlib is being used and so __cxa_atexit is provided. + default_use_cxa_atexit=yes +-- +2.49.0 + diff --git a/packages/gcc/14.3.0/0009-gcc-Allow-g-to-work-differently-from-gcc.patch b/packages/gcc/14.3.0/0009-gcc-Allow-g-to-work-differently-from-gcc.patch new file mode 100644 index 0000000000..9e94f94ee2 --- /dev/null +++ b/packages/gcc/14.3.0/0009-gcc-Allow-g-to-work-differently-from-gcc.patch @@ -0,0 +1,68 @@ +From 905b18c94f5792a2e08caa41576f9cb5d1dad526 Mon Sep 17 00:00:00 2001 +From: Keith Packard +Date: Sat, 11 Feb 2023 23:07:08 -0800 +Subject: [PATCH] gcc: Allow g++ to work differently from gcc + +Compile gcc.cc with -DIN_GPP defined when building g++ so that the +code can respond appropriately for the default target language. This +allows the driver to customize the specs used, selecting different +linker scripts, adjusting the use of crtbegin.o/crtend.o etc. + +By default, this change has no effect; targets need to explicitly +check for IN_GPP to have alternate behavior. + +Signed-off-by: Keith Packard +--- + gcc/cp/Make-lang.in | 7 ++++++- + gcc/gpp.cc | 21 +++++++++++++++++++++ + 2 files changed, 27 insertions(+), 1 deletion(-) + create mode 100644 gcc/gpp.cc + +diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in +index f153891a1ef6..ec980d95e3b4 100644 +--- a/gcc/cp/Make-lang.in ++++ b/gcc/cp/Make-lang.in +@@ -77,7 +77,12 @@ CFLAGS-cp/module.o += -DMODULE_VERSION='$(shell cat s-cp-module-version)' + endif + + # Create the compiler driver for g++. +-GXX_OBJS = $(GCC_OBJS) cp/g++spec.o ++GXX_OBJS = $(GCC_OBJS:gcc.o=gpp.o) cp/g++spec.o ++ ++CFLAGS-gpp.o = $(CFLAGS-gcc.o) ++gpp.o: $(BASEVER) ++gpp.o: gcc.o ++ + xg++$(exeext): $(GXX_OBJS) $(EXTRA_GCC_OBJS) libcommon-target.a $(LIBDEPS) + +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ + $(GXX_OBJS) $(EXTRA_GCC_OBJS) libcommon-target.a \ +diff --git a/gcc/gpp.cc b/gcc/gpp.cc +new file mode 100644 +index 000000000000..3cd7b45e8086 +--- /dev/null ++++ b/gcc/gpp.cc +@@ -0,0 +1,21 @@ ++/* Compiler driver program that can handle many languages. ++ Copyright (C) 1987-2022 Free Software Foundation, Inc. ++ ++This file is part of GCC. ++ ++GCC 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, or (at your option) any later ++version. ++ ++GCC 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 GCC; see the file COPYING3. If not see ++. */ ++ ++#define IN_GPP ++#include "gcc.cc" +-- +2.49.0 + diff --git a/packages/gcc/14.3.0/0010-libgcc-Exclude-UCLIBC-from-GLIBC-thread-check.patch b/packages/gcc/14.3.0/0010-libgcc-Exclude-UCLIBC-from-GLIBC-thread-check.patch new file mode 100644 index 0000000000..46c6788e4e --- /dev/null +++ b/packages/gcc/14.3.0/0010-libgcc-Exclude-UCLIBC-from-GLIBC-thread-check.patch @@ -0,0 +1,35 @@ +From e1c06be963b4048902ee5c19d589b7619d3c5fa2 Mon Sep 17 00:00:00 2001 +From: Chris Packham +Date: Thu, 7 Sep 2023 19:26:49 +1200 +Subject: [PATCH] libgcc: Exclude UCLIBC from GLIBC thread check + +UBLIBC defines __GLIBC__ but also marks __pthread_key_create() as +protected. Leading to link errors with newer binutils such as: + + ld.bfd: isl_test_cpp17.o: non-canonical reference to canonical protected function `__pthread_key_create' in x86_64-multilib-linux-uclibc/sysroot/lib64/libc.so.1 + ld.bfd: failed to set dynamic section sizes: bad value + +Add a condition on !__UCLIBC__ when selecting a symbol to detect pthread +usage so it picks the intended pthread_cancel(). + +Signed-off-by: Chris Packham +--- + libgcc/gthr-posix.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libgcc/gthr-posix.h b/libgcc/gthr-posix.h +index 82e8f9ffcf66..e63d02fb8dcc 100644 +--- a/libgcc/gthr-posix.h ++++ b/libgcc/gthr-posix.h +@@ -246,7 +246,7 @@ __gthread_active_p (void) + library does not provide pthread_cancel, so we do use pthread_create + there (and interceptor libraries lose). */ + +-#ifdef __GLIBC__ ++#if defined(__GLIBC__) && !defined(__UCLIBC__) + __gthrw2(__gthrw_(__pthread_key_create), + __pthread_key_create, + pthread_key_create) +-- +2.49.0 + diff --git a/packages/gcc/14.3.0/chksum b/packages/gcc/14.3.0/chksum new file mode 100644 index 0000000000..2db0b8d1c6 --- /dev/null +++ b/packages/gcc/14.3.0/chksum @@ -0,0 +1,8 @@ +md5 gcc-14.3.0.tar.xz 2e2f25966bbb5321bf6a3beafcd241b5 +sha1 gcc-14.3.0.tar.xz e33b9ffb8baf1528d72a8a26a1ee678928ca9121 +sha256 gcc-14.3.0.tar.xz e0dc77297625631ac8e50fa92fffefe899a4eb702592da5c32ef04e2293aca3a +sha512 gcc-14.3.0.tar.xz cb4e3259640721bbd275c723fe4df53d12f9b1673afb3db274c22c6aa457865dccf2d6ea20b4fd4c591f6152e6d4b87516c402015900f06ce9d43af66d3b7a93 +md5 gcc-14.3.0.tar.gz 1ba56546c0274ea75457bf5c00c61506 +sha1 gcc-14.3.0.tar.gz 1866e57122db9f31ba3117175bf50d46d1146eb8 +sha256 gcc-14.3.0.tar.gz ace8b8b0dbfe6abfc22f821cb093e195aa5498b7ccf7cd23e4424b9f14afed22 +sha512 gcc-14.3.0.tar.gz b2c3ab244f809217eb9d71c2b4e7f7e1d9d8b0c8ab3d4c737939075c1fef528cb4629d1cbec717a4839612f3123ca0ebf81af8398fa42a5bf88f99e12bf223b4 diff --git a/packages/gcc/14.2.0/experimental/0001-picolibc-Add-custom-spec-file-fragments-for-using-pi.patch b/packages/gcc/14.3.0/experimental/0001-picolibc-Add-custom-spec-file-fragments-for-using-pi.patch similarity index 100% rename from packages/gcc/14.2.0/experimental/0001-picolibc-Add-custom-spec-file-fragments-for-using-pi.patch rename to packages/gcc/14.3.0/experimental/0001-picolibc-Add-custom-spec-file-fragments-for-using-pi.patch diff --git a/packages/linux/6.5.11/version.desc b/packages/gcc/14.3.0/version.desc similarity index 100% rename from packages/linux/6.5.11/version.desc rename to packages/gcc/14.3.0/version.desc diff --git a/packages/gcc/14.2.0/0000-libtool-leave-framework-alone.patch b/packages/gcc/15.2.0/0000-libtool-leave-framework-alone.patch similarity index 94% rename from packages/gcc/14.2.0/0000-libtool-leave-framework-alone.patch rename to packages/gcc/15.2.0/0000-libtool-leave-framework-alone.patch index 1a86e41576..b5804ea1b1 100644 --- a/packages/gcc/14.2.0/0000-libtool-leave-framework-alone.patch +++ b/packages/gcc/15.2.0/0000-libtool-leave-framework-alone.patch @@ -4,7 +4,7 @@ --- a/libtool-ldflags +++ b/libtool-ldflags -@@ -36,6 +36,11 @@ +@@ -36,6 +36,11 @@ prev_arg= for arg do case $arg in diff --git a/packages/gcc/14.2.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch b/packages/gcc/15.2.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch similarity index 82% rename from packages/gcc/14.2.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch rename to packages/gcc/15.2.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch index 5f9a07a2b5..3040e23c37 100644 --- a/packages/gcc/14.2.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch +++ b/packages/gcc/15.2.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch @@ -4,7 +4,7 @@ --- a/libcc1/connection.cc +++ b/libcc1/connection.cc -@@ -21,6 +21,7 @@ +@@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. #include #include #include diff --git a/packages/gcc/14.2.0/0002-arm-softfloat-libgcc.patch b/packages/gcc/15.2.0/0002-arm-softfloat-libgcc.patch similarity index 100% rename from packages/gcc/14.2.0/0002-arm-softfloat-libgcc.patch rename to packages/gcc/15.2.0/0002-arm-softfloat-libgcc.patch diff --git a/packages/gcc/14.2.0/0003-libgcc-disable-split-stack-nothreads.patch b/packages/gcc/15.2.0/0003-libgcc-disable-split-stack-nothreads.patch similarity index 100% rename from packages/gcc/14.2.0/0003-libgcc-disable-split-stack-nothreads.patch rename to packages/gcc/15.2.0/0003-libgcc-disable-split-stack-nothreads.patch diff --git a/packages/gcc/14.2.0/0004-Remove-use-of-include_next-from-c-headers.patch b/packages/gcc/15.2.0/0004-Remove-use-of-include_next-from-c-headers.patch similarity index 69% rename from packages/gcc/14.2.0/0004-Remove-use-of-include_next-from-c-headers.patch rename to packages/gcc/15.2.0/0004-Remove-use-of-include_next-from-c-headers.patch index 429d3bd39b..2612262a34 100644 --- a/packages/gcc/14.2.0/0004-Remove-use-of-include_next-from-c-headers.patch +++ b/packages/gcc/15.2.0/0004-Remove-use-of-include_next-from-c-headers.patch @@ -41,8 +41,8 @@ Signed-off-by: Keith Packard --- a/libstdc++-v3/include/bits/std_abs.h +++ b/libstdc++-v3/include/bits/std_abs.h -@@ -35,9 +35,9 @@ - #include +@@ -41,9 +41,9 @@ + #pragma GCC diagnostic ignored "-Wlong-long" #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS -#include_next @@ -55,159 +55,171 @@ Signed-off-by: Keith Packard --- a/libstdc++-v3/include/c/cassert +++ b/libstdc++-v3/include/c/cassert -@@ -31,4 +31,4 @@ - #pragma GCC system_header +@@ -36,6 +36,6 @@ + #pragma GCC diagnostic ignored "-Wpedantic" // include_next #include -#include_next +#include + + #pragma GCC diagnostic pop --- a/libstdc++-v3/include/c/cctype +++ b/libstdc++-v3/include/c/cctype -@@ -31,6 +31,6 @@ - - #pragma GCC system_header +@@ -36,7 +36,7 @@ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpedantic" // include_next -#include_next +#include - #endif + #pragma GCC diagnostic pop + --- a/libstdc++-v3/include/c/cerrno +++ b/libstdc++-v3/include/c/cerrno -@@ -41,7 +41,7 @@ - #pragma GCC system_header +@@ -46,7 +46,7 @@ + #pragma GCC diagnostic ignored "-Wpedantic" // include_next #include -#include_next +#include - // Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998 - #ifndef errno + #pragma GCC diagnostic pop + --- a/libstdc++-v3/include/c/cfloat +++ b/libstdc++-v3/include/c/cfloat -@@ -32,6 +32,6 @@ - #pragma GCC system_header +@@ -37,7 +37,7 @@ + #pragma GCC diagnostic ignored "-Wpedantic" // include_next #include -#include_next +#include - #endif + #pragma GCC diagnostic pop + --- a/libstdc++-v3/include/c/climits +++ b/libstdc++-v3/include/c/climits -@@ -32,6 +32,6 @@ - #pragma GCC system_header +@@ -37,7 +37,7 @@ + #pragma GCC diagnostic ignored "-Wpedantic" // include_next #include -#include_next +#include - #endif + #pragma GCC diagnostic pop + --- a/libstdc++-v3/include/c/clocale +++ b/libstdc++-v3/include/c/clocale -@@ -31,6 +31,6 @@ - - #pragma GCC system_header +@@ -36,7 +36,7 @@ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpedantic" // include_next -#include_next +#include - #endif + #pragma GCC diagnostic pop + --- a/libstdc++-v3/include/c/cmath +++ b/libstdc++-v3/include/c/cmath -@@ -33,7 +33,7 @@ - - #include +@@ -38,7 +38,7 @@ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpedantic" // include_next -#include_next +#include - // Get rid of those macros defined in in lieu of real functions. - #undef abs + #pragma GCC diagnostic pop + --- a/libstdc++-v3/include/c/csetjmp +++ b/libstdc++-v3/include/c/csetjmp -@@ -31,7 +31,7 @@ - - #pragma GCC system_header +@@ -36,7 +36,7 @@ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpedantic" // include_next -#include_next +#include - // Get rid of those macros defined in in lieu of real functions. - #undef longjmp + #pragma GCC diagnostic pop + --- a/libstdc++-v3/include/c/csignal +++ b/libstdc++-v3/include/c/csignal -@@ -31,6 +31,6 @@ - - #pragma GCC system_header +@@ -36,7 +36,7 @@ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpedantic" // include_next -#include_next +#include - #endif + #pragma GCC diagnostic pop + --- a/libstdc++-v3/include/c/cstdarg +++ b/libstdc++-v3/include/c/cstdarg -@@ -32,6 +32,6 @@ - #pragma GCC system_header +@@ -37,7 +37,7 @@ + #pragma GCC diagnostic ignored "-Wpedantic" // include_next #undef __need___va_list -#include_next +#include - #endif + #pragma GCC diagnostic pop + --- a/libstdc++-v3/include/c/cstddef +++ b/libstdc++-v3/include/c/cstddef -@@ -35,6 +35,6 @@ +@@ -40,7 +40,7 @@ #define __need_ptrdiff_t #define __need_NULL #define __need_offsetof -#include_next +#include - #endif + #pragma GCC diagnostic pop + --- a/libstdc++-v3/include/c/cstdio +++ b/libstdc++-v3/include/c/cstdio -@@ -31,7 +31,7 @@ - - #pragma GCC system_header +@@ -36,7 +36,7 @@ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpedantic" // include_next -#include_next +#include - // Get rid of those macros defined in in lieu of real functions. - #undef clearerr + #pragma GCC diagnostic pop + --- a/libstdc++-v3/include/c/cstdlib +++ b/libstdc++-v3/include/c/cstdlib -@@ -31,6 +31,6 @@ - - #pragma GCC system_header +@@ -36,7 +36,7 @@ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpedantic" // include_next -#include_next +#include - #endif + #pragma GCC diagnostic pop + --- a/libstdc++-v3/include/c/cstring +++ b/libstdc++-v3/include/c/cstring -@@ -31,6 +31,6 @@ - - #pragma GCC system_header +@@ -36,7 +36,7 @@ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpedantic" // include_next -#include_next +#include - #endif + #pragma GCC diagnostic pop + --- a/libstdc++-v3/include/c/ctime +++ b/libstdc++-v3/include/c/ctime -@@ -31,6 +31,6 @@ - - #pragma GCC system_header +@@ -36,7 +36,7 @@ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpedantic" // include_next -#include_next +#include - #endif + #pragma GCC diagnostic pop + --- a/libstdc++-v3/include/c/cuchar +++ b/libstdc++-v3/include/c/cuchar -@@ -39,7 +39,7 @@ +@@ -41,7 +41,7 @@ #include #if _GLIBCXX_USE_C11_UCHAR_CXX11 @@ -218,18 +230,18 @@ Signed-off-by: Keith Packard #endif // C++11 --- a/libstdc++-v3/include/c/cwchar +++ b/libstdc++-v3/include/c/cwchar -@@ -36,7 +36,7 @@ - #include +@@ -41,7 +41,7 @@ + #pragma GCC diagnostic ignored "-Wpedantic" // include_next #if _GLIBCXX_HAVE_WCHAR_H -#include_next +#include #endif - // Need to do a bit of trickery here with mbstate_t as char_traits + #pragma GCC diagnostic pop --- a/libstdc++-v3/include/c/cwctype +++ b/libstdc++-v3/include/c/cwctype -@@ -34,7 +34,7 @@ +@@ -39,7 +39,7 @@ #include #if _GLIBCXX_HAVE_WCTYPE_H @@ -237,26 +249,26 @@ Signed-off-by: Keith Packard +#include #endif - #endif + #pragma GCC diagnostic pop --- a/libstdc++-v3/include/c_global/cmath +++ b/libstdc++-v3/include/c_global/cmath -@@ -44,7 +44,7 @@ - #include - #include +@@ -52,7 +52,7 @@ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpedantic" // include_next #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS -#include_next +#include #undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS - #include + #pragma GCC diagnostic pop --- a/libstdc++-v3/include/c_global/cstdlib +++ b/libstdc++-v3/include/c_global/cstdlib -@@ -76,7 +76,7 @@ - // Need to ensure this finds the C library's not a libstdc++ - // wrapper that might already be installed later in the include search path. +@@ -80,7 +80,7 @@ namespace std + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpedantic" // include_next #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS -#include_next +#include #undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS - #include + #pragma GCC diagnostic pop diff --git a/packages/gcc/14.2.0/0005-Allow-default-libc-to-be-specified-to-configure.patch b/packages/gcc/15.2.0/0005-Allow-default-libc-to-be-specified-to-configure.patch similarity index 92% rename from packages/gcc/14.2.0/0005-Allow-default-libc-to-be-specified-to-configure.patch rename to packages/gcc/15.2.0/0005-Allow-default-libc-to-be-specified-to-configure.patch index 9a7a2a855c..4dee0f3822 100644 --- a/packages/gcc/14.2.0/0005-Allow-default-libc-to-be-specified-to-configure.patch +++ b/packages/gcc/15.2.0/0005-Allow-default-libc-to-be-specified-to-configure.patch @@ -21,7 +21,7 @@ Signed-off-by: Keith Packard --- a/gcc/config.gcc +++ b/gcc/config.gcc -@@ -695,6 +695,8 @@ +@@ -696,6 +696,8 @@ esac # Common C libraries. tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4" @@ -30,7 +30,7 @@ Signed-off-by: Keith Packard # 32-bit x86 processors supported by --with-arch=. Each processor # MUST be separated by exactly one space. x86_archs="athlon athlon-4 athlon-fx athlon-mp athlon-tbird \ -@@ -911,16 +913,16 @@ +@@ -912,16 +914,16 @@ case ${target} in esac case $target in *-*-*android*) @@ -51,7 +51,7 @@ Signed-off-by: Keith Packard ;; esac # Assume that glibc or uClibc or Bionic are being used and so __cxa_atexit -@@ -1035,7 +1037,8 @@ +@@ -1036,7 +1038,8 @@ case ${target} in case ${enable_threads} in "" | yes | posix) thread_file='posix' ;; esac @@ -61,7 +61,7 @@ Signed-off-by: Keith Packard ;; *-*-rdos*) use_gcc_stdint=wrap -@@ -1721,13 +1724,13 @@ +@@ -1747,13 +1750,13 @@ csky-*-*) case ${target} in csky-*-linux-gnu*) @@ -77,7 +77,7 @@ Signed-off-by: Keith Packard default_use_cxa_atexit=no ;; *) -@@ -3125,7 +3128,7 @@ +@@ -3144,7 +3147,7 @@ powerpc*-wrs-vxworks7r*) tmake_file="${tmake_file} t-linux rs6000/t-linux64 rs6000/t-fprules rs6000/t-ppccomm" tmake_file="${tmake_file} rs6000/t-vxworks" @@ -86,7 +86,7 @@ Signed-off-by: Keith Packard extra_objs="$extra_objs linux.o rs6000-linux.o" ;; powerpc-wrs-vxworks*) -@@ -6079,3 +6082,32 @@ +@@ -6161,3 +6164,32 @@ i[34567]86-*-* | x86_64-*-*) fi ;; esac @@ -121,7 +121,7 @@ Signed-off-by: Keith Packard +esac --- a/gcc/configure.ac +++ b/gcc/configure.ac -@@ -2546,6 +2546,10 @@ +@@ -2582,6 +2582,10 @@ if { { test x$host != x$target && test " fi AC_SUBST(inhibit_libc) diff --git a/packages/gcc/14.2.0/0006-driver-Extend-getenv-function-to-allow-default-value.patch b/packages/gcc/15.2.0/0006-driver-Extend-getenv-function-to-allow-default-value.patch similarity index 96% rename from packages/gcc/14.2.0/0006-driver-Extend-getenv-function-to-allow-default-value.patch rename to packages/gcc/15.2.0/0006-driver-Extend-getenv-function-to-allow-default-value.patch index 955ff3cad4..cd29b91cc3 100644 --- a/packages/gcc/14.2.0/0006-driver-Extend-getenv-function-to-allow-default-value.patch +++ b/packages/gcc/15.2.0/0006-driver-Extend-getenv-function-to-allow-default-value.patch @@ -40,7 +40,7 @@ Signed-off-by: Keith Packard --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi -@@ -36963,17 +36963,21 @@ +@@ -37564,17 +37564,21 @@ The following built-in spec functions ar @table @code @item @code{getenv} @@ -71,7 +71,7 @@ Signed-off-by: Keith Packard The @code{if-exists} spec function takes one argument, an absolute --- a/gcc/gcc.cc +++ b/gcc/gcc.cc -@@ -10300,12 +10300,20 @@ +@@ -10338,12 +10338,20 @@ getenv_spec_function (int argc, const ch char *ptr; size_t len; diff --git a/packages/gcc/14.2.0/0007-Add-newlib-and-picolibc-as-default-C-library-choices.patch b/packages/gcc/15.2.0/0007-Add-newlib-and-picolibc-as-default-C-library-choices.patch similarity index 93% rename from packages/gcc/14.2.0/0007-Add-newlib-and-picolibc-as-default-C-library-choices.patch rename to packages/gcc/15.2.0/0007-Add-newlib-and-picolibc-as-default-C-library-choices.patch index 5443630b9f..2f839fad72 100644 --- a/packages/gcc/14.2.0/0007-Add-newlib-and-picolibc-as-default-C-library-choices.patch +++ b/packages/gcc/15.2.0/0007-Add-newlib-and-picolibc-as-default-C-library-choices.patch @@ -10,7 +10,7 @@ Signed-off-by: Keith Packard --- a/gcc/config.gcc +++ b/gcc/config.gcc -@@ -693,7 +693,7 @@ +@@ -694,7 +694,7 @@ case ${target} in esac # Common C libraries. @@ -19,7 +19,7 @@ Signed-off-by: Keith Packard default_libc="" -@@ -6096,6 +6096,15 @@ +@@ -6178,6 +6178,15 @@ bionic) musl) default_libc=LIBC_MUSL ;; diff --git a/packages/gcc/14.2.0/0008-Support-picolibc-targets.patch b/packages/gcc/15.2.0/0008-Support-picolibc-targets.patch similarity index 95% rename from packages/gcc/14.2.0/0008-Support-picolibc-targets.patch rename to packages/gcc/15.2.0/0008-Support-picolibc-targets.patch index 987baf39d9..c52c68d5d7 100644 --- a/packages/gcc/14.2.0/0008-Support-picolibc-targets.patch +++ b/packages/gcc/15.2.0/0008-Support-picolibc-targets.patch @@ -13,7 +13,7 @@ Signed-off-by: Keith Packard --- a/gcc/config.gcc +++ b/gcc/config.gcc -@@ -1168,6 +1168,17 @@ +@@ -1165,6 +1165,17 @@ case ${target} in ;; esac ;; diff --git a/packages/gcc/14.2.0/0009-gcc-Allow-g-to-work-differently-from-gcc.patch b/packages/gcc/15.2.0/0009-gcc-Allow-g-to-work-differently-from-gcc.patch similarity index 97% rename from packages/gcc/14.2.0/0009-gcc-Allow-g-to-work-differently-from-gcc.patch rename to packages/gcc/15.2.0/0009-gcc-Allow-g-to-work-differently-from-gcc.patch index 57a22f98fb..483a2280a8 100644 --- a/packages/gcc/14.2.0/0009-gcc-Allow-g-to-work-differently-from-gcc.patch +++ b/packages/gcc/15.2.0/0009-gcc-Allow-g-to-work-differently-from-gcc.patch @@ -20,7 +20,7 @@ Signed-off-by: Keith Packard --- a/gcc/cp/Make-lang.in +++ b/gcc/cp/Make-lang.in -@@ -77,7 +77,12 @@ +@@ -77,7 +77,12 @@ CFLAGS-cp/module.o += -DMODULE_VERSION=' endif # Create the compiler driver for g++. diff --git a/packages/gcc/14.2.0/0010-libgcc-Exclude-UCLIBC-from-GLIBC-thread-check.patch b/packages/gcc/15.2.0/0010-libgcc-Exclude-UCLIBC-from-GLIBC-thread-check.patch similarity index 96% rename from packages/gcc/14.2.0/0010-libgcc-Exclude-UCLIBC-from-GLIBC-thread-check.patch rename to packages/gcc/15.2.0/0010-libgcc-Exclude-UCLIBC-from-GLIBC-thread-check.patch index c0a32648e0..f5c3e1fd71 100644 --- a/packages/gcc/14.2.0/0010-libgcc-Exclude-UCLIBC-from-GLIBC-thread-check.patch +++ b/packages/gcc/15.2.0/0010-libgcc-Exclude-UCLIBC-from-GLIBC-thread-check.patch @@ -19,7 +19,7 @@ Signed-off-by: Chris Packham --- a/libgcc/gthr-posix.h +++ b/libgcc/gthr-posix.h -@@ -246,7 +246,7 @@ +@@ -270,7 +270,7 @@ __gthread_active_p (void) library does not provide pthread_cancel, so we do use pthread_create there (and interceptor libraries lose). */ diff --git a/packages/gcc/15.2.0/0011-zlib-darwin-fdopen.patch b/packages/gcc/15.2.0/0011-zlib-darwin-fdopen.patch new file mode 100644 index 0000000000..988eb723b7 --- /dev/null +++ b/packages/gcc/15.2.0/0011-zlib-darwin-fdopen.patch @@ -0,0 +1,30 @@ +From 0ddaa7b241d91b0a23ea6c3edc8a0990a77b6b5f Mon Sep 17 00:00:00 2001 +From: Ahmed ARIF +Date: Sat, 20 Dec 2025 22:25:00 +0100 +Subject: [PATCH] zlib: do not redefine fdopen on Darwin + +Apple clang predefines TARGET_OS_MAC, which triggers the classic-Mac +fallback in zutil.h that defines fdopen() to NULL. When stdio.h is later +included, the fdopen prototype gets macro-expanded and the build fails. + +Skip the classic-Mac block on Darwin (where fdopen is available). +--- + zlib/zutil.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/zlib/zutil.h b/zlib/zutil.h +index 0b5b8ad..4e5f4f3 100644 +--- a/zlib/zutil.h ++++ b/zlib/zutil.h +@@ -131,7 +131,7 @@ + #endif + +-#if defined(MACOS) || defined(TARGET_OS_MAC) ++#if (defined(MACOS) || defined(TARGET_OS_MAC)) && !(defined(__APPLE__) && defined(__MACH__)) + # define OS_CODE 7 + # ifndef Z_SOLO + # if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os + # include /* for fdopen */ +-- +2.50.1 + diff --git a/packages/gcc/15.2.0/0020-aarch64-mingw-fix-exception-handling.patch b/packages/gcc/15.2.0/0020-aarch64-mingw-fix-exception-handling.patch new file mode 100644 index 0000000000..cc416e831d --- /dev/null +++ b/packages/gcc/15.2.0/0020-aarch64-mingw-fix-exception-handling.patch @@ -0,0 +1,24 @@ +From: Ahmed ARIF +Date: Thu, 18 Sep 2025 12:00:00 +0000 +Subject: [PATCH] aarch64-mingw: Fix exception handling to respect configure options + +The aarch64-mingw configuration was hardcoding DWARF2_UNWIND_INFO to 0, +forcing SJLJ exceptions regardless of configure options. This patch makes +it respect --disable-sjlj-exceptions like i386-mingw does. + +--- a/gcc/config/aarch64/cygming.h ++++ b/gcc/config/aarch64/cygming.h +@@ -26,8 +26,13 @@ along with GCC; see the file COPYING3. If not see + #undef PREFERRED_DEBUGGING_TYPE + #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG + +-#undef DWARF2_UNWIND_INFO ++#ifndef DWARF2_UNWIND_INFO ++#if (defined (CONFIG_SJLJ_EXCEPTIONS) && !CONFIG_SJLJ_EXCEPTIONS) ++#define DWARF2_UNWIND_INFO 1 ++#else + #define DWARF2_UNWIND_INFO 0 ++#endif ++#endif + + #define FASTCALL_PREFIX '@' diff --git a/packages/gcc/15.2.0/0021-aarch64-Bypass-some-warnings-in-MinGW.patch b/packages/gcc/15.2.0/0021-aarch64-Bypass-some-warnings-in-MinGW.patch new file mode 100644 index 0000000000..8eee30e6da --- /dev/null +++ b/packages/gcc/15.2.0/0021-aarch64-Bypass-some-warnings-in-MinGW.patch @@ -0,0 +1,20 @@ +From 1a6a99e9d9cf5f4672bf2b8a96df28ed4e6f0fb3 Mon Sep 17 00:00:00 2001 +From: Ahmed ARIF +Date: Sun, 21 Sep 2025 16:35:43 +0200 +Subject: [PATCH] Apply 0021-aarch64-Bypass-some-warnings-in-MinGW + +--- + libgcc/config/aarch64/t-mingw | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libgcc/config/aarch64/t-mingw b/libgcc/config/aarch64/t-mingw +index a72a2f701..cff4f8cea 100644 +--- a/libgcc/config/aarch64/t-mingw ++++ b/libgcc/config/aarch64/t-mingw +@@ -1,2 +1,2 @@ + # Bypass hidden attribute warnings in MinGW until it is implemented +-LIBGCC2_CFLAGS += -Wno-error=attributes ++LIBGCC2_CFLAGS += -Wno-error=attributes -Wno-error=missing-prototypes +-- +2.48.1 + diff --git a/packages/gcc/15.2.0/0022-aarch64-Add-stdcall-and-cdecl-attributes.patch b/packages/gcc/15.2.0/0022-aarch64-Add-stdcall-and-cdecl-attributes.patch new file mode 100644 index 0000000000..2b83eb838b --- /dev/null +++ b/packages/gcc/15.2.0/0022-aarch64-Add-stdcall-and-cdecl-attributes.patch @@ -0,0 +1,25 @@ +From f63c04752f8692e317c5f0b294121f2b7287399e Mon Sep 17 00:00:00 2001 +From: Ahmed ARIF +Date: Sun, 21 Sep 2025 16:35:57 +0200 +Subject: [PATCH] Apply 0022-aarch64-Add-stdcall-and-cdecl-attributes + +--- + gcc/config/aarch64/aarch64.cc | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc +index 6d6b6552a..767a8bec6 100644 +--- a/gcc/config/aarch64/aarch64.cc ++++ b/gcc/config/aarch64/aarch64.cc +@@ -870,6 +870,8 @@ static const attribute_spec aarch64_gnu_attributes[] = + { "Advanced SIMD type", 1, 1, false, true, false, true, NULL, NULL }, + { "SVE type", 3, 3, false, true, false, true, NULL, NULL }, + { "SVE sizeless type", 0, 0, false, true, false, true, NULL, NULL }, ++ { "cdecl", 0, 0, false, false, false, false, NULL, NULL }, ++ { "stdcall", 0, 0, false, false, false, false, NULL, NULL }, + #if TARGET_DLLIMPORT_DECL_ATTRIBUTES + { "dllimport", 0, 0, false, false, false, false, handle_dll_attribute, NULL }, + { "dllexport", 0, 0, false, false, false, false, handle_dll_attribute, NULL }, +-- +2.48.1 + diff --git a/packages/gcc/15.2.0/0023-Rename-SEH-functions-for-reuse-in-AArch64.patch b/packages/gcc/15.2.0/0023-Rename-SEH-functions-for-reuse-in-AArch64.patch new file mode 100644 index 0000000000..dc750541e9 --- /dev/null +++ b/packages/gcc/15.2.0/0023-Rename-SEH-functions-for-reuse-in-AArch64.patch @@ -0,0 +1,235 @@ +From b6286a17be0340781180fd3098a840c61c026de7 Mon Sep 17 00:00:00 2001 +From: Ahmed ARIF +Date: Sun, 21 Sep 2025 16:39:37 +0200 +Subject: [PATCH] Apply 0023-Rename-SEH-functions-for-reuse-in-AArch64 + +--- + gcc/config/i386/cygming.h | 14 +++++++------- + gcc/config/i386/i386-protos.h | 7 ------- + gcc/config/mingw/winnt.cc | 20 ++++++++++---------- + gcc/config/mingw/winnt.h | 7 +++++++ + libgcc/config.host | 4 ++-- + libgcc/config/i386/t-seh-eh | 6 ------ + libgcc/config/mingw/t-seh-eh | 6 ++++++ + 7 files changed, 32 insertions(+), 32 deletions(-) + delete mode 100644 libgcc/config/i386/t-seh-eh + create mode 100644 libgcc/config/mingw/t-seh-eh + +diff --git a/gcc/config/i386/cygming.h b/gcc/config/i386/cygming.h +index 3ddcbecb2..172c986d6 100644 +--- a/gcc/config/i386/cygming.h ++++ b/gcc/config/i386/cygming.h +@@ -44,12 +44,12 @@ along with GCC; see the file COPYING3. If not see + #undef TARGET_ASM_UNWIND_EMIT_BEFORE_INSN + #define TARGET_ASM_UNWIND_EMIT_BEFORE_INSN false + #undef TARGET_ASM_FUNCTION_END_PROLOGUE +-#define TARGET_ASM_FUNCTION_END_PROLOGUE i386_pe_seh_end_prologue ++#define TARGET_ASM_FUNCTION_END_PROLOGUE mingw_pe_seh_end_prologue + #undef TARGET_ASM_EMIT_EXCEPT_PERSONALITY +-#define TARGET_ASM_EMIT_EXCEPT_PERSONALITY i386_pe_seh_emit_except_personality ++#define TARGET_ASM_EMIT_EXCEPT_PERSONALITY mingw_pe_seh_emit_except_personality + #undef TARGET_ASM_INIT_SECTIONS +-#define TARGET_ASM_INIT_SECTIONS i386_pe_seh_init_sections +-#define SUBTARGET_ASM_UNWIND_INIT i386_pe_seh_init ++#define TARGET_ASM_INIT_SECTIONS mingw_pe_seh_init_sections ++#define SUBTARGET_ASM_UNWIND_INIT mingw_pe_seh_init + + #undef DEFAULT_ABI + #define DEFAULT_ABI (TARGET_64BIT ? MS_ABI : SYSV_ABI) +@@ -310,18 +310,18 @@ do { \ + do \ + { \ + mingw_pe_declare_type (FILE, NAME, 0, 1); \ +- i386_pe_seh_cold_init (FILE, NAME); \ ++ mingw_pe_seh_cold_init (FILE, NAME); \ + ASM_OUTPUT_LABEL (FILE, NAME); \ + } \ + while (0) + + #undef ASM_DECLARE_FUNCTION_SIZE + #define ASM_DECLARE_FUNCTION_SIZE(FILE,NAME,DECL) \ +- i386_pe_end_function (FILE, NAME, DECL) ++ mingw_pe_end_function (FILE, NAME, DECL) + + #undef ASM_DECLARE_COLD_FUNCTION_SIZE + #define ASM_DECLARE_COLD_FUNCTION_SIZE(FILE,NAME,DECL) \ +- i386_pe_end_cold_function (FILE, NAME, DECL) ++ mingw_pe_end_cold_function (FILE, NAME, DECL) + + /* Add an external function to the list of functions to be declared at + the end of the file. */ +diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h +index bea3fd4b2..1b7db0ee8 100644 +--- a/gcc/config/i386/i386-protos.h ++++ b/gcc/config/i386/i386-protos.h +@@ -321,18 +321,11 @@ extern void i386_pe_asm_output_aligned_decl_common (FILE *, tree, + HOST_WIDE_INT, + HOST_WIDE_INT); + extern void i386_pe_start_function (FILE *, const char *, tree); +-extern void i386_pe_end_function (FILE *, const char *, tree); +-extern void i386_pe_end_cold_function (FILE *, const char *, tree); + extern void i386_pe_assemble_visibility (tree, int); + extern tree i386_pe_mangle_decl_assembler_name (tree, tree); + extern tree i386_pe_mangle_assembler_name (const char *); + +-extern void i386_pe_seh_init (FILE *); +-extern void i386_pe_seh_end_prologue (FILE *); +-extern void i386_pe_seh_cold_init (FILE *, const char *); + extern void i386_pe_seh_unwind_emit (FILE *, rtx_insn *); +-extern void i386_pe_seh_emit_except_personality (rtx); +-extern void i386_pe_seh_init_sections (void); + + /* In winnt-cxx.cc and winnt-stubs.cc */ + extern void i386_pe_adjust_class_at_definition (tree); +diff --git a/gcc/config/mingw/winnt.cc b/gcc/config/mingw/winnt.cc +index 08a761d3a..79c0471d7 100644 +--- a/gcc/config/mingw/winnt.cc ++++ b/gcc/config/mingw/winnt.cc +@@ -882,7 +882,7 @@ struct seh_frame_state + /* Set up data structures beginning output for SEH. */ + + void +-i386_pe_seh_init (FILE *f) ++mingw_pe_seh_init (FILE *f) + { + struct seh_frame_state *seh; + +@@ -910,7 +910,7 @@ i386_pe_seh_init (FILE *f) + /* Emit an assembler directive for the end of the prologue. */ + + void +-i386_pe_seh_end_prologue (FILE *f) ++mingw_pe_seh_end_prologue (FILE *f) + { + if (!TARGET_SEH) + return; +@@ -923,7 +923,7 @@ i386_pe_seh_end_prologue (FILE *f) + /* Emit assembler directives to reconstruct the SEH state. */ + + void +-i386_pe_seh_cold_init (FILE *f, const char *name) ++mingw_pe_seh_cold_init (FILE *f, const char *name) + { + struct seh_frame_state *seh; + HOST_WIDE_INT alloc_offset, offset; +@@ -1006,7 +1006,7 @@ i386_pe_seh_cold_init (FILE *f, const char *name) + /* Emit an assembler directive for the end of the function. */ + + static void +-i386_pe_seh_fini (FILE *f, bool cold) ++mingw_pe_seh_fini (FILE *f, bool cold) + { + struct seh_frame_state *seh; + +@@ -1330,7 +1330,7 @@ i386_pe_seh_unwind_emit (FILE *out_file, rtx_insn *insn) + } + + void +-i386_pe_seh_emit_except_personality (rtx personality) ++mingw_pe_seh_emit_except_personality (rtx personality) + { + int flags = 0; + +@@ -1364,7 +1364,7 @@ i386_pe_seh_emit_except_personality (rtx personality) + } + + void +-i386_pe_seh_init_sections (void) ++mingw_pe_seh_init_sections (void) + { + if (TARGET_SEH) + exception_section = get_unnamed_section (0, output_section_asm_op, +@@ -1383,15 +1383,15 @@ i386_pe_start_function (FILE *f, const char *name, tree decl) + } + + void +-i386_pe_end_function (FILE *f, const char *, tree) ++mingw_pe_end_function (FILE *f, const char *, tree) + { +- i386_pe_seh_fini (f, false); ++ mingw_pe_seh_fini (f, false); + } + + void +-i386_pe_end_cold_function (FILE *f, const char *, tree) ++mingw_pe_end_cold_function (FILE *f, const char *, tree) + { +- i386_pe_seh_fini (f, true); ++ mingw_pe_seh_fini (f, true); + } + + #include "gt-winnt.h" +diff --git a/gcc/config/mingw/winnt.h b/gcc/config/mingw/winnt.h +index fa2d6c09a..c95ee429d 100644 +--- a/gcc/config/mingw/winnt.h ++++ b/gcc/config/mingw/winnt.h +@@ -27,6 +27,8 @@ extern void mingw_pe_asm_lto_start (void); + extern void mingw_pe_asm_lto_end (void); + extern void mingw_pe_declare_type (FILE *, const char *, bool, bool); + extern void mingw_pe_encode_section_info (tree, rtx, int); ++extern void mingw_pe_end_cold_function (FILE *, const char *, tree); ++extern void mingw_pe_end_function (FILE *, const char *, tree); + extern void mingw_pe_file_end (void); + extern void mingw_pe_maybe_record_exported_symbol (tree, const char *, int); + extern void mingw_pe_record_stub (const char *, bool); +@@ -34,6 +36,11 @@ extern unsigned int mingw_pe_section_type_flags (tree, const char *, int); + extern void mingw_pe_unique_section (tree, int); + extern bool mingw_pe_valid_dllimport_attribute_p (const_tree); + ++extern void mingw_pe_seh_init (FILE *); ++extern void mingw_pe_seh_init_sections (void); ++extern void mingw_pe_seh_cold_init (FILE *, const char *); ++extern void mingw_pe_seh_emit_except_personality (rtx); ++extern void mingw_pe_seh_end_prologue (FILE *); + #endif /* not USED_FOR_TARGET. */ + + #endif /* GCC_MINGW_WINNT_H. */ +diff --git a/libgcc/config.host b/libgcc/config.host +index 6a88ee5a2..d59d06c49 100644 +--- a/libgcc/config.host ++++ b/libgcc/config.host +@@ -880,7 +880,7 @@ x86_64-*-cygwin*) + # biarch -m32 with --disable-sjlj-exceptions + tmake_eh_file="i386/t-dw2-eh" + else +- tmake_eh_file="i386/t-seh-eh" ++ tmake_eh_file="mingw/t-seh-eh" + fi + # Shared libgcc DLL install dir depends on cross/native build. + if test x${build} = x${host} ; then +@@ -942,7 +942,7 @@ x86_64-*-mingw*) + tmake_eh_file="i386/t-dw2-eh" + md_unwind_header=i386/w32-unwind.h + else +- tmake_eh_file="i386/t-seh-eh" ++ tmake_eh_file="mingw/t-seh-eh" + fi + # Shared libgcc DLL install dir depends on cross/native build. + if test x${build} = x${host} ; then +diff --git a/libgcc/config/i386/t-seh-eh b/libgcc/config/i386/t-seh-eh +deleted file mode 100644 +index 28b2411..0000000 +--- a/libgcc/config/i386/t-seh-eh ++++ /dev/null +@@ -1,6 +0,0 @@ +- +-# We are using SEH EH. +-EH_MODEL = seh +- +-# Use SEH exception handling. +-LIB2ADDEH = $(srcdir)/unwind-seh.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c +diff --git a/libgcc/config/mingw/t-seh-eh b/libgcc/config/mingw/t-seh-eh +new file mode 100644 +index 0000000..28b2411 +--- /dev/null ++++ b/libgcc/config/mingw/t-seh-eh +@@ -0,0 +1,6 @@ ++ ++# We are using SEH EH. ++EH_MODEL = seh ++ ++# Use SEH exception handling. ++LIB2ADDEH = $(srcdir)/unwind-seh.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c +-- +2.48.1 + diff --git a/packages/gcc/15.2.0/0024-aarch64-Add-SEH-stack-unwinding-and-C-exceptions.patch b/packages/gcc/15.2.0/0024-aarch64-Add-SEH-stack-unwinding-and-C-exceptions.patch new file mode 100644 index 0000000000..61c4abe2b9 --- /dev/null +++ b/packages/gcc/15.2.0/0024-aarch64-Add-SEH-stack-unwinding-and-C-exceptions.patch @@ -0,0 +1,609 @@ +From 777e0c512b1159c501023a91d458f7610461dcad Mon Sep 17 00:00:00 2001 +From: Ahmed ARIF +Date: Sun, 21 Sep 2025 17:03:21 +0200 +Subject: [PATCH] Apply 0024-aarch64-Add-SEH-stack-unwinding-and-C++ exceptions + +--- + gcc/common/config/aarch64/aarch64-common.cc | 30 +++ + gcc/config/aarch64/aarch64.cc | 15 ++ + gcc/config/aarch64/cygming.h | 51 +++- + gcc/config/mingw/winnt.cc | 258 +++++++++++++++++++- + libgcc/config.host | 2 +- + libgcc/unwind-seh.c | 37 ++- + 6 files changed, 380 insertions(+), 13 deletions(-) + +diff --git a/gcc/common/config/aarch64/aarch64-common.cc b/gcc/common/config/aarch64/aarch64-common.cc +index b9ed83642..431e9b858 100644 +--- a/gcc/common/config/aarch64/aarch64-common.cc ++++ b/gcc/common/config/aarch64/aarch64-common.cc +@@ -811,6 +811,36 @@ is_host_cpu_not_armv8_base (int argc, const char **argv) + return ""; + } + ++#if TARGET_AARCH64_MS_ABI ++ ++/* Implement TARGET_EXCEPT_UNWIND_INFO. */ ++ ++static enum unwind_info_type ++aarch64_except_unwind_info (struct gcc_options *opts) ++{ ++ /* Honor the --enable-sjlj-exceptions configure switch. */ ++#ifdef CONFIG_SJLJ_EXCEPTIONS ++ if (CONFIG_SJLJ_EXCEPTIONS) ++ return UI_SJLJ; ++#endif ++ ++ /* On windows 64, prefer SEH exceptions over anything else. */ ++#if defined (TARGET_AARCH64_MS_ABI) ++ if (opts->x_flag_unwind_tables) ++ return UI_SEH; ++#endif ++ ++ if (DWARF2_UNWIND_INFO) ++ return UI_DWARF2; ++ ++ return UI_SJLJ; ++} ++ ++#undef TARGET_EXCEPT_UNWIND_INFO ++#define TARGET_EXCEPT_UNWIND_INFO aarch64_except_unwind_info ++ ++#endif // TARGET_AARCH64_MS_ABI ++ + struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER; + + #undef AARCH64_CPU_NAME_LENGTH +diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc +index 767a8bec6..c9a103de5 100644 +--- a/gcc/config/aarch64/aarch64.cc ++++ b/gcc/config/aarch64/aarch64.cc +@@ -12963,6 +12963,12 @@ aarch64_label_mentioned_p (rtx x) + return 0; + } + ++void ++aarch64_print_reg (rtx x, int code, FILE *file) ++{ ++ aarch64_print_operand (file, x, code); ++} ++ + /* Implement REGNO_REG_CLASS. */ + + enum reg_class +@@ -18698,6 +18704,12 @@ aarch64_override_options_after_change_1 (struct gcc_options *opts) + intermediary step for the former. */ + if (flag_mlow_precision_sqrt) + flag_mrecip_low_precision_sqrt = true; ++ ++ /* Enable unwind tables for MS. */ ++#if defined (TARGET_AARCH64_MS_ABI) ++ if (opts->x_flag_unwind_tables == 0) ++ opts->x_flag_unwind_tables = 1; ++#endif // TARGET_AARCH64_MS_ABI + } + + /* 'Unpack' up the internal tuning structs and update the options +@@ -25153,6 +25165,9 @@ aarch64_declare_function_name (FILE *stream, const char* name, + + /* Don't forget the type directive for ELF. */ + ASM_OUTPUT_TYPE_DIRECTIVE (stream, name, "function"); ++#ifdef SUBTARGET_ASM_UNWIND_INIT ++ SUBTARGET_ASM_UNWIND_INIT (stream); ++#endif + ASM_OUTPUT_FUNCTION_LABEL (stream, name, fndecl); + + cfun->machine->label_is_assembled = true; +diff --git a/gcc/config/aarch64/cygming.h b/gcc/config/aarch64/cygming.h +index 47c231395..5ba8a574d 100644 +--- a/gcc/config/aarch64/cygming.h ++++ b/gcc/config/aarch64/cygming.h +@@ -50,14 +50,39 @@ along with GCC; see the file COPYING3. If not see + #define SYMBOL_REF_STUBVAR_P(X) \ + ((SYMBOL_REF_FLAGS (X) & SYMBOL_FLAG_STUBVAR) != 0) + +-/* Disable SEH and declare the required SEH-related macros that are ++/* Declare the required SEH-related macros that are + still needed for compilation. */ + #undef TARGET_SEH +-#define TARGET_SEH 0 ++#define TARGET_SEH 1 + + #define SSE_REGNO_P(N) (gcc_unreachable (), 0) + #define GENERAL_REGNO_P(N) (gcc_unreachable (), 0) +-#define SEH_MAX_FRAME_SIZE (gcc_unreachable (), 0) ++ ++/* Support hooks for SEH. */ ++#undef TARGET_ASM_UNWIND_EMIT ++#define TARGET_ASM_UNWIND_EMIT aarch64_pe_seh_unwind_emit ++#undef TARGET_ASM_UNWIND_EMIT_BEFORE_INSN ++#define TARGET_ASM_UNWIND_EMIT_BEFORE_INSN false ++#undef TARGET_ASM_FUNCTION_END_PROLOGUE ++#define TARGET_ASM_FUNCTION_END_PROLOGUE mingw_pe_seh_end_prologue ++#undef TARGET_ASM_EMIT_EXCEPT_PERSONALITY ++#define TARGET_ASM_EMIT_EXCEPT_PERSONALITY mingw_pe_seh_emit_except_personality ++#undef TARGET_ASM_INIT_SECTIONS ++#define TARGET_ASM_INIT_SECTIONS mingw_pe_seh_init_sections ++#undef SUBTARGET_ASM_UNWIND_INIT ++#define SUBTARGET_ASM_UNWIND_INIT mingw_pe_seh_init ++ ++/* According to Windows x64 software convention, the maximum stack allocatable ++ in the prologue is 4G - 8 bytes. Furthermore, there is a limited set of ++ instructions allowed to adjust the stack pointer in the epilog, forcing the ++ use of frame pointer for frames larger than 2 GB. This theorical limit ++ is reduced by 256, an over-estimated upper bound for the stack use by the ++ prologue. ++ We define only one threshold for both the prolog and the epilog. When the ++ frame size is larger than this threshold, we allocate the area to save SSE ++ regs, then save them, and then allocate the remaining. There is no SEH ++ unwind info for this later allocation. */ ++#define SEH_MAX_FRAME_SIZE ((2U << 30) - 256) + + #undef TARGET_PECOFF + #define TARGET_PECOFF 1 +@@ -75,6 +100,9 @@ still needed for compilation. */ + #define TARGET_ASM_UNIQUE_SECTION mingw_pe_unique_section + #define TARGET_ENCODE_SECTION_INFO mingw_pe_encode_section_info + ++extern void aarch64_pe_seh_unwind_emit (FILE *, rtx_insn *); ++extern void aarch64_print_reg (rtx, int, FILE*); ++ + #define TARGET_VALID_DLLIMPORT_ATTRIBUTE_P mingw_pe_valid_dllimport_attribute_p + + /* Output function declarations at the end of the file. */ +@@ -123,6 +151,7 @@ still needed for compilation. */ + builtin_define ("__MSVCRT__"); \ + builtin_define ("__MINGW32__"); \ + builtin_define ("_WIN32"); \ ++ builtin_define ("__SEH__"); \ + builtin_define_std ("WIN32"); \ + builtin_define_std ("WINNT"); \ + builtin_define_with_int_value ("_INTEGRAL_MAX_BITS", \ +@@ -208,6 +237,14 @@ still needed for compilation. */ + flag_stack_check = STATIC_BUILTIN_STACK_CHECK; \ + } while (0) + ++#undef ASM_DECLARE_FUNCTION_SIZE ++#define ASM_DECLARE_FUNCTION_SIZE(FILE,NAME,DECL) \ ++ mingw_pe_end_function (FILE, NAME, DECL) ++ ++#undef ASM_DECLARE_COLD_FUNCTION_SIZE ++#define ASM_DECLARE_COLD_FUNCTION_SIZE(FILE,NAME,DECL) \ ++ mingw_pe_end_cold_function (FILE, NAME, DECL) ++ + #define SUBTARGET_ATTRIBUTE_TABLE \ + { "selectany", 0, 0, true, false, false, false, \ + mingw_handle_selectany_attribute, NULL } +@@ -233,6 +270,14 @@ still needed for compilation. */ + aarch64_declare_function_name (STREAM, NAME, DECL); \ + } while (0) + ++#define ASM_DECLARE_COLD_FUNCTION_NAME(FILE, NAME, DECL) \ ++ do \ ++ { \ ++ mingw_pe_declare_type (FILE, NAME, 0, 1); \ ++ mingw_pe_seh_cold_init (FILE, NAME); \ ++ ASM_OUTPUT_LABEL (FILE, NAME); \ ++ } \ ++ while (0) + + /* Define this to be nonzero if static stack checking is supported. */ + #define STACK_CHECK_STATIC_BUILTIN 1 +diff --git a/gcc/config/mingw/winnt.cc b/gcc/config/mingw/winnt.cc +index 79c0471d7..8b3ef36a9 100644 +--- a/gcc/config/mingw/winnt.cc ++++ b/gcc/config/mingw/winnt.cc +@@ -169,6 +169,8 @@ mingw_pe_valid_dllimport_attribute_p (const_tree decl) + return true; + } + ++#if !defined (TARGET_AARCH64_MS_ABI) ++ + /* Return string which is the function name, identified by ID, modified + with a suffix consisting of an atsign (@) followed by the number of + bytes of arguments. If ID is NULL use the DECL_NAME as base. If +@@ -224,8 +226,6 @@ gen_stdcall_or_fastcall_suffix (tree decl, tree id, bool fastcall) + return get_identifier (new_str); + } + +-#if !defined (TARGET_AARCH64_MS_ABI) +- + /* Maybe decorate and get a new identifier for the DECL of a stdcall or + fastcall function. The original identifier is supplied in ID. */ + +@@ -925,6 +925,11 @@ mingw_pe_seh_end_prologue (FILE *f) + void + mingw_pe_seh_cold_init (FILE *f, const char *name) + { ++#if defined (TARGET_AARCH64_MS_ABI) ++ mingw_pe_seh_init (f); ++ return; ++#endif ++ + struct seh_frame_state *seh; + HOST_WIDE_INT alloc_offset, offset; + +@@ -1048,6 +1053,14 @@ seh_emit_save (FILE *f, struct seh_frame_state *seh, + rtx reg, HOST_WIDE_INT cfa_offset) + { + const unsigned int regno = REGNO (reg); ++#if defined (TARGET_AARCH64_MS_ABI) ++ fputs ((FP_REGNUM_P (regno) ? " \t.seh_save_freg\t" ++ : GP_REGNUM_P (regno) ? " \t.seh_save_reg\t" ++ : (gcc_unreachable (), "")), f); ++ aarch64_print_reg (reg, 0, f); ++ fprintf (f, ", " HOST_WIDE_INT_PRINT_DEC " \n", abs (cfa_offset)); ++ return; ++#endif + HOST_WIDE_INT offset; + + seh->reg_offset[regno] = cfa_offset; +@@ -1072,8 +1085,12 @@ seh_emit_stackalloc (FILE *f, struct seh_frame_state *seh, + { + /* We're only concerned with prologue stack allocations, which all + are subtractions from the stack pointer. */ ++#if defined (TARGET_AARCH64_MS_ABI) ++ offset = abs (offset); ++#else + gcc_assert (offset < 0); + offset = -offset; ++#endif + + if (seh->cfa_reg == stack_pointer_rtx) + seh->cfa_offset += offset; +@@ -1329,6 +1346,243 @@ i386_pe_seh_unwind_emit (FILE *out_file, rtx_insn *insn) + seh_frame_related_expr (out_file, seh, pat); + } + ++#if defined (TARGET_AARCH64_MS_ABI) ++#define CALLEE_SAVED_REG_NUMBER(r) \ ++ (((r) >= R19_REGNUM && (r) <= R30_REGNUM) \ ++ || ((r) >= V8_REGNUM && (r) <= V15_REGNUM)) ++ ++static HOST_WIDE_INT ++seh_parallel_offset (rtx pat, HOST_WIDE_INT wanted_regnum) ++{ ++ rtx dest, src; ++ HOST_WIDE_INT result = 0; ++ ++ if (GET_CODE (pat) == PARALLEL) ++ { ++ int i, n = XVECLEN (pat, 0); ++ ++ for (i = 0; i < n; ++i) ++ { ++ rtx ele = XVECEXP (pat, 0, i); ++ ++ if (GET_CODE (ele) != SET) ++ continue; ++ ++ dest = SET_DEST (ele); ++ src = SET_SRC (ele); ++ ++ if (GET_CODE (dest) == REG ++ && REGNO (dest) == wanted_regnum ++ && GET_CODE (src) == MEM ++ && GET_CODE (XEXP (src, 0)) == PLUS ++ && XEXP (XEXP (src, 0), 0) == stack_pointer_rtx) ++ { ++ result = INTVAL (XEXP (XEXP (src, 0), 1)); ++ } ++ ++ if (GET_CODE (src) == REG ++ && REGNO (src) == wanted_regnum ++ && GET_CODE (dest) == MEM ++ && GET_CODE (XEXP (dest, 0)) == PLUS ++ && XEXP (XEXP (dest, 0), 0) == stack_pointer_rtx) ++ { ++ result = INTVAL (XEXP (XEXP (dest, 0), 1)); ++ } ++ } ++ } ++ ++ return result; ++} ++ ++static void ++seh_pattern_emit (FILE *f, struct seh_frame_state *seh, rtx pat) ++{ ++ rtx dest, src; ++ ++ if (GET_CODE (pat) == PARALLEL) ++ { ++ int i, n = XVECLEN (pat, 0); ++ HOST_WIDE_INT regno, min_regno = 32; ++ int reg_count = 0; ++ HOST_WIDE_INT increment = 0; ++ ++ for (i = 0; i < n; ++i) ++ { ++ rtx ele = XVECEXP (pat, 0, i); ++ ++ if (GET_CODE (ele) != SET) ++ continue; ++ ++ dest = SET_DEST (ele); ++ src = SET_SRC (ele); ++ ++ if (GET_CODE (dest) == REG ++ && GET_CODE (src) == PLUS ++ && XEXP (src, 0) == stack_pointer_rtx) ++ increment = INTVAL (XEXP (src, 1)); ++ ++ if (!seh->after_prologue && GET_CODE (src) == REG) ++ { ++ regno = REGNO (src); ++ ++ if (CALLEE_SAVED_REG_NUMBER (regno)) ++ { ++ reg_count += 1; ++ min_regno = MIN (regno, min_regno); ++ } ++ } ++ ++ if (seh->after_prologue && GET_CODE (dest) == REG) ++ { ++ regno = REGNO (dest); ++ ++ if (CALLEE_SAVED_REG_NUMBER (regno)) ++ { ++ reg_count += 1; ++ min_regno = MIN (regno, min_regno); ++ } ++ } ++ } ++ ++ if (reg_count == 2) ++ { ++ fprintf (f, "\t.seh_save_%s\tx%ld, %ld\n", ++ increment != 0 ? "regp_x" : "regp", ++ min_regno, ++ increment != 0 ? abs (increment) ++ : seh_parallel_offset (pat, min_regno)); ++ } ++ } ++ else ++ { ++ src = SET_SRC (pat); ++ ++ if (GET_CODE (pat) == SET) ++ { ++ HOST_WIDE_INT increment = 0; ++ dest = SET_DEST (pat); ++ ++ switch (GET_CODE (dest)) ++ { ++ case REG: ++ switch (GET_CODE (src)) ++ { ++ case REG: ++ if (dest == hard_frame_pointer_rtx ++ && src == stack_pointer_rtx) ++ fputs ("\t.seh_set_fp\n", f); ++ else if (CALLEE_SAVED_REG_NUMBER (REGNO (dest)) ++ && src == stack_pointer_rtx) ++ seh_emit_save (f, seh, dest, INTVAL (XEXP (src, 1))); ++ break; ++ ++ case PLUS: ++ increment = INTVAL (XEXP (src, 1)); ++ src = XEXP (src, 0); ++ if (dest == stack_pointer_rtx) ++ seh_emit_stackalloc (f, seh, increment); ++ break; ++ ++ case MEM: ++ src = XEXP (src, 0); ++ if (GET_CODE (src) == PLUS ++ && GET_CODE (XEXP (src, 0)) == REG ++ && CALLEE_SAVED_REG_NUMBER (REGNO (dest)) ++ && XEXP (src, 0) == stack_pointer_rtx) ++ seh_emit_save (f, seh, dest, INTVAL (XEXP (src, 1))); ++ break; ++ ++ default: ++ break; ++ } ++ break; ++ ++ case MEM: ++ dest = XEXP (dest, 0); ++ if (GET_CODE (dest) == PRE_DEC ++ && CALLEE_SAVED_REG_NUMBER (REGNO (src)) ++ && XEXP (dest, 0) == stack_pointer_rtx) ++ seh_emit_save (f, seh, src, INTVAL (XEXP (dest, 1))); ++ else if (GET_CODE (dest) == PLUS ++ && CALLEE_SAVED_REG_NUMBER (REGNO (src)) ++ && XEXP (dest, 0) == stack_pointer_rtx) ++ seh_emit_save (f, seh, src, INTVAL (XEXP (dest, 1))); ++ break; ++ ++ default: ++ break; ++ } ++ } ++ else if (seh->after_prologue ++ && (GET_CODE (pat) == RETURN || GET_CODE (pat) == JUMP_INSN)) ++ fputs ("\t.seh_endepilogue\n", f); ++ } ++} ++ ++/* This function looks at a single insn and emits any SEH directives ++ required for unwind of this insn. */ ++ ++void ++aarch64_pe_seh_unwind_emit (FILE *out_file, rtx_insn *insn) ++{ ++ rtx note, pat; ++ struct seh_frame_state *seh; ++ ++ if (!TARGET_SEH) ++ return; ++ ++ if (NOTE_P (insn)) ++ return; ++ ++ seh = cfun->machine->seh; ++ ++ if (!seh || seh->after_prologue) ++ return; ++ ++ pat = PATTERN (insn); ++ ++ if (GET_CODE (pat) == SET) ++ { ++ rtx dest = SET_DEST (pat); ++ if (GET_CODE (dest) == MEM && GET_CODE (XEXP (dest, 0)) == SCRATCH) ++ return; ++ } ++ ++ bool related_exp_needed = true; ++ ++ for (note = REG_NOTES (insn); note ; note = XEXP (note, 1)) ++ { ++ switch (REG_NOTE_KIND (note)) ++ { ++ case REG_FRAME_RELATED_EXPR: ++ pat = XEXP (note, 0); ++ seh_pattern_emit (out_file, seh, pat); ++ related_exp_needed = false; ++ break; ++ ++ case REG_CFA_EXPRESSION: ++ case REG_CFA_REGISTER: ++ case REG_CFA_ADJUST_CFA: ++ case REG_CFA_OFFSET: ++ related_exp_needed = false; ++ break; ++ ++ default: ++ break; ++ } ++ } ++ ++ if (related_exp_needed) ++ { ++ pat = PATTERN (insn); ++ seh_pattern_emit (out_file, seh, pat); ++ } ++} ++ ++#else ++#define CALLEE_SAVED_REG_NUMBER(r) 0 ++#endif ++ + void + mingw_pe_seh_emit_except_personality (rtx personality) + { +diff --git a/libgcc/config.host b/libgcc/config.host +index d59d06c49..1bc2b56eb 100644 +--- a/libgcc/config.host ++++ b/libgcc/config.host +@@ -473,7 +473,7 @@ aarch64-*-mingw*) + tmake_thr_file="mingw/t-mingw-pthread" + ;; + esac +- tmake_file="${tmake_file} ${cpu_type}/t-no-eh ${tmake_thr_file}" ++ tmake_file="${tmake_file} ${tmake_thr_file} mingw/t-seh-eh" + tmake_file="${tmake_file} t-dfprules" + tmake_file="${tmake_file} ${cpu_type}/t-aarch64" + tmake_file="${tmake_file} ${cpu_type}/t-mingw" +diff --git a/libgcc/unwind-seh.c b/libgcc/unwind-seh.c +index b1ea3262a..ad85a0f29 100644 +--- a/libgcc/unwind-seh.c ++++ b/libgcc/unwind-seh.c +@@ -32,7 +32,7 @@ + + /* At the moment everything is written for x64, but in theory this could + also be used for i386, arm, mips and other extant embedded Windows. */ +-#ifndef __x86_64__ ++#if !defined (__x86_64__) && !defined (__aarch64__) + #error "Unsupported architecture." + #endif + +@@ -209,7 +209,11 @@ _GCC_specific_handler (PEXCEPTION_RECORD ms_exc, void *this_frame, + "installed" the target_ip and RAX value via the arguments + to RtlUnwindEx. All that's left is to set the RDX value + and "continue" to have the context installed. */ ++#ifdef __x86_64__ + ms_disp->ContextRecord->Rdx = ms_exc->ExceptionInformation[3]; ++#elif defined (__aarch64__) ++ ms_disp->ContextRecord->X1 = ms_exc->ExceptionInformation[3]; ++#endif + return ExceptionContinueSearch; + } + +@@ -229,7 +233,11 @@ _GCC_specific_handler (PEXCEPTION_RECORD ms_exc, void *this_frame, + return ExceptionContinueSearch; + } + ++#ifdef __x86_64__ + gcc_context.cfa = ms_disp->ContextRecord->Rsp; ++#elif defined (__aarch64__) ++ gcc_context.cfa = ms_disp->ContextRecord->Sp; ++#endif + gcc_context.ra = ms_disp->ControlPc; + gcc_context.reg[0] = 0xdeadbeef; /* These are write-only. */ + gcc_context.reg[1] = 0xdeadbeef; +@@ -438,6 +446,8 @@ _Unwind_Backtrace(_Unwind_Trace_Fn trace, + CONTEXT ms_context; + struct _Unwind_Context gcc_context; + DISPATCHER_CONTEXT disp_context; ++ ULONG64 ip; ++ ULONG64 sp; + + memset (&ms_history, 0, sizeof(ms_history)); + memset (&gcc_context, 0, sizeof(gcc_context)); +@@ -452,31 +462,44 @@ _Unwind_Backtrace(_Unwind_Trace_Fn trace, + + while (1) + { +- gcc_context.disp->ControlPc = ms_context.Rip; ++ ip = ++#ifdef __x86_64__ ++ ms_context.Rip; ++#elif defined (__aarch64__) ++ ms_context.Pc; ++#endif ++ gcc_context.disp->ControlPc = ip; + gcc_context.disp->FunctionEntry +- = RtlLookupFunctionEntry (ms_context.Rip, &gcc_context.disp->ImageBase, ++ = RtlLookupFunctionEntry (ip, &gcc_context.disp->ImageBase, + &ms_history); + + if (!gcc_context.disp->FunctionEntry) + return _URC_END_OF_STACK; + + gcc_context.disp->LanguageHandler +- = RtlVirtualUnwind (0, gcc_context.disp->ImageBase, ms_context.Rip, ++ = RtlVirtualUnwind (0, gcc_context.disp->ImageBase, ip, + gcc_context.disp->FunctionEntry, &ms_context, + &gcc_context.disp->HandlerData, + &gcc_context.disp->EstablisherFrame, NULL); + + /* Set values that the callback can inspect via _Unwind_GetIP + * and _Unwind_GetCFA. */ +- gcc_context.ra = ms_context.Rip; +- gcc_context.cfa = ms_context.Rsp; ++#ifdef __x86_64__ ++ ip = ms_context.Rip; ++ sp = ms_context.Rsp; ++#elif defined (__aarch64__) ++ ip = ms_context.Pc; ++ sp = ms_context.Sp; ++#endif ++ gcc_context.ra = ip; ++ gcc_context.cfa = sp; + + /* Call trace function. */ + if (trace (&gcc_context, trace_argument) != _URC_NO_REASON) + return _URC_FATAL_PHASE1_ERROR; + + /* ??? Check for invalid stack pointer. */ +- if (ms_context.Rip == 0) ++ if (ip == 0) + return _URC_END_OF_STACK; + } + } +-- +2.48.1 + diff --git a/packages/gcc/15.2.0/0025-aarch64-mingw-fix-gthr-win32-libgcc.patch b/packages/gcc/15.2.0/0025-aarch64-mingw-fix-gthr-win32-libgcc.patch new file mode 100644 index 0000000000..ce702e4fae --- /dev/null +++ b/packages/gcc/15.2.0/0025-aarch64-mingw-fix-gthr-win32-libgcc.patch @@ -0,0 +1,31 @@ +From: Ahmed ARIF +Date: Mon, 01 Dec 2025 12:00:00 +0000 +Subject: [PATCH] aarch64-mingw: ensure gthr-win32-thread is linked into libgcc + +For aarch64-*-mingw*, libgcc currently includes the t-files in the +order: + + t-gthr-win32, then t-seh-eh + +where t-gthr-win32 appends gthr-win32-thread.c to LIB2ADDEH using +`+=`, but t-seh-eh later *overwrites* LIB2ADDEH with `=`, dropping +gthr-win32-thread.c from the build. As a result, the Win32 thread +entry points (__gthr_win32_create, __gthr_win32_join, ...) are +missing from libgcc, and the final libstdc++ link fails with +undefined references to these symbols. + +Mirror the x86_64-*-mingw* logic by including t-seh-eh first and +then t-gthr-win32, so that LIB2ADDEH is initialized by t-seh-eh and +augmented by t-gthr-win32. + +--- a/libgcc/config.host ++++ b/libgcc/config.host +@@ -469,7 +469,7 @@ aarch64*-*-vxworks7*) + tmake_thr_file="mingw/t-mingw-pthread" + ;; + esac +- tmake_file="${tmake_file} ${tmake_thr_file} mingw/t-seh-eh" ++ tmake_file="${tmake_file} mingw/t-seh-eh ${tmake_thr_file}" + tmake_file="${tmake_file} t-dfprules" + tmake_file="${tmake_file} ${cpu_type}/t-aarch64" + tmake_file="${tmake_file} ${cpu_type}/t-mingw" diff --git a/packages/gcc/15.2.0/0026-fix-clang-print-multi-os-directory.patch b/packages/gcc/15.2.0/0026-fix-clang-print-multi-os-directory.patch new file mode 100644 index 0000000000..c4e38d33be --- /dev/null +++ b/packages/gcc/15.2.0/0026-fix-clang-print-multi-os-directory.patch @@ -0,0 +1,236 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ahmed ARIF +Date: Mon, 12 Jan 2026 00:00:00 +0000 +Subject: [PATCH] gcc: fix clang print-multi-os-directory fallback + +When using clang as the host compiler, -print-multi-os-directory may +fail. Add error handling to default to "." when the command fails. + +--- a/libgfortran/configure ++++ b/libgfortran/configure +@@ -5203,7 +5203,10 @@ + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' + fi +- multi_os_directory=`$CC -print-multi-os-directory` ++ multi_os_directory=`$CC -print-multi-os-directory 2>/dev/null` ++ if test $? -ne 0 || test -z "$multi_os_directory"; then ++ multi_os_directory="." ++ fi + case $multi_os_directory in + .) ;; # Avoid trailing /. + *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; +@@ -11734,6 +11737,9 @@ + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` ++ if test $? -ne 0 || test -z "$lt_multi_os_dir"; then ++ lt_multi_os_dir="." ++ fi + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" +--- a/libstdc++-v3/configure ++++ b/libstdc++-v3/configure +@@ -11167,6 +11167,9 @@ + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` ++ if test $? -ne 0 || test -z "$lt_multi_os_dir"; then ++ lt_multi_os_dir="." ++ fi + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" +@@ -55733,7 +55736,10 @@ + glibcxx_toolexecdir='${libdir}/gcc/${host_alias}' + glibcxx_toolexeclibdir='${libdir}' + fi +- multi_os_directory=`$CXX -print-multi-os-directory` ++ multi_os_directory=`$CXX -print-multi-os-directory 2>/dev/null` ++ if test $? -ne 0 || test -z "$multi_os_directory"; then ++ multi_os_directory="." ++ fi + case $multi_os_directory in + .) ;; # Avoid trailing /. + *) glibcxx_toolexeclibdir=$glibcxx_toolexeclibdir/$multi_os_directory ;; +--- a/gcc/configure ++++ b/gcc/configure +@@ -20425,6 +20425,9 @@ + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` ++ if test $? -ne 0 || test -z "$lt_multi_os_dir"; then ++ lt_multi_os_dir="." ++ fi + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" +--- a/libatomic/configure ++++ b/libatomic/configure +@@ -3399,7 +3399,10 @@ + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' + fi +- multi_os_directory=`$CC -print-multi-os-directory` ++ multi_os_directory=`$CC -print-multi-os-directory 2>/dev/null` ++ if test $? -ne 0 || test -z "$multi_os_directory"; then ++ multi_os_directory="." ++ fi + case $multi_os_directory in + .) ;; # Avoid trailing /. + *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; +@@ -10361,6 +10364,9 @@ + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` ++ if test $? -ne 0 || test -z "$lt_multi_os_dir"; then ++ lt_multi_os_dir="." ++ fi + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" +--- a/libgomp/configure ++++ b/libgomp/configure +@@ -3517,7 +3517,10 @@ + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' + fi +- multi_os_directory=`$CC -print-multi-os-directory` ++ multi_os_directory=`$CC -print-multi-os-directory 2>/dev/null` ++ if test $? -ne 0 || test -z "$multi_os_directory"; then ++ multi_os_directory="." ++ fi + case $multi_os_directory in + .) ;; # Avoid trailing /. + *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; +@@ -10374,6 +10377,9 @@ + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` ++ if test $? -ne 0 || test -z "$lt_multi_os_dir"; then ++ lt_multi_os_dir="." ++ fi + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" +--- a/libitm/configure ++++ b/libitm/configure +@@ -3581,7 +3581,10 @@ + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' + fi +- multi_os_directory=`$CC -print-multi-os-directory` ++ multi_os_directory=`$CC -print-multi-os-directory 2>/dev/null` ++ if test $? -ne 0 || test -z "$multi_os_directory"; then ++ multi_os_directory="." ++ fi + case $multi_os_directory in + .) ;; # Avoid trailing /. + *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; +@@ -11036,6 +11039,9 @@ + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` ++ if test $? -ne 0 || test -z "$lt_multi_os_dir"; then ++ lt_multi_os_dir="." ++ fi + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" +--- a/libsanitizer/configure ++++ b/libsanitizer/configure +@@ -5072,7 +5072,10 @@ + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' + fi +- multi_os_directory=`$CC -print-multi-os-directory` ++ multi_os_directory=`$CC -print-multi-os-directory 2>/dev/null` ++ if test $? -ne 0 || test -z "$multi_os_directory"; then ++ multi_os_directory="." ++ fi + case $multi_os_directory in + .) ;; # Avoid trailing /. + *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; +@@ -11380,6 +11383,9 @@ + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` ++ if test $? -ne 0 || test -z "$lt_multi_os_dir"; then ++ lt_multi_os_dir="." ++ fi + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" +--- a/libquadmath/configure ++++ b/libquadmath/configure +@@ -9809,6 +9809,9 @@ + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` ++ if test $? -ne 0 || test -z "$lt_multi_os_dir"; then ++ lt_multi_os_dir="." ++ fi + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" +@@ -12251,7 +12254,10 @@ + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' + fi +- multi_os_directory=`$CC -print-multi-os-directory` ++ multi_os_directory=`$CC -print-multi-os-directory 2>/dev/null` ++ if test $? -ne 0 || test -z "$multi_os_directory"; then ++ multi_os_directory="." ++ fi + case $multi_os_directory in + .) ;; # Avoid trailing /. + *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; +--- a/libssp/configure ++++ b/libssp/configure +@@ -10051,6 +10051,9 @@ + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` ++ if test $? -ne 0 || test -z "$lt_multi_os_dir"; then ++ lt_multi_os_dir="." ++ fi + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" +@@ -11584,7 +11587,10 @@ + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' + fi +- multi_os_directory=`$CC -print-multi-os-directory` ++ multi_os_directory=`$CC -print-multi-os-directory 2>/dev/null` ++ if test $? -ne 0 || test -z "$multi_os_directory"; then ++ multi_os_directory="." ++ fi + case $multi_os_directory in + .) ;; # Avoid trailing /. + *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; +--- a/libvtv/configure ++++ b/libvtv/configure +@@ -4860,7 +4860,10 @@ + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' + fi +- multi_os_directory=`$CC -print-multi-os-directory` ++ multi_os_directory=`$CC -print-multi-os-directory 2>/dev/null` ++ if test $? -ne 0 || test -z "$multi_os_directory"; then ++ multi_os_directory="." ++ fi + case $multi_os_directory in + .) ;; # Avoid trailing /. + *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; +@@ -11274,6 +11277,9 @@ + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` ++ if test $? -ne 0 || test -z "$lt_multi_os_dir"; then ++ lt_multi_os_dir="." ++ fi + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" diff --git a/packages/gcc/15.2.0/chksum b/packages/gcc/15.2.0/chksum new file mode 100644 index 0000000000..e847c511ac --- /dev/null +++ b/packages/gcc/15.2.0/chksum @@ -0,0 +1,8 @@ +md5 gcc-15.2.0.tar.gz cf60f34f786cebd4dfed65ace858a11f +sha1 gcc-15.2.0.tar.gz ba53f88cc7265f7a9039b8943eb31e7568afc54f +sha256 gcc-15.2.0.tar.gz 7294d65cc1a0558cb815af0ca8c7763d86f7a31199794ede3f630c0d1b0a5723 +sha512 gcc-15.2.0.tar.gz 59b9f409b8047ed10954542c7a3404f10bf413ed1a79e78aeeb3dadcc55c13c8d1eef199452d3e271a20b7914c1a197ad8eb0c64a1cfd6a5344316cdefe34199 +md5 gcc-15.2.0.tar.xz b861b092bf1af683c46a8aa2e689a6fd +sha1 gcc-15.2.0.tar.xz e9265c98ae18a6d952a636749d98c475ba2ca006 +sha256 gcc-15.2.0.tar.xz 438fd996826b0c82485a29da03a72d71d6e3541a83ec702df4271f6fe025d24e +sha512 gcc-15.2.0.tar.xz 89047a2e07bd9da265b507b516ed3635adb17491c7f4f67cf090f0bd5b3fc7f2ee6e4cc4008beef7ca884b6b71dffe2bb652b21f01a702e17b468cca2d10b2de diff --git a/packages/gcc/15.2.0/experimental/0001-picolibc-Add-custom-spec-file-fragments-for-using-pi.patch b/packages/gcc/15.2.0/experimental/0001-picolibc-Add-custom-spec-file-fragments-for-using-pi.patch new file mode 100644 index 0000000000..4bbd0c6810 --- /dev/null +++ b/packages/gcc/15.2.0/experimental/0001-picolibc-Add-custom-spec-file-fragments-for-using-pi.patch @@ -0,0 +1,127 @@ +From b0f9ac365f91952f6f920c8e6aa4ddb819f47cc8 Mon Sep 17 00:00:00 2001 +From: Keith Packard +Date: Tue, 23 Aug 2022 22:13:08 -0700 +Subject: [PATCH] picolibc: Add custom spec file fragments for using + picolibc + +The '--oslib=' option allows targets to insert an OS library after the +C library in the LIB_PATH spec file fragment. This library maps a few +POSIX APIs used by picolibc to underlying system capabilities. + +The '--crt0=' option allows targets to use an alternate crt0 in place +of the usual one as provided by Picolibc. + +For example, picolibc provides 'libsemihost' and 'crt0-semihost.o' on +various targets which maps some POSIX APIs to semihosting capabilities +and signals the semihosting environment when 'main' returns. These +would be used by specifying --oslib=semihost --crt0=semihost. + +This patch also takes advantage of the IN_GPP conditional when +building g++ to elide exception handling contents from the executable +when not linking with the g++ driver. + +Signed-off-by: Keith Packard +--- + gcc/config.gcc | 7 +++++++ + gcc/config/picolibc.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ + gcc/config/picolibc.opt | 33 +++++++++++++++++++++++++++++++++ + 3 files changed, 84 insertions(+) + create mode 100644 gcc/config/picolibc.h + create mode 100644 gcc/config/picolibc.opt + +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -6213,3 +6213,10 @@ + tm_defines="$tm_defines DEFAULT_LIBC=$default_libc" + ;; + esac ++ ++case "$default_libc" in ++ LIBC_PICOLIBC) ++ extra_options="${extra_options} picolibc.opt" ++ tm_file="${tm_file} picolibc.h" ++ ;; ++esac +--- /dev/null ++++ b/gcc/config/picolibc.h +@@ -0,0 +1,44 @@ ++/* Configuration common to all targets running Picolibc. ++ Copyright (C) 2023 Free Software Foundation, Inc. ++ ++ This file is part of GCC. ++ ++ GCC 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, or (at your ++ option) any later version. ++ ++ GCC 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. ++ ++ Under Section 7 of GPL version 3, you are granted additional ++ permissions described in the GCC Runtime Library Exception, version ++ 3.1, as published by the Free Software Foundation. ++ ++ You should have received a copy of the GNU General Public License and ++ a copy of the GCC Runtime Library Exception along with this program; ++ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ++ . */ ++ ++#ifdef IN_GPP ++#define PICOLIBC_LD "picolibcpp.ld" ++#define PICOLIBC_BEGIN " crtbegin%O%s" ++#define PICOLIBC_END "crtend%O%s" ++#else ++#define PICOLIBC_LD "picolibc.ld" ++#define PICOLIBC_BEGIN "" ++#define PICOLIBC_END "" ++#endif ++ ++#undef LIB_SPEC ++#define LIB_SPEC "%{!T:-T" PICOLIBC_LD "} --start-group -lc %{-oslib=*:-l%*} %(libgcc) --end-group" ++ ++#undef STARTFILE_SPEC ++#define STARTFILE_SPEC "%{-crt0=*:crt0-%*%O%s; :crt0%O%s}" PICOLIBC_BEGIN ++ ++#undef ENDFILE_SPEC ++#define ENDFILE_SPEC PICOLIBC_END ++ ++#define EH_TABLES_CAN_BE_READ_ONLY 1 +--- /dev/null ++++ b/gcc/config/picolibc.opt +@@ -0,0 +1,33 @@ ++; Processor-independent options for picolibc. ++; ++; Copyright (C) 2022 Free Software Foundation, Inc. ++; ++; This file is part of GCC. ++; ++; GCC 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, or (at your option) any later ++; version. ++; ++; GCC 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 GCC; see the file COPYING3. If not see ++; . ++ ++-oslib ++Driver Separate Alias(-oslib=) ++ ++-oslib= ++Driver Joined ++Specify an OS support library to load after libc. ++ ++-crt0 ++Driver Separate Alias(-crt0=) ++ ++-crt0= ++Driver Joined ++Specify an alternate startup file. diff --git a/packages/linux/6.6.41/version.desc b/packages/gcc/15.2.0/version.desc similarity index 100% rename from packages/linux/6.6.41/version.desc rename to packages/gcc/15.2.0/version.desc diff --git a/packages/gcc/7.5.0/0031-riscv-Add-.type-and-.size-directives-to-riscv-libgcc-funct.patch b/packages/gcc/7.5.0/0031-riscv-Add-.type-and-.size-directives-to-riscv-libgcc-funct.patch new file mode 100644 index 0000000000..e613c62834 --- /dev/null +++ b/packages/gcc/7.5.0/0031-riscv-Add-.type-and-.size-directives-to-riscv-libgcc-funct.patch @@ -0,0 +1,602 @@ +From 3a4c600f389e8c5aa6dcbd6cd14bd0c546af0bb2 Mon Sep 17 00:00:00 2001 +From: Jim Wilson +Date: Sat, 9 Dec 2017 03:00:57 +0000 +Subject: [PATCH] Add .type and .size directives to riscv libgcc functions. + + libgcc/ + * config/riscv/div.S: Use FUNC_* macros. + * config/riscv/muldi3.S, config/riscv/multi3.S: Likewise + * config/riscv/save-restore.S: Likewise. + * config/riscv/riscv-asm.h: New. + +From-SVN: r255521 +--- + libgcc/ChangeLog | 7 ++ + libgcc/config/riscv/div.S | 33 ++--- + libgcc/config/riscv/muldi3.S | 6 +- + libgcc/config/riscv/multi3.S | 13 +- + libgcc/config/riscv/riscv-asm.h | 35 ++++++ + libgcc/config/riscv/save-restore.S | 190 ++++++++++++++++------------- + 6 files changed, 182 insertions(+), 102 deletions(-) + create mode 100644 libgcc/config/riscv/riscv-asm.h + +diff --git a/libgcc/config/riscv/div.S b/libgcc/config/riscv/div.S +index 63d542e846..4366c5ce1d 100644 +--- a/libgcc/config/riscv/div.S ++++ b/libgcc/config/riscv/div.S +@@ -23,6 +23,8 @@ a copy of the GCC Runtime Library Exception along with this program; + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + ++#include "riscv-asm.h" ++ + .text + .align 2 + +@@ -33,8 +35,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + # define __divdi3 __divsi3 + # define __moddi3 __modsi3 + #else +- .globl __udivsi3 +-__udivsi3: ++FUNC_BEGIN (__udivsi3) + /* Compute __udivdi3(a0 << 32, a1 << 32); cast result to uint32_t. */ + sll a0, a0, 32 + sll a1, a1, 32 +@@ -42,9 +43,9 @@ __udivsi3: + jal __udivdi3 + sext.w a0, a0 + jr t0 ++FUNC_END (__udivsi3) + +- .globl __umodsi3 +-__umodsi3: ++FUNC_BEGIN (__umodsi3) + /* Compute __udivdi3((uint32_t)a0, (uint32_t)a1); cast a1 to uint32_t. */ + sll a0, a0, 32 + sll a1, a1, 32 +@@ -54,25 +55,22 @@ __umodsi3: + jal __udivdi3 + sext.w a0, a1 + jr t0 ++FUNC_END (__umodsi3) + +- .globl __modsi3 +- __modsi3 = __moddi3 ++FUNC_ALIAS (__modsi3, __moddi3) + +- .globl __divsi3 +-__divsi3: ++FUNC_BEGIN( __divsi3) + /* Check for special case of INT_MIN/-1. Otherwise, fall into __divdi3. */ + li t0, -1 + beq a1, t0, .L20 + #endif + +- .globl __divdi3 +-__divdi3: ++FUNC_BEGIN (__divdi3) + bltz a0, .L10 + bltz a1, .L11 + /* Since the quotient is positive, fall into __udivdi3. */ + +- .globl __udivdi3 +-__udivdi3: ++FUNC_BEGIN (__udivdi3) + mv a2, a1 + mv a1, a0 + li a0, -1 +@@ -96,14 +94,15 @@ __udivdi3: + bnez a3, .L3 + .L5: + ret ++FUNC_END (__udivdi3) + +- .globl __umoddi3 +-__umoddi3: ++FUNC_BEGIN (__umoddi3) + /* Call __udivdi3(a0, a1), then return the remainder, which is in a1. */ + move t0, ra + jal __udivdi3 + move a0, a1 + jr t0 ++FUNC_END (__umoddi3) + + /* Handle negative arguments to __divdi3. */ + .L10: +@@ -118,9 +117,9 @@ __umoddi3: + jal __udivdi3 + neg a0, a0 + jr t0 ++FUNC_END (__divdi3) + +- .globl __moddi3 +-__moddi3: ++FUNC_BEGIN (__moddi3) + move t0, ra + bltz a1, .L31 + bltz a0, .L32 +@@ -136,6 +135,7 @@ __moddi3: + jal __udivdi3 /* The dividend is hella negative. */ + neg a0, a1 + jr t0 ++FUNC_END (__moddi3) + + #if __riscv_xlen == 64 + /* continuation of __divsi3 */ +@@ -143,4 +143,5 @@ __moddi3: + sll t0, t0, 31 + bne a0, t0, __divdi3 + ret ++FUNC_END (__divsi3) + #endif +diff --git a/libgcc/config/riscv/muldi3.S b/libgcc/config/riscv/muldi3.S +index eb3d9b0df3..7c07878eea 100644 +--- a/libgcc/config/riscv/muldi3.S ++++ b/libgcc/config/riscv/muldi3.S +@@ -23,6 +23,8 @@ a copy of the GCC Runtime Library Exception along with this program; + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + ++#include "riscv-asm.h" ++ + .text + .align 2 + +@@ -31,8 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + # define __muldi3 __mulsi3 + #endif + +- .globl __muldi3 +-__muldi3: ++FUNC_BEGIN (__muldi3) + mv a2, a0 + li a0, 0 + .L1: +@@ -44,3 +45,4 @@ __muldi3: + slli a2, a2, 1 + bnez a1, .L1 + ret ++FUNC_END (__muldi3) +diff --git a/libgcc/config/riscv/multi3.S b/libgcc/config/riscv/multi3.S +index 4d454e6501..a3b89c6520 100644 +--- a/libgcc/config/riscv/multi3.S ++++ b/libgcc/config/riscv/multi3.S +@@ -23,6 +23,8 @@ a copy of the GCC Runtime Library Exception along with this program; + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + ++#include "riscv-asm.h" ++ + .text + .align 2 + +@@ -31,8 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + # define __multi3 __muldi3 + #endif + +- .globl __multi3 +-__multi3: ++FUNC_BEGIN (__multi3) + + #if __riscv_xlen == 32 + /* Our RV64 64-bit routines are equivalent to our RV32 32-bit routines. */ +@@ -79,3 +80,11 @@ __multi3: + mv a0, t2 + mv a1, t4 + jr t0 ++ ++#if __riscv_xlen == 32 ++/* Our RV64 64-bit routines are equivalent to our RV32 32-bit routines. */ ++# undef __muldi3 ++#endif ++ ++FUNC_END (__multi3) ++ +diff --git a/libgcc/config/riscv/riscv-asm.h b/libgcc/config/riscv/riscv-asm.h +new file mode 100644 +index 0000000000..fbfe5f0dbf +--- /dev/null ++++ b/libgcc/config/riscv/riscv-asm.h +@@ -0,0 +1,35 @@ ++/* Copyright (C) 2017 Free Software Foundation, Inc. ++ ++This file 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, or (at your option) any ++later version. ++ ++This file 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. ++ ++Under Section 7 of GPL version 3, you are granted additional ++permissions described in the GCC Runtime Library Exception, version ++3.1, as published by the Free Software Foundation. ++ ++You should have received a copy of the GNU General Public License and ++a copy of the GCC Runtime Library Exception along with this program; ++see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ++. */ ++ ++#define FUNC_TYPE(X) .type X,@function ++#define FUNC_SIZE(X) .size X,.-X ++ ++#define FUNC_BEGIN(X) \ ++ .globl X; \ ++ FUNC_TYPE (X); \ ++X: ++ ++#define FUNC_END(X) \ ++ FUNC_SIZE(X) ++ ++#define FUNC_ALIAS(X,Y) \ ++ .globl X; \ ++ X = Y +diff --git a/libgcc/config/riscv/save-restore.S b/libgcc/config/riscv/save-restore.S +index 2073a73089..c2f1740f42 100644 +--- a/libgcc/config/riscv/save-restore.S ++++ b/libgcc/config/riscv/save-restore.S +@@ -23,39 +23,13 @@ a copy of the GCC Runtime Library Exception along with this program; + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + +- .text ++#include "riscv-asm.h" + +- .globl __riscv_save_12 +- .globl __riscv_save_11 +- .globl __riscv_save_10 +- .globl __riscv_save_9 +- .globl __riscv_save_8 +- .globl __riscv_save_7 +- .globl __riscv_save_6 +- .globl __riscv_save_5 +- .globl __riscv_save_4 +- .globl __riscv_save_3 +- .globl __riscv_save_2 +- .globl __riscv_save_1 +- .globl __riscv_save_0 +- +- .globl __riscv_restore_12 +- .globl __riscv_restore_11 +- .globl __riscv_restore_10 +- .globl __riscv_restore_9 +- .globl __riscv_restore_8 +- .globl __riscv_restore_7 +- .globl __riscv_restore_6 +- .globl __riscv_restore_5 +- .globl __riscv_restore_4 +- .globl __riscv_restore_3 +- .globl __riscv_restore_2 +- .globl __riscv_restore_1 +- .globl __riscv_restore_0 ++ .text + + #if __riscv_xlen == 64 + +-__riscv_save_12: ++FUNC_BEGIN (__riscv_save_12) + .cfi_startproc + # __riscv_save_* routine use t0/x5 as return address + .cfi_return_column 5 +@@ -66,8 +40,8 @@ __riscv_save_12: + .cfi_offset 27, -104 + j .Ls10 + +-__riscv_save_11: +-__riscv_save_10: ++FUNC_BEGIN (__riscv_save_11) ++FUNC_BEGIN (__riscv_save_10) + .cfi_restore 27 + addi sp, sp, -112 + .cfi_def_cfa_offset 112 +@@ -79,8 +53,8 @@ __riscv_save_10: + .cfi_offset 25, -88 + j .Ls8 + +-__riscv_save_9: +-__riscv_save_8: ++FUNC_BEGIN (__riscv_save_9) ++FUNC_BEGIN (__riscv_save_8) + .cfi_restore 25 + .cfi_restore 26 + .cfi_restore 27 +@@ -94,8 +68,8 @@ __riscv_save_8: + .cfi_offset 23, -72 + j .Ls6 + +-__riscv_save_7: +-__riscv_save_6: ++FUNC_BEGIN (__riscv_save_7) ++FUNC_BEGIN (__riscv_save_6) + .cfi_restore 23 + .cfi_restore 24 + .cfi_restore 25 +@@ -111,8 +85,8 @@ __riscv_save_6: + .cfi_offset 21, -56 + j .Ls4 + +-__riscv_save_5: +-__riscv_save_4: ++FUNC_BEGIN (__riscv_save_5) ++FUNC_BEGIN (__riscv_save_4) + .cfi_restore 21 + .cfi_restore 22 + .cfi_restore 24 +@@ -133,8 +107,8 @@ __riscv_save_4: + .cfi_offset 19, -40 + j .Ls2 + +-__riscv_save_3: +-__riscv_save_2: ++FUNC_BEGIN (__riscv_save_3) ++FUNC_BEGIN (__riscv_save_2) + .cfi_restore 19 + .cfi_restore 20 + .cfi_restore 21 +@@ -164,9 +138,20 @@ __riscv_save_2: + sub sp, sp, t1 + jr t0 + .cfi_endproc +- +-__riscv_save_1: +-__riscv_save_0: ++FUNC_END (__riscv_save_12) ++FUNC_END (__riscv_save_11) ++FUNC_END (__riscv_save_10) ++FUNC_END (__riscv_save_9) ++FUNC_END (__riscv_save_8) ++FUNC_END (__riscv_save_7) ++FUNC_END (__riscv_save_6) ++FUNC_END (__riscv_save_5) ++FUNC_END (__riscv_save_4) ++FUNC_END (__riscv_save_3) ++FUNC_END (__riscv_save_2) ++ ++FUNC_BEGIN (__riscv_save_1) ++FUNC_BEGIN (__riscv_save_0) + .cfi_startproc + # __riscv_save_* routine use t0/x5 as return address + .cfi_return_column 5 +@@ -178,8 +163,10 @@ __riscv_save_0: + .cfi_offset 1, -8 + jr t0 + .cfi_endproc ++FUNC_END (__riscv_save_1) ++FUNC_END (__riscv_save_0) + +-__riscv_restore_12: ++FUNC_BEGIN (__riscv_restore_12) + .cfi_startproc + .cfi_def_cfa_offset 112 + .cfi_offset 27, -104 +@@ -199,8 +186,8 @@ __riscv_restore_12: + .cfi_restore 27 + addi sp, sp, 16 + +-__riscv_restore_11: +-__riscv_restore_10: ++FUNC_BEGIN (__riscv_restore_11) ++FUNC_BEGIN (__riscv_restore_10) + .cfi_restore 27 + .cfi_def_cfa_offset 96 + ld s10, 0(sp) +@@ -209,8 +196,8 @@ __riscv_restore_10: + .cfi_restore 25 + addi sp, sp, 16 + +-__riscv_restore_9: +-__riscv_restore_8: ++FUNC_BEGIN (__riscv_restore_9) ++FUNC_BEGIN (__riscv_restore_8) + .cfi_restore 25 + .cfi_restore 26 + .cfi_restore 27 +@@ -221,8 +208,8 @@ __riscv_restore_8: + .cfi_restore 23 + addi sp, sp, 16 + +-__riscv_restore_7: +-__riscv_restore_6: ++FUNC_BEGIN (__riscv_restore_7) ++FUNC_BEGIN (__riscv_restore_6) + .cfi_restore 23 + .cfi_restore 24 + .cfi_restore 25 +@@ -235,8 +222,8 @@ __riscv_restore_6: + .cfi_restore 21 + addi sp, sp, 16 + +-__riscv_restore_5: +-__riscv_restore_4: ++FUNC_BEGIN (__riscv_restore_5) ++FUNC_BEGIN (__riscv_restore_4) + .cfi_restore 21 + .cfi_restore 22 + .cfi_restore 23 +@@ -251,8 +238,8 @@ __riscv_restore_4: + .cfi_restore 19 + addi sp, sp, 16 + +-__riscv_restore_3: +-__riscv_restore_2: ++FUNC_BEGIN (__riscv_restore_3) ++FUNC_BEGIN (__riscv_restore_2) + .cfi_restore 19 + .cfi_restore 20 + .cfi_restore 21 +@@ -269,8 +256,8 @@ __riscv_restore_2: + .cfi_restore 9 + addi sp, sp, 16 + +-__riscv_restore_1: +-__riscv_restore_0: ++FUNC_BEGIN (__riscv_restore_1) ++FUNC_BEGIN (__riscv_restore_0) + .cfi_restore 9 + .cfi_restore 18 + .cfi_restore 19 +@@ -291,10 +278,23 @@ __riscv_restore_0: + .cfi_def_cfa_offset 0 + ret + .cfi_endproc ++FUNC_END (__riscv_restore_12) ++FUNC_END (__riscv_restore_11) ++FUNC_END (__riscv_restore_10) ++FUNC_END (__riscv_restore_9) ++FUNC_END (__riscv_restore_8) ++FUNC_END (__riscv_restore_7) ++FUNC_END (__riscv_restore_6) ++FUNC_END (__riscv_restore_5) ++FUNC_END (__riscv_restore_4) ++FUNC_END (__riscv_restore_3) ++FUNC_END (__riscv_restore_2) ++FUNC_END (__riscv_restore_1) ++FUNC_END (__riscv_restore_0) + + #else + +-__riscv_save_12: ++FUNC_BEGIN (__riscv_save_12) + .cfi_startproc + # __riscv_save_* routine use t0/x5 as return address + .cfi_return_column 5 +@@ -305,10 +305,10 @@ __riscv_save_12: + .cfi_offset 27, -52 + j .Ls10 + +-__riscv_save_11: +-__riscv_save_10: +-__riscv_save_9: +-__riscv_save_8: ++FUNC_BEGIN (__riscv_save_11) ++FUNC_BEGIN (__riscv_save_10) ++FUNC_BEGIN (__riscv_save_9) ++FUNC_BEGIN (__riscv_save_8) + .cfi_restore 27 + addi sp, sp, -64 + .cfi_def_cfa_offset 64 +@@ -324,10 +324,10 @@ __riscv_save_8: + .cfi_offset 23, -36 + j .Ls6 + +-__riscv_save_7: +-__riscv_save_6: +-__riscv_save_5: +-__riscv_save_4: ++FUNC_BEGIN (__riscv_save_7) ++FUNC_BEGIN (__riscv_save_6) ++FUNC_BEGIN (__riscv_save_5) ++FUNC_BEGIN (__riscv_save_4) + .cfi_restore 23 + .cfi_restore 24 + .cfi_restore 25 +@@ -358,11 +358,20 @@ __riscv_save_4: + sub sp, sp, t1 + jr t0 + .cfi_endproc +- +-__riscv_save_3: +-__riscv_save_2: +-__riscv_save_1: +-__riscv_save_0: ++FUNC_END (__riscv_save_12) ++FUNC_END (__riscv_save_11) ++FUNC_END (__riscv_save_10) ++FUNC_END (__riscv_save_9) ++FUNC_END (__riscv_save_8) ++FUNC_END (__riscv_save_7) ++FUNC_END (__riscv_save_6) ++FUNC_END (__riscv_save_5) ++FUNC_END (__riscv_save_4) ++ ++FUNC_BEGIN (__riscv_save_3) ++FUNC_BEGIN (__riscv_save_2) ++FUNC_BEGIN (__riscv_save_1) ++FUNC_BEGIN (__riscv_save_0) + .cfi_startproc + # __riscv_save_* routine use t0/x5 as return address + .cfi_return_column 5 +@@ -377,8 +386,12 @@ __riscv_save_0: + .cfi_offset 1, -4 + jr t0 + .cfi_endproc ++FUNC_END (__riscv_save_3) ++FUNC_END (__riscv_save_2) ++FUNC_END (__riscv_save_1) ++FUNC_END (__riscv_save_0) + +-__riscv_restore_12: ++FUNC_BEGIN (__riscv_restore_12) + .cfi_startproc + .cfi_def_cfa_offset 64 + .cfi_offset 27, -52 +@@ -398,10 +411,10 @@ __riscv_restore_12: + .cfi_restore 27 + addi sp, sp, 16 + +-__riscv_restore_11: +-__riscv_restore_10: +-__riscv_restore_9: +-__riscv_restore_8: ++FUNC_BEGIN (__riscv_restore_11) ++FUNC_BEGIN (__riscv_restore_10) ++FUNC_BEGIN (__riscv_restore_9) ++FUNC_BEGIN (__riscv_restore_8) + .cfi_restore 27 + .cfi_def_cfa_offset 48 + lw s10, 0(sp) +@@ -414,10 +427,10 @@ __riscv_restore_8: + .cfi_restore 23 + addi sp, sp, 16 + +-__riscv_restore_7: +-__riscv_restore_6: +-__riscv_restore_5: +-__riscv_restore_4: ++FUNC_BEGIN (__riscv_restore_7) ++FUNC_BEGIN (__riscv_restore_6) ++FUNC_BEGIN (__riscv_restore_5) ++FUNC_BEGIN (__riscv_restore_4) + .cfi_restore 23 + .cfi_restore 24 + .cfi_restore 25 +@@ -434,10 +447,10 @@ __riscv_restore_4: + .cfi_restore 19 + addi sp, sp, 16 + +-__riscv_restore_3: +-__riscv_restore_2: +-__riscv_restore_1: +-__riscv_restore_0: ++FUNC_BEGIN (__riscv_restore_3) ++FUNC_BEGIN (__riscv_restore_2) ++FUNC_BEGIN (__riscv_restore_1) ++FUNC_BEGIN (__riscv_restore_0) + .cfi_restore 19 + .cfi_restore 20 + .cfi_restore 21 +@@ -459,5 +472,18 @@ __riscv_restore_0: + .cfi_def_cfa_offset 0 + ret + .cfi_endproc ++FUNC_END (__riscv_restore_12) ++FUNC_END (__riscv_restore_11) ++FUNC_END (__riscv_restore_10) ++FUNC_END (__riscv_restore_9) ++FUNC_END (__riscv_restore_8) ++FUNC_END (__riscv_restore_7) ++FUNC_END (__riscv_restore_6) ++FUNC_END (__riscv_restore_5) ++FUNC_END (__riscv_restore_4) ++FUNC_END (__riscv_restore_3) ++FUNC_END (__riscv_restore_2) ++FUNC_END (__riscv_restore_1) ++FUNC_END (__riscv_restore_0) + + #endif +-- +2.49.0 + diff --git a/packages/gcc/7.5.0/0032-riscv-Make-__divdi3-handle-div-by-zero-same-as-hard.patch b/packages/gcc/7.5.0/0032-riscv-Make-__divdi3-handle-div-by-zero-same-as-hard.patch new file mode 100644 index 0000000000..47c251049c --- /dev/null +++ b/packages/gcc/7.5.0/0032-riscv-Make-__divdi3-handle-div-by-zero-same-as-hard.patch @@ -0,0 +1,40 @@ +From 4013baf99c38f7bca06a51f8301e8fb195ccfa33 Mon Sep 17 00:00:00 2001 +From: Jim Wilson +Date: Tue, 2 Jun 2020 11:19:39 -0700 +Subject: [PATCH] RISC-V: Make __divdi3 handle div by zero same as hardware. + +The ISA manual specifies that divide by zero always returns -1 as the result. +We were failing to do that when the dividend was negative. + +Original patch from Virginie Moser. + + libgcc/ + * config/riscv/div.S (__divdi3): For negative arguments, change bgez + to bgtz. +--- + libgcc/config/riscv/div.S | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/libgcc/config/riscv/div.S b/libgcc/config/riscv/div.S +index 151f8e273a..17234324c1 100644 +--- a/libgcc/config/riscv/div.S ++++ b/libgcc/config/riscv/div.S +@@ -107,10 +107,12 @@ FUNC_END (__umoddi3) + /* Handle negative arguments to __divdi3. */ + .L10: + neg a0, a0 +- bgez a1, .L12 /* Compute __udivdi3(-a0, a1), then negate the result. */ ++ /* Zero is handled as a negative so that the result will not be inverted. */ ++ bgtz a1, .L12 /* Compute __udivdi3(-a0, a1), then negate the result. */ ++ + neg a1, a1 +- j __udivdi3 /* Compute __udivdi3(-a0, -a1). */ +-.L11: /* Compute __udivdi3(a0, -a1), then negate the result. */ ++ j __udivdi3 /* Compute __udivdi3(-a0, -a1). */ ++.L11: /* Compute __udivdi3(a0, -a1), then negate the result. */ + neg a1, a1 + .L12: + move t0, ra +-- +2.49.0 + diff --git a/packages/gcc/7.5.0/0033-riscv-jal-cannot-refer-to-a-default-visibility-symb.patch b/packages/gcc/7.5.0/0033-riscv-jal-cannot-refer-to-a-default-visibility-symb.patch new file mode 100644 index 0000000000..1422c69d9d --- /dev/null +++ b/packages/gcc/7.5.0/0033-riscv-jal-cannot-refer-to-a-default-visibility-symb.patch @@ -0,0 +1,120 @@ +From 45116f342057b7facecd3d05c2091ce3a77eda59 Mon Sep 17 00:00:00 2001 +From: Nelson Chu +Date: Mon, 29 Nov 2021 04:48:20 -0800 +Subject: [PATCH] RISC-V: jal cannot refer to a default visibility symbol for + shared object. + +This is the original binutils bugzilla report, +https://sourceware.org/bugzilla/show_bug.cgi?id=28509 + +And this is the first version of the proposed binutils patch, +https://sourceware.org/pipermail/binutils/2021-November/118398.html + +After applying the binutils patch, I get the the unexpected error when +building libgcc, + +/scratch/nelsonc/riscv-gnu-toolchain/riscv-gcc/libgcc/config/riscv/div.S:42: +/scratch/nelsonc/build-upstream/rv64gc-linux/build-install/riscv64-unknown-linux-gnu/bin/ld: relocation R_RISCV_JAL against `__udivdi3' which may bind externally can not be used when making a shared object; recompile with -fPIC + +Therefore, this patch add an extra hidden alias symbol for __udivdi3, and +then use HIDDEN_JUMPTARGET to target a non-preemptible symbol instead. +The solution is similar to glibc as follows, +https://sourceware.org/git/?p=glibc.git;a=commit;h=68389203832ab39dd0dbaabbc4059e7fff51c29b + +libgcc/ChangeLog: + + * config/riscv/div.S: Add the hidden alias symbol for __udivdi3, and + then use HIDDEN_JUMPTARGET to target it since it is non-preemptible. + * config/riscv/riscv-asm.h: Added new macros HIDDEN_JUMPTARGET and + HIDDEN_DEF. +--- + libgcc/config/riscv/div.S | 15 ++++++++------- + libgcc/config/riscv/riscv-asm.h | 6 ++++++ + 2 files changed, 14 insertions(+), 7 deletions(-) + +diff --git a/libgcc/config/riscv/div.S b/libgcc/config/riscv/div.S +index c9bd7879c1..723c3b82e4 100644 +--- a/libgcc/config/riscv/div.S ++++ b/libgcc/config/riscv/div.S +@@ -40,7 +40,7 @@ FUNC_BEGIN (__udivsi3) + sll a0, a0, 32 + sll a1, a1, 32 + move t0, ra +- jal __udivdi3 ++ jal HIDDEN_JUMPTARGET(__udivdi3) + sext.w a0, a0 + jr t0 + FUNC_END (__udivsi3) +@@ -52,7 +52,7 @@ FUNC_BEGIN (__umodsi3) + srl a0, a0, 32 + srl a1, a1, 32 + move t0, ra +- jal __udivdi3 ++ jal HIDDEN_JUMPTARGET(__udivdi3) + sext.w a0, a1 + jr t0 + FUNC_END (__umodsi3) +@@ -95,11 +95,12 @@ FUNC_BEGIN (__udivdi3) + .L5: + ret + FUNC_END (__udivdi3) ++HIDDEN_DEF (__udivdi3) + + FUNC_BEGIN (__umoddi3) + /* Call __udivdi3(a0, a1), then return the remainder, which is in a1. */ + move t0, ra +- jal __udivdi3 ++ jal HIDDEN_JUMPTARGET(__udivdi3) + move a0, a1 + jr t0 + FUNC_END (__umoddi3) +@@ -111,12 +112,12 @@ FUNC_END (__umoddi3) + bgtz a1, .L12 /* Compute __udivdi3(-a0, a1), then negate the result. */ + + neg a1, a1 +- j __udivdi3 /* Compute __udivdi3(-a0, -a1). */ ++ j HIDDEN_JUMPTARGET(__udivdi3) /* Compute __udivdi3(-a0, -a1). */ + .L11: /* Compute __udivdi3(a0, -a1), then negate the result. */ + neg a1, a1 + .L12: + move t0, ra +- jal __udivdi3 ++ jal HIDDEN_JUMPTARGET(__udivdi3) + neg a0, a0 + jr t0 + FUNC_END (__divdi3) +@@ -126,7 +127,7 @@ FUNC_BEGIN (__moddi3) + bltz a1, .L31 + bltz a0, .L32 + .L30: +- jal __udivdi3 /* The dividend is not negative. */ ++ jal HIDDEN_JUMPTARGET(__udivdi3) /* The dividend is not negative. */ + move a0, a1 + jr t0 + .L31: +@@ -134,7 +135,7 @@ FUNC_BEGIN (__moddi3) + bgez a0, .L30 + .L32: + neg a0, a0 +- jal __udivdi3 /* The dividend is hella negative. */ ++ jal HIDDEN_JUMPTARGET(__udivdi3) /* The dividend is hella negative. */ + neg a0, a1 + jr t0 + FUNC_END (__moddi3) +diff --git a/libgcc/config/riscv/riscv-asm.h b/libgcc/config/riscv/riscv-asm.h +index 8550707a4a..96dd85b0df 100644 +--- a/libgcc/config/riscv/riscv-asm.h ++++ b/libgcc/config/riscv/riscv-asm.h +@@ -33,3 +33,9 @@ X: + #define FUNC_ALIAS(X,Y) \ + .globl X; \ + X = Y ++ ++#define CONCAT1(a, b) CONCAT2(a, b) ++#define CONCAT2(a, b) a ## b ++#define HIDDEN_JUMPTARGET(X) CONCAT1(__hidden_, X) ++#define HIDDEN_DEF(X) FUNC_ALIAS(HIDDEN_JUMPTARGET(X), X); \ ++ .hidden HIDDEN_JUMPTARGET(X) +-- +2.49.0 + diff --git a/packages/gcc/8.5.0/0033-riscv-Make-__divdi3-handle-div-by-zero-same-as-hard.patch b/packages/gcc/8.5.0/0033-riscv-Make-__divdi3-handle-div-by-zero-same-as-hard.patch new file mode 100644 index 0000000000..47c251049c --- /dev/null +++ b/packages/gcc/8.5.0/0033-riscv-Make-__divdi3-handle-div-by-zero-same-as-hard.patch @@ -0,0 +1,40 @@ +From 4013baf99c38f7bca06a51f8301e8fb195ccfa33 Mon Sep 17 00:00:00 2001 +From: Jim Wilson +Date: Tue, 2 Jun 2020 11:19:39 -0700 +Subject: [PATCH] RISC-V: Make __divdi3 handle div by zero same as hardware. + +The ISA manual specifies that divide by zero always returns -1 as the result. +We were failing to do that when the dividend was negative. + +Original patch from Virginie Moser. + + libgcc/ + * config/riscv/div.S (__divdi3): For negative arguments, change bgez + to bgtz. +--- + libgcc/config/riscv/div.S | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/libgcc/config/riscv/div.S b/libgcc/config/riscv/div.S +index 151f8e273a..17234324c1 100644 +--- a/libgcc/config/riscv/div.S ++++ b/libgcc/config/riscv/div.S +@@ -107,10 +107,12 @@ FUNC_END (__umoddi3) + /* Handle negative arguments to __divdi3. */ + .L10: + neg a0, a0 +- bgez a1, .L12 /* Compute __udivdi3(-a0, a1), then negate the result. */ ++ /* Zero is handled as a negative so that the result will not be inverted. */ ++ bgtz a1, .L12 /* Compute __udivdi3(-a0, a1), then negate the result. */ ++ + neg a1, a1 +- j __udivdi3 /* Compute __udivdi3(-a0, -a1). */ +-.L11: /* Compute __udivdi3(a0, -a1), then negate the result. */ ++ j __udivdi3 /* Compute __udivdi3(-a0, -a1). */ ++.L11: /* Compute __udivdi3(a0, -a1), then negate the result. */ + neg a1, a1 + .L12: + move t0, ra +-- +2.49.0 + diff --git a/packages/gcc/8.5.0/0034-riscv-jal-cannot-refer-to-a-default-visibility-symb.patch b/packages/gcc/8.5.0/0034-riscv-jal-cannot-refer-to-a-default-visibility-symb.patch new file mode 100644 index 0000000000..1422c69d9d --- /dev/null +++ b/packages/gcc/8.5.0/0034-riscv-jal-cannot-refer-to-a-default-visibility-symb.patch @@ -0,0 +1,120 @@ +From 45116f342057b7facecd3d05c2091ce3a77eda59 Mon Sep 17 00:00:00 2001 +From: Nelson Chu +Date: Mon, 29 Nov 2021 04:48:20 -0800 +Subject: [PATCH] RISC-V: jal cannot refer to a default visibility symbol for + shared object. + +This is the original binutils bugzilla report, +https://sourceware.org/bugzilla/show_bug.cgi?id=28509 + +And this is the first version of the proposed binutils patch, +https://sourceware.org/pipermail/binutils/2021-November/118398.html + +After applying the binutils patch, I get the the unexpected error when +building libgcc, + +/scratch/nelsonc/riscv-gnu-toolchain/riscv-gcc/libgcc/config/riscv/div.S:42: +/scratch/nelsonc/build-upstream/rv64gc-linux/build-install/riscv64-unknown-linux-gnu/bin/ld: relocation R_RISCV_JAL against `__udivdi3' which may bind externally can not be used when making a shared object; recompile with -fPIC + +Therefore, this patch add an extra hidden alias symbol for __udivdi3, and +then use HIDDEN_JUMPTARGET to target a non-preemptible symbol instead. +The solution is similar to glibc as follows, +https://sourceware.org/git/?p=glibc.git;a=commit;h=68389203832ab39dd0dbaabbc4059e7fff51c29b + +libgcc/ChangeLog: + + * config/riscv/div.S: Add the hidden alias symbol for __udivdi3, and + then use HIDDEN_JUMPTARGET to target it since it is non-preemptible. + * config/riscv/riscv-asm.h: Added new macros HIDDEN_JUMPTARGET and + HIDDEN_DEF. +--- + libgcc/config/riscv/div.S | 15 ++++++++------- + libgcc/config/riscv/riscv-asm.h | 6 ++++++ + 2 files changed, 14 insertions(+), 7 deletions(-) + +diff --git a/libgcc/config/riscv/div.S b/libgcc/config/riscv/div.S +index c9bd7879c1..723c3b82e4 100644 +--- a/libgcc/config/riscv/div.S ++++ b/libgcc/config/riscv/div.S +@@ -40,7 +40,7 @@ FUNC_BEGIN (__udivsi3) + sll a0, a0, 32 + sll a1, a1, 32 + move t0, ra +- jal __udivdi3 ++ jal HIDDEN_JUMPTARGET(__udivdi3) + sext.w a0, a0 + jr t0 + FUNC_END (__udivsi3) +@@ -52,7 +52,7 @@ FUNC_BEGIN (__umodsi3) + srl a0, a0, 32 + srl a1, a1, 32 + move t0, ra +- jal __udivdi3 ++ jal HIDDEN_JUMPTARGET(__udivdi3) + sext.w a0, a1 + jr t0 + FUNC_END (__umodsi3) +@@ -95,11 +95,12 @@ FUNC_BEGIN (__udivdi3) + .L5: + ret + FUNC_END (__udivdi3) ++HIDDEN_DEF (__udivdi3) + + FUNC_BEGIN (__umoddi3) + /* Call __udivdi3(a0, a1), then return the remainder, which is in a1. */ + move t0, ra +- jal __udivdi3 ++ jal HIDDEN_JUMPTARGET(__udivdi3) + move a0, a1 + jr t0 + FUNC_END (__umoddi3) +@@ -111,12 +112,12 @@ FUNC_END (__umoddi3) + bgtz a1, .L12 /* Compute __udivdi3(-a0, a1), then negate the result. */ + + neg a1, a1 +- j __udivdi3 /* Compute __udivdi3(-a0, -a1). */ ++ j HIDDEN_JUMPTARGET(__udivdi3) /* Compute __udivdi3(-a0, -a1). */ + .L11: /* Compute __udivdi3(a0, -a1), then negate the result. */ + neg a1, a1 + .L12: + move t0, ra +- jal __udivdi3 ++ jal HIDDEN_JUMPTARGET(__udivdi3) + neg a0, a0 + jr t0 + FUNC_END (__divdi3) +@@ -126,7 +127,7 @@ FUNC_BEGIN (__moddi3) + bltz a1, .L31 + bltz a0, .L32 + .L30: +- jal __udivdi3 /* The dividend is not negative. */ ++ jal HIDDEN_JUMPTARGET(__udivdi3) /* The dividend is not negative. */ + move a0, a1 + jr t0 + .L31: +@@ -134,7 +135,7 @@ FUNC_BEGIN (__moddi3) + bgez a0, .L30 + .L32: + neg a0, a0 +- jal __udivdi3 /* The dividend is hella negative. */ ++ jal HIDDEN_JUMPTARGET(__udivdi3) /* The dividend is hella negative. */ + neg a0, a1 + jr t0 + FUNC_END (__moddi3) +diff --git a/libgcc/config/riscv/riscv-asm.h b/libgcc/config/riscv/riscv-asm.h +index 8550707a4a..96dd85b0df 100644 +--- a/libgcc/config/riscv/riscv-asm.h ++++ b/libgcc/config/riscv/riscv-asm.h +@@ -33,3 +33,9 @@ X: + #define FUNC_ALIAS(X,Y) \ + .globl X; \ + X = Y ++ ++#define CONCAT1(a, b) CONCAT2(a, b) ++#define CONCAT2(a, b) a ## b ++#define HIDDEN_JUMPTARGET(X) CONCAT1(__hidden_, X) ++#define HIDDEN_DEF(X) FUNC_ALIAS(HIDDEN_JUMPTARGET(X), X); \ ++ .hidden HIDDEN_JUMPTARGET(X) +-- +2.49.0 + diff --git a/packages/gcc/9.5.0/0031-riscv-Make-__divdi3-handle-div-by-zero-same-as-hard.patch b/packages/gcc/9.5.0/0031-riscv-Make-__divdi3-handle-div-by-zero-same-as-hard.patch new file mode 100644 index 0000000000..47c251049c --- /dev/null +++ b/packages/gcc/9.5.0/0031-riscv-Make-__divdi3-handle-div-by-zero-same-as-hard.patch @@ -0,0 +1,40 @@ +From 4013baf99c38f7bca06a51f8301e8fb195ccfa33 Mon Sep 17 00:00:00 2001 +From: Jim Wilson +Date: Tue, 2 Jun 2020 11:19:39 -0700 +Subject: [PATCH] RISC-V: Make __divdi3 handle div by zero same as hardware. + +The ISA manual specifies that divide by zero always returns -1 as the result. +We were failing to do that when the dividend was negative. + +Original patch from Virginie Moser. + + libgcc/ + * config/riscv/div.S (__divdi3): For negative arguments, change bgez + to bgtz. +--- + libgcc/config/riscv/div.S | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/libgcc/config/riscv/div.S b/libgcc/config/riscv/div.S +index 151f8e273a..17234324c1 100644 +--- a/libgcc/config/riscv/div.S ++++ b/libgcc/config/riscv/div.S +@@ -107,10 +107,12 @@ FUNC_END (__umoddi3) + /* Handle negative arguments to __divdi3. */ + .L10: + neg a0, a0 +- bgez a1, .L12 /* Compute __udivdi3(-a0, a1), then negate the result. */ ++ /* Zero is handled as a negative so that the result will not be inverted. */ ++ bgtz a1, .L12 /* Compute __udivdi3(-a0, a1), then negate the result. */ ++ + neg a1, a1 +- j __udivdi3 /* Compute __udivdi3(-a0, -a1). */ +-.L11: /* Compute __udivdi3(a0, -a1), then negate the result. */ ++ j __udivdi3 /* Compute __udivdi3(-a0, -a1). */ ++.L11: /* Compute __udivdi3(a0, -a1), then negate the result. */ + neg a1, a1 + .L12: + move t0, ra +-- +2.49.0 + diff --git a/packages/gcc/9.5.0/0032-riscv-jal-cannot-refer-to-a-default-visibility-symb.patch b/packages/gcc/9.5.0/0032-riscv-jal-cannot-refer-to-a-default-visibility-symb.patch new file mode 100644 index 0000000000..1422c69d9d --- /dev/null +++ b/packages/gcc/9.5.0/0032-riscv-jal-cannot-refer-to-a-default-visibility-symb.patch @@ -0,0 +1,120 @@ +From 45116f342057b7facecd3d05c2091ce3a77eda59 Mon Sep 17 00:00:00 2001 +From: Nelson Chu +Date: Mon, 29 Nov 2021 04:48:20 -0800 +Subject: [PATCH] RISC-V: jal cannot refer to a default visibility symbol for + shared object. + +This is the original binutils bugzilla report, +https://sourceware.org/bugzilla/show_bug.cgi?id=28509 + +And this is the first version of the proposed binutils patch, +https://sourceware.org/pipermail/binutils/2021-November/118398.html + +After applying the binutils patch, I get the the unexpected error when +building libgcc, + +/scratch/nelsonc/riscv-gnu-toolchain/riscv-gcc/libgcc/config/riscv/div.S:42: +/scratch/nelsonc/build-upstream/rv64gc-linux/build-install/riscv64-unknown-linux-gnu/bin/ld: relocation R_RISCV_JAL against `__udivdi3' which may bind externally can not be used when making a shared object; recompile with -fPIC + +Therefore, this patch add an extra hidden alias symbol for __udivdi3, and +then use HIDDEN_JUMPTARGET to target a non-preemptible symbol instead. +The solution is similar to glibc as follows, +https://sourceware.org/git/?p=glibc.git;a=commit;h=68389203832ab39dd0dbaabbc4059e7fff51c29b + +libgcc/ChangeLog: + + * config/riscv/div.S: Add the hidden alias symbol for __udivdi3, and + then use HIDDEN_JUMPTARGET to target it since it is non-preemptible. + * config/riscv/riscv-asm.h: Added new macros HIDDEN_JUMPTARGET and + HIDDEN_DEF. +--- + libgcc/config/riscv/div.S | 15 ++++++++------- + libgcc/config/riscv/riscv-asm.h | 6 ++++++ + 2 files changed, 14 insertions(+), 7 deletions(-) + +diff --git a/libgcc/config/riscv/div.S b/libgcc/config/riscv/div.S +index c9bd7879c1..723c3b82e4 100644 +--- a/libgcc/config/riscv/div.S ++++ b/libgcc/config/riscv/div.S +@@ -40,7 +40,7 @@ FUNC_BEGIN (__udivsi3) + sll a0, a0, 32 + sll a1, a1, 32 + move t0, ra +- jal __udivdi3 ++ jal HIDDEN_JUMPTARGET(__udivdi3) + sext.w a0, a0 + jr t0 + FUNC_END (__udivsi3) +@@ -52,7 +52,7 @@ FUNC_BEGIN (__umodsi3) + srl a0, a0, 32 + srl a1, a1, 32 + move t0, ra +- jal __udivdi3 ++ jal HIDDEN_JUMPTARGET(__udivdi3) + sext.w a0, a1 + jr t0 + FUNC_END (__umodsi3) +@@ -95,11 +95,12 @@ FUNC_BEGIN (__udivdi3) + .L5: + ret + FUNC_END (__udivdi3) ++HIDDEN_DEF (__udivdi3) + + FUNC_BEGIN (__umoddi3) + /* Call __udivdi3(a0, a1), then return the remainder, which is in a1. */ + move t0, ra +- jal __udivdi3 ++ jal HIDDEN_JUMPTARGET(__udivdi3) + move a0, a1 + jr t0 + FUNC_END (__umoddi3) +@@ -111,12 +112,12 @@ FUNC_END (__umoddi3) + bgtz a1, .L12 /* Compute __udivdi3(-a0, a1), then negate the result. */ + + neg a1, a1 +- j __udivdi3 /* Compute __udivdi3(-a0, -a1). */ ++ j HIDDEN_JUMPTARGET(__udivdi3) /* Compute __udivdi3(-a0, -a1). */ + .L11: /* Compute __udivdi3(a0, -a1), then negate the result. */ + neg a1, a1 + .L12: + move t0, ra +- jal __udivdi3 ++ jal HIDDEN_JUMPTARGET(__udivdi3) + neg a0, a0 + jr t0 + FUNC_END (__divdi3) +@@ -126,7 +127,7 @@ FUNC_BEGIN (__moddi3) + bltz a1, .L31 + bltz a0, .L32 + .L30: +- jal __udivdi3 /* The dividend is not negative. */ ++ jal HIDDEN_JUMPTARGET(__udivdi3) /* The dividend is not negative. */ + move a0, a1 + jr t0 + .L31: +@@ -134,7 +135,7 @@ FUNC_BEGIN (__moddi3) + bgez a0, .L30 + .L32: + neg a0, a0 +- jal __udivdi3 /* The dividend is hella negative. */ ++ jal HIDDEN_JUMPTARGET(__udivdi3) /* The dividend is hella negative. */ + neg a0, a1 + jr t0 + FUNC_END (__moddi3) +diff --git a/libgcc/config/riscv/riscv-asm.h b/libgcc/config/riscv/riscv-asm.h +index 8550707a4a..96dd85b0df 100644 +--- a/libgcc/config/riscv/riscv-asm.h ++++ b/libgcc/config/riscv/riscv-asm.h +@@ -33,3 +33,9 @@ X: + #define FUNC_ALIAS(X,Y) \ + .globl X; \ + X = Y ++ ++#define CONCAT1(a, b) CONCAT2(a, b) ++#define CONCAT2(a, b) a ## b ++#define HIDDEN_JUMPTARGET(X) CONCAT1(__hidden_, X) ++#define HIDDEN_DEF(X) FUNC_ALIAS(HIDDEN_JUMPTARGET(X), X); \ ++ .hidden HIDDEN_JUMPTARGET(X) +-- +2.49.0 + diff --git a/packages/gcc/package.desc b/packages/gcc/package.desc index 689c539560..35ff82d8ac 100644 --- a/packages/gcc/package.desc +++ b/packages/gcc/package.desc @@ -2,5 +2,5 @@ repository='git git://gcc.gnu.org/git/gcc.git' mirrors='$(CT_Mirrors GNU gcc/gcc-${CT_GCC_VERSION}) $(CT_Mirrors sourceware gcc/releases/gcc-${CT_GCC_VERSION})' relevantpattern='4.*|. *|.' origin='GNU' -milestones='4.9 5 6 7 8 9 10 11 12 13 14' +milestones='4.9 5 6 7 8 9 10 11 12 13 14 15' archive_formats='.tar.xz .tar.gz' diff --git a/packages/gdb/15.1/chksum b/packages/gdb/15.1/chksum deleted file mode 100644 index bd0694fa8e..0000000000 --- a/packages/gdb/15.1/chksum +++ /dev/null @@ -1,8 +0,0 @@ -md5 gdb-15.1.tar.xz 494e3beaac44e66367c3e443a4414529 -sha1 gdb-15.1.tar.xz 2b4e9357e498c66bbedf791883569104edea0472 -sha256 gdb-15.1.tar.xz 38254eacd4572134bca9c5a5aa4d4ca564cbbd30c369d881f733fb6b903354f2 -sha512 gdb-15.1.tar.xz 0217434073023a8b8316088bf3ee95d53a1b6a7897f6269095429016a8900f9a05e130c390d8d5d5550cc515c16519de1071d8eef96aa58e38056c7e37da1d8b -md5 gdb-15.1.tar.gz 58dadf8ff03f3341ff05a02f3301150a -sha1 gdb-15.1.tar.gz a6c190017b9620103d71343cfadd88172d382565 -sha256 gdb-15.1.tar.gz 8b61b0c2bdd9d9c83b113c9167866bdb474651d291fedcaa5eb7cde49bd47036 -sha512 gdb-15.1.tar.gz 0999d58a70614743ccb364f42fb2203e5f531c45ff83e1b8dcfefe281e001c9af9be668c05d757bed76d86cbf1c1f4275afdef5c779aafc88672c63c4d3e1093 diff --git a/packages/gdb/15.2/0000-readline-bring-in-signal.c-from-gdb-16-branch.patch b/packages/gdb/15.2/0000-readline-bring-in-signal.c-from-gdb-16-branch.patch new file mode 100644 index 0000000000..e5c58ea411 --- /dev/null +++ b/packages/gdb/15.2/0000-readline-bring-in-signal.c-from-gdb-16-branch.patch @@ -0,0 +1,164 @@ +From 6c96a41828a0f34cc4480c08a9c23e0ab2ed2cc0 Mon Sep 17 00:00:00 2001 +From: Chris Packham +Date: Mon, 2 Jun 2025 15:15:05 +1200 +Subject: [PATCH] readline: bring in signal.c from gdb-16 branch + +Readline is updated in gdb-16. This has fixes for some build issues with +newer C23 compilers but is a little too big to just bring in on it's +own. Bring in signal.c from the gdb-16 branch to resolve the immediate +issues. +--- + readline/readline/signals.c | 71 +++++++++++++------------------------------- + 1 file changed, 22 insertions(+), 49 deletions(-) + +--- a/readline/readline/signals.c ++++ b/readline/readline/signals.c +@@ -1,6 +1,6 @@ + /* signals.c -- signal handling support for readline. */ + +-/* Copyright (C) 1987-2017 Free Software Foundation, Inc. ++/* Copyright (C) 1987-2021 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. +@@ -48,23 +48,11 @@ + + #if defined (HANDLE_SIGNALS) + +-#if !defined (RETSIGTYPE) +-# if defined (VOID_SIGHANDLER) +-# define RETSIGTYPE void +-# else +-# define RETSIGTYPE int +-# endif /* !VOID_SIGHANDLER */ +-#endif /* !RETSIGTYPE */ +- +-#if defined (VOID_SIGHANDLER) +-# define SIGHANDLER_RETURN return +-#else +-# define SIGHANDLER_RETURN return (0) +-#endif ++#define SIGHANDLER_RETURN return + + /* This typedef is equivalent to the one for Function; it allows us + to say SigHandler *foo = signal (SIGKILL, SIG_IGN); */ +-typedef RETSIGTYPE SigHandler (); ++typedef void SigHandler (int); + + #if defined (HAVE_POSIX_SIGNALS) + typedef struct sigaction sighandler_cxt; +@@ -78,12 +66,12 @@ + # define SA_RESTART 0 + #endif + +-static SigHandler *rl_set_sighandler PARAMS((int, SigHandler *, sighandler_cxt *)); +-static void rl_maybe_set_sighandler PARAMS((int, SigHandler *, sighandler_cxt *)); +-static void rl_maybe_restore_sighandler PARAMS((int, sighandler_cxt *)); ++static SigHandler *rl_set_sighandler (int, SigHandler *, sighandler_cxt *); ++static void rl_maybe_set_sighandler (int, SigHandler *, sighandler_cxt *); ++static void rl_maybe_restore_sighandler (int, sighandler_cxt *); + +-static RETSIGTYPE rl_signal_handler PARAMS((int)); +-static RETSIGTYPE _rl_handle_signal PARAMS((int)); ++static void rl_signal_handler (int); ++static void _rl_handle_signal (int); + + /* Exported variables for use by applications. */ + +@@ -136,7 +124,7 @@ + /* Readline signal handler functions. */ + + /* Called from RL_CHECK_SIGNALS() macro to run signal handling code. */ +-RETSIGTYPE ++void + _rl_signal_handler (int sig) + { + _rl_caught_signal = 0; /* XXX */ +@@ -163,7 +151,7 @@ + SIGHANDLER_RETURN; + } + +-static RETSIGTYPE ++static void + rl_signal_handler (int sig) + { + _rl_caught_signal = sig; +@@ -173,7 +161,7 @@ + /* This is called to handle a signal when it is safe to do so (out of the + signal handler execution path). Called by _rl_signal_handler for all the + signals readline catches except SIGWINCH. */ +-static RETSIGTYPE ++static void + _rl_handle_signal (int sig) + { + int block_sig; +@@ -222,6 +210,9 @@ + switch (sig) + { + case SIGINT: ++ /* We will end up blocking SIGTTOU while we are resetting the tty, so ++ watch out for this if it causes problems. We could prevent this by ++ setting block_sig to 1 without modifying SET. */ + _rl_reset_completion_state (); + rl_free_line_state (); + #if defined (READLINE_CALLBACKS) +@@ -242,8 +233,11 @@ + this even if we've been stopped on SIGTTOU, since we handle signals + when we have returned from the signal handler and the signal is no + longer blocked. */ +- sigaddset (&set, SIGTTOU); +- block_sig = 1; ++ if (block_sig == 0) ++ { ++ sigaddset (&set, SIGTTOU); ++ block_sig = 1; ++ } + # endif + #endif /* SIGTSTP */ + /* Any signals that should be blocked during cleanup should go here. */ +@@ -285,19 +279,6 @@ + + /* We don't have to bother unblocking the signal because we are not + running in a signal handler context. */ +-#if 0 +-#if defined (HAVE_POSIX_SIGNALS) +- /* Make sure this signal is not blocked when we resend it to the +- calling application. */ +- sigemptyset (&set); +- sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &set); +- sigdelset (&set, sig); +-#else /* !HAVE_POSIX_SIGNALS */ +-# if defined (HAVE_BSD_SIGNALS) +- omask = sigblock (0); +-# endif /* HAVE_BSD_SIGNALS */ +-#endif /* !HAVE_POSIX_SIGNALS */ +-#endif + + #if defined (__EMX__) + signal (sig, SIG_ACK); +@@ -311,16 +292,6 @@ + + /* We don't need to modify the signal mask now that this is not run in + a signal handler context. */ +-#if 0 +- /* Let the signal that we just sent through if it is blocked. */ +-#if defined (HAVE_POSIX_SIGNALS) +- sigprocmask (SIG_SETMASK, &set, (sigset_t *)NULL); +-#else /* !HAVE_POSIX_SIGNALS */ +-# if defined (HAVE_BSD_SIGNALS) +- sigsetmask (omask & ~(sigmask (sig))); +-# endif /* HAVE_BSD_SIGNALS */ +-#endif /* !HAVE_POSIX_SIGNALS */ +-#endif + + rl_reset_after_signal (); + } +@@ -330,7 +301,7 @@ + } + + #if defined (SIGWINCH) +-static RETSIGTYPE ++static void + rl_sigwinch_handler (int sig) + { + SigHandler *oh; diff --git a/packages/gdb/15.2/0001-readline-tcap.h-Update-definitions-for-C23.patch b/packages/gdb/15.2/0001-readline-tcap.h-Update-definitions-for-C23.patch new file mode 100644 index 0000000000..d62b2fc785 --- /dev/null +++ b/packages/gdb/15.2/0001-readline-tcap.h-Update-definitions-for-C23.patch @@ -0,0 +1,49 @@ +From 11d45226114bf2e1405964c81c7610a8d6074947 Mon Sep 17 00:00:00 2001 +From: Chris Packham +Date: Wed, 30 Apr 2025 16:37:48 +1200 +Subject: [PATCH] readline/tcap.h: Update definitions for C23 + +C23 changes how function definitions like int `int tputs ()` are +interpreted. In older standards this meant that the function arguments +are unknown. In C23 this is interpreted as `int tputs (void)` so now +when we compile with GCC15 (which defaults to -std=gnu23) we get an +error such as + + readline/display.c:2839:17: error: too many arguments to function 'tputs'; expected 0, have 3 + +Add the function arguments for tgetent(), tgetflag(), tgetnum(), +tgetstr(), tputs() and tgoto(). + +Signed-off-by: Chris Packham +--- + readline/readline/tcap.h | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/readline/readline/tcap.h b/readline/readline/tcap.h +index 859e6eed5aa..9e2ed124e49 100644 +--- a/readline/readline/tcap.h ++++ b/readline/readline/tcap.h +@@ -46,14 +46,14 @@ extern char *UP, *BC; + + extern short ospeed; + +-extern int tgetent (); +-extern int tgetflag (); +-extern int tgetnum (); +-extern char *tgetstr (); ++extern int tgetent (char *bp, const char *name); ++extern int tgetflag (char *id); ++extern int tgetnum (char *id); ++extern char *tgetstr (char *id, char **area); + +-extern int tputs (); ++extern int tputs (const char *str, int affcnt, int (*putc)(int)); + +-extern char *tgoto (); ++extern char *tgoto (const char *cap, int col, int row); + + #endif /* HAVE_TERMCAP_H */ + +-- +2.49.0 + diff --git a/packages/gdb/15.2/chksum b/packages/gdb/15.2/chksum new file mode 100644 index 0000000000..05e00e63b8 --- /dev/null +++ b/packages/gdb/15.2/chksum @@ -0,0 +1,8 @@ +md5 gdb-15.2.tar.xz 85c722e2f2baea2b7820a6a7eaea2ce8 +sha1 gdb-15.2.tar.xz f06b8694d2019e03f55560059aac4a5b70a32677 +sha256 gdb-15.2.tar.xz 83350ccd35b5b5a0cba6b334c41294ea968158c573940904f00b92f76345314d +sha512 gdb-15.2.tar.xz 624007deceb5b15ba89c0725883d1a699fa46714ef30887f3d0165e17c5d65d634671740a135aa69e437d916218abb08cfa2a38ed309ff19d48f51da56b2a8ba +md5 gdb-15.2.tar.gz e50e995c8c0b76be73c68bed6e747037 +sha1 gdb-15.2.tar.gz ae3666d429f4a8eab65667d300e2cba1233c4235 +sha256 gdb-15.2.tar.gz 9d16bc2539a2a20dc3ef99b48b8414d51c51305c8577eb7a1da00996f6dea223 +sha512 gdb-15.2.tar.gz 479bd15f0652bab53b71259fe433a4f583d7f1be7bbffba17a84398e4900c8baa29a0607cc6ff36b654e044da09c8b63ef37f0b852e780b7a2ab826cd06a2efa diff --git a/packages/linux/6.8.10/version.desc b/packages/gdb/15.2/version.desc similarity index 100% rename from packages/linux/6.8.10/version.desc rename to packages/gdb/15.2/version.desc diff --git a/packages/gdb/16.3/0001-readline-tcap.h-Update-definitions-for-C23.patch b/packages/gdb/16.3/0001-readline-tcap.h-Update-definitions-for-C23.patch new file mode 100644 index 0000000000..d62b2fc785 --- /dev/null +++ b/packages/gdb/16.3/0001-readline-tcap.h-Update-definitions-for-C23.patch @@ -0,0 +1,49 @@ +From 11d45226114bf2e1405964c81c7610a8d6074947 Mon Sep 17 00:00:00 2001 +From: Chris Packham +Date: Wed, 30 Apr 2025 16:37:48 +1200 +Subject: [PATCH] readline/tcap.h: Update definitions for C23 + +C23 changes how function definitions like int `int tputs ()` are +interpreted. In older standards this meant that the function arguments +are unknown. In C23 this is interpreted as `int tputs (void)` so now +when we compile with GCC15 (which defaults to -std=gnu23) we get an +error such as + + readline/display.c:2839:17: error: too many arguments to function 'tputs'; expected 0, have 3 + +Add the function arguments for tgetent(), tgetflag(), tgetnum(), +tgetstr(), tputs() and tgoto(). + +Signed-off-by: Chris Packham +--- + readline/readline/tcap.h | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/readline/readline/tcap.h b/readline/readline/tcap.h +index 859e6eed5aa..9e2ed124e49 100644 +--- a/readline/readline/tcap.h ++++ b/readline/readline/tcap.h +@@ -46,14 +46,14 @@ extern char *UP, *BC; + + extern short ospeed; + +-extern int tgetent (); +-extern int tgetflag (); +-extern int tgetnum (); +-extern char *tgetstr (); ++extern int tgetent (char *bp, const char *name); ++extern int tgetflag (char *id); ++extern int tgetnum (char *id); ++extern char *tgetstr (char *id, char **area); + +-extern int tputs (); ++extern int tputs (const char *str, int affcnt, int (*putc)(int)); + +-extern char *tgoto (); ++extern char *tgoto (const char *cap, int col, int row); + + #endif /* HAVE_TERMCAP_H */ + +-- +2.49.0 + diff --git a/packages/gdb/16.3/chksum b/packages/gdb/16.3/chksum new file mode 100644 index 0000000000..1d2fa479ad --- /dev/null +++ b/packages/gdb/16.3/chksum @@ -0,0 +1,8 @@ +md5 gdb-16.3.tar.xz f7a7e2d0a6d28622ac69a3623b23876b +sha1 gdb-16.3.tar.xz ac4b56773e6abe4a5467a0708a185b4279e8faf4 +sha256 gdb-16.3.tar.xz bcfcd095528a987917acf9fff3f1672181694926cc18d609c99d0042c00224c5 +sha512 gdb-16.3.tar.xz fffd6689c3405466a179670b04720dc825e4f210a761f63dd2b33027432f8cd5d1c059c431a5ec9e165eedd1901220b5329d73c522f9a444788888c731b29e9c +md5 gdb-16.3.tar.gz f7114f25fd3707bddf6d1c8eca61f614 +sha1 gdb-16.3.tar.gz 0e327ebcc557c9c3a3b7de3a541c6830491550aa +sha256 gdb-16.3.tar.gz 86015081217dc82c5485db9ce864dcc0b703759d2bdbe4441b095c5f900a6a37 +sha512 gdb-16.3.tar.gz 68fa3a1ac67cb07759210cf464d70dddbb89bc6d480112102c343ac111db2698c321aa5ddbc23d84da8cc3f54ecd32d9149d969be5ce666ac77c24be473f4f50 diff --git a/packages/linux/6.9.10/version.desc b/packages/gdb/16.3/version.desc similarity index 100% rename from packages/linux/6.9.10/version.desc rename to packages/gdb/16.3/version.desc diff --git a/packages/gdb/package.desc b/packages/gdb/package.desc index 08493b31ea..3250d1a440 100644 --- a/packages/gdb/package.desc +++ b/packages/gdb/package.desc @@ -2,5 +2,5 @@ origin='GNU' repository='git git://sourceware.org/git/binutils-gdb.git' mirrors='$(CT_Mirrors GNU gdb) $(CT_Mirrors sourceware gdb/releases)' relevantpattern='[78].*|. *|.' -milestones='8.3 10 11 12 13 14 15' +milestones='8.3 10 11 12 13 14 15 16' archive_formats='.tar.xz .tar.gz' diff --git a/packages/gettext/0.20.1/0002-tparam-configure-fix.patch b/packages/gettext/0.20.1/0002-tparam-configure-fix.patch new file mode 100644 index 0000000000..331808e500 --- /dev/null +++ b/packages/gettext/0.20.1/0002-tparam-configure-fix.patch @@ -0,0 +1,49 @@ +[PATCH] tparam configure fix + +With a newer compiler the configure check for tparam/tparm fails with + +conftest.c: In function 'main': +conftest.c:95:8: error: returning 'char *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion] + 95 | return tparam ("\033\133%dm", &buf, 1, 8); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +configure:23675: $? = 1 +conftest.c: In function 'main': +conftest.c:94:8: error: returning 'char *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion] + 94 | return tparm ("\033\133%dm", 8); + | ^~~~~~~~~~~~~~~~~~~~~~~~ +configure:23719: $? = 1 + +This causes libtextstyle to backfill these two functions from gnulib which +eventually causes a link error + +ld.bfd: buildtools/complibs-host/lib/libncurses.a(lib_tparm.o): in function `tparm': +src/ncurses/ncurses/tinfo/lib_tparm.c:1093: multiple definition of `tparm'; ../lib/.libs/libtextstyle.a(tparm.o):src/gettext/libtextstyle/lib/tparm.c:256: first defined here + +Update the configure check to something that will correctly determine if +tparam/tparm need to be back-filled. + +Signed-off-by: Chris Packham +--- + libtextstyle/configure | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/libtextstyle/configure ++++ b/libtextstyle/configure +@@ -23667,7 +23667,7 @@ + int + main () + { +-return tparam ("\033\133%dm", &buf, 1, 8); ++return ! tparam ("\033\133%dm", &buf, 1, 8); + ; + return 0; + } +@@ -23711,7 +23711,7 @@ + int + main () + { +-return tparm ("\033\133%dm", 8); ++return ! tparm ("\033\133%dm", 8); + ; + return 0; + } diff --git a/packages/gettext/0.20.1/0003-Fix-compilation-errors-with-ISO-C-23-compilers.patch b/packages/gettext/0.20.1/0003-Fix-compilation-errors-with-ISO-C-23-compilers.patch new file mode 100644 index 0000000000..c0ab21b4a6 --- /dev/null +++ b/packages/gettext/0.20.1/0003-Fix-compilation-errors-with-ISO-C-23-compilers.patch @@ -0,0 +1,51 @@ +From eb8a76522689a010a595071ce753ed489cbad7ff Mon Sep 17 00:00:00 2001 +From: Bruno Haible +Date: Thu, 9 Feb 2023 16:58:20 +0100 +Subject: [PATCH] Fix compilation errors with ISO C 23 compilers. + +* gettext-runtime/intl/dcigettext.c (getwd, getcwd): Assume a declaration in the +system header files. +* gettext-runtime/intl/gettextP.h (SWAP): Drop K&C compatibility. +--- + gettext-runtime/intl/dcigettext.c | 3 --- + gettext-runtime/intl/gettextP.h | 5 ----- + 2 files changed, 8 deletions(-) + +diff --git a/gettext-runtime/intl/dcigettext.c b/gettext-runtime/intl/dcigettext.c +index ba333303f..85e0d6aad 100644 +--- a/gettext-runtime/intl/dcigettext.c ++++ b/gettext-runtime/intl/dcigettext.c +@@ -138,13 +138,10 @@ extern int errno; + # define tfind __tfind + #else + # if !defined HAVE_GETCWD +-char *getwd (); + # define getcwd(buf, max) getwd (buf) + # else + # if VMS + # define getcwd(buf, max) (getcwd) (buf, max, 0) +-# else +-char *getcwd (); + # endif + # endif + # ifndef HAVE_STPCPY +diff --git a/gettext-runtime/intl/gettextP.h b/gettext-runtime/intl/gettextP.h +index 0d7dbd6d4..1b7186552 100644 +--- a/gettext-runtime/intl/gettextP.h ++++ b/gettext-runtime/intl/gettextP.h +@@ -113,12 +113,7 @@ extern char *libintl_dcigettext (const char *__domainname, + # define SWAP(i) bswap_32 (i) + #else + static inline nls_uint32 +-# ifdef __cplusplus + SWAP (nls_uint32 i) +-# else +-SWAP (i) +- nls_uint32 i; +-# endif + { + return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24); + } +-- +2.49.0 + diff --git a/packages/gettext/0.22.5/chksum b/packages/gettext/0.22.5/chksum index 953db4bc1a..699fc1b586 100644 --- a/packages/gettext/0.22.5/chksum +++ b/packages/gettext/0.22.5/chksum @@ -1,8 +1,8 @@ -md5 gettext-0.22.5.tar.gz 1245c87cfa0b123f55540681af396880 -sha1 gettext-0.22.5.tar.gz 1c3911796312efd8119da7a292edef305bdb71bb -sha256 gettext-0.22.5.tar.gz ec1705b1e969b83a9f073144ec806151db88127f5e40fe5a94cb6c8fa48996a0 -sha512 gettext-0.22.5.tar.gz d8b22d7fba10052a2045f477f0a5b684d932513bdb3b295c22fbd9dfc2a9d8fccd9aefd90692136c62897149aa2f7d1145ce6618aa1f0be787cb88eba5bc09be md5 gettext-0.22.5.tar.xz 3ae5580599d84be93e6213930facb2db sha1 gettext-0.22.5.tar.xz 396a3b2a0c66ca113f6a91fca8772f752f1696e4 sha256 gettext-0.22.5.tar.xz fe10c37353213d78a5b83d48af231e005c4da84db5ce88037d88355938259640 sha512 gettext-0.22.5.tar.xz a60999bb9d09441f138214d87acb7e59aab81e765bb9253a77c54902681c5de164a5a04de2a9778dfb479dbdefaab2d5de1fbaf6095c555c43e7e9fd7a1c09bd +md5 gettext-0.22.5.tar.gz 1245c87cfa0b123f55540681af396880 +sha1 gettext-0.22.5.tar.gz 1c3911796312efd8119da7a292edef305bdb71bb +sha256 gettext-0.22.5.tar.gz ec1705b1e969b83a9f073144ec806151db88127f5e40fe5a94cb6c8fa48996a0 +sha512 gettext-0.22.5.tar.gz d8b22d7fba10052a2045f477f0a5b684d932513bdb3b295c22fbd9dfc2a9d8fccd9aefd90692136c62897149aa2f7d1145ce6618aa1f0be787cb88eba5bc09be diff --git a/packages/gettext/0.23.1/chksum b/packages/gettext/0.23.1/chksum new file mode 100644 index 0000000000..3f68a404b7 --- /dev/null +++ b/packages/gettext/0.23.1/chksum @@ -0,0 +1,8 @@ +md5 gettext-0.23.1.tar.xz 1a174902c396e95c7d9761033fe1360e +sha1 gettext-0.23.1.tar.xz 21e0c340de0c79f9d93f970f4a6bdafaa7dc8fe7 +sha256 gettext-0.23.1.tar.xz c1f97a72a7385b7e71dd07b5fea6cdaf12c9b88b564976b23bd8c11857af2970 +sha512 gettext-0.23.1.tar.xz d75908f73eabe36c01d72d342ca694dbefad5f43da54f0ccb43bfd0518baff5becc8f50e787f21fadb7c29b3123638e4559334ea4f8e48a97107e8c5e22453b6 +md5 gettext-0.23.1.tar.gz 50889348408eb278ed0c9c913c325f30 +sha1 gettext-0.23.1.tar.gz 3faf57a14ada2a9772360beb6659374cc20ca8c8 +sha256 gettext-0.23.1.tar.gz 52a578960fe308742367d75cd1dff8552c5797bd0beba7639e12bdcda28c0e49 +sha512 gettext-0.23.1.tar.gz 39ccf78961e4baae761a6117dcec02957bbbdbd398197b8b11ea18e53c04bf2500a7c143d3f9ea3ded48c55f71a323eb05ee0e461c1d9b397297e971b8ad6eef diff --git a/packages/m4/1.4.19/version.desc b/packages/gettext/0.23.1/version.desc similarity index 100% rename from packages/m4/1.4.19/version.desc rename to packages/gettext/0.23.1/version.desc diff --git a/packages/gettext/0.26/chksum b/packages/gettext/0.26/chksum new file mode 100644 index 0000000000..570388e52c --- /dev/null +++ b/packages/gettext/0.26/chksum @@ -0,0 +1,8 @@ +md5 gettext-0.26.tar.xz 8e14e926f088e292f5f2bce95b81d10e +sha1 gettext-0.26.tar.xz 06caeffe13e4e9f92912e8c4d99d340790f463ae +sha256 gettext-0.26.tar.xz d1fb86e260cfe7da6031f94d2e44c0da55903dbae0a2fa0fae78c91ae1b56f00 +sha512 gettext-0.26.tar.xz 544e41c9390695df1c21542842e9ca027a03cb7d4045d8cd759dec1a3dfb624aae900751b458bdb31d6454b37c40c474a952059b884555a03c7c95d6d0e687b1 +md5 gettext-0.26.tar.gz ee66cf742805c0027a7f3db5f2d3f7eb +sha1 gettext-0.26.tar.gz 303f56fa7f0acba9400b6e92afe2f9cdcf0ce8e7 +sha256 gettext-0.26.tar.gz 39acf4b0371e9b110b60005562aace5b3631fed9b1bb9ecccfc7f56e58bb1d7f +sha512 gettext-0.26.tar.gz 6c2afb0737843028e1cd27f1cd7dd5b81372ccff8cd8e01e17cfdc517afdd9a849c232f1ff5adca5eb4b03f2cc64f4a3f689ae8b84e523ceeae85384f3844083 diff --git a/packages/make/4.4/version.desc b/packages/gettext/0.26/version.desc similarity index 100% rename from packages/make/4.4/version.desc rename to packages/gettext/0.26/version.desc diff --git a/packages/gettext/package.desc b/packages/gettext/package.desc index 2341b4bda9..f5108ca6f5 100644 --- a/packages/gettext/package.desc +++ b/packages/gettext/package.desc @@ -5,4 +5,4 @@ bootstrap='./autogen.sh' mirrors='$(CT_Mirrors GNU gettext)' archive_formats='.tar.xz .tar.gz' signature_format='packed/.sig' -milestones='0.21' +milestones='0.21 0.23' diff --git a/packages/glibc/2.29/0005-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch b/packages/glibc/2.29/0005-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch new file mode 100644 index 0000000000..a73f2588c5 --- /dev/null +++ b/packages/glibc/2.29/0005-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch @@ -0,0 +1,62 @@ +From 0f562f885b72250007c05a008b1ebafdf7ce41b1 Mon Sep 17 00:00:00 2001 +Message-ID: <0f562f885b72250007c05a008b1ebafdf7ce41b1.1743754721.git.rsworktech@outlook.com> +From: Fangrui Song +Date: Thu, 28 Oct 2021 11:39:49 -0700 +Subject: [PATCH] riscv: Fix incorrect jal with HIDDEN_JUMPTARGET + +A non-local STV_DEFAULT defined symbol is by default preemptible in a +shared object. j/jal cannot target a preemptible symbol. On other +architectures, such a jump instruction either causes PLT [BZ #18822], or +if short-ranged, sometimes rejected by the linker (but not by GNU ld's +riscv port [ld PR/28509]). + +Use HIDDEN_JUMPTARGET to target a non-preemptible symbol instead. + +With this patch, ld.so and libc.so can be linked with LLD if source +files are compiled/assembled with -mno-relax/-Wa,-mno-relax. + +Acked-by: Palmer Dabbelt +Reviewed-by: Adhemerval Zanella +--- + sysdeps/riscv/setjmp.S | 2 +- + sysdeps/unix/sysv/linux/riscv/setcontext.S | 5 +++-- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/sysdeps/riscv/setjmp.S b/sysdeps/riscv/setjmp.S +index 38a93b78e8..435e25d044 100644 +--- a/sysdeps/riscv/setjmp.S ++++ b/sysdeps/riscv/setjmp.S +@@ -21,7 +21,7 @@ + + ENTRY (_setjmp) + li a1, 0 +- j __sigsetjmp ++ j HIDDEN_JUMPTARGET (__sigsetjmp) + END (_setjmp) + ENTRY (setjmp) + li a1, 1 +diff --git a/sysdeps/unix/sysv/linux/riscv/setcontext.S b/sysdeps/unix/sysv/linux/riscv/setcontext.S +index a494b100be..f0dce4fbad 100644 +--- a/sysdeps/unix/sysv/linux/riscv/setcontext.S ++++ b/sysdeps/unix/sysv/linux/riscv/setcontext.S +@@ -95,6 +95,7 @@ LEAF (__setcontext) + 99: j __syscall_error + + END (__setcontext) ++libc_hidden_def (__setcontext) + weak_alias (__setcontext, setcontext) + + LEAF (__start_context) +@@ -108,7 +109,7 @@ LEAF (__start_context) + /* Invoke subsequent context if present, else exit(0). */ + mv a0, s2 + beqz s2, 1f +- jal __setcontext +-1: j exit ++ jal HIDDEN_JUMPTARGET (__setcontext) ++1: j HIDDEN_JUMPTARGET (exit) + + END (__start_context) +-- +2.49.0 + diff --git a/packages/glibc/2.30/0005-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch b/packages/glibc/2.30/0005-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch new file mode 100644 index 0000000000..5867ded806 --- /dev/null +++ b/packages/glibc/2.30/0005-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch @@ -0,0 +1,62 @@ +From b88a116d880eebf8b0ff52146ddd5c8120d55545 Mon Sep 17 00:00:00 2001 +Message-ID: +From: Fangrui Song +Date: Thu, 28 Oct 2021 11:39:49 -0700 +Subject: [PATCH] riscv: Fix incorrect jal with HIDDEN_JUMPTARGET + +A non-local STV_DEFAULT defined symbol is by default preemptible in a +shared object. j/jal cannot target a preemptible symbol. On other +architectures, such a jump instruction either causes PLT [BZ #18822], or +if short-ranged, sometimes rejected by the linker (but not by GNU ld's +riscv port [ld PR/28509]). + +Use HIDDEN_JUMPTARGET to target a non-preemptible symbol instead. + +With this patch, ld.so and libc.so can be linked with LLD if source +files are compiled/assembled with -mno-relax/-Wa,-mno-relax. + +Acked-by: Palmer Dabbelt +Reviewed-by: Adhemerval Zanella +--- + sysdeps/riscv/setjmp.S | 2 +- + sysdeps/unix/sysv/linux/riscv/setcontext.S | 5 +++-- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/sysdeps/riscv/setjmp.S b/sysdeps/riscv/setjmp.S +index 38a93b78e8..435e25d044 100644 +--- a/sysdeps/riscv/setjmp.S ++++ b/sysdeps/riscv/setjmp.S +@@ -21,7 +21,7 @@ + + ENTRY (_setjmp) + li a1, 0 +- j __sigsetjmp ++ j HIDDEN_JUMPTARGET (__sigsetjmp) + END (_setjmp) + ENTRY (setjmp) + li a1, 1 +diff --git a/sysdeps/unix/sysv/linux/riscv/setcontext.S b/sysdeps/unix/sysv/linux/riscv/setcontext.S +index a494b100be..f0dce4fbad 100644 +--- a/sysdeps/unix/sysv/linux/riscv/setcontext.S ++++ b/sysdeps/unix/sysv/linux/riscv/setcontext.S +@@ -95,6 +95,7 @@ LEAF (__setcontext) + 99: j __syscall_error + + END (__setcontext) ++libc_hidden_def (__setcontext) + weak_alias (__setcontext, setcontext) + + LEAF (__start_context) +@@ -108,7 +109,7 @@ LEAF (__start_context) + /* Invoke subsequent context if present, else exit(0). */ + mv a0, s2 + beqz s2, 1f +- jal __setcontext +-1: j exit ++ jal HIDDEN_JUMPTARGET (__setcontext) ++1: j HIDDEN_JUMPTARGET (exit) + + END (__start_context) +-- +2.49.0 + diff --git a/packages/glibc/2.31/0004-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch b/packages/glibc/2.31/0004-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch new file mode 100644 index 0000000000..97147973e5 --- /dev/null +++ b/packages/glibc/2.31/0004-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch @@ -0,0 +1,62 @@ +From 4423c20665378a30bb75828b041835b8b75995db Mon Sep 17 00:00:00 2001 +Message-ID: <4423c20665378a30bb75828b041835b8b75995db.1743754847.git.rsworktech@outlook.com> +From: Fangrui Song +Date: Thu, 28 Oct 2021 11:39:49 -0700 +Subject: [PATCH] riscv: Fix incorrect jal with HIDDEN_JUMPTARGET + +A non-local STV_DEFAULT defined symbol is by default preemptible in a +shared object. j/jal cannot target a preemptible symbol. On other +architectures, such a jump instruction either causes PLT [BZ #18822], or +if short-ranged, sometimes rejected by the linker (but not by GNU ld's +riscv port [ld PR/28509]). + +Use HIDDEN_JUMPTARGET to target a non-preemptible symbol instead. + +With this patch, ld.so and libc.so can be linked with LLD if source +files are compiled/assembled with -mno-relax/-Wa,-mno-relax. + +Acked-by: Palmer Dabbelt +Reviewed-by: Adhemerval Zanella +--- + sysdeps/riscv/setjmp.S | 2 +- + sysdeps/unix/sysv/linux/riscv/setcontext.S | 5 +++-- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/sysdeps/riscv/setjmp.S b/sysdeps/riscv/setjmp.S +index 2cf31deeb4..3e61597b7a 100644 +--- a/sysdeps/riscv/setjmp.S ++++ b/sysdeps/riscv/setjmp.S +@@ -21,7 +21,7 @@ + + ENTRY (_setjmp) + li a1, 0 +- j __sigsetjmp ++ j HIDDEN_JUMPTARGET (__sigsetjmp) + END (_setjmp) + ENTRY (setjmp) + li a1, 1 +diff --git a/sysdeps/unix/sysv/linux/riscv/setcontext.S b/sysdeps/unix/sysv/linux/riscv/setcontext.S +index fb9937517d..e7f1e6481b 100644 +--- a/sysdeps/unix/sysv/linux/riscv/setcontext.S ++++ b/sysdeps/unix/sysv/linux/riscv/setcontext.S +@@ -95,6 +95,7 @@ LEAF (__setcontext) + 99: j __syscall_error + + END (__setcontext) ++libc_hidden_def (__setcontext) + weak_alias (__setcontext, setcontext) + + LEAF (__start_context) +@@ -108,7 +109,7 @@ LEAF (__start_context) + /* Invoke subsequent context if present, else exit(0). */ + mv a0, s2 + beqz s2, 1f +- jal __setcontext +-1: j exit ++ jal HIDDEN_JUMPTARGET (__setcontext) ++1: j HIDDEN_JUMPTARGET (exit) + + END (__start_context) +-- +2.49.0 + diff --git a/packages/glibc/2.32/0004-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch b/packages/glibc/2.32/0004-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch new file mode 100644 index 0000000000..c366cb592a --- /dev/null +++ b/packages/glibc/2.32/0004-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch @@ -0,0 +1,62 @@ +From 855529f1a6bf492ec169c2dbd1bd29ed668352e6 Mon Sep 17 00:00:00 2001 +Message-ID: <855529f1a6bf492ec169c2dbd1bd29ed668352e6.1743754974.git.rsworktech@outlook.com> +From: Fangrui Song +Date: Thu, 28 Oct 2021 11:39:49 -0700 +Subject: [PATCH] riscv: Fix incorrect jal with HIDDEN_JUMPTARGET + +A non-local STV_DEFAULT defined symbol is by default preemptible in a +shared object. j/jal cannot target a preemptible symbol. On other +architectures, such a jump instruction either causes PLT [BZ #18822], or +if short-ranged, sometimes rejected by the linker (but not by GNU ld's +riscv port [ld PR/28509]). + +Use HIDDEN_JUMPTARGET to target a non-preemptible symbol instead. + +With this patch, ld.so and libc.so can be linked with LLD if source +files are compiled/assembled with -mno-relax/-Wa,-mno-relax. + +Acked-by: Palmer Dabbelt +Reviewed-by: Adhemerval Zanella +--- + sysdeps/riscv/setjmp.S | 2 +- + sysdeps/unix/sysv/linux/riscv/setcontext.S | 5 +++-- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/sysdeps/riscv/setjmp.S b/sysdeps/riscv/setjmp.S +index 2cf31deeb4..3e61597b7a 100644 +--- a/sysdeps/riscv/setjmp.S ++++ b/sysdeps/riscv/setjmp.S +@@ -21,7 +21,7 @@ + + ENTRY (_setjmp) + li a1, 0 +- j __sigsetjmp ++ j HIDDEN_JUMPTARGET (__sigsetjmp) + END (_setjmp) + ENTRY (setjmp) + li a1, 1 +diff --git a/sysdeps/unix/sysv/linux/riscv/setcontext.S b/sysdeps/unix/sysv/linux/riscv/setcontext.S +index fb9937517d..e7f1e6481b 100644 +--- a/sysdeps/unix/sysv/linux/riscv/setcontext.S ++++ b/sysdeps/unix/sysv/linux/riscv/setcontext.S +@@ -95,6 +95,7 @@ LEAF (__setcontext) + 99: j __syscall_error + + END (__setcontext) ++libc_hidden_def (__setcontext) + weak_alias (__setcontext, setcontext) + + LEAF (__start_context) +@@ -108,7 +109,7 @@ LEAF (__start_context) + /* Invoke subsequent context if present, else exit(0). */ + mv a0, s2 + beqz s2, 1f +- jal __setcontext +-1: j exit ++ jal HIDDEN_JUMPTARGET (__setcontext) ++1: j HIDDEN_JUMPTARGET (exit) + + END (__start_context) +-- +2.49.0 + diff --git a/packages/glibc/2.33/0004-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch b/packages/glibc/2.33/0004-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch new file mode 100644 index 0000000000..b81d975e12 --- /dev/null +++ b/packages/glibc/2.33/0004-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch @@ -0,0 +1,62 @@ +From 57e68a67fc6185b5952c62683274045561e5c880 Mon Sep 17 00:00:00 2001 +Message-ID: <57e68a67fc6185b5952c62683274045561e5c880.1743754995.git.rsworktech@outlook.com> +From: Fangrui Song +Date: Thu, 28 Oct 2021 11:39:49 -0700 +Subject: [PATCH] riscv: Fix incorrect jal with HIDDEN_JUMPTARGET + +A non-local STV_DEFAULT defined symbol is by default preemptible in a +shared object. j/jal cannot target a preemptible symbol. On other +architectures, such a jump instruction either causes PLT [BZ #18822], or +if short-ranged, sometimes rejected by the linker (but not by GNU ld's +riscv port [ld PR/28509]). + +Use HIDDEN_JUMPTARGET to target a non-preemptible symbol instead. + +With this patch, ld.so and libc.so can be linked with LLD if source +files are compiled/assembled with -mno-relax/-Wa,-mno-relax. + +Acked-by: Palmer Dabbelt +Reviewed-by: Adhemerval Zanella +--- + sysdeps/riscv/setjmp.S | 2 +- + sysdeps/unix/sysv/linux/riscv/setcontext.S | 5 +++-- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/sysdeps/riscv/setjmp.S b/sysdeps/riscv/setjmp.S +index 0b92016b31..bec7ff80f4 100644 +--- a/sysdeps/riscv/setjmp.S ++++ b/sysdeps/riscv/setjmp.S +@@ -21,7 +21,7 @@ + + ENTRY (_setjmp) + li a1, 0 +- j __sigsetjmp ++ j HIDDEN_JUMPTARGET (__sigsetjmp) + END (_setjmp) + ENTRY (setjmp) + li a1, 1 +diff --git a/sysdeps/unix/sysv/linux/riscv/setcontext.S b/sysdeps/unix/sysv/linux/riscv/setcontext.S +index 9510518750..e44a68aad4 100644 +--- a/sysdeps/unix/sysv/linux/riscv/setcontext.S ++++ b/sysdeps/unix/sysv/linux/riscv/setcontext.S +@@ -95,6 +95,7 @@ LEAF (__setcontext) + 99: j __syscall_error + + END (__setcontext) ++libc_hidden_def (__setcontext) + weak_alias (__setcontext, setcontext) + + LEAF (__start_context) +@@ -108,7 +109,7 @@ LEAF (__start_context) + /* Invoke subsequent context if present, else exit(0). */ + mv a0, s2 + beqz s2, 1f +- jal __setcontext +-1: j exit ++ jal HIDDEN_JUMPTARGET (__setcontext) ++1: j HIDDEN_JUMPTARGET (exit) + + END (__start_context) +-- +2.49.0 + diff --git a/packages/glibc/2.34/0003-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch b/packages/glibc/2.34/0003-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch new file mode 100644 index 0000000000..ded830e913 --- /dev/null +++ b/packages/glibc/2.34/0003-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch @@ -0,0 +1,62 @@ +From 4ccc5a45723f2051aa823ed72b88cb1ae1683a60 Mon Sep 17 00:00:00 2001 +Message-ID: <4ccc5a45723f2051aa823ed72b88cb1ae1683a60.1743755185.git.rsworktech@outlook.com> +From: Fangrui Song +Date: Thu, 28 Oct 2021 11:39:49 -0700 +Subject: [PATCH] riscv: Fix incorrect jal with HIDDEN_JUMPTARGET + +A non-local STV_DEFAULT defined symbol is by default preemptible in a +shared object. j/jal cannot target a preemptible symbol. On other +architectures, such a jump instruction either causes PLT [BZ #18822], or +if short-ranged, sometimes rejected by the linker (but not by GNU ld's +riscv port [ld PR/28509]). + +Use HIDDEN_JUMPTARGET to target a non-preemptible symbol instead. + +With this patch, ld.so and libc.so can be linked with LLD if source +files are compiled/assembled with -mno-relax/-Wa,-mno-relax. + +Acked-by: Palmer Dabbelt +Reviewed-by: Adhemerval Zanella +--- + sysdeps/riscv/setjmp.S | 2 +- + sysdeps/unix/sysv/linux/riscv/setcontext.S | 5 +++-- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/sysdeps/riscv/setjmp.S b/sysdeps/riscv/setjmp.S +index 0b92016b31..bec7ff80f4 100644 +--- a/sysdeps/riscv/setjmp.S ++++ b/sysdeps/riscv/setjmp.S +@@ -21,7 +21,7 @@ + + ENTRY (_setjmp) + li a1, 0 +- j __sigsetjmp ++ j HIDDEN_JUMPTARGET (__sigsetjmp) + END (_setjmp) + ENTRY (setjmp) + li a1, 1 +diff --git a/sysdeps/unix/sysv/linux/riscv/setcontext.S b/sysdeps/unix/sysv/linux/riscv/setcontext.S +index 9510518750..e44a68aad4 100644 +--- a/sysdeps/unix/sysv/linux/riscv/setcontext.S ++++ b/sysdeps/unix/sysv/linux/riscv/setcontext.S +@@ -95,6 +95,7 @@ LEAF (__setcontext) + 99: j __syscall_error + + END (__setcontext) ++libc_hidden_def (__setcontext) + weak_alias (__setcontext, setcontext) + + LEAF (__start_context) +@@ -108,7 +109,7 @@ LEAF (__start_context) + /* Invoke subsequent context if present, else exit(0). */ + mv a0, s2 + beqz s2, 1f +- jal __setcontext +-1: j exit ++ jal HIDDEN_JUMPTARGET (__setcontext) ++1: j HIDDEN_JUMPTARGET (exit) + + END (__start_context) +-- +2.49.0 + diff --git a/packages/glibc/2.41/0000-Add-ARC700-support.patch b/packages/glibc/2.41/0000-Add-ARC700-support.patch new file mode 100644 index 0000000000..1b93a94c2c --- /dev/null +++ b/packages/glibc/2.41/0000-Add-ARC700-support.patch @@ -0,0 +1,92 @@ +From 36449920c501177b61c6fdc1f72875ca41084a8e Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Sat, 13 Feb 2021 17:08:21 +0300 +Subject: [PATCH] Add ARC700 support + +glibc does not officially support ARC700 so this adds the missing +pieces. I looked at uClibc-ng and a patch by Synopsis for glibc. + +[Alexey] Taken from https://github.com/openwrt/openwrt/commit/33646a51abcf15ff5c5363848287e1ed778b7467 + +Signed-off-by: Rosen Penev +Signed-off-by: Alexey Brodkin +--- + sysdeps/arc/atomic-machine.h | 4 ++++ + sysdeps/unix/sysv/linux/arc/syscall.S | 5 +++++ + sysdeps/unix/sysv/linux/arc/syscall_cancel.S | 6 ++++++ + sysdeps/unix/sysv/linux/arc/sysdep.h | 8 ++++++++ + 4 files changed, 23 insertions(+) + +--- a/sysdeps/arc/atomic-machine.h ++++ b/sysdeps/arc/atomic-machine.h +@@ -52,6 +52,10 @@ + __atomic_val_bysize (__arch_compare_and_exchange_val, int, \ + mem, new, old, __ATOMIC_ACQUIRE) + ++#ifdef __ARC700__ ++#define atomic_full_barrier() ({ asm volatile ("sync":::"memory"); }) ++#else + #define atomic_full_barrier() ({ asm volatile ("dmb 3":::"memory"); }) ++#endif + + #endif /* _ARC_BITS_ATOMIC_H */ +--- a/sysdeps/unix/sysv/linux/arc/syscall.S ++++ b/sysdeps/unix/sysv/linux/arc/syscall.S +@@ -24,8 +24,13 @@ + mov_s r1, r2 + mov_s r2, r3 + mov_s r3, r4 ++#ifdef __ARC700__ ++ mov r4, r5 ++ mov r5, r6 ++#else + mov_s r4, r5 + mov_s r5, r6 ++#endif + + ARC_TRAP_INSN + brhi r0, -4096, L (call_syscall_err) +--- a/sysdeps/unix/sysv/linux/arc/syscall_cancel.S ++++ b/sysdeps/unix/sysv/linux/arc/syscall_cancel.S +@@ -38,9 +38,15 @@ + mov_s r0, r2 + mov_s r1, r3 + mov_s r2, r4 ++#ifdef __ARC700__ ++ mov r3, r5 ++ mov r4, r6 ++ mov r5, r7 ++#else + mov_s r3, r5 + mov_s r4, r6 + mov_s r5, r7 ++#endif + trap_s 0 + + .globl __syscall_cancel_arch_end +--- a/sysdeps/unix/sysv/linux/arc/sysdep.h ++++ b/sysdeps/unix/sysv/linux/arc/sysdep.h +@@ -130,7 +130,11 @@ + mov r8, __NR_##syscall_name ASM_LINE_SEP \ + ARC_TRAP_INSN ASM_LINE_SEP + ++# ifdef __ARC700__ ++# define ARC_TRAP_INSN trap0 ++# else + # define ARC_TRAP_INSN trap_s 0 ++# endif + + #else /* !__ASSEMBLER__ */ + +@@ -139,7 +143,11 @@ + hidden_proto (__syscall_error) + # endif + ++# ifdef __ARC700__ ++# define ARC_TRAP_INSN "trap0 \n\t" ++# else + # define ARC_TRAP_INSN "trap_s 0 \n\t" ++#endif + + # define HAVE_CLONE3_WRAPPER 1 + diff --git a/packages/glibc/2.41/chksum b/packages/glibc/2.41/chksum new file mode 100644 index 0000000000..b2eae604f5 --- /dev/null +++ b/packages/glibc/2.41/chksum @@ -0,0 +1,12 @@ +md5 glibc-2.41.tar.xz 19862601af60f73ac69e067d3e9267d4 +sha1 glibc-2.41.tar.xz 51151d596f4ca800e3220825f6ac07e5e9bc5d23 +sha256 glibc-2.41.tar.xz a5a26b22f545d6b7d7b3dd828e11e428f24f4fac43c934fb071b6a7d0828e901 +sha512 glibc-2.41.tar.xz 894a3e5a796bc13df30c26a5bfbe4d60b5dbdaac54e7763432235124b547070c7dda88c50584536870cab79183d8cad73a3ac6ed09bfe54fa8482aad07253169 +md5 glibc-2.41.tar.bz2 b696289e331b03d4920f01a5e40a1b19 +sha1 glibc-2.41.tar.bz2 f183c3fbd185b143ffec1e3ae3ee56badb914775 +sha256 glibc-2.41.tar.bz2 13cffc682feef721d575250bd4845f92950d3aab23c471279c0f70e497b08442 +sha512 glibc-2.41.tar.bz2 0c8a4493e2b3abc15d20d7d52e387656db8b619774cd555ce9b20709cee42526b68375884f92f9acb6e9a86ce82a8cb62141f78f92bd29db8d94fa413c81510f +md5 glibc-2.41.tar.gz 74e52947360bba6654272f6bdb90a1d9 +sha1 glibc-2.41.tar.gz 093600f3c3b15dd2d2cf488163fb3dfdc2d95b1e +sha256 glibc-2.41.tar.gz c7be6e25eeaf4b956f5d4d56a04d23e4db453fc07760f872903bb61a49519b80 +sha512 glibc-2.41.tar.gz 85943f8b0e0298d1db11da3c92d77364acd0d74f374651adc0289df9ba8a55230acded6ed5bac726be715318b8e879eb96daf5edb28239caa13a217f4f752898 diff --git a/packages/mpfr/4.2.1/version.desc b/packages/glibc/2.41/version.desc similarity index 100% rename from packages/mpfr/4.2.1/version.desc rename to packages/glibc/2.41/version.desc diff --git a/packages/glibc/2.42/0000-Add-ARC700-support.patch b/packages/glibc/2.42/0000-Add-ARC700-support.patch new file mode 100644 index 0000000000..af91b0c7eb --- /dev/null +++ b/packages/glibc/2.42/0000-Add-ARC700-support.patch @@ -0,0 +1,103 @@ +From 9a641363800eacf7ae6b54da11b39b7976d6bc31 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Sat, 13 Feb 2021 17:08:21 +0300 +Subject: [PATCH] Add ARC700 support + +glibc does not officially support ARC700 so this adds the missing +pieces. I looked at uClibc-ng and a patch by Synopsis for glibc. + +[Alexey] Taken from https://github.com/openwrt/openwrt/commit/33646a51abcf15ff5c5363848287e1ed778b7467 + +Signed-off-by: Rosen Penev +Signed-off-by: Alexey Brodkin +--- + sysdeps/arc/atomic-machine.h | 4 ++++ + sysdeps/unix/sysv/linux/arc/syscall.S | 5 +++++ + sysdeps/unix/sysv/linux/arc/syscall_cancel.S | 6 ++++++ + sysdeps/unix/sysv/linux/arc/sysdep.h | 8 ++++++++ + 4 files changed, 23 insertions(+) + +diff --git a/sysdeps/arc/atomic-machine.h b/sysdeps/arc/atomic-machine.h +index 0133277d3b..93c2d98a57 100644 +--- a/sysdeps/arc/atomic-machine.h ++++ b/sysdeps/arc/atomic-machine.h +@@ -52,6 +52,10 @@ + __atomic_val_bysize (__arch_compare_and_exchange_val, int, \ + mem, new, old, __ATOMIC_ACQUIRE) + ++#ifdef __ARC700__ ++#define atomic_full_barrier() ({ asm volatile ("sync":::"memory"); }) ++#else + #define atomic_full_barrier() ({ asm volatile ("dmb 3":::"memory"); }) ++#endif + + #endif /* _ARC_BITS_ATOMIC_H */ +diff --git a/sysdeps/unix/sysv/linux/arc/syscall.S b/sysdeps/unix/sysv/linux/arc/syscall.S +index 71177e1139..6522bbf72f 100644 +--- a/sysdeps/unix/sysv/linux/arc/syscall.S ++++ b/sysdeps/unix/sysv/linux/arc/syscall.S +@@ -24,8 +24,13 @@ ENTRY (syscall) + mov_s r1, r2 + mov_s r2, r3 + mov_s r3, r4 ++#ifdef __ARC700__ ++ mov r4, r5 ++ mov r5, r6 ++#else + mov_s r4, r5 + mov_s r5, r6 ++#endif + + ARC_TRAP_INSN + brhi r0, -4096, L (call_syscall_err) +diff --git a/sysdeps/unix/sysv/linux/arc/syscall_cancel.S b/sysdeps/unix/sysv/linux/arc/syscall_cancel.S +index ccffef3fd6..f62cac11a8 100644 +--- a/sysdeps/unix/sysv/linux/arc/syscall_cancel.S ++++ b/sysdeps/unix/sysv/linux/arc/syscall_cancel.S +@@ -38,9 +38,15 @@ __syscall_cancel_arch_start: + mov_s r0, r2 + mov_s r1, r3 + mov_s r2, r4 ++#ifdef __ARC700__ ++ mov r3, r5 ++ mov r4, r6 ++ mov r5, r7 ++#else + mov_s r3, r5 + mov_s r4, r6 + mov_s r5, r7 ++#endif + trap_s 0 + + .globl __syscall_cancel_arch_end +diff --git a/sysdeps/unix/sysv/linux/arc/sysdep.h b/sysdeps/unix/sysv/linux/arc/sysdep.h +index 06e31404ec..f1a251bf84 100644 +--- a/sysdeps/unix/sysv/linux/arc/sysdep.h ++++ b/sysdeps/unix/sysv/linux/arc/sysdep.h +@@ -130,7 +130,11 @@ L (call_syscall_err): ASM_LINE_SEP \ + mov r8, __NR_##syscall_name ASM_LINE_SEP \ + ARC_TRAP_INSN ASM_LINE_SEP + ++# ifdef __ARC700__ ++# define ARC_TRAP_INSN trap0 ++# else + # define ARC_TRAP_INSN trap_s 0 ++# endif + + #else /* !__ASSEMBLER__ */ + +@@ -139,7 +143,11 @@ extern long int __syscall_error (long int); + hidden_proto (__syscall_error) + # endif + ++# ifdef __ARC700__ ++# define ARC_TRAP_INSN "trap0 \n\t" ++# else + # define ARC_TRAP_INSN "trap_s 0 \n\t" ++#endif + + # define HAVE_CLONE3_WRAPPER 1 + +-- +2.50.1 + diff --git a/packages/glibc/2.42/chksum b/packages/glibc/2.42/chksum new file mode 100644 index 0000000000..20508fd653 --- /dev/null +++ b/packages/glibc/2.42/chksum @@ -0,0 +1,12 @@ +md5 glibc-2.42.tar.xz 23c6f5a27932b435cae94e087cb8b1f5 +sha1 glibc-2.42.tar.xz b5c170f2941cd39292ee0b986921334c004dd562 +sha256 glibc-2.42.tar.xz d1775e32e4628e64ef930f435b67bb63af7599acb6be2b335b9f19f16509f17f +sha512 glibc-2.42.tar.xz 73a617db8e0f0958c0575f7a1c5a35b72b7e070b6cbdd02a9bb134995ca7ca0909f1e50d7362c53d2572d72f1879bb201a61d5275bac16136895d9a34ef0c068 +md5 glibc-2.42.tar.bz2 0537f3bbc8180d0698f1572a1a96d715 +sha1 glibc-2.42.tar.bz2 bb589b5b1bcace575444d557f81417fa140ec02b +sha256 glibc-2.42.tar.bz2 19677e43429c035523c001589bf06ef405819c72b88adfa1104665bd8271bb92 +sha512 glibc-2.42.tar.bz2 7aad65998408b07159b10397d02337aec60a7425af66b9c7dabe91f97e40b1ca124b219ce7be07b0dcca7f0ca493bd851fb49d1e0d113adf2e9655bbcc5a0ef1 +md5 glibc-2.42.tar.gz de45cdb246eb3a73dd3ccd5012f787fd +sha1 glibc-2.42.tar.gz d036df82c64e6f1d2e2022fe860564f760fde478 +sha256 glibc-2.42.tar.gz d4468d3e3267068c1b0623ca6424aac9a28766df774c8d8fb4978127fca7125a +sha512 glibc-2.42.tar.gz 3f438dd27f8f6ab68ae3b50845366efbf8fc174ce94f8b1ddd38fd1c1fef762a23044ee525651c5a0ff28a04802df97efd7045a9f732fcb5ba9740e0f9ae3b11 diff --git a/packages/picolibc/1.8.6/version.desc b/packages/glibc/2.42/version.desc similarity index 100% rename from packages/picolibc/1.8.6/version.desc rename to packages/glibc/2.42/version.desc diff --git a/packages/glibc/2.43/0000-Add-ARC700-support.patch b/packages/glibc/2.43/0000-Add-ARC700-support.patch new file mode 100644 index 0000000000..f9e1ef3bbf --- /dev/null +++ b/packages/glibc/2.43/0000-Add-ARC700-support.patch @@ -0,0 +1,87 @@ +From bb4b07668bb852f755e40e979c2325dbfba91e77 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Sat, 13 Feb 2021 17:08:21 +0300 +Subject: [PATCH] Add ARC700 support + +glibc does not officially support ARC700 so this adds the missing +pieces. I looked at uClibc-ng and a patch by Synopsis for glibc. + +[Alexey] Taken from https://github.com/openwrt/openwrt/commit/33646a51abcf15ff5c5363848287e1ed778b7467 + +Signed-off-by: Rosen Penev +Signed-off-by: Alexey Brodkin +--- + sysdeps/unix/sysv/linux/arc/syscall.S | 5 +++++ + sysdeps/unix/sysv/linux/arc/syscall_cancel.S | 6 ++++++ + sysdeps/unix/sysv/linux/arc/sysdep.h | 8 ++++++++ + 3 files changed, 19 insertions(+) + +diff --git a/sysdeps/unix/sysv/linux/arc/syscall.S b/sysdeps/unix/sysv/linux/arc/syscall.S +index 335b9692..14f3adc9 100644 +--- a/sysdeps/unix/sysv/linux/arc/syscall.S ++++ b/sysdeps/unix/sysv/linux/arc/syscall.S +@@ -24,8 +24,13 @@ ENTRY (syscall) + mov_s r1, r2 + mov_s r2, r3 + mov_s r3, r4 ++#ifdef __ARC700__ ++ mov r4, r5 ++ mov r5, r6 ++#else + mov_s r4, r5 + mov_s r5, r6 ++#endif + + ARC_TRAP_INSN + brhi r0, -4096, L (call_syscall_err) +diff --git a/sysdeps/unix/sysv/linux/arc/syscall_cancel.S b/sysdeps/unix/sysv/linux/arc/syscall_cancel.S +index 842132a4..a7d61e67 100644 +--- a/sysdeps/unix/sysv/linux/arc/syscall_cancel.S ++++ b/sysdeps/unix/sysv/linux/arc/syscall_cancel.S +@@ -38,9 +38,15 @@ __syscall_cancel_arch_start: + mov_s r0, r2 + mov_s r1, r3 + mov_s r2, r4 ++#ifdef __ARC700__ ++ mov r3, r5 ++ mov r4, r6 ++ mov r5, r7 ++#else + mov_s r3, r5 + mov_s r4, r6 + mov_s r5, r7 ++#endif + trap_s 0 + + .globl __syscall_cancel_arch_end +diff --git a/sysdeps/unix/sysv/linux/arc/sysdep.h b/sysdeps/unix/sysv/linux/arc/sysdep.h +index 90cea3f8..e9167f06 100644 +--- a/sysdeps/unix/sysv/linux/arc/sysdep.h ++++ b/sysdeps/unix/sysv/linux/arc/sysdep.h +@@ -130,7 +130,11 @@ L (call_syscall_err): ASM_LINE_SEP \ + mov r8, __NR_##syscall_name ASM_LINE_SEP \ + ARC_TRAP_INSN ASM_LINE_SEP + ++# ifdef __ARC700__ ++# define ARC_TRAP_INSN trap0 ++# else + # define ARC_TRAP_INSN trap_s 0 ++# endif + + #else /* !__ASSEMBLER__ */ + +@@ -139,7 +143,11 @@ extern long int __syscall_error (long int); + hidden_proto (__syscall_error) + # endif + ++# ifdef __ARC700__ ++# define ARC_TRAP_INSN "trap0 \n\t" ++# else + # define ARC_TRAP_INSN "trap_s 0 \n\t" ++#endif + + # define HAVE_CLONE3_WRAPPER 1 + +-- +2.52.0 + diff --git a/packages/glibc/2.43/chksum b/packages/glibc/2.43/chksum new file mode 100644 index 0000000000..d179fc3812 --- /dev/null +++ b/packages/glibc/2.43/chksum @@ -0,0 +1,12 @@ +md5 glibc-2.43.tar.xz 7ec2588300b299215a65aec7e6afa04f +sha1 glibc-2.43.tar.xz d6bf2cc5439107b73a013284f7dd130c66b3d4f8 +sha256 glibc-2.43.tar.xz d9c86c6b5dbddb43a3e08270c5844fc5177d19442cf5b8df4be7c07cd5fa3831 +sha512 glibc-2.43.tar.xz 25765f86bf54a22fc69dd13023ec9be59bd7e1f9d6ea1630cf21851898df2043bb8a01538c4b5fdd06495d0163289362b0768b391b0617f709b89a777168291c +md5 glibc-2.43.tar.bz2 9f6587f43a27fd6d1cf04a6c98b05e98 +sha1 glibc-2.43.tar.bz2 04bf10fc1c0254176007ba875127ec7c47f16886 +sha256 glibc-2.43.tar.bz2 ccfa28fc1a4c029693c711fb68756eea6ef5fbb0cefbefb5740a90c6e44a8a43 +sha512 glibc-2.43.tar.bz2 d1fef0122a194f0ecc25344c78a8747fe00d05ceb8210e7458de8224e94ff06d6c30a0ba8f437be3da95573e9eb0eba94fe5e5f4dde7cac6f3e3b19cf96883a2 +md5 glibc-2.43.tar.gz c2707c7d2e638d305378139ef0ef7d81 +sha1 glibc-2.43.tar.gz 33ea643db4ac6ee6a3eeda8354d4823f597469d6 +sha256 glibc-2.43.tar.gz e1e622cbd635019090fa23260e5d9ec219b12f97ae7ae02f033d4ae42cf2c004 +sha512 glibc-2.43.tar.gz 832c0a2a1fcfb89e754ae0de4e9418993afb3f2041c4251cb09bed33b74ab396ab5c95e8ce190acc58b5233213a506ab0018055601fd5e0864364e5ce0785e48 diff --git a/packages/strace/6.10/version.desc b/packages/glibc/2.43/version.desc similarity index 100% rename from packages/strace/6.10/version.desc rename to packages/glibc/2.43/version.desc diff --git a/packages/glibc/package.desc b/packages/glibc/package.desc index 80deae670a..83fc169cee 100644 --- a/packages/glibc/package.desc +++ b/packages/glibc/package.desc @@ -3,6 +3,6 @@ repository='git git://sourceware.org/git/glibc.git' mirrors='$(CT_Mirrors GNU glibc)' # Cannot use MAJOR.MINOR as the relevant part because of 2.12: 2.12.2 was the most recent # bugfix release, but it didn't have glibc-ports released alongside it. -milestones='2.10 2.14 2.16 2.17 2.20 2.23 2.24 2.25 2.26 2.27 2.28 2.29 2.30 2.31 2.32 2.34 2.36 2.37 2.38' +milestones='2.14 2.17 2.20 2.23 2.24 2.25 2.26 2.27 2.28 2.29 2.30 2.31 2.32 2.34 2.36 2.37 2.38 2.41 2.42 2.43' archive_formats='.tar.xz .tar.bz2 .tar.gz' signature_format='packed/.sig' diff --git a/packages/gmp/6.3.0/0000-Complete-function-prototype-in-acinclude.patch b/packages/gmp/6.3.0/0000-Complete-function-prototype-in-acinclude.patch new file mode 100644 index 0000000000..d61285d792 --- /dev/null +++ b/packages/gmp/6.3.0/0000-Complete-function-prototype-in-acinclude.patch @@ -0,0 +1,31 @@ +From: Marc Glisse +Date: Wed, 29 Jan 2025 22:38:02 +0100 +Subject: [PATCH] Complete function prototype in acinclude.m4 for C23 + compatibility +--- + acinclude.m4 | 2 +- + configure | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -609,7 +609,7 @@ + + #if defined (__GNUC__) && ! defined (__cplusplus) + typedef unsigned long long t1;typedef t1*t2; +-void g(){} ++void g(int p1,t1 const* p2,t1 p3,t2 p4,t1 const* p5,int p6){} + void h(){} + static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0) + {t1 c,x,r;int i;if(v0){c=1;for(i=1;i -Date: Fri, 15 Jan 2021 18:52:09 +0200 -Subject: [PATCH] HACK: Fix paths for crosstool-ng - -For some reason crosstool-ng modifies the default -binutils/ld path for ldscripts. Align our respective -path. - -Signed-off-by: Dimitar Dimitrov ---- - ldscripts/Makefile.am | 2 +- - ldscripts/Makefile.in | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - ---- a/ldscripts/Makefile.am -+++ b/ldscripts/Makefile.am -@@ -47,4 +47,4 @@ - pruelf-tda4vm.icssg1.tx_pru1.x - - --prudir = $(exec_prefix)/$(target_alias)/lib -+prudir = $(libdir) ---- a/ldscripts/Makefile.in -+++ b/ldscripts/Makefile.in -@@ -300,7 +300,7 @@ - pruelf-tda4vm.icssg1.tx_pru0.x \ - pruelf-tda4vm.icssg1.tx_pru1.x - --prudir = $(exec_prefix)/$(target_alias)/lib -+prudir = $(libdir) - all: all-am - - .SUFFIXES: diff --git a/packages/gnuprumcu/0.5.0/chksum b/packages/gnuprumcu/0.5.0/chksum deleted file mode 100644 index 808703327e..0000000000 --- a/packages/gnuprumcu/0.5.0/chksum +++ /dev/null @@ -1,4 +0,0 @@ -md5 gnuprumcu-0.5.0.tar.gz ee6110995491dac1a834ca7045931391 -sha1 gnuprumcu-0.5.0.tar.gz 94eb2aeb88f5654fa041bed07c2fb7860af95047 -sha256 gnuprumcu-0.5.0.tar.gz 917043152188ad4626f888dbb620e816a523c0599f9a758230a7d687daf915af -sha512 gnuprumcu-0.5.0.tar.gz cc3071913db9c364c2e3966ab580b703700c85a3d292e230b5536df45b54e0137dc1e83a2fae80947e3c1ad178e5b6b6d8319a3d576653b423178c443386bd17 diff --git a/packages/gnuprumcu/0.6.0/chksum b/packages/gnuprumcu/0.6.0/chksum deleted file mode 100644 index 09838087a0..0000000000 --- a/packages/gnuprumcu/0.6.0/chksum +++ /dev/null @@ -1,4 +0,0 @@ -md5 gnuprumcu-0.6.0.tar.gz 9f2a2bc8410e4a7ca5d61ebfbf8b364c -sha1 gnuprumcu-0.6.0.tar.gz 4c5d2be7bb9132553415e11a42261c7e2901ed30 -sha256 gnuprumcu-0.6.0.tar.gz 1f488578edfc7da404fe7d59d2864fffbc00a9cea540d43ac508a68741428a9b -sha512 gnuprumcu-0.6.0.tar.gz ee2f4f25e2f77825832db96915ec34d1fa27db3804eef17728591ee439d00ee668b321e8ae9f7c7564bf5d5ba09216ee3415cf94a946b4861313580d51d2e6ff diff --git a/packages/gnuprumcu/0.6.0/version.desc b/packages/gnuprumcu/0.6.0/version.desc deleted file mode 100644 index fcfe38915a..0000000000 --- a/packages/gnuprumcu/0.6.0/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/gnuprumcu/0.9.7/chksum b/packages/gnuprumcu/0.9.7/chksum new file mode 100644 index 0000000000..93447ad955 --- /dev/null +++ b/packages/gnuprumcu/0.9.7/chksum @@ -0,0 +1,4 @@ +md5 gnuprumcu-0.9.7.tar.gz 1cce9bcf5d5b35081fa09e09eb213994 +sha1 gnuprumcu-0.9.7.tar.gz 1a8a01fde92f3ecf38fb5a94f87cac139f523577 +sha256 gnuprumcu-0.9.7.tar.gz 93cfb4027196f0b426ae138cf9949c6fab37263b69643f018a236ca49c0f2a23 +sha512 gnuprumcu-0.9.7.tar.gz ef2ed14045effbce3114b147c5a0f8f3bfdf22443ba3b76ec33eb16d597ad90f199db23f0b16fab9887692e1f407cc9392b61c6ce326394a54c99dd5b6a926dd diff --git a/packages/gnuprumcu/0.9.7/version.desc b/packages/gnuprumcu/0.9.7/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/isl/0.11.2/chksum b/packages/isl/0.11.2/chksum new file mode 100644 index 0000000000..f0607b022e --- /dev/null +++ b/packages/isl/0.11.2/chksum @@ -0,0 +1,12 @@ +md5 isl-0.11.2.tar.lzma e51b54b8f174b0590751929405115583 +sha1 isl-0.11.2.tar.lzma cd9b2b6d681f86ef966b8f6a566795c3e0503f34 +sha256 isl-0.11.2.tar.lzma 55b90ed18a7471542ed7ad1d4f593bd17cd4553514dfef15808a32229c20b558 +sha512 isl-0.11.2.tar.lzma 0882e617a97c8af0e721ba8bc4b77a660c3a4ae774ffe3acb928ebe3a400dd9968b2aa0425a5233dc4a93cebdae1c86d5039652976a1be60f152ca02b9083644 +md5 isl-0.11.2.tar.bz2 c40daa17d2995d1c98a0c1aca607541f +sha1 isl-0.11.2.tar.bz2 ca2c93a58e899379d39f2956b2299c62e3975018 +sha256 isl-0.11.2.tar.bz2 e6d83347d254449577299ec86ffefd79361dc51f6de7480723c9c43b075cdc23 +sha512 isl-0.11.2.tar.bz2 6c4e370b66ee1d3656f4e028e08d70c4e897f88de6bad048493a9385655939574a42e97b0aa2b09d88f82b2de1004340073c32a5456adefdfb649c25c2d562c0 +md5 isl-0.11.2.tar.gz c37600005ad5a3889db61a5675628a51 +sha1 isl-0.11.2.tar.gz 11a19d66fa5781188373964089e09012d603b6fc +sha256 isl-0.11.2.tar.gz e3976c7af97b916aa84a46a64db4fb1b74a0af94592347a53fc5a286dc4b58fe +sha512 isl-0.11.2.tar.gz 9c30ae502dbe9c3ed7e3e8338aa4c71d339998556032e139fa2cf1939d554c088a866bd047c01ff5f1c5ed3e95985484f7db1596e035b608009a6140cc66b8b2 diff --git a/packages/isl/0.11.2/version.desc b/packages/isl/0.11.2/version.desc new file mode 100644 index 0000000000..f96c492909 --- /dev/null +++ b/packages/isl/0.11.2/version.desc @@ -0,0 +1,2 @@ +obsolete='yes' +archive_formats='.tar.lzma .tar.bz2 .tar.gz' diff --git a/packages/isl/0.27/chksum b/packages/isl/0.27/chksum new file mode 100644 index 0000000000..ecbb93302a --- /dev/null +++ b/packages/isl/0.27/chksum @@ -0,0 +1,12 @@ +md5 isl-0.27.tar.xz 11ee9d335b227ea2e8579c4ba6e56138 +sha1 isl-0.27.tar.xz 8778bdabc1fbebe392564440c1ebbaaa45cdaf85 +sha256 isl-0.27.tar.xz 6d8babb59e7b672e8cb7870e874f3f7b813b6e00e6af3f8b04f7579965643d5c +sha512 isl-0.27.tar.xz 6d6f50c3f6f26e0d3f67586dee6427d87999c426c94069a6f3012ec3c9a41adeebd50f43b5d2705db6abc12e38eb01c19f55dba113c0799da5f667eef46b2be0 +md5 isl-0.27.tar.bz2 d9b7700a2f326e6c755cde8161055e59 +sha1 isl-0.27.tar.bz2 92703e84d607daae25044af104acc0118caef842 +sha256 isl-0.27.tar.bz2 626335529331f7c89fec493de929e2e92fb3d8cc860fc7af554e0518ee0029ee +sha512 isl-0.27.tar.bz2 e14ab1a622d3f6219b264b8e2512487aecd6725b7b88f40bc8f31651bfe7d89db4649aae12eaa0052dd904bac21607f63c83fbab73251767425d91989a969f7e +md5 isl-0.27.tar.gz daabe07703432804ccc37cce3b9eee47 +sha1 isl-0.27.tar.gz a307052a50643b859b7d90559ea746be972adea6 +sha256 isl-0.27.tar.gz 7a1a3f04d57c7c72fee5a6148cd3b02b05db6a6dd9a58def7bdc00972a6301c3 +sha512 isl-0.27.tar.gz eb7debab52f402b55e8d8544fcc7ca45bc3baaa57f69bcc17696e817d933ee41174e678893908e1423c5d4b5371301facb435d70b6d2103ee374f43908217368 diff --git a/packages/isl/0.27/version.desc b/packages/isl/0.27/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/libelf/0.8.13/0002-fix-configure-for-gcc14-part2.patch b/packages/libelf/0.8.13/0002-fix-configure-for-gcc14-part2.patch new file mode 100644 index 0000000000..19f1a450dd --- /dev/null +++ b/packages/libelf/0.8.13/0002-fix-configure-for-gcc14-part2.patch @@ -0,0 +1,51 @@ +diff -Naur libelf-0.8.13-orig/configure libelf-0.8.13/configure +--- libelf-0.8.13-orig/configure 2025-02-01 13:58:59.204951646 +1300 ++++ libelf-0.8.13/configure 2025-02-01 14:30:18.978354125 +1300 +@@ -1114,6 +1114,7 @@ + cat > conftest.$ac_ext < + #include + #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') + #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +@@ -1484,6 +1485,7 @@ + #line 1485 "configure" + #include "confdefs.h" + #include ++#include + int main() + { + FILE *f=fopen("conftestval", "w"); +@@ -1524,6 +1526,7 @@ + #line 1524 "configure" + #include "confdefs.h" + #include ++#include + int main() + { + FILE *f=fopen("conftestval", "w"); +@@ -1564,6 +1567,7 @@ + #line 1563 "configure" + #include "confdefs.h" + #include ++#include + int main() + { + FILE *f=fopen("conftestval", "w"); +@@ -1604,6 +1608,7 @@ + #line 1602 "configure" + #include "confdefs.h" + #include ++#include + int main() + { + FILE *f=fopen("conftestval", "w"); +@@ -1645,6 +1650,7 @@ + #line 1642 "configure" + #include "confdefs.h" + #include ++#include + int main() + { + FILE *f=fopen("conftestval", "w"); diff --git a/packages/libiconv/1.18/chksum b/packages/libiconv/1.18/chksum new file mode 100644 index 0000000000..02e1dfdfbd --- /dev/null +++ b/packages/libiconv/1.18/chksum @@ -0,0 +1,4 @@ +md5 libiconv-1.18.tar.gz 1af69958b42981d3c3029ffb4c7ebaed +sha1 libiconv-1.18.tar.gz 3402aae249ec56e04114767c8f6bdaafc87a048c +sha256 libiconv-1.18.tar.gz 3b08f5f4f9b4eb82f151a7040bfd6fe6c6fb922efe4b1659c66ea933276965e8 +sha512 libiconv-1.18.tar.gz a55eb3b7b785a78ab8918db8af541c9e11deb5ff4f89d54483287711ed797d87848ce0eafffa7ce26d9a7adb4b5a9891cb484f94bd4f51d3ce97a6a47b4c719a diff --git a/packages/libiconv/1.18/version.desc b/packages/libiconv/1.18/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/libtool/2.5.4/chksum b/packages/libtool/2.5.4/chksum new file mode 100644 index 0000000000..7f51a98c99 --- /dev/null +++ b/packages/libtool/2.5.4/chksum @@ -0,0 +1,8 @@ +md5 libtool-2.5.4.tar.xz 22e0a29df8af5fdde276ea3a7d351d30 +sha1 libtool-2.5.4.tar.xz 9781a113fe6af1b150571410b29d3eee2e792516 +sha256 libtool-2.5.4.tar.xz f81f5860666b0bc7d84baddefa60d1cb9fa6fceb2398cc3baca6afaa60266675 +sha512 libtool-2.5.4.tar.xz eed207094bcc444f4bfbb13710e395e062e3f1d312ca8b186ab0cbd22dc92ddef176a0b3ecd43e02676e37bd9e328791c59a38ef15846d4eae15da4f20315724 +md5 libtool-2.5.4.tar.gz 862d906983d9b423b072285d999d8672 +sha1 libtool-2.5.4.tar.gz 77227188ead223ed8ba447301eda3761cb68ef57 +sha256 libtool-2.5.4.tar.gz da8ebb2ce4dcf46b90098daf962cffa68f4b4f62ea60f798d0ef12929ede6adf +sha512 libtool-2.5.4.tar.gz 60599f5c3168a287fe3a35062fd2e32e0b73433fce820bfd18d28b0e3bd7a8fefde6d6f0505fbbc2d664119ab7c539269184993843289932c895847ea1ab9f04 diff --git a/packages/libtool/2.5.4/version.desc b/packages/libtool/2.5.4/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux/4.10.17/version.desc b/packages/linux/4.10.17/version.desc index e69de29bb2..fcfe38915a 100644 --- a/packages/linux/4.10.17/version.desc +++ b/packages/linux/4.10.17/version.desc @@ -0,0 +1 @@ +obsolete='yes' diff --git a/packages/linux/4.11.12/version.desc b/packages/linux/4.11.12/version.desc index e69de29bb2..fcfe38915a 100644 --- a/packages/linux/4.11.12/version.desc +++ b/packages/linux/4.11.12/version.desc @@ -0,0 +1 @@ +obsolete='yes' diff --git a/packages/linux/4.12.14/version.desc b/packages/linux/4.12.14/version.desc index e69de29bb2..fcfe38915a 100644 --- a/packages/linux/4.12.14/version.desc +++ b/packages/linux/4.12.14/version.desc @@ -0,0 +1 @@ +obsolete='yes' diff --git a/packages/linux/4.13.16/version.desc b/packages/linux/4.13.16/version.desc index e69de29bb2..fcfe38915a 100644 --- a/packages/linux/4.13.16/version.desc +++ b/packages/linux/4.13.16/version.desc @@ -0,0 +1 @@ +obsolete='yes' diff --git a/packages/linux/4.15.18/version.desc b/packages/linux/4.15.18/version.desc index e69de29bb2..dbd2de60d7 100644 --- a/packages/linux/4.15.18/version.desc +++ b/packages/linux/4.15.18/version.desc @@ -0,0 +1 @@ +# Not obsolete: used by Ubuntu 18.04, ELTS EOL 04/2028 diff --git a/packages/linux/4.16.18/version.desc b/packages/linux/4.16.18/version.desc index e69de29bb2..fcfe38915a 100644 --- a/packages/linux/4.16.18/version.desc +++ b/packages/linux/4.16.18/version.desc @@ -0,0 +1 @@ +obsolete='yes' diff --git a/packages/linux/4.17.19/version.desc b/packages/linux/4.17.19/version.desc index e69de29bb2..fcfe38915a 100644 --- a/packages/linux/4.17.19/version.desc +++ b/packages/linux/4.17.19/version.desc @@ -0,0 +1 @@ +obsolete='yes' diff --git a/packages/linux/4.18.20/version.desc b/packages/linux/4.18.20/version.desc index e69de29bb2..4b86eee0f7 100644 --- a/packages/linux/4.18.20/version.desc +++ b/packages/linux/4.18.20/version.desc @@ -0,0 +1 @@ +# Not obsolete: used by RHEL 8.x, EOL 05/2029 for maintenance, 05/2032 for ELTS diff --git a/packages/linux/4.19.318/chksum b/packages/linux/4.19.318/chksum deleted file mode 100644 index ab6733e988..0000000000 --- a/packages/linux/4.19.318/chksum +++ /dev/null @@ -1,8 +0,0 @@ -md5 linux-4.19.318.tar.xz b667a467c0fdaf4387547370687811b1 -sha1 linux-4.19.318.tar.xz 9b35d8951cfda18756bf0fd59cb9148834278c09 -sha256 linux-4.19.318.tar.xz 0d5fa562a3c53f524f02fc11abe502c01096df73dd27d57736875e8590007493 -sha512 linux-4.19.318.tar.xz d82e25ec93b196dba2e21b6b792bb7ac37860340f98de4953c41152b54e4d952f62e05b2afe80b3aaa668d5ef3e62d562fb6b7dd7754b1b0065b4d0a45117ed7 -md5 linux-4.19.318.tar.gz a742c33cb16507cd3dd45a145df89b8b -sha1 linux-4.19.318.tar.gz 4364e85a603de363be6c2af765e0ba10a6aeb5a2 -sha256 linux-4.19.318.tar.gz 671cd4565222414bc0b9232c9440191abf827c01c72af9a63a1d3b286ab5c061 -sha512 linux-4.19.318.tar.gz d5a50baac95086ea6a4ec26b9fd39b5f82ade2ce493c5204f99ad113730006b5d39d0637fadb2be6efafd63ad3d00401f9014f76e2bf84d57f2baf7ea0c6bb2e diff --git a/packages/linux/4.19.325/chksum b/packages/linux/4.19.325/chksum new file mode 100644 index 0000000000..9219f0962e --- /dev/null +++ b/packages/linux/4.19.325/chksum @@ -0,0 +1,8 @@ +md5 linux-4.19.325.tar.xz 131a73cceb435e39e6394ed3db9e416a +sha1 linux-4.19.325.tar.xz 1a9779150ea605fc3e0ded3f3666743f1268dec3 +sha256 linux-4.19.325.tar.xz 607bed7de5cda31a443df4c8a78dbe5e8a9ad31afde2a4d28fe99ab4730e8de1 +sha512 linux-4.19.325.tar.xz 4a2c5f358e9caf47061d707db67738e0d1b1f24aebeeaab81dc2701cc3793ab574a7e0a3a5df2f99d6ff1d777acdca1d885da87ee31098c5b901853d8b580310 +md5 linux-4.19.325.tar.gz d8201f438135d2dc50302de5e6b7febc +sha1 linux-4.19.325.tar.gz 1a882796a187bbb2145d0e091ed370eed3d7f31b +sha256 linux-4.19.325.tar.gz 8f360bb8ba9fb692507f27596422c7ceddec5f7fed4d8f3df2b7656b6042cfee +sha512 linux-4.19.325.tar.gz 4e8cbfed3211b1c53122905ce588c421aedb05138581cd64986ddcba89b10ffcea8a3b1c63ec273abc02eac7c31f0f901e17677f4c3ed749b26fc47b75bce5f1 diff --git a/packages/linux/4.19.325/version.desc b/packages/linux/4.19.325/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux/5.0.19/version.desc b/packages/linux/5.0.19/version.desc index e69de29bb2..fcfe38915a 100644 --- a/packages/linux/5.0.19/version.desc +++ b/packages/linux/5.0.19/version.desc @@ -0,0 +1 @@ +obsolete='yes' diff --git a/packages/linux/5.1.21/version.desc b/packages/linux/5.1.21/version.desc index e69de29bb2..fcfe38915a 100644 --- a/packages/linux/5.1.21/version.desc +++ b/packages/linux/5.1.21/version.desc @@ -0,0 +1 @@ +obsolete='yes' diff --git a/packages/linux/5.10.222/chksum b/packages/linux/5.10.222/chksum deleted file mode 100644 index c2082f9d4d..0000000000 --- a/packages/linux/5.10.222/chksum +++ /dev/null @@ -1,8 +0,0 @@ -md5 linux-5.10.222.tar.xz e5381e26d4dafff71c8dd519b3fa6f24 -sha1 linux-5.10.222.tar.xz 54cb199fb3cd66f04bba015c4b9813104917ab29 -sha256 linux-5.10.222.tar.xz 7b2d06803b5abb03c85f171100ca9d7acd6ba245036fe9a16eb998f088b150cb -sha512 linux-5.10.222.tar.xz 384b3b816daea1579116f86e0e0271101093ed82854a986351b1a5936f003ed1c469856c26410ab503480531acfe9ba1fbc39dffea03d32ee58849ad20af8877 -md5 linux-5.10.222.tar.gz 1e2bab72eb9edc39485a2724d629b4d7 -sha1 linux-5.10.222.tar.gz 169154b0f9e1784118a0083a47ce348e902c0690 -sha256 linux-5.10.222.tar.gz b3ee7d2d2d539a4874c4a14490cec566fca5ea2ec0535ac9924ed40fc76bed4d -sha512 linux-5.10.222.tar.gz 56c333620f5802d259189f1882028ed5252e500852f3180f7bfdd13b32524dd8ce875d62d1b28946a7e657430b7137f52043ec4d53b4fbe0820e81083bb467f1 diff --git a/packages/linux/5.10.247/chksum b/packages/linux/5.10.247/chksum new file mode 100644 index 0000000000..bed7b1ab41 --- /dev/null +++ b/packages/linux/5.10.247/chksum @@ -0,0 +1,8 @@ +md5 linux-5.10.247.tar.xz 17581ec89f0f55e78d1c662ceca39a83 +sha1 linux-5.10.247.tar.xz 5a5880705adedeee1cd53fc5539e09144495c57e +sha256 linux-5.10.247.tar.xz 70c8b87ba1fcd8bfa663661934dc9bda92d0b5f3c0fc3197bb56399f69d9fe0c +sha512 linux-5.10.247.tar.xz 1e5e564cc0b612b087b3e00fc62d0983d11db55063108163b7f5f9cd86eba832b387380c08ab1852413f157b96d3c13335e54e96ed49ac6b64fecfd9bb3852dc +md5 linux-5.10.247.tar.gz 41571017c155258127f03519c84b935e +sha1 linux-5.10.247.tar.gz 37d5699dcafa3ffaffcd859d0a876a96555d2e0d +sha256 linux-5.10.247.tar.gz d7065d11c348976dcd89884b73867562c5a527a18230be15bede96f657399375 +sha512 linux-5.10.247.tar.gz 164426769c5f6d4da0f26c800e1be0b492da8e31ddca01142faec32448d66a651197eadc1e8a1aa59685e5eeeeac3cc9999c1d0f184ad1c1e3bc8fb0fb9b7e7e diff --git a/packages/linux/5.10.247/version.desc b/packages/linux/5.10.247/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux/5.15.163/chksum b/packages/linux/5.15.163/chksum deleted file mode 100644 index 11d01a321f..0000000000 --- a/packages/linux/5.15.163/chksum +++ /dev/null @@ -1,8 +0,0 @@ -md5 linux-5.15.163.tar.xz f782dcb6329e0b65436d1bfe1d7b1bab -sha1 linux-5.15.163.tar.xz 5d3f20a1b2df876d907d8bc829516ac1282cbe80 -sha256 linux-5.15.163.tar.xz 025fc7d8b1560cf456ccae50591fe1ca21c990645df9791aed25820fe78db302 -sha512 linux-5.15.163.tar.xz 8145c55476e56355bc785fd999ae514ebfb6426d9d0d9ef937f7a8c55d6c2734e9b2221013b596cee5e01b69340533353f80d99b59a4fbbd297c37acd57be3b0 -md5 linux-5.15.163.tar.gz 94e5ccba95052ebb35e5a3ce1daa2ba5 -sha1 linux-5.15.163.tar.gz bd925fbc922e43a73fdcf279879cd6849193e209 -sha256 linux-5.15.163.tar.gz f9dffca68a88b3699af5d5e9b8f43ad943b87d3c22474340e7e85a41aeb0abe5 -sha512 linux-5.15.163.tar.gz d4d8dcc4287b3e5d43d413c219bf1ac441afd3641203d8a766d6f5b91ee716b4aa29c033d9e8245c4325bafc9a3bbc49a342f57e72b23a29165e76d0afe88c6e diff --git a/packages/linux/5.15.197/chksum b/packages/linux/5.15.197/chksum new file mode 100644 index 0000000000..574b6da816 --- /dev/null +++ b/packages/linux/5.15.197/chksum @@ -0,0 +1,8 @@ +md5 linux-5.15.197.tar.xz 8f71d75c16337e3351d2312a82deef4a +sha1 linux-5.15.197.tar.xz 5de80283c3b7650a89cbbb7dfe56833ec95e40e8 +sha256 linux-5.15.197.tar.xz fd218df8e2107a4443b6c29fef7f95aad167031e0fbdbc7a858ae8471360668a +sha512 linux-5.15.197.tar.xz 9d83666747f7a7484551e4278805ed4461ba3bb4d5b8ced2220de6703d1e66aa45a690774bc79ff8334b8010bfc958b25225e7224db07f5dfe04d47ad9eca94a +md5 linux-5.15.197.tar.gz d8df0ffa11d562d8739ff7b4cb622218 +sha1 linux-5.15.197.tar.gz ec1d98adfd63d929fa2579e9dd67022c59be4b64 +sha256 linux-5.15.197.tar.gz 1a2718e05bb1734c56c058a1301c2e0a6ab784034ab9afd2ef7be8883c56c435 +sha512 linux-5.15.197.tar.gz 0dd006009da603ae0198e3160816307f0e58a4dd9b9b592255e9ecc177a04422e2e8f1916bb8fe41df7d12a0a7cf47a8fb198bb808e56a6d9ba18f0e197ab1cf diff --git a/packages/linux/5.15.197/version.desc b/packages/linux/5.15.197/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux/5.2.17/version.desc b/packages/linux/5.2.17/version.desc index e69de29bb2..fcfe38915a 100644 --- a/packages/linux/5.2.17/version.desc +++ b/packages/linux/5.2.17/version.desc @@ -0,0 +1 @@ +obsolete='yes' diff --git a/packages/linux/5.3.18/version.desc b/packages/linux/5.3.18/version.desc index e69de29bb2..fcfe38915a 100644 --- a/packages/linux/5.3.18/version.desc +++ b/packages/linux/5.3.18/version.desc @@ -0,0 +1 @@ +obsolete='yes' diff --git a/packages/linux/5.4.280/chksum b/packages/linux/5.4.280/chksum deleted file mode 100644 index 0a54243aef..0000000000 --- a/packages/linux/5.4.280/chksum +++ /dev/null @@ -1,8 +0,0 @@ -md5 linux-5.4.280.tar.xz 66a0f04f43802b557b2216c415c8ef9d -sha1 linux-5.4.280.tar.xz bf883b341b0966fb8b8605f437746812b70e4a71 -sha256 linux-5.4.280.tar.xz a976c67eb8270cac310faf1acc61305d1f9967955aca38fbdfcb0bc77d033d42 -sha512 linux-5.4.280.tar.xz ee9c0689e6554f5fdc828730d38a4cb83be850108309fe7d8864b84a1040a50a79d89a1fe146a322e5e5fe2e756e85d2ebb8f0fcb9bc090918dbc18840d0e0cd -md5 linux-5.4.280.tar.gz b3451c7b0daa3db614648ffa6930995a -sha1 linux-5.4.280.tar.gz c5a7f148421dda0fc4b7029228f219662ddb19a1 -sha256 linux-5.4.280.tar.gz 3c3bfbb27ff756aa94c7d4ae66aca7f14cddcfd2e886de2443b26f2beb12a16d -sha512 linux-5.4.280.tar.gz 10770961bf3e5174711edc2a188182d5f559b10834b7112985c49c73f2f4d2050b82ba39f707e4222be559a2210ea15020a255d87c5efd57c8ac45c063ed444e diff --git a/packages/linux/5.4.302/chksum b/packages/linux/5.4.302/chksum new file mode 100644 index 0000000000..e602a77234 --- /dev/null +++ b/packages/linux/5.4.302/chksum @@ -0,0 +1,8 @@ +md5 linux-5.4.302.tar.xz f0ebaa98ada172815e972df854386a9e +sha1 linux-5.4.302.tar.xz 2c81367cf4d52b57c19ed3194042cbd8fb85bf7b +sha256 linux-5.4.302.tar.xz ae6a3207f12aa4d6cfb0fa793ec9da4a6fcdfdcb57d869d63d6b77e3a8c1423d +sha512 linux-5.4.302.tar.xz b4f67ba747a4813fe71d9bb41151b13273bbf2de370c9867a6deca11e05aa702351d33f746d8f7a8fe0a56f58dc89ea7555915e127d75ee151b231b5c49ef4c2 +md5 linux-5.4.302.tar.gz e177dc9f2e0ca359794cd6317b277e39 +sha1 linux-5.4.302.tar.gz 9508e9665df2c98d95bd5a10151fabbd83077bad +sha256 linux-5.4.302.tar.gz 573242a47528acc2e6122ed277a6f1fda2dcf9a58556a97243543d5f3122c9dc +sha512 linux-5.4.302.tar.gz 1d9f7af54c8f830f121a6ed34ffbe27d519fe9527c45fe96197fa5912afdc78b5e42ecd60c618a4d48b52cc5ccb81d6b638c055fc1a7d1845491d2699006efdf diff --git a/packages/linux/5.4.302/version.desc b/packages/linux/5.4.302/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux/6.1.100/chksum b/packages/linux/6.1.100/chksum deleted file mode 100644 index 09126b2e31..0000000000 --- a/packages/linux/6.1.100/chksum +++ /dev/null @@ -1,8 +0,0 @@ -md5 linux-6.1.100.tar.xz 4d5f24481210a8857ffd528703304e6d -sha1 linux-6.1.100.tar.xz 49d075022276c627bf9ef583d5415d46a9aec665 -sha256 linux-6.1.100.tar.xz b9aa6ec1a00f234d6c6f2d428fbb0a6bf459606c259263df978f86685b65a8b9 -sha512 linux-6.1.100.tar.xz 842c5ee1109f6414b0173b83abf9ae0655a8bf1bf36299d86d83db1dd2a70147f7f637afe202c3899984fe340ce4633e4e5d3cb9d7b0b89014226a413bc79d8d -md5 linux-6.1.100.tar.gz 5221ae3243e8d45e1a02e4735c36ec4d -sha1 linux-6.1.100.tar.gz d0ccf9f92cad4028bfcf4000783a9daf4ba8ee6f -sha256 linux-6.1.100.tar.gz 86820b8e5847030fddc12bfcc14963de6c9e99b1a30861cb27944f1eea1e846c -sha512 linux-6.1.100.tar.gz fb2f10b102367ccecc498cc3b4bc3a5a5fc9fecd3038ecc5c28c8a6b9a9d21420927677b2c2cfa09cc1f04d065de6a6baab4fdb04f430fd0f50a1e8db73ad11a diff --git a/packages/linux/6.1.159/chksum b/packages/linux/6.1.159/chksum new file mode 100644 index 0000000000..ac72485de6 --- /dev/null +++ b/packages/linux/6.1.159/chksum @@ -0,0 +1,8 @@ +md5 linux-6.1.159.tar.xz b5a7d737830841014596e2a9ec6308f4 +sha1 linux-6.1.159.tar.xz ef37713d9c65024acd8ba51606a656be42362f0a +sha256 linux-6.1.159.tar.xz 1f207ebe93980829ecc0a18b694816f22b715e9893767731651969a168342b9e +sha512 linux-6.1.159.tar.xz ee40a5d418600ba1b6f9c3456a3f00abdefa0df5c3af11b8982de71d6b233df40918885f02f17d6df46bb01aa76783e594881b89536e8113d95beaf0e2da5a68 +md5 linux-6.1.159.tar.gz 55f6da08d3295d56624feea1a6cf2bfa +sha1 linux-6.1.159.tar.gz 17dc847fb7e54ebfce262e0d6d3ba7f2209e5cb0 +sha256 linux-6.1.159.tar.gz 49bd83e59469b5d6097c6a8dd9a84e9a87214a9ed726e9d4bb80015f9b7ee43e +sha512 linux-6.1.159.tar.gz f0ea76fd8737f2836fa967a882797a84380060eaaf2b98dfbea6dfa205992d2dadc351bdfdbdcb66ac3ad9b1491f500822346ada8d9a6ca511265e8100cc4ca8 diff --git a/packages/linux/6.1.159/version.desc b/packages/linux/6.1.159/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux/6.10.14/chksum b/packages/linux/6.10.14/chksum new file mode 100644 index 0000000000..3bb4743c17 --- /dev/null +++ b/packages/linux/6.10.14/chksum @@ -0,0 +1,8 @@ +md5 linux-6.10.14.tar.xz 37212bd36eeacdae65a43fb677502f87 +sha1 linux-6.10.14.tar.xz 72b57fde9d3aa1f36bfdc4f57f0e1712b4156529 +sha256 linux-6.10.14.tar.xz 55e5bcbc68d66776fc46896291f0a24844beb57817345a854d65e3d055fa423e +sha512 linux-6.10.14.tar.xz 1dccdc084b47ccbb270ddc1f4d9b020c4314eec198141690f83fe3cf78959a7b15638b7d69bead235b18ddcf8e6c99c8e8a62bc1c17a983d911d647b07c3919d +md5 linux-6.10.14.tar.gz b815c9cec9f4b2b7c451c6667d5f2b62 +sha1 linux-6.10.14.tar.gz fefa6209a37e5768090b0fa39624051560b5820c +sha256 linux-6.10.14.tar.gz 228b37a5e9a7ff072cc65dde1f637a98b6b2baf55ee564cce4ccce39e606ddec +sha512 linux-6.10.14.tar.gz 1b6a7f6f33051d4ae393cbcaaed7a5f3b0f6b1147e53a2e2f852962633678e30a0eef5ccbdf3f757bc198561c980dc0a59862979f0e16ba0446db43b703bb4f3 diff --git a/packages/linux/6.10.14/version.desc b/packages/linux/6.10.14/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux/6.10/chksum b/packages/linux/6.10/chksum deleted file mode 100644 index f1bf7d9519..0000000000 --- a/packages/linux/6.10/chksum +++ /dev/null @@ -1,8 +0,0 @@ -md5 linux-6.10.tar.xz c0ce046a9a0d041e13cf222f81eae574 -sha1 linux-6.10.tar.xz 1e9cb1c45e24c18128f4529cc4b93cf3b36d06be -sha256 linux-6.10.tar.xz 774698422ee54c5f1e704456f37c65c06b51b4e9a8b0866f34580d86fef8e226 -sha512 linux-6.10.tar.xz baa2487954044f991d2ae254d77d14a1f0185dd62c9f0fcaff69f586c9f906823017b8db1c4588f27b076dfa3ebb606929fec859f60ea419e7974330b9289cc2 -md5 linux-6.10.tar.gz b75f5c9c879ffd035e3a6fd400c277ba -sha1 linux-6.10.tar.gz 6466209931241249d66d34e3b7b2fabc90ca0dc5 -sha256 linux-6.10.tar.gz 37041701dab67f8e1bd699d728fec07d6098abd147b366f0c7ad1a3fb1b58619 -sha512 linux-6.10.tar.gz 5e180a7ff5c2034f70ea954d2546c22bbb4d206b846f87d4c37fafe67f202917a20affdbade3b6fcb8b0e623f0331eec80172f0294647654f78ee6a7a995689f diff --git a/packages/linux/6.11.11/chksum b/packages/linux/6.11.11/chksum new file mode 100644 index 0000000000..65655eb0d8 --- /dev/null +++ b/packages/linux/6.11.11/chksum @@ -0,0 +1,8 @@ +md5 linux-6.11.11.tar.xz 68eaa260b20f8daf7cdd7f514fd59dd4 +sha1 linux-6.11.11.tar.xz 629b997b57608983211ec8776aa52669316b4df5 +sha256 linux-6.11.11.tar.xz 62148e7e17f54c4a5ab5e75ad4882682c54bee818948be61a5963234fc0849fc +sha512 linux-6.11.11.tar.xz 2eb783c5e7a06178971acd594d8aa5b9d50cf02b266a2afe4d2c664037c86a3df131ff9073be20b2354c6b50f14860febae401181f97ca4b2b308e23bea9003d +md5 linux-6.11.11.tar.gz e2e1c875a366fe39529b8cdbfed29719 +sha1 linux-6.11.11.tar.gz f7c0bc945004c932b7d99c75c767e5b3b7bfdbfb +sha256 linux-6.11.11.tar.gz 049abd343d7647cc14546a4d6bfbd5a3966bbd88c2e4c9c77c9f2e14d9171e5f +sha512 linux-6.11.11.tar.gz 92a98ad45406870f0e3cb7da1fedcea89a505cfc799b56f76a85984ba9ce457806d77cabc211d95bb77a0741133874456a4cad8385fd94532aad8221d26850c9 diff --git a/packages/linux/6.11.11/version.desc b/packages/linux/6.11.11/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux/6.12.63/chksum b/packages/linux/6.12.63/chksum new file mode 100644 index 0000000000..bde9743521 --- /dev/null +++ b/packages/linux/6.12.63/chksum @@ -0,0 +1,8 @@ +md5 linux-6.12.63.tar.xz 5302136bc890b24a14d54175edd32403 +sha1 linux-6.12.63.tar.xz 1c6700396125422fee073b0bd60961e5fc8d07e0 +sha256 linux-6.12.63.tar.xz 9502c5ffe4b894383c97abfccf74430a84732f04ee476b9c0d87635b29df7db3 +sha512 linux-6.12.63.tar.xz 89a4aaa7f924b2c579d0bf384742c3ec2fc9b11c272b9d68ad645a99127043a4f55f8a07067a99ff6220ba9c3efb29dbf27baa298d2b5980d811771873afac1d +md5 linux-6.12.63.tar.gz 42513dffe3871648f204f46dc37a138c +sha1 linux-6.12.63.tar.gz 3ac1ee449e85710d005770358e5e9dea3d6f4467 +sha256 linux-6.12.63.tar.gz 9557e9915b9b4325804968fe7cd8e762e4afdc97e6998f7ee1b6a6101d2ab7dc +sha512 linux-6.12.63.tar.gz 49c3b166391d139586bbee2071349a11892173ef91bab0fa3b376323f6cc5971c790292536ebd76c01d8b99339c7330885cce7a3d4e8fbdfb45ef9981fa8d896 diff --git a/packages/linux/6.12.63/version.desc b/packages/linux/6.12.63/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux/6.13.12/chksum b/packages/linux/6.13.12/chksum new file mode 100644 index 0000000000..1d8bd8a084 --- /dev/null +++ b/packages/linux/6.13.12/chksum @@ -0,0 +1,8 @@ +md5 linux-6.13.12.tar.xz d65975e151d5af33d911312c97d96466 +sha1 linux-6.13.12.tar.xz 21dc04c81611dc2e5320b3d1aaff0c0d19f970ba +sha256 linux-6.13.12.tar.xz 611fbb669cf5539da48137a9c052becd499f3f862afaf21ab84cea3966221242 +sha512 linux-6.13.12.tar.xz 9580b40d17281846f8795729297e45cb4ffcde16a3ff355ccafe61fd05fd6b24f109256ebf5c7294026fe94a01b5c699c968043427e5ad5b73330995662b8d0e +md5 linux-6.13.12.tar.gz e25a78dd579e5c5005c0d1e032dc26e7 +sha1 linux-6.13.12.tar.gz 0145d6704aa4917daaa2e04f855d168dce3adcff +sha256 linux-6.13.12.tar.gz eab0580a93d0bd3898da77dcbf558f74ca1d07a9884241b4c83181e5ebc8562d +sha512 linux-6.13.12.tar.gz 59a352633469d43cac8ef8eb32cb2db78cd1cc840c5ace09af826e668ca51fc8fc88b826b46f6b5305b6afa4e88d0676055e124e414a50f8f5b75ea5a6842072 diff --git a/packages/linux/6.13.12/version.desc b/packages/linux/6.13.12/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux/6.14.11/chksum b/packages/linux/6.14.11/chksum new file mode 100644 index 0000000000..377857d6b9 --- /dev/null +++ b/packages/linux/6.14.11/chksum @@ -0,0 +1,8 @@ +md5 linux-6.14.11.tar.xz a7231ee7a61b4b5d058cd92c424d5058 +sha1 linux-6.14.11.tar.xz b3906735338a98bd726c8bf7eb6d4399efa31626 +sha256 linux-6.14.11.tar.xz 3f1ccd0a6dc9c9777cb6fcef357c77e4a2386c84c52b6d5bbcda79c16af33b1b +sha512 linux-6.14.11.tar.xz d025b67b8b85edaeb94ca3d40ff4cb463542a3117e3dbe98345f58e477f3efe4660e2b936151fafca5fb8257c488beaf4276ccfaaf8af8a62977341e55d25767 +md5 linux-6.14.11.tar.gz 92f5ce379f53decd90868f1e8e4c5259 +sha1 linux-6.14.11.tar.gz 3f70c18ccfa34b7b3e735f8939a4f038092524ba +sha256 linux-6.14.11.tar.gz 5baf8ee036ca94a4a4dacb21218e43225baf270f0227271d0106160eda6e6f31 +sha512 linux-6.14.11.tar.gz 1bd624b535f9dcbb98882b3c29c81f485477a43c4aae7a6751ac069ce171181397b482231f2d4ae1382ffe96224104e6fce993c317705671dc092949cd46b8d1 diff --git a/packages/linux/6.14.11/version.desc b/packages/linux/6.14.11/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux/6.15.9/chksum b/packages/linux/6.15.9/chksum new file mode 100644 index 0000000000..0329461935 --- /dev/null +++ b/packages/linux/6.15.9/chksum @@ -0,0 +1,8 @@ +md5 linux-6.15.9.tar.xz 439fcb0223a3ba828ffd5107953697ee +sha1 linux-6.15.9.tar.xz 2fc55daffd1fb42c9fd9cedf50d6d053db348d43 +sha256 linux-6.15.9.tar.xz e94f3af85492302f7a819441458f80bca0ad9912e5a4c83c699ff3c63c52957d +sha512 linux-6.15.9.tar.xz 46eb38197d7105dd2ef2b9a5d8d17d40849f18ee0719437acafc9b031f5373060fc1f60527ff2c251f792cc7ab9b1d5e9f3260021825c937ffbb2331320827a4 +md5 linux-6.15.9.tar.gz c795a6a675cb3297546dc0810e80aaab +sha1 linux-6.15.9.tar.gz 773bbc94f53e6d90d1ce4aac5cf316d2dee2e2b6 +sha256 linux-6.15.9.tar.gz b4c33c370104e38a66cf0d85bed77942411ce841fef92b7df6dae2bb5c5f86a4 +sha512 linux-6.15.9.tar.gz 9bde556eb247784b80a7011c38f63160fa68da2bd710a4f8e7e56a576c1b34f6bd5c9e7dd191c11081db6f3f0c1743848f92a2212d60a604b343fe2578ee5e5e diff --git a/packages/linux/6.15.9/version.desc b/packages/linux/6.15.9/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux/6.16.9/chksum b/packages/linux/6.16.9/chksum new file mode 100644 index 0000000000..325115c085 --- /dev/null +++ b/packages/linux/6.16.9/chksum @@ -0,0 +1,8 @@ +md5 linux-6.16.9.tar.xz feb0a3d5ecf5a4628aed7d9f8f7ab3f6 +sha1 linux-6.16.9.tar.xz 32a49bad6972f7ea81e28bbc227b3fe80164a625 +sha256 linux-6.16.9.tar.xz 7ac8c8a3cf05476375deaaa85dfcee095a826ffe557b437f43774fc3b64ce58d +sha512 linux-6.16.9.tar.xz 4a3e704edb7a880422d6d19ec749e9a591520aca5c5614043e6e36887b5dd6a2a0c813ea761f405350c7c49433d37e9df5d9f85a54f290038b7a2af7cbef8a8b +md5 linux-6.16.9.tar.gz 8decc29ce59bb420d6468e121e07248a +sha1 linux-6.16.9.tar.gz 9628d3e5ff8848b83353d74828110ac7f71a70c4 +sha256 linux-6.16.9.tar.gz 9e24b71efcaf005ad68efbbad1e08b6bbbbf9c3477d58e9a17b70cc343a4bed9 +sha512 linux-6.16.9.tar.gz 08debd4e042b509a471b3911e568e4625f4ce3fb2faaffb6b1fdbdaaf50eb72df049c680e74bcf2290664adb31ac64454581b4f70587157a0b663d8edd1f116b diff --git a/packages/linux/6.16.9/version.desc b/packages/linux/6.16.9/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux/6.17.13/chksum b/packages/linux/6.17.13/chksum new file mode 100644 index 0000000000..2a189ebe0c --- /dev/null +++ b/packages/linux/6.17.13/chksum @@ -0,0 +1,8 @@ +md5 linux-6.17.13.tar.xz d437e374e45da47b252c80c6ad9e7f77 +sha1 linux-6.17.13.tar.xz 43a992cea60d6c4fe63c8cfbe2d681c710783384 +sha256 linux-6.17.13.tar.xz 116802dc3ad1646163cc6ffe9bddba24a8069b569135ec0523cd799064f2edb9 +sha512 linux-6.17.13.tar.xz 91450681e4d07ba20f8dfd5863748d5bb190615c17ab31f27b65e2b70f2785d70a1be4e565efc956f971bedc9806344f680c584560e2f132f3190c6c888ba981 +md5 linux-6.17.13.tar.gz 3a3be003e8d3e30652117b13244cbd08 +sha1 linux-6.17.13.tar.gz 36f98a312d3b5e2132a6a0fb353135c4d435905e +sha256 linux-6.17.13.tar.gz c888d83fd426c817a31e70d8460bc3e4c7f2e07567060171b1ffb0beadff6de8 +sha512 linux-6.17.13.tar.gz 330fc7a5bc448f20821f7d93d24881e60e6e3774fa9da15d9d3720a8a442c5ab90a9de8b5e11b2207cdb81cee99e1fc06d7c09478e584b993e77b872f96e8981 diff --git a/packages/linux/6.17.13/version.desc b/packages/linux/6.17.13/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux/6.18.3/chksum b/packages/linux/6.18.3/chksum new file mode 100644 index 0000000000..0cce56f334 --- /dev/null +++ b/packages/linux/6.18.3/chksum @@ -0,0 +1,8 @@ +md5 linux-6.18.3.tar.xz 57f0cb3f23afba114a78d656d04be91b +sha1 linux-6.18.3.tar.xz 110822728cd5ac3976b6a0345fb20fdc2a6d6e71 +sha256 linux-6.18.3.tar.xz 7a8879167b89c4bae077d6f39c4f2130769f05dbdad2aad914adab9afb7d7f9a +sha512 linux-6.18.3.tar.xz 09e46cd42dba82ba3ca5febd0ab9b9a6b5cac5e2c214a1374c79f82ecf826979d9bb52b543a187bc0c1257b7b45c7160bb28ff2d2a224a4d55a4560cdf2a5f95 +md5 linux-6.18.3.tar.gz 84573ed9d5d61eb57f12e595366f08b6 +sha1 linux-6.18.3.tar.gz 5ec324aa119a8f2a1e86039416e1b016e7d27ce0 +sha256 linux-6.18.3.tar.gz 894fc53491d527df3c092742a06c2b8c587d052b6be86eb336254adc459a05fc +sha512 linux-6.18.3.tar.gz 7282a0a2d93427eaa218d30913e7e4b6ca9118010e985231ed7a6d830f55483b9efc4b7fb1eea203599ab8c3992579f41f9cfdf28055b78f33ac4e82f6561528 diff --git a/packages/linux/6.18.3/version.desc b/packages/linux/6.18.3/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux/6.2.12/chksum b/packages/linux/6.2.12/chksum deleted file mode 100644 index 0b9d485fa7..0000000000 --- a/packages/linux/6.2.12/chksum +++ /dev/null @@ -1,8 +0,0 @@ -md5 linux-6.2.12.tar.xz 8ad2168e5aff669fffb6e6aa7006b5a8 -sha1 linux-6.2.12.tar.xz d19fbb521a3f8abfb828f474dc04eaf10dbea676 -sha256 linux-6.2.12.tar.xz c7e146b52737adfa4c724bfa41bf4721c5ee3cf220c074fbc60eb3ea62b0ccc8 -sha512 linux-6.2.12.tar.xz 9d6de9301c8277df63aa3e4b6790917908ac333d05b2ef436726653f68e7acdf9e5a1bd72226c85a251380156757da13abd4d0c4a28a9520a875c479ca8aaa32 -md5 linux-6.2.12.tar.gz b14ef0f9255e0fa9d806b2e972bce75d -sha1 linux-6.2.12.tar.gz 2e00c55781d27f8904da9933ae1e6a8a3c925ef9 -sha256 linux-6.2.12.tar.gz 9a3b0d30b85844c05bc7571f900a72f1146c67fffe33b275c25be6393b8b46ef -sha512 linux-6.2.12.tar.gz 30a0a8353d9573d34625b1465293a6c9ff3905484c43f63666e0ccf9d10fbde46649e2bb90f4420a2093f865c985d4e16ee64f64bab554ee8158254cc5eccaa8 diff --git a/packages/linux/6.2.16/chksum b/packages/linux/6.2.16/chksum new file mode 100644 index 0000000000..f25ecb2e14 --- /dev/null +++ b/packages/linux/6.2.16/chksum @@ -0,0 +1,8 @@ +md5 linux-6.2.16.tar.xz bef2a6e690b2bcbd693f15559d54930d +sha1 linux-6.2.16.tar.xz b601afb22ca614d68bc8deef579f5c67ea19e4e6 +sha256 linux-6.2.16.tar.xz 06ff0d780a6934b46140f6d8c1a15792c78aa337d8b2411bf90747371d358713 +sha512 linux-6.2.16.tar.xz 7f98d8ee2417272e2ab1517f6b7150f74033622e24a9426fc924c75aea46ab22b8ec8c73fc2523378fdb80f8899a3c6a55036a20dd30e438c1d6d39ea036f2c3 +md5 linux-6.2.16.tar.gz 028f02ffbd315c54e3b74b6eeecd3578 +sha1 linux-6.2.16.tar.gz 88dbca45901ccf96e622ad165c27628ac917cd4e +sha256 linux-6.2.16.tar.gz 727433b8468633de65bcc9a85be7b28a2db17f8cdfbedab1e73f4ab51a1b5f3b +sha512 linux-6.2.16.tar.gz 1d5c53249126639f5245c0b7528181368f4f4f05cb1d30ef157a5b77096223485bbf2452dd8035d073f2229982a2b7b4613b90dc93c6f24b31d500be434f0c1c diff --git a/packages/linux/6.2.16/version.desc b/packages/linux/6.2.16/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux/6.3.13/chksum b/packages/linux/6.3.13/chksum new file mode 100644 index 0000000000..301eaec997 --- /dev/null +++ b/packages/linux/6.3.13/chksum @@ -0,0 +1,8 @@ +md5 linux-6.3.13.tar.xz 8a994a9fc31e9e092885be8ffd7f2367 +sha1 linux-6.3.13.tar.xz 8b02f92e698b07ffed3899eaa08a52165624871d +sha256 linux-6.3.13.tar.xz ea460560e2898022c5f3c4649908694dcd75a094ffde726e8c6ca5e0a09491fb +sha512 linux-6.3.13.tar.xz 850f56587c49c7ad3e4873a4b9d8160b0b015ac00dbe272d3fd4b661d18a6e73d1d9dea69376fa002d47b195648c617ef0143a54cdf3bf7c361f0b90cc262e16 +md5 linux-6.3.13.tar.gz cc4e6b3870a3cd83720c4fd4b4b1593c +sha1 linux-6.3.13.tar.gz db3be966955298b9512b21b9f4d81f572e6f2db8 +sha256 linux-6.3.13.tar.gz 49cf51e0abe164bc5442ad989d4fadf0bb01adeb46f5148fe9f3648e97f366c3 +sha512 linux-6.3.13.tar.gz b5bf94f7c5b5324c87c09fdf918c3f86d2a0dce1ec06abba83ae0baff26b5fc26bceb8248cd100a512e4a6a39f59ab9b9ef5e5cd70a5de460aac47c45affe0ea diff --git a/packages/linux/6.3.13/version.desc b/packages/linux/6.3.13/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux/6.3.9/chksum b/packages/linux/6.3.9/chksum deleted file mode 100644 index e90bac09e0..0000000000 --- a/packages/linux/6.3.9/chksum +++ /dev/null @@ -1,8 +0,0 @@ -md5 linux-6.3.9.tar.xz d4e45bcf3f0df8077d37eaa76e7cf307 -sha1 linux-6.3.9.tar.xz cd2236895a59fa581a3dc92571c792f1be861f68 -sha256 linux-6.3.9.tar.xz 41ecf21399b17ab85163750ba22347d09b54fa099b80b63d0e2ef0066129b13e -sha512 linux-6.3.9.tar.xz e01ee91378b348bd1ce60a974b6b58ebb422b7b1964b145488fc2272a2b52f9bc2003501c216febcb6672213770de053720b6584d16690cbc00ca2ca633e18ac -md5 linux-6.3.9.tar.gz f69bcdcc2d9627c60c069a7d32fc15fa -sha1 linux-6.3.9.tar.gz 2c2dc0cf8b82bf5a263ddf5f3587b503696924f3 -sha256 linux-6.3.9.tar.gz 465376ada6ac429c2da41cd7e90343c13970b5a7e978c48748ff490fc98e39f9 -sha512 linux-6.3.9.tar.gz e5f98f9e60b3020f5177585e0c7812932afc06f788d572c122eb1cc3343f876a4cc8d99f06a7834aa8f8821b4340b9c475c15d07f5322e11d25622813306bf50 diff --git a/packages/linux/6.5.11/chksum b/packages/linux/6.5.11/chksum deleted file mode 100644 index fa6481213b..0000000000 --- a/packages/linux/6.5.11/chksum +++ /dev/null @@ -1,8 +0,0 @@ -md5 linux-6.5.11.tar.xz 6c765c929938c9890004196e0f01b91e -sha1 linux-6.5.11.tar.xz f3ef7f2c503bfd13f4b24408b6e2e6f695b22ec3 -sha256 linux-6.5.11.tar.xz 2ee24af9282b80923b2da56b70aad7df2e8ee4e3f076452e05ba66be2059b519 -sha512 linux-6.5.11.tar.xz bfb086ac52d9895695a5f1d7c35ee6ce560fd935ab99ede7bdc60142f714bf025dbae5e304e5e32acabdc900e940bfb0f7b02494f1fef04e9e8fc5afb9d3066a -md5 linux-6.5.11.tar.gz b944b23a420fd1ac2de2a0a40f9f398f -sha1 linux-6.5.11.tar.gz 142321ec84c2debfb4e7024b4cdd0fe228ea807f -sha256 linux-6.5.11.tar.gz 2fb291d181ac9d2eab318ed1dbc2429822eac63d09e593aff55cc0083e2862ef -sha512 linux-6.5.11.tar.gz 90b49bda24f03cfd279b6c6840db7fa88d430cbbe17a3696abf90a3fb03576920a77263fa0e58149add52075e3d3295abf9be9d66892950385255b1aa94fa546 diff --git a/packages/linux/6.5.13/chksum b/packages/linux/6.5.13/chksum new file mode 100644 index 0000000000..4387b02736 --- /dev/null +++ b/packages/linux/6.5.13/chksum @@ -0,0 +1,8 @@ +md5 linux-6.5.13.tar.xz 4de467d715e83e0f5fbec981208d467e +sha1 linux-6.5.13.tar.xz 458cbc8ff44bc4ea5c302e7ef595cb6d4b6db541 +sha256 linux-6.5.13.tar.xz 78fbd43822f4c56bc16e89e8874767f592532e1a0ffcd1af4dd279559b5fcbb5 +sha512 linux-6.5.13.tar.xz bf309b8f174de89169c6190fc21e1b41f094939d58b426ed7d5d44821122648f143f61b64778b2423fc4f4452fcef9628e4f8b16feb3f74053bfb69b231a40e6 +md5 linux-6.5.13.tar.gz 295bfed4c92d3392c60a06b20a9c8746 +sha1 linux-6.5.13.tar.gz 296c182751f30014fe8ba1927884138c372b6973 +sha256 linux-6.5.13.tar.gz 514875fd49f1d8de7079f0cac113eb2e4c896e624303795ee55341f3e7b82182 +sha512 linux-6.5.13.tar.gz d8d6cc8541f02d544eb6829af58e46309fcf3a1e0fd636bdc8bcf930745e3064279b9ded902febfb498cd04d2b39f3290cd6520adbdf99fe79184f56114e83fb diff --git a/packages/linux/6.5.13/version.desc b/packages/linux/6.5.13/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux/6.6.119/chksum b/packages/linux/6.6.119/chksum new file mode 100644 index 0000000000..d79d2656dc --- /dev/null +++ b/packages/linux/6.6.119/chksum @@ -0,0 +1,8 @@ +md5 linux-6.6.119.tar.xz 98fab2a81b48c92490692e3dd6f71995 +sha1 linux-6.6.119.tar.xz 1462329ebb007d25cd4d00ccdc44985d791df903 +sha256 linux-6.6.119.tar.xz 3da09b980bb404cc28793479bb2d6c636522679215ffa65a04c893575253e5e8 +sha512 linux-6.6.119.tar.xz 4a9c52bea73621f446155fcd801bc7b8e9f81d3008e220e9726517b39949d03abd317bb27cef854317b398153b1896dae2bc10c3207bf57acbea61e5c3fa4ac2 +md5 linux-6.6.119.tar.gz 4228337fcaef195bb34d409cb23e2d7f +sha1 linux-6.6.119.tar.gz 4bcb1aa32e846a584d4f9858e86903c75e9b1760 +sha256 linux-6.6.119.tar.gz 8746989ee49541eae752c219eb5260cf730bd1400052792ab74674a3b0827e0b +sha512 linux-6.6.119.tar.gz 1866100f4bc1ad7a9be5cb83fcd214ec2a97a286a14cdfd69f9f2f2630e19b2f16110e838d1ed7635a087b2323b4f52e7c9cb77a7306edd3b9417b9af84f4b32 diff --git a/packages/linux/6.6.119/version.desc b/packages/linux/6.6.119/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux/6.6.41/chksum b/packages/linux/6.6.41/chksum deleted file mode 100644 index 4aa8337a0a..0000000000 --- a/packages/linux/6.6.41/chksum +++ /dev/null @@ -1,8 +0,0 @@ -md5 linux-6.6.41.tar.xz 2201c0201a2a803da345a38dbdc38fcf -sha1 linux-6.6.41.tar.xz 3a161b770dcb6b4501b79a533722ee74d13a3af3 -sha256 linux-6.6.41.tar.xz 9ec99c578158ab85d99b37791a76643d2ea4c3f72ecbef7b5eb6d60f3de032ef -sha512 linux-6.6.41.tar.xz d623e13d482683c47b1e00e346658928597522b45fca94b6713e75dbd57deca92cf6b1189ddaadb7b37a04e509ff713eecc76f5a818f241e328635f77f09f504 -md5 linux-6.6.41.tar.gz 4e8785660b19af85fd72552f70a87a26 -sha1 linux-6.6.41.tar.gz de8765cb692418af27ee6ed0b3b06d4abf990d11 -sha256 linux-6.6.41.tar.gz fe72a3ef65aa422f78e7b782f33f9085d7da24555716ffacab1892cd26b14b57 -sha512 linux-6.6.41.tar.gz bc0adb67cd6af19568e030ad3cada2549544700c9ab3da804e057a55271fc9ecd4f2b12680aa84d276cc5dbc29243ad701a657e86061531921048b821781deb1 diff --git a/packages/linux/6.8.10/chksum b/packages/linux/6.8.10/chksum deleted file mode 100644 index 115c8b40bb..0000000000 --- a/packages/linux/6.8.10/chksum +++ /dev/null @@ -1,8 +0,0 @@ -md5 linux-6.8.10.tar.xz e6f7eebefb85cad7cb4609f1232ecceb -sha1 linux-6.8.10.tar.xz c68103f5dd100d92bde365c2ef9422fc82213394 -sha256 linux-6.8.10.tar.xz b0bb92d982f88380e5b2059349c3a862e0afa712e0646eb0e082b9c2c5cb5176 -sha512 linux-6.8.10.tar.xz 97869a0271ae7f36a16e0a73eba3962fef96129bc33fea98909020127336b2cac54184cac1fcafacae2e4fa1fa24fa27dd68a2d43e4c588636782fdaef6b9fff -md5 linux-6.8.10.tar.gz ea4956460c0def3cc4796c856824e7bb -sha1 linux-6.8.10.tar.gz 6e056905452481655cc23adb44d1cb88e840192a -sha256 linux-6.8.10.tar.gz 8d0873af7962fcaa31e7dd9a518d54665ef8307aca0e0ed26057617978cc3688 -sha512 linux-6.8.10.tar.gz 3970d26ca9f689bcd6bff986ebb8cfdcd88f7270ecf5a4d88228179a21fd95e4fae1693684ac8b7be83bbeeccb485b778aae32a4de5e8101b8522ced473c4644 diff --git a/packages/linux/6.8.12/chksum b/packages/linux/6.8.12/chksum new file mode 100644 index 0000000000..7071449073 --- /dev/null +++ b/packages/linux/6.8.12/chksum @@ -0,0 +1,8 @@ +md5 linux-6.8.12.tar.xz b70560dc3641087e198e04f4b99bd249 +sha1 linux-6.8.12.tar.xz e9e007154550e70ae94993a6e0066303b9c94cda +sha256 linux-6.8.12.tar.xz 19b31956d229b5b9ca5671fa1c74320179682a3d8d00fc86794114b21da86039 +sha512 linux-6.8.12.tar.xz 95c4c814a0257ae4678889249cb36867451e59e106d615cdcc1be929fbd6f44a925db98ee6bf1c01ae59f976a66e481231e6131348dd7da60dd08a7901dfeab9 +md5 linux-6.8.12.tar.gz 31c6dcf563b96c1708bb667350966486 +sha1 linux-6.8.12.tar.gz 03cb2f016ac912ad052353febfcfd157cd926e95 +sha256 linux-6.8.12.tar.gz 1f6134265066aa2bef94103c1e4485d6ed8c2e08ba2a24202ea0c757c6c2c0de +sha512 linux-6.8.12.tar.gz c0f27daa9fb6c7cde79deb6eec180439ed579be6cea76f43a7bd4c33a45c84fc48c441136e27309b8fe4ae16e44b43a35c68be90c50c31430a24a75365be3910 diff --git a/packages/linux/6.8.12/version.desc b/packages/linux/6.8.12/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux/6.9.10/chksum b/packages/linux/6.9.10/chksum deleted file mode 100644 index 72cc5e0acd..0000000000 --- a/packages/linux/6.9.10/chksum +++ /dev/null @@ -1,8 +0,0 @@ -md5 linux-6.9.10.tar.xz f51a016f44cdc61a4402b046656c33e0 -sha1 linux-6.9.10.tar.xz c44d83ae4d9d5d4c150fd845af3ef14633767c2e -sha256 linux-6.9.10.tar.xz efd12e335fa67d13a3eae30e4b7b7546e74b8ccc90682e4c3fffab0b22654da1 -sha512 linux-6.9.10.tar.xz 043885652363f935049744585d72fd7a1fac30baa6fc222f4ef8ca95b66d0ebf0c9492fdc9208009a849527076d1f6586ea557cde75aaa547e46e624ca759625 -md5 linux-6.9.10.tar.gz 8aada4175f1f5da00b9a10e495a21c7f -sha1 linux-6.9.10.tar.gz 5ff3c6ace284d23cd9362a51484fa5ed936fce2f -sha256 linux-6.9.10.tar.gz f025c39b604741d7c60fc42efe6f892084af1ff237d96f1b78f71e3247b77bb6 -sha512 linux-6.9.10.tar.gz 7bab09ee2a3f48fa2794dd5c8be8c7b99a13b22648c87c407f2c1f88e4f0047ee83f0d88e5765a8fa756bf4e4bd71581a22fc414d4ab643f91a36ece1c09f477 diff --git a/packages/linux/6.9.12/chksum b/packages/linux/6.9.12/chksum new file mode 100644 index 0000000000..26614d1be2 --- /dev/null +++ b/packages/linux/6.9.12/chksum @@ -0,0 +1,8 @@ +md5 linux-6.9.12.tar.xz 04094266fbf9379cb97b6701bb95c2cf +sha1 linux-6.9.12.tar.xz a77c1853e0e3b8e7927e97c2aba65088bdd69190 +sha256 linux-6.9.12.tar.xz 5ae7cc4e0e2f6b9ba630f643985ba0522c7d5e5b9571ba478a3cb513edd4cf22 +sha512 linux-6.9.12.tar.xz 6b6c157625c4880a1c381d74fad636d4b57ef78068bc8e19387ab7dc97095b82cbd88287205472adeccaf322703a1aa30a1a45d6e82e9e70af969b8de433873f +md5 linux-6.9.12.tar.gz 5d93d11089f747db2e14e800089d6e17 +sha1 linux-6.9.12.tar.gz 590786b195c1d0f008d9f4007d0f5a48509919a9 +sha256 linux-6.9.12.tar.gz 0fc253179fb6b738ecaca2d016103f02e73a21ffe4ebee147bc6edf403c17738 +sha512 linux-6.9.12.tar.gz 6932bd9ce925e7965b6172aadc99b40e4c11993e99c8c362c0a1344caf1f4dd5ca1ab848c6fbf71fc35130c02c77240340236bee4929ec9d39ed29942743c733 diff --git a/packages/linux/6.9.12/version.desc b/packages/linux/6.9.12/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/ltrace/package.desc b/packages/ltrace/package.desc index 10797fb188..bdc762c61b 100644 --- a/packages/ltrace/package.desc +++ b/packages/ltrace/package.desc @@ -1,4 +1,4 @@ -repository='git git://git.debian.org/git/collab-maint/ltrace.git' +repository='git https://gitlab.com/cespedes/ltrace.git' bootstrap='./autogen.sh' mirrors='http://ftp.debian.org/debian/pool/main/l/ltrace ftp://ftp.debian.org/debian/pool/main/l/ltrace' archive_filename='@{pkg_name}_@{version}.orig' diff --git a/packages/m4/1.4.19/chksum b/packages/m4/1.4.19/chksum deleted file mode 100644 index 093966e7b6..0000000000 --- a/packages/m4/1.4.19/chksum +++ /dev/null @@ -1,12 +0,0 @@ -md5 m4-1.4.19.tar.xz 0d90823e1426f1da2fd872df0311298d -sha1 m4-1.4.19.tar.xz b44b5c9746b69ee19204b7cb76d3a7b3eac69259 -sha256 m4-1.4.19.tar.xz 63aede5c6d33b6d9b13511cd0be2cac046f2e70fd0a07aa9573a04a82783af96 -sha512 m4-1.4.19.tar.xz 47f595845c89709727bda0b3fc78e3188ef78ec818965b395532e7041cabe9e49677ee4aca3d042930095a7f8df81de3da1026b23b6897be471f6cf13ddd512b -md5 m4-1.4.19.tar.bz2 a8ff6fc3235eab3a4adb53611fdddacd -sha1 m4-1.4.19.tar.bz2 7dd5aab713b50108bfbce47aea4968d630bf9511 -sha256 m4-1.4.19.tar.bz2 b306a91c0fd93bc4280cfc2e98cb7ab3981ff75a187bea3293811f452c89a8c8 -sha512 m4-1.4.19.tar.bz2 91c85925b83dd735dad34860756ab636f88e276d39827e81ec13f33b0b36cd42c9729c53faf4e1db101e32eecebec933799fc64cb16d138e68dbba7710d4bd19 -md5 m4-1.4.19.tar.gz f4a2b0284d80353b995f8ef2385ed73c -sha1 m4-1.4.19.tar.gz 1b9141800f481353b8bcfafe8ec03d3d95f03f64 -sha256 m4-1.4.19.tar.gz 3be4a26d825ffdfda52a56fc43246456989a3630093cced3fbddf4771ee58a70 -sha512 m4-1.4.19.tar.gz f5dd0f02fcae65a176a16af9a8e1747c26e9440c6c224003ba458d3298b777a75ffb189aee9051fb0c4840b2a48278be4a51d959381af0b1d627570f478c58f2 diff --git a/packages/m4/1.4.20/chksum b/packages/m4/1.4.20/chksum new file mode 100644 index 0000000000..83e42a5434 --- /dev/null +++ b/packages/m4/1.4.20/chksum @@ -0,0 +1,12 @@ +md5 m4-1.4.20.tar.xz 6eb2ebed5b24e74b6e890919331d2132 +sha1 m4-1.4.20.tar.xz 025df51430845178f926b20a078f994eefaa50fd +sha256 m4-1.4.20.tar.xz e236ea3a1ccf5f6c270b1c4bb60726f371fa49459a8eaaebc90b216b328daf2b +sha512 m4-1.4.20.tar.xz dc7b4f61452e564b095010029bf6ce4246e5a03959989cd76b09eb8012db7424c52819143020fab21a3471ff57ab026d3eccbd00dd3969819208980565a9fec0 +md5 m4-1.4.20.tar.bz2 92d1e42cb75f49381915275cb8e23c03 +sha1 m4-1.4.20.tar.bz2 17b6f32ed5c30b066aafdc61bc2cd577407233aa +sha256 m4-1.4.20.tar.bz2 ac6989ee5d2aed81739780630cc2ce097e2a6546feb96a4a54db37d46a1452e4 +sha512 m4-1.4.20.tar.bz2 9393bcc3ed8361b4d1824a463f0680d02e00a78702ba8dba3c696b59b8a365b5e9e73ac5ab45963af451a4185db8f5c37364e63cc9637fdf2036cfbffdaa9852 +md5 m4-1.4.20.tar.gz bbf90a6f5c1663d423c60217b31f3a0d +sha1 m4-1.4.20.tar.gz 4234ef3811c45d917b12bfb0694c793d548a27d2 +sha256 m4-1.4.20.tar.gz 6ac4fc31ce440debe63987c2ebbf9d7b6634e67a7c3279257dc7361de8bdb3ef +sha512 m4-1.4.20.tar.gz 0db92e37b984bcac0e640bccb9d3463757793b1fef665601f6d8052906d1ed26078af37c751e3e0cd9ee8d9ff165e51cfe9560422a5b3559f4b58de446b7429c diff --git a/packages/m4/1.4.20/version.desc b/packages/m4/1.4.20/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/make/4.2.1/0000-glob-v2.patch b/packages/make/4.2.1/0000-glob-v2.patch deleted file mode 100644 index ad8ddd877b..0000000000 --- a/packages/make/4.2.1/0000-glob-v2.patch +++ /dev/null @@ -1,39 +0,0 @@ -commit 48c8a116a914a325a0497721f5d8b58d5bba34d4 -Author: Paul Smith -Date: Sun Nov 19 15:09:16 2017 -0500 - - * configure.ac: Support GLIBC glob interface version 2 - ---- - configure | 3 +-- - configure.ac | 3 +-- - 2 files changed, 2 insertions(+), 4 deletions(-) - ---- a/configure.ac -+++ b/configure.ac -@@ -399,10 +399,9 @@ - #include - #include - --#define GLOB_INTERFACE_VERSION 1 - #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1 - # include --# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION -+# if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 - gnu glob - # endif - #endif], ---- a/configure -+++ b/configure -@@ -11481,10 +11481,9 @@ - #include - #include - --#define GLOB_INTERFACE_VERSION 1 - #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1 - # include --# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION -+# if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 - gnu glob - # endif - #endif diff --git a/packages/make/4.2.1/0001-glob-v2-gl_lstat.patch b/packages/make/4.2.1/0001-glob-v2-gl_lstat.patch deleted file mode 100644 index ae755e3e11..0000000000 --- a/packages/make/4.2.1/0001-glob-v2-gl_lstat.patch +++ /dev/null @@ -1,64 +0,0 @@ -commit 193f1e81edd6b1b56b0eb0ff8aa4b41c7b4257b4 -Author: Paul Eggert -Date: Sun Sep 24 09:12:58 2017 -0400 - - glob: Do not assume glibc glob internals. - - It has been proposed that glibc glob start using gl_lstat, - which the API allows it to do. GNU 'make' should not get in - the way of this. See: - https://sourceware.org/ml/libc-alpha/2017-09/msg00409.html - - * dir.c (local_lstat): New function, like local_stat. - (dir_setup_glob): Use it to initialize gl_lstat too, as the API - requires. - ---- - dir.c | 29 +++++++++++++++++++++++++++-- - 1 file changed, 27 insertions(+), 2 deletions(-) - ---- a/dir.c -+++ b/dir.c -@@ -1299,15 +1299,40 @@ - } - #endif - -+/* Similarly for lstat. */ -+#if !defined(lstat) && !defined(WINDOWS32) || defined(VMS) -+# ifndef VMS -+# ifndef HAVE_SYS_STAT_H -+int lstat (const char *path, struct stat *sbuf); -+# endif -+# else -+ /* We are done with the fake lstat. Go back to the real lstat */ -+# ifdef lstat -+# undef lstat -+# endif -+# endif -+# define local_lstat lstat -+#elif defined(WINDOWS32) -+/* Windows doesn't support lstat(). */ -+# define local_lstat local_stat -+#else -+static int -+local_lstat (const char *path, struct stat *buf) -+{ -+ int e; -+ EINTRLOOP (e, lstat (path, buf)); -+ return e; -+} -+#endif -+ - void - dir_setup_glob (glob_t *gl) - { - gl->gl_opendir = open_dirstream; - gl->gl_readdir = read_dirstream; - gl->gl_closedir = free; -+ gl->gl_lstat = local_lstat; - gl->gl_stat = local_stat; -- /* We don't bother setting gl_lstat, since glob never calls it. -- The slot is only there for compatibility with 4.4 BSD. */ - } - - void diff --git a/packages/make/4.2.1/chksum b/packages/make/4.2.1/chksum deleted file mode 100644 index b76fffdaad..0000000000 --- a/packages/make/4.2.1/chksum +++ /dev/null @@ -1,8 +0,0 @@ -md5 make-4.2.1.tar.bz2 15b012617e7c44c0ed482721629577ac -sha1 make-4.2.1.tar.bz2 7d9d11eb36cfb752da1fb11bb3e521d2a3cc8830 -sha256 make-4.2.1.tar.bz2 d6e262bf3601b42d2b1e4ef8310029e1dcf20083c5446b4b7aa67081fdffc589 -sha512 make-4.2.1.tar.bz2 9cf00869a2f938492554f71d8cb288b5b009b3bd0489ef164f2c8f6532fc37db5c7e20af1dea288536e7c9710ee0bc6e1ddcdfc4928a8540e6e43661741825b8 -md5 make-4.2.1.tar.gz 7d0dcb6c474b258aab4d54098f2cf5a7 -sha1 make-4.2.1.tar.gz 9cb7f45f6e32c977164ba790e626c359d3a24fee -sha256 make-4.2.1.tar.gz e40b8f018c1da64edd1cc9a6fce5fa63b2e707e404e20cad91fbae337c98a5b7 -sha512 make-4.2.1.tar.gz d5f6ce3ac7c9a55cf8c1c04afa7d967dd311c9bb3167275ebb2649cf144f3740cf08450dc010a6acdea1fd529fd528a50b3c3381f4c9a7e83ec59b761817a038 diff --git a/packages/make/4.2.1/version.desc b/packages/make/4.2.1/version.desc deleted file mode 100644 index f26b5a26a7..0000000000 --- a/packages/make/4.2.1/version.desc +++ /dev/null @@ -1,2 +0,0 @@ -obsolete='yes' -archive_formats='.tar.bz2 .tar.gz' diff --git a/packages/make/4.4.1/chksum b/packages/make/4.4.1/chksum new file mode 100644 index 0000000000..a05fb42d26 --- /dev/null +++ b/packages/make/4.4.1/chksum @@ -0,0 +1,8 @@ +md5 make-4.4.1.tar.lz c8b13b7477e812d4213a9b88ff0ff1d6 +sha1 make-4.4.1.tar.lz 5ca1a6115781798aa0a7a9efa5c8321b04bf4738 +sha256 make-4.4.1.tar.lz 8814ba072182b605d156d7589c19a43b89fc58ea479b9355146160946f8cf6e9 +sha512 make-4.4.1.tar.lz 591e9fab2f807bfda908f3376fdbf304c3377a6b15d13f3029456722972e361d205b692855de8ddbce64ff3f404873cbfb65f4097ca4a3b81029dc83bafcc67c +md5 make-4.4.1.tar.gz c8469a3713cbbe04d955d4ae4be23eeb +sha1 make-4.4.1.tar.gz 5ca41d365c35a4ded07d616190baf38814c25f2a +sha256 make-4.4.1.tar.gz dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3 +sha512 make-4.4.1.tar.gz 145260cbd6a8226cef3dfef0c8baba31847beaebc7e6b65d39d02715fd4f4cab9b139b6c3772e550088d4f9ae80c6d3ed20b9a7664c693644dfb96b4cb60e67c diff --git a/packages/make/4.4.1/version.desc b/packages/make/4.4.1/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/make/4.4/chksum b/packages/make/4.4/chksum deleted file mode 100644 index 7254bea030..0000000000 --- a/packages/make/4.4/chksum +++ /dev/null @@ -1,8 +0,0 @@ -md5 make-4.4.tar.lz 5da8b0fcc500de9c254ca59e58558b27 -sha1 make-4.4.tar.lz bd8e12c82af57e4db7c35b43e09f802f3922696d -sha256 make-4.4.tar.lz 48d0fc0b2a04bb50f2911c16da65723285f7f4804c74fc5a2124a3df6c5f78c4 -sha512 make-4.4.tar.lz 937945e1de5e370e79f379c867ca37bf7b3559a8b002a9e67c4973071e706f7afc5e419ac5d3348e7a677d5673cdcaa2476120297ec3e5f1c8f28f282cff2579 -md5 make-4.4.tar.gz d7575a26a94ee8427130e9db23cdaa78 -sha1 make-4.4.tar.gz 02910501c2065479c6c7a4855b6ecdf3ac4464d8 -sha256 make-4.4.tar.gz 581f4d4e872da74b3941c874215898a7d35802f03732bdccee1d4a7979105d18 -sha512 make-4.4.tar.gz 4be73f494295dcfa10034531b0d920cfdb5438bc20625f863f5c878549c140e1e67195162580c53060c3c11c67a2c739c09051f02cdd283e5aa9ebcd68975a1f diff --git a/packages/mingw-w64/v11.0.1/0001-crt-ssp-fix-stack-smashing-protection-bootstrapping.patch b/packages/mingw-w64/v11.0.1/0001-crt-ssp-fix-stack-smashing-protection-bootstrapping.patch new file mode 100644 index 0000000000..df20b2ddbd --- /dev/null +++ b/packages/mingw-w64/v11.0.1/0001-crt-ssp-fix-stack-smashing-protection-bootstrapping.patch @@ -0,0 +1,47 @@ +From 872a73abe6ccb45c617b30f30ded8d6c7ca5b21e Mon Sep 17 00:00:00 2001 +From: Igor Kostenko +Date: Thu, 3 Jul 2025 19:02:20 +0200 +Subject: [PATCH] crt/ssp: fix stack smashing protection bootstrapping + +Fix stack protection bootstrapping issue where the guard initialization +function itself triggers false positive stack overflow detection. + +This issue occurs when the mingw-w64 CRT library is built with GCC's +-fstack-protector-strong flag, which effectively renders any resulting +binary (whether statically or dynamically linked) corrupted. The final +binary crashes during startup, before it even reaches the main function. + +The problem is that the init() function starts with __stack_chk_guard = 0 +but initializes it to a random value, causing the stack protection check +to always fail (0 != random) at function exit. + +By introducing attribute __no_stack_protector__ we prevent early testing +of the uninitialized guard value. + +Signed-off-by: Igor Kostenko +(cherry picked from commit a0e69f7bc83a29b40e68355aac3e0c39b113b20f) +Signed-off-by: LIU Hao +--- + mingw-w64-crt/ssp/stack_chk_guard.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/mingw-w64-crt/ssp/stack_chk_guard.c b/mingw-w64-crt/ssp/stack_chk_guard.c +index 3ff22e020..be43d8c7e 100644 +--- a/mingw-w64-crt/ssp/stack_chk_guard.c ++++ b/mingw-w64-crt/ssp/stack_chk_guard.c +@@ -10,7 +10,11 @@ + + void *__stack_chk_guard; + +-static void __cdecl __attribute__((__constructor__)) init(void) ++// This function requires `no_stack_protector` because it changes the ++// value of `__stack_chk_guard`, causing stack checks to fail before ++// returning from this function. ++__attribute__((__constructor__, __no_stack_protector__)) ++static void __cdecl init(void) + { + unsigned int ui; + if (__stack_chk_guard != 0) +-- +2.24.0.windows.2 + diff --git a/packages/mingw-w64/v12.0.0/0001-crt-ssp-fix-stack-smashing-protection-bootstrapping.patch b/packages/mingw-w64/v12.0.0/0001-crt-ssp-fix-stack-smashing-protection-bootstrapping.patch new file mode 100644 index 0000000000..54691db280 --- /dev/null +++ b/packages/mingw-w64/v12.0.0/0001-crt-ssp-fix-stack-smashing-protection-bootstrapping.patch @@ -0,0 +1,47 @@ +From 9c6efb3c9969a7b24d31624ce00d3cfc17e6f7d3 Mon Sep 17 00:00:00 2001 +From: Igor Kostenko +Date: Thu, 3 Jul 2025 19:02:20 +0200 +Subject: [PATCH] crt/ssp: fix stack smashing protection bootstrapping + +Fix stack protection bootstrapping issue where the guard initialization +function itself triggers false positive stack overflow detection. + +This issue occurs when the mingw-w64 CRT library is built with GCC's +-fstack-protector-strong flag, which effectively renders any resulting +binary (whether statically or dynamically linked) corrupted. The final +binary crashes during startup, before it even reaches the main function. + +The problem is that the init() function starts with __stack_chk_guard = 0 +but initializes it to a random value, causing the stack protection check +to always fail (0 != random) at function exit. + +By introducing attribute __no_stack_protector__ we prevent early testing +of the uninitialized guard value. + +Signed-off-by: Igor Kostenko +(cherry picked from commit a0e69f7bc83a29b40e68355aac3e0c39b113b20f) +Signed-off-by: LIU Hao +--- + mingw-w64-crt/ssp/stack_chk_guard.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/mingw-w64-crt/ssp/stack_chk_guard.c b/mingw-w64-crt/ssp/stack_chk_guard.c +index 3ff22e020..be43d8c7e 100644 +--- a/mingw-w64-crt/ssp/stack_chk_guard.c ++++ b/mingw-w64-crt/ssp/stack_chk_guard.c +@@ -10,7 +10,11 @@ + + void *__stack_chk_guard; + +-static void __cdecl __attribute__((__constructor__)) init(void) ++// This function requires `no_stack_protector` because it changes the ++// value of `__stack_chk_guard`, causing stack checks to fail before ++// returning from this function. ++__attribute__((__constructor__, __no_stack_protector__)) ++static void __cdecl init(void) + { + unsigned int ui; + if (__stack_chk_guard != 0) +-- +2.24.0.windows.2 + diff --git a/packages/mingw-w64/v13.0.0/0000-mingw64-malloc.patch b/packages/mingw-w64/v13.0.0/0000-mingw64-malloc.patch new file mode 100644 index 0000000000..8e0add1f06 --- /dev/null +++ b/packages/mingw-w64/v13.0.0/0000-mingw64-malloc.patch @@ -0,0 +1,30 @@ +--- + mingw-w64-tools/genidl/src/genidl_cfg.h | 2 ++ + mingw-w64-tools/genidl/src/genidl_typinfo.c | 3 +++ + 2 files changed, 5 insertions(+) + +--- a/mingw-w64-tools/genidl/src/genidl_cfg.h ++++ b/mingw-w64-tools/genidl/src/genidl_cfg.h +@@ -26,7 +26,9 @@ + #include + #include + #include ++#if defined(HAVE_MALLOC_H) + #include ++#endif + #include + #include + #include +--- a/mingw-w64-tools/genidl/src/genidl_typinfo.c ++++ b/mingw-w64-tools/genidl/src/genidl_typinfo.c +@@ -21,7 +21,10 @@ + #include "genidl_cfg.h" + #include "genidl_typeinfo.h" + #include "genidl_typinfo.h" ++#if defined(HAVE_MALLOC_H) + #include ++#endif ++#include + #include + #include + diff --git a/packages/mingw-w64/v13.0.0/0001-fix-arm64-fabsl-asm-constraint.patch b/packages/mingw-w64/v13.0.0/0001-fix-arm64-fabsl-asm-constraint.patch new file mode 100644 index 0000000000..038f3d16b6 --- /dev/null +++ b/packages/mingw-w64/v13.0.0/0001-fix-arm64-fabsl-asm-constraint.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ahmed ARIF +Date: Mon, 12 Jan 2026 00:00:00 +0000 +Subject: [PATCH] mingw-w64: fix arm64 fabsl asm constraint + +Use __builtin_fabsl on ARM64 and other architectures where long double +equals double, avoiding architecture-specific inline assembly. + +--- a/mingw-w64-headers/crt/math.h ++++ b/mingw-w64-headers/crt/math.h +@@ -206,7 +206,7 @@ + + __CRT_INLINE long double __cdecl fabsl (long double x) + { +-#if __SIZEOF_LONG_DOUBLE__ == __SIZEOF_DOUBLE__ ++#if __SIZEOF_LONG_DOUBLE__ == __SIZEOF_DOUBLE__ || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || defined(_ARM64_) + return __builtin_fabsl (x); + #else + long double res = 0.0l; diff --git a/packages/mingw-w64/v13.0.0/0002-winpthreads-fix-aarch64-support.patch b/packages/mingw-w64/v13.0.0/0002-winpthreads-fix-aarch64-support.patch new file mode 100644 index 0000000000..98003f16d6 --- /dev/null +++ b/packages/mingw-w64/v13.0.0/0002-winpthreads-fix-aarch64-support.patch @@ -0,0 +1,31 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ahmed ARIF +Date: Mon, 12 Jan 2026 00:00:00 +0000 +Subject: [PATCH] winpthreads: fix aarch64 support + +Fix constructor priority and linker directives for ARM64 support +in winpthreads. + +--- a/mingw-w64-libraries/winpthreads/src/misc.c 2025-06-04 07:00:28.000000000 +0200 ++++ b/mingw-w64-libraries/winpthreads/src/misc.c 2025-09-16 17:11:44.273898239 +0200 +@@ -39,7 +39,7 @@ + #if defined(__GNUC__) || defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wprio-ctor-dtor" +-__attribute__((constructor(0))) ++__attribute__((constructor)) + #endif + static void winpthreads_init(void) + { +@@ -74,8 +74,10 @@ + * from discarding the variable. */ + + /* On x86, symbols are prefixed with an underscore. */ +-# if defined(_M_IX86) ++# if defined(_M_IX86) || defined(_M_ARM) + # pragma comment(linker, "/include:___xc_t") ++# elif defined(_M_X64) || defined(_M_AMD64) || defined(_M_ARM64) || defined(_M_ARM64EC) ++# pragma comment(linker, "/include:__xc_t") + # else + # pragma comment(linker, "/include:__xc_t") + # endif diff --git a/packages/mingw-w64/v13.0.0/0003-frexpl-aarch64-support.patch b/packages/mingw-w64/v13.0.0/0003-frexpl-aarch64-support.patch new file mode 100644 index 0000000000..36b2d1f1e2 --- /dev/null +++ b/packages/mingw-w64/v13.0.0/0003-frexpl-aarch64-support.patch @@ -0,0 +1,100 @@ +From 69d1f430f0000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ahmed ARIF +Date: Thu, 20 Feb 2025 00:00:00 +0000 +Subject: [PATCH] mingw-w64: add frexpl support for AArch64 long double + +Provide an implementation of `frexpl` for Windows on Arm64 where `long + double` follows the IEEE-754 binary128 format. This mirrors the + existing x87 version by normalising the mantissa into the [0.5, 1) + interval while returning the adjusted exponent. + +--- + mingw-w64-crt/math/frexpl.c | 75 +++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 75 insertions(+) + +diff --git a/mingw-w64-crt/math/frexpl.c b/mingw-w64-crt/math/frexpl.c +index 8c96d6ce0..659d8b6c8 100644 +--- a/mingw-w64-crt/math/frexpl.c ++++ b/mingw-w64-crt/math/frexpl.c +@@ -15,6 +15,81 @@ long double frexpl(long double value, int* exp) + return frexp(value, exp); + } + ++#elif defined(__aarch64__) ++ ++#include ++ ++typedef union ieee_quad_ ++{ ++ struct ++ { ++ uint64_t lo; ++ uint64_t hi; ++ } u; ++ long double f; ++} ieee_quad; ++ ++long double frexpl (long double value, int *exp) ++{ ++ ieee_quad reg; ++ uint64_t hi, lo; ++ uint64_t sign; ++ uint16_t exponent; ++ ++ reg.f = value; ++ hi = reg.u.hi; ++ lo = reg.u.lo; ++ ++ sign = hi & 0x8000000000000000ULL; ++ exponent = (uint16_t) ((hi >> 48) & 0x7FFF); ++ ++ if (exponent == 0x7FFF) ++ { ++ *exp = 0; ++ return reg.f; ++ } ++ ++ if (exponent != 0) ++ { ++ *exp = (int) exponent - 0x3FFE; ++ hi = sign | ((uint64_t) 0x3FFE << 48) | (hi & 0x0000FFFFFFFFFFFFULL); ++ reg.u.hi = hi; ++ return reg.f; ++ } ++ ++ if ((hi & 0x0000FFFFFFFFFFFFULL) == 0 && lo == 0) ++ { ++ *exp = 0; ++ return reg.f; ++ } ++ ++ { ++ unsigned __int128 mant; ++ int leading; ++ int shift; ++ ++ mant = ((unsigned __int128) (hi & 0x0000FFFFFFFFFFFFULL) << 64) | lo; ++ ++ if ((uint64_t) (mant >> 64) != 0) ++ leading = __builtin_clzll ((uint64_t) (mant >> 64)); ++ else ++ leading = 64 + __builtin_clzll ((uint64_t) mant); ++ ++ shift = leading - 16; ++ mant <<= shift; ++ ++ hi = (uint64_t) (mant >> 64); ++ lo = (uint64_t) mant; ++ ++ *exp = 1 - 0x3FFE - shift; ++ ++ reg.u.hi = sign | ((uint64_t) 0x3FFE << 48) ++ | (hi & 0x0000FFFFFFFFFFFFULL); ++ reg.u.lo = lo; ++ return reg.f; ++ } ++} ++ + #elif defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__) + + #include diff --git a/packages/mingw-w64/v13.0.0/0004-fmal-aarch64-support.patch b/packages/mingw-w64/v13.0.0/0004-fmal-aarch64-support.patch new file mode 100644 index 0000000000..7e6ead95b8 --- /dev/null +++ b/packages/mingw-w64/v13.0.0/0004-fmal-aarch64-support.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ahmed ARIF +Date: Mon, 12 Jan 2026 00:00:00 +0000 +Subject: [PATCH] mingw-w64: add fmal support for AArch64 + +Provide a basic implementation of fmal for AArch64 Windows. + +--- a/mingw-w64-crt/math/fmal.c ++++ b/mingw-w64-crt/math/fmal.c +@@ -12,6 +12,13 @@ + /* On ARM `long double` is 64 bits. And ARM has hardware FMA. */ + long double fmal(long double x, long double y, long double z){ + return fma(x, y, z); ++} ++ ++#elif defined(__aarch64__) ++ ++long double fmal(long double x, long double y, long double z) ++{ ++ return x * y + z; + } + + #elif defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__) diff --git a/packages/mingw-w64/v13.0.0/0005-truncl-aarch64-support.patch b/packages/mingw-w64/v13.0.0/0005-truncl-aarch64-support.patch new file mode 100644 index 0000000000..fd32436f42 --- /dev/null +++ b/packages/mingw-w64/v13.0.0/0005-truncl-aarch64-support.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ahmed ARIF +Date: Mon, 12 Jan 2026 00:00:00 +0000 +Subject: [PATCH] mingw-w64: add truncl support for AArch64 + +Use trunc() for truncl on AArch64 where long double may have different +representation. + +--- a/mingw-w64-crt/math/truncl.c ++++ b/mingw-w64-crt/math/truncl.c +@@ -11,6 +11,8 @@ + { + #if __SIZEOF_LONG_DOUBLE__ == __SIZEOF_DOUBLE__ + return trunc(_x); ++#elif defined(__aarch64__) ++ return trunc(_x); + #else + long double retval = 0.0L; + unsigned short saved_cw; diff --git a/packages/mingw-w64/v13.0.0/0006-export-missing-__mingw_strtold.patch b/packages/mingw-w64/v13.0.0/0006-export-missing-__mingw_strtold.patch new file mode 100644 index 0000000000..b55ca519c3 --- /dev/null +++ b/packages/mingw-w64/v13.0.0/0006-export-missing-__mingw_strtold.patch @@ -0,0 +1,51 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ahmed ARIF +Date: Mon, 12 Jan 2026 00:00:00 +0000 +Subject: [PATCH] mingw-w64: export missing __mingw_strtold + +Rename internal strtold to __mingw_strtold and provide aliases +to fix linker issues on non-x86 architectures. + +--- a/mingw-w64-crt/gdtoa/strtopx.c ++++ b/mingw-w64-crt/gdtoa/strtopx.c +@@ -59,11 +59,19 @@ + * functions, to avoid linker conflicts if object files import both 'strtold' + * from libucrt*.a and the object file providing '__strtod'. */ + long double __cdecl +-strtold (const char * __restrict__ src, char ** __restrict__ endptr) ++__mingw_strtold (const char * __restrict__ src, char ** __restrict__ endptr) + { + return __mingw_strtod(src, endptr); + } + ++long double __cdecl ++__strtold (const char * __restrict__ src, char ** __restrict__ endptr) ++ __attribute__((alias("__mingw_strtold"))); ++ ++long double __cdecl ++strtold (const char * __restrict__ src, char ** __restrict__ endptr) ++ __attribute__((alias("__mingw_strtold"))); ++ + /* This is specific to the x86 80 bit long doubles. */ + #elif defined(_AMD64_) || defined(__x86_64__) || \ + defined(_X86_) || defined(__i386__) +@@ -144,4 +148,19 @@ + strtold (const char * __restrict__ src, char ** __restrict__ endptr) + __attribute__((alias("__strtold"))); + ++#else ++long double __cdecl ++__mingw_strtold (const char * __restrict__ src, char ** __restrict__ endptr) ++{ ++ return (long double)__mingw_strtod(src, endptr); ++} ++ ++long double __cdecl ++__strtold (const char * __restrict__ src, char ** __restrict__ endptr) ++ __attribute__((alias("__mingw_strtold"))); ++ ++long double __cdecl ++strtold (const char * __restrict__ src, char ** __restrict__ endptr) ++ __attribute__((alias("__mingw_strtold"))); ++ + #endif diff --git a/packages/mingw-w64/v13.0.0/chksum b/packages/mingw-w64/v13.0.0/chksum new file mode 100644 index 0000000000..975b782989 --- /dev/null +++ b/packages/mingw-w64/v13.0.0/chksum @@ -0,0 +1,8 @@ +md5 mingw-w64-v13.0.0.tar.bz2 b8c58e04a9cb8f2f9474e043ecad2f27 +sha1 mingw-w64-v13.0.0.tar.bz2 c2a7ca700fdcccbd0dd1818e2978fbc9963f71d2 +sha256 mingw-w64-v13.0.0.tar.bz2 5afe822af5c4edbf67daaf45eec61d538f49eef6b19524de64897c6b95828caf +sha512 mingw-w64-v13.0.0.tar.bz2 39a22bd92465f571df1d90ac80b88dc6846998f71e4b7db79d1c9aa6e04cb3e41b632990a7238fc2c384ea67e4a77d103230db2c0d741869340d24ea79b6dda8 +md5 mingw-w64-v13.0.0.zip ba0243df470b9e735fa993eb8b5af9af +sha1 mingw-w64-v13.0.0.zip b8732d0f8437e9c07fe292f6d6887d3a1264a1a0 +sha256 mingw-w64-v13.0.0.zip ba8876404cbf250d4b40c80b4be335b1fbf92e69a161ce4af8a5c628903d31cc +sha512 mingw-w64-v13.0.0.zip 3e015f1596b61ae4276943ae191dcdd574579ba205e9143b54975a4221cf5c7417deef5898adc51c9d88f819080745f43e999d4f637fd79e03515127ac9d7880 diff --git a/packages/mingw-w64/v13.0.0/version.desc b/packages/mingw-w64/v13.0.0/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/mold/2.31.0/chksum b/packages/mold/2.31.0/chksum index b9aafe4e51..3056696a2e 100644 --- a/packages/mold/2.31.0/chksum +++ b/packages/mold/2.31.0/chksum @@ -1,4 +1,4 @@ -md5sum v2.31.0.tar.gz fdfcddefc039071f5a7611c051a8f5ea -sha1sum v2.31.0.tar.gz 0168ecab12d87a6197cfec4824a3e82115c6a2bd -sha256sum v2.31.0.tar.gz 3dc3af83a5d22a4b29971bfad17261851d426961c665480e2ca294e5c74aa1e5 -sha512sum v2.31.0.tar.gz 343c62d8c67b74988f762c46999d2d866b2e9a0c69d2b910b12384ea5abc620b30468cd1b1bacfe41474d1c97c8ce2e49d55ca70479691238fb73d83d9adc683 +md5 v2.31.0.tar.gz fdfcddefc039071f5a7611c051a8f5ea +sha1 v2.31.0.tar.gz 0168ecab12d87a6197cfec4824a3e82115c6a2bd +sha256 v2.31.0.tar.gz 3dc3af83a5d22a4b29971bfad17261851d426961c665480e2ca294e5c74aa1e5 +sha512 v2.31.0.tar.gz 343c62d8c67b74988f762c46999d2d866b2e9a0c69d2b910b12384ea5abc620b30468cd1b1bacfe41474d1c97c8ce2e49d55ca70479691238fb73d83d9adc683 diff --git a/packages/mold/2.31.0/version.desc b/packages/mold/2.31.0/version.desc index e69de29bb2..fcfe38915a 100644 --- a/packages/mold/2.31.0/version.desc +++ b/packages/mold/2.31.0/version.desc @@ -0,0 +1 @@ +obsolete='yes' diff --git a/packages/mold/2.32.0/version.desc b/packages/mold/2.32.0/version.desc index e69de29bb2..fcfe38915a 100644 --- a/packages/mold/2.32.0/version.desc +++ b/packages/mold/2.32.0/version.desc @@ -0,0 +1 @@ +obsolete='yes' diff --git a/packages/mold/2.33.0/version.desc b/packages/mold/2.33.0/version.desc index e69de29bb2..fcfe38915a 100644 --- a/packages/mold/2.33.0/version.desc +++ b/packages/mold/2.33.0/version.desc @@ -0,0 +1 @@ +obsolete='yes' diff --git a/packages/mold/2.36.0/chksum b/packages/mold/2.36.0/chksum new file mode 100644 index 0000000000..b25ee487da --- /dev/null +++ b/packages/mold/2.36.0/chksum @@ -0,0 +1,4 @@ +md5 v2.36.0.tar.gz 6607c30d681342d5edf8deebdd888ae3 +sha1 v2.36.0.tar.gz 2ce2e8e8d1f1e2c1afd8e363f0b350858338c5d2 +sha256 v2.36.0.tar.gz 3f57fe75535500ecce7a80fa1ba33675830b7d7deb1e5ee9a737e2bc43cdb1c7 +sha512 v2.36.0.tar.gz 985ca22400b2d957b4ea8d35d6716cc6f13d1abe9c9e1eed461efda6f2612a5fbfa707aff879c616c756111fea751a335ad3a3fc224c7573855e7b2795596164 diff --git a/packages/mold/2.36.0/version.desc b/packages/mold/2.36.0/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/mold/2.37.1/chksum b/packages/mold/2.37.1/chksum new file mode 100644 index 0000000000..8897a8d20e --- /dev/null +++ b/packages/mold/2.37.1/chksum @@ -0,0 +1,4 @@ +md5 v2.37.1.tar.gz 008ce940e0c512db09a0b1719d6bc270 +sha1 v2.37.1.tar.gz 0f5191c09a1758b9c51b7d45207e04c0c6812b93 +sha256 v2.37.1.tar.gz b8e36086c95bd51e9829c9755c138f5c4daccdd63b6c35212b84229419f3ccbe +sha512 v2.37.1.tar.gz 641c6668ee31368409d80ea01c0d84a58eac827eedc110495ca075bfce22081c906308d027e4723750995fc0d8b6bba8be3c3472c20f765ef45d14e1c4e36cd4 diff --git a/packages/mold/2.37.1/version.desc b/packages/mold/2.37.1/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/mold/2.38.1/chksum b/packages/mold/2.38.1/chksum new file mode 100644 index 0000000000..09067e028d --- /dev/null +++ b/packages/mold/2.38.1/chksum @@ -0,0 +1,4 @@ +md5 v2.38.1.tar.gz 28d611644ecfdb7a1e1c443ed76fa4e8 +sha1 v2.38.1.tar.gz 22400cb2a794814bd66d43d1a76421127bc5952e +sha256 v2.38.1.tar.gz 14bfb259fd7d0a1fdce9b66f8ed2dd0b134d15019cb359699646afeee1f18118 +sha512 v2.38.1.tar.gz 608c2cdb20ae671f540caeda2d0406154b03b0c352cb4cf98ea65c888691a1ac96b0a0ac26fc947fd1a3df2ed2809096e8ca0649deeac7b811bf2902a49cf66e diff --git a/packages/mold/2.38.1/version.desc b/packages/mold/2.38.1/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/mold/2.39.1/chksum b/packages/mold/2.39.1/chksum new file mode 100644 index 0000000000..1cfb5adbb2 --- /dev/null +++ b/packages/mold/2.39.1/chksum @@ -0,0 +1,4 @@ +md5 v2.39.1.tar.gz f77ab354c41189e3c447733f7dc10757 +sha1 v2.39.1.tar.gz 86a9d852c11d921f5fc9c92e4cbd071a989c1f5b +sha256 v2.39.1.tar.gz 231ea3643a14fe5b88478c97b68b31f7c975b57b247a81356ffd889d015b5cc1 +sha512 v2.39.1.tar.gz 2d6d3d892d0dc6b256fbb2a1bbe7519948c2cd683549d23727da9cbccf1dad80a3af2826bf96b9d02ed56a765fa46ffc8fcd23168bb5624a1fa4b9dd21606005 diff --git a/packages/mold/2.39.1/version.desc b/packages/mold/2.39.1/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/mold/2.40.4/chksum b/packages/mold/2.40.4/chksum new file mode 100644 index 0000000000..699bfef314 --- /dev/null +++ b/packages/mold/2.40.4/chksum @@ -0,0 +1,4 @@ +md5 v2.40.4.tar.gz a7e9856dd8fab0d48617dfff06a8cddd +sha1 v2.40.4.tar.gz b690bc45d43dbdfb50c6834d04749243c962f759 +sha256 v2.40.4.tar.gz 69414c702ec1084e1fa8ca16da24f167f549e5e11e9ecd5d70a8dcda6f08c249 +sha512 v2.40.4.tar.gz d28501d827eca861179218566521c14b0f76cecc501145b34b3fbf7739b125e4ccd411358c8871e788ddbd8b4c7229cb8839018dc671db76db1aaa8defae0abe diff --git a/packages/mold/2.40.4/version.desc b/packages/mold/2.40.4/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/mpc/1.2.1/chksum b/packages/mpc/1.2.1/chksum deleted file mode 100644 index 3f124c6771..0000000000 --- a/packages/mpc/1.2.1/chksum +++ /dev/null @@ -1,4 +0,0 @@ -md5 mpc-1.2.1.tar.gz 9f16c976c25bb0f76b50be749cd7a3a8 -sha1 mpc-1.2.1.tar.gz 2a4919abf445c6eda4e120cd669b8733ce337227 -sha256 mpc-1.2.1.tar.gz 17503d2c395dfcf106b622dc142683c1199431d095367c6aacba6eec30340459 -sha512 mpc-1.2.1.tar.gz 3279f813ab37f47fdcc800e4ac5f306417d07f539593ca715876e43e04896e1d5bceccfb288ef2908a3f24b760747d0dbd0392a24b9b341bc3e12082e5c836ee diff --git a/packages/mpc/1.2.1/version.desc b/packages/mpc/1.2.1/version.desc deleted file mode 100644 index fcfe38915a..0000000000 --- a/packages/mpc/1.2.1/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/mpc/package.desc b/packages/mpc/package.desc index c97dd956a7..3700e5d4e7 100644 --- a/packages/mpc/package.desc +++ b/packages/mpc/package.desc @@ -4,4 +4,3 @@ mirrors='https://www.multiprecision.org/downloads $(CT_Mirrors GNU mpc)' relevantpattern='*.*|.' archive_formats='.tar.gz' signature_format='packed/.sig' -milestones='1.1.0' diff --git a/packages/mpfr/4.2.1/chksum b/packages/mpfr/4.2.1/chksum deleted file mode 100644 index d3b5183af6..0000000000 --- a/packages/mpfr/4.2.1/chksum +++ /dev/null @@ -1,16 +0,0 @@ -md5 mpfr-4.2.1.tar.xz 523c50c6318dde6f9dc523bc0244690a -sha1 mpfr-4.2.1.tar.xz 31ffb4244cb469e2b4937cce1f50150300971dfb -sha256 mpfr-4.2.1.tar.xz 277807353a6726978996945af13e52829e3abd7a9a5b7fb2793894e18f1fcbb2 -sha512 mpfr-4.2.1.tar.xz bc68c0d755d5446403644833ecbb07e37360beca45f474297b5d5c40926df1efc3e2067eecffdf253f946288bcca39ca89b0613f545d46a9e767d1d4cf358475 -md5 mpfr-4.2.1.tar.bz2 7765afa036e4ce7fb0e02bce0fef894b -sha1 mpfr-4.2.1.tar.bz2 f9dbe49b092e4c8e0a039e6d46c059696cc2f51c -sha256 mpfr-4.2.1.tar.bz2 b9df93635b20e4089c29623b19420c4ac848a1b29df1cfd59f26cab0d2666aa0 -sha512 mpfr-4.2.1.tar.bz2 c81842532ecc663348deb7400d911ad71933d3b525a2f9e5adcd04265c9c0fdd1f22eca229f482703ac7f222ef209fc9e339dd1fa47d72ae57f7f70b2336a76f -md5 mpfr-4.2.1.tar.gz e1932041a649253affa1999eb06780be -sha1 mpfr-4.2.1.tar.gz ca7a96560f09b548855f7f97b20cba8106f2f203 -sha256 mpfr-4.2.1.tar.gz 116715552bd966c85b417c424db1bbdf639f53836eb361549d1f8d6ded5cb4c6 -sha512 mpfr-4.2.1.tar.gz 858b7c2c3018e4099a7cd6d9d38eca7c46af90fa2c307d9417518027f07b6c43c51152c60b56359a53e7101a5d0629753f3eb5c54e17574742c374830832fcfe -md5 mpfr-4.2.1.zip 247871848808e2e10a419df6db550b1c -sha1 mpfr-4.2.1.zip 8e1d9b1c4260dfb172b294997c1b133df2cff188 -sha256 mpfr-4.2.1.zip 0c2e85bef65070897bd4fd9647e4dcfc850619b6bacefe769ce5592f21f42f0b -sha512 mpfr-4.2.1.zip 3de08deefdf7a660a4830885446f3615f8b459a8f7521e30c486708cb1f7516b5ff4c7dbfa4d3683cd85c7446d6d9505c8dcf795fb1d8983b4bdd888cbdf33b6 diff --git a/packages/mpfr/4.2.2/chksum b/packages/mpfr/4.2.2/chksum new file mode 100644 index 0000000000..528153ea6b --- /dev/null +++ b/packages/mpfr/4.2.2/chksum @@ -0,0 +1,16 @@ +md5 mpfr-4.2.2.tar.xz 7c32c39b8b6e3ae85f25156228156061 +sha1 mpfr-4.2.2.tar.xz a63a264b273a652e27518443640e69567da498ce +sha256 mpfr-4.2.2.tar.xz b67ba0383ef7e8a8563734e2e889ef5ec3c3b898a01d00fa0a6869ad81c6ce01 +sha512 mpfr-4.2.2.tar.xz eb9e7f51b5385fb349cc4fba3a45ffdf0dd53be6dfc74932dc01258158a10514667960c530c47dd9dfc5aa18be2bd94859d80499844c5713710581e6ac6259a9 +md5 mpfr-4.2.2.tar.bz2 afe8268360bc8702fbc8297d351c8b5e +sha1 mpfr-4.2.2.tar.bz2 7e21e5bcfa67db572e5f2f38029fc731a19aecce +sha256 mpfr-4.2.2.tar.bz2 9ad62c7dc910303cd384ff8f1f4767a655124980bb6d8650fe62c815a231bb7b +sha512 mpfr-4.2.2.tar.bz2 0176e50808dcc07afbf5bc3e38bf9b7b21918e5f194aa0bfd860d99b00c470630aef149776c4be814a61c44269c3a5b9a4b0b1c0fcd4c9feb1459d8466452da8 +md5 mpfr-4.2.2.tar.gz 7cab7ebfcf087b5c710ab362e2fe2026 +sha1 mpfr-4.2.2.tar.gz 03aa176cf35d1477e2b6725cde74a728b4ef1a9a +sha256 mpfr-4.2.2.tar.gz 826cbb24610bd193f36fde172233fb8c009f3f5c2ad99f644d0dea2e16a20e42 +sha512 mpfr-4.2.2.tar.gz 373c5ce2c9636e45685dfa94f45bc4f8f6c2c0512d634b9e065ec33cb29da727b3ea13cf23aff307c1da765a40064f0fd4a347a3849ebd97252984fc85a0a400 +md5 mpfr-4.2.2.zip e177854976035717ff7426d8bb074607 +sha1 mpfr-4.2.2.zip 2291ef02a41a8cbf27382a77a4ac7ec672f72d57 +sha256 mpfr-4.2.2.zip 8c47f73c17df30bfc975079ebe4ea3cbb11e0a70d70b48768eec41e760f508af +sha512 mpfr-4.2.2.zip 1e8767df1ecb90d02135476d02928b3c9c3a33bf0e38d5418af55e056d7464561ce97c31a1ca2db5575a439486ed1cb2c7e46f4b0314ffdfcf5efd4bedb0ef1c diff --git a/packages/mpfr/4.2.2/version.desc b/packages/mpfr/4.2.2/version.desc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/mpfr/package.desc b/packages/mpfr/package.desc index cbd629fead..c39fa637bf 100644 --- a/packages/mpfr/package.desc +++ b/packages/mpfr/package.desc @@ -5,4 +5,3 @@ mirrors='https://www.mpfr.org/mpfr-${CT_MPFR_VERSION} $(CT_Mirrors GNU mpfr)' relevantpattern='*.*|.' archive_formats='.tar.xz .tar.bz2 .tar.gz .zip' signature_format='packed/.asc' -milestones='4.0.0' diff --git a/packages/musl/1.2.5/0001-loongarch64-add-hwcap-header.patch b/packages/musl/1.2.5/0001-loongarch64-add-hwcap-header.patch new file mode 100644 index 0000000000..08b47ba004 --- /dev/null +++ b/packages/musl/1.2.5/0001-loongarch64-add-hwcap-header.patch @@ -0,0 +1,39 @@ +Message-Id: <20241115072642.858623-1-lixing@loongson.cn> +Date: Fri, 15 Nov 2024 15:26:42 +0800 +From: Xing Li +To: musl@...ts.openwall.com +Cc: wanghongliang@...ngson.cn +Subject: [PATCH] loongarch64: add bits/hwcap.h + + loongarch64 have cpu feature bits defined in linux + for AT_HWCAP auxv entry. +--- + arch/loongarch64/bits/hwcap.h | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + create mode 100644 arch/loongarch64/bits/hwcap.h + +diff --git a/arch/loongarch64/bits/hwcap.h b/arch/loongarch64/bits/hwcap.h +new file mode 100644 +index 00000000..355beda7 +--- /dev/null ++++ b/arch/loongarch64/bits/hwcap.h +@@ -0,0 +1,16 @@ ++/* The following must match the kernel's . */ ++/* HWCAP flags */ ++#define HWCAP_LOONGARCH_CPUCFG (1 << 0) ++#define HWCAP_LOONGARCH_LAM (1 << 1) ++#define HWCAP_LOONGARCH_UAL (1 << 2) ++#define HWCAP_LOONGARCH_FPU (1 << 3) ++#define HWCAP_LOONGARCH_LSX (1 << 4) ++#define HWCAP_LOONGARCH_LASX (1 << 5) ++#define HWCAP_LOONGARCH_CRC32 (1 << 6) ++#define HWCAP_LOONGARCH_COMPLEX (1 << 7) ++#define HWCAP_LOONGARCH_CRYPTO (1 << 8) ++#define HWCAP_LOONGARCH_LVZ (1 << 9) ++#define HWCAP_LOONGARCH_LBT_X86 (1 << 10) ++#define HWCAP_LOONGARCH_LBT_ARM (1 << 11) ++#define HWCAP_LOONGARCH_LBT_MIPS (1 << 12) ++#define HWCAP_LOONGARCH_PTW (1 << 13) +-- +2.27.0 + diff --git a/packages/musl/package.desc b/packages/musl/package.desc index 18f743845c..985a1945f3 100644 --- a/packages/musl/package.desc +++ b/packages/musl/package.desc @@ -1,4 +1,4 @@ repository='git git://git.musl-libc.org/musl' -mirrors='http://www.musl-libc.org/releases' +mirrors='https://www.musl-libc.org/releases' archive_formats='.tar.gz' signature_format='packed/.asc' diff --git a/packages/ncurses/6.5/chksum b/packages/ncurses/6.5/chksum new file mode 100644 index 0000000000..714c4bb068 --- /dev/null +++ b/packages/ncurses/6.5/chksum @@ -0,0 +1,4 @@ +md5 ncurses-6.5.tar.gz ac2d2629296f04c8537ca706b6977687 +sha1 ncurses-6.5.tar.gz cde3024ac3f9ef21eaed6f001476ea8fffcaa381 +sha256 ncurses-6.5.tar.gz 136d91bc269a9a5785e5f9e980bc76ab57428f604ce3e5a5a90cebc767971cc6 +sha512 ncurses-6.5.tar.gz fc5a13409d2a530a1325776dcce3a99127ddc2c03999cfeb0065d0eee2d68456274fb1c7b3cc99c1937bc657d0e7fca97016e147f93c7821b5a4a6837db821e8 diff --git a/packages/ncurses/6.5/ncurses-6.5-20240504.patch b/packages/ncurses/6.5/ncurses-6.5-20240504.patch new file mode 100644 index 0000000000..bfac905a18 --- /dev/null +++ b/packages/ncurses/6.5/ncurses-6.5-20240504.patch @@ -0,0 +1,1209 @@ +# ncurses 6.5 - patch 20240504 - Thomas E. Dickey +# +# ------------------------------------------------------------------------------ +# +# Ncurses 6.5 is at +# https://invisible-island.net/archives/ncurses/ +# https://invisible-mirror.net/archives/ncurses/ +# https://ftp.gnu.org/gnu/ncurses/ +# +# Patches for ncurses 6.5 can be found at +# https://invisible-island.net/archives/ncurses/6.5 +# https://invisible-mirror.net/archives/ncurses/6.5 +# +# ------------------------------------------------------------------------------ +# https://invisible-island.net/archives/ncurses/6.5/ncurses-6.5-20240504.patch.gz +# patch by Thomas E. Dickey +# created Sat May 4 20:37:35 UTC 2024 +# ------------------------------------------------------------------------------ +# INSTALL | 10 +# NEWS | 6 +# VERSION | 2 +# dist.mk | 4 +# include/nc_mingw.h | 8 +# include/nc_win32.h | 8 +# ncurses/curses.priv.h | 4 +# ncurses/wcwidth.h | 743 ++++++++++++++++++++++++++++++------- +# ncurses/win32con/wcwidth.c | 13 +# package/debian-mingw/changelog | 4 +# package/debian-mingw64/changelog | 4 +# package/debian/changelog | 4 +# package/mingw-ncurses.nsi | 4 +# package/mingw-ncurses.spec | 2 +# package/ncurses.spec | 2 +# package/ncursest.spec | 2 +# 16 files changed, 659 insertions(+), 161 deletions(-) +# ------------------------------------------------------------------------------ +Index: INSTALL +Prereq: 1.254 +--- ncurses-6.5-20240427+/INSTALL 2024-04-27 14:21:05.000000000 +0000 ++++ ncurses-6.5-20240504/INSTALL 2024-05-04 15:54:00.000000000 +0000 +@@ -26,7 +26,7 @@ + -- sale, use or other dealings in this Software without prior written -- + -- authorization. -- + ------------------------------------------------------------------------------- +--- $Id: INSTALL,v 1.254 2024/04/27 14:21:05 tom Exp $ ++-- $Id: INSTALL,v 1.255 2024/05/04 15:54:00 tom Exp $ + --------------------------------------------------------------------- + How to install Ncurses/Terminfo on your system + --------------------------------------------------------------------- +@@ -1351,11 +1351,9 @@ + several builds, some symbols will be listed in the the ".map" files + that do not happen to be present in one configuration or another. + +- The sample ".map" (and ".sym") files are generated using a set of +- scripts which build several configurations for each release version, +- checking to see which of the "_nc_" symbols can be made local. In +- addition to the ncurses libraries and programs, the symbols used +- by the "tack" program before version 1.08 are made global. ++ The sample ".map" (and ".sym") files were generated using a set of ++ scripts which built several configurations for each release version, ++ checking to see which of the "_nc_" symbols can be made local. + + These sample ".map" files will not cover all possible combinations. + In some cases, e.g., when using the --with-weak-symbols option, you +Index: NEWS +Prereq: 1.4114 +--- ncurses-6.5-20240427+/NEWS 2024-04-27 18:00:35.000000000 +0000 ++++ ncurses-6.5-20240504/NEWS 2024-05-04 18:43:01.000000000 +0000 +@@ -26,7 +26,7 @@ + -- sale, use or other dealings in this Software without prior written -- + -- authorization. -- + ------------------------------------------------------------------------------- +--- $Id: NEWS,v 1.4114 2024/04/27 18:00:35 tom Exp $ ++-- $Id: NEWS,v 1.4117 2024/05/04 18:43:01 tom Exp $ + ------------------------------------------------------------------------------- + + This is a log of changes that ncurses has gone through since Zeyd started +@@ -46,6 +46,10 @@ + Changes through 1.9.9e did not credit all contributions; + it is not possible to add this information. + ++20240504 ++ + update ncurses/wcwidth.c, for MinGW ports, from xterm. ++ + trim obsolete comment about tack from INSTALL. ++ + 20240427 6.5 release for upload to ftp.gnu.org + + update announcement + + fixes/corrections for manpages (patches by Branden Robinson). +Index: VERSION +--- ncurses-6.5-20240427+/VERSION 2024-04-27 13:56:53.000000000 +0000 ++++ ncurses-6.5-20240504/VERSION 2024-05-04 10:21:09.000000000 +0000 +@@ -1 +1 @@ +-5:0:10 6.5 20240427 ++5:0:10 6.5 20240504 +Index: dist.mk +Prereq: 1.1610 +--- ncurses-6.5-20240427+/dist.mk 2024-04-27 13:55:54.000000000 +0000 ++++ ncurses-6.5-20240504/dist.mk 2024-05-04 10:21:09.000000000 +0000 +@@ -26,7 +26,7 @@ + # use or other dealings in this Software without prior written # + # authorization. # + ############################################################################## +-# $Id: dist.mk,v 1.1610 2024/04/27 13:55:54 tom Exp $ ++# $Id: dist.mk,v 1.1611 2024/05/04 10:21:09 tom Exp $ + # Makefile for creating ncurses distributions. + # + # This only needs to be used directly as a makefile by developers, but +@@ -38,7 +38,7 @@ + # These define the major/minor/patch versions of ncurses. + NCURSES_MAJOR = 6 + NCURSES_MINOR = 5 +-NCURSES_PATCH = 20240427 ++NCURSES_PATCH = 20240504 + + # We don't append the patch to the version, since this only applies to releases + VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) +Index: include/nc_mingw.h +Prereq: 1.10 +--- ncurses-6.5-20240427+/include/nc_mingw.h 2023-02-25 19:59:24.000000000 +0000 ++++ ncurses-6.5-20240504/include/nc_mingw.h 2024-05-04 19:16:38.000000000 +0000 +@@ -1,5 +1,5 @@ + /**************************************************************************** +- * Copyright 2018-2020,2023 Thomas E. Dickey * ++ * Copyright 2018-2023,2024 Thomas E. Dickey * + * Copyright 2008-2010,2017 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * +@@ -31,7 +31,7 @@ + * Author: Thomas Dickey, 2008-on * + ****************************************************************************/ + +-/* $Id: nc_mingw.h,v 1.10 2023/02/25 19:59:24 tom Exp $ */ ++/* $Id: nc_mingw.h,v 1.12 2024/05/04 19:16:38 tom Exp $ */ + + #ifndef NC_MINGW_H + #define NC_MINGW_H 1 +@@ -58,6 +58,8 @@ + #include /* for struct timeval */ + #endif + ++#include /* for uint32_t */ ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -77,7 +79,7 @@ + + #undef wcwidth + #define wcwidth(ucs) _nc_wcwidth((wchar_t)(ucs)) +-NCURSES_EXPORT(int) _nc_wcwidth(wchar_t); ++NCURSES_EXPORT(int) _nc_wcwidth(uint32_t); + + #ifdef __cplusplus + } +Index: include/nc_win32.h +Prereq: 1.10 +--- ncurses-6.5-20240427+/include/nc_win32.h 2023-02-25 20:09:23.000000000 +0000 ++++ ncurses-6.5-20240504/include/nc_win32.h 2024-05-04 19:17:03.000000000 +0000 +@@ -1,5 +1,5 @@ + /**************************************************************************** +- * Copyright 2018-2020,2023 Thomas E. Dickey * ++ * Copyright 2018-2023,2024 Thomas E. Dickey * + * Copyright 2008-2010,2017 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * +@@ -31,7 +31,7 @@ + * Author: Thomas Dickey, 2008-on * + ****************************************************************************/ + +-/* $Id: nc_win32.h,v 1.10 2023/02/25 20:09:23 tom Exp $ */ ++/* $Id: nc_win32.h,v 1.12 2024/05/04 19:17:03 tom Exp $ */ + + #ifndef NC_WIN32_H + #define NC_WIN32_H 1 +@@ -73,6 +73,8 @@ + #include /* for struct timeval */ + #endif + ++#include /* for uint32_t */ ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -87,7 +89,7 @@ + + #undef wcwidth + #define wcwidth(ucs) _nc_wcwidth((wchar_t)(ucs)) +-extern NCURSES_EXPORT(int) _nc_wcwidth(wchar_t); ++extern NCURSES_EXPORT(int) _nc_wcwidth(uint32_t); + + #ifdef EVENTLIST_2nd /* test.priv.h just needs the preceding */ + +Index: ncurses/curses.priv.h +Prereq: 1.687 +--- ncurses-6.5-20240427+/ncurses/curses.priv.h 2024-04-23 22:28:25.000000000 +0000 ++++ ncurses-6.5-20240504/ncurses/curses.priv.h 2024-05-04 18:30:25.000000000 +0000 +@@ -35,7 +35,7 @@ + ****************************************************************************/ + + /* +- * $Id: curses.priv.h,v 1.687 2024/04/23 22:28:25 tom Exp $ ++ * $Id: curses.priv.h,v 1.688 2024/05/04 18:30:25 tom Exp $ + * + * curses.priv.h + * +@@ -2250,7 +2250,7 @@ + + #if defined(_NC_WINDOWS) || defined(_NC_MINGW) + /* see wcwidth.c */ +-extern NCURSES_EXPORT(int) mk_wcwidth(wchar_t); ++extern NCURSES_EXPORT(int) mk_wcwidth(uint32_t); + #define wcwidth(ucs) _nc_wcwidth(ucs) + #endif + +Index: ncurses/wcwidth.h +--- ncurses-6.5-20240427+/ncurses/wcwidth.h 2021-08-18 19:47:03.000000000 +0000 ++++ ncurses-6.5-20240504/ncurses/wcwidth.h 2024-05-04 18:44:25.000000000 +0000 +@@ -1,4 +1,57 @@ ++/* $Id: wcwidth.h,v 1.6 2024/05/04 18:44:25 tom Exp $ */ ++ + /* ++ * Copyright 2002-2023,2024 by Thomas E. Dickey ++ * ++ * All Rights Reserved ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the ++ * "Software"), to deal in the Software without restriction, including ++ * without limitation the rights to use, copy, modify, merge, publish, ++ * distribute, sublicense, and/or sell copies of the Software, and to ++ * permit persons to whom the Software is furnished to do so, subject to ++ * the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included ++ * in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ++ * IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY ++ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ++ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ++ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ * ++ * Except as contained in this notice, the name(s) of the above copyright ++ * holders shall not be used in advertising or otherwise to promote the ++ * sale, use or other dealings in this Software without prior written ++ * authorization. ++ *----------------------------------------------------------------------------- ++ * This is an updated version of Markus Kuhn's implementation of wcwidth. ++ * ++ * Originally added to xterm in 2000 (patch #141), there were a couple of ++ * updates from Kuhn until 2005 (patch #202), renaming entrypoints and applying ++ * data from Unicode.org (e.g., 3.2, 4.0, 4.1.0). The Unicode data is ++ * transformed into tables in this file by a script "uniset" written by Kuhn. ++ * ++ * While Kuhn implemented the original CJK variant, it was unused by xterm ++ * until Jungshik Shin used it in 2002 to implement the -cjk_width command-line ++ * option. ++ * ++ * Kuhn added a check for the vertical forms block (double-width) in 2007; ++ * other updates were derived from the Unicode.org data (release 5.0). ++ * ++ * Since then, additional updates have been made: ++ * + data-type fixes ++ * + new Unicode releases (6.2.0, 9.0.0, etc), ++ * + additional special symbol blocks have been added to the special cases. ++ * + soft-hyphen behavior has been made configurable. ++ * + added table shows when a character is not part of Unicode. ++ * ++ * Kuhn's original header follows giving the design information: ++ *----------------------------------------------------------------------------- + * This is an implementation of wcwidth() and wcswidth() (defined in + * IEEE Std 1002.1-2001) for Unicode. + * +@@ -50,13 +103,14 @@ + * + * http://www.unicode.org/unicode/reports/tr11/ + * +- * Markus Kuhn -- 2007-05-26 (Unicode 5.0) ++ * Markus Kuhn -- 2007-05-25 (Unicode 5.0) + * + * Permission to use, copy, modify, and distribute this software + * for any purpose and without fee is hereby granted. The author + * disclaims all warranties with regard to this software. + * + * Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c ++ *----------------------------------------------------------------------------- + */ + + #ifndef _WCWIDTH_H_incl +@@ -72,30 +126,42 @@ + #include + + struct interval { +- int first; +- int last; ++ unsigned long first; ++ unsigned long last; + }; + ++static int use_latin1 = 1; ++ + /* auxiliary function for binary search in interval table */ +-static int bisearch(wchar_t ucs, const struct interval *table, int max) { +- int min = 0; +- int mid; +- +- if (ucs < table[0].first || ucs > table[max].last) +- return 0; +- while (max >= min) { +- mid = (min + max) / 2; +- if (ucs > table[mid].last) +- min = mid + 1; +- else if (ucs < table[mid].first) +- max = mid - 1; +- else +- return 1; ++static int bisearch(unsigned long ucs, const struct interval *table, int max) ++{ ++ ++ if (ucs >= table[0].first && ucs <= table[max].last) { ++ int min = 0; ++ ++ while (max >= min) { ++ int mid; ++ ++ mid = (min + max) / 2; ++ if (ucs > table[mid].last) ++ min = mid + 1; ++ else if (ucs < table[mid].first) ++ max = mid - 1; ++ else ++ return 1; ++ } + } + + return 0; + } + ++/* ++ * Provide a way to change the behavior of soft-hyphen. ++ */ ++NCURSES_EXPORT(void) mk_wcwidth_init(int mode) ++{ ++ use_latin1 = (mode == 0); ++} + + /* The following two functions define the column width of an ISO 10646 + * character as follows: +@@ -109,7 +175,10 @@ + * category code Mn or Me in the Unicode database) have a + * column width of 0. + * +- * - SOFT HYPHEN (U+00AD) has a column width of 1. ++ * - A few spacing combining marks have a column width of 0. ++ * ++ * - SOFT HYPHEN (U+00AD) has a column width of 1 in Latin-1, 0 in Unicode. ++ * An initialization function is used to switch between the two. + * + * - Other format characters (general category code Cf in the Unicode + * database) and ZERO WIDTH SPACE (U+200B) have a column width of 0. +@@ -117,115 +186,513 @@ + * - Hangul Jamo medial vowels and final consonants (U+1160-U+11FF) + * have a column width of 0. + * ++ * - Hangul Jamo Extended-B medial vowels and final consonants for old ++ * Korean (U+D7B0-U+D7FF) have a column width of 0. ++ * + * - Spacing characters in the East Asian Wide (W) or East Asian + * Full-width (F) category as defined in Unicode Technical +- * Report #11 have a column width of 2. ++ * Report #11 have a column width of 2. In that report, some codes ++ * were unassigned. Characters in these blocks use a column width of 1: ++ * 4DC0..4DFF; Yijing Hexagram Symbols ++ * A960..A97F; Hangul Jamo Extended-A + * + * - All remaining characters (including all printable + * ISO 8859-1 and WGL4 characters, Unicode control characters, + * etc.) have a column width of 1. + * ++ * - Codes which do not correspond to a Unicode character have a column ++ * width of -1. ++ * + * This implementation assumes that wchar_t characters are encoded + * in ISO 10646. + */ + +-NCURSES_EXPORT(int) mk_wcwidth(wchar_t ucs) ++NCURSES_EXPORT(int) mk_wcwidth(uint32_t ucs) + { ++ unsigned long cmp = (unsigned long) ucs; ++ ++ /* sorted list of non-overlapping intervals of formatting characters */ ++ /* generated by ++ * uniset +cat=Cf -00AD -0600-0605 -061C -06DD -070F c ++ */ ++ /* *INDENT-OFF* */ ++ /* generated by run-uniset_ctl 1.1 */ ++ static const struct interval formatting[] = { ++ { 0x0890, 0x0891 }, { 0x08E2, 0x08E2 }, { 0x180E, 0x180E }, ++ { 0x200B, 0x200F }, { 0x202A, 0x202E }, { 0x2060, 0x2064 }, ++ { 0x2066, 0x206F }, { 0xFEFF, 0xFEFF }, { 0xFFF9, 0xFFFB }, ++ { 0x110BD, 0x110BD }, { 0x110CD, 0x110CD }, { 0x13430, 0x1343F }, ++ { 0x1BCA0, 0x1BCA3 }, { 0x1D173, 0x1D17A }, { 0xE0001, 0xE0001 }, ++ { 0xE0020, 0xE007F } ++ }; ++ /* *INDENT-OFF* */ ++ + /* sorted list of non-overlapping intervals of non-spacing characters */ +- /* generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" */ ++ /* generated by ++ * uniset +cat=Me +cat=Mn +0600-0605 +061C +06DD +070F +1160-11FF +D7B0-D7C6 +D7CB-D7FB c ++ */ ++ /* *INDENT-OFF* */ ++ /* generated by run-uniset 1.9 */ + static const struct interval combining[] = { +- { 0x0300, 0x036F }, { 0x0483, 0x0486 }, { 0x0488, 0x0489 }, +- { 0x0591, 0x05BD }, { 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 }, +- { 0x05C4, 0x05C5 }, { 0x05C7, 0x05C7 }, { 0x0600, 0x0603 }, +- { 0x0610, 0x0615 }, { 0x064B, 0x065E }, { 0x0670, 0x0670 }, +- { 0x06D6, 0x06E4 }, { 0x06E7, 0x06E8 }, { 0x06EA, 0x06ED }, +- { 0x070F, 0x070F }, { 0x0711, 0x0711 }, { 0x0730, 0x074A }, +- { 0x07A6, 0x07B0 }, { 0x07EB, 0x07F3 }, { 0x0901, 0x0902 }, +- { 0x093C, 0x093C }, { 0x0941, 0x0948 }, { 0x094D, 0x094D }, +- { 0x0951, 0x0954 }, { 0x0962, 0x0963 }, { 0x0981, 0x0981 }, +- { 0x09BC, 0x09BC }, { 0x09C1, 0x09C4 }, { 0x09CD, 0x09CD }, +- { 0x09E2, 0x09E3 }, { 0x0A01, 0x0A02 }, { 0x0A3C, 0x0A3C }, +- { 0x0A41, 0x0A42 }, { 0x0A47, 0x0A48 }, { 0x0A4B, 0x0A4D }, +- { 0x0A70, 0x0A71 }, { 0x0A81, 0x0A82 }, { 0x0ABC, 0x0ABC }, +- { 0x0AC1, 0x0AC5 }, { 0x0AC7, 0x0AC8 }, { 0x0ACD, 0x0ACD }, +- { 0x0AE2, 0x0AE3 }, { 0x0B01, 0x0B01 }, { 0x0B3C, 0x0B3C }, +- { 0x0B3F, 0x0B3F }, { 0x0B41, 0x0B43 }, { 0x0B4D, 0x0B4D }, +- { 0x0B56, 0x0B56 }, { 0x0B82, 0x0B82 }, { 0x0BC0, 0x0BC0 }, +- { 0x0BCD, 0x0BCD }, { 0x0C3E, 0x0C40 }, { 0x0C46, 0x0C48 }, +- { 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 }, { 0x0CBC, 0x0CBC }, +- { 0x0CBF, 0x0CBF }, { 0x0CC6, 0x0CC6 }, { 0x0CCC, 0x0CCD }, +- { 0x0CE2, 0x0CE3 }, { 0x0D41, 0x0D43 }, { 0x0D4D, 0x0D4D }, ++ { 0x0300, 0x036F }, { 0x0483, 0x0489 }, { 0x0591, 0x05BD }, ++ { 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 }, { 0x05C4, 0x05C5 }, ++ { 0x05C7, 0x05C7 }, { 0x0600, 0x0605 }, { 0x0610, 0x061A }, ++ { 0x061C, 0x061C }, { 0x064B, 0x065F }, { 0x0670, 0x0670 }, ++ { 0x06D6, 0x06DD }, { 0x06DF, 0x06E4 }, { 0x06E7, 0x06E8 }, ++ { 0x06EA, 0x06ED }, { 0x070F, 0x070F }, { 0x0711, 0x0711 }, ++ { 0x0730, 0x074A }, { 0x07A6, 0x07B0 }, { 0x07EB, 0x07F3 }, ++ { 0x07FD, 0x07FD }, { 0x0816, 0x0819 }, { 0x081B, 0x0823 }, ++ { 0x0825, 0x0827 }, { 0x0829, 0x082D }, { 0x0859, 0x085B }, ++ { 0x0898, 0x089F }, { 0x08CA, 0x08E1 }, { 0x08E3, 0x0902 }, ++ { 0x093A, 0x093A }, { 0x093C, 0x093C }, { 0x0941, 0x0948 }, ++ { 0x094D, 0x094D }, { 0x0951, 0x0957 }, { 0x0962, 0x0963 }, ++ { 0x0981, 0x0981 }, { 0x09BC, 0x09BC }, { 0x09C1, 0x09C4 }, ++ { 0x09CD, 0x09CD }, { 0x09E2, 0x09E3 }, { 0x09FE, 0x09FE }, ++ { 0x0A01, 0x0A02 }, { 0x0A3C, 0x0A3C }, { 0x0A41, 0x0A42 }, ++ { 0x0A47, 0x0A48 }, { 0x0A4B, 0x0A4D }, { 0x0A51, 0x0A51 }, ++ { 0x0A70, 0x0A71 }, { 0x0A75, 0x0A75 }, { 0x0A81, 0x0A82 }, ++ { 0x0ABC, 0x0ABC }, { 0x0AC1, 0x0AC5 }, { 0x0AC7, 0x0AC8 }, ++ { 0x0ACD, 0x0ACD }, { 0x0AE2, 0x0AE3 }, { 0x0AFA, 0x0AFF }, ++ { 0x0B01, 0x0B01 }, { 0x0B3C, 0x0B3C }, { 0x0B3F, 0x0B3F }, ++ { 0x0B41, 0x0B44 }, { 0x0B4D, 0x0B4D }, { 0x0B55, 0x0B56 }, ++ { 0x0B62, 0x0B63 }, { 0x0B82, 0x0B82 }, { 0x0BC0, 0x0BC0 }, ++ { 0x0BCD, 0x0BCD }, { 0x0C00, 0x0C00 }, { 0x0C04, 0x0C04 }, ++ { 0x0C3C, 0x0C3C }, { 0x0C3E, 0x0C40 }, { 0x0C46, 0x0C48 }, ++ { 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 }, { 0x0C62, 0x0C63 }, ++ { 0x0C81, 0x0C81 }, { 0x0CBC, 0x0CBC }, { 0x0CBF, 0x0CBF }, ++ { 0x0CC6, 0x0CC6 }, { 0x0CCC, 0x0CCD }, { 0x0CE2, 0x0CE3 }, ++ { 0x0D00, 0x0D01 }, { 0x0D3B, 0x0D3C }, { 0x0D41, 0x0D44 }, ++ { 0x0D4D, 0x0D4D }, { 0x0D62, 0x0D63 }, { 0x0D81, 0x0D81 }, + { 0x0DCA, 0x0DCA }, { 0x0DD2, 0x0DD4 }, { 0x0DD6, 0x0DD6 }, + { 0x0E31, 0x0E31 }, { 0x0E34, 0x0E3A }, { 0x0E47, 0x0E4E }, +- { 0x0EB1, 0x0EB1 }, { 0x0EB4, 0x0EB9 }, { 0x0EBB, 0x0EBC }, +- { 0x0EC8, 0x0ECD }, { 0x0F18, 0x0F19 }, { 0x0F35, 0x0F35 }, +- { 0x0F37, 0x0F37 }, { 0x0F39, 0x0F39 }, { 0x0F71, 0x0F7E }, +- { 0x0F80, 0x0F84 }, { 0x0F86, 0x0F87 }, { 0x0F90, 0x0F97 }, +- { 0x0F99, 0x0FBC }, { 0x0FC6, 0x0FC6 }, { 0x102D, 0x1030 }, +- { 0x1032, 0x1032 }, { 0x1036, 0x1037 }, { 0x1039, 0x1039 }, +- { 0x1058, 0x1059 }, { 0x1160, 0x11FF }, { 0x135F, 0x135F }, +- { 0x1712, 0x1714 }, { 0x1732, 0x1734 }, { 0x1752, 0x1753 }, +- { 0x1772, 0x1773 }, { 0x17B4, 0x17B5 }, { 0x17B7, 0x17BD }, +- { 0x17C6, 0x17C6 }, { 0x17C9, 0x17D3 }, { 0x17DD, 0x17DD }, +- { 0x180B, 0x180D }, { 0x18A9, 0x18A9 }, { 0x1920, 0x1922 }, +- { 0x1927, 0x1928 }, { 0x1932, 0x1932 }, { 0x1939, 0x193B }, +- { 0x1A17, 0x1A18 }, { 0x1B00, 0x1B03 }, { 0x1B34, 0x1B34 }, +- { 0x1B36, 0x1B3A }, { 0x1B3C, 0x1B3C }, { 0x1B42, 0x1B42 }, +- { 0x1B6B, 0x1B73 }, { 0x1DC0, 0x1DCA }, { 0x1DFE, 0x1DFF }, +- { 0x200B, 0x200F }, { 0x202A, 0x202E }, { 0x2060, 0x2063 }, +- { 0x206A, 0x206F }, { 0x20D0, 0x20EF }, { 0x302A, 0x302F }, +- { 0x3099, 0x309A }, { 0xA806, 0xA806 }, { 0xA80B, 0xA80B }, +- { 0xA825, 0xA826 }, { 0xFB1E, 0xFB1E }, { 0xFE00, 0xFE0F }, +- { 0xFE20, 0xFE23 }, { 0xFEFF, 0xFEFF }, { 0xFFF9, 0xFFFB }, +- { 0x10A01, 0x10A03 }, { 0x10A05, 0x10A06 }, { 0x10A0C, 0x10A0F }, +- { 0x10A38, 0x10A3A }, { 0x10A3F, 0x10A3F }, { 0x1D167, 0x1D169 }, +- { 0x1D173, 0x1D182 }, { 0x1D185, 0x1D18B }, { 0x1D1AA, 0x1D1AD }, +- { 0x1D242, 0x1D244 }, { 0xE0001, 0xE0001 }, { 0xE0020, 0xE007F }, ++ { 0x0EB1, 0x0EB1 }, { 0x0EB4, 0x0EBC }, { 0x0EC8, 0x0ECE }, ++ { 0x0F18, 0x0F19 }, { 0x0F35, 0x0F35 }, { 0x0F37, 0x0F37 }, ++ { 0x0F39, 0x0F39 }, { 0x0F71, 0x0F7E }, { 0x0F80, 0x0F84 }, ++ { 0x0F86, 0x0F87 }, { 0x0F8D, 0x0F97 }, { 0x0F99, 0x0FBC }, ++ { 0x0FC6, 0x0FC6 }, { 0x102D, 0x1030 }, { 0x1032, 0x1037 }, ++ { 0x1039, 0x103A }, { 0x103D, 0x103E }, { 0x1058, 0x1059 }, ++ { 0x105E, 0x1060 }, { 0x1071, 0x1074 }, { 0x1082, 0x1082 }, ++ { 0x1085, 0x1086 }, { 0x108D, 0x108D }, { 0x109D, 0x109D }, ++ { 0x1160, 0x11FF }, { 0x135D, 0x135F }, { 0x1712, 0x1714 }, ++ { 0x1732, 0x1733 }, { 0x1752, 0x1753 }, { 0x1772, 0x1773 }, ++ { 0x17B4, 0x17B5 }, { 0x17B7, 0x17BD }, { 0x17C6, 0x17C6 }, ++ { 0x17C9, 0x17D3 }, { 0x17DD, 0x17DD }, { 0x180B, 0x180D }, ++ { 0x180F, 0x180F }, { 0x1885, 0x1886 }, { 0x18A9, 0x18A9 }, ++ { 0x1920, 0x1922 }, { 0x1927, 0x1928 }, { 0x1932, 0x1932 }, ++ { 0x1939, 0x193B }, { 0x1A17, 0x1A18 }, { 0x1A1B, 0x1A1B }, ++ { 0x1A56, 0x1A56 }, { 0x1A58, 0x1A5E }, { 0x1A60, 0x1A60 }, ++ { 0x1A62, 0x1A62 }, { 0x1A65, 0x1A6C }, { 0x1A73, 0x1A7C }, ++ { 0x1A7F, 0x1A7F }, { 0x1AB0, 0x1ACE }, { 0x1B00, 0x1B03 }, ++ { 0x1B34, 0x1B34 }, { 0x1B36, 0x1B3A }, { 0x1B3C, 0x1B3C }, ++ { 0x1B42, 0x1B42 }, { 0x1B6B, 0x1B73 }, { 0x1B80, 0x1B81 }, ++ { 0x1BA2, 0x1BA5 }, { 0x1BA8, 0x1BA9 }, { 0x1BAB, 0x1BAD }, ++ { 0x1BE6, 0x1BE6 }, { 0x1BE8, 0x1BE9 }, { 0x1BED, 0x1BED }, ++ { 0x1BEF, 0x1BF1 }, { 0x1C2C, 0x1C33 }, { 0x1C36, 0x1C37 }, ++ { 0x1CD0, 0x1CD2 }, { 0x1CD4, 0x1CE0 }, { 0x1CE2, 0x1CE8 }, ++ { 0x1CED, 0x1CED }, { 0x1CF4, 0x1CF4 }, { 0x1CF8, 0x1CF9 }, ++ { 0x1DC0, 0x1DFF }, { 0x20D0, 0x20F0 }, { 0x2CEF, 0x2CF1 }, ++ { 0x2D7F, 0x2D7F }, { 0x2DE0, 0x2DFF }, { 0x302A, 0x302D }, ++ { 0x3099, 0x309A }, { 0xA66F, 0xA672 }, { 0xA674, 0xA67D }, ++ { 0xA69E, 0xA69F }, { 0xA6F0, 0xA6F1 }, { 0xA802, 0xA802 }, ++ { 0xA806, 0xA806 }, { 0xA80B, 0xA80B }, { 0xA825, 0xA826 }, ++ { 0xA82C, 0xA82C }, { 0xA8C4, 0xA8C5 }, { 0xA8E0, 0xA8F1 }, ++ { 0xA8FF, 0xA8FF }, { 0xA926, 0xA92D }, { 0xA947, 0xA951 }, ++ { 0xA980, 0xA982 }, { 0xA9B3, 0xA9B3 }, { 0xA9B6, 0xA9B9 }, ++ { 0xA9BC, 0xA9BD }, { 0xA9E5, 0xA9E5 }, { 0xAA29, 0xAA2E }, ++ { 0xAA31, 0xAA32 }, { 0xAA35, 0xAA36 }, { 0xAA43, 0xAA43 }, ++ { 0xAA4C, 0xAA4C }, { 0xAA7C, 0xAA7C }, { 0xAAB0, 0xAAB0 }, ++ { 0xAAB2, 0xAAB4 }, { 0xAAB7, 0xAAB8 }, { 0xAABE, 0xAABF }, ++ { 0xAAC1, 0xAAC1 }, { 0xAAEC, 0xAAED }, { 0xAAF6, 0xAAF6 }, ++ { 0xABE5, 0xABE5 }, { 0xABE8, 0xABE8 }, { 0xABED, 0xABED }, ++ { 0xD7B0, 0xD7C6 }, { 0xD7CB, 0xD7FB }, { 0xFB1E, 0xFB1E }, ++ { 0xFE00, 0xFE0F }, { 0xFE20, 0xFE2F }, { 0x101FD, 0x101FD }, ++ { 0x102E0, 0x102E0 }, { 0x10376, 0x1037A }, { 0x10A01, 0x10A03 }, ++ { 0x10A05, 0x10A06 }, { 0x10A0C, 0x10A0F }, { 0x10A38, 0x10A3A }, ++ { 0x10A3F, 0x10A3F }, { 0x10AE5, 0x10AE6 }, { 0x10D24, 0x10D27 }, ++ { 0x10EAB, 0x10EAC }, { 0x10EFD, 0x10EFF }, { 0x10F46, 0x10F50 }, ++ { 0x10F82, 0x10F85 }, { 0x11001, 0x11001 }, { 0x11038, 0x11046 }, ++ { 0x11070, 0x11070 }, { 0x11073, 0x11074 }, { 0x1107F, 0x11081 }, ++ { 0x110B3, 0x110B6 }, { 0x110B9, 0x110BA }, { 0x110C2, 0x110C2 }, ++ { 0x11100, 0x11102 }, { 0x11127, 0x1112B }, { 0x1112D, 0x11134 }, ++ { 0x11173, 0x11173 }, { 0x11180, 0x11181 }, { 0x111B6, 0x111BE }, ++ { 0x111C9, 0x111CC }, { 0x111CF, 0x111CF }, { 0x1122F, 0x11231 }, ++ { 0x11234, 0x11234 }, { 0x11236, 0x11237 }, { 0x1123E, 0x1123E }, ++ { 0x11241, 0x11241 }, { 0x112DF, 0x112DF }, { 0x112E3, 0x112EA }, ++ { 0x11300, 0x11301 }, { 0x1133B, 0x1133C }, { 0x11340, 0x11340 }, ++ { 0x11366, 0x1136C }, { 0x11370, 0x11374 }, { 0x11438, 0x1143F }, ++ { 0x11442, 0x11444 }, { 0x11446, 0x11446 }, { 0x1145E, 0x1145E }, ++ { 0x114B3, 0x114B8 }, { 0x114BA, 0x114BA }, { 0x114BF, 0x114C0 }, ++ { 0x114C2, 0x114C3 }, { 0x115B2, 0x115B5 }, { 0x115BC, 0x115BD }, ++ { 0x115BF, 0x115C0 }, { 0x115DC, 0x115DD }, { 0x11633, 0x1163A }, ++ { 0x1163D, 0x1163D }, { 0x1163F, 0x11640 }, { 0x116AB, 0x116AB }, ++ { 0x116AD, 0x116AD }, { 0x116B0, 0x116B5 }, { 0x116B7, 0x116B7 }, ++ { 0x1171D, 0x1171F }, { 0x11722, 0x11725 }, { 0x11727, 0x1172B }, ++ { 0x1182F, 0x11837 }, { 0x11839, 0x1183A }, { 0x1193B, 0x1193C }, ++ { 0x1193E, 0x1193E }, { 0x11943, 0x11943 }, { 0x119D4, 0x119D7 }, ++ { 0x119DA, 0x119DB }, { 0x119E0, 0x119E0 }, { 0x11A01, 0x11A0A }, ++ { 0x11A33, 0x11A38 }, { 0x11A3B, 0x11A3E }, { 0x11A47, 0x11A47 }, ++ { 0x11A51, 0x11A56 }, { 0x11A59, 0x11A5B }, { 0x11A8A, 0x11A96 }, ++ { 0x11A98, 0x11A99 }, { 0x11C30, 0x11C36 }, { 0x11C38, 0x11C3D }, ++ { 0x11C3F, 0x11C3F }, { 0x11C92, 0x11CA7 }, { 0x11CAA, 0x11CB0 }, ++ { 0x11CB2, 0x11CB3 }, { 0x11CB5, 0x11CB6 }, { 0x11D31, 0x11D36 }, ++ { 0x11D3A, 0x11D3A }, { 0x11D3C, 0x11D3D }, { 0x11D3F, 0x11D45 }, ++ { 0x11D47, 0x11D47 }, { 0x11D90, 0x11D91 }, { 0x11D95, 0x11D95 }, ++ { 0x11D97, 0x11D97 }, { 0x11EF3, 0x11EF4 }, { 0x11F00, 0x11F01 }, ++ { 0x11F36, 0x11F3A }, { 0x11F40, 0x11F40 }, { 0x11F42, 0x11F42 }, ++ { 0x13440, 0x13440 }, { 0x13447, 0x13455 }, { 0x16AF0, 0x16AF4 }, ++ { 0x16B30, 0x16B36 }, { 0x16F4F, 0x16F4F }, { 0x16F8F, 0x16F92 }, ++ { 0x16FE4, 0x16FE4 }, { 0x1BC9D, 0x1BC9E }, { 0x1CF00, 0x1CF2D }, ++ { 0x1CF30, 0x1CF46 }, { 0x1D167, 0x1D169 }, { 0x1D17B, 0x1D182 }, ++ { 0x1D185, 0x1D18B }, { 0x1D1AA, 0x1D1AD }, { 0x1D242, 0x1D244 }, ++ { 0x1DA00, 0x1DA36 }, { 0x1DA3B, 0x1DA6C }, { 0x1DA75, 0x1DA75 }, ++ { 0x1DA84, 0x1DA84 }, { 0x1DA9B, 0x1DA9F }, { 0x1DAA1, 0x1DAAF }, ++ { 0x1E000, 0x1E006 }, { 0x1E008, 0x1E018 }, { 0x1E01B, 0x1E021 }, ++ { 0x1E023, 0x1E024 }, { 0x1E026, 0x1E02A }, { 0x1E08F, 0x1E08F }, ++ { 0x1E130, 0x1E136 }, { 0x1E2AE, 0x1E2AE }, { 0x1E2EC, 0x1E2EF }, ++ { 0x1E4EC, 0x1E4EF }, { 0x1E8D0, 0x1E8D6 }, { 0x1E944, 0x1E94A }, + { 0xE0100, 0xE01EF } + }; ++ /* *INDENT-ON* */ + +- /* test for 8-bit control characters */ +- if (ucs == 0) +- return 0; +- if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0)) +- return -1; ++ /* sorted list of non-overlapping intervals of non-characters */ ++ /* generated by ++ * uniset +0000..DFFF -4e00..9fd5 +F900..10FFFD unknown +2028..2029 c ++ */ ++ /* *INDENT-OFF* */ ++ /* generated by run-uniset_unk 1.6 */ ++ static const struct interval unknowns[] = { ++ { 0x0378, 0x0379 }, { 0x0380, 0x0383 }, { 0x038B, 0x038B }, ++ { 0x038D, 0x038D }, { 0x03A2, 0x03A2 }, { 0x0530, 0x0530 }, ++ { 0x0557, 0x0558 }, { 0x058B, 0x058C }, { 0x0590, 0x0590 }, ++ { 0x05C8, 0x05CF }, { 0x05EB, 0x05EE }, { 0x05F5, 0x05FF }, ++ { 0x070E, 0x070E }, { 0x074B, 0x074C }, { 0x07B2, 0x07BF }, ++ { 0x07FB, 0x07FC }, { 0x082E, 0x082F }, { 0x083F, 0x083F }, ++ { 0x085C, 0x085D }, { 0x085F, 0x085F }, { 0x086B, 0x086F }, ++ { 0x088F, 0x088F }, { 0x0892, 0x0897 }, { 0x0984, 0x0984 }, ++ { 0x098D, 0x098E }, { 0x0991, 0x0992 }, { 0x09A9, 0x09A9 }, ++ { 0x09B1, 0x09B1 }, { 0x09B3, 0x09B5 }, { 0x09BA, 0x09BB }, ++ { 0x09C5, 0x09C6 }, { 0x09C9, 0x09CA }, { 0x09CF, 0x09D6 }, ++ { 0x09D8, 0x09DB }, { 0x09DE, 0x09DE }, { 0x09E4, 0x09E5 }, ++ { 0x09FF, 0x0A00 }, { 0x0A04, 0x0A04 }, { 0x0A0B, 0x0A0E }, ++ { 0x0A11, 0x0A12 }, { 0x0A29, 0x0A29 }, { 0x0A31, 0x0A31 }, ++ { 0x0A34, 0x0A34 }, { 0x0A37, 0x0A37 }, { 0x0A3A, 0x0A3B }, ++ { 0x0A3D, 0x0A3D }, { 0x0A43, 0x0A46 }, { 0x0A49, 0x0A4A }, ++ { 0x0A4E, 0x0A50 }, { 0x0A52, 0x0A58 }, { 0x0A5D, 0x0A5D }, ++ { 0x0A5F, 0x0A65 }, { 0x0A77, 0x0A80 }, { 0x0A84, 0x0A84 }, ++ { 0x0A8E, 0x0A8E }, { 0x0A92, 0x0A92 }, { 0x0AA9, 0x0AA9 }, ++ { 0x0AB1, 0x0AB1 }, { 0x0AB4, 0x0AB4 }, { 0x0ABA, 0x0ABB }, ++ { 0x0AC6, 0x0AC6 }, { 0x0ACA, 0x0ACA }, { 0x0ACE, 0x0ACF }, ++ { 0x0AD1, 0x0ADF }, { 0x0AE4, 0x0AE5 }, { 0x0AF2, 0x0AF8 }, ++ { 0x0B00, 0x0B00 }, { 0x0B04, 0x0B04 }, { 0x0B0D, 0x0B0E }, ++ { 0x0B11, 0x0B12 }, { 0x0B29, 0x0B29 }, { 0x0B31, 0x0B31 }, ++ { 0x0B34, 0x0B34 }, { 0x0B3A, 0x0B3B }, { 0x0B45, 0x0B46 }, ++ { 0x0B49, 0x0B4A }, { 0x0B4E, 0x0B54 }, { 0x0B58, 0x0B5B }, ++ { 0x0B5E, 0x0B5E }, { 0x0B64, 0x0B65 }, { 0x0B78, 0x0B81 }, ++ { 0x0B84, 0x0B84 }, { 0x0B8B, 0x0B8D }, { 0x0B91, 0x0B91 }, ++ { 0x0B96, 0x0B98 }, { 0x0B9B, 0x0B9B }, { 0x0B9D, 0x0B9D }, ++ { 0x0BA0, 0x0BA2 }, { 0x0BA5, 0x0BA7 }, { 0x0BAB, 0x0BAD }, ++ { 0x0BBA, 0x0BBD }, { 0x0BC3, 0x0BC5 }, { 0x0BC9, 0x0BC9 }, ++ { 0x0BCE, 0x0BCF }, { 0x0BD1, 0x0BD6 }, { 0x0BD8, 0x0BE5 }, ++ { 0x0BFB, 0x0BFF }, { 0x0C0D, 0x0C0D }, { 0x0C11, 0x0C11 }, ++ { 0x0C29, 0x0C29 }, { 0x0C3A, 0x0C3B }, { 0x0C45, 0x0C45 }, ++ { 0x0C49, 0x0C49 }, { 0x0C4E, 0x0C54 }, { 0x0C57, 0x0C57 }, ++ { 0x0C5B, 0x0C5C }, { 0x0C5E, 0x0C5F }, { 0x0C64, 0x0C65 }, ++ { 0x0C70, 0x0C76 }, { 0x0C8D, 0x0C8D }, { 0x0C91, 0x0C91 }, ++ { 0x0CA9, 0x0CA9 }, { 0x0CB4, 0x0CB4 }, { 0x0CBA, 0x0CBB }, ++ { 0x0CC5, 0x0CC5 }, { 0x0CC9, 0x0CC9 }, { 0x0CCE, 0x0CD4 }, ++ { 0x0CD7, 0x0CDC }, { 0x0CDF, 0x0CDF }, { 0x0CE4, 0x0CE5 }, ++ { 0x0CF0, 0x0CF0 }, { 0x0CF4, 0x0CFF }, { 0x0D0D, 0x0D0D }, ++ { 0x0D11, 0x0D11 }, { 0x0D45, 0x0D45 }, { 0x0D49, 0x0D49 }, ++ { 0x0D50, 0x0D53 }, { 0x0D64, 0x0D65 }, { 0x0D80, 0x0D80 }, ++ { 0x0D84, 0x0D84 }, { 0x0D97, 0x0D99 }, { 0x0DB2, 0x0DB2 }, ++ { 0x0DBC, 0x0DBC }, { 0x0DBE, 0x0DBF }, { 0x0DC7, 0x0DC9 }, ++ { 0x0DCB, 0x0DCE }, { 0x0DD5, 0x0DD5 }, { 0x0DD7, 0x0DD7 }, ++ { 0x0DE0, 0x0DE5 }, { 0x0DF0, 0x0DF1 }, { 0x0DF5, 0x0E00 }, ++ { 0x0E3B, 0x0E3E }, { 0x0E5C, 0x0E80 }, { 0x0E83, 0x0E83 }, ++ { 0x0E85, 0x0E85 }, { 0x0E8B, 0x0E8B }, { 0x0EA4, 0x0EA4 }, ++ { 0x0EA6, 0x0EA6 }, { 0x0EBE, 0x0EBF }, { 0x0EC5, 0x0EC5 }, ++ { 0x0EC7, 0x0EC7 }, { 0x0ECF, 0x0ECF }, { 0x0EDA, 0x0EDB }, ++ { 0x0EE0, 0x0EFF }, { 0x0F48, 0x0F48 }, { 0x0F6D, 0x0F70 }, ++ { 0x0F98, 0x0F98 }, { 0x0FBD, 0x0FBD }, { 0x0FCD, 0x0FCD }, ++ { 0x0FDB, 0x0FFF }, { 0x10C6, 0x10C6 }, { 0x10C8, 0x10CC }, ++ { 0x10CE, 0x10CF }, { 0x1249, 0x1249 }, { 0x124E, 0x124F }, ++ { 0x1257, 0x1257 }, { 0x1259, 0x1259 }, { 0x125E, 0x125F }, ++ { 0x1289, 0x1289 }, { 0x128E, 0x128F }, { 0x12B1, 0x12B1 }, ++ { 0x12B6, 0x12B7 }, { 0x12BF, 0x12BF }, { 0x12C1, 0x12C1 }, ++ { 0x12C6, 0x12C7 }, { 0x12D7, 0x12D7 }, { 0x1311, 0x1311 }, ++ { 0x1316, 0x1317 }, { 0x135B, 0x135C }, { 0x137D, 0x137F }, ++ { 0x139A, 0x139F }, { 0x13F6, 0x13F7 }, { 0x13FE, 0x13FF }, ++ { 0x169D, 0x169F }, { 0x16F9, 0x16FF }, { 0x1716, 0x171E }, ++ { 0x1737, 0x173F }, { 0x1754, 0x175F }, { 0x176D, 0x176D }, ++ { 0x1771, 0x1771 }, { 0x1774, 0x177F }, { 0x17DE, 0x17DF }, ++ { 0x17EA, 0x17EF }, { 0x17FA, 0x17FF }, { 0x181A, 0x181F }, ++ { 0x1879, 0x187F }, { 0x18AB, 0x18AF }, { 0x18F6, 0x18FF }, ++ { 0x191F, 0x191F }, { 0x192C, 0x192F }, { 0x193C, 0x193F }, ++ { 0x1941, 0x1943 }, { 0x196E, 0x196F }, { 0x1975, 0x197F }, ++ { 0x19AC, 0x19AF }, { 0x19CA, 0x19CF }, { 0x19DB, 0x19DD }, ++ { 0x1A1C, 0x1A1D }, { 0x1A5F, 0x1A5F }, { 0x1A7D, 0x1A7E }, ++ { 0x1A8A, 0x1A8F }, { 0x1A9A, 0x1A9F }, { 0x1AAE, 0x1AAF }, ++ { 0x1ACF, 0x1AFF }, { 0x1B4D, 0x1B4F }, { 0x1B7F, 0x1B7F }, ++ { 0x1BF4, 0x1BFB }, { 0x1C38, 0x1C3A }, { 0x1C4A, 0x1C4C }, ++ { 0x1C89, 0x1C8F }, { 0x1CBB, 0x1CBC }, { 0x1CC8, 0x1CCF }, ++ { 0x1CFB, 0x1CFF }, { 0x1F16, 0x1F17 }, { 0x1F1E, 0x1F1F }, ++ { 0x1F46, 0x1F47 }, { 0x1F4E, 0x1F4F }, { 0x1F58, 0x1F58 }, ++ { 0x1F5A, 0x1F5A }, { 0x1F5C, 0x1F5C }, { 0x1F5E, 0x1F5E }, ++ { 0x1F7E, 0x1F7F }, { 0x1FB5, 0x1FB5 }, { 0x1FC5, 0x1FC5 }, ++ { 0x1FD4, 0x1FD5 }, { 0x1FDC, 0x1FDC }, { 0x1FF0, 0x1FF1 }, ++ { 0x1FF5, 0x1FF5 }, { 0x1FFF, 0x1FFF }, { 0x2028, 0x2029 }, ++ { 0x2065, 0x2065 }, { 0x2072, 0x2073 }, { 0x208F, 0x208F }, ++ { 0x209D, 0x209F }, { 0x20C1, 0x20CF }, { 0x20F1, 0x20FF }, ++ { 0x218C, 0x218F }, { 0x2427, 0x243F }, { 0x244B, 0x245F }, ++ { 0x2B74, 0x2B75 }, { 0x2B96, 0x2B96 }, { 0x2CF4, 0x2CF8 }, ++ { 0x2D26, 0x2D26 }, { 0x2D28, 0x2D2C }, { 0x2D2E, 0x2D2F }, ++ { 0x2D68, 0x2D6E }, { 0x2D71, 0x2D7E }, { 0x2D97, 0x2D9F }, ++ { 0x2DA7, 0x2DA7 }, { 0x2DAF, 0x2DAF }, { 0x2DB7, 0x2DB7 }, ++ { 0x2DBF, 0x2DBF }, { 0x2DC7, 0x2DC7 }, { 0x2DCF, 0x2DCF }, ++ { 0x2DD7, 0x2DD7 }, { 0x2DDF, 0x2DDF }, { 0x2E5E, 0x2E7F }, ++ { 0x2E9A, 0x2E9A }, { 0x2EF4, 0x2EFF }, { 0x2FD6, 0x2FEF }, ++ { 0x3040, 0x3040 }, { 0x3097, 0x3098 }, { 0x3100, 0x3104 }, ++ { 0x3130, 0x3130 }, { 0x318F, 0x318F }, { 0x31E4, 0x31EE }, ++ { 0x321F, 0x321F }, { 0x4DB6, 0x4DBF }, { 0x9FD6, 0x9FFF }, ++ { 0xA48D, 0xA48F }, { 0xA4C7, 0xA4CF }, { 0xA62C, 0xA63F }, ++ { 0xA6F8, 0xA6FF }, { 0xA7CB, 0xA7CF }, { 0xA7D2, 0xA7D2 }, ++ { 0xA7D4, 0xA7D4 }, { 0xA7DA, 0xA7F1 }, { 0xA82D, 0xA82F }, ++ { 0xA83A, 0xA83F }, { 0xA878, 0xA87F }, { 0xA8C6, 0xA8CD }, ++ { 0xA8DA, 0xA8DF }, { 0xA954, 0xA95E }, { 0xA97D, 0xA97F }, ++ { 0xA9CE, 0xA9CE }, { 0xA9DA, 0xA9DD }, { 0xA9FF, 0xA9FF }, ++ { 0xAA37, 0xAA3F }, { 0xAA4E, 0xAA4F }, { 0xAA5A, 0xAA5B }, ++ { 0xAAC3, 0xAADA }, { 0xAAF7, 0xAB00 }, { 0xAB07, 0xAB08 }, ++ { 0xAB0F, 0xAB10 }, { 0xAB17, 0xAB1F }, { 0xAB27, 0xAB27 }, ++ { 0xAB2F, 0xAB2F }, { 0xAB6C, 0xAB6F }, { 0xABEE, 0xABEF }, ++ { 0xABFA, 0xABFF }, { 0xD7A4, 0xD7AF }, { 0xD7C7, 0xD7CA }, ++ { 0xD7FC, 0xDFFF }, { 0xFA6E, 0xFA6F }, { 0xFADA, 0xFAFF }, ++ { 0xFB07, 0xFB12 }, { 0xFB18, 0xFB1C }, { 0xFB37, 0xFB37 }, ++ { 0xFB3D, 0xFB3D }, { 0xFB3F, 0xFB3F }, { 0xFB42, 0xFB42 }, ++ { 0xFB45, 0xFB45 }, { 0xFBC3, 0xFBD2 }, { 0xFD90, 0xFD91 }, ++ { 0xFDC8, 0xFDCE }, { 0xFDD0, 0xFDEF }, { 0xFE1A, 0xFE1F }, ++ { 0xFE53, 0xFE53 }, { 0xFE67, 0xFE67 }, { 0xFE6C, 0xFE6F }, ++ { 0xFE75, 0xFE75 }, { 0xFEFD, 0xFEFE }, { 0xFF00, 0xFF00 }, ++ { 0xFFBF, 0xFFC1 }, { 0xFFC8, 0xFFC9 }, { 0xFFD0, 0xFFD1 }, ++ { 0xFFD8, 0xFFD9 }, { 0xFFDD, 0xFFDF }, { 0xFFE7, 0xFFE7 }, ++ { 0xFFEF, 0xFFF8 }, { 0xFFFE, 0xFFFF }, { 0x1000C, 0x1000C }, ++ { 0x10027, 0x10027 }, { 0x1003B, 0x1003B }, { 0x1003E, 0x1003E }, ++ { 0x1004E, 0x1004F }, { 0x1005E, 0x1007F }, { 0x100FB, 0x100FF }, ++ { 0x10103, 0x10106 }, { 0x10134, 0x10136 }, { 0x1018F, 0x1018F }, ++ { 0x1019D, 0x1019F }, { 0x101A1, 0x101CF }, { 0x101FE, 0x1027F }, ++ { 0x1029D, 0x1029F }, { 0x102D1, 0x102DF }, { 0x102FC, 0x102FF }, ++ { 0x10324, 0x1032C }, { 0x1034B, 0x1034F }, { 0x1037B, 0x1037F }, ++ { 0x1039E, 0x1039E }, { 0x103C4, 0x103C7 }, { 0x103D6, 0x103FF }, ++ { 0x1049E, 0x1049F }, { 0x104AA, 0x104AF }, { 0x104D4, 0x104D7 }, ++ { 0x104FC, 0x104FF }, { 0x10528, 0x1052F }, { 0x10564, 0x1056E }, ++ { 0x1057B, 0x1057B }, { 0x1058B, 0x1058B }, { 0x10593, 0x10593 }, ++ { 0x10596, 0x10596 }, { 0x105A2, 0x105A2 }, { 0x105B2, 0x105B2 }, ++ { 0x105BA, 0x105BA }, { 0x105BD, 0x105FF }, { 0x10737, 0x1073F }, ++ { 0x10756, 0x1075F }, { 0x10768, 0x1077F }, { 0x10786, 0x10786 }, ++ { 0x107B1, 0x107B1 }, { 0x107BB, 0x107FF }, { 0x10806, 0x10807 }, ++ { 0x10809, 0x10809 }, { 0x10836, 0x10836 }, { 0x10839, 0x1083B }, ++ { 0x1083D, 0x1083E }, { 0x10856, 0x10856 }, { 0x1089F, 0x108A6 }, ++ { 0x108B0, 0x108DF }, { 0x108F3, 0x108F3 }, { 0x108F6, 0x108FA }, ++ { 0x1091C, 0x1091E }, { 0x1093A, 0x1093E }, { 0x10940, 0x1097F }, ++ { 0x109B8, 0x109BB }, { 0x109D0, 0x109D1 }, { 0x10A04, 0x10A04 }, ++ { 0x10A07, 0x10A0B }, { 0x10A14, 0x10A14 }, { 0x10A18, 0x10A18 }, ++ { 0x10A36, 0x10A37 }, { 0x10A3B, 0x10A3E }, { 0x10A49, 0x10A4F }, ++ { 0x10A59, 0x10A5F }, { 0x10AA0, 0x10ABF }, { 0x10AE7, 0x10AEA }, ++ { 0x10AF7, 0x10AFF }, { 0x10B36, 0x10B38 }, { 0x10B56, 0x10B57 }, ++ { 0x10B73, 0x10B77 }, { 0x10B92, 0x10B98 }, { 0x10B9D, 0x10BA8 }, ++ { 0x10BB0, 0x10BFF }, { 0x10C49, 0x10C7F }, { 0x10CB3, 0x10CBF }, ++ { 0x10CF3, 0x10CF9 }, { 0x10D28, 0x10D2F }, { 0x10D3A, 0x10E5F }, ++ { 0x10E7F, 0x10E7F }, { 0x10EAA, 0x10EAA }, { 0x10EAE, 0x10EAF }, ++ { 0x10EB2, 0x10EFC }, { 0x10F28, 0x10F2F }, { 0x10F5A, 0x10F6F }, ++ { 0x10F8A, 0x10FAF }, { 0x10FCC, 0x10FDF }, { 0x10FF7, 0x10FFF }, ++ { 0x1104E, 0x11051 }, { 0x11076, 0x1107E }, { 0x110C3, 0x110CC }, ++ { 0x110CE, 0x110CF }, { 0x110E9, 0x110EF }, { 0x110FA, 0x110FF }, ++ { 0x11135, 0x11135 }, { 0x11148, 0x1114F }, { 0x11177, 0x1117F }, ++ { 0x111E0, 0x111E0 }, { 0x111F5, 0x111FF }, { 0x11212, 0x11212 }, ++ { 0x11242, 0x1127F }, { 0x11287, 0x11287 }, { 0x11289, 0x11289 }, ++ { 0x1128E, 0x1128E }, { 0x1129E, 0x1129E }, { 0x112AA, 0x112AF }, ++ { 0x112EB, 0x112EF }, { 0x112FA, 0x112FF }, { 0x11304, 0x11304 }, ++ { 0x1130D, 0x1130E }, { 0x11311, 0x11312 }, { 0x11329, 0x11329 }, ++ { 0x11331, 0x11331 }, { 0x11334, 0x11334 }, { 0x1133A, 0x1133A }, ++ { 0x11345, 0x11346 }, { 0x11349, 0x1134A }, { 0x1134E, 0x1134F }, ++ { 0x11351, 0x11356 }, { 0x11358, 0x1135C }, { 0x11364, 0x11365 }, ++ { 0x1136D, 0x1136F }, { 0x11375, 0x113FF }, { 0x1145C, 0x1145C }, ++ { 0x11462, 0x1147F }, { 0x114C8, 0x114CF }, { 0x114DA, 0x1157F }, ++ { 0x115B6, 0x115B7 }, { 0x115DE, 0x115FF }, { 0x11645, 0x1164F }, ++ { 0x1165A, 0x1165F }, { 0x1166D, 0x1167F }, { 0x116BA, 0x116BF }, ++ { 0x116CA, 0x116FF }, { 0x1171B, 0x1171C }, { 0x1172C, 0x1172F }, ++ { 0x11747, 0x117FF }, { 0x1183C, 0x1189F }, { 0x118F3, 0x118FE }, ++ { 0x11907, 0x11908 }, { 0x1190A, 0x1190B }, { 0x11914, 0x11914 }, ++ { 0x11917, 0x11917 }, { 0x11936, 0x11936 }, { 0x11939, 0x1193A }, ++ { 0x11947, 0x1194F }, { 0x1195A, 0x1199F }, { 0x119A8, 0x119A9 }, ++ { 0x119D8, 0x119D9 }, { 0x119E5, 0x119FF }, { 0x11A48, 0x11A4F }, ++ { 0x11AA3, 0x11AAF }, { 0x11AF9, 0x11AFF }, { 0x11B0A, 0x11BFF }, ++ { 0x11C09, 0x11C09 }, { 0x11C37, 0x11C37 }, { 0x11C46, 0x11C4F }, ++ { 0x11C6D, 0x11C6F }, { 0x11C90, 0x11C91 }, { 0x11CA8, 0x11CA8 }, ++ { 0x11CB7, 0x11CFF }, { 0x11D07, 0x11D07 }, { 0x11D0A, 0x11D0A }, ++ { 0x11D37, 0x11D39 }, { 0x11D3B, 0x11D3B }, { 0x11D3E, 0x11D3E }, ++ { 0x11D48, 0x11D4F }, { 0x11D5A, 0x11D5F }, { 0x11D66, 0x11D66 }, ++ { 0x11D69, 0x11D69 }, { 0x11D8F, 0x11D8F }, { 0x11D92, 0x11D92 }, ++ { 0x11D99, 0x11D9F }, { 0x11DAA, 0x11EDF }, { 0x11EF9, 0x11EFF }, ++ { 0x11F11, 0x11F11 }, { 0x11F3B, 0x11F3D }, { 0x11F5A, 0x11FAF }, ++ { 0x11FB1, 0x11FBF }, { 0x11FF2, 0x11FFE }, { 0x1239A, 0x123FF }, ++ { 0x1246F, 0x1246F }, { 0x12475, 0x1247F }, { 0x12544, 0x12F8F }, ++ { 0x12FF3, 0x12FFF }, { 0x13456, 0x143FF }, { 0x14647, 0x167FF }, ++ { 0x16A39, 0x16A3F }, { 0x16A5F, 0x16A5F }, { 0x16A6A, 0x16A6D }, ++ { 0x16ABF, 0x16ABF }, { 0x16ACA, 0x16ACF }, { 0x16AEE, 0x16AEF }, ++ { 0x16AF6, 0x16AFF }, { 0x16B46, 0x16B4F }, { 0x16B5A, 0x16B5A }, ++ { 0x16B62, 0x16B62 }, { 0x16B78, 0x16B7C }, { 0x16B90, 0x16E3F }, ++ { 0x16E9B, 0x16EFF }, { 0x16F4B, 0x16F4E }, { 0x16F88, 0x16F8E }, ++ { 0x16FA0, 0x16FDF }, { 0x16FE5, 0x16FEF }, { 0x16FF2, 0x187FF }, ++ { 0x18CD6, 0x1AFEF }, { 0x1AFF4, 0x1AFF4 }, { 0x1AFFC, 0x1AFFC }, ++ { 0x1AFFF, 0x1AFFF }, { 0x1B123, 0x1B131 }, { 0x1B133, 0x1B14F }, ++ { 0x1B153, 0x1B154 }, { 0x1B156, 0x1B163 }, { 0x1B168, 0x1B16F }, ++ { 0x1B2FC, 0x1BBFF }, { 0x1BC6B, 0x1BC6F }, { 0x1BC7D, 0x1BC7F }, ++ { 0x1BC89, 0x1BC8F }, { 0x1BC9A, 0x1BC9B }, { 0x1BCA4, 0x1CEFF }, ++ { 0x1CF2E, 0x1CF2F }, { 0x1CF47, 0x1CF4F }, { 0x1CFC4, 0x1CFFF }, ++ { 0x1D0F6, 0x1D0FF }, { 0x1D127, 0x1D128 }, { 0x1D1EB, 0x1D1FF }, ++ { 0x1D246, 0x1D2BF }, { 0x1D2D4, 0x1D2DF }, { 0x1D2F4, 0x1D2FF }, ++ { 0x1D357, 0x1D35F }, { 0x1D379, 0x1D3FF }, { 0x1D455, 0x1D455 }, ++ { 0x1D49D, 0x1D49D }, { 0x1D4A0, 0x1D4A1 }, { 0x1D4A3, 0x1D4A4 }, ++ { 0x1D4A7, 0x1D4A8 }, { 0x1D4AD, 0x1D4AD }, { 0x1D4BA, 0x1D4BA }, ++ { 0x1D4BC, 0x1D4BC }, { 0x1D4C4, 0x1D4C4 }, { 0x1D506, 0x1D506 }, ++ { 0x1D50B, 0x1D50C }, { 0x1D515, 0x1D515 }, { 0x1D51D, 0x1D51D }, ++ { 0x1D53A, 0x1D53A }, { 0x1D53F, 0x1D53F }, { 0x1D545, 0x1D545 }, ++ { 0x1D547, 0x1D549 }, { 0x1D551, 0x1D551 }, { 0x1D6A6, 0x1D6A7 }, ++ { 0x1D7CC, 0x1D7CD }, { 0x1DA8C, 0x1DA9A }, { 0x1DAA0, 0x1DAA0 }, ++ { 0x1DAB0, 0x1DEFF }, { 0x1DF1F, 0x1DF24 }, { 0x1DF2B, 0x1DFFF }, ++ { 0x1E007, 0x1E007 }, { 0x1E019, 0x1E01A }, { 0x1E022, 0x1E022 }, ++ { 0x1E025, 0x1E025 }, { 0x1E02B, 0x1E02F }, { 0x1E06E, 0x1E08E }, ++ { 0x1E090, 0x1E0FF }, { 0x1E12D, 0x1E12F }, { 0x1E13E, 0x1E13F }, ++ { 0x1E14A, 0x1E14D }, { 0x1E150, 0x1E28F }, { 0x1E2AF, 0x1E2BF }, ++ { 0x1E2FA, 0x1E2FE }, { 0x1E300, 0x1E4CF }, { 0x1E4FA, 0x1E7DF }, ++ { 0x1E7E7, 0x1E7E7 }, { 0x1E7EC, 0x1E7EC }, { 0x1E7EF, 0x1E7EF }, ++ { 0x1E7FF, 0x1E7FF }, { 0x1E8C5, 0x1E8C6 }, { 0x1E8D7, 0x1E8FF }, ++ { 0x1E94C, 0x1E94F }, { 0x1E95A, 0x1E95D }, { 0x1E960, 0x1EC70 }, ++ { 0x1ECB5, 0x1ED00 }, { 0x1ED3E, 0x1EDFF }, { 0x1EE04, 0x1EE04 }, ++ { 0x1EE20, 0x1EE20 }, { 0x1EE23, 0x1EE23 }, { 0x1EE25, 0x1EE26 }, ++ { 0x1EE28, 0x1EE28 }, { 0x1EE33, 0x1EE33 }, { 0x1EE38, 0x1EE38 }, ++ { 0x1EE3A, 0x1EE3A }, { 0x1EE3C, 0x1EE41 }, { 0x1EE43, 0x1EE46 }, ++ { 0x1EE48, 0x1EE48 }, { 0x1EE4A, 0x1EE4A }, { 0x1EE4C, 0x1EE4C }, ++ { 0x1EE50, 0x1EE50 }, { 0x1EE53, 0x1EE53 }, { 0x1EE55, 0x1EE56 }, ++ { 0x1EE58, 0x1EE58 }, { 0x1EE5A, 0x1EE5A }, { 0x1EE5C, 0x1EE5C }, ++ { 0x1EE5E, 0x1EE5E }, { 0x1EE60, 0x1EE60 }, { 0x1EE63, 0x1EE63 }, ++ { 0x1EE65, 0x1EE66 }, { 0x1EE6B, 0x1EE6B }, { 0x1EE73, 0x1EE73 }, ++ { 0x1EE78, 0x1EE78 }, { 0x1EE7D, 0x1EE7D }, { 0x1EE7F, 0x1EE7F }, ++ { 0x1EE8A, 0x1EE8A }, { 0x1EE9C, 0x1EEA0 }, { 0x1EEA4, 0x1EEA4 }, ++ { 0x1EEAA, 0x1EEAA }, { 0x1EEBC, 0x1EEEF }, { 0x1EEF2, 0x1EFFF }, ++ { 0x1F02C, 0x1F02F }, { 0x1F094, 0x1F09F }, { 0x1F0AF, 0x1F0B0 }, ++ { 0x1F0C0, 0x1F0C0 }, { 0x1F0D0, 0x1F0D0 }, { 0x1F0F6, 0x1F0FF }, ++ { 0x1F1AE, 0x1F1E5 }, { 0x1F203, 0x1F20F }, { 0x1F23C, 0x1F23F }, ++ { 0x1F249, 0x1F24F }, { 0x1F252, 0x1F25F }, { 0x1F266, 0x1F2FF }, ++ { 0x1F6D8, 0x1F6DB }, { 0x1F6ED, 0x1F6EF }, { 0x1F6FD, 0x1F6FF }, ++ { 0x1F777, 0x1F77A }, { 0x1F7DA, 0x1F7DF }, { 0x1F7EC, 0x1F7EF }, ++ { 0x1F7F1, 0x1F7FF }, { 0x1F80C, 0x1F80F }, { 0x1F848, 0x1F84F }, ++ { 0x1F85A, 0x1F85F }, { 0x1F888, 0x1F88F }, { 0x1F8AE, 0x1F8AF }, ++ { 0x1F8B2, 0x1F8FF }, { 0x1FA54, 0x1FA5F }, { 0x1FA6E, 0x1FA6F }, ++ { 0x1FA7D, 0x1FA7F }, { 0x1FA89, 0x1FA8F }, { 0x1FABE, 0x1FABE }, ++ { 0x1FAC6, 0x1FACD }, { 0x1FADC, 0x1FADF }, { 0x1FAE9, 0x1FAEF }, ++ { 0x1FAF9, 0x1FAFF }, { 0x1FB93, 0x1FB93 }, { 0x1FBCB, 0x1FBEF }, ++ { 0x1FBFA, 0x1FFFF }, { 0x2A6D7, 0x2F7FF }, { 0x2FA1E, 0xE0000 }, ++ { 0xE0002, 0xE001F }, { 0xE0080, 0xE00FF }, { 0xE01F0, 0x10FFFD } ++ }; ++ /* *INDENT-ON* */ + +- /* binary search in table of non-spacing characters */ +- if (bisearch(ucs, combining, +- sizeof(combining) / sizeof(struct interval) - 1)) +- return 0; +- +- /* if we arrive here, ucs is not a combining or C0/C1 control character */ +- +- return 1 + +- (ucs >= 0x1100 && +- (ucs <= 0x115f || /* Hangul Jamo init. consonants */ +- ucs == 0x2329 || ucs == 0x232a || +- (ucs >= 0x2e80 && ucs <= 0xa4cf && +- ucs != 0x303f) /* CJK ... Yi */ +- || (ucs >= 0xac00 && ucs <= 0xd7a3) /* Hangul Syllables */ +- || (ucs >= 0xf900 && ucs <= 0xfaff) /* CJK Compatibility Ideographs */ +- || (ucs >= 0xfe10 && ucs <= 0xfe19) /* Vertical forms */ +- || (ucs >= 0xfe30 && ucs <= 0xfe6f) /* CJK Compatibility Forms */ +- || (ucs >= 0xff00 && ucs <= 0xff60) /* Fullwidth Forms */ +- || (ucs >= 0xffe0 && ucs <= 0xffe6) +-#if !defined(SIZEOF_WCHAR_T) || (SIZEOF_WCHAR_T >= 4) +- || (ucs >= 0x20000 && ucs <= 0x2fffd) +- || (ucs >= 0x30000 && ucs <= 0x3fffd) +-#endif +- )); ++ /* sorted list of non-overlapping intervals of non-characters */ ++ /* generated by ++ * uniset +WIDTH-W -cat=Cn -cat=Mn c ++ */ ++ /* *INDENT-OFF* */ ++ /* generated by run-uniset_dbl 1.2 */ ++ static const struct interval doublewidth[] = { ++ { 0x1100, 0x115F }, { 0x231A, 0x231B }, { 0x2329, 0x232A }, ++ { 0x23E9, 0x23EC }, { 0x23F0, 0x23F0 }, { 0x23F3, 0x23F3 }, ++ { 0x25FD, 0x25FE }, { 0x2614, 0x2615 }, { 0x2648, 0x2653 }, ++ { 0x267F, 0x267F }, { 0x2693, 0x2693 }, { 0x26A1, 0x26A1 }, ++ { 0x26AA, 0x26AB }, { 0x26BD, 0x26BE }, { 0x26C4, 0x26C5 }, ++ { 0x26CE, 0x26CE }, { 0x26D4, 0x26D4 }, { 0x26EA, 0x26EA }, ++ { 0x26F2, 0x26F3 }, { 0x26F5, 0x26F5 }, { 0x26FA, 0x26FA }, ++ { 0x26FD, 0x26FD }, { 0x2705, 0x2705 }, { 0x270A, 0x270B }, ++ { 0x2728, 0x2728 }, { 0x274C, 0x274C }, { 0x274E, 0x274E }, ++ { 0x2753, 0x2755 }, { 0x2757, 0x2757 }, { 0x2795, 0x2797 }, ++ { 0x27B0, 0x27B0 }, { 0x27BF, 0x27BF }, { 0x2B1B, 0x2B1C }, ++ { 0x2B50, 0x2B50 }, { 0x2B55, 0x2B55 }, { 0x2E80, 0x2E99 }, ++ { 0x2E9B, 0x2EF3 }, { 0x2F00, 0x2FD5 }, { 0x2FF0, 0x3029 }, ++ { 0x302E, 0x303E }, { 0x3041, 0x3096 }, { 0x309B, 0x30FF }, ++ { 0x3105, 0x312F }, { 0x3131, 0x318E }, { 0x3190, 0x31E3 }, ++ { 0x31EF, 0x321E }, { 0x3220, 0x3247 }, { 0x3250, 0x4DBF }, ++ { 0x4E00, 0xA48C }, { 0xA490, 0xA4C6 }, { 0xA960, 0xA97C }, ++ { 0xAC00, 0xD7A3 }, { 0xF900, 0xFAFF }, { 0xFE10, 0xFE19 }, ++ { 0xFE30, 0xFE52 }, { 0xFE54, 0xFE66 }, { 0xFE68, 0xFE6B }, ++ { 0xFF01, 0xFF60 }, { 0xFFE0, 0xFFE6 }, { 0x16FE0, 0x16FE3 }, ++ { 0x16FF0, 0x16FF1 }, { 0x17000, 0x187F7 }, { 0x18800, 0x18CD5 }, ++ { 0x18D00, 0x18D08 }, { 0x1AFF0, 0x1AFF3 }, { 0x1AFF5, 0x1AFFB }, ++ { 0x1AFFD, 0x1AFFE }, { 0x1B000, 0x1B122 }, { 0x1B132, 0x1B132 }, ++ { 0x1B150, 0x1B152 }, { 0x1B155, 0x1B155 }, { 0x1B164, 0x1B167 }, ++ { 0x1B170, 0x1B2FB }, { 0x1F004, 0x1F004 }, { 0x1F0CF, 0x1F0CF }, ++ { 0x1F18E, 0x1F18E }, { 0x1F191, 0x1F19A }, { 0x1F200, 0x1F202 }, ++ { 0x1F210, 0x1F23B }, { 0x1F240, 0x1F248 }, { 0x1F250, 0x1F251 }, ++ { 0x1F260, 0x1F265 }, { 0x1F300, 0x1F320 }, { 0x1F32D, 0x1F335 }, ++ { 0x1F337, 0x1F37C }, { 0x1F37E, 0x1F393 }, { 0x1F3A0, 0x1F3CA }, ++ { 0x1F3CF, 0x1F3D3 }, { 0x1F3E0, 0x1F3F0 }, { 0x1F3F4, 0x1F3F4 }, ++ { 0x1F3F8, 0x1F43E }, { 0x1F440, 0x1F440 }, { 0x1F442, 0x1F4FC }, ++ { 0x1F4FF, 0x1F53D }, { 0x1F54B, 0x1F54E }, { 0x1F550, 0x1F567 }, ++ { 0x1F57A, 0x1F57A }, { 0x1F595, 0x1F596 }, { 0x1F5A4, 0x1F5A4 }, ++ { 0x1F5FB, 0x1F64F }, { 0x1F680, 0x1F6C5 }, { 0x1F6CC, 0x1F6CC }, ++ { 0x1F6D0, 0x1F6D2 }, { 0x1F6D5, 0x1F6D7 }, { 0x1F6DC, 0x1F6DF }, ++ { 0x1F6EB, 0x1F6EC }, { 0x1F6F4, 0x1F6FC }, { 0x1F7E0, 0x1F7EB }, ++ { 0x1F7F0, 0x1F7F0 }, { 0x1F90C, 0x1F93A }, { 0x1F93C, 0x1F945 }, ++ { 0x1F947, 0x1F9FF }, { 0x1FA70, 0x1FA7C }, { 0x1FA80, 0x1FA88 }, ++ { 0x1FA90, 0x1FABD }, { 0x1FABF, 0x1FAC5 }, { 0x1FACE, 0x1FADB }, ++ { 0x1FAE0, 0x1FAE8 }, { 0x1FAF0, 0x1FAF8 }, { 0x20000, 0x2FFFD }, ++ { 0x30000, 0x3FFFD } ++ }; ++ /* *INDENT-ON* */ ++ ++ int result; ++ ++#define Lookup(cmp, table) \ ++ bisearch(cmp, table, \ ++ (int) (sizeof(table) / sizeof(struct interval) - 1)) ++ ++ /* test for 8-bit control characters */ ++ if (cmp == 0) { ++ result = 0; ++ } else if (cmp < 32 || (cmp >= 0x7f && cmp < 0xa0)) { ++ result = -1; ++ } else if (cmp == 0xad) { ++ result = use_latin1; ++ } else if (Lookup(cmp, formatting)) { ++ /* treat formatting characters like control characters */ ++ result = -1; ++ } else if (Lookup(cmp, combining)) { ++ /* binary search in table of non-spacing characters */ ++ result = 0; ++ } else { ++ /* if we arrive here, cmp is not a combining or C0/C1 control character */ ++ result = 1; ++ ++ if (Lookup(cmp, doublewidth)) { ++ result = 2; ++ } else if (cmp >= unknowns[0].first && Lookup(cmp, unknowns)) { ++ result = -1; ++ } ++ } ++ return result; + } + + +-NCURSES_EXPORT(int) mk_wcswidth(const wchar_t *pwcs, size_t n) ++NCURSES_EXPORT(int) mk_wcswidth(const uint32_t *pwcs, size_t n) + { +- int w, width = 0; ++ int width = 0; ++ ++ for (; *pwcs && n-- > 0; pwcs++) { ++ int w; + +- for (;*pwcs && n-- > 0; pwcs++) + if ((w = mk_wcwidth(*pwcs)) < 0) + return -1; + else + width += w; ++ } + + return width; + } +@@ -233,17 +700,31 @@ + + /* + * The following functions are the same as mk_wcwidth() and +- * mk_wcswidth(), except that spacing characters in the East Asian ++ * mk_wcwidth_cjk(), except that spacing characters in the East Asian + * Ambiguous (A) category as defined in Unicode Technical Report #11 + * have a column width of 2. This variant might be useful for users of + * CJK legacy encodings who want to migrate to UCS without changing + * the traditional terminal character-width behaviour. It is not + * otherwise recommended for general use. + */ +-NCURSES_EXPORT(int) mk_wcwidth_cjk(wchar_t ucs) ++NCURSES_EXPORT(int) mk_wcwidth_cjk(uint32_t ucs) + { + /* sorted list of non-overlapping intervals of East Asian Ambiguous +- * characters, generated by "uniset +WIDTH-A -cat=Me -cat=Mn -cat=Cf c" */ ++ * characters, generated by ++ * ++ * uniset +WIDTH-A -cat=Me -cat=Mn -cat=Cf \ ++ * +E000..F8FF \ ++ * +F0000..FFFFD \ ++ * +100000..10FFFD c ++ * ++ * "WIDTH-A" is a file extracted from EastAsianWidth.txt by selecting ++ * only those with width "A", and omitting: ++ * ++ * 0xAD ++ * all lines with "COMBINING" ++ */ ++ /* *INDENT-OFF* */ ++ /* generated by run-uniset_cjk 1.5 */ + static const struct interval ambiguous[] = { + { 0x00A1, 0x00A1 }, { 0x00A4, 0x00A4 }, { 0x00A7, 0x00A8 }, + { 0x00AA, 0x00AA }, { 0x00AE, 0x00AE }, { 0x00B0, 0x00B4 }, +@@ -274,49 +755,59 @@ + { 0x2113, 0x2113 }, { 0x2116, 0x2116 }, { 0x2121, 0x2122 }, + { 0x2126, 0x2126 }, { 0x212B, 0x212B }, { 0x2153, 0x2154 }, + { 0x215B, 0x215E }, { 0x2160, 0x216B }, { 0x2170, 0x2179 }, +- { 0x2190, 0x2199 }, { 0x21B8, 0x21B9 }, { 0x21D2, 0x21D2 }, +- { 0x21D4, 0x21D4 }, { 0x21E7, 0x21E7 }, { 0x2200, 0x2200 }, +- { 0x2202, 0x2203 }, { 0x2207, 0x2208 }, { 0x220B, 0x220B }, +- { 0x220F, 0x220F }, { 0x2211, 0x2211 }, { 0x2215, 0x2215 }, +- { 0x221A, 0x221A }, { 0x221D, 0x2220 }, { 0x2223, 0x2223 }, +- { 0x2225, 0x2225 }, { 0x2227, 0x222C }, { 0x222E, 0x222E }, +- { 0x2234, 0x2237 }, { 0x223C, 0x223D }, { 0x2248, 0x2248 }, +- { 0x224C, 0x224C }, { 0x2252, 0x2252 }, { 0x2260, 0x2261 }, +- { 0x2264, 0x2267 }, { 0x226A, 0x226B }, { 0x226E, 0x226F }, +- { 0x2282, 0x2283 }, { 0x2286, 0x2287 }, { 0x2295, 0x2295 }, +- { 0x2299, 0x2299 }, { 0x22A5, 0x22A5 }, { 0x22BF, 0x22BF }, +- { 0x2312, 0x2312 }, { 0x2460, 0x24E9 }, { 0x24EB, 0x254B }, +- { 0x2550, 0x2573 }, { 0x2580, 0x258F }, { 0x2592, 0x2595 }, +- { 0x25A0, 0x25A1 }, { 0x25A3, 0x25A9 }, { 0x25B2, 0x25B3 }, +- { 0x25B6, 0x25B7 }, { 0x25BC, 0x25BD }, { 0x25C0, 0x25C1 }, +- { 0x25C6, 0x25C8 }, { 0x25CB, 0x25CB }, { 0x25CE, 0x25D1 }, +- { 0x25E2, 0x25E5 }, { 0x25EF, 0x25EF }, { 0x2605, 0x2606 }, +- { 0x2609, 0x2609 }, { 0x260E, 0x260F }, { 0x2614, 0x2615 }, ++ { 0x2189, 0x2189 }, { 0x2190, 0x2199 }, { 0x21B8, 0x21B9 }, ++ { 0x21D2, 0x21D2 }, { 0x21D4, 0x21D4 }, { 0x21E7, 0x21E7 }, ++ { 0x2200, 0x2200 }, { 0x2202, 0x2203 }, { 0x2207, 0x2208 }, ++ { 0x220B, 0x220B }, { 0x220F, 0x220F }, { 0x2211, 0x2211 }, ++ { 0x2215, 0x2215 }, { 0x221A, 0x221A }, { 0x221D, 0x2220 }, ++ { 0x2223, 0x2223 }, { 0x2225, 0x2225 }, { 0x2227, 0x222C }, ++ { 0x222E, 0x222E }, { 0x2234, 0x2237 }, { 0x223C, 0x223D }, ++ { 0x2248, 0x2248 }, { 0x224C, 0x224C }, { 0x2252, 0x2252 }, ++ { 0x2260, 0x2261 }, { 0x2264, 0x2267 }, { 0x226A, 0x226B }, ++ { 0x226E, 0x226F }, { 0x2282, 0x2283 }, { 0x2286, 0x2287 }, ++ { 0x2295, 0x2295 }, { 0x2299, 0x2299 }, { 0x22A5, 0x22A5 }, ++ { 0x22BF, 0x22BF }, { 0x2312, 0x2312 }, { 0x2460, 0x24E9 }, ++ { 0x24EB, 0x254B }, { 0x2550, 0x2573 }, { 0x2580, 0x258F }, ++ { 0x2592, 0x2595 }, { 0x25A0, 0x25A1 }, { 0x25A3, 0x25A9 }, ++ { 0x25B2, 0x25B3 }, { 0x25B6, 0x25B7 }, { 0x25BC, 0x25BD }, ++ { 0x25C0, 0x25C1 }, { 0x25C6, 0x25C8 }, { 0x25CB, 0x25CB }, ++ { 0x25CE, 0x25D1 }, { 0x25E2, 0x25E5 }, { 0x25EF, 0x25EF }, ++ { 0x2605, 0x2606 }, { 0x2609, 0x2609 }, { 0x260E, 0x260F }, + { 0x261C, 0x261C }, { 0x261E, 0x261E }, { 0x2640, 0x2640 }, + { 0x2642, 0x2642 }, { 0x2660, 0x2661 }, { 0x2663, 0x2665 }, + { 0x2667, 0x266A }, { 0x266C, 0x266D }, { 0x266F, 0x266F }, +- { 0x273D, 0x273D }, { 0x2776, 0x277F }, { 0xE000, 0xF8FF }, +- { 0xFFFD, 0xFFFD }, { 0xF0000, 0xFFFFD }, { 0x100000, 0x10FFFD } ++ { 0x269E, 0x269F }, { 0x26BF, 0x26BF }, { 0x26C6, 0x26CD }, ++ { 0x26CF, 0x26D3 }, { 0x26D5, 0x26E1 }, { 0x26E3, 0x26E3 }, ++ { 0x26E8, 0x26E9 }, { 0x26EB, 0x26F1 }, { 0x26F4, 0x26F4 }, ++ { 0x26F6, 0x26F9 }, { 0x26FB, 0x26FC }, { 0x26FE, 0x26FF }, ++ { 0x273D, 0x273D }, { 0x2776, 0x277F }, { 0x2B56, 0x2B59 }, ++ { 0x3248, 0x324F }, { 0xE000, 0xF8FF }, { 0xFFFD, 0xFFFD }, ++ { 0x1F100, 0x1F10A }, { 0x1F110, 0x1F12D }, { 0x1F130, 0x1F169 }, ++ { 0x1F170, 0x1F18D }, { 0x1F18F, 0x1F190 }, { 0x1F19B, 0x1F1AC }, ++ { 0xF0000, 0xFFFFD }, { 0x100000, 0x10FFFD } + }; ++ /* *INDENT-ON* */ + + /* binary search in table of non-spacing characters */ +- if (bisearch(ucs, ambiguous, +- sizeof(ambiguous) / sizeof(struct interval) - 1)) ++ if (Lookup((unsigned long) ucs, ambiguous)) + return 2; + + return mk_wcwidth(ucs); + } + + +-NCURSES_EXPORT(int) mk_wcswidth_cjk(const wchar_t *pwcs, size_t n) ++NCURSES_EXPORT(int) mk_wcswidth_cjk(const uint32_t *pwcs, size_t n) + { +- int w, width = 0; ++ int width = 0; ++ ++ for (; *pwcs && n-- > 0; pwcs++) { ++ int w; + +- for (;*pwcs && n-- > 0; pwcs++) + if ((w = mk_wcwidth_cjk(*pwcs)) < 0) + return -1; + else + width += w; ++ } + + return width; + } +Index: ncurses/win32con/wcwidth.c +Prereq: 1.4 +--- ncurses-6.5-20240427+/ncurses/win32con/wcwidth.c 2020-07-11 21:02:10.000000000 +0000 ++++ ncurses-6.5-20240504/ncurses/win32con/wcwidth.c 2024-05-04 18:31:39.000000000 +0000 +@@ -1,5 +1,5 @@ + /**************************************************************************** +- * Copyright 2020 Thomas E. Dickey * ++ * Copyright 2020,2024 Thomas E. Dickey * + * Copyright 2010 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * +@@ -28,7 +28,7 @@ + ****************************************************************************/ + #include + +-MODULE_ID("$Id: wcwidth.c,v 1.4 2020/07/11 21:02:10 tom Exp $") ++MODULE_ID("$Id: wcwidth.c,v 1.5 2024/05/04 18:31:39 tom Exp $") + + #if USE_WIDEC_SUPPORT + #define mk_wcwidth(ucs) _nc_wcwidth(ucs) +@@ -36,10 +36,11 @@ + #define mk_wcwidth_cjk(ucs) _nc_wcwidth_cjk(ucs) + #define mk_wcswidth_cjk(pwcs, n) _nc_wcswidth_cjk(pwcs, n) + +-NCURSES_EXPORT(int) mk_wcwidth(wchar_t); +-NCURSES_EXPORT(int) mk_wcswidth(const wchar_t *, size_t); +-NCURSES_EXPORT(int) mk_wcwidth_cjk(wchar_t); +-NCURSES_EXPORT(int) mk_wcswidth_cjk(const wchar_t *, size_t); ++NCURSES_EXPORT(void) mk_wcwidth_init(int); ++NCURSES_EXPORT(int) mk_wcwidth(uint32_t); ++NCURSES_EXPORT(int) mk_wcswidth(const uint32_t *, size_t); ++NCURSES_EXPORT(int) mk_wcwidth_cjk(uint32_t); ++NCURSES_EXPORT(int) mk_wcswidth_cjk(const uint32_t *, size_t); + + #include + #else +Index: package/debian-mingw/changelog +--- ncurses-6.5-20240427+/package/debian-mingw/changelog 2024-04-27 13:56:53.000000000 +0000 ++++ ncurses-6.5-20240504/package/debian-mingw/changelog 2024-05-04 10:21:09.000000000 +0000 +@@ -1,8 +1,8 @@ +-ncurses6 (6.5+20240427) unstable; urgency=low ++ncurses6 (6.5+20240504) unstable; urgency=low + + * latest weekly patch + +- -- Thomas E. Dickey Sat, 27 Apr 2024 09:56:53 -0400 ++ -- Thomas E. Dickey Sat, 04 May 2024 06:21:09 -0400 + + ncurses6 (5.9+20131005) unstable; urgency=low + +Index: package/debian-mingw64/changelog +--- ncurses-6.5-20240427+/package/debian-mingw64/changelog 2024-04-27 13:56:53.000000000 +0000 ++++ ncurses-6.5-20240504/package/debian-mingw64/changelog 2024-05-04 10:21:09.000000000 +0000 +@@ -1,8 +1,8 @@ +-ncurses6 (6.5+20240427) unstable; urgency=low ++ncurses6 (6.5+20240504) unstable; urgency=low + + * latest weekly patch + +- -- Thomas E. Dickey Sat, 27 Apr 2024 09:56:53 -0400 ++ -- Thomas E. Dickey Sat, 04 May 2024 06:21:09 -0400 + + ncurses6 (5.9+20131005) unstable; urgency=low + +Index: package/debian/changelog +--- ncurses-6.5-20240427+/package/debian/changelog 2024-04-27 13:56:53.000000000 +0000 ++++ ncurses-6.5-20240504/package/debian/changelog 2024-05-04 10:21:09.000000000 +0000 +@@ -1,8 +1,8 @@ +-ncurses6 (6.5+20240427) unstable; urgency=low ++ncurses6 (6.5+20240504) unstable; urgency=low + + * latest weekly patch + +- -- Thomas E. Dickey Sat, 27 Apr 2024 09:56:53 -0400 ++ -- Thomas E. Dickey Sat, 04 May 2024 06:21:09 -0400 + + ncurses6 (5.9+20120608) unstable; urgency=low + +Index: package/mingw-ncurses.nsi +Prereq: 1.645 +--- ncurses-6.5-20240427+/package/mingw-ncurses.nsi 2024-04-27 13:56:53.000000000 +0000 ++++ ncurses-6.5-20240504/package/mingw-ncurses.nsi 2024-05-04 10:21:09.000000000 +0000 +@@ -1,4 +1,4 @@ +-; $Id: mingw-ncurses.nsi,v 1.645 2024/04/27 13:56:53 tom Exp $ ++; $Id: mingw-ncurses.nsi,v 1.646 2024/05/04 10:21:09 tom Exp $ + + ; TODO add examples + ; TODO bump ABI to 6 +@@ -10,7 +10,7 @@ + !define VERSION_MAJOR "6" + !define VERSION_MINOR "5" + !define VERSION_YYYY "2024" +-!define VERSION_MMDD "0427" ++!define VERSION_MMDD "0504" + !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD} + + !define MY_ABI "5" +Index: package/mingw-ncurses.spec +--- ncurses-6.5-20240427+/package/mingw-ncurses.spec 2024-04-27 13:56:53.000000000 +0000 ++++ ncurses-6.5-20240504/package/mingw-ncurses.spec 2024-05-04 10:21:09.000000000 +0000 +@@ -3,7 +3,7 @@ + Summary: shared libraries for terminal handling + Name: mingw32-ncurses6 + Version: 6.5 +-Release: 20240427 ++Release: 20240504 + License: X11 + Group: Development/Libraries + URL: https://invisible-island.net/ncurses/ +Index: package/ncurses.spec +--- ncurses-6.5-20240427+/package/ncurses.spec 2024-04-27 13:56:53.000000000 +0000 ++++ ncurses-6.5-20240504/package/ncurses.spec 2024-05-04 10:21:09.000000000 +0000 +@@ -1,7 +1,7 @@ + Summary: shared libraries for terminal handling + Name: ncurses6 + Version: 6.5 +-Release: 20240427 ++Release: 20240504 + License: X11 + Group: Development/Libraries + URL: https://invisible-island.net/ncurses/ +Index: package/ncursest.spec +--- ncurses-6.5-20240427+/package/ncursest.spec 2024-04-27 13:56:53.000000000 +0000 ++++ ncurses-6.5-20240504/package/ncursest.spec 2024-05-04 10:21:09.000000000 +0000 +@@ -1,7 +1,7 @@ + Summary: Curses library with POSIX thread support. + Name: ncursest6 + Version: 6.5 +-Release: 20240427 ++Release: 20240504 + License: X11 + Group: Development/Libraries + Source: ncurses-%{version}-%{release}.tgz diff --git a/packages/ncurses/6.5/ncurses-6.5-20240511.patch b/packages/ncurses/6.5/ncurses-6.5-20240511.patch new file mode 100644 index 0000000000..88a9dc7a7b --- /dev/null +++ b/packages/ncurses/6.5/ncurses-6.5-20240511.patch @@ -0,0 +1,8153 @@ +# ncurses 6.5 - patch 20240511 - Thomas E. Dickey +# +# ------------------------------------------------------------------------------ +# +# Ncurses 6.5 is at +# https://invisible-island.net/archives/ncurses/ +# https://invisible-mirror.net/archives/ncurses/ +# https://ftp.gnu.org/gnu/ncurses/ +# +# Patches for ncurses 6.5 can be found at +# https://invisible-island.net/archives/ncurses/6.5 +# https://invisible-mirror.net/archives/ncurses/6.5 +# +# ------------------------------------------------------------------------------ +# https://invisible-island.net/archives/ncurses/6.5/ncurses-6.5-20240511.patch.gz +# patch by Thomas E. Dickey +# created Sun May 12 00:16:58 UTC 2024 +# ------------------------------------------------------------------------------ +# NEWS | 9 +# VERSION | 2 +# dist.mk | 4 +# doc/html/man/curs_add_wch.3x.html | 270 +++++++------ +# doc/html/man/curs_add_wchstr.3x.html | 63 +-- +# doc/html/man/curs_addch.3x.html | 236 ++++++----- +# doc/html/man/curs_addchstr.3x.html | 51 +- +# doc/html/man/curs_attr.3x.html | 13 +# doc/html/man/curs_delch.3x.html | 30 - +# doc/html/man/curs_get_wch.3x.html | 71 +-- +# doc/html/man/curs_getch.3x.html | 128 +++--- +# doc/html/man/curs_getstr.3x.html | 10 +# doc/html/man/curs_getyx.3x.html | 68 +-- +# doc/html/man/curs_inch.3x.html | 90 +--- +# doc/html/man/curs_mouse.3x.html | 20 +# doc/html/man/curs_outopts.3x.html | 32 - +# doc/html/man/curs_sp_funcs.3x.html | 8 +# doc/html/man/curs_termattrs.3x.html | 12 +# doc/html/man/curs_util.3x.html | 165 ++++---- +# doc/html/man/infocmp.1m.html | 8 +# doc/html/man/infotocap.1m.html | 8 +# doc/html/man/ncurses.3x.html | 673 ++++++++++++++++----------------- +# doc/html/man/ncursesw6-config.1.html | 8 +# doc/html/man/term.5.html | 233 +++++------ +# doc/html/man/term.7.html | 8 +# doc/html/man/terminfo.5.html | 10 +# doc/html/man/tic.1m.html | 8 +# doc/html/man/toe.1m.html | 8 +# doc/html/man/tput.1.html | 8 +# doc/html/man/tset.1.html | 8 +# man/MKncu_config.in | 4 +# man/curs_add_wch.3x | 312 +++++++++------ +# man/curs_add_wchstr.3x | 95 ++-- +# man/curs_addch.3x | 148 +++---- +# man/curs_addchstr.3x | 89 ++-- +# man/curs_attr.3x | 14 +# man/curs_delch.3x | 17 +# man/curs_get_wch.3x | 51 +- +# man/curs_getch.3x | 120 +++-- +# man/curs_getstr.3x | 6 +# man/curs_getyx.3x | 139 ++++-- +# man/curs_inch.3x | 123 +++--- +# man/curs_mouse.3x | 13 +# man/curs_outopts.3x | 28 - +# man/curs_sp_funcs.3x | 4 +# man/curs_termattrs.3x | 6 +# man/curs_util.3x | 9 +# man/infocmp.1m | 7 +# man/infotocap.1m | 7 +# man/man_db.renames.in | 6 +# man/manhtml.aliases | 7 +# man/manhtml.externs | 3 +# man/ncurses.3x | 188 +++++---- +# man/term.5 | 427 +++++++++++++------- +# man/term.7 | 11 +# man/terminfo.head | 7 +# man/terminfo.tail | 8 +# man/tic.1m | 16 +# man/toe.1m | 7 +# man/tput.1 | 7 +# man/tset.1 | 7 +# ncurses/base/lib_newterm.c | 5 +# ncurses/curses.priv.h | 8 +# ncurses/tinfo/lib_setup.c | 6 +# ncurses/tinfo/tinfo_driver.c | 8 +# package/debian-mingw/changelog | 4 +# package/debian-mingw64/changelog | 4 +# package/debian/changelog | 4 +# package/mingw-ncurses.nsi | 4 +# package/mingw-ncurses.spec | 2 +# package/ncurses.spec | 2 +# package/ncursest.spec | 2 +# 72 files changed, 2329 insertions(+), 1868 deletions(-) +# ------------------------------------------------------------------------------ +Index: NEWS +Prereq: 1.4117 +--- ncurses-6.5-20240504+/NEWS 2024-05-04 18:43:01.000000000 +0000 ++++ ncurses-6.5-20240511/NEWS 2024-05-11 21:38:14.000000000 +0000 +@@ -26,7 +26,7 @@ + -- sale, use or other dealings in this Software without prior written -- + -- authorization. -- + ------------------------------------------------------------------------------- +--- $Id: NEWS,v 1.4117 2024/05/04 18:43:01 tom Exp $ ++-- $Id: NEWS,v 1.4119 2024/05/11 21:38:14 tom Exp $ + ------------------------------------------------------------------------------- + + This is a log of changes that ncurses has gone through since Zeyd started +@@ -46,6 +46,13 @@ + Changes through 1.9.9e did not credit all contributions; + it is not possible to add this information. + ++20240511 ++ + improve formatting/style of manpages (patches by Branden Robinson). ++ + limit value from ESCDELAY environment variable to 30 seconds, like ++ other delay limits. ++ + limit values from LINES and COLUMNS environment variables to 512 ++ (report by Miroslav Lichvar). ++ + 20240504 + + update ncurses/wcwidth.c, for MinGW ports, from xterm. + + trim obsolete comment about tack from INSTALL. +Index: VERSION +--- ncurses-6.5-20240504+/VERSION 2024-05-04 10:21:09.000000000 +0000 ++++ ncurses-6.5-20240511/VERSION 2024-05-11 10:20:08.000000000 +0000 +@@ -1 +1 @@ +-5:0:10 6.5 20240504 ++5:0:10 6.5 20240511 +Index: dist.mk +Prereq: 1.1611 +--- ncurses-6.5-20240504+/dist.mk 2024-05-04 10:21:09.000000000 +0000 ++++ ncurses-6.5-20240511/dist.mk 2024-05-11 10:20:08.000000000 +0000 +@@ -26,7 +26,7 @@ + # use or other dealings in this Software without prior written # + # authorization. # + ############################################################################## +-# $Id: dist.mk,v 1.1611 2024/05/04 10:21:09 tom Exp $ ++# $Id: dist.mk,v 1.1612 2024/05/11 10:20:08 tom Exp $ + # Makefile for creating ncurses distributions. + # + # This only needs to be used directly as a makefile by developers, but +@@ -38,7 +38,7 @@ + # These define the major/minor/patch versions of ncurses. + NCURSES_MAJOR = 6 + NCURSES_MINOR = 5 +-NCURSES_PATCH = 20240504 ++NCURSES_PATCH = 20240511 + + # We don't append the patch to the version, since this only applies to releases + VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) +Index: doc/html/man/curs_add_wch.3x.html +--- ncurses-6.5-20240504+/doc/html/man/curs_add_wch.3x.html 2024-04-27 18:38:45.000000000 +0000 ++++ ncurses-6.5-20240511/doc/html/man/curs_add_wch.3x.html 2024-05-11 22:32:32.000000000 +0000 +@@ -28,19 +28,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: curs_add_wch.3x,v 1.62 2024/04/20 21:20:07 tom Exp @ ++ * @Id: curs_add_wch.3x,v 1.63 2024/05/11 21:31:45 tom Exp @ + --> + + + + + +-curs_add_wch 3x 2024-04-20 ncurses 6.5 Library calls ++curs_add_wch 3x 2024-05-11 ncurses 6.5 Library calls + + + + +-

curs_add_wch 3x 2024-04-20 ncurses 6.5 Library calls

++

curs_add_wch 3x 2024-05-11 ncurses 6.5 Library calls

+
+ curs_add_wch(3x)                 Library calls                curs_add_wch(3x)
+ 
+@@ -49,7 +49,7 @@
+ 
+ 

NAME

+        add_wch, wadd_wch, mvadd_wch, mvwadd_wch, echo_wchar, wecho_wchar - add
+-       a curses complex character to a window and advance the cursor
++       a curses complex character to a window, possibly advancing the cursor
+ 
+ 
+ 

SYNOPSIS

+@@ -66,55 +66,85 @@
+ 
+ 

DESCRIPTION

+ 
+-

add_wch

+-       The add_wch, wadd_wch, mvadd_wch,  and  mvwadd_wch  functions  put  the
+-       complex  character  wch  into the given window at its current position,
+-       which is then advanced.  These functions perform wrapping and  special-
+-       character processing as follows:
+-
+-       o   If  wch  refers to a spacing character, then any previous character
+-           at that location is removed.  A new character specified by  wch  is
+-           placed  at  that  location  with  rendition  specified by wch.  The
+-           cursor then advances after this spacing character, to  prepare  for
+-           writing the next character on the screen.
+-
+-           The newly added spacing character is the base of the active complex
+-           character.  Subsequent non-spacing characters can be combined  with
+-           this base until another spacing character is written to the screen,
+-           or the cursor is moved, e.g., using wmove.
+-
+-       o   If wch refers to a non-spacing character, it  is  appended  to  the
+-           active complex character, retaining the previous characters at that
+-           location.  The rendition specified by wch is ignored.
++

wadd_wch

++       wadd_wch writes the complex character wch to the window win,  then  may
++       advance  the  cursor  position, analogously to the standard C library's
++       putwchar(3).  ncurses(3x) describes the variants of this function.
++
++       Much behavior depends on whether the wide characters in wch are spacing
++       or non-spacing; see subsection "Complex Characters" below.
++
++       o   If  wch  contains  a  spacing  character, then any character at the
++           cursor is first removed.   The  complex  character  wch,  with  its
++           attributes  and  color  pair  identifier,  becomes  the base of the
++           active complex character.
++
++       o   If wch contains only non-spacing characters, they are combined with
++           the  active  complex  character.  curses ignores its attributes and
++           color pair identifier, and does not advance the cursor.
++
++       Further non-spacing characters added with wadd_wch are not  written  at
++       the  new  cursor position but combine with the active complex character
++       until another spacing character is written to the window or the  cursor
++       is moved.
++
++       If advancement occurs at the right margin,
++
++       o   the  cursor  automatically wraps to the beginning of the next line,
++           then,
++
++       o   if  it  was  at  the  bottom  of  the  scrolling  region,  and   if
++           scrollok(3x)  is  enabled  for win, the scrolling region scrolls up
++           one line.
++
++       If wch is a backspace, carriage return, line feed, or tab,  the  cursor
++       moves appropriately within the window.
++
++       o   Backspace  moves  the cursor one character left; at the left margin
++           of a window, it does nothing.
++
++       o   Carriage return moves the cursor to the left margin on the  current
++           line of the window.
++
++       o   Line  feed  does a clrtoeol(3x), then advances as if from the right
++           margin.
++
++       o   Tab advances the cursor to the next tab stop (possibly on the  next
++           line);  these  are placed at every eighth column by default.  Alter
++           the   tab   interval    with    the    TABSIZE    extension;    see
++           curs_variables(3x).
++
++       If  wch  is  any other nonprintable character, it is drawn in printable
++       form using the same convention as wunctrl(3x).
++
++       Calling win_wch(3x) on the location of a  nonprintable  character  does
++       not return the character itself, but its wunctrl(3x) representation.
++
++
++

wecho_wchar

++       echo_wchar   and  wecho_wchar  are  equivalent  to  calling  (w)add_wch
++       followed by (w)refresh.  curses interprets these functions  as  a  hint
++       that only a single (complex) character is being output; for non-control
++       characters, a considerable performance gain may be enjoyed by employing
++       them.
++
++
++

Forms-Drawing Characters

++       curses  defines  macros  starting  with  WACS_  that  can  be used with
++       wadd_wch to write line-drawing and  other  special  characters  to  the
++       screen.  ncurses terms these forms-drawing characters.  The ACS default
++       listed below is used if the acs_chars (acsc) terminfo  capability  does
++       not  define  a terminal-specific replacement for it, or if the terminal
++       and locale configuration requires Unicode to  access  these  characters
++       but  the  library  is  unable  to  use Unicode.  The "acsc char" column
++       corresponds to how the characters are specified in the acs_chars (acsc)
++       string capability, and the characters in it may appear on the screen if
++       the terminal type's database entry incorrectly advertises ACS  support.
++       The name "ACS" originates in the Alternate Character Set feature of the
++       DEC VT100 terminal.
+ 
+-           The cursor is not advanced after adding  a  non-spacing  character.
+-           Subsequent calls to add non-spacing characters will update the same
+-           position.
+-
+-       o   If the character part of wch is a tab, newline, backspace or  other
+-           control character, the window is updated and the cursor moves as if
+-           addch were called.
+-
+-
+-

echo_wchar

+-       The echo_wchar function is functionally equivalent to a call to add_wch
+-       followed  by  a  call  to  refresh(3x).   Similarly, the wecho_wchar is
+-       functionally equivalent to a call to wadd_wch followed  by  a  call  to
+-       wrefresh.   The  knowledge that only a single character is being output
+-       is  taken  into  consideration  and,  for  non-control  characters,   a
+-       considerable  performance  gain  might  be  seen  by  using  the *echo*
+-       functions instead of their equivalents.
+-
+-
+-

Line Graphics

+-       Like addch(3x), addch_wch accepts symbols which make it simple to  draw
+-       lines  and  other  frequently  used  special characters.  These symbols
+-       correspond to the same VT100 line-drawing set as addch(3x).
+-
+-                       Unicode   ASCII     acsc
+-
+-
+-       ACS Name        Default   Default   Char   Glyph Name
++                       Unicode   ACS       acsc
++       Symbol          Default   Default   char   Glyph Name
+        ------------------------------------------------------------------------
+        WACS_BLOCK      0x25ae    #         0      solid square block
+        WACS_BOARD      0x2592    #         h      board of squares
+@@ -179,7 +209,6 @@
+        WACS_D_LTEE       0x2560    +         F      double tee pointing right
+        WACS_D_PLUS       0x256c    +         E      double large plus
+        WACS_D_RTEE       0x2563    +         G      double tee pointing left
+-
+        WACS_D_TTEE       0x2566    +         I      double tee pointing down
+        WACS_D_ULCORNER   0x2554    +         C      double upper left corner
+        WACS_D_URCORNER   0x2557    +         B      double upper right corner
+@@ -198,124 +227,122 @@
+ 
+ 
+ 

RETURN VALUE

+-       All routines return the integer ERR upon failure and OK on success.
++       These functions return OK on success and ERR on failure.   In  ncurses,
++       wadd_wch returns ERR if
+ 
+-       X/Open  Curses  does  not   specify   any   error   conditions.    This
+-       implementation returns an error
++       o   win is NULL,
+ 
+-       o   if the window pointer is null or
++       o   wrapping  to  a new line is impossible because scrollok(3x) has not
++           been called on win when writing to its  bottom  right  location  is
++           attempted, or
+ 
+-       o   if it is not possible to add a complete character in the window.
++       o   it  is  not  possible  to  add  a  complete character at the cursor
++           position.
+ 
+-       The latter may be due to different causes:
++       Functions prefixed with "mv" first perform cursor movement and fail  if
++       the position (y, x) is outside the window boundaries.
+ 
+-       o   If  scrollok(3x)  is  not enabled, writing a character at the lower
+-           right margin succeeds.  However, an error is returned because it is
+-           not possible to wrap to a new line.
+ 
+-       o   If  an error is detected when converting a multibyte character to a
+-           sequence of bytes, or if it is not  possible  to  add  all  of  the
+-           resulting bytes in the window, an error is returned.
++

NOTES

++       add_wch,  mvadd_wch,  mvwadd_wch,  and echo_wchar may be implemented as
++       macros.
+ 
+-       Functions  prefixed with "mv" first perform cursor movement and fail if
+-       the position (y, x) is outside the window boundaries.
+ 
++

EXTENSIONS

+ 
+-

NOTES

+-       Note that add_wch, mvadd_wch, mvwadd_wch, and echo_wchar may be macros.
++

TABSIZE

++       The TABSIZE variable is implemented  in  SVr4  and  other  versions  of
++       curses, but is not specified by X/Open Curses (see curs_variables(3x)).
+ 
+ 
+ 

PORTABILITY

+-       These functions are described in X/Open Curses, Issue 4.  The  defaults
+-       specified for line-drawing characters apply in the POSIX locale.
++       These  functions are described in X/Open Curses, Issue 4.  It specifies
++       no error conditions for them.
+ 
++       SVr4 curses describes a successful return value  only  as  "an  integer
++       value other than ERR".
+ 
+-

WACS Symbols

+-       X/Open  Curses  makes it clear that the WACS_ symbols should be defined
+-       as a pointer to cchar_t data, e.g., in the discussion of border_set.  A
+-       few implementations are problematic:
++       The  defaults specified for forms-drawing characters apply in the POSIX
++       locale.  X/Open Curses makes it clear that the WACS_ symbols should  be
++       defined  as  a  pointer  to  cchar_t  data,  e.g., in the discussion of
++       border_set.  A few implementations are problematic:
+ 
+        o   NetBSD curses defines the symbols as a wchar_t within a cchar_t.
+ 
+-       o   HP-UX  curses  equates  some  of  the ACS_ symbols to the analogous
+-           WACS_ symbols as if the ACS_ symbols  were  wide  characters.   The
+-           misdefined  symbols  are the arrows and other symbols which are not
++       o   HP-UX curses equates some of the  ACS_  symbols  to  the  analogous
++           WACS_  symbols  as  if  the ACS_ symbols were wide characters.  The
++           misdefined symbols are the arrows and other symbols which  are  not
+            used for line-drawing.
+ 
+-       X/Open Curses does not specify  symbols  for  thick-  or  double-lines.
++       X/Open  Curses  does  not  specify  symbols for thick- or double-lines.
+        SVr4 curses implementations defined their line-drawing symbols in terms
+-       of intermediate symbols.  This implementation  extends  those  symbols,
++       of  intermediate  symbols.   This implementation extends those symbols,
+        providing new definitions which are not in the SVr4 implementations.
+ 
+-       Not  all  Unicode-capable  terminals  provide  support  for VT100-style
+-       alternate character  sets  (i.e.,  the  acsc  capability),  with  their
+-       corresponding  line-drawing  characters.  X/Open Curses did not address
+-       the  aspect  of  integrating  Unicode  with  line-drawing   characters.
+-       Existing  implementations of Unix curses (AIX, HP-UX, Solaris) use only
++       Not all  Unicode-capable  terminals  provide  support  for  VT100-style
++       alternate  character  sets  (i.e.,  the  acsc  capability),  with their
++       corresponding line-drawing characters.  X/Open Curses did  not  address
++       the   aspect  of  integrating  Unicode  with  line-drawing  characters.
++       Existing implementations of Unix curses (AIX, HP-UX, Solaris) use  only
+        the acsc character-mapping to provide this feature.  As a result, those
+        implementations  can  only  use  single-byte  line-drawing  characters.
+-       ncurses 5.3 (2002) provided a table of Unicode values  to  solve  these
++       ncurses  5.3  (2002)  provided a table of Unicode values to solve these
+        problems.  NetBSD curses incorporated that table in 2010.
+ 
+-       In  this  implementation,  the  Unicode  values are used instead of the
++       In this implementation, the Unicode values  are  used  instead  of  the
+        terminal description's acsc mapping as discussed in ncurses(3x) for the
+-       environment  variable  NCURSES_NO_UTF8_ACS.   In contrast, for the same
++       environment variable NCURSES_NO_UTF8_ACS.  In contrast,  for  the  same
+        cases, the line-drawing characters described in addch(3x) will use only
+        the ASCII default values.
+ 
+-       Having  Unicode available does not solve all of the problems with line-
++       Having Unicode available does not solve all of the problems with  line-
+        drawing for curses:
+ 
+-       o   The closest Unicode equivalents to the VT100 graphics  S1,  S3,  S7
+-           and  S9 frequently are not displayed at the regular intervals which
++       o   The  closest  Unicode  equivalents to the VT100 graphics S1, S3, S7
++           and S9 frequently are not displayed at the regular intervals  which
+            the terminal used.
+ 
+-       o   The lantern is a special case.  It originated with  the  AT&T  4410
+-           terminal  in the early 1980s.  There is no accessible documentation
++       o   The  lantern  is  a special case.  It originated with the AT&T 4410
++           terminal in the early 1980s.  There is no accessible  documentation
+            depicting the lantern symbol on the AT&T terminal.
+ 
+            Lacking documentation, most readers assume that a storm lantern was
+            intended.  But there are several possibilities, all with problems.
+ 
+-           Unicode  6.0  (2010)  does provide two lantern symbols: U+1F383 and
+-           U+1F3EE.  Those were not available  in  2002,  and  are  irrelevant
+-           since  they  lie  outside the BMP and as a result are not generally
++           Unicode 6.0 (2010) does provide two lantern  symbols:  U+1F383  and
++           U+1F3EE.   Those  were  not  available  in 2002, and are irrelevant
++           since they lie outside the BMP and as a result  are  not  generally
+            available in terminals.  They are not storm lanterns, in any case.
+ 
+            Most storm lanterns have a tapering glass chimney (to guard against
+            tipping); some have a wire grid protecting the chimney.
+ 
+-           For  the  tapering  appearance,   U+2603 was adequate.  In use on a
++           For the tapering appearance,  U+2603 was adequate.   In  use  on  a
+            terminal, no one can tell what the image represents.  Unicode calls
+            it a snowman.
+ 
+            Others have suggested these alternatives: <section> U+00A7 (section
+-           mark), <Theta> U+0398 (theta), <Phi> U+03A6 (phi),  <delta>  U+03B4
++           mark),  <Theta>  U+0398 (theta), <Phi> U+03A6 (phi), <delta> U+03B4
+            (delta),  U+2327 (x in a rectangle),  U+256C (forms double vertical
+            and horizontal), and  U+2612 (ballot box with x).
+ 
+ 
+ 

Complex Characters

+-       The complex character  type  cchar_t  can  store  more  than  one  wide
+-       character  (wchar_t).   The  X/Open Curses description does not mention
+-       this possibility, describing only the cases  where  wch  is  a  spacing
+-       character or a non-spacing character.
++       The  complex  character  type  cchar_t  can  store  more  than one wide
++       character (wchar_t).  X/Open Curses does not mention this  possibility,
++       specifying  behavior  only  where  wch  is  a  single character, either
++       spacing or non-spacing.
+ 
+-       This implementation assumes that wch is constructed using setcchar(3x),
+-       and in turn that the result
++       ncurses assumes that wch is constructed using setcchar(3x), and in turn
++       that the result
+ 
+-       o   contains at most one spacing character in the beginning of its list
+-           of wide characters, and zero or more non-spacing characters or
++       o   contains at most one spacing character at the beginning of its list
++           of wide characters, and zero or more non-spacing characters, or
+ 
+-       o   may hold one non-spacing character.
++       o   holds one non-spacing character.
+ 
+-       In  the  latter  case,  ncurses  adds  the non-spacing character to the
+-       active (base) spacing character.
+-
+-
+-

TABSIZE

+-       The TABSIZE variable is implemented  in  SVr4  and  other  versions  of
+-       curses, but is not specified by X/Open Curses (see curs_variables(3x)).
++       In the latter case, ncurses  adds  the  non-spacing  character  to  the
++       active complex character.
+ 
+ 
+ 

SEE ALSO

+@@ -328,7 +355,7 @@
+ 
+ 
+ 
+-ncurses 6.5                       2024-04-20                  curs_add_wch(3x)
++ncurses 6.5                       2024-05-11                  curs_add_wch(3x)
+ 
+