Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package zig for openSUSE:Factory checked in at 2023-10-19 22:48:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/zig (Old) and /work/SRC/openSUSE:Factory/.zig.new.1945 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "zig" Thu Oct 19 22:48:58 2023 rev:3 rq:1118745 version:0.11.0 Changes: -------- --- /work/SRC/openSUSE:Factory/zig/zig.changes 2023-02-09 16:23:07.194686050 +0100 +++ /work/SRC/openSUSE:Factory/.zig.new.1945/zig.changes 2023-10-19 22:51:33.827668381 +0200 @@ -1,0 +2,24 @@ +Wed Oct 18 10:55:45 UTC 2023 - Soc Virnyl S. Estela <cont...@uncomfyhalomacro.pl> + +- Change builder to ninja. change c and c++ compiler to clang + +------------------------------------------------------------------- +Thu Sep 7 11:16:24 UTC 2023 - Soc Virnyl Estela <socvirnyl.est...@gmail.com> + +- Remove comment since it builds now on latest glibc. + +------------------------------------------------------------------- +Fri Aug 4 06:18:37 UTC 2023 - Soc Virnyl Estela <socvirnyl.est...@gmail.com> + +- Update to version 0.11.0: + ** CHANGELOG TOO LONG ** + See https://ziglang.org/download/0.11.0/release-notes.html +- Update patchsets: + * remove 0000-invoke-lld-llvm15.patch + * add 0000-remove-lld-in-cmakelist.patch + * add 0001-invoke-lld.patch + * update 0002-no-lld-libs-and-includes.patch + * change to llvm16 +- Update specfile to use LLVM version 16.x. This will be removed in the future. + +------------------------------------------------------------------- Old: ---- 0000-invoke-lld-llvm15.patch zig-0.10.1.tar.xz New: ---- 0000-remove-lld-in-cmakelist.patch 0001-invoke-lld.patch zig-0.11.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ zig.spec ++++++ --- /var/tmp/diff_new_pack.QhVCFC/_old 2023-10-19 22:51:34.519693480 +0200 +++ /var/tmp/diff_new_pack.QhVCFC/_new 2023-10-19 22:51:34.519693480 +0200 @@ -17,11 +17,12 @@ %global _lto_cflags %{nil} +%global __builder ninja %bcond_without macro %bcond_without test Name: zig -Version: 0.10.1 +Version: 0.11.0 Release: 0 Summary: Compiler for the Zig language License: MIT @@ -30,17 +31,22 @@ Source0: https://ziglang.org/download/%{version}/%{name}-%{version}.tar.xz Source1: macros.%{name} Source2: zig-rpmlintrc -Patch0: 0000-invoke-lld-llvm15.patch +Patch0: 0000-remove-lld-in-cmakelist.patch +Patch1: 0001-invoke-lld.patch Patch2: 0002-no-lld-libs-and-includes.patch -BuildRequires: clang15-devel +BuildRequires: clang16 +BuildRequires: clang16-devel BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ +BuildRequires: glibc +BuildRequires: glibc-devel BuildRequires: help2man -BuildRequires: lld15 -BuildRequires: llvm15-devel +BuildRequires: lld16 +BuildRequires: llvm16-devel +BuildRequires: ninja BuildRequires: zlib-devel -Requires: lld15 +Requires: lld16 # llvm-config is missing targets for ppc and arm architectures. # ExcludeArch: ppc64 ppc64le %%arm %%ix86 @@ -89,6 +95,8 @@ -DCMAKE_BUILD_TYPE=Release \ %endif -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_C_COMPILER="clang-16" \ + -DCMAKE_CXX_COMPILER="clang++-16" \ -DZIG_SHARED_LLVM=On \ -DZIG_TARGET_MCPU="baseline" \ -DZIG_VERSION:STRING="%{version}" ++++++ 0000-remove-lld-in-cmakelist.patch ++++++ From: Soc Virnyl Estela <socvirnyl.est...@gmail.com> Date: Fri, 04 Aug 2023 14:59:44 PST We invoke LLD so we also commented/remove it out as well. diff --git a/CMakeLists.txt b/CMakeLists.txt index 92be8fb..e19d18e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -126,7 +126,7 @@ set(ZIG_PIE off CACHE BOOL "produce a position independent zig executable") find_package(llvm 16) find_package(clang 16) -find_package(lld 16) +# find_package(lld 16) if(ZIG_STATIC_ZLIB) if (MSVC) @@ -173,7 +173,7 @@ foreach(CONFIG_TYPE ${CMAKE_CONFIGURATION_TYPES}) endforeach(CONFIG_TYPE CMAKE_CONFIGURATION_TYPES) include_directories(${LLVM_INCLUDE_DIRS}) -include_directories(${LLD_INCLUDE_DIRS}) +# include_directories(${LLD_INCLUDE_DIRS}) include_directories(${CLANG_INCLUDE_DIRS}) find_package(Threads) @@ -684,7 +684,7 @@ set_target_properties(zigcpp PROPERTIES COMPILE_FLAGS ${ZIGCPP_CXX_FLAGS}) target_link_libraries(zigcpp LINK_PUBLIC ${CLANG_LIBRARIES} - ${LLD_LIBRARIES} + # ${LLD_LIBRARIES} ${LLVM_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ) ++++++ 0000-invoke-lld-llvm15.patch -> 0001-invoke-lld.patch ++++++ --- /work/SRC/openSUSE:Factory/zig/0000-invoke-lld-llvm15.patch 2023-01-25 18:02:02.858178052 +0100 +++ /work/SRC/openSUSE:Factory/.zig.new.1945/0001-invoke-lld.patch 2023-10-19 22:51:33.119642701 +0200 @@ -1,50 +1,19 @@ From: Soc Virnyl Estela <socvirnyl.est...@gmail.com> -Date: Fri, 18 Nov 2022 14:09:02 PST +Date: Fri, 04 Aug 2023 14:55:02 PST Based on Aaron Puchert's <aaronpuch...@alice-dsl.net> patch. -diff -bur zig-0.10.0.orig/CMakeLists.txt zig-0.10.0/CMakeLists.txt ---- zig-0.10.0.orig/CMakeLists.txt 2022-11-17 19:51:09.821938555 +0800 -+++ zig-0.10.0/CMakeLists.txt 2022-11-18 13:06:07.734666684 +0800 -@@ -137,7 +137,7 @@ - - find_package(llvm 15) - find_package(clang 15) --find_package(lld 15) -+# find_package(lld 15) - - if(ZIG_STATIC_ZLIB) - list(REMOVE_ITEM LLVM_LIBRARIES "-lz") -@@ -173,7 +173,7 @@ - endforeach(CONFIG_TYPE CMAKE_CONFIGURATION_TYPES) - - include_directories(${LLVM_INCLUDE_DIRS}) --include_directories(${LLD_INCLUDE_DIRS}) -+# include_directories(${LLD_INCLUDE_DIRS}) - include_directories(${CLANG_INCLUDE_DIRS}) - - # No patches have been applied to SoftFloat-3e -@@ -954,7 +954,7 @@ - - target_link_libraries(zigcpp LINK_PUBLIC - ${CLANG_LIBRARIES} -- ${LLD_LIBRARIES} -+ # ${LLD_LIBRARIES} - ${LLVM_LIBRARIES} - ${CMAKE_THREAD_LIBS_INIT} - ) -diff -bur zig-0.10.0.orig/src/zig_llvm.cpp zig-0.10.0/src/zig_llvm.cpp ---- zig-0.10.0.orig/src/zig_llvm.cpp 2022-11-17 19:51:11.149937665 +0800 -+++ zig-0.10.0/src/zig_llvm.cpp 2022-11-18 13:43:03.820487759 +0800 -@@ -65,7 +65,8 @@ +diff --git a/src/zig_llvm.cpp b/src/zig_llvm.cpp +index d22bfc1..c6502f5 100644 +--- a/src/zig_llvm.cpp ++++ b/src/zig_llvm.cpp +@@ -66,18 +66,100 @@ #include <llvm/Transforms/Utils/CanonicalizeAliases.h> #include <llvm/Transforms/Utils/NameAnonGlobals.h> -#include <lld/Common/Driver.h> -+// Commented out because openSUSE does not ship static libraries for LLD -+// #include <lld/Common/Driver.h> - +- #if __GNUC__ >= 9 #pragma GCC diagnostic pop -@@ -73,10 +74,96 @@ + #endif #include <new> @@ -57,34 +26,31 @@ using namespace llvm; +namespace { -+ -+class Pipe { -+public: ++ class Pipe { ++ public: + Pipe(llvm::raw_ostream *output) : output(output) {} + ~Pipe() { -+ if (fd[0] != -1) close(fd[0]); -+ if (fd[1] != -1) close(fd[1]); ++ if (fd[0] != -1) close(fd[0]); ++ if (fd[1] != -1) close(fd[1]); + } + bool open() { return pipe(fd) == 0; } + int getRead() const { return fd[0]; } + int getWrite() const { return fd[1]; } + void closeWrite() { close(fd[1]); fd[1] = -1; } + void flush() const { -+ constexpr size_t size = 1024; -+ char buf[size]; -+ ssize_t ret; -+ do { -+ ret = read(getRead(), buf, size); -+ if (ret > 0 && output) -+ output->write(buf, ret); -+ } while (ret == size || (ret == -1 && errno == EINTR)); ++ constexpr size_t size = 1024; ++ char buf[size]; ++ ssize_t ret; ++ do { ++ ret = read(getRead(), buf, size); ++ if (ret > 0 && output) ++ output->write(buf, ret); ++ } while (ret == size || (ret == -1 && errno == EINTR)); + } -+ -+private: ++ private: + int fd[2] = {-1, -1}; + llvm::raw_ostream *output; -+}; -+ ++ }; +} // anonymous namespace + +static bool InvokeLld(const char *variant, llvm::ArrayRef<const char *> args, @@ -138,16 +104,17 @@ + return WIFEXITED(wstatus) && WEXITSTATUS(wstatus) == 0; +} + ++ void ZigLLVMInitializeLoopStrengthReducePass(LLVMPassRegistryRef R) { initializeLoopStrengthReducePass(*unwrap(R)); } -@@ -1347,18 +1434,15 @@ bool ZigLLVMWriteArchive(const char *archive_name, const char **file_names, size +@@ -1375,18 +1457,15 @@ bool ZigLLVMWriteArchive(const char *archive_name, const char **file_names, size } bool ZigLLDLinkCOFF(int argc, const char **argv, bool can_exit_early, bool disable_output) { - std::vector<const char *> args(argv, argv + argc); - return lld::coff::link(args, llvm::outs(), llvm::errs(), can_exit_early, disable_output); -+ return InvokeLld("lld-link", llvm::ArrayRef<const char *>(argv, argc), llvm::outs(), llvm::errs(), disable_output); ++ return InvokeLld("lld-link", llvm::ArrayRef<const char *>(argv, argc), llvm::outs(), llvm::errs(), disable_output); } bool ZigLLDLinkELF(int argc, const char **argv, bool can_exit_early, bool disable_output) { ++++++ 0002-no-lld-libs-and-includes.patch ++++++ --- /var/tmp/diff_new_pack.QhVCFC/_old 2023-10-19 22:51:34.555694786 +0200 +++ /var/tmp/diff_new_pack.QhVCFC/_new 2023-10-19 22:51:34.559694931 +0200 @@ -1,45 +1,43 @@ -diff -bur zig-0.10.0.orig/build.zig zig-0.10.0/build.zig ---- zig-0.10.0.orig/build.zig 2022-11-17 19:51:09.821938555 +0800 -+++ zig-0.10.0/build.zig 2022-11-19 05:36:24.771743399 +0800 -@@ -572,12 +572,12 @@ - "zigcpp", - b.fmt("{s}{s}{s}", .{ exe.target.libPrefix(), "zigcpp", exe.target.staticLibSuffix() }), - }) catch unreachable); +From: Soc Virnyl Estela <socvirnyl.est...@gmail.com> +Date: Fri, 04 Aug 2023 14:57:54 PST +Since we patched it to invoke LLD directly, we will have +to remove any mentions of LLD here. +diff --git a/build.zig b/build.zig +index cb62d64..f9e0a6a 100644 +--- a/build.zig ++++ b/build.zig +@@ -612,12 +612,9 @@ fn addCmakeCfgOptionsToExe( + cfg.cmake_static_library_suffix, + }), + }) }); - assert(cfg.lld_include_dir.len != 0); -- exe.addIncludePath(cfg.lld_include_dir); -+ // assert(cfg.lld_include_dir.len != 0); -+ // exe.addIncludePath(cfg.lld_include_dir); - exe.addIncludePath(cfg.llvm_include_dir); - exe.addLibraryPath(cfg.llvm_lib_dir); +- exe.addIncludePath(.{ .cwd_relative = cfg.lld_include_dir }); + exe.addIncludePath(.{ .cwd_relative = cfg.llvm_include_dir }); + exe.addLibraryPath(.{ .cwd_relative = cfg.llvm_lib_dir }); addCMakeLibraryList(exe, cfg.clang_libraries); - addCMakeLibraryList(exe, cfg.lld_libraries); -+ // addCMakeLibraryList(exe, cfg.lld_libraries); addCMakeLibraryList(exe, cfg.llvm_libraries); if (use_zig_libcxx) { -@@ -703,8 +703,8 @@ - cmake_binary_dir: []const u8, - cmake_prefix_path: []const u8, +@@ -764,8 +761,6 @@ const CMakeConfig = struct { + cmake_static_library_prefix: []const u8, + cmake_static_library_suffix: []const u8, cxx_compiler: []const u8, - lld_include_dir: []const u8, - lld_libraries: []const u8, -+ // lld_include_dir: []const u8, -+ // lld_libraries: []const u8, clang_libraries: []const u8, llvm_lib_dir: []const u8, llvm_include_dir: []const u8, -@@ -766,8 +766,8 @@ - .cmake_binary_dir = undefined, - .cmake_prefix_path = undefined, +@@ -829,8 +824,6 @@ fn parseConfigH(b: *std.Build, config_h_text: []const u8) ?CMakeConfig { + .cmake_static_library_prefix = undefined, + .cmake_static_library_suffix = undefined, .cxx_compiler = undefined, - .lld_include_dir = undefined, - .lld_libraries = undefined, -+ // .lld_include_dir = undefined, -+ // .lld_libraries = undefined, .clang_libraries = undefined, .llvm_lib_dir = undefined, .llvm_include_dir = undefined, -@@ -788,14 +788,14 @@ +@@ -859,14 +852,6 @@ fn parseConfigH(b: *std.Build, config_h_text: []const u8) ?CMakeConfig { .prefix = "#define ZIG_CXX_COMPILER ", .field = "cxx_compiler", }, @@ -51,14 +49,6 @@ - .prefix = "#define ZIG_LLD_LIBRARIES ", - .field = "lld_libraries", - }, -+ // .{ -+ // .prefix = "#define ZIG_LLD_INCLUDE_PATH ", -+ // .field = "lld_include_dir", -+ // }, -+ // .{ -+ // .prefix = "#define ZIG_LLD_LIBRARIES ", -+ // .field = "lld_libraries", -+ // }, .{ .prefix = "#define ZIG_CLANG_LIBRARIES ", .field = "clang_libraries", ++++++ zig-0.10.1.tar.xz -> zig-0.11.0.tar.xz ++++++ /work/SRC/openSUSE:Factory/zig/zig-0.10.1.tar.xz /work/SRC/openSUSE:Factory/.zig.new.1945/zig-0.11.0.tar.xz differ: char 17, line 1