From d13b4b3fbafe59339db590060ff19689cf95cf61 Mon Sep 17 00:00:00 2001 From: Anhad Singh Date: Sun, 9 Feb 2025 18:48:02 +1100 Subject: [PATCH 1/8] feat(cosmic-term): dynamic Signed-off-by: Anhad Singh --- recipes/tools/cosmic-term/recipe.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/tools/cosmic-term/recipe.toml b/recipes/tools/cosmic-term/recipe.toml index 2afe4c007..338b04fac 100644 --- a/recipes/tools/cosmic-term/recipe.toml +++ b/recipes/tools/cosmic-term/recipe.toml @@ -5,6 +5,7 @@ branch = "master" [build] template = "custom" script = """ +DYNAMIC_INIT cookbook_cargo --no-default-features mkdir -pv "${COOKBOOK_STAGE}/ui/apps" cp -v "${COOKBOOK_RECIPE}/manifest" "${COOKBOOK_STAGE}/ui/apps/10_cosmic-term" From 59020502507fd4aea035bc6838441e1236b53eb3 Mon Sep 17 00:00:00 2001 From: Anhad Singh Date: Sun, 9 Feb 2025 18:49:31 +1100 Subject: [PATCH 2/8] misc(openssl1): remove old patch Signed-off-by: Anhad Singh --- recipes/libs/openssl1/openssl1.patch | 50 ---------------------------- 1 file changed, 50 deletions(-) delete mode 100644 recipes/libs/openssl1/openssl1.patch diff --git a/recipes/libs/openssl1/openssl1.patch b/recipes/libs/openssl1/openssl1.patch deleted file mode 100644 index 82fe3ac23..000000000 --- a/recipes/libs/openssl1/openssl1.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf -index 45e2fc7a..2d7f7db3 100644 ---- a/Configurations/10-main.conf -+++ b/Configurations/10-main.conf -@@ -175,28 +175,32 @@ sub vms_info { - }, - - --### Redox -- "redox-aarch64" => { -- inherit_from => [ "BASE_common", asm("aarch64_asm") ], -+### Redox configurations -+ "redox-common" => { -+ inherit_from => [ "BASE_common" ], - cc => "gcc", -- cflags => "-DL_ENDIAN -DOSSL_SSIZE_MAX=LONG_MAX -DNO_SYSLOG -O3 -static -Wall", -+ thread_scheme => "(unknown)", -+ dso_scheme => "dlfcn", -+ shared_target => "linux-shared", -+ shared_cflag => "-fPIC", -+ shared_ldflag => sub { $disabled{pinshared} ? () : "-Wl,-znodelete" }, -+ shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -+ }, -+ "redox-aarch64" => { -+ inherit_from => [ "redox-common", asm("aarch64_asm") ], -+ cflags => "-DL_ENDIAN -DOSSL_SSIZE_MAX=LONG_MAX -DNO_SYSLOG -O3 -Wall", - bn_ops => "SIXTY_FOUR_BIT_LONG", - perlasm_scheme => "elf", -- thread_scheme => "(unknown)", - }, - "redox-i686" => { -- inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], -- cc => "gcc", -- cflags => "-DL_ENDIAN -DNO_SYSLOG -O3 -static -Wall", -+ inherit_from => [ "redox-common", asm("x86_elf_asm") ], -+ cflags => "-DL_ENDIAN -DNO_SYSLOG -O3 -Wall", - bn_ops => "BN_LLONG", -- thread_scheme => "(unknown)", - }, - "redox-x86_64" => { -- inherit_from => [ "BASE_common", asm("x86_64_asm") ], -- cc => "gcc", -- cflags => "-DL_ENDIAN -DOSSL_SSIZE_MAX=LONG_MAX -DNO_SYSLOG -O3 -static -Wall", -+ inherit_from => [ "redox-common", asm("x86_64_asm") ], -+ cflags => "-DL_ENDIAN -DOSSL_SSIZE_MAX=LONG_MAX -DNO_SYSLOG -O3 -Wall", - bn_ops => "SIXTY_FOUR_BIT_LONG", -- thread_scheme => "(unknown)", - }, - - #### Solaris configurations From c19cb7608503ca051d92047614a81b4d07e18e54 Mon Sep 17 00:00:00 2001 From: Anhad Singh Date: Sun, 9 Feb 2025 18:50:33 +1100 Subject: [PATCH 3/8] feat(libssh2): dynamic Signed-off-by: Anhad Singh --- recipes/libs/libssh2/recipe.toml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/recipes/libs/libssh2/recipe.toml b/recipes/libs/libssh2/recipe.toml index 4040960a0..da1740d4d 100644 --- a/recipes/libs/libssh2/recipe.toml +++ b/recipes/libs/libssh2/recipe.toml @@ -1,10 +1,22 @@ [source] tar = "https://www.libssh2.org/download/libssh2-1.10.0.tar.gz" blake3 = "2447216ce82c1d22301456bb02f60dfb6688f1461417b90f900c099a87f1292f" -patches = [] +script = """ +DYNAMIC_INIT +autotools_recursive_regenerate +""" [build] -template = "configure" -dependencies = [ - "openssl1" +template = "custom" +dependencies = ["openssl1"] +script = """ +DYNAMIC_INIT +cookbook_configure +""" + +[package] +shared-deps = [ + "libgcc", + "openssl1" ] + From 9042d5ebd4fc87a1c62a11184ea52ebd8b0abc7a Mon Sep 17 00:00:00 2001 From: Anhad Singh Date: Sun, 9 Feb 2025 18:51:46 +1100 Subject: [PATCH 4/8] fix(cosmic-term): add missing shared-deps Signed-off-by: Anhad Singh --- recipes/tools/cosmic-term/recipe.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recipes/tools/cosmic-term/recipe.toml b/recipes/tools/cosmic-term/recipe.toml index 338b04fac..73adb4563 100644 --- a/recipes/tools/cosmic-term/recipe.toml +++ b/recipes/tools/cosmic-term/recipe.toml @@ -18,3 +18,9 @@ cp -v "${COOKBOOK_SOURCE}/res/${APPID}.metainfo.xml" "${COOKBOOK_STAGE}/usr/shar mkdir -pv "${COOKBOOK_STAGE}/usr/share/icons/" cp -rv "${COOKBOOK_SOURCE}/res/icons/hicolor/" "${COOKBOOK_STAGE}/usr/share/icons/" """ + +[package] +shared-deps = [ + "libgcc" +] + From e731a3ab528c12c718b10520701d7e6b75c01f18 Mon Sep 17 00:00:00 2001 From: Anhad Singh Date: Sun, 9 Feb 2025 18:53:21 +1100 Subject: [PATCH 5/8] feat(cargo): dynamic Signed-off-by: Anhad Singh --- recipes/dev/cargo/recipe.toml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/recipes/dev/cargo/recipe.toml b/recipes/dev/cargo/recipe.toml index 71834b919..8fa7121b7 100644 --- a/recipes/dev/cargo/recipe.toml +++ b/recipes/dev/cargo/recipe.toml @@ -13,6 +13,7 @@ dependencies = [ "zlib", ] script = """ +DYNAMIC_INIT export LIBSSH2_SYS_USE_PKG_CONFIG=1 export LIBZ_SYS_STATIC=1 export DEP_NGHTTP2_ROOT="${COOKBOOK_SYSROOT}" @@ -29,3 +30,14 @@ export DEP_Z_ROOT="${COOKBOOK_SYSROOT}" mkdir -pv "${COOKBOOK_STAGE}/bin" cp -v "target/${TARGET}/release/cargo" "${COOKBOOK_STAGE}/bin/cargo" """ + +[package] +shared-deps = [ + "libgcc", + "curl", + "libssh2", + "nghttp2", + "openssl1", + "zlib", +] + From efada0e656e535609ef0a9a915d05286b8ef4e10 Mon Sep 17 00:00:00 2001 From: Anhad Singh Date: Mon, 10 Feb 2025 23:19:54 +1100 Subject: [PATCH 6/8] feat(llvm18-shared) Signed-off-by: Anhad Singh --- recipes/dev/llvm18-shared/native.cmake | 2 + recipes/dev/llvm18-shared/recipe.toml | 87 ++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 recipes/dev/llvm18-shared/native.cmake create mode 100644 recipes/dev/llvm18-shared/recipe.toml diff --git a/recipes/dev/llvm18-shared/native.cmake b/recipes/dev/llvm18-shared/native.cmake new file mode 100644 index 000000000..4b0abbfa3 --- /dev/null +++ b/recipes/dev/llvm18-shared/native.cmake @@ -0,0 +1,2 @@ +set(CMAKE_C_COMPILER cc) +set(CMAKE_CXX_COMPILER c++) diff --git a/recipes/dev/llvm18-shared/recipe.toml b/recipes/dev/llvm18-shared/recipe.toml new file mode 100644 index 000000000..93b57c996 --- /dev/null +++ b/recipes/dev/llvm18-shared/recipe.toml @@ -0,0 +1,87 @@ +[source] +git = "https://gitlab.redox-os.org/redox-os/llvm-project.git" +upstream = "https://github.com/rust-lang/llvm-project.git" +branch = "redox-2024-05-11" + +[build] +template = "custom" +dependencies = [ + "zlib" +] +script = """ +DYNAMIC_INIT + +cat > CMakeToolchain-x86_64.cmake < Date: Mon, 10 Feb 2025 23:20:17 +1100 Subject: [PATCH 7/8] fix(zlib): set soname Signed-off-by: Anhad Singh --- recipes/libs/zlib/recipe.toml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/recipes/libs/zlib/recipe.toml b/recipes/libs/zlib/recipe.toml index 0ff21eb5e..303801789 100644 --- a/recipes/libs/zlib/recipe.toml +++ b/recipes/libs/zlib/recipe.toml @@ -1,14 +1,16 @@ [source] tar = "https://www.zlib.net/fossils/zlib-1.3.tar.gz" blake3 = "ec1abc6f672a7a6ee6f49ba544cc9529f73121b478310473be44fee22a140ebf" + [build] template = "custom" script = """ - DYNAMIC_INIT - # See https://stackoverflow.com/questions/21396988/zlib-build-not-configuring-properly-with-cross-compiler-ignores-ar. - CHOST="${TARGET}" "${COOKBOOK_CONFIGURE}" --prefix="" - "${COOKBOOK_MAKE}" -j "$(nproc)" - "${COOKBOOK_MAKE}" install DESTDIR="${COOKBOOK_STAGE}" +DYNAMIC_INIT +# See https://stackoverflow.com/questions/21396988/zlib-build-not-configuring-properly-with-cross-compiler-ignores-ar. +CHOST="${TARGET}" "${COOKBOOK_CONFIGURE}" --prefix="" +"${COOKBOOK_MAKE}" -j "$(nproc)" +"${COOKBOOK_MAKE}" install DESTDIR="${COOKBOOK_STAGE}" +patchelf --set-soname 'libz.so.1.3' "${COOKBOOK_STAGE}/lib/libz.so.1.3" """ [package] From 4f70981463c58283ea8ffed1c478c324023a7cbc Mon Sep 17 00:00:00 2001 From: Anhad Singh Date: Mon, 10 Feb 2025 23:22:28 +1100 Subject: [PATCH 8/8] feat(rustc): dynamic Signed-off-by: Anhad Singh --- recipes/dev/rust/config.toml | 4 ++-- recipes/dev/rust/recipe.sh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/dev/rust/config.toml b/recipes/dev/rust/config.toml index 180cfd09d..0a05f38c2 100644 --- a/recipes/dev/rust/config.toml +++ b/recipes/dev/rust/config.toml @@ -1,6 +1,6 @@ [llvm] download-ci-llvm = false -static-libstdcpp = true +static-libstdcpp = false [build] host = ["x86_64-unknown-redox"] @@ -26,4 +26,4 @@ ar = "x86_64-unknown-redox-ar" linker = "x86_64-unknown-redox-gcc" # Nasty path, please fix llvm-config = "../../../../bin/x86_64-unknown-redox-llvm-config" -crt-static = true +crt-static = false diff --git a/recipes/dev/rust/recipe.sh b/recipes/dev/rust/recipe.sh index fb417a310..33b80e486 100644 --- a/recipes/dev/rust/recipe.sh +++ b/recipes/dev/rust/recipe.sh @@ -1,6 +1,6 @@ GIT=https://gitlab.redox-os.org/redox-os/rust.git BRANCH=redox-2024-05-11 -BUILD_DEPENDS=(llvm18) +BUILD_DEPENDS=(llvm18-shared zlib libgcc) DEPENDS="gcc13 cargo" PREPARE_COPY=0 @@ -11,6 +11,7 @@ function recipe_version { function recipe_build { unset AR AS CC CXX LD NM OBJCOPY OBJDUMP RANLIB READELF STRIP + export MAGIC_EXTRA_RUSTFLAGS="-C link-args=-lz" python3 "${COOKBOOK_SOURCE}/x.py" install --config "${COOKBOOK_RECIPE}/config.toml" --jobs $(nproc) --incremental skip=1 }