diff --git a/bootstrap.yml b/bootstrap.yml index 752a7855a..1a9d36faf 100644 --- a/bootstrap.yml +++ b/bootstrap.yml @@ -65,11 +65,39 @@ sources: tag: 'binutils-2_32' version: '2.32' tools_required: + # TODO Dennis: autoconf-2.71 is too new, I'll grab this during the toolchain upgrade. - host-autoconf-v2.69 - - host-automake-v1.15 + - host-automake-v1.16 + - host-libtool regenerate: - - args: ['autoreconf'] + - args: ['autoreconf', '-fvi', '-I../config'] + workdir: '@THIS_SOURCE_DIR@/opcodes' + - args: ['libtoolize', '-cfvi'] + workdir: '@THIS_SOURCE_DIR@/opcodes' + - args: ['autoreconf', '-fvi', '-I../config'] + workdir: '@THIS_SOURCE_DIR@/bfd' + - args: ['libtoolize', '-cfvi'] + workdir: '@THIS_SOURCE_DIR@/bfd' + - args: ['autoreconf', '-fvi', '-I../config'] workdir: '@THIS_SOURCE_DIR@/ld' + - args: ['libtoolize', '-cfvi'] + workdir: '@THIS_SOURCE_DIR@/ld' + - args: ['autoreconf', '-fvi', '-I../config'] + workdir: '@THIS_SOURCE_DIR@/' + - args: ['libtoolize', '-cfvi'] + workdir: '@THIS_SOURCE_DIR@/' + - args: ['autoreconf', '-fvi', '-I../config'] + workdir: '@THIS_SOURCE_DIR@/gas' + - args: ['libtoolize', '-cfvi'] + workdir: '@THIS_SOURCE_DIR@/gas' + - args: ['autoreconf', '-fvi', '-I../config'] + workdir: '@THIS_SOURCE_DIR@/binutils' + - args: ['libtoolize', '-cfvi'] + workdir: '@THIS_SOURCE_DIR@/binutils' + - args: ['autoreconf', '-fvi', '-I../config'] + workdir: '@THIS_SOURCE_DIR@/gprof' + - args: ['libtoolize', '-cfvi'] + workdir: '@THIS_SOURCE_DIR@/gprof' - name: cralgo subdir: 'ports' @@ -118,13 +146,39 @@ sources: tag: 'releases/gcc-11.1.0' version: '11.1.0' tools_required: + # TODO Dennis: autoconf 2.71 is too new, I'll take it during the toolchain upgrade. - host-autoconf-v2.69 - - host-automake-v1.11 + - host-automake-v1.16 + - host-libtool regenerate: - - args: ['autoconf'] + - args: ['autoreconf', '-fvi', '-I../config'] + workdir: '@THIS_SOURCE_DIR@/gcc' + - args: ['autoreconf', '-fvi', '-I../config'] + workdir: '@THIS_SOURCE_DIR@/libstdc++-v3' + - args: ['libtoolize', '-cfvi'] workdir: '@THIS_SOURCE_DIR@/gcc' - - args: ['autoconf'] + - args: ['libtoolize', '-cfvi'] workdir: '@THIS_SOURCE_DIR@/libstdc++-v3' + - args: ['autoreconf', '-fvi', '-I../config'] + workdir: '@THIS_SOURCE_DIR@/' + - args: ['libtoolize', '-cfvi'] + workdir: '@THIS_SOURCE_DIR@/' + - args: ['autoreconf', '-fvi', '-I../config'] + workdir: '@THIS_SOURCE_DIR@/libbacktrace' + - args: ['libtoolize', '-cfvi'] + workdir: '@THIS_SOURCE_DIR@/libbacktrace' + - args: ['autoreconf', '-fvi', '-I../config'] + workdir: '@THIS_SOURCE_DIR@/lto-plugin' + - args: ['libtoolize', '-cfvi'] + workdir: '@THIS_SOURCE_DIR@/lto-plugin' + - args: ['autoreconf', '-fvi', '-I../config'] + workdir: '@THIS_SOURCE_DIR@/libcc1' + - args: ['libtoolize', '-cfvi'] + workdir: '@THIS_SOURCE_DIR@/libcc1' + - args: ['autoreconf', '-fvi', '-I../config'] + workdir: '@THIS_SOURCE_DIR@/libcpp' + - args: ['libtoolize', '-cfvi'] + workdir: '@THIS_SOURCE_DIR@/libcpp' - name: protobuf subdir: 'ports' @@ -226,6 +280,24 @@ tools: install: - args: ['make', 'install'] + - name: host-autoconf-v2.71 + labels: [aarch64, riscv64] + architecture: noarch + source: + name: autoconf-v2.71 + subdir: 'ports' + url: 'https://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.xz' + format: 'tar.xz' + checksum: blake2b:7fd4b98b4cfff10720e8da6ee91045637991643b50fcb3e47a0ecfcc01600f7b7b36fd1c0a5f08b68a418f1bdbd8d5a98de1008157595dd37cc3a31facb61416 + extract_path: 'autoconf-2.71' + version: '2.71' + configure: + - args: ['@THIS_SOURCE_DIR@/configure', '--prefix=@PREFIX@'] + compile: + - args: ['make', '-j@PARALLELISM@'] + install: + - args: ['make', 'install'] + - name: host-automake-v1.11 labels: [aarch64, riscv64] architecture: noarch @@ -296,6 +368,33 @@ tools: # Stop aclocal from complaining. - args: ['ln', '-sf', '@PREFIX@/share/aclocal-1.15', '@PREFIX@/share/aclocal'] + - name: host-automake-v1.16 + labels: [aarch64, riscv64] + architecture: noarch + source: + name: automake-v1.16 + subdir: 'ports' + git: 'https://git.savannah.gnu.org/git/automake.git' + tag: 'v1.16.5' + version: '1.16.5' + tools_required: + - host-autoconf-v2.71 + regenerate: + - args: ['./bootstrap'] + tools_required: + - host-autoconf-v2.71 + configure: + - args: + - '@THIS_SOURCE_DIR@/configure' + - '--prefix=@PREFIX@' + - 'MAKEINFO=/bin/true' + compile: + - args: ['make', '-j@PARALLELISM@'] + install: + - args: ['make', 'install'] + # Stop aclocal from complaining. + - args: ['ln', '-sf', '@PREFIX@/share/aclocal-1.16', '@PREFIX@/share/aclocal'] + - name: host-managarm-tools labels: [aarch64, riscv64] architecture: noarch @@ -328,19 +427,24 @@ tools: name: libtool subdir: 'ports' git: 'https://git.savannah.gnu.org/git/libtool.git' - tag: 'v2.4.6' - version: '2.4.6' + tag: 'v2.4.7' + version: '2.4.7' tools_required: - - host-autoconf-v2.69 - - host-automake-v1.15 + - host-autoconf-v2.71 + - host-automake-v1.16 regenerate: # libtool's ./bootstrap does a shallow clone with insufficient depth. - args: ['git', 'submodule', 'update', '--init'] - args: ['./bootstrap'] + - args: ['cp', + '@BUILD_ROOT@/tools/host-automake-v1.16/share/automake-1.16/config.sub', + '@THIS_SOURCE_DIR@/build-aux/'] + - args: ['cp', + '@BUILD_ROOT@/tools/host-automake-v1.16/share/automake-1.16/config.guess', + '@THIS_SOURCE_DIR@/build-aux/'] tools_required: - - host-autoconf-v2.69 - - host-automake-v1.15 - revision: 2 + - host-autoconf-v2.71 + - host-automake-v1.16 configure: - args: - '@THIS_SOURCE_DIR@/configure' @@ -391,7 +495,7 @@ tools: labels: [aarch64, riscv64] architecture: '@OPTION:arch@' from_source: binutils - revision: 2 + revision: 3 configure: - args: - '@THIS_SOURCE_DIR@/configure' @@ -437,7 +541,7 @@ tools: tools_required: - tool: cross-binutils recursive: true - revision: 2 + revision: 3 configure: - args: - '@THIS_SOURCE_DIR@/configure' @@ -485,7 +589,7 @@ tools: tools_required: - tool: cross-binutils recursive: true - revision: 2 + revision: 3 configure: - args: - '@THIS_SOURCE_DIR@/configure' @@ -542,7 +646,7 @@ tools: tools_required: - tool: cross-binutils recursive: true - revision: 2 + revision: 3 configure: - args: - '@THIS_SOURCE_DIR@/configure' @@ -640,10 +744,10 @@ packages: categories: ['sys-devel'] from_source: binutils tools_required: - - tool: system-gcc + - system-gcc pkgs_required: - mlibc - revision: 4 + revision: 5 configure: - args: - '@THIS_SOURCE_DIR@/configure' @@ -657,8 +761,8 @@ packages: # -g blows up the binary size. - 'CFLAGS=-O2' build: - #- args: ['make', '-j@PARALLELISM@', 'all-binutils', 'all-gas', 'all-ld'] - - args: ['make', 'all-binutils', 'all-gas', 'all-ld'] + - args: ['make', '-j@PARALLELISM@', 'all-binutils', 'all-gas', 'all-ld'] + # - args: ['make', 'all-binutils', 'all-gas', 'all-ld'] - args: ['make', 'install-binutils', 'install-gas', 'install-ld'] environ: DESTDIR: '@THIS_COLLECT_DIR@' @@ -827,7 +931,7 @@ packages: - mpfr - mpc - zlib - revision: 3 + revision: 4 configure: - args: - '@THIS_SOURCE_DIR@/configure' diff --git a/patches/automake-v1.16/0001-Add-Managarm-support.patch b/patches/automake-v1.16/0001-Add-Managarm-support.patch new file mode 100644 index 000000000..c876c1162 --- /dev/null +++ b/patches/automake-v1.16/0001-Add-Managarm-support.patch @@ -0,0 +1,101 @@ +From 3795bc9b268c3c3025074a3511f8454066fe2ca6 Mon Sep 17 00:00:00 2001 +From: Dennis Bonke +Date: Mon, 3 Oct 2022 22:30:43 +0200 +Subject: [PATCH] Add Managarm support + +Signed-off-by: Dennis Bonke +--- + lib/config.guess | 6 ++++++ + lib/config.sub | 26 +++++++++++++++++++++++--- + 2 files changed, 29 insertions(+), 3 deletions(-) + +diff --git a/lib/config.guess b/lib/config.guess +index e81d3ae..9cafc6a 100755 +--- a/lib/config.guess ++++ b/lib/config.guess +@@ -963,6 +963,12 @@ EOF + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC + ;; ++ x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) ++ GUESS="$UNAME_MACHINE-pc-managarm-mlibc" ++ ;; ++ *:[Mm]anagarm:*:*) ++ GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" ++ ;; + *:Minix:*:*) + GUESS=$UNAME_MACHINE-unknown-minix + ;; +diff --git a/lib/config.sub b/lib/config.sub +index d74fb6d..ef0004f 100755 +--- a/lib/config.sub ++++ b/lib/config.sub +@@ -145,7 +145,7 @@ case $1 in + nto-qnx* | linux-* | uclinux-uclibc* \ + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ +- | storm-chaos* | os2-emx* | rtmk-nova*) ++ | storm-chaos* | os2-emx* | rtmk-nova* | managarm-*) + basic_machine=$field1 + basic_os=$maybe_os + ;; +@@ -1336,6 +1336,10 @@ EOF + kernel=linux + os=`echo "$basic_os" | sed -e 's|linux|gnu|'` + ;; ++ managarm*) ++ kernel=managarm ++ os=$(echo $basic_os | sed -e 's|managarm|mlibc|') ++ ;; + *) + kernel= + os=$basic_os +@@ -1748,7 +1752,8 @@ case $os in + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ +- | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr*) ++ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ ++ | mlibc* ) + ;; + # This one is extra strict with allowed versions + sco3.2v2 | sco3.2v[4-9]* | sco5v6*) +@@ -1756,6 +1761,9 @@ case $os in + ;; + none) + ;; ++ kernel* ) ++ # Restricted further below ++ ;; + *) + echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2 + exit 1 +@@ -1770,12 +1778,24 @@ case $kernel-$os in + ;; + uclinux-uclibc* ) + ;; +- -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* ) ++ managarm-mlibc* ) ++ ;; ++ managarm-kernel* ) ++ ;; ++ -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* ) + # These are just libc implementations, not actual OSes, and thus + # require a kernel. + echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 + exit 1 + ;; ++ -kernel* ) ++ echo "Invalid configuration \`$1': -kernel must not appear on its own." 1>&2 ++ exit 1 ++ ;; ++ *-kernel* ) ++ echo "Invalid configuration \`$1': Kernel \`$kernel' does not support -kernel." 1>&2 ++ exit 1 ++ ;; + kfreebsd*-gnu* | kopensolaris*-gnu*) + ;; + vxworks-simlinux | vxworks-simwindows | vxworks-spe) +-- +2.37.2 + diff --git a/patches/gcc/0001-Managarm-target.patch b/patches/gcc/0001-Add-Managarm-target.patch similarity index 82% rename from patches/gcc/0001-Managarm-target.patch rename to patches/gcc/0001-Add-Managarm-target.patch index abdc1226f..31da9ec1c 100644 --- a/patches/gcc/0001-Managarm-target.patch +++ b/patches/gcc/0001-Add-Managarm-target.patch @@ -1,11 +1,10 @@ -From 57ceba3e24468a6277926a3d7d62f8b2094030cb Mon Sep 17 00:00:00 2001 +From 751b0dfb14ac9bc28e8056d6f23a2526248fc6c8 Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Tue, 13 Apr 2021 21:20:52 +0200 -Subject: [PATCH] Managarm target +Subject: [PATCH] Add Managarm target -TODO: Use libtoolize instead of modifying in-tree libtool? +Signed-off-by: Dennis Bonke --- - config.sub | 11 +++- fixincludes/mkfixinc.sh | 1 + gcc/config.gcc | 71 +++++++++++++++++++++ gcc/config.host | 2 +- @@ -14,7 +13,7 @@ TODO: Use libtoolize instead of modifying in-tree libtool? gcc/config/i386/i386-managarm.h | 11 ++++ gcc/config/i386/t-managarm64 | 4 ++ gcc/config/managarm-kernel.h | 9 +++ - gcc/config/managarm-system.h | 3 + + gcc/config/managarm-mlibc.h | 3 + gcc/config/managarm.h | 13 ++++ gcc/config/riscv/managarm.h | 64 +++++++++++++++++++ gcc/config/riscv/t-managarm | 3 + @@ -22,61 +21,17 @@ TODO: Use libtoolize instead of modifying in-tree libtool? libgcc/libgcov.h | 1 + libstdc++-v3/crossconfig.m4 | 11 ++++ libstdc++-v3/include/c_compatibility/fenv.h | 10 +-- - libtool.m4 | 14 ++++ - 18 files changed, 293 insertions(+), 8 deletions(-) + 16 files changed, 270 insertions(+), 6 deletions(-) create mode 100644 gcc/config/aarch64/aarch64-managarm.h create mode 100644 gcc/config/aarch64/t-aarch64-managarm create mode 100644 gcc/config/i386/i386-managarm.h create mode 100644 gcc/config/i386/t-managarm64 create mode 100644 gcc/config/managarm-kernel.h - create mode 100644 gcc/config/managarm-system.h + create mode 100644 gcc/config/managarm-mlibc.h create mode 100644 gcc/config/managarm.h create mode 100644 gcc/config/riscv/managarm.h create mode 100644 gcc/config/riscv/t-managarm -diff --git a/config.sub b/config.sub -index 63c1f1c8b..033763b58 100755 ---- a/config.sub -+++ b/config.sub -@@ -132,7 +132,8 @@ case $1 in - maybe_os=$field2-$field3 - case $maybe_os in - nto-qnx* | linux-* | uclinux-uclibc* \ -- | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ -+ | uclinux-gnu* | managarm-kernel* | managarm-system* \ -+ | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ - | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ - | storm-chaos* | os2-emx* | rtmk-nova*) - basic_machine=$field1 -@@ -1313,6 +1314,10 @@ EOF - kernel=linux - os=$(echo $basic_os | sed -e 's|linux|gnu|') - ;; -+ managarm*) -+ kernel=managarm -+ os=$(echo $basic_os | sed -e 's|managarm|system|') -+ ;; - *) - kernel= - os=$basic_os -@@ -1725,7 +1730,7 @@ case $os in - | skyos* | haiku* | rdos* | toppers* | drops* | es* \ - | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ - | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ -- | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*) -+ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | kernel* | system*) - ;; - # This one is extra strict with allowed versions - sco3.2v2 | sco3.2v[4-9]* | sco5v6*) -@@ -1744,6 +1749,8 @@ esac - case $kernel-$os in - linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* ) - ;; -+ managarm-kernel* | managarm-system* ) -+ ;; - uclinux-uclibc* ) - ;; - -dietlibc* | -newlib* | -musl* | -uclibc* ) diff --git a/fixincludes/mkfixinc.sh b/fixincludes/mkfixinc.sh index df90720b7..779d71953 100755 --- a/fixincludes/mkfixinc.sh @@ -90,7 +45,7 @@ index df90720b7..779d71953 100755 # IF there is no include fixing, # THEN create a no-op fixer and exit diff --git a/gcc/config.gcc b/gcc/config.gcc -index 357b0bed0..570049be8 100644 +index 357b0bed0..c6517a934 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -885,6 +885,25 @@ case ${target} in @@ -105,7 +60,7 @@ index 357b0bed0..570049be8 100644 + use_gcc_stdint=wrap + + case ${target} in -+ *-managarm-system*) ++ *-managarm-mlibc*) + tmake_file="${tmake_file} t-slibgcc" + thread_file='posix' + ;; @@ -129,8 +84,8 @@ index 357b0bed0..570049be8 100644 + tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-managarm" + tm_defines="${tm_defines} TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1" + case ${target} in -+ *-managarm-system*) -+ tm_file="${tm_file} managarm-system.h" ++ *-managarm-mlibc*) ++ tm_file="${tm_file} managarm-mlibc.h" + ;; + *-managarm-kernel*) + tm_file="${tm_file} managarm-kernel.h" @@ -153,8 +108,8 @@ index 357b0bed0..570049be8 100644 + i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h managarm.h i386/i386-managarm.h" + + case ${target} in -+ *-managarm-system*) -+ tm_file="${tm_file} managarm-system.h" ++ *-managarm-mlibc*) ++ tm_file="${tm_file} managarm-mlibc.h" + ;; + *-managarm-kernel*) + tm_file="${tm_file} managarm-kernel.h" @@ -178,8 +133,8 @@ index 357b0bed0..570049be8 100644 + tm_file="${tm_file} riscv/managarm.h" + tmake_file="${tmake_file} riscv/t-riscv riscv/t-managarm" + case ${target} in -+ *-managarm-system*) -+ tm_file="${tm_file} managarm-system.h" ++ *-managarm-mlibc*) ++ tm_file="${tm_file} managarm-mlibc.h" + ;; + *-managarm-kernel*) + tm_file="${tm_file} managarm-kernel.h" @@ -312,11 +267,11 @@ index 000000000..6b1c85a76 + +#undef ENDFILE_SPEC +#define ENDFILE_SPEC "%{shared:crtendS.o%s;:crtend.o%s} crtn.o%s" -diff --git a/gcc/config/managarm-system.h b/gcc/config/managarm-system.h +diff --git a/gcc/config/managarm-mlibc.h b/gcc/config/managarm-mlibc.h new file mode 100644 index 000000000..ba41561d1 --- /dev/null -+++ b/gcc/config/managarm-system.h ++++ b/gcc/config/managarm-mlibc.h @@ -0,0 +1,3 @@ + +#undef LIB_SPEC @@ -531,38 +486,6 @@ index 0413e3b7c..3937be9f8 100644 #if __cplusplus >= 201103L #if _GLIBCXX_USE_C99_FENV_TR1 -diff --git a/libtool.m4 b/libtool.m4 -index 17f8e5f30..a934226d3 100644 ---- a/libtool.m4 -+++ b/libtool.m4 -@@ -2491,6 +2491,16 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | uclinuxfdpiceabi) - dynamic_linker='GNU/Linux ld.so' - ;; - -+managarm*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' -+ soname_spec='${libname}${release}${shared_ext}$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ hardcode_into_libs=yes -+ ;; -+ - netbsd*) - version_type=sunos - need_lib_prefix=no -@@ -3090,6 +3100,10 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi) - lt_cv_deplibs_check_method=pass_all - ;; - -+managarm*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' -- -2.20.1 +2.37.2 diff --git a/patches/libtool/0001-Add-Managarm-support.patch b/patches/libtool/0001-Add-Managarm-support.patch new file mode 100644 index 000000000..e0cd1e33e --- /dev/null +++ b/patches/libtool/0001-Add-Managarm-support.patch @@ -0,0 +1,140 @@ +From 0e207cc8f3ac2b1244699833e0b9403bae3fabc4 Mon Sep 17 00:00:00 2001 +From: Dennis Bonke +Date: Mon, 3 Oct 2022 20:55:31 +0200 +Subject: [PATCH 1/2] Add Managarm support + +Signed-off-by: Dennis Bonke +--- + libtoolize.in | 2 +- + m4/libtool.m4 | 38 +++++++++++++++++++++++++++++++++++++- + m4/ltdl.m4 | 3 +++ + 3 files changed, 41 insertions(+), 2 deletions(-) + +diff --git a/libtoolize.in b/libtoolize.in +index 0c40fed..763619b 100644 +--- a/libtoolize.in ++++ b/libtoolize.in +@@ -1891,7 +1891,7 @@ func_require_seen_libtool () + # Do not remove config.guess, config.sub or install-sh, we don't + # install them without --install, and the project may not be using + # Automake. Similarly, do not remove Gnulib files. +- all_pkgaux_files="compile depcomp missing ltmain.sh" ++ all_pkgaux_files="" + all_pkgmacro_files="libtool.m4 ltargz.m4 ltdl.m4 ltoptions.m4 ltsugar.m4 ltversion.in ltversion.m4 lt~obsolete.m4" + all_pkgltdl_files="COPYING.LIB Makefile Makefile.in Makefile.inc Makefile.am README acinclude.m4 aclocal.m4 argz_.h argz.c config.h.in config-h.in configure configure.ac configure.in libltdl/lt__alloc.h libltdl/lt__argz.h libltdl/lt__dirent.h libltdl/lt__glibc.h libltdl/lt__private.h libltdl/lt__strl.h libltdl/lt_dlloader.h libltdl/lt_error.h libltdl/lt_system.h libltdl/slist.h loaders/dld_link.c loaders/dlopen.c loaders/dyld.c loaders/load_add_on.c loaders/loadlibrary.c loaders/preopen.c loaders/shl_load.c lt__alloc.c lt__argz.c lt__dirent.c lt__strl.c lt_dlloader.c lt_error.c ltdl.c ltdl.h ltdl.mk slist.c" + +diff --git a/m4/libtool.m4 b/m4/libtool.m4 +index 79a2451..4e0e43d 100644 +--- a/m4/libtool.m4 ++++ b/m4/libtool.m4 +@@ -1696,7 +1696,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + +- gnu*) ++ gnu* | managarm*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever +@@ -2925,6 +2925,18 @@ netbsd*) + hardcode_into_libs=yes + ;; + ++managarm*) ++ version_type=linux # correct to gnu/linux during the next big refactor ++ need_lib_prefix=no ++ need_version=no ++ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ++ soname_spec='$libname$release$shared_ext$major' ++ dynamic_linker='mlibc ld.so' ++ shlibpath_var=LD_LIBRARY_PATH ++ shlibpath_overrides_runpath=no ++ hardcode_into_libs=yes ++ ;; ++ + newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' +@@ -3566,6 +3578,10 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + ++managarm*) ++ lt_cv_deplibs_check_method=pass_all ++ ;; ++ + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' +@@ -4446,6 +4462,8 @@ m4_if([$1], [CXX], [ + ;; + netbsd*) + ;; ++ managarm*) ++ ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. +@@ -4618,6 +4636,12 @@ m4_if([$1], [CXX], [ + enable_shared=no + ;; + ++ managarm*) ++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ++ ;; ++ + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. +@@ -5273,6 +5297,11 @@ _LT_EOF + fi + ;; + ++ managarm*) ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' ++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ++ ;; ++ + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' +@@ -5815,6 +5844,9 @@ _LT_EOF + esac + ;; + ++ managarm*) ++ ;; ++ + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out +@@ -7115,6 +7147,10 @@ if test yes != "$_lt_caught_CXX_error"; then + esac + ;; + ++ managarm*) ++ _LT_TAGVAR(ld_shlibs, $1)=yes ++ ;; ++ + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' +diff --git a/m4/ltdl.m4 b/m4/ltdl.m4 +index 772c150..b0dbf78 100644 +--- a/m4/ltdl.m4 ++++ b/m4/ltdl.m4 +@@ -497,6 +497,9 @@ AC_CACHE_CHECK([whether deplibs are loaded by dlopen], + # at 6.2 and later dlopen does load deplibs. + lt_cv_sys_dlopen_deplibs=yes + ;; ++ managarm*) ++ lt_cv_sys_dlopen_deplibs=yes ++ ;; + netbsd*) + lt_cv_sys_dlopen_deplibs=yes + ;; +-- +2.37.2 + diff --git a/patches/libtool/0002-Fill-in-managarm-characteristics.patch b/patches/libtool/0002-Fill-in-managarm-characteristics.patch deleted file mode 100644 index b485f915a..000000000 --- a/patches/libtool/0002-Fill-in-managarm-characteristics.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 33d3467c45d481d803ef1badae8c0e697cf0bb25 Mon Sep 17 00:00:00 2001 -From: avdgrinten -Date: Sat, 5 Nov 2016 17:09:10 +0100 -Subject: [PATCH 2/2] Fill in managarm characteristics - ---- - m4/libtool.m4 | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/m4/libtool.m4 b/m4/libtool.m4 -index f796d7b..e451ef3 100644 ---- a/m4/libtool.m4 -+++ b/m4/libtool.m4 -@@ -2904,6 +2904,17 @@ netbsd*) - hardcode_into_libs=yes - ;; - -+managarm*) -+ version_type=linux # correct to gnu/linux during the next big refactor -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=no -+ hardcode_into_libs=yes -+ ;; -+ - newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -@@ -3541,6 +3552,10 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -+managarm*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' --- -2.20.1 - diff --git a/patches/libtool/0001-Fix-lt_sysroot.patch b/patches/libtool/0002-Fix-lt_sysroot.patch similarity index 59% rename from patches/libtool/0001-Fix-lt_sysroot.patch rename to patches/libtool/0002-Fix-lt_sysroot.patch index ecc4ef5f5..b28c594d3 100644 --- a/patches/libtool/0001-Fix-lt_sysroot.patch +++ b/patches/libtool/0002-Fix-lt_sysroot.patch @@ -1,18 +1,18 @@ -From b5f723d2e4170e18d6ad20898a335bf270818273 Mon Sep 17 00:00:00 2001 -From: Alexander van der Grinten -Date: Thu, 12 Dec 2019 20:40:47 +0100 -Subject: [PATCH 1/2] Fix $lt_sysroot +From 361dcf44a22388d3d0985a089cdc5cc47f939933 Mon Sep 17 00:00:00 2001 +From: Dennis Bonke +Date: Tue, 4 Oct 2022 02:30:22 +0200 +Subject: [PATCH 2/2] Fix lt_sysroot -Inspired by a similar patch in openembedded. +Signed-off-by: Dennis Bonke --- build-aux/ltmain.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in -index 46a0bb5..f04a268 100644 +index a5f21a1..c06d55c 100644 --- a/build-aux/ltmain.in +++ b/build-aux/ltmain.in -@@ -6442,7 +6442,7 @@ func_mode_link () +@@ -6497,7 +6497,7 @@ func_mode_link () fi else # We cannot seem to hardcode it, guess we'll fake it. @@ -22,5 +22,5 @@ index 46a0bb5..f04a268 100644 if test -n "$inst_prefix_dir"; then case $libdir in -- -2.20.1 +2.37.2