Hello René,
Attached is a patch that modifies zig to use the zig-bootstrap
package provided upstream so you don't have to modify your
local llvm/clang install.
I added all supported architectures in the config file but I only build
it for x86_64, no threadripper here haha.
Also I patched the misc/archive/hello.zig as zig only supports //
comments not /**/ .
Question: I have something like 10 new packages and as much patches on
my working copy, what
would be the best format for sending patches? One patch file with
everything in it,
multiple patches with related stuff in it, one patch *per package*?
If so, should I put it in a tarball?
Happy Sunday, cheers!
NoTagIndex: package/develop/zig/zig.conf
===================================================================
--- package/develop/zig/zig.conf (nonexistent)
+++ package/develop/zig/zig.conf (working copy)
@@ -0,0 +1,64 @@
+# --- T2-COPYRIGHT-NOTE-BEGIN ---
+# This copyright note is auto-generated by scripts/Create-CopyPatch.
+#
+# T2 SDE: package/*/zig/zig.conf
+# Copyright (C) 2021 The T2 SDE Project
+#
+# More information can be found in the files COPYING and README.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License. A copy of the
+# GNU General Public License can be found in the file COPYING.
+# --- T2-COPYRIGHT-NOTE-END ---
+
+makeopt=
+makeinstopt=
+
+# WARNING not all arch/abi combinations have been tested upstream
+# so we select the ones that seem to work the most.
+# musl is recommended as it generally produce a statically liked binary.
+
+case $SDECFG_KERNEL in
+ mingw) OS=windows; ABI=gnu ;;
+ *) OS=$SDECFG_KERNEL; ABI=musl ;;
+esac
+
+case $arch_bigendian in
+ yes) BE=be; EB=eb; LE=''; EL='';;
+ no) BE=''; EB=''; LE=le; EL=el;;
+esac
+
+# translate our arch naming to theirs
+case $arch in
+ x86-64) ARCH=${arch/-/_} ;;
+ x86) ARCH=i386 ;;
+ arm64) ARCH=$arch_$BE ;;
+ arm) $arch$EB ; ABI=muslabi ;;
+ powerpc64) ARCH=$arch$LE ;;
+ mips*) ARCH=$arch$EL ;;
+ sparc64) ARCH=sparcv9 ;;
+ riscv) [ "$SDECFG_RISCV_XLEN" = "64" ] && ARCH=$arch64 \
+ || echo "Non 64 bit riscv not supported!" && exit 1 ;;
+ *) ARCH=$arch ;;
+esac
+
+# optimizations aka mcpu
+# generic way to aquire *_OPT from config?
+# using baseline i.e. defaults for now
+OPT=baseline
+
+JOBS=$SDECFG_PARALLEL_MAX
+TRIPLE=$ARCH-$OS-$ABI
+
+zig_inmake() {
+ ./build -j$JOBS $TRIPLE $OPT
+}
+
+zig_postmake() {
+ cp -v out/zig-$TRIPLE-$OPT/bin/* $root/$bindir
+ cp -rv out/zig-$TRIPLE-$OPT/lib/zig $root/${libdir/64/}
+}
+
+hook_add inmake 5 "zig_inmake"
+hook_add postmake 5 "zig_postmake"
Index: package/develop/zig/zig.desc
===================================================================
--- package/develop/zig/zig.desc (revision 52155)
+++ package/develop/zig/zig.desc (working copy)
@@ -1,8 +1,8 @@
[COPY] --- T2-COPYRIGHT-NOTE-BEGIN ---
[COPY] This copyright note is auto-generated by scripts/Create-CopyPatch.
[COPY]
-[COPY] T2 SDE: package/.../zig/zig.desc
-[COPY] Copyright (C) 2008 - 2021 The T2 SDE Project
+[COPY] T2 SDE: package/*/zig/zig.desc
+[COPY] Copyright (C) 2020 - 2021 The T2 SDE Project
[COPY]
[COPY] More information can be found in the files COPYING and README.
[COPY]
@@ -23,6 +23,8 @@
[M] Rene Rebe <[email protected]>
[C] extra/development
+[F] CROSS
+[R] - m68k
[L] MIT
[S] Beta
@@ -30,4 +32,4 @@
[P] X -----5---9 109.300
[CV-FLAGS] NO-PREFIX ODD-STABLE
-[D] e7ba7b69bd7a96f6caa98d0bd40bb97066a2039f4f70886cf803633d zig-0.7.1.tar.gz https://github.com/ziglang/zig/archive/0.7.1/
+[D] 70bc2c36257ecaa37cfeeb41518423710d726873588cda3f6c5ca17b zig-0.7.1.tar.gz https://github.com/ziglang/zig-bootstrap/archive/0.7.1/
Index: misc/archive/hello.zig
===================================================================
--- misc/archive/hello.zig (revision 52155)
+++ misc/archive/hello.zig (working copy)
@@ -1,19 +1,18 @@
-/* Hello World in Zig
- *
- * --- T2-COPYRIGHT-NOTE-BEGIN ---
- * This copyright note is auto-generated by ./scripts/Create-CopyPatch.
- *
- * T2 SDE: misc/archive/hello.c
- * Copyright (C) 2019 - 2005 The T2 SDE Project
- *
- * More information can be found in the files COPYING and README.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License. A copy of the
- * GNU General Public License can be found in the file COPYING.
- * --- T2-COPYRIGHT-NOTE-END ---
- */
+// Hello World in Zig
+//
+// --- T2-COPYRIGHT-NOTE-BEGIN ---
+// This copyright note is auto-generated by ./scripts/Create-CopyPatch.
+//
+// T2 SDE: misc/archive/hello.c
+// Copyright (C) 2019 - 2021 The T2 SDE Project
+//
+// More information can be found in the files COPYING and README.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; version 2 of the License. A copy of the
+// GNU General Public License can be found in the file COPYING.
+// --- T2-COPYRIGHT-NOTE-END ---
const std = @import("std");
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[email protected] with a subject of: unsubscribe t2