From 21822e4469b0087f696a05332bfdef1c3fae7bbe Mon Sep 17 00:00:00 2001 From: Dominik Hassler Date: Sat, 27 Jul 2024 12:49:37 +0000 Subject: [PATCH 1/2] rust: update to 1.80.0 --- build/clang/build-14.sh | 93 ------------------- ...-__illumos__-preprocessor-definition.patch | 11 --- .../patches-14/add-rpath-for-libstdcxx.patch | 61 ------------ .../default-preprocessor-definition.patch | 34 ------- .../no-default-libgcc_s-linking.patch | 21 ----- .../patches-14/no-default-libm-linking.patch | 12 --- .../no-sanitizer-runtime-lib-linking.patch | 12 --- build/clang/patches-14/no-ssp-linking.patch | 17 ---- .../patches-14/no-symbolic-functions.patch | 12 --- .../patches-14/no-usr-local-include.patch | 24 ----- .../clang/patches-14/no-version-script.patch | 40 -------- build/clang/patches-14/series | 11 --- build/clang/patches-14/use-gas.patch | 12 --- build/llvm/build-14.sh | 72 -------------- build/llvm/patches-14/madvise.patch | 12 --- build/llvm/patches-14/series | 2 - .../tools_llvm-shlib_CMakeLists.txt.patch | 35 ------- build/meta/extra-build-tools.p5m | 1 - build/rust/build.sh | 65 +++++++------ build/rust/patches/aarch64-eh_frame-ro.patch | 17 ++++ build/rust/patches/series | 1 + doc/baseline | 2 - doc/packages.md | 4 +- lib/config.sh | 5 + 24 files changed, 55 insertions(+), 521 deletions(-) delete mode 100755 build/clang/build-14.sh delete mode 100644 build/clang/patches-14/add-__illumos__-preprocessor-definition.patch delete mode 100644 build/clang/patches-14/add-rpath-for-libstdcxx.patch delete mode 100644 build/clang/patches-14/default-preprocessor-definition.patch delete mode 100644 build/clang/patches-14/no-default-libgcc_s-linking.patch delete mode 100644 build/clang/patches-14/no-default-libm-linking.patch delete mode 100644 build/clang/patches-14/no-sanitizer-runtime-lib-linking.patch delete mode 100644 build/clang/patches-14/no-ssp-linking.patch delete mode 100644 build/clang/patches-14/no-symbolic-functions.patch delete mode 100644 build/clang/patches-14/no-usr-local-include.patch delete mode 100644 build/clang/patches-14/no-version-script.patch delete mode 100644 build/clang/patches-14/series delete mode 100644 build/clang/patches-14/use-gas.patch delete mode 100755 build/llvm/build-14.sh delete mode 100644 build/llvm/patches-14/madvise.patch delete mode 100644 build/llvm/patches-14/series delete mode 100644 build/llvm/patches-14/tools_llvm-shlib_CMakeLists.txt.patch create mode 100644 build/rust/patches/aarch64-eh_frame-ro.patch create mode 100644 build/rust/patches/series diff --git a/build/clang/build-14.sh b/build/clang/build-14.sh deleted file mode 100755 index 1af294074..000000000 --- a/build/clang/build-14.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/bash -# -# {{{ CDDL HEADER -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# }}} - -# Copyright 2022 OmniOS Community Edition (OmniOSce) Association. - -. ../../lib/build.sh - -PROG=clang -PKG=ooce/developer/clang-14 -VER=14.0.6 -SUMMARY="C language family frontend for LLVM" -DESC="The Clang project provides a language front-end and tooling " -DESC+="infrastructure for languages in the C language family (C, C++, " -DESC+="Objective C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project" - -min_rel 151041 - -set_arch 64 -set_clangver -set_builddir llvm-project-$VER.src/$PROG - -SKIP_RTIME_CHECK=1 -NO_SONAME_EXPECTED=1 - -MAJVER=${VER%%.*} -MINVER=${VER%.*} -set_patchdir patches-$MAJVER - -# Using the = prefix to require the specific matching version of llvm -BUILD_DEPENDS_IPS="=ooce/developer/llvm-$MAJVER@$VER" - -RUN_DEPENDS_IPS=" - =ooce/developer/llvm-$MAJVER@$MINVER - developer/gcc$GCCVER -" - -OPREFIX=$PREFIX -PREFIX+=/llvm-$MAJVER - -PKGDIFFPATH="${PREFIX#/}/lib/$PROG" -PKGDIFF_HELPER=" - s:$PKGDIFFPATH/[0-9][0-9.]*:$PKGDIFFPATH/VERSION: -" - -XFORM_ARGS=" - -DPREFIX=${PREFIX#/} - -DOPREFIX=${OPREFIX#/} - -DPROG=$PROG - -DPKGROOT=llvm-$MAJVER - -DMEDIATOR=$PROG -DMEDIATOR_VERSION=$MAJVER - -DVERSION=$MAJVER -" - -CONFIGURE_OPTS[amd64]= -CONFIGURE_OPTS[amd64_WS]=" - -DCMAKE_BUILD_TYPE=Release - -DCMAKE_INSTALL_PREFIX=\"$PREFIX\" - -DCMAKE_C_COMPILER=\"$CC\" - -DCMAKE_CXX_COMPILER=\"$CXX\" - -DCMAKE_C_LINK_FLAGS=\"${LDFLAGS[amd64]}\" - -DCMAKE_CXX_LINK_FLAGS=\"${LDFLAGS[amd64]}\" - -DGCC_INSTALL_PREFIX=\"$GCCPATH\" - -DCLANG_VENDOR=\"$DISTRO/$RELVER\" - -DCLANG_DEFAULT_RTLIB=libgcc - -DCLANG_DEFAULT_CXX_STDLIB=libstdc++ - -DLLVM_DIR=\"$PREFIX/lib/cmake/llvm\" -" -# we want to end up with '$ORIGIN/../lib' as runpath and not with -# '$PREFIX/lib:$ORIGIN/../lib'; yet we need to find libLLVM during build time -export LD_LIBRARY_PATH="$PREFIX/lib" - -init -download_source llvm llvm-project $VER.src -patch_source -prep_build cmake+ninja -build -noctf # C++ -strip_install -make_package -clean_up - -# Vim hints -# vim:ts=4:sw=4:et:fdm=marker diff --git a/build/clang/patches-14/add-__illumos__-preprocessor-definition.patch b/build/clang/patches-14/add-__illumos__-preprocessor-definition.patch deleted file mode 100644 index 87e275d10..000000000 --- a/build/clang/patches-14/add-__illumos__-preprocessor-definition.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -wpruN '--exclude=*.orig' a~/lib/Basic/Targets/OSTargets.h a/lib/Basic/Targets/OSTargets.h ---- a~/lib/Basic/Targets/OSTargets.h 1970-01-01 00:00:00 -+++ a/lib/Basic/Targets/OSTargets.h 1970-01-01 00:00:00 -@@ -622,6 +622,7 @@ protected: - void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple, - MacroBuilder &Builder) const override { - DefineStd(Builder, "sun", Opts); -+ Builder.defineMacro("__illumos__"); - DefineStd(Builder, "unix", Opts); - Builder.defineMacro("__ELF__"); - Builder.defineMacro("__svr4__"); diff --git a/build/clang/patches-14/add-rpath-for-libstdcxx.patch b/build/clang/patches-14/add-rpath-for-libstdcxx.patch deleted file mode 100644 index 6621df815..000000000 --- a/build/clang/patches-14/add-rpath-for-libstdcxx.patch +++ /dev/null @@ -1,61 +0,0 @@ -diff -wpruN '--exclude=*.orig' a~/lib/Driver/ToolChains/Solaris.cpp a/lib/Driver/ToolChains/Solaris.cpp ---- a~/lib/Driver/ToolChains/Solaris.cpp 1970-01-01 00:00:00 -+++ a/lib/Driver/ToolChains/Solaris.cpp 1970-01-01 00:00:00 -@@ -125,10 +125,11 @@ - bool NeedsSanitizerDeps = addSanitizerRuntimes(getToolChain(), Args, CmdArgs); - AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs, JA); - -+ if (getToolChain().ShouldLinkCXXStdlib(Args) && !Args.hasArg(options::OPT_r)) -+ getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); -+ - if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs, - options::OPT_r)) { -- if (getToolChain().ShouldLinkCXXStdlib(Args)) -- getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); - // LLVM support for atomics on 32-bit SPARC V8+ is incomplete, so - // forcibly link with libatomic as a workaround. - if (getToolChain().getTriple().getArch() == llvm::Triple::sparc) { -@@ -302,3 +302,16 @@ void Solaris::addLibStdCxxIncludePaths( - TripleStr, Multilib.includeSuffix(), DriverArgs, - CC1Args); - } -+ -+void Solaris::AddCXXStdlibLibArgs(const ArgList &Args, -+ ArgStringList &CmdArgs) const { -+ Generic_ELF::AddCXXStdlibLibArgs(Args, CmdArgs); -+ -+ if (GetCXXStdlibType(Args) != ToolChain::CST_Libstdcxx) -+ return; -+ -+ StringRef LibSuffix = getSolarisLibSuffix(getTriple()); -+ std::string MajVer = GCCInstallation.getVersion().MajorStr; -+ CmdArgs.push_back(Args.MakeArgString(StringRef("-R") -+ + "/usr/gcc/" + MajVer + "/lib" + LibSuffix)); -+} -diff -wpruN '--exclude=*.orig' a~/lib/Driver/ToolChains/Solaris.h a/lib/Driver/ToolChains/Solaris.h ---- a~/lib/Driver/ToolChains/Solaris.h 1970-01-01 00:00:00 -+++ a/lib/Driver/ToolChains/Solaris.h 1970-01-01 00:00:00 -@@ -62,6 +62,9 @@ public: - addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, - llvm::opt::ArgStringList &CC1Args) const override; - -+ void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args, -+ llvm::opt::ArgStringList &CmdArgs) const override; -+ - SanitizerMask getSupportedSanitizers() const override; - unsigned GetDefaultDwarfVersion() const override { return 2; } - -diff -wpruN '--exclude=*.orig' a~/lib/Driver/ToolChain.cpp a/lib/Driver/ToolChain.cpp ---- a~/lib/Driver/ToolChain.cpp 1970-01-01 00:00:00 -+++ a/lib/Driver/ToolChain.cpp 1970-01-01 00:00:00 -@@ -999,9 +999,7 @@ - } - - bool ToolChain::ShouldLinkCXXStdlib(const llvm::opt::ArgList &Args) const { -- return getDriver().CCCIsCXX() && -- !Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs, -- options::OPT_nostdlibxx); -+ return getDriver().CCCIsCXX() && !Args.hasArg(options::OPT_nostdlibxx); - } - - void ToolChain::AddCXXStdlibLibArgs(const ArgList &Args, diff --git a/build/clang/patches-14/default-preprocessor-definition.patch b/build/clang/patches-14/default-preprocessor-definition.patch deleted file mode 100644 index e5a11c46a..000000000 --- a/build/clang/patches-14/default-preprocessor-definition.patch +++ /dev/null @@ -1,34 +0,0 @@ -$NetBSD: patch-lib_Basic_Targets_OSTargets.h,v 1.4 2019/10/19 13:54:29 adam Exp $ - -Sync SunOS default defines with a working reality. - -diff -wpruN '--exclude=*.orig' a~/lib/Basic/Targets/OSTargets.h a/lib/Basic/Targets/OSTargets.h ---- a~/lib/Basic/Targets/OSTargets.h 1970-01-01 00:00:00 -+++ a/lib/Basic/Targets/OSTargets.h 1970-01-01 00:00:00 -@@ -626,22 +626,15 @@ protected: - Builder.defineMacro("__ELF__"); - Builder.defineMacro("__svr4__"); - Builder.defineMacro("__SVR4"); -- // Solaris headers require _XOPEN_SOURCE to be set to 600 for C99 and -- // newer, but to 500 for everything else. feature_test.h has a check to -- // ensure that you are not using C99 with an old version of X/Open or C89 -- // with a new version. -- if (Opts.C99) -- Builder.defineMacro("_XOPEN_SOURCE", "600"); -- else -- Builder.defineMacro("_XOPEN_SOURCE", "500"); -+ // Compatibility with GCC to satisfy requirements. - if (Opts.CPlusPlus) { -- Builder.defineMacro("__C99FEATURES__"); -+ Builder.defineMacro("__STDC_VERSION__", "199901L"); -+ Builder.defineMacro("_XOPEN_SOURCE", "600"); - Builder.defineMacro("_FILE_OFFSET_BITS", "64"); -- } -- // GCC restricts the next two to C++. - Builder.defineMacro("_LARGEFILE_SOURCE"); - Builder.defineMacro("_LARGEFILE64_SOURCE"); - Builder.defineMacro("__EXTENSIONS__"); -+ } - if (Opts.POSIXThreads) - Builder.defineMacro("_REENTRANT"); - if (this->HasFloat128) diff --git a/build/clang/patches-14/no-default-libgcc_s-linking.patch b/build/clang/patches-14/no-default-libgcc_s-linking.patch deleted file mode 100644 index 3579abb7e..000000000 --- a/build/clang/patches-14/no-default-libgcc_s-linking.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -wpruN '--exclude=*.orig' a~/lib/Driver/ToolChains/Solaris.cpp a/lib/Driver/ToolChains/Solaris.cpp ---- a~/lib/Driver/ToolChains/Solaris.cpp 1970-01-01 00:00:00 -+++ a/lib/Driver/ToolChains/Solaris.cpp 1970-01-01 00:00:00 -@@ -51,6 +51,7 @@ - const ArgList &Args, - const char *LinkingOutput) const { - ArgStringList CmdArgs; -+ const Driver &D = getToolChain().getDriver(); - - // Demangle C++ names in errors - CmdArgs.push_back("-C"); -@@ -125,7 +126,8 @@ - CmdArgs.push_back("-latomic"); - CmdArgs.push_back(getAsNeededOption(getToolChain(), false)); - } -- CmdArgs.push_back("-lgcc_s"); -+ if (D.CCCIsCXX()) -+ CmdArgs.push_back("-lgcc_s"); - CmdArgs.push_back("-lc"); - if (!Args.hasArg(options::OPT_shared)) { - CmdArgs.push_back("-lgcc"); diff --git a/build/clang/patches-14/no-default-libm-linking.patch b/build/clang/patches-14/no-default-libm-linking.patch deleted file mode 100644 index 31eb5708c..000000000 --- a/build/clang/patches-14/no-default-libm-linking.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -wpruN '--exclude=*.orig' a~/lib/Driver/ToolChains/Solaris.cpp a/lib/Driver/ToolChains/Solaris.cpp ---- a~/lib/Driver/ToolChains/Solaris.cpp 1970-01-01 00:00:00 -+++ a/lib/Driver/ToolChains/Solaris.cpp 1970-01-01 00:00:00 -@@ -131,6 +131,7 @@ void solaris::Linker::ConstructJob(Compi - CmdArgs.push_back("-lc"); - if (!Args.hasArg(options::OPT_shared)) { - CmdArgs.push_back("-lgcc"); -+ if (D.CCCIsCXX()) -- CmdArgs.push_back("-lm"); -+ CmdArgs.push_back("-lm"); - } - if (NeedsSanitizerDeps) diff --git a/build/clang/patches-14/no-sanitizer-runtime-lib-linking.patch b/build/clang/patches-14/no-sanitizer-runtime-lib-linking.patch deleted file mode 100644 index 419c011db..000000000 --- a/build/clang/patches-14/no-sanitizer-runtime-lib-linking.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -wpruN '--exclude=*.orig' a~/lib/Driver/ToolChains/CommonArgs.cpp a/lib/Driver/ToolChains/CommonArgs.cpp ---- a~/lib/Driver/ToolChains/CommonArgs.cpp 1970-01-01 00:00:00 -+++ a/lib/Driver/ToolChains/CommonArgs.cpp 1970-01-01 00:00:00 -@@ -773,7 +773,7 @@ void tools::linkSanitizerRuntimeDeps(con - ArgStringList &CmdArgs) { - // Fuchsia never needs these. Any sanitizer runtimes with system - // dependencies use the `.deplibs` feature instead. -- if (TC.getTriple().isOSFuchsia()) -+ if (TC.getTriple().isOSFuchsia() || TC.getTriple().isOSSolaris()) - return; - - // Force linking against the system libraries sanitizers depends on diff --git a/build/clang/patches-14/no-ssp-linking.patch b/build/clang/patches-14/no-ssp-linking.patch deleted file mode 100644 index 4a751afa8..000000000 --- a/build/clang/patches-14/no-ssp-linking.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -wpruN '--exclude=*.orig' a~/lib/Driver/ToolChains/Solaris.cpp a/lib/Driver/ToolChains/Solaris.cpp ---- a~/lib/Driver/ToolChains/Solaris.cpp 1970-01-01 00:00:00 -+++ a/lib/Driver/ToolChains/Solaris.cpp 1970-01-01 00:00:00 -@@ -125,13 +125,6 @@ void solaris::Linker::ConstructJob(Compi - if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) { - if (getToolChain().ShouldLinkCXXStdlib(Args)) - getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); -- if (Args.hasArg(options::OPT_fstack_protector) || -- Args.hasArg(options::OPT_fstack_protector_strong) || -- Args.hasArg(options::OPT_fstack_protector_all)) { -- // Explicitly link ssp libraries, not folded into Solaris libc. -- CmdArgs.push_back("-lssp_nonshared"); -- CmdArgs.push_back("-lssp"); -- } - // LLVM support for atomics on 32-bit SPARC V8+ is incomplete, so - // forcibly link with libatomic as a workaround. - if (getToolChain().getTriple().getArch() == llvm::Triple::sparc) { diff --git a/build/clang/patches-14/no-symbolic-functions.patch b/build/clang/patches-14/no-symbolic-functions.patch deleted file mode 100644 index 0be0bfbf7..000000000 --- a/build/clang/patches-14/no-symbolic-functions.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -wpruN '--exclude=*.orig' a~/tools/clang-shlib/CMakeLists.txt a/tools/clang-shlib/CMakeLists.txt ---- a~/tools/clang-shlib/CMakeLists.txt 1970-01-01 00:00:00 -+++ a/tools/clang-shlib/CMakeLists.txt 1970-01-01 00:00:00 -@@ -48,8 +48,3 @@ add_clang_library(clang-cpp - ${_OBJECTS} - LINK_LIBS - ${_DEPS}) --# Optimize function calls for default visibility definitions to avoid PLT and --# reduce dynamic relocations. --if (NOT APPLE AND NOT MINGW) -- target_link_options(clang-cpp PRIVATE LINKER:-Bsymbolic-functions) --endif() diff --git a/build/clang/patches-14/no-usr-local-include.patch b/build/clang/patches-14/no-usr-local-include.patch deleted file mode 100644 index 9daa1e003..000000000 --- a/build/clang/patches-14/no-usr-local-include.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -wpruN '--exclude=*.orig' a~/lib/Driver/ToolChains/Solaris.cpp a/lib/Driver/ToolChains/Solaris.cpp ---- a~/lib/Driver/ToolChains/Solaris.cpp 1970-01-01 00:00:00 -+++ a/lib/Driver/ToolChains/Solaris.cpp 1970-01-01 00:00:00 -@@ -227,9 +227,6 @@ void Solaris::AddClangSystemIncludeArgs( - if (DriverArgs.hasArg(clang::driver::options::OPT_nostdinc)) - return; - -- if (!DriverArgs.hasArg(options::OPT_nostdlibinc)) -- addSystemInclude(DriverArgs, CC1Args, D.SysRoot + "/usr/local/include"); -- - if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) { - SmallString<128> P(D.ResourceDir); - llvm::sys::path::append(P, "include"); -diff -wpruN '--exclude=*.orig' a~/lib/Lex/InitHeaderSearch.cpp a/lib/Lex/InitHeaderSearch.cpp ---- a~/lib/Lex/InitHeaderSearch.cpp 1970-01-01 00:00:00 -+++ a/lib/Lex/InitHeaderSearch.cpp 1970-01-01 00:00:00 -@@ -241,6 +241,7 @@ void InitHeaderSearch::AddDefaultCInclud - case llvm::Triple::PS4: - case llvm::Triple::ELFIAMCU: - case llvm::Triple::Fuchsia: -+ case llvm::Triple::Solaris: - break; - case llvm::Triple::Win32: - if (triple.getEnvironment() != llvm::Triple::Cygnus) diff --git a/build/clang/patches-14/no-version-script.patch b/build/clang/patches-14/no-version-script.patch deleted file mode 100644 index f057f16ba..000000000 --- a/build/clang/patches-14/no-version-script.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff -wpruN '--exclude=*.orig' a~/tools/libclang/CMakeLists.txt a/tools/libclang/CMakeLists.txt ---- a~/tools/libclang/CMakeLists.txt 1970-01-01 00:00:00 -+++ a/tools/libclang/CMakeLists.txt 1970-01-01 00:00:00 -@@ -166,21 +166,21 @@ if(ENABLE_SHARED) - ) - endif() - endif() -- if (USE_VERSION_SCRIPT) -- target_link_options(libclang PRIVATE "-Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/libclang.map") -- # The Solaris 11.4 linker supports a subset of GNU ld version scripts, -- # but requires a special option to enable it. -- if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS") -- target_link_options(libclang PRIVATE "-Wl,-z,gnu-version-script-compat") -- endif() -- # Ensure that libclang.so gets rebuilt when the linker script changes. -- set_property(SOURCE ARCMigrate.cpp APPEND PROPERTY -- OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libclang.map) -- -- set_target_properties(libclang PROPERTIES -- VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX} -- SOVERSION ${CLANG_SONAME}) -- endif() -+# if (USE_VERSION_SCRIPT) -+# target_link_options(libclang PRIVATE "-Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/libclang.map") -+# # The Solaris 11.4 linker supports a subset of GNU ld version scripts, -+# # but requires a special option to enable it. -+# if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS") -+# target_link_options(libclang PRIVATE "-Wl,-z,gnu-version-script-compat") -+# endif() -+# # Ensure that libclang.so gets rebuilt when the linker script changes. -+# set_property(SOURCE ARCMigrate.cpp APPEND PROPERTY -+# OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libclang.map) -+# -+# set_target_properties(libclang PROPERTIES -+# VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX} -+# SOVERSION ${CLANG_SONAME}) -+# endif() - endif() - - if(INTERNAL_INSTALL_PREFIX) diff --git a/build/clang/patches-14/series b/build/clang/patches-14/series deleted file mode 100644 index b27031791..000000000 --- a/build/clang/patches-14/series +++ /dev/null @@ -1,11 +0,0 @@ -use-gas.patch -no-ssp-linking.patch -default-preprocessor-definition.patch -no-usr-local-include.patch -no-default-libgcc_s-linking.patch -add-rpath-for-libstdcxx.patch -no-version-script.patch -no-symbolic-functions.patch -no-sanitizer-runtime-lib-linking.patch -no-default-libm-linking.patch -add-__illumos__-preprocessor-definition.patch diff --git a/build/clang/patches-14/use-gas.patch b/build/clang/patches-14/use-gas.patch deleted file mode 100644 index 2bcb516dd..000000000 --- a/build/clang/patches-14/use-gas.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -wpruN '--exclude=*.orig' a~/lib/Driver/ToolChains/Solaris.cpp a/lib/Driver/ToolChains/Solaris.cpp ---- a~/lib/Driver/ToolChains/Solaris.cpp 1970-01-01 00:00:00 -+++ a/lib/Driver/ToolChains/Solaris.cpp 1970-01-01 00:00:00 -@@ -40,7 +40,7 @@ void solaris::Assembler::ConstructJob(Co - for (const auto &II : Inputs) - CmdArgs.push_back(II.getFilename()); - -- const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("as")); -+ const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("gas")); - C.addCommand(std::make_unique(JA, *this, ResponseFileSupport::None(), - Exec, CmdArgs, Inputs, Output)); - } diff --git a/build/llvm/build-14.sh b/build/llvm/build-14.sh deleted file mode 100755 index 4a0a00199..000000000 --- a/build/llvm/build-14.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/bash -# -# {{{ CDDL HEADER -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# }}} - -# Copyright 2023 OmniOS Community Edition (OmniOSce) Association. - -. ../../lib/build.sh - -PROG=llvm -PKG=ooce/developer/llvm-14 -VER=14.0.6 -SUMMARY="Low Level Virtual Machine compiler infrastructure" -DESC="A collection of modular and reusable compiler and toolchain technologies" - -set_arch 64 -test_relver '>=' 151041 && set_clangver -set_builddir $PROG-project-$VER.src/$PROG - -SKIP_RTIME_CHECK=1 -NO_SONAME_EXPECTED=1 - -MAJVER=${VER%%.*} -set_patchdir patches-$MAJVER - -OPREFIX=$PREFIX -PREFIX+=/$PROG-$MAJVER - -XFORM_ARGS=" - -DPREFIX=${PREFIX#/} - -DOPREFIX=${OPREFIX#/} - -DPROG=$PROG - -DPKGROOT=$PROG-$MAJVER - -DMEDIATOR=$PROG -DMEDIATOR_VERSION=$MAJVER - -DVERSION=$MAJVER -" - -CONFIGURE_OPTS[amd64]= -CONFIGURE_OPTS[amd64_WS]=" - -DCMAKE_BUILD_TYPE=Release - -DCMAKE_INSTALL_PREFIX=$PREFIX - -DCMAKE_C_COMPILER=\"$CC\" - -DCMAKE_CXX_COMPILER=\"$CXX\" - -DCMAKE_C_LINK_FLAGS=\"${LDFLAGS[amd64]}\" - -DCMAKE_CXX_LINK_FLAGS=\"${LDFLAGS[amd64]}\" - -DLLVM_BUILD_LLVM_DYLIB=ON - -DLLVM_INCLUDE_BENCHMARKS=OFF - -DLLVM_INSTALL_UTILS=ON - -DLLVM_LINK_LLVM_DYLIB=ON - -DLLVM_ENABLE_RTTI=ON -" - -init -download_source $PROG $PROG-project $VER.src -patch_source -prep_build cmake+ninja -build -noctf # C++ -strip_install -make_package -clean_up - -# Vim hints -# vim:ts=4:sw=4:et:fdm=marker diff --git a/build/llvm/patches-14/madvise.patch b/build/llvm/patches-14/madvise.patch deleted file mode 100644 index 7dc6a755f..000000000 --- a/build/llvm/patches-14/madvise.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -wpruN --no-dereference '--exclude=*.orig' a~/lib/Support/Unix/Path.inc a/lib/Support/Unix/Path.inc ---- a~/lib/Support/Unix/Path.inc 1970-01-01 00:00:00 -+++ a/lib/Support/Unix/Path.inc 1970-01-01 00:00:00 -@@ -879,7 +879,7 @@ void mapped_file_region::dontNeedImpl() - return; - #else - if (Mapping) -- ::madvise(Mapping, Size, MADV_DONTNEED); -+ ::posix_madvise(Mapping, Size, MADV_DONTNEED); - #endif - } - diff --git a/build/llvm/patches-14/series b/build/llvm/patches-14/series deleted file mode 100644 index 50b267de6..000000000 --- a/build/llvm/patches-14/series +++ /dev/null @@ -1,2 +0,0 @@ -tools_llvm-shlib_CMakeLists.txt.patch -madvise.patch diff --git a/build/llvm/patches-14/tools_llvm-shlib_CMakeLists.txt.patch b/build/llvm/patches-14/tools_llvm-shlib_CMakeLists.txt.patch deleted file mode 100644 index 643bce060..000000000 --- a/build/llvm/patches-14/tools_llvm-shlib_CMakeLists.txt.patch +++ /dev/null @@ -1,35 +0,0 @@ -$NetBSD: patch-tools_llvm-shlib_CMakeLists.txt,v 1.5 2019/06/02 08:35:55 adam Exp $ - -Use the Linux style linking everywhere except Darwin and SunOS. - -diff -wpruN --no-dereference '--exclude=*.orig' a~/tools/llvm-shlib/CMakeLists.txt a/tools/llvm-shlib/CMakeLists.txt ---- a~/tools/llvm-shlib/CMakeLists.txt 1970-01-01 00:00:00 -+++ a/tools/llvm-shlib/CMakeLists.txt 1970-01-01 00:00:00 -@@ -33,13 +33,11 @@ if(LLVM_BUILD_LLVM_DYLIB) - add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${INSTALL_WITH_TOOLCHAIN} ${SOURCES}) - - list(REMOVE_DUPLICATES LIB_NAMES) -- 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 "OpenBSD") -- OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia") -- OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly") -- OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")) # FIXME: It should be "GNU ld for elf" -+ if("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS") -+ set(LIB_NAMES -Wl,-Bsymbolic -Wl,-z -Wl,allextract ${LIB_NAMES} -Wl,-z -Wl,defaultextract) -+ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") -+ set(LIB_NAMES -Wl,-all_load ${LIB_NAMES}) -+ else() - configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/simple_version_script.map.in - ${LLVM_LIBRARY_DIR}/tools/llvm-shlib/simple_version_script.map) -@@ -57,8 +55,6 @@ if(LLVM_BUILD_LLVM_DYLIB) - # inside and outside libLLVM.so. - target_link_options(LLVM PRIVATE LINKER:-Bsymbolic-functions) - endif() -- elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") -- set(LIB_NAMES -Wl,-all_load ${LIB_NAMES}) - endif() - - target_link_libraries(LLVM PRIVATE ${LIB_NAMES}) diff --git a/build/meta/extra-build-tools.p5m b/build/meta/extra-build-tools.p5m index d3bb51859..b7770d4af 100644 --- a/build/meta/extra-build-tools.p5m +++ b/build/meta/extra-build-tools.p5m @@ -22,7 +22,6 @@ depend fmri=ooce/developer/go-121 type=require depend fmri=ooce/developer/go-122 type=require depend fmri=ooce/developer/gperf type=require depend fmri=ooce/developer/llvm-13 type=require -depend fmri=ooce/developer/llvm-14 type=require depend fmri=ooce/developer/llvm-17 type=require depend fmri=ooce/developer/clang-13 type=require depend fmri=ooce/developer/clang-17 type=require diff --git a/build/rust/build.sh b/build/rust/build.sh index 83b11d461..ce5399e99 100755 --- a/build/rust/build.sh +++ b/build/rust/build.sh @@ -18,14 +18,11 @@ PROG=rust PKG=ooce/developer/rust -VER=1.79.0 +VER=1.80.0 SUMMARY="Rust systems programming language" DESC="Rust is a systems programming language that runs blazingly fast, " DESC+="prevents segfaults, and guarantees thread safety." -# starting with release 1.69.0, rust requires at least llvm 14 -LLVMVER=14 - set_builddir ${PROG}c-${VER}-src OPREFIX=$PREFIX @@ -36,16 +33,6 @@ BUILD_DEPENDS_IPS="developer/gnu-binutils" # and linker are themselves pulled in as dependencies of the gcc package. RUN_DEPENDS_IPS="developer/gcc$GCCVER" -if test_relver '<' 151041; then - SYSTEM_LLVM_PATH="/opt/ooce/llvm-$LLVMVER" - RUN_DEPENDS_IPS="ooce/developer/llvm-$LLVMVER" - BUILD_DEPENDS_IPS+=" $RUN_DEPENDS_IPS" - - ar=$USRBIN/gar -else - ar=$USRBIN/ar -fi - # rust build requires the final install directory to be present [ -d "$PREFIX" ] || logcmd $PFEXEC mkdir -p $PREFIX @@ -61,26 +48,20 @@ SKIP_RTIME_CHECK=1 SKIP_SSP_CHECK=1 NO_SONAME_EXPECTED=1 -RUSTARCH=x86_64-unknown-illumos - -CONFIGURE_CMD="$PYTHON src/bootstrap/configure.py" - -CONFIGURE_OPTS[amd64]=" +CONFIGURE_OPTS[$BUILD_ARCH]=" --prefix=$PREFIX --sysconfdir=/etc$PREFIX --localstatedir=/var$PREFIX " - CONFIGURE_OPTS+=" --release-description=OmniOS/$RELVER --enable-vendor --enable-local-rust --enable-extended - --build=$RUSTARCH - --target=$RUSTARCH - --set target.$RUSTARCH.cc=$CC - --set target.$RUSTARCH.cxx=$CXX - --set target.$RUSTARCH.ar=$ar + --build=${RUSTTRIPLETS[$BUILD_ARCH]} + --set target.${RUSTTRIPLETS[$BUILD_ARCH]}.cc=$CC + --set target.${RUSTTRIPLETS[$BUILD_ARCH]}.cxx=$CXX + --set target.${RUSTTRIPLETS[$BUILD_ARCH]}.ar=$USRBIN/ar --enable-rpath --enable-ninja --disable-codegen-tests @@ -91,15 +72,6 @@ CONFIGURE_OPTS+=" --python=$PYTHON " -if [ -n "$SYSTEM_LLVM_PATH" ]; then - CONFIGURE_OPTS+=" - --enable-llvm-link-shared - --llvm-config=$SYSTEM_LLVM_PATH/bin/llvm-config - " - llvm_lib="`$SYSTEM_LLVM_PATH/bin/llvm-config --libdir`" - export RUSTFLAGS="-C link-arg=-L$llvm_lib -C link-arg=-R$llvm_lib" -fi - TESTSUITE_SED=" /^$/ { N @@ -113,6 +85,31 @@ TESTSUITE_SED=" b op " +pre_configure() { + target="${RUSTTRIPLETS[$BUILD_ARCH]}" + + for a in $CROSS_ARCH; do + # we need the sysroot to build target support + init_sysroot $a ${PKGSRVR%%/}.$a + + target+=",${RUSTTRIPLETS[$a]}" + + archprefix=$CROSSTOOLS/$a/bin/${TRIPLETS[$a]} + CONFIGURE_OPTS[$BUILD_ARCH]+=" + --set target.${RUSTTRIPLETS[$a]}.cc=$archprefix-gcc + --set target.${RUSTTRIPLETS[$a]}.cxx=$archprefix-g++ + --set target.${RUSTTRIPLETS[$a]}.ar=$archprefix-ar + " + tripus=${RUSTTRIPLETS[aarch64]//-/_} + tripuc=${tripus^^} + export CARGO_TARGET_${tripuc}_RUSTFLAGS=" + -C link-arg=--sysroot=${SYSROOT[$a]} + " + done + + CONFIGURE_OPTS+=" --target=$target" +} + pre_install() { logcmd $MKDIR -p $DESTDIR/$PREFIX || logerr "failed to create directory" } diff --git a/build/rust/patches/aarch64-eh_frame-ro.patch b/build/rust/patches/aarch64-eh_frame-ro.patch new file mode 100644 index 000000000..e5afe505e --- /dev/null +++ b/build/rust/patches/aarch64-eh_frame-ro.patch @@ -0,0 +1,17 @@ +Ensure .eh_frame is consistently read-only for aarch64 + +diff -wpruN --no-dereference '--exclude=*.orig' a~/src/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp a/src/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp +--- a~/src/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp 1970-01-01 00:00:00 ++++ a/src/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp 1970-01-01 00:00:00 +@@ -381,8 +381,10 @@ void MCObjectFileInfo::initELFMCObjectFi + // Solaris requires different flags for .eh_frame to seemingly every other + // platform. + unsigned EHSectionFlags = ELF::SHF_ALLOC; +- if (T.isOSSolaris() && T.getArch() != Triple::x86_64) ++ if (T.isOSSolaris() && T.getArch() != Triple::x86_64 && ++ T.getArch() != Triple::aarch64) { + EHSectionFlags |= ELF::SHF_WRITE; ++ } + + // ELF + BSSSection = Ctx->getELFSection(".bss", ELF::SHT_NOBITS, diff --git a/build/rust/patches/series b/build/rust/patches/series new file mode 100644 index 000000000..1d127c654 --- /dev/null +++ b/build/rust/patches/series @@ -0,0 +1 @@ +aarch64-eh_frame-ro.patch diff --git a/doc/baseline b/doc/baseline index 6cb257fea..86311803d 100644 --- a/doc/baseline +++ b/doc/baseline @@ -75,7 +75,6 @@ extra.omnios ooce/developer/cargo-c extra.omnios ooce/developer/ccache extra.omnios ooce/developer/clang-13 extra.omnios ooce/developer/clang-130 r -extra.omnios ooce/developer/clang-14 extra.omnios ooce/developer/clang-15 extra.omnios ooce/developer/clang-16 extra.omnios ooce/developer/clang-17 @@ -94,7 +93,6 @@ extra.omnios ooce/developer/gperf extra.omnios ooce/developer/gyp extra.omnios ooce/developer/llvm-13 extra.omnios ooce/developer/llvm-130 r -extra.omnios ooce/developer/llvm-14 extra.omnios ooce/developer/llvm-15 extra.omnios ooce/developer/llvm-16 extra.omnios ooce/developer/llvm-17 diff --git a/doc/packages.md b/doc/packages.md index 008bd014d..829b8aff2 100644 --- a/doc/packages.md +++ b/doc/packages.md @@ -53,7 +53,6 @@ | ooce/developer/cargo-c | 0.10.0 | https://github.com/lu-zero/cargo-c/releases | [omniosorg](https://github.com/omniosorg) | ooce/developer/ccache | 3.6 | https://www.samba.org/ftp/ccache/ | [jimklimov](https://github.com/jimklimov) | ooce/developer/clang-13 | 13.0.1 | https://github.com/llvm/llvm-project/releases | [omniosorg](https://github.com/omniosorg) -| ooce/developer/clang-14 | 14.0.6 | https://github.com/llvm/llvm-project/releases | [omniosorg](https://github.com/omniosorg) | ooce/developer/clang-15 | 15.0.7 | https://github.com/llvm/llvm-project/releases | [omniosorg](https://github.com/omniosorg) | ooce/developer/clang-16 | 16.0.6 | https://github.com/llvm/llvm-project/releases | [omniosorg](https://github.com/omniosorg) | ooce/developer/clang-17 | 17.0.6 | https://github.com/llvm/llvm-project/releases | [omniosorg](https://github.com/omniosorg) @@ -69,7 +68,6 @@ | ooce/developer/go-122 | 1.22.5 | https://golang.org/dl/ | [omniosorg](https://github.com/omniosorg) | ooce/developer/gperf | 3.1 | https://ftp.gnu.org/pub/gnu/gperf/ | [omniosorg](https://github.com/omniosorg) | ooce/developer/llvm-13 | 13.0.1 | https://github.com/llvm/llvm-project/releases | [omniosorg](https://github.com/omniosorg) -| ooce/developer/llvm-14 | 14.0.6 | https://github.com/llvm/llvm-project/releases | [omniosorg](https://github.com/omniosorg) | ooce/developer/llvm-15 | 15.0.7 | https://github.com/llvm/llvm-project/releases | [omniosorg](https://github.com/omniosorg) | ooce/developer/llvm-16 | 16.0.6 | https://github.com/llvm/llvm-project/releases | [omniosorg](https://github.com/omniosorg) | ooce/developer/llvm-17 | 17.0.6 | https://github.com/llvm/llvm-project/releases | [omniosorg](https://github.com/omniosorg) @@ -79,7 +77,7 @@ | ooce/developer/pkgmgr | github-latest | https://github.com/omniosorg/pkgmgr/releases | [omniosorg](https://github.com/omniosorg) | ooce/developer/protobuf | 27.0 | https://github.com/protocolbuffers/protobuf/releases | [omniosorg](https://github.com/omniosorg) | ooce/developer/radare2 | 5.9.2 | https://github.com/radareorg/radare2/releases | [omniosorg](https://github.com/omniosorg) -| ooce/developer/rust | 1.79.0 | https://forge.rust-lang.org/infra/other-installation-methods.html | [omniosorg](https://github.com/omniosorg) +| ooce/developer/rust | 1.80.0 | https://forge.rust-lang.org/infra/other-installation-methods.html | [omniosorg](https://github.com/omniosorg) | ooce/developer/subversion | 1.14.3 | https://downloads.apache.org/subversion/ | [omniosorg](https://github.com/omniosorg) | ooce/developer/valgrind | 3.23.0 | https://valgrind.org/downloads/current.html | [omniosorg](https://github.com/omniosorg) | ooce/developer/yasm | 1.3.0 | https://github.com/yasm/yasm/releases https://yasm.tortall.net/ | [omniosorg](https://github.com/omniosorg) diff --git a/lib/config.sh b/lib/config.sh index cb1438437..fcb0a88ff 100644 --- a/lib/config.sh +++ b/lib/config.sh @@ -173,6 +173,11 @@ typeset -A TRIPLETS=( [aarch64]=aarch64-unknown-solaris2.11 ) +typeset -A RUSTTRIPLETS=( + [amd64]=x86_64-unknown-illumos + [aarch64]=aarch64-unknown-illumos +) + ############################################################################# # Perl stuff ############################################################################# From e40f952f6cc53492f86f88f8106a729c3b5eda65 Mon Sep 17 00:00:00 2001 From: Dominik Hassler Date: Fri, 2 Aug 2024 19:27:43 +0000 Subject: [PATCH 2/2] cargo-c: update to 0.10.3 --- build/cargo-c/build.sh | 5 +---- doc/packages.md | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/build/cargo-c/build.sh b/build/cargo-c/build.sh index 34a29c71b..c5eeef425 100755 --- a/build/cargo-c/build.sh +++ b/build/cargo-c/build.sh @@ -17,7 +17,7 @@ . ../../lib/build.sh PROG=cargo-c -VER=0.10.0 +VER=0.10.3 PKG=ooce/developer/cargo-c SUMMARY="build and install C-ABI compatible dynamic and static libraries" DESC="produces and installs a correct pkg-config file, a static library and " @@ -48,9 +48,6 @@ build() { pushd $TMPDIR/$BUILDDIR >/dev/null - # os_info 3.8.0 is broken on illumos - - # See https://github.com/stanislav-tkach/os_info/issues/371 - logcmd $CARGO update --package os_info@3.8.0 --precise 3.7.0 logcmd $CARGO install --locked --root=$DESTDIR$PREFIX --path=. \ || logerr "build failed" diff --git a/doc/packages.md b/doc/packages.md index 829b8aff2..09ff10b3c 100644 --- a/doc/packages.md +++ b/doc/packages.md @@ -50,7 +50,7 @@ | ooce/developer/autoconf-archive | 2023.02.20 | https://ftp.gnu.org/gnu/autoconf-archive/ | [omniosorg](https://github.com/omniosorg) | ooce/developer/autogen | 5.18.16 | https://ftp.gnu.org/gnu/autogen/ | [omniosorg](https://github.com/omniosorg) | ooce/developer/bazel | 6.3.2 | https://github.com/bazelbuild/bazel/releases | [omniosorg](https://github.com/omniosorg) -| ooce/developer/cargo-c | 0.10.0 | https://github.com/lu-zero/cargo-c/releases | [omniosorg](https://github.com/omniosorg) +| ooce/developer/cargo-c | 0.10.3 | https://github.com/lu-zero/cargo-c/releases | [omniosorg](https://github.com/omniosorg) | ooce/developer/ccache | 3.6 | https://www.samba.org/ftp/ccache/ | [jimklimov](https://github.com/jimklimov) | ooce/developer/clang-13 | 13.0.1 | https://github.com/llvm/llvm-project/releases | [omniosorg](https://github.com/omniosorg) | ooce/developer/clang-15 | 15.0.7 | https://github.com/llvm/llvm-project/releases | [omniosorg](https://github.com/omniosorg)