From 4bbc98ea01a9577cb60c240a697800c13f30f1df Mon Sep 17 00:00:00 2001 From: mintsuki Date: Tue, 20 Feb 2024 18:07:22 +0100 Subject: [PATCH] port: Backports from Lyre --- GNUmakefile | 2 +- build-support/CMakeToolchain.txt | 2 +- build-support/cross-llvm-config | 87 ++++--- host-recipes/binutils | 3 +- host-recipes/cmake | 18 ++ jinx-config | 6 +- patches/binutils/jinx-working-patch.patch | 57 +---- patches/llvm/jinx-working-patch.patch | 255 +++++++++----------- patches/mesa/jinx-working-patch.patch | 126 +++++----- patches/mlibc/jinx-working-patch.patch | 17 +- patches/xorg-proto/jinx-working-patch.patch | 17 +- recipes/bash | 16 +- recipes/binutils | 7 +- recipes/cshim | 21 ++ recipes/fontconfig | 4 +- recipes/frigg | 4 +- recipes/gmp | 2 +- recipes/grep | 2 +- recipes/gzip | 2 +- recipes/icu | 6 +- recipes/less | 2 +- recipes/libexpat | 2 +- recipes/libffi | 2 +- recipes/libpng | 6 +- recipes/libxcrypt | 2 +- recipes/libxml | 6 +- recipes/limine | 6 +- recipes/llvm | 22 +- recipes/make | 2 +- recipes/mesa | 7 +- recipes/mlibc | 8 +- recipes/mlibc-headers | 1 - recipes/mpc | 2 +- recipes/mpfr | 2 +- recipes/nano | 2 +- recipes/nasm | 6 +- recipes/ncurses | 6 +- recipes/nettle | 2 +- recipes/nyancat | 22 ++ recipes/pcre2 | 2 +- recipes/pixman | 18 +- recipes/readline | 24 +- recipes/sed | 2 +- recipes/tar | 2 +- recipes/tzdata | 4 +- recipes/xbitmaps | 6 +- recipes/xcb-proto | 2 +- recipes/xkeyboard-config | 24 +- recipes/xorg-server | 3 +- recipes/xorg-util-macros | 2 +- recipes/xorg-xeyes | 4 +- recipes/xorg-xsetroot | 6 +- recipes/xz | 8 +- recipes/zlib | 4 +- source-recipes/cmake | 4 + source-recipes/libgcc-binaries | 4 +- source-recipes/pkg-config | 6 +- 57 files changed, 467 insertions(+), 420 deletions(-) create mode 100644 host-recipes/cmake create mode 100644 recipes/cshim create mode 100644 recipes/nyancat create mode 100644 source-recipes/cmake diff --git a/GNUmakefile b/GNUmakefile index 616de826f..88831ca27 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -19,7 +19,7 @@ debug: JINX_CONFIG_FILE=jinx-config-debug $(MAKE) all jinx: - curl -Lo jinx https://github.com/mintsuki/jinx/raw/28efd9f86ffbaeccb0f4552a4f1ad85f42fccad0/jinx + curl -Lo jinx https://github.com/mintsuki/jinx/raw/ae57b8322c949c41a9582c8f5ed47187587c0f7b/jinx chmod +x jinx .PHONY: distro-full diff --git a/build-support/CMakeToolchain.txt b/build-support/CMakeToolchain.txt index 257a9c822..9c173b7f4 100644 --- a/build-support/CMakeToolchain.txt +++ b/build-support/CMakeToolchain.txt @@ -1,4 +1,4 @@ -set(CMAKE_SYSTEM_NAME UnixPaths) +set(CMAKE_SYSTEM_NAME Vinix) set(CMAKE_FIND_ROOT_PATH /sysroot) diff --git a/build-support/cross-llvm-config b/build-support/cross-llvm-config index 0a02a348e..792756675 100755 --- a/build-support/cross-llvm-config +++ b/build-support/cross-llvm-config @@ -1,70 +1,93 @@ #!/usr/bin/env python3 -# This file was taken from Managarm and I have no clue what it does. - import argparse import sys import os -our_version = 14 +our_version = 17 + def do_version(): - return '{}.0.6'.format(our_version) + return '{}.0.6'.format(our_version) + def do_components(): - return 'all all-targets analysis asmparser asmprinter binaryformat bitreader bitwriter codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfomsf debuginfopdb demangle dlltooldriver engine executionengine fuzzmutate globalisel gtest gtest_main instcombine instrumentation interpreter ipo irreader libdriver lineeditor linker lto mc mcdisassembler mcjit mcparser mirparser native nativecodegen objcarcopts object objectyaml option orcjit passes profiledata runtimedyld scalaropts selectiondag support symbolize tablegen target testingsupport transformutils vectorize windowsmanifest x86 x86asmparser x86asmprinter x86codegen x86desc x86disassembler x86info x86utils' + return 'aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgputargetmca amdgpuutils analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard codegen codegentypes core coroutines coverage debuginfobtf debuginfocodeview debuginfodwarf debuginfogsym debuginfologicalview debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker dwarflinkerparallel dwp engine executionengine extensions filecheck frontendhlsl frontendopenacc frontendopenmp fuzzercli fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interfacestub interpreter ipo irprinter irreader jitlink lanai lanaiasmparser lanaicodegen lanaidesc lanaidisassembler lanaiinfo libdriver lineeditor linker loongarch loongarchasmparser loongarchcodegen loongarchdesc loongarchdisassembler loongarchinfo lto mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts objcopy object objectyaml option orcjit orcshared orctargetprocess passes powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvtargetmca runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target targetparser textapi transformutils ve veasmparser vecodegen vectorize vedesc vedisassembler veinfo webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo webassemblyutils windowsdriver windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86targetmca xcore xcorecodegen xcoredesc xcoredisassembler xcoreinfo xray' + def do_targets_built(): - return 'X86' + return 'AArch64 AMDGPU ARM AVR BPF Hexagon Lanai LoongArch Mips MSP430 NVPTX PowerPC RISCV Sparc SystemZ VE WebAssembly X86 XCore' + def get_includedir(): - return '/sysroot/usr/include' + return '/sysroot/usr/include' + def get_libdir(): - return '/sysroot/usr/lib' + return '/sysroot/usr/lib' + def do_has_rtti(): - return 'YES' + return 'YES' + def do_shared_mode(): - return 'shared' + return 'shared' + def do_libs(): - return '-lLLVMAggressiveInstCombine -lLLVMLTO -lLLVMAnalysis -lLLVMLibDriver -lLLVMAsmParser -lLLVMLineEditor -lLLVMAsmPrinter -lLLVMLinker -lLLVMBinaryFormat -lLLVMMC -lLLVMBitReader -lLLVMMCA -lLLVMBitWriter -lLLVMMCDisassembler -lLLVMBitstreamReader -lLLVMMCJIT -lLLVMCFGuard -lLLVMMCParser -lLLVMCFIVerify -lLLVMMIRParser -lLLVMCodeGen -lLLVMObjCARCOpts -lLLVMCore -lLLVMObject -lLLVMCoroutines -lLLVMObjectYAML -lLLVMCoverage -lLLVMOption -lLLVMDWARFLinker -lLLVMOrcJIT -lLLVMDWP -lLLVMOrcShared -lLLVMDebugInfoCodeView -lLLVMOrcTargetProcess -lLLVMDebugInfoDWARF -lLLVMPasses -lLLVMDebugInfoGSYM -lLLVMProfileData -lLLVMDebugInfoMSF -lLLVMRemarks -lLLVMDebugInfoPDB -lLLVMRuntimeDyld -lLLVMDebuginfod -lLLVMScalarOpts -lLLVMDemangle -lLLVMSelectionDAG -lLLVMDiff -lLLVMSupport -lLLVMDlltoolDriver -lLLVMSymbolize -lLLVMExecutionEngine -lLLVMTableGen -lLLVMExegesis -lLLVMTableGenGlobalISel -lLLVMExegesisX86 -lLLVMTarget -lLLVMExtensions -lLLVMTextAPI -lLLVMFileCheck -lLLVMTransformUtils -lLLVMFrontendOpenACC -lLLVMVectorize -lLLVMFrontendOpenMP -lLLVMWindowsManifest -lLLVMFuzzMutate -lLLVMX86AsmParser -lLLVMGlobalISel -lLLVMX86CodeGen -lLLVMIRReader -lLLVMX86Desc -lLLVMInstCombine -lLLVMX86Disassembler -lLLVMInstrumentation -lLLVMX86Info -lLLVMInterfaceStub -lLLVMX86TargetMCA -lLLVMInterpreter -lLLVMXRay -lLLVMJITLink -lLLVMipo' + return f'-lLLVM-{our_version}' + def do_system_libs(): - return '-lLLVMAggressiveInstCombine -lLLVMLTO -lLLVMAnalysis -lLLVMLibDriver -lLLVMAsmParser -lLLVMLineEditor -lLLVMAsmPrinter -lLLVMLinker -lLLVMBinaryFormat -lLLVMMC -lLLVMBitReader -lLLVMMCA -lLLVMBitWriter -lLLVMMCDisassembler -lLLVMBitstreamReader -lLLVMMCJIT -lLLVMCFGuard -lLLVMMCParser -lLLVMCFIVerify -lLLVMMIRParser -lLLVMCodeGen -lLLVMObjCARCOpts -lLLVMCore -lLLVMObject -lLLVMCoroutines -lLLVMObjectYAML -lLLVMCoverage -lLLVMOption -lLLVMDWARFLinker -lLLVMOrcJIT -lLLVMDWP -lLLVMOrcShared -lLLVMDebugInfoCodeView -lLLVMOrcTargetProcess -lLLVMDebugInfoDWARF -lLLVMPasses -lLLVMDebugInfoGSYM -lLLVMProfileData -lLLVMDebugInfoMSF -lLLVMRemarks -lLLVMDebugInfoPDB -lLLVMRuntimeDyld -lLLVMDebuginfod -lLLVMScalarOpts -lLLVMDemangle -lLLVMSelectionDAG -lLLVMDiff -lLLVMSupport -lLLVMDlltoolDriver -lLLVMSymbolize -lLLVMExecutionEngine -lLLVMTableGen -lLLVMExegesis -lLLVMTableGenGlobalISel -lLLVMExegesisX86 -lLLVMTarget -lLLVMExtensions -lLLVMTextAPI -lLLVMFileCheck -lLLVMTransformUtils -lLLVMFrontendOpenACC -lLLVMVectorize -lLLVMFrontendOpenMP -lLLVMWindowsManifest -lLLVMFuzzMutate -lLLVMX86AsmParser -lLLVMGlobalISel -lLLVMX86CodeGen -lLLVMIRReader -lLLVMX86Desc -lLLVMInstCombine -lLLVMX86Disassembler -lLLVMInstrumentation -lLLVMX86Info -lLLVMInterfaceStub -lLLVMX86TargetMCA -lLLVMInterpreter -lLLVMXRay -lLLVMJITLink -lLLVMipo' + return f'-lLLVM-{our_version}' + def do_cppflags(): - return '' + return '' + def do_cxxflags(): - return '' + return '' + def do_ldflags(): - return '-L' + get_libdir() + return '-L' + get_libdir() + parser = argparse.ArgumentParser() -parser.add_argument('--version', action='append_const', dest='command', const=do_version) -parser.add_argument('--targets-built', action='append_const', dest='command', const=do_targets_built) -parser.add_argument('--components', action='append_const', dest='command', const=do_components) -parser.add_argument('--includedir', action='append_const', dest='command', const=get_includedir) -parser.add_argument('--libdir', action='append_const', dest='command', const=get_libdir) -parser.add_argument('--has-rtti', action='append_const', dest='command', const=do_has_rtti) -parser.add_argument('--shared-mode', action='append_const', dest='command', const=do_shared_mode) -parser.add_argument('--link-shared', action='store_const', dest='link', const='shared') -parser.add_argument('--cppflags', action='append_const', dest='command', const=do_cppflags) -parser.add_argument('--cxxflags', action='append_const', dest='command', const=do_cxxflags) -parser.add_argument('--ldflags', action='append_const', dest='command', const=do_ldflags) -parser.add_argument('--libs', action='append_const', dest='command', const=do_libs) -parser.add_argument('--system-libs', action='append_const', dest='command', const=do_system_libs) +parser.add_argument('--version', action='append_const', + dest='command', const=do_version) +parser.add_argument('--targets-built', action='append_const', + dest='command', const=do_targets_built) +parser.add_argument('--components', action='append_const', + dest='command', const=do_components) +parser.add_argument('--includedir', action='append_const', + dest='command', const=get_includedir) +parser.add_argument('--libdir', action='append_const', + dest='command', const=get_libdir) +parser.add_argument('--has-rtti', action='append_const', + dest='command', const=do_has_rtti) +parser.add_argument('--shared-mode', action='append_const', + dest='command', const=do_shared_mode) +parser.add_argument('--link-shared', action='store_const', + dest='link', const='shared') +parser.add_argument('--cppflags', action='append_const', + dest='command', const=do_cppflags) +parser.add_argument('--cxxflags', action='append_const', + dest='command', const=do_cxxflags) +parser.add_argument('--ldflags', action='append_const', + dest='command', const=do_ldflags) +parser.add_argument('--libs', action='append_const', + dest='command', const=do_libs) +parser.add_argument('--system-libs', action='append_const', + dest='command', const=do_system_libs) parser.add_argument('components', type=str, nargs='*') print("cross-llvm-config:", sys.argv, file=sys.stderr) args = parser.parse_args() for command in args.command: - result = command() - print("cross-llvm-config yields:", result, file=sys.stderr) - print(result) - + result = command() + print("cross-llvm-config yields:", result, file=sys.stderr) + print(result) diff --git a/host-recipes/binutils b/host-recipes/binutils index 04e82471d..c81bd3c54 100644 --- a/host-recipes/binutils +++ b/host-recipes/binutils @@ -11,8 +11,7 @@ build() { --with-sysroot="${sysroot_dir}" \ --enable-cet \ --disable-nls \ - --disable-werror \ - --disable-dependency-tracking + --disable-werror make -j${parallelism} all } diff --git a/host-recipes/cmake b/host-recipes/cmake new file mode 100644 index 000000000..300adc54f --- /dev/null +++ b/host-recipes/cmake @@ -0,0 +1,18 @@ +name=cmake +from_source=cmake +revision=1 +imagedeps="gcc" + +build() { + "${source_dir}"/configure --prefix="${prefix}" --parallel="${parallelism}" + + make -j${parallelism} +} + +package() { + DESTDIR="${dest_dir}" make install + echo 'include(Platform/UnixPaths)' > "${dest_dir}${prefix}/share/cmake-3.28/Modules/Platform/Vinix.cmake" + + strip_command=strip \ + post_package_strip +} diff --git a/jinx-config b/jinx-config index 84e6884a2..a4430f0ef 100644 --- a/jinx-config +++ b/jinx-config @@ -26,6 +26,9 @@ autotools_configure() { configure_script_path="${source_dir}/configure" fi + ac_cv_func_malloc_0_nonnull=yes \ + ac_cv_func_calloc_0_nonnull=yes \ + ac_cv_func_realloc_0_nonnull=yes \ ${configure_script_path} \ --host=${OS_TRIPLET} \ --with-sysroot=${sysroot_dir} \ @@ -47,7 +50,7 @@ autotools_recursive_regen() { ACLOCAL_INCLUDE="-I${sysroot_dir}/usr/share/aclocal" fi - for f in $(find . -name configure.ac -type f); do + for f in $(find . -name configure.ac -o -name configure.in -type f); do echo "* autotools regen in '$(dirname $f)'..." ( cd "$(dirname "$f")" && autoreconf -fvi "$@" $ACLOCAL_INCLUDE ) done @@ -62,6 +65,7 @@ meson_configure() { --cross-file "${base_dir}/build-support/cross_file.txt" \ --prefix=${prefix} \ --sysconfdir=/etc \ + --localstatedir=/var \ --libdir=lib \ --sbindir=bin \ --buildtype=release \ diff --git a/patches/binutils/jinx-working-patch.patch b/patches/binutils/jinx-working-patch.patch index 47cb36842..eeb5ac93a 100644 --- a/patches/binutils/jinx-working-patch.patch +++ b/patches/binutils/jinx-working-patch.patch @@ -12,7 +12,7 @@ index 5c5fdef..3c91651 100644 # This file holds an array associating configuration triplets and diff --git binutils-clean/bfd/config.bfd binutils-workdir/bfd/config.bfd -index bdee539..48b2360 100644 +index bdee539..f5d0cf0 100644 --- binutils-clean/bfd/config.bfd +++ binutils-workdir/bfd/config.bfd @@ -664,6 +664,11 @@ case "${targ}" in @@ -40,7 +40,7 @@ index bdee539..48b2360 100644 i[3-7]86-*-lynxos*) targ_defvec=i386_elf32_vec diff --git binutils-clean/gas/configure.tgt binutils-workdir/gas/configure.tgt -index 3429f85..8fe03c1 100644 +index 3429f85..c0a32cc 100644 --- binutils-clean/gas/configure.tgt +++ binutils-workdir/gas/configure.tgt @@ -227,6 +227,7 @@ case ${generic_target} in @@ -65,7 +65,7 @@ index 7af9581..c55e424 100644 AC_CANONICAL_TARGET AM_INIT_AUTOMAKE diff --git binutils-clean/ld/configure.tgt binutils-workdir/ld/configure.tgt -index c62b958..3873c96 100644 +index c62b958..2d8c473 100644 --- binutils-clean/ld/configure.tgt +++ binutils-workdir/ld/configure.tgt @@ -378,6 +378,9 @@ i[3-7]86-*-linux-*) targ_emul=elf_i386 @@ -101,54 +101,3 @@ index 0748c59..954e014 100644 dnl Very limited version of automake's enable-maintainer-mode -diff --git binutils-workdir/multilib.am binutils-workdir/multilib.am -new file mode 100644 -index 0000000..5c98b69 ---- /dev/null -+++ binutils-workdir/multilib.am -@@ -0,0 +1,45 @@ -+## automake - create Makefile.in from Makefile.am -+ -+## Copyright (C) 1994-2017 Free Software Foundation, Inc. -+## This Makefile.in is free software; the Free Software Foundation -+## gives unlimited permission to copy and/or distribute it, -+## with or without modifications, as long as this notice is preserved. -+ -+## This program is distributed in the hope that it will be useful, -+## but WITHOUT ANY WARRANTY; without even the implied warranty of -+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+## GNU General Public License for more details. -+ -+MULTISRCTOP = -+MULTIBUILDTOP = -+MULTIDIRS = -+MULTISUBDIR = -+MULTIDO = true -+MULTICLEAN = true -+ -+# GNU Make needs to see an explicit $(MAKE) variable in the command it -+# runs to enable its job server during parallel builds. Hence the -+# comments below. -+all-multi: -+ $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do # $(MAKE) -+install-multi: -+ $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do # $(MAKE) -+mostlyclean-multi: -+ $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean # $(MAKE) -+clean-multi: -+ $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean # $(MAKE) -+distclean-multi: -+ $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean # $(MAKE) -+maintainer-clean-multi: -+ $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean # $(MAKE) -+ -+.MAKE .PHONY: all-multi clean-multi distclean-multi install-am \ -+ install-multi maintainer-clean-multi mostlyclean-multi -+ -+install-exec-local: install-multi -+ -+all-local: all-multi -+mostlyclean-local: mostlyclean-multi -+clean-local: clean-multi -+distclean-local: distclean-multi -+maintainer-clean-local: maintainer-clean-multi diff --git a/patches/llvm/jinx-working-patch.patch b/patches/llvm/jinx-working-patch.patch index d94e46150..4f90754c8 100644 --- a/patches/llvm/jinx-working-patch.patch +++ b/patches/llvm/jinx-working-patch.patch @@ -1,9 +1,9 @@ diff --git llvm-clean/clang/lib/Basic/Targets/OSTargets.h llvm-workdir/clang/lib/Basic/Targets/OSTargets.h -index 3c1830d..0b74dcf 100644 +index cf8cc8e..37a9ac9 100644 --- llvm-clean/clang/lib/Basic/Targets/OSTargets.h +++ llvm-workdir/clang/lib/Basic/Targets/OSTargets.h -@@ -338,6 +338,34 @@ public: - : OSTargetInfo(Triple, Opts) {} +@@ -922,6 +922,34 @@ public: + } }; +// Vinix Target @@ -34,47 +34,47 @@ index 3c1830d..0b74dcf 100644 + } +}; + - // Minix Target + // WebAssembly target template - class LLVM_LIBRARY_VISIBILITY MinixTargetInfo : public OSTargetInfo { + class LLVM_LIBRARY_VISIBILITY WebAssemblyOSTargetInfo diff --git llvm-clean/clang/lib/Basic/Targets.cpp llvm-workdir/clang/lib/Basic/Targets.cpp -index 994a491..fab58e3 100644 +index 636b59f..e56e5ca 100644 --- llvm-clean/clang/lib/Basic/Targets.cpp +++ llvm-workdir/clang/lib/Basic/Targets.cpp -@@ -586,6 +586,8 @@ TargetInfo *AllocateTarget(const llvm::Triple &Triple, +@@ -590,6 +590,8 @@ std::unique_ptr AllocateTarget(const llvm::Triple &Triple, } case llvm::Triple::Haiku: - return new HaikuTargetInfo(Triple, Opts); + return std::make_unique(Triple, Opts); + case llvm::Triple::Vinix: -+ return new VinixTargetInfo(Triple, Opts); ++ return std::make_unique>(Triple, Opts); + case llvm::Triple::RTEMS: + return std::make_unique(Triple, Opts); case llvm::Triple::NaCl: - return new NaClTargetInfo(Triple, Opts); - case llvm::Triple::PS4: diff --git llvm-clean/clang/lib/Driver/CMakeLists.txt llvm-workdir/clang/lib/Driver/CMakeLists.txt -index 78e8fd1..f95396b 100644 +index a6bd2d4..0c82dd3 100644 --- llvm-clean/clang/lib/Driver/CMakeLists.txt +++ llvm-workdir/clang/lib/Driver/CMakeLists.txt -@@ -59,6 +59,7 @@ add_clang_library(clangDriver - ToolChains/Hexagon.cpp - ToolChains/Hurd.cpp - ToolChains/Linux.cpp +@@ -76,6 +76,7 @@ add_clang_library(clangDriver + ToolChains/Myriad.cpp + ToolChains/NaCl.cpp + ToolChains/NetBSD.cpp + ToolChains/Vinix.cpp - ToolChains/MipsLinux.cpp - ToolChains/MinGW.cpp - ToolChains/Minix.cpp + ToolChains/OHOS.cpp + ToolChains/OpenBSD.cpp + ToolChains/PS4CPU.cpp diff --git llvm-clean/clang/lib/Driver/Driver.cpp llvm-workdir/clang/lib/Driver/Driver.cpp -index 3bfddee..12d56b8 100644 +index bdbdad9..422a3dd 100644 --- llvm-clean/clang/lib/Driver/Driver.cpp +++ llvm-workdir/clang/lib/Driver/Driver.cpp -@@ -30,6 +30,7 @@ - #include "ToolChains/Hurd.h" - #include "ToolChains/Lanai.h" - #include "ToolChains/Linux.h" +@@ -20,6 +20,7 @@ + #include "ToolChains/Contiki.h" + #include "ToolChains/CrossWindows.h" + #include "ToolChains/Cuda.h" +#include "ToolChains/Vinix.h" - #include "ToolChains/MSP430.h" - #include "ToolChains/MSVC.h" - #include "ToolChains/MinGW.h" -@@ -5564,6 +5565,9 @@ const ToolChain &Driver::getToolChain(const ArgList &Args, + #include "ToolChains/Darwin.h" + #include "ToolChains/DragonFly.h" + #include "ToolChains/FreeBSD.h" +@@ -6225,6 +6226,9 @@ const ToolChain &Driver::getToolChain(const ArgList &Args, case llvm::Triple::Fuchsia: TC = std::make_unique(*this, Target, Args); break; @@ -85,25 +85,24 @@ index 3bfddee..12d56b8 100644 TC = std::make_unique(*this, Target, Args); break; diff --git llvm-clean/clang/lib/Driver/ToolChains/Gnu.cpp llvm-workdir/clang/lib/Driver/ToolChains/Gnu.cpp -index 7a9570a..49cd30e 100644 +index 40038dc..198c4d5 100644 --- llvm-clean/clang/lib/Driver/ToolChains/Gnu.cpp +++ llvm-workdir/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -2099,7 +2099,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( +@@ -2328,7 +2328,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( "x86_64-redhat-linux", "x86_64-suse-linux", "x86_64-manbo-linux-gnu", "x86_64-linux-gnu", "x86_64-slackware-linux", "x86_64-unknown-linux", - "x86_64-amazon-linux"}; -+ "x86_64-amazon-linux", -+ "x86_64-vinix"}; ++ "x86_64-amazon-linux", "x86_64-vinix"}; static const char *const X32Triples[] = {"x86_64-linux-gnux32", "x86_64-pc-linux-gnux32"}; static const char *const X32LibDirs[] = {"/libx32", "/lib"}; diff --git llvm-workdir/clang/lib/Driver/ToolChains/Vinix.cpp llvm-workdir/clang/lib/Driver/ToolChains/Vinix.cpp new file mode 100644 -index 0000000..c57e739 +index 0000000..d180195 --- /dev/null +++ llvm-workdir/clang/lib/Driver/ToolChains/Vinix.cpp -@@ -0,0 +1,427 @@ +@@ -0,0 +1,432 @@ +//===------- Vinix.cpp - Vinix ToolChain Implementations --------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure @@ -117,6 +116,7 @@ index 0000000..c57e739 +#include "Arch/ARM.h" +#include "Arch/Mips.h" +#include "Arch/PPC.h" ++#include "Arch/RISCV.h" +#include "CommonArgs.h" +#include "clang/Config/config.h" +#include "clang/Driver/Distro.h" @@ -148,6 +148,10 @@ index 0000000..c57e739 + case llvm::Triple::x86_64: + // We don't want this for x32, otherwise it will match x86_64 libs + return "x86_64-vinix"; ++ case llvm::Triple::aarch64: ++ return "aarch64-vinix"; ++ case llvm::Triple::riscv64: ++ return "riscv64-vinix"; + } + return TargetTriple.str(); +} @@ -212,13 +216,13 @@ index 0000000..c57e739 + // to the link paths. + path_list &Paths = getFilePaths(); + -+ const std::string OSLibDir = getOSLibDir(Triple, Args); ++ const std::string OSLibDir = std::string(getOSLibDir(Triple, Args)); + const std::string MultiarchTriple = getMultiarchTriple(D, Triple, SysRoot); + + // Add the multilib suffixed paths where they are available. + if (GCCInstallation.isValid()) { + const llvm::Triple &GCCTriple = GCCInstallation.getTriple(); -+ const std::string &LibPath = GCCInstallation.getParentLibPath(); ++ const std::string &LibPath = std::string(GCCInstallation.getParentLibPath()); + const Multilib &Multilib = GCCInstallation.getMultilib(); + const MultilibSet &Multilibs = GCCInstallation.getMultilibs(); + @@ -301,7 +305,7 @@ index 0000000..c57e739 + + // See comments above on the multilib variant for details of why this is + // included even from outside the sysroot. -+ const std::string &LibPath = GCCInstallation.getParentLibPath(); ++ const std::string &LibPath = std::string(GCCInstallation.getParentLibPath()); + const llvm::Triple &GCCTriple = GCCInstallation.getTriple(); + const Multilib &Multilib = GCCInstallation.getMultilib(); + addPathIfExists(D, LibPath + "/../" + GCCTriple.str() + "/lib" + @@ -344,6 +348,12 @@ index 0000000..c57e739 + +std::string Vinix::getDynamicLinker(const ArgList &Args) const { + switch (getTriple().getArch()) { ++ case llvm::Triple::aarch64: ++ return "/usr/lib/aarch64-vinix/ld.so"; ++ case llvm::Triple::riscv64: { ++ StringRef ABIName = tools::riscv::getRISCVABI(Args, getTriple()); ++ return ("/usr/lib/riscv64-vinix/ld-riscv64-" + ABIName + ".so").str(); ++ } + case llvm::Triple::x86_64: + return "/usr/lib/ld.so"; + default: @@ -454,11 +464,9 @@ index 0000000..c57e739 + getMultiarchTriple(getDriver(), getTriple(), getDriver().SysRoot); + const GCCVersion &Version = GCCInstallation.getVersion(); + -+ // The primary search for libstdc++ supports multiarch variants. -+ if (addLibStdCXXIncludePaths(LibDir.str() + "/../include", -+ "/c++/" + Version.Text, TripleStr, -+ GCCMultiarchTriple, TargetMultiarchTriple, -+ Multilib.includeSuffix(), DriverArgs, CC1Args)) ++ // Try generic GCC detection first. ++ if (Generic_GCC::addGCCLibStdCxxIncludePaths(DriverArgs, CC1Args, ++ TripleStr)) + return; + + // Otherwise, fall back on a bunch of options which don't use multiarch @@ -478,10 +486,7 @@ index 0000000..c57e739 + }; + + for (const auto &IncludePath : LibStdCXXIncludePathCandidates) { -+ if (addLibStdCXXIncludePaths(IncludePath, /*Suffix*/ "", TripleStr, -+ /*GCCMultiarchTriple*/ "", -+ /*TargetMultiarchTriple*/ "", -+ Multilib.includeSuffix(), DriverArgs, CC1Args)) ++ if (addLibStdCXXIncludePaths(IncludePath, TripleStr, Multilib.includeSuffix(), DriverArgs, CC1Args)) + break; + } +} @@ -530,10 +535,9 @@ index 0000000..c57e739 + Res |= SanitizerKind::MemTag; + return Res; +} -+ diff --git llvm-workdir/clang/lib/Driver/ToolChains/Vinix.h llvm-workdir/clang/lib/Driver/ToolChains/Vinix.h new file mode 100644 -index 0000000..6929c18 +index 0000000..37af855 --- /dev/null +++ llvm-workdir/clang/lib/Driver/ToolChains/Vinix.h @@ -0,0 +1,49 @@ @@ -570,9 +574,9 @@ index 0000000..6929c18 + const llvm::opt::ArgList &DriverArgs, + llvm::opt::ArgStringList &CC1Args) const override; + SanitizerMask getSupportedSanitizers() const override; -+ virtual std::string computeSysRoot() const; + -+ virtual std::string getDynamicLinker(const llvm::opt::ArgList &Args) const; ++ virtual std::string computeSysRoot() const override; ++ virtual std::string getDynamicLinker(const llvm::opt::ArgList &Args) const override; + + std::vector ExtraOpts; + @@ -587,12 +591,12 @@ index 0000000..6929c18 + +#endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_VINIX_H diff --git llvm-clean/llvm/cmake/modules/CrossCompile.cmake llvm-workdir/llvm/cmake/modules/CrossCompile.cmake -index 2a39b6a..ceceb2a 100644 +index 6af47b5..78983fa 100644 --- llvm-clean/llvm/cmake/modules/CrossCompile.cmake +++ llvm-workdir/llvm/cmake/modules/CrossCompile.cmake @@ -17,8 +17,8 @@ function(llvm_create_cross_target project_name target_name toolchain buildtype) -DCMAKE_TOOLCHAIN_FILE=\"${LLVM_MAIN_SRC_DIR}/cmake/platforms/${toolchain}.cmake\") - else() + elseif (NOT CMAKE_CROSSCOMPILING) set(CROSS_TOOLCHAIN_FLAGS_INIT - -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} - -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} @@ -601,24 +605,12 @@ index 2a39b6a..ceceb2a 100644 ) endif() set(CROSS_TOOLCHAIN_FLAGS_${target_name} ${CROSS_TOOLCHAIN_FLAGS_INIT} -diff --git llvm-clean/llvm/include/llvm/ADT/Triple.h llvm-workdir/llvm/include/llvm/ADT/Triple.h -index 42277c0..10c9f08 100644 ---- llvm-clean/llvm/include/llvm/ADT/Triple.h -+++ llvm-workdir/llvm/include/llvm/ADT/Triple.h -@@ -181,6 +181,7 @@ public: - Linux, - Lv2, // PS3 - MacOSX, -+ Vinix, - NetBSD, - OpenBSD, - Solaris, diff --git llvm-clean/llvm/include/llvm/Support/SwapByteOrder.h llvm-workdir/llvm/include/llvm/Support/SwapByteOrder.h -index e8612ba..7471bce 100644 +index 1bbc2e2..0df141c 100644 --- llvm-clean/llvm/include/llvm/Support/SwapByteOrder.h +++ llvm-workdir/llvm/include/llvm/Support/SwapByteOrder.h -@@ -22,7 +22,7 @@ - #endif +@@ -20,7 +20,7 @@ + #include #if defined(__linux__) || defined(__GNU__) || defined(__HAIKU__) || \ - defined(__Fuchsia__) || defined(__EMSCRIPTEN__) @@ -626,68 +618,42 @@ index e8612ba..7471bce 100644 #include #elif defined(_AIX) #include -diff --git llvm-clean/llvm/lib/Support/Triple.cpp llvm-workdir/llvm/lib/Support/Triple.cpp -index a9afcc9..3439ee5 100644 ---- llvm-clean/llvm/lib/Support/Triple.cpp -+++ llvm-workdir/llvm/lib/Support/Triple.cpp -@@ -215,6 +215,7 @@ StringRef Triple::getOSTypeName(OSType Kind) { - case Linux: return "linux"; - case Lv2: return "lv2"; - case MacOSX: return "macosx"; -+ case Vinix: return "vinix"; - case Mesa3D: return "mesa3d"; - case Minix: return "minix"; - case NVCL: return "nvcl"; -@@ -523,6 +524,7 @@ static Triple::OSType parseOS(StringRef OSName) { - .StartsWith("linux", Triple::Linux) - .StartsWith("lv2", Triple::Lv2) - .StartsWith("macos", Triple::MacOSX) -+ .StartsWith("vinix", Triple::Vinix) - .StartsWith("netbsd", Triple::NetBSD) - .StartsWith("openbsd", Triple::OpenBSD) - .StartsWith("solaris", Triple::Solaris) +diff --git llvm-clean/llvm/include/llvm/TargetParser/Triple.h llvm-workdir/llvm/include/llvm/TargetParser/Triple.h +index 79ccd64..9526721 100644 +--- llvm-clean/llvm/include/llvm/TargetParser/Triple.h ++++ llvm-workdir/llvm/include/llvm/TargetParser/Triple.h +@@ -197,6 +197,7 @@ public: + Lv2, // PS3 + MacOSX, + NetBSD, ++ Vinix, + OpenBSD, + Solaris, + UEFI, diff --git llvm-clean/llvm/lib/Support/Unix/Path.inc llvm-workdir/llvm/lib/Support/Unix/Path.inc -index 788460d..fd68d3f 100644 +index e2aece4..2c9ea5a 100644 --- llvm-clean/llvm/lib/Support/Unix/Path.inc +++ llvm-workdir/llvm/lib/Support/Unix/Path.inc -@@ -74,7 +74,7 @@ extern char **environ; - - #include - #if !defined(__APPLE__) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && \ -- !defined(__linux__) && !defined(__FreeBSD_kernel__) && !defined(_AIX) -+ !defined(__linux__) && !defined(__FreeBSD_kernel__) && !defined(_AIX) && !defined(__vinix__) - #include - #define STATVFS statvfs - #define FSTATVFS fstatvfs -@@ -83,7 +83,7 @@ extern char **environ; - #if defined(__OpenBSD__) || defined(__FreeBSD__) - #include - #include --#elif defined(__linux__) -+#elif defined(__linux__) || defined(__vinix__) - #if defined(HAVE_LINUX_MAGIC_H) - #include - #else -@@ -478,7 +478,7 @@ std::error_code remove(const Twine &path, bool IgnoreNonExisting) { - } - - static bool is_local_impl(struct STATVFS &Vfs) { --#if defined(__linux__) || defined(__GNU__) -+#if defined(__linux__) || defined(__GNU__) || defined(__vinix__) - #ifndef NFS_SUPER_MAGIC - #define NFS_SUPER_MAGIC 0x6969 - #endif -@@ -874,7 +874,7 @@ void mapped_file_region::unmapImpl() { - - void mapped_file_region::dontNeedImpl() { +@@ -497,7 +497,7 @@ static bool is_local_impl(struct STATVFS &Vfs) { + #elif defined(__CYGWIN__) + // Cygwin doesn't expose this information; would need to use Win32 API. + return false; +-#elif defined(__Fuchsia__) ++#elif defined(__Fuchsia__) || defined(__vinix__) + // Fuchsia doesn't yet support remote filesystem mounts. + return true; + #elif defined(__EMSCRIPTEN__) +@@ -875,7 +875,7 @@ void mapped_file_region::dontNeedImpl() { assert(Mode == mapped_file_region::readonly); + if (!Mapping) + return; -#if defined(__MVS__) || defined(_AIX) +#if defined(__MVS__) || defined(_AIX) || defined(__vinix__) - // If we don't have madvise, or it isn't beneficial, treat this as a no-op. - return; - #else + // If we don't have madvise, or it isn't beneficial, treat this as a no-op. + #elif defined(POSIX_MADV_DONTNEED) + ::posix_madvise(Mapping, Size, POSIX_MADV_DONTNEED); diff --git llvm-clean/llvm/lib/Support/Unix/Program.inc llvm-workdir/llvm/lib/Support/Unix/Program.inc -index 0893420..0616096 100644 +index 897e227..02f74d7 100644 --- llvm-clean/llvm/lib/Support/Unix/Program.inc +++ llvm-workdir/llvm/lib/Support/Unix/Program.inc @@ -41,6 +41,7 @@ @@ -698,28 +664,35 @@ index 0893420..0616096 100644 #ifdef HAVE_POSIX_SPAWN #include -diff --git llvm-clean/llvm/tools/llvm-dwarfdump/Statistics.cpp llvm-workdir/llvm/tools/llvm-dwarfdump/Statistics.cpp -index 5c08e43..a19c74e 100644 ---- llvm-clean/llvm/tools/llvm-dwarfdump/Statistics.cpp -+++ llvm-workdir/llvm/tools/llvm-dwarfdump/Statistics.cpp -@@ -6,6 +6,8 @@ - // - //===----------------------------------------------------------------------===// +diff --git llvm-clean/llvm/lib/TargetParser/Triple.cpp llvm-workdir/llvm/lib/TargetParser/Triple.cpp +index a3d6a06..bff67c6 100644 +--- llvm-clean/llvm/lib/TargetParser/Triple.cpp ++++ llvm-workdir/llvm/lib/TargetParser/Triple.cpp +@@ -219,6 +219,7 @@ StringRef Triple::getOSTypeName(OSType Kind) { + case Emscripten: return "emscripten"; + case FreeBSD: return "freebsd"; + case Fuchsia: return "fuchsia"; ++ case Vinix: return "vinix"; + case Haiku: return "haiku"; + case HermitCore: return "hermit"; + case Hurd: return "hurd"; +@@ -575,6 +576,7 @@ static Triple::VendorType parseVendor(StringRef VendorName) { -+#include -+ - #include "llvm-dwarfdump.h" - #include "llvm/ADT/DenseMap.h" - #include "llvm/ADT/StringSet.h" + static Triple::OSType parseOS(StringRef OSName) { + return StringSwitch(OSName) ++ .StartsWith("vinix", Triple::Vinix) + .StartsWith("ananas", Triple::Ananas) + .StartsWith("cloudabi", Triple::CloudABI) + .StartsWith("darwin", Triple::Darwin) diff --git llvm-clean/llvm/tools/llvm-shlib/CMakeLists.txt llvm-workdir/llvm/tools/llvm-shlib/CMakeLists.txt -index 8e2b78f..f30e518 100644 +index 8ace190..47dd871 100644 --- llvm-clean/llvm/tools/llvm-shlib/CMakeLists.txt +++ llvm-workdir/llvm/tools/llvm-shlib/CMakeLists.txt -@@ -36,6 +36,7 @@ if(LLVM_BUILD_LLVM_DYLIB) - if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR (MINGW) OR (HAIKU) - OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") - OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "GNU") -+ OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "Vinix") +@@ -41,6 +41,7 @@ if(LLVM_BUILD_LLVM_DYLIB) OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD") - OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia") OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly") + OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia") ++ OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "Vinix") + OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "Android") + OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")) # FIXME: It should be "GNU ld for elf" + configure_file( diff --git a/patches/mesa/jinx-working-patch.patch b/patches/mesa/jinx-working-patch.patch index 6ed953c73..ad805ffad 100644 --- a/patches/mesa/jinx-working-patch.patch +++ b/patches/mesa/jinx-working-patch.patch @@ -1,5 +1,5 @@ diff --git mesa-clean/include/drm-uapi/drm.h mesa-workdir/include/drm-uapi/drm.h -index 5e54c3a..085b5b7 100644 +index 0254024..c2ffd35 100644 --- mesa-clean/include/drm-uapi/drm.h +++ mesa-workdir/include/drm-uapi/drm.h @@ -44,7 +44,7 @@ typedef unsigned int drm_handle_t; @@ -7,64 +7,53 @@ index 5e54c3a..085b5b7 100644 #include -#include -+//#include ++// #include #include typedef int8_t __s8; typedef uint8_t __u8; diff --git mesa-clean/src/compiler/spirv/spirv_to_nir.c mesa-workdir/src/compiler/spirv/spirv_to_nir.c -index 71cdc83..3d26705 100644 +index 5f36118..a501802 100644 --- mesa-clean/src/compiler/spirv/spirv_to_nir.c +++ mesa-workdir/src/compiler/spirv/spirv_to_nir.c -@@ -37,6 +37,7 @@ - #include "util/u_string.h" +@@ -39,6 +39,7 @@ + #include "util/u_debug.h" #include +#include #ifndef NDEBUG - static enum nir_spirv_debug_level + uint32_t mesa_spirv_debug = 0; diff --git mesa-clean/src/egl/main/egllog.c mesa-workdir/src/egl/main/egllog.c -index 984dd5b..6a91952 100644 +index 678bb75..016a70d 100644 --- mesa-clean/src/egl/main/egllog.c +++ mesa-workdir/src/egl/main/egllog.c -@@ -39,6 +39,7 @@ +@@ -37,6 +37,7 @@ #include #include #include +#include #include "c11/threads.h" #include "util/macros.h" - #include "util/u_string.h" + #include "util/simple_mtx.h" diff --git mesa-clean/src/gallium/drivers/llvmpipe/lp_texture.c mesa-workdir/src/gallium/drivers/llvmpipe/lp_texture.c -index 5bfc8db..d2b31e1 100644 +index 5c5a6cd..ae6c23d 100644 --- mesa-clean/src/gallium/drivers/llvmpipe/lp_texture.c +++ mesa-workdir/src/gallium/drivers/llvmpipe/lp_texture.c -@@ -1102,7 +1102,6 @@ llvmpipe_resource_get_param(struct pipe_screen *screen, +@@ -1152,7 +1152,7 @@ llvmpipe_resource_get_param(struct pipe_screen *screen, default: break; } - assert(0); ++ // assert(0); *value = 0; return false; } -diff --git mesa-clean/src/util/debug.c mesa-workdir/src/util/debug.c -index 89ae613..fbf45f4 100644 ---- mesa-clean/src/util/debug.c -+++ mesa-workdir/src/util/debug.c -@@ -23,6 +23,7 @@ - - #include - #include -+#include - #include "debug.h" - #include "u_string.h" - diff --git mesa-clean/src/util/detect_os.h mesa-workdir/src/util/detect_os.h -index 6506948..a631d69 100644 +index 6506948..93ce551 100644 --- mesa-clean/src/util/detect_os.h +++ mesa-workdir/src/util/detect_os.h -@@ -81,6 +81,11 @@ - #define DETECT_OS_UNIX 1 +@@ -28,6 +28,11 @@ + #define DETECT_OS_ANDROID 1 #endif +#if defined(__vinix__) @@ -72,20 +61,33 @@ index 6506948..a631d69 100644 +#define DETECT_OS_UNIX 1 +#endif + - - /* - * Make sure DETECT_OS_* are always defined, so that they can be used with #if -@@ -127,5 +132,8 @@ - #ifndef DETECT_OS_WINDOWS + #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + #define DETECT_OS_FREEBSD 1 + #define DETECT_OS_BSD 1 +@@ -128,4 +133,8 @@ #define DETECT_OS_WINDOWS 0 #endif + +#ifndef DETECT_OS_VINIX +#define DETECT_OS_VINIX 0 +#endif - ++ #endif /* DETECT_OS_H */ +diff --git mesa-clean/src/util/futex.h mesa-workdir/src/util/futex.h +index c397507..995c1e2 100644 +--- mesa-clean/src/util/futex.h ++++ mesa-workdir/src/util/futex.h +@@ -24,7 +24,7 @@ + #ifndef UTIL_FUTEX_H + #define UTIL_FUTEX_H + +-#if defined(HAVE_LINUX_FUTEX_H) ++#if defined(HAVE_LINUX_FUTEX_H) && defined(__linux__) + #define UTIL_FUTEX_SUPPORTED 1 + #elif defined(__FreeBSD__) + #define UTIL_FUTEX_SUPPORTED 1 diff --git mesa-clean/src/util/os_misc.c mesa-workdir/src/util/os_misc.c -index 31f1c55..0095e53 100644 +index c378a9e..64f6cff 100644 --- mesa-clean/src/util/os_misc.c +++ mesa-workdir/src/util/os_misc.c @@ -57,7 +57,7 @@ @@ -97,7 +99,7 @@ index 31f1c55..0095e53 100644 # include #elif DETECT_OS_OPENBSD || DETECT_OS_FREEBSD # include -@@ -223,7 +223,7 @@ os_get_option(const char *name) +@@ -248,7 +248,7 @@ exit_mutex: bool os_get_total_physical_memory(uint64_t *size) { @@ -107,19 +109,10 @@ index 31f1c55..0095e53 100644 const long page_size = sysconf(_SC_PAGE_SIZE); diff --git mesa-clean/src/util/os_time.c mesa-workdir/src/util/os_time.c -index d2edd88..d7c3dfb 100644 +index 7fb3134..38b6ade 100644 --- mesa-clean/src/util/os_time.c +++ mesa-workdir/src/util/os_time.c -@@ -53,7 +53,7 @@ - int64_t - os_time_get_nano(void) - { --#if DETECT_OS_LINUX || DETECT_OS_BSD -+#if DETECT_OS_LINUX || DETECT_OS_BSD || DETECT_OS_VINIX - - struct timespec tv; - clock_gettime(CLOCK_MONOTONIC, &tv); -@@ -92,7 +92,7 @@ os_time_get_nano(void) +@@ -65,7 +65,7 @@ os_time_get_nano(void) void os_time_sleep(int64_t usecs) { @@ -128,34 +121,33 @@ index d2edd88..d7c3dfb 100644 struct timespec time; time.tv_sec = usecs / 1000000; time.tv_nsec = (usecs % 1000000) * 1000; -diff --git mesa-clean/src/util/u_printf.h mesa-workdir/src/util/u_printf.h -index 44dcce5..e9e23ba 100644 ---- mesa-clean/src/util/u_printf.h -+++ mesa-workdir/src/util/u_printf.h -@@ -22,6 +22,8 @@ - #ifndef U_PRINTF_H - #define U_PRINTF_H +diff --git mesa-clean/src/util/u_debug.c mesa-workdir/src/util/u_debug.c +index 61f628e..e390606 100644 +--- mesa-clean/src/util/u_debug.c ++++ mesa-workdir/src/util/u_debug.c +@@ -32,6 +32,7 @@ + #include "util/u_math.h" + #include -+#include -+ - #ifdef __cplusplus - - #include -diff --git mesa-clean/src/util/u_thread.h mesa-workdir/src/util/u_thread.h -index 013e8be..a3a6031 100644 ---- mesa-clean/src/util/u_thread.h -+++ mesa-workdir/src/util/u_thread.h -@@ -129,7 +129,7 @@ static inline thrd_t u_thread_create(int (*routine)(void *), void *param) - static inline void u_thread_setname( const char *name ) ++#include + #include + #include /* CHAR_BIT */ + #include /* isalnum */ +diff --git mesa-clean/src/util/u_thread.c mesa-workdir/src/util/u_thread.c +index 55b6b68..277ffbd 100644 +--- mesa-clean/src/util/u_thread.c ++++ mesa-workdir/src/util/u_thread.c +@@ -75,7 +75,7 @@ int u_thread_create(thrd_t *thrd, int (*routine)(void *), void *param) + void u_thread_setname( const char *name ) { #if defined(HAVE_PTHREAD) --#if DETECT_OS_LINUX || DETECT_OS_CYGWIN || DETECT_OS_SOLARIS -+#if DETECT_OS_LINUX || DETECT_OS_CYGWIN || DETECT_OS_SOLARIS || DETECT_OS_VINIX +-#if DETECT_OS_LINUX || DETECT_OS_CYGWIN || DETECT_OS_SOLARIS || defined(__GLIBC__) ++#if DETECT_OS_LINUX || DETECT_OS_CYGWIN || DETECT_OS_SOLARIS || defined(__GLIBC__) || DETECT_OS_VINIX int ret = pthread_setname_np(pthread_self(), name); if (ret == ERANGE) { char buf[16]; -@@ -242,7 +242,7 @@ util_set_current_thread_affinity(const uint32_t *mask, - static inline int64_t +@@ -154,7 +154,7 @@ util_set_thread_affinity(thrd_t thread, + int64_t util_thread_get_time_nano(thrd_t thread) { -#if defined(HAVE_PTHREAD) && !defined(__APPLE__) && !defined(__HAIKU__) diff --git a/patches/mlibc/jinx-working-patch.patch b/patches/mlibc/jinx-working-patch.patch index f9112b852..785986064 100644 --- a/patches/mlibc/jinx-working-patch.patch +++ b/patches/mlibc/jinx-working-patch.patch @@ -1,3 +1,16 @@ +diff --git mlibc-clean/abis/linux/statvfs.h mlibc-workdir/abis/linux/statvfs.h +index 7a75d3a..15269b0 100644 +--- mlibc-clean/abis/linux/statvfs.h ++++ mlibc-workdir/abis/linux/statvfs.h +@@ -23,6 +23,8 @@ struct statvfs { + unsigned long f_fsid; + unsigned long f_flag; + unsigned long f_namemax; ++ ++ char f_basetype[80]; + }; + + #endif /* _ABIBITS_STATVFS_H */ diff --git mlibc-workdir/abis/vinix/signal.h mlibc-workdir/abis/vinix/signal.h new file mode 100644 index 0000000..4dcea40 @@ -196,10 +209,10 @@ index 0000000..4dcea40 + +#endif // _ABIBITS_SIGNAL_H diff --git mlibc-clean/meson.build mlibc-workdir/meson.build -index dc894e2..717fbac 100644 +index 72d0a14..512b0f4 100644 --- mlibc-clean/meson.build +++ mlibc-workdir/meson.build -@@ -204,6 +204,11 @@ elif host_machine.system() == 'keyronex' +@@ -215,6 +215,11 @@ elif host_machine.system() == 'keyronex' internal_conf.set10('MLIBC_MAP_DSO_SEGMENTS', true) internal_conf.set10('MLIBC_MAP_FILE_WINDOWS', true) subdir('sysdeps/keyronex') diff --git a/patches/xorg-proto/jinx-working-patch.patch b/patches/xorg-proto/jinx-working-patch.patch index ac88f6344..790af91be 100644 --- a/patches/xorg-proto/jinx-working-patch.patch +++ b/patches/xorg-proto/jinx-working-patch.patch @@ -1,5 +1,18 @@ +diff --git xorg-proto-clean/include/X11/Xfuncs.h xorg-proto-workdir/include/X11/Xfuncs.h +index b23c283..89dbbb5 100644 +--- xorg-proto-clean/include/X11/Xfuncs.h ++++ xorg-proto-workdir/include/X11/Xfuncs.h +@@ -44,7 +44,7 @@ void bcopy(); + # define bcmp(b1,b2,len) memcmp(b1, b2, len) + # else + # include +-# if defined(__SCO__) || defined(__sun) || defined(__UNIXWARE__) || defined(__CYGWIN__) || defined(_AIX) || defined(__APPLE__) ++# if defined(__SCO__) || defined(__sun) || defined(__UNIXWARE__) || defined(__CYGWIN__) || defined(_AIX) || defined(__APPLE__) || defined(__vinix__) + # include + # endif + # define _XFUNCS_H_INCLUDED_STRING_H diff --git xorg-proto-clean/include/X11/Xos.h xorg-proto-workdir/include/X11/Xos.h -index 75cc5b7..9adf88d 100644 +index 75cc5b7..6c46e33 100644 --- xorg-proto-clean/include/X11/Xos.h +++ xorg-proto-workdir/include/X11/Xos.h @@ -60,7 +60,7 @@ in this Software without prior written authorization from The Open Group. @@ -12,7 +25,7 @@ index 75cc5b7..9adf88d 100644 # else # ifndef index diff --git xorg-proto-clean/include/X11/Xos_r.h xorg-proto-workdir/include/X11/Xos_r.h -index f963b64..5ade17b 100644 +index f963b64..542c19d 100644 --- xorg-proto-clean/include/X11/Xos_r.h +++ xorg-proto-workdir/include/X11/Xos_r.h @@ -318,7 +318,7 @@ static __inline__ void _Xpw_copyPasswd(_Xgetpwparams p) diff --git a/recipes/bash b/recipes/bash index 322cb0546..16f3e7adb 100644 --- a/recipes/bash +++ b/recipes/bash @@ -1,14 +1,26 @@ name=bash -version=5.2.21 +version=5.2.26 revision=1 -tarball_url="https://ftp.gnu.org/gnu/bash/bash-${version}.tar.gz" +tarball_url="https://ftp.gnu.org/gnu/bash/bash-5.2.21.tar.gz" tarball_blake2b="6789c9a0d9eb1ad167d4199bf1438d77934a7bbeae9f9fdd7167cae006b17b3894852440248db1bb6e9cf6d930e8a18b6448a3bb4db8831b2e6d1445b56a2065" +source_allow_network=yes +source_imagedeps="curl" source_hostdeps="autoconf automake libtool pkg-config" imagedeps="gcc" hostdeps="gcc autoconf automake libtool pkg-config" deps="core-libs ncurses readline" regenerate() { + curl -Lo bash52-022 https://ftp.gnu.org/gnu/bash/bash-5.2-patches/bash52-022 + curl -Lo bash52-023 https://ftp.gnu.org/gnu/bash/bash-5.2-patches/bash52-023 + curl -Lo bash52-024 https://ftp.gnu.org/gnu/bash/bash-5.2-patches/bash52-024 + curl -Lo bash52-025 https://ftp.gnu.org/gnu/bash/bash-5.2-patches/bash52-025 + curl -Lo bash52-026 https://ftp.gnu.org/gnu/bash/bash-5.2-patches/bash52-026 + + for f in bash52-02*; do + patch -p0 < $f + done + AUTOHEADER=true \ autotools_recursive_regen } diff --git a/recipes/binutils b/recipes/binutils index 56aedf6a1..b64189dd8 100644 --- a/recipes/binutils +++ b/recipes/binutils @@ -1,8 +1,8 @@ name=binutils -version=2.41 +version=2.42 revision=1 tarball_url="https://ftp.gnu.org/gnu/binutils/binutils-${version}.tar.xz" -tarball_blake2b="3bccec2b52f7e82a727121bf2a2e51a6249ba63dcd74c665fd834e858645c912ffd8245d848435288b938852830b482905606f55c40df4061215fd75c52ffc75" +tarball_blake2b="e67a5c028fba70e70088fd11b38ec8c9c4ed5a019badefda25abeb6275997b16f0891e7ff3424c4b82bbfae92e8992669826920dd53df61cd48469d8f7cd5bd1" source_hostdeps="autoconf-2.69 automake libtool pkg-config" imagedeps="gcc" hostdeps="gcc autoconf-2.69 automake libtool pkg-config" @@ -17,15 +17,12 @@ regenerate() { build() { autotools_configure \ --target=${OS_TRIPLET} \ - --with-sysroot=/ \ --with-build-sysroot=${sysroot_dir} \ --enable-cet \ --enable-colored-disassembly \ --disable-werror \ - --disable-dependency-tracking \ --with-system-zlib - SFRAME_LIB_PATH="-L$(pwd -P)/libsframe/.libs" \ make -j${parallelism} all } diff --git a/recipes/cshim b/recipes/cshim new file mode 100644 index 000000000..01494d100 --- /dev/null +++ b/recipes/cshim @@ -0,0 +1,21 @@ +name=cshim +version=2ec3cf90aac9207ce54eee70aa013910f5a6d243 +revision=1 +tarball_url="https://github.com/managarm/cshim/archive/${version}.tar.gz" +tarball_blake2b="5b61d30b73900c9bd0c9081130cc9c7d6fec0719c9f916fd6da688246d117e6224206783beb78762b2954679c7ff6520f16177df65e04d203a580d42e136b43f" +imagedeps="meson ninja" +hostdeps="pkg-config" + +build() { + meson_configure \ + --includedir=share/cshim/include \ + -Dinstall_headers=true + + ninja -j${parallelism} +} + +package() { + DESTDIR="${dest_dir}" ninja install + + post_package_strip +} diff --git a/recipes/fontconfig b/recipes/fontconfig index 4e6189696..46b2d2757 100644 --- a/recipes/fontconfig +++ b/recipes/fontconfig @@ -1,8 +1,8 @@ name=fontconfig -version=2.14.2 +version=2.15.0 revision=1 tarball_url="https://www.freedesktop.org/software/fontconfig/release/fontconfig-${version}.tar.xz" -tarball_blake2b="4efeeb7f9a6705d493128d00b60e681a20a47556f4c0d7787a5c7a6d2cbbc22f150cad7988a9836a9e72aeb61e2b6a196c00a071c7042c62283c7720cdbb743d" +tarball_blake2b="17c85fddc4ab84111c4f50afb89ecd8792c3aeaa2690b38fd39fca6f6cece69e9ce0cd3af8a2e54968c79ad1f9bee1e444699a13c068d9dfd3dfe1212ff37533" source_hostdeps="automake autoconf libtool pkg-config" imagedeps="python gperf" hostdeps="gcc autoconf automake libtool pkg-config" diff --git a/recipes/frigg b/recipes/frigg index 84df948df..5d5eb1adb 100644 --- a/recipes/frigg +++ b/recipes/frigg @@ -1,8 +1,8 @@ name=frigg -version=a24e99eeb3125e7f48f657ff8afca26a9ac4aaae +version=1a415d6bef3aecabe5a4663f569ed71fa91bd603 revision=1 tarball_url="https://github.com/managarm/frigg/archive/${version}.tar.gz" -tarball_blake2b="bb47eb23f4a0d6cc31d8d2345d424d713f4c0f7b02c28a5a17d937023e778961a9a3a553facfdd60ce58d45da2479e6018ecbb9b39f9bf87c30995bb19698666" +tarball_blake2b="c86de5554146995ba9c5c9c35ed8dc7ad15669ac7a63e1ea8cac28e13e66d2938e0b1a4d7f738573fbbb981473a06c0c5fde5ee27ddfa98996120cfe1e804fa7" imagedeps="gcc meson ninja" hostdeps="pkg-config" diff --git a/recipes/gmp b/recipes/gmp index 7d8981748..c906d270e 100644 --- a/recipes/gmp +++ b/recipes/gmp @@ -9,7 +9,7 @@ hostdeps="gcc autoconf automake libtool pkg-config" deps="core-libs" regenerate() { - autoreconf -fvi + autotools_recursive_regen } build() { diff --git a/recipes/grep b/recipes/grep index 9d9bf15fa..6bc28b421 100644 --- a/recipes/grep +++ b/recipes/grep @@ -9,7 +9,7 @@ hostdeps="gcc autoconf automake libtool pkg-config" deps="core-libs pcre2" regenerate() { - autoreconf -fvi + autotools_recursive_regen } build() { diff --git a/recipes/gzip b/recipes/gzip index 9b3123382..c12f73518 100644 --- a/recipes/gzip +++ b/recipes/gzip @@ -8,7 +8,7 @@ hostdeps="gcc autoconf automake libtool pkg-config" deps="core-libs" regenerate() { - autoreconf -fvi + autotools_recursive_regen } build() { diff --git a/recipes/icu b/recipes/icu index 0471c2763..95f2dbb1c 100644 --- a/recipes/icu +++ b/recipes/icu @@ -1,8 +1,8 @@ name=icu -version=73.1 +version=74.1 revision=1 -tarball_url="https://github.com/unicode-org/icu/releases/download/release-73-1/icu4c-73_1-src.tgz" -tarball_blake2b="45de117efc4a49301c04a997963393967a70b8583abf1a9626331e275c5bc329cf2685de5c80b32f764c8ff2530b5594316d7119ce66503e5adba7842ca24424" +tarball_url="https://github.com/unicode-org/icu/releases/download/release-74-1/icu4c-74_1-src.tgz" +tarball_blake2b="cf8277cd513bd99c85104669e617683e4a91280c4c15a396021289fe0093d64682466550a44a0115bcc9e7abf30e3108dbadfb46e85e832e4cfd689618968507" source_hostdeps="autoconf automake libtool pkg-config" source_deps="autoconf-archive" imagedeps="gcc" diff --git a/recipes/less b/recipes/less index 8307c4b3e..d5289997c 100644 --- a/recipes/less +++ b/recipes/less @@ -8,7 +8,7 @@ hostdeps="gcc autoconf automake libtool pkg-config" deps="core-libs ncurses" regenerate() { - autoreconf -fvi + autotools_recursive_regen } build() { diff --git a/recipes/libexpat b/recipes/libexpat index 72c936cf1..a08a642a4 100644 --- a/recipes/libexpat +++ b/recipes/libexpat @@ -8,7 +8,7 @@ hostdeps="gcc autoconf automake libtool pkg-config" deps="core-libs" regenerate() { - autoreconf -fvi + autotools_recursive_regen } build() { diff --git a/recipes/libffi b/recipes/libffi index 646bc260f..37cc71f48 100644 --- a/recipes/libffi +++ b/recipes/libffi @@ -8,7 +8,7 @@ hostdeps="gcc autoconf automake libtool pkg-config" deps="core-libs" regenerate() { - autoreconf -fvi + autotools_recursive_regen } build() { diff --git a/recipes/libpng b/recipes/libpng index f515dd626..09b31469b 100644 --- a/recipes/libpng +++ b/recipes/libpng @@ -1,14 +1,14 @@ name=libpng -version=1.6.40 +version=1.6.41 revision=1 tarball_url="https://download.sourceforge.net/libpng/libpng-${version}.tar.xz" -tarball_blake2b="4dd2df57791ca68cc31ba966b9176ecb37458572c60eef34e31ff0d3266d25ad6ea9d2e8cae6bfaf7932b5c7bc231047d3ed139b3464304c41cc4d89611f5ba8" +tarball_blake2b="43d8d1c563d9df46b663f706dca9563e31e6e47a2809a77a5d059de8cfa348721054df724d08ac24ef4717ffc101989941127df2d026c9537532375d9b432b68" source_hostdeps="automake autoconf libtool pkg-config" hostdeps="gcc autoconf automake libtool pkg-config" deps="core-libs zlib" regenerate() { - autoreconf -fvi + autotools_recursive_regen } build() { diff --git a/recipes/libxcrypt b/recipes/libxcrypt index ff6307f10..deb43b564 100644 --- a/recipes/libxcrypt +++ b/recipes/libxcrypt @@ -9,7 +9,7 @@ hostdeps="gcc automake autoconf libtool pkg-config" deps="mlibc libgcc libstdc++" regenerate() { - autoreconf -fvi + autotools_recursive_regen } build() { diff --git a/recipes/libxml b/recipes/libxml index b8b63d833..7e97435d6 100644 --- a/recipes/libxml +++ b/recipes/libxml @@ -1,14 +1,14 @@ name=libxml -version=2.12.3 +version=2.12.4 revision=1 tarball_url="https://download.gnome.org/sources/libxml2/2.12/libxml2-${version}.tar.xz" -tarball_blake2b="12a7c25d2a13d839aac918268b0948a9bd3c352bc29dd09bb975a9b4ff99d299a0e157b1a90f01bdce8ddc36ede9a6834b0dc26635ac775a41bd28d9b2ad7cff" +tarball_blake2b="d2a035636ab9c5a56773fe5c3b67780d3b59a7ffeee39cf2b62ad34d1cf3d250c5fd3055e544518713ad3351bd715fc668314165c1e9c9ce4fe3b7a84ef12872" source_hostdeps="automake autoconf libtool pkg-config" hostdeps="gcc autoconf automake libtool pkg-config" deps="core-libs zlib icu readline" regenerate() { - autoreconf -fvi + autotools_recursive_regen } build() { diff --git a/recipes/limine b/recipes/limine index d6147c277..7a16df048 100644 --- a/recipes/limine +++ b/recipes/limine @@ -1,15 +1,15 @@ name=limine -version=7.0.0 +version=7.0.5 revision=1 tarball_url="https://github.com/limine-bootloader/limine/releases/download/v${version}/limine-${version}.tar.xz" -tarball_blake2b="7986d948fe84c80b338e5cc66edca5f511d277d2e854484c87183666bf1b075480b61213c177b6e39a1145502cc9e07b9e1442c3dcf3171339af5b55ac9c184f" +tarball_blake2b="029953e1a5adeac2b1cd92bfff3b3a893b8ad1f458f1560b194ad0607638a3cc77d4927f1f4376a958d7ae513400ec615ab092ef97cbb220e5866821e83f7fdc" source_hostdeps="autoconf automake libtool pkg-config" imagedeps="mtools nasm" hostdeps="gcc autoconf automake libtool pkg-config" deps="core-libs" regenerate() { - autoreconf -fvi + autotools_recursive_regen } build() { diff --git a/recipes/llvm b/recipes/llvm index ab5a37a3e..f2705632d 100644 --- a/recipes/llvm +++ b/recipes/llvm @@ -1,25 +1,25 @@ name=llvm -version=14.0.6 +version=17.0.6 revision=1 tarball_url="https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/llvm-project-${version}.src.tar.xz" -tarball_blake2b="ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99" -imagedeps="gcc ninja python git cmake" -hostdeps="gcc pkg-config" -deps="core-libs zlib" +tarball_blake2b="d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2" +imagedeps="gcc ninja python git" +hostdeps="gcc cmake pkg-config" +deps="core-libs ncurses zlib zstd libffi" build() { cmake \ -GNinja \ -DCMAKE_TOOLCHAIN_FILE=${base_dir}/build-support/CMakeToolchain.txt \ - -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_PREFIX=${prefix} \ -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=ON \ + -DLLVM_LINK_LLVM_DYLIB=ON \ + -DLLVM_ENABLE_FFI=ON \ + -DLLVM_ENABLE_EH=ON \ -DLLVM_ENABLE_RTTI=ON \ - -DLLVM_TARGETS_TO_BUILD=X86 \ - -DLLVM_TARGET_ARCH=x86_64 \ + -DLLVM_ENABLE_PROJECTS="clang;lld" \ -DLLVM_DEFAULT_TARGET_TRIPLE=${OS_TRIPLET} \ -DLLVM_HOST_TRIPLE=${OS_TRIPLET} \ - -DLLVM_ENABLE_TERMINFO=OFF \ -Wno-dev \ ${source_dir}/llvm @@ -29,5 +29,7 @@ build() { package() { DESTDIR="${dest_dir}" ninja install + rm -rf "${dest_dir}${prefix}"/lib/*.a + post_package_strip } diff --git a/recipes/make b/recipes/make index 0b5e886ac..efe49df26 100644 --- a/recipes/make +++ b/recipes/make @@ -8,7 +8,7 @@ hostdeps="gcc autoconf automake libtool pkg-config" deps="core-libs" regenerate() { - autoreconf -fvi + autotools_recursive_regen } build() { diff --git a/recipes/mesa b/recipes/mesa index f05071f47..be1fa950a 100644 --- a/recipes/mesa +++ b/recipes/mesa @@ -1,17 +1,16 @@ name=mesa -version=21.3.9 +version=23.3.4 revision=1 tarball_url="https://archive.mesa3d.org/mesa-${version}.tar.xz" -tarball_blake2b="79669f9492c505b1729c526adf5a8261737b6088bdf01db654a0dca8ba22600ec985b574edfeee3a28c76e6e0f815782362973876e1d75b58f4417f45df70add" +tarball_blake2b="85687793853675a43da5135f41d0512cb4729f3dd824e2ad28d9bda129258adb00dd7da1e75e76cae71c1148e6a2ede84e1efda640c11aff233e5e12b0cea554" imagedeps="binutils meson ninja python-mako" hostdeps="gcc pkg-config" deps="core-libs llvm zlib libxshmfence libxrandr libxdamage libxxf86vm libxfixes libx11 libxext libxcb libexpat" build() { meson_configure \ - -Dglx=gallium-xlib \ + -Dglx=xlib \ -Dplatforms=x11 \ - -Ddri-drivers= \ -Dgallium-drivers=swrast \ -Dvulkan-drivers= \ -Dllvm=enabled diff --git a/recipes/mlibc b/recipes/mlibc index 735efc66d..951292d9c 100644 --- a/recipes/mlibc +++ b/recipes/mlibc @@ -1,11 +1,11 @@ name=mlibc -version=b5627685013748f0faff3c16ebc2569f958f3cb5 +version=f69bcc4eb377c7d94c6663d288c34a3e18e34257 revision=1 -tarball_url="https://github.com/mintsuki/mlibc/archive/${version}.tar.gz" -tarball_blake2b="c98c20c03647f0f5828bc95d82217ece8e5d0eee1bbb293dc809d1b39bd8219064d68ab8499c5f7e26c7377a8829cccdeeca1974bdd574cd3d85166e56c7622d" +tarball_url="https://github.com/managarm/mlibc/archive/${version}.tar.gz" +tarball_blake2b="8d8e3e2dbfb0bfc675f18b6d71b4f2781f65758ae427a4ff5b1e2715c22ac20d07ab58d70d980ca15547a0da6ec8267cc4e7a836130c53b382ff58831faf0c56" imagedeps="meson ninja" hostdeps="gcc pkg-config libgcc-binaries" -builddeps="cxxshim frigg" +builddeps="cshim cxxshim frigg" deps="mlibc-headers" build() { diff --git a/recipes/mlibc-headers b/recipes/mlibc-headers index f54bb7558..6251f31ec 100644 --- a/recipes/mlibc-headers +++ b/recipes/mlibc-headers @@ -3,7 +3,6 @@ revision=1 from_source=mlibc imagedeps="meson ninja" hostdeps="pkg-config" -builddeps="cxxshim frigg" build() { meson_configure \ diff --git a/recipes/mpc b/recipes/mpc index 0358d2809..3e539cbaf 100644 --- a/recipes/mpc +++ b/recipes/mpc @@ -10,7 +10,7 @@ hostdeps="gcc autoconf automake libtool pkg-config" deps="core-libs gmp mpfr" regenerate() { - autoreconf -fvi + autotools_recursive_regen } build() { diff --git a/recipes/mpfr b/recipes/mpfr index b702c670c..ac0e4a1a7 100644 --- a/recipes/mpfr +++ b/recipes/mpfr @@ -10,7 +10,7 @@ hostdeps="gcc autoconf automake libtool pkg-config" deps="core-libs gmp" regenerate() { - autoreconf -fvi + autotools_recursive_regen } build() { diff --git a/recipes/nano b/recipes/nano index cc61bbd40..f4484ff0e 100644 --- a/recipes/nano +++ b/recipes/nano @@ -8,7 +8,7 @@ hostdeps="gcc automake autoconf libtool pkg-config" deps="core-libs ncurses" regenerate() { - autoreconf -fvi + autotools_recursive_regen } build() { diff --git a/recipes/nasm b/recipes/nasm index e391aeb82..012478735 100644 --- a/recipes/nasm +++ b/recipes/nasm @@ -1,14 +1,14 @@ name=nasm -version=2.15.05 +version=2.16.01 revision=1 tarball_url="https://www.nasm.us/pub/nasm/releasebuilds/${version}/nasm-${version}.tar.xz" -tarball_blake2b="a41434965c2125577b762d907a0a3c251c75d9f9beac230fba4099182c7f7beb08c6d2c05c2432b0dc8ba829f24077f44c3096faea9bd0a533250e6dbbfaef35" +tarball_blake2b="0f7e96648e3db6fa4a8e10a89885f61cab7d79af25adbcc9d4706b3af61206c3cae024b7f873d636f5c1b2cb34ce5e7fbecc16af9b59086e9a1f49fb37c59670" source_hostdeps="automake autoconf libtool pkg-config" hostdeps="gcc automake autoconf libtool pkg-config" deps="core-libs" regenerate() { - autoreconf -fvi -I$(realpath ./autoconf) + autotools_recursive_regen -I$(realpath ./autoconf) } build() { diff --git a/recipes/ncurses b/recipes/ncurses index e11c0788c..3e656be43 100644 --- a/recipes/ncurses +++ b/recipes/ncurses @@ -1,8 +1,8 @@ name=ncurses -version=6.4.20231111 +version=6.4.20240127 revision=1 -tarball_url="https://github.com/ThomasDickey/ncurses-snapshots/archive/refs/tags/v6_4_20231111.tar.gz" -tarball_blake2b="0d7b490b50e58281250cc4ebdac8f35cbb3fbf0e13578524003ae4c26c10507d59fb8dd2a4d67102067df77d857c41e6c37c509d9a7cee8661dd3bb80f7cbfef" +tarball_url="https://github.com/ThomasDickey/ncurses-snapshots/archive/refs/tags/v6_4_20240127.tar.gz" +tarball_blake2b="f7896f50d9b5c0c8c125f0b0da50f17405460849f99d678d9d0b5024f1d55de13bb0650e60fa987dd8ce620a5081a5184601cf4aeb51906737ea28dd21dd6177" source_hostdeps="autoconf automake libtool pkg-config" imagedeps="gcc ncurses patchelf" hostdeps="gcc automake autoconf libtool pkg-config" diff --git a/recipes/nettle b/recipes/nettle index c9b60ffba..a085ccaf7 100644 --- a/recipes/nettle +++ b/recipes/nettle @@ -9,7 +9,7 @@ hostdeps="gcc autoconf automake libtool pkg-config" deps="core-libs gmp" regenerate() { - autoreconf -fvi + autotools_recursive_regen } build() { diff --git a/recipes/nyancat b/recipes/nyancat new file mode 100644 index 000000000..84b6cf127 --- /dev/null +++ b/recipes/nyancat @@ -0,0 +1,22 @@ +name=nyancat +version=1.5.2 +revision=1 +tarball_url="https://github.com/klange/nyancat/archive/refs/tags/${version}.tar.gz" +tarball_blake2b="4c197c7d630edc7184b57fd2b33fb422a69120e2db2994bc326e772278bca9fa1cc8a837da747bc7a9114090d43133ad48e22ed3319fc92485f82c1e7b5e67b9" +hostdeps="gcc pkg-config" +deps="core-libs" + +build() { + cp -rp "${source_dir}"/. ./ + + make CC=${OS_TRIPLET}-gcc -j${parallelism} +} + +package() { + install -d "${dest_dir}${prefix}"/bin + install src/nyancat "${dest_dir}${prefix}"/bin/ + install -d "${dest_dir}${prefix}"/share/man/man1 + install -m 644 nyancat.1 "${dest_dir}${prefix}"/share/man/man1/ + + post_package_strip +} diff --git a/recipes/pcre2 b/recipes/pcre2 index baf6c779c..5b945c958 100644 --- a/recipes/pcre2 +++ b/recipes/pcre2 @@ -8,7 +8,7 @@ hostdeps="gcc autoconf automake libtool pkg-config" deps="core-libs bzip2 ncurses readline zlib" regenerate() { - autoreconf -fvi + autotools_recursive_regen } build() { diff --git a/recipes/pixman b/recipes/pixman index f1f294f5f..bfa5532bf 100644 --- a/recipes/pixman +++ b/recipes/pixman @@ -1,24 +1,20 @@ name=pixman -version=0.42.2 +version=0.43.2 revision=1 tarball_url="https://www.x.org/archive/individual/lib/pixman-${version}.tar.xz" -tarball_blake2b="6286a9d064a5a24017fccbb0a6e9f6ef932077c2e33ec043826d4a7a6c707c9111d3de4b806cbcdb47fc2794f1f930d24d078de1ff2912061967db0890540957" -source_hostdeps="automake autoconf libtool pkg-config" -hostdeps="gcc autoconf automake libtool pkg-config" +tarball_blake2b="82734efb7cede5b1aeff3a865bfa2a81ff3176be50edc10deb1b5541f160b2dfd21303c1eccba53c0df83f471f3489084479a423dc2f818019af97d4b41dad68" +imagedeps="meson ninja" +hostdeps="gcc pkg-config" deps="core-libs libpng" -regenerate() { - autoreconf -fvi -} - build() { - autotools_configure + meson_configure - make -j${parallelism} + ninja -j${parallelism} } package() { - DESTDIR="${dest_dir}" make install + DESTDIR="${dest_dir}" ninja install post_package_strip } diff --git a/recipes/readline b/recipes/readline index 2f72afa72..547ce3d1e 100644 --- a/recipes/readline +++ b/recipes/readline @@ -1,15 +1,33 @@ name=readline -version=8.2 +version=8.2.10 revision=1 -tarball_url="https://ftp.gnu.org/gnu/readline/readline-${version}.tar.gz" +tarball_url="https://ftp.gnu.org/gnu/readline/readline-8.2.tar.gz" tarball_blake2b="7974322b9c092a756a79e537df08e8532f8e0fcb598f77732e28287c33ebec9e9837ed88b43334c310892d56a871b423903f0f564def2fbe700a1004f2ae7b18" +source_allow_network="yes" +source_imagedeps="curl" source_hostdeps="automake autoconf libtool pkg-config" imagedeps="patchelf" hostdeps="gcc autoconf automake libtool pkg-config" deps="core-libs ncurses" regenerate() { - AUTOHEADER=true autoreconf -fvi + curl -Lo readline82-001 https://ftp.gnu.org/gnu/readline/readline-8.2-patches/readline82-001 + curl -Lo readline82-002 https://ftp.gnu.org/gnu/readline/readline-8.2-patches/readline82-002 + curl -Lo readline82-003 https://ftp.gnu.org/gnu/readline/readline-8.2-patches/readline82-003 + curl -Lo readline82-004 https://ftp.gnu.org/gnu/readline/readline-8.2-patches/readline82-004 + curl -Lo readline82-005 https://ftp.gnu.org/gnu/readline/readline-8.2-patches/readline82-005 + curl -Lo readline82-006 https://ftp.gnu.org/gnu/readline/readline-8.2-patches/readline82-006 + curl -Lo readline82-007 https://ftp.gnu.org/gnu/readline/readline-8.2-patches/readline82-007 + curl -Lo readline82-008 https://ftp.gnu.org/gnu/readline/readline-8.2-patches/readline82-008 + curl -Lo readline82-009 https://ftp.gnu.org/gnu/readline/readline-8.2-patches/readline82-009 + curl -Lo readline82-010 https://ftp.gnu.org/gnu/readline/readline-8.2-patches/readline82-010 + + for f in readline82-0*; do + patch -p0 < $f + done + + AUTOHEADER=true \ + autotools_recursive_regen } build() { diff --git a/recipes/sed b/recipes/sed index 3759d09ed..5c1e6542d 100644 --- a/recipes/sed +++ b/recipes/sed @@ -8,7 +8,7 @@ hostdeps="gcc autoconf automake libtool pkg-config" deps="core-libs" regenerate() { - autoreconf -fvi + autotools_recursive_regen } build() { diff --git a/recipes/tar b/recipes/tar index 347e36116..d705eb520 100644 --- a/recipes/tar +++ b/recipes/tar @@ -8,7 +8,7 @@ hostdeps="gcc autoconf automake libtool pkg-config" deps="core-libs" regenerate() { - autoreconf -fvi + autotools_recursive_regen } build() { diff --git a/recipes/tzdata b/recipes/tzdata index a550b3957..331612868 100644 --- a/recipes/tzdata +++ b/recipes/tzdata @@ -1,8 +1,8 @@ name=tzdata -version=2023c +version=2023d revision=1 tarball_url="https://data.iana.org/time-zones/releases/tzdata${version}.tar.gz" -tarball_blake2b="8a50aa5f338565d86b8fa5428c138b251bd8dcc3ea66c144b49625d02c5c7aa27f1ace66babd36f10f75cf5eb832ec327b9c2e8adb0384c450130d1ee8c45562" +tarball_blake2b="b79be37a8a258745d162a575c795ee6476b4fa5f6d2f7b562d9431a238eca276a1747a983778291184fc6e40a0c1f5e6284d41290fd6d1d3bd3118bda83f426e" imagedeps="tzdata" hostdeps="gcc binutils" deps="core-libs" diff --git a/recipes/xbitmaps b/recipes/xbitmaps index 44df89304..3f4b99c50 100644 --- a/recipes/xbitmaps +++ b/recipes/xbitmaps @@ -1,8 +1,8 @@ name=xbitmaps -version=1.1.2 +version=1.1.3 revision=1 -tarball_url="https://www.x.org/pub/individual/data/xbitmaps-${version}.tar.bz2" -tarball_blake2b="eff2f1e2efbabf447cbe98db09f81db96dc1442d4cce01b570774fb4e3e7323a40385d7821685724a9d9c69219528da980b2ecf01b0d3b822be8879e4d7f3e9c" +tarball_url="https://www.x.org/pub/individual/data/xbitmaps-${version}.tar.gz" +tarball_blake2b="b5bde889f7b821952ec7102c04ee35145e3434e49cb8b6f78de61519f3679a68269fdeb49885be2747288bb66722f954459e65c530058578ab542d9750a2a5a8" source_hostdeps="autoconf automake libtool pkg-config" source_deps="xorg-util-macros" hostdeps="gcc autoconf automake libtool pkg-config" diff --git a/recipes/xcb-proto b/recipes/xcb-proto index bee617424..44b46bb71 100644 --- a/recipes/xcb-proto +++ b/recipes/xcb-proto @@ -9,7 +9,7 @@ hostdeps="gcc autoconf automake libtool pkg-config" deps="core-libs" regenerate() { - autoreconf -fvi + autotools_recursive_regen } build() { diff --git a/recipes/xkeyboard-config b/recipes/xkeyboard-config index 7089177e1..a77c62761 100644 --- a/recipes/xkeyboard-config +++ b/recipes/xkeyboard-config @@ -1,27 +1,21 @@ name=xkeyboard-config -version=2.34 +version=2.40 revision=1 -tarball_url="https://www.x.org/archive/individual/data/xkeyboard-config/xkeyboard-config-${version}.tar.gz" -tarball_blake2b="dcd4e7b0b8daf146b92fbb56c64eb32b7d2f42d75a8716226e5bc13b30624aca3ac95e97541561ba2429d5089f6dad495111b1a3f4a76b02d10dbe249461f921" -source_hostdeps="automake autoconf libtool pkg-config" -source_deps="xorg-util-macros" -imagedeps="python" -hostdeps="gcc autoconf automake libtool pkg-config" +tarball_url="https://www.x.org/archive/individual/data/xkeyboard-config/xkeyboard-config-${version}.tar.xz" +tarball_blake2b="79dd20e588e72c9fe65ff0885889ae3e2ad0ffbb66b27cf90db36fecfd41f24667fcc0a0a7fc96f3bc5d01502532af3e6b560719413bc16529328dd02d353c92" +imagedeps="meson ninja python" +hostdeps="gcc pkg-config" deps="core-libs xorg-xkbcomp" -regenerate() { - autotools_recursive_regen -} - build() { - autotools_configure \ - --with-xkb-rules-symlink=xorg + meson_configure \ + -Dxorg-rules-symlinks=true - make -j${parallelism} + ninja -j${parallelism} } package() { - DESTDIR="${dest_dir}" make install + DESTDIR="${dest_dir}" ninja install post_package_strip } diff --git a/recipes/xorg-server b/recipes/xorg-server index ce2985cbc..9d9c1cb27 100644 --- a/recipes/xorg-server +++ b/recipes/xorg-server @@ -6,14 +6,13 @@ tarball_blake2b="0a18840979bb8b20b02eca9d737f20ddcf92a4771386074c38692df8a1c9b0f source_hostdeps="automake autoconf libtool pkg-config" source_deps="xtrans xorg-font-util xorg-util-macros" hostdeps="gcc autoconf automake libtool pkg-config" -deps="core-libs xorg-proto xcb-proto xtrans libxinerama libxcvt libxshmfence libx11 libxaw libxxf86vm libxkbfile libxmu libxfont2 libepoxy libxi libxv libxdamage libxrender libxrandr libxcb libxfixes libxext nettle xorg-xkbcomp xkeyboard-config pixman" +deps="core-libs xorg-util-macros xorg-proto xcb-proto xtrans libxinerama libxcvt libxshmfence libx11 libxaw libxxf86vm libxkbfile libxmu libxfont2 libepoxy libxi libxv libxdamage libxrender libxrandr libxcb libxfixes libxext nettle xorg-xkbcomp xkeyboard-config pixman" regenerate() { autotools_recursive_regen } build() { - CFLAGS="-Wno-error=array-bounds ${common_flags}" \ autotools_configure \ --with-xkb-bin-directory=/usr/bin \ --with-xkb-path=/usr/share/X11/xkb \ diff --git a/recipes/xorg-util-macros b/recipes/xorg-util-macros index 8d798f7f3..0f9b76a83 100644 --- a/recipes/xorg-util-macros +++ b/recipes/xorg-util-macros @@ -8,7 +8,7 @@ hostdeps="gcc autoconf automake libtool pkg-config" deps="core-libs" regenerate() { - autoreconf -fvi + autotools_recursive_regen } build() { diff --git a/recipes/xorg-xeyes b/recipes/xorg-xeyes index bac153bb7..7fcca6154 100644 --- a/recipes/xorg-xeyes +++ b/recipes/xorg-xeyes @@ -1,8 +1,8 @@ name=xorg-xeyes -version=1.2.0 +version=1.3.0 revision=1 tarball_url="https://xorg.freedesktop.org/archive/individual/app/xeyes-${version}.tar.gz" -tarball_blake2b="de152dff4bffb8ce43f7a8ae6b3362088f829acfa2a276b714cb5f92fb7af2935553f685a5cbe9d5f4362177fa71afc5b9e2aabe18010d247a16bad7892c8a7c" +tarball_blake2b="76f24c332bf93cb64b6c53c0bbd662f74be96cc08e05a8aec81ed23c25cb80c1b6258f98e824f7bbe9184b7d882d28e98e1e645f20cf2c3a07f480bd5b479395" source_hostdeps="automake autoconf libtool pkg-config" source_deps="xorg-util-macros" hostdeps="gcc autoconf automake libtool pkg-config" diff --git a/recipes/xorg-xsetroot b/recipes/xorg-xsetroot index b40e9160c..83376cc96 100644 --- a/recipes/xorg-xsetroot +++ b/recipes/xorg-xsetroot @@ -1,12 +1,12 @@ name=xorg-xsetroot -version=1.1.2 +version=1.1.3 revision=1 tarball_url="https://www.x.org/archive/individual/app/xsetroot-${version}.tar.gz" -tarball_blake2b="748f5d1a3f2e49883c46406f5ed04aa97f58c1d007ae4a976ffc4e7e816e3c87a2605ab3a288b7448e6877256684ad07b15ae78e97c319cc60f32efaf1732c2e" +tarball_blake2b="b904a9f622883d050751026966341daac1e31ac7c66a6bc54ee6e370c7f096aa5158c7fdc37feb796c7ff7720f654cf9ec194e4ecdb95a3049f3021afee2cb8e" source_hostdeps="autoconf automake libtool pkg-config" source_deps="xorg-util-macros" hostdeps="gcc autoconf automake libtool pkg-config" -deps="core-libs libx11 libxmu xbitmaps libxcursor" +deps="core-libs xorg-util-macros libx11 libxmu xbitmaps libxcursor" regenerate() { autotools_recursive_regen diff --git a/recipes/xz b/recipes/xz index 4b969038e..861cea547 100644 --- a/recipes/xz +++ b/recipes/xz @@ -1,14 +1,14 @@ name=xz -version=5.4.5 +version=5.4.6 revision=1 -tarball_url="https://tukaani.org/xz/xz-${version}.tar.gz" -tarball_blake2b="647c8227080a7f37e3321e778d7f52ccb9da3810f2be81b2d2b46001605b22cef6e724f9b3facfada26a12b24401c9a11449d6066443849b37b28e0eaa199315" +tarball_url="https://github.com/tukaani-project/xz/releases/download/v${version}/xz-${version}.tar.gz" +tarball_blake2b="f0bbd33ea7cd64d475c3501f6e76080c8c0080e377f23462f5f76459935f4e621538ddaa8452d2feaed278d62a596e38ed2aca18ed9e76512c4ec77fa2f4cc5f" source_hostdeps="automake autoconf libtool pkg-config" hostdeps="gcc autoconf automake libtool pkg-config" deps="core-libs" regenerate() { - autoreconf -fvi + autotools_recursive_regen } build() { diff --git a/recipes/zlib b/recipes/zlib index 4591965f9..80de17acf 100644 --- a/recipes/zlib +++ b/recipes/zlib @@ -1,8 +1,8 @@ name=zlib -version=1.3 +version=1.3.1 revision=1 tarball_url="https://github.com/madler/zlib/archive/refs/tags/v${version}.tar.gz" -tarball_blake2b="e663d8041a613b544d76313e61b6340adacb53322422d4b6392455627c80cbac430b9fd0fb4a69e59b0fa110f120d29a1e9513bb37888442cc1b9d5075f47ea6" +tarball_blake2b="6d15d8f3c8feaf602043bb6e72316ee721c33ef24e110e3bf03fb12eac9703fd29e352268d202ecd2f18b526b4f1dbd90c8046e01ad8e64ddce3e55ad5db513e" imagedeps="patchelf" hostdeps="gcc pkg-config" deps="core-libs" diff --git a/source-recipes/cmake b/source-recipes/cmake new file mode 100644 index 000000000..95b1abfd5 --- /dev/null +++ b/source-recipes/cmake @@ -0,0 +1,4 @@ +name=cmake +version=3.28.2 +tarball_url="https://github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}.tar.gz" +tarball_blake2b="59941152814af141cdbea5a649d809cb86edaf2f460a493278872cb0dcff45ea2c68d7e783cd4bc4b369bf4d41175aee6d49a4e2b983877700be933340f6596b" diff --git a/source-recipes/libgcc-binaries b/source-recipes/libgcc-binaries index 749340993..768b3781d 100644 --- a/source-recipes/libgcc-binaries +++ b/source-recipes/libgcc-binaries @@ -1,4 +1,4 @@ name=libgcc-binaries -version=1e4b24ef15a7d9a2db7570d1c9283fc474dcbd73 +version=7b5ec47da1f47c2965229c2739f4f141d17434f4 tarball_url="https://github.com/mintsuki/libgcc-binaries/archive/${version}.tar.gz" -tarball_blake2b="77b8af0466577ca5af9b16d968865d24d42fb422566de2f03dd5b2d984f70015da6b1bd28878855889ee665f0ace4419cee3c40d20ac1176b0c500a1e50302bd" +tarball_blake2b="153b7ddaaae49bf0a48271099e76839255e8b533f5c216c22aff0c20c36209a64b70eb20eefe5a38ae47aaa64ce9664e5a4b3379f7462e34b6ed08c8bd5e7c21" diff --git a/source-recipes/pkg-config b/source-recipes/pkg-config index 1195750a2..b50f6f0a7 100644 --- a/source-recipes/pkg-config +++ b/source-recipes/pkg-config @@ -1,9 +1,9 @@ name=pkg-config version=2.1.0 -tarball_url="https://github.com/pkgconf/pkgconf/archive/refs/tags/pkgconf-${version}.tar.gz" -tarball_blake2b="ab0f03494c37659c18a882ff03e6bb746c3cfe0ad66b7a9d9d0b2de66bec89258b2374addd3eb3a571442d8bab3c1311410e296379b697d16aaebe2bc89b318c" +tarball_url="https://distfiles.ariadne.space/pkgconf/pkgconf-${version}.tar.xz" +tarball_blake2b="43ac91f15106764f0b03ac4e1c3ff59aaba0436a221a295be93dd1a78b74e0185e60be8d24d040cc4ce0b0fb4446a6a8f493e7cc69bafafe5cefa9beab9b2bd5" hostdeps="autoconf automake libtool" regenerate() { - autoreconf -fvi + autotools_recursive_regen }