mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-11-05 04:06:38 +08:00
Merge branch 'node-clang' into 'master'
Add a script to create patches of tar, patch libuv and nodejs for compiling with clang See merge request redox-os/redox!2343
This commit is contained in:
commit
348bc93c3c
@ -128,6 +128,17 @@ diff -ruwN source/src/unix/fs.c source-new/src/unix/fs.c
|
||||
stat_fs->f_type = 0; /* f_type is not supported. */
|
||||
#else
|
||||
stat_fs->f_type = buf.f_type;
|
||||
diff -ruwN source/src/unix/process.c source-new/src/unix/process.c
|
||||
--- source/src/unix/process.c 2025-04-25 09:50:27.000000000 +0000
|
||||
+++ source-new/src/unix/process.c 2026-09-10 14:04:01.547065156 +0000
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "uv.h"
|
||||
#include "internal.h"
|
||||
|
||||
+#include <grp.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
diff -ruwN source/src/unix/proctitle.c source-new/src/unix/proctitle.c
|
||||
--- source/src/unix/proctitle.c 2025-04-25 16:50:27.000000000 +0700
|
||||
+++ source-new/src/unix/proctitle.c 2025-10-10 11:18:29.025229760 +0700
|
||||
|
||||
@ -26,7 +26,11 @@ dev-dependencies = [
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
export PYTHONDONTWRITEBYTECODE=1 COOKBOOK_NOSTRIP=true
|
||||
if [[ "$REDOXER_USE_CLANG" != "1" && "$REDOXER_USE_CLANG" != "true" ]]; then
|
||||
export CC_host="$CC_WRAPPER gcc" CXX_host="$CC_WRAPPER g++"
|
||||
else
|
||||
export CC_host="$CC_WRAPPER clang" CXX_host="$CC_WRAPPER clang++" LDFLAGS_host="-fuse-ld=lld"
|
||||
fi
|
||||
|
||||
rsync -av "${COOKBOOK_SOURCE}/" ./
|
||||
|
||||
|
||||
@ -30,6 +30,28 @@ diff -ruwN source/configure.py source-new/configure.py
|
||||
valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', 'ppc',
|
||||
'ppc64', 'x64', 'x86', 'x86_64', 's390x', 'riscv64', 'loong64')
|
||||
valid_arm_float_abi = ('soft', 'softfp', 'hard')
|
||||
diff -ruwN source/deps/simdjson/simdjson.h source-new/deps/simdjson/simdjson.h
|
||||
--- source/deps/simdjson/simdjson.h 2024-04-10 12:46:12.000000000 +0000
|
||||
+++ source-new/deps/simdjson/simdjson.h 2026-09-10 23:01:55.280881826 +0000
|
||||
@@ -6257,15 +6257,15 @@
|
||||
simdjson_inline void one_char(char c);
|
||||
|
||||
simdjson_inline void call_print_newline() {
|
||||
- this->print_newline();
|
||||
+ static_cast<formatter*>(this)->print_newline();
|
||||
}
|
||||
|
||||
simdjson_inline void call_print_indents(size_t depth) {
|
||||
- this->print_indents(depth);
|
||||
+ static_cast<formatter*>(this)->print_indents(depth);
|
||||
}
|
||||
|
||||
simdjson_inline void call_print_space() {
|
||||
- this->print_space();
|
||||
+ static_cast<formatter*>(this)->print_space();
|
||||
}
|
||||
|
||||
protected:
|
||||
diff -ruwN source/deps/v8/bazel/config/BUILD.bazel source-new/deps/v8/bazel/config/BUILD.bazel
|
||||
--- source/deps/v8/bazel/config/BUILD.bazel 2024-04-10 19:46:12.000000000 +0700
|
||||
+++ source-new/deps/v8/bazel/config/BUILD.bazel 2025-10-10 15:52:40.317126983 +0700
|
||||
|
||||
37
scripts/patch-tar.sh
Executable file
37
scripts/patch-tar.sh
Executable file
@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
# This script generates a "redox.patch" for a tar-based recipe
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "Generates a 'redox.patch' for a tar-based recipe"
|
||||
echo ""
|
||||
echo "Usage: $0 <recipe-name>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
RECIPE_PATH=$(make find.$1)
|
||||
RECIPE_PATH=${RECIPE_PATH//$'\r'/}
|
||||
|
||||
if [ ! -d "$RECIPE_PATH/source" ]; then
|
||||
echo "Error: 'source' directory not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$RECIPE_PATH/source.tar" ]; then
|
||||
echo "Error: 'source.tar' not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export TZ=UTC
|
||||
set -x
|
||||
|
||||
cd $RECIPE_PATH
|
||||
mv source source-new
|
||||
mkdir source
|
||||
tar xf source.tar -C source --strip-components=1
|
||||
diff -ruwN source source-new > redox.patch || true
|
||||
rm -rf source
|
||||
mv source-new source
|
||||
Loading…
Reference in New Issue
Block a user