Skip to content

Commit

Permalink
Misc package updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mintsuki committed Nov 9, 2024
1 parent 6d68d67 commit b1c9792
Show file tree
Hide file tree
Showing 42 changed files with 221 additions and 314 deletions.
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ debug:
JINX_CONFIG_FILE=jinx-config-debug $(MAKE) all

jinx:
curl -Lo jinx https://github.com/mintsuki/jinx/raw/1f80f72165d4037a414791e0fa4a508418f6522d/jinx
curl -Lo jinx https://github.com/mintsuki/jinx/raw/f459adb138abff6afc7936f5fd4bc9e24023a495/jinx
chmod +x jinx

.PHONY: run-kvm
Expand Down
4 changes: 2 additions & 2 deletions build-support/CMakeToolchain-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ set(CMAKE_SYSTEM_PROCESSOR x86_64)

set(CMAKE_FIND_ROOT_PATH /sysroot)

set(CMAKE_C_COMPILER x86_64-pc-vinix-mlibc-gcc)
set(CMAKE_CXX_COMPILER x86_64-pc-vinix-mlibc-g++)
set(CMAKE_C_COMPILER x86_64-vinix-mlibc-gcc)
set(CMAKE_CXX_COMPILER x86_64-vinix-mlibc-g++)

# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
Expand Down
12 changes: 6 additions & 6 deletions build-support/cross_file-x86_64.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[binaries]
c = 'x86_64-pc-vinix-mlibc-gcc'
cpp = 'x86_64-pc-vinix-mlibc-g++'
ar = 'x86_64-pc-vinix-mlibc-ar'
nm = 'x86_64-pc-vinix-mlibc-nm'
strip = 'x86_64-pc-vinix-mlibc-strip'
pkg-config = 'x86_64-pc-vinix-mlibc-pkg-config'
c = 'x86_64-vinix-mlibc-gcc'
cpp = 'x86_64-vinix-mlibc-g++'
ar = 'x86_64-vinix-mlibc-ar'
nm = 'x86_64-vinix-mlibc-nm'
strip = 'x86_64-vinix-mlibc-strip'
pkg-config = 'x86_64-vinix-mlibc-pkg-config'
llvm-config = '/base_dir/build-support/cross-llvm-config'

[host_machine]
Expand Down
8 changes: 5 additions & 3 deletions build-support/makeiso.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ mkdir -pv iso_root/EFI/BOOT
cp host-pkgs/limine/usr/local/share/limine/BOOT*.EFI iso_root/EFI/BOOT/

# Create the disk image.
xorriso -as mkisofs -b boot/limine-bios-cd.bin -no-emul-boot -boot-load-size 4 \
-boot-info-table --efi-boot boot/limine-uefi-cd.bin -efi-boot-part \
--efi-boot-image --protective-msdos-label iso_root -o vinix.iso
xorriso -as mkisofs -R -r -J -b boot/limine-bios-cd.bin \
-no-emul-boot -boot-load-size 4 -boot-info-table -hfsplus \
-apm-block-size 2048 --efi-boot boot/limine-uefi-cd.bin \
-efi-boot-part --efi-boot-image --protective-msdos-label \
iso_root -o vinix.iso

# Install limine.
host-pkgs/limine/usr/local/bin/limine bios-install vinix.iso
11 changes: 6 additions & 5 deletions jinx-config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ JINX_MAJOR_VER=0.4

HOST_CFLAGS="-O2 -pipe -fstack-clash-protection"
HOST_CXXFLAGS="${HOST_CFLAGS} -Wp,-D_GLIBCXX_ASSERTIONS"
HOST_LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs"
HOST_LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now"

TARGET_CFLAGS="$HOST_CFLAGS"
TARGET_CXXFLAGS="$HOST_CXXFLAGS"
Expand All @@ -14,12 +14,13 @@ if [ -z "$ARCHITECTURE" ]; then
ARCHITECTURE=x86_64
fi

OS_TRIPLET=$ARCHITECTURE-pc-vinix-mlibc
OS_TRIPLET=$ARCHITECTURE-vinix-mlibc

case "$ARCHITECTURE" in
x86_64)
TARGET_CFLAGS="$TARGET_CFLAGS -march=x86-64 -mtune=generic -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"
TARGET_CXXFLAGS="$TARGET_CXXFLAGS -march=x86-64 -mtune=generic -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"
TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,-z,pack-relative-relocs"
;;
esac

Expand Down Expand Up @@ -106,10 +107,10 @@ meson_configure_noflags() {
}

cmake_configure() {
CFLAGS="$TARGET_CFLAGS" \
CXXFLAGS="$TARGET_CXXFLAGS" \
LDFLAGS="$TARGET_LDFLAGS" \
cmake_configure_noflags \
-DCMAKE_C_FLAGS="$TARGET_CFLAGS" \
-DCMAKE_CXX_FLAGS="$TARGET_CXXFLAGS" \
-DCMAKE_SHARED_LINKER_FLAGS="$TARGET_LDFLAGS" \
"$@"
}

Expand Down
15 changes: 14 additions & 1 deletion patches/openssh/jinx-working-patch.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git openssh-clean/configure.ac openssh-workdir/configure.ac
index 82e8bb7..f346a7e 100644
index 591d5a3..0a0e5cc 100644
--- openssh-clean/configure.ac
+++ openssh-workdir/configure.ac
@@ -719,6 +719,10 @@ case "$host" in
Expand All @@ -13,3 +13,16 @@ index 82e8bb7..f346a7e 100644
*-*-cygwin*)
LIBS="$LIBS /usr/lib/textreadmode.o"
AC_DEFINE([HAVE_CYGWIN], [1], [Define if you are on Cygwin])
diff --git openssh-clean/sshkey.c openssh-workdir/sshkey.c
index 1db8378..5c25879 100644
--- openssh-clean/sshkey.c
+++ openssh-workdir/sshkey.c
@@ -771,7 +771,7 @@ sshkey_prekey_alloc(u_char **prekeyp, size_t len)
if ((prekey = mmap(NULL, len, PROT_READ|PROT_WRITE,
MAP_ANON|MAP_PRIVATE|PREKEY_MMAP_FLAG, -1, 0)) == MAP_FAILED)
return SSH_ERR_SYSTEM_ERROR;
-#if defined(MADV_DONTDUMP) && !defined(MAP_CONCEAL) && !defined(MAP_NOCORE)
+#if !defined(__vinix__) && defined(MADV_DONTDUMP) && !defined(MAP_CONCEAL) && !defined(MAP_NOCORE)
(void)madvise(prekey, len, MADV_DONTDUMP);
#endif
*prekeyp = prekey;
6 changes: 3 additions & 3 deletions patches/openssl/jinx-working-patch.patch
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ index f815a09..face7e1 100644
+ # This breaks the usual configuration naming convention but it's more
+ # convenient for us, since it matches the target triples
+
+ "x86_64-pc-vinix-mlibc" => {
+ "x86_64-vinix-mlibc" => {
+ inherit_from => [ "vinix-generic64", asm("x86_64_asm") ],
+ perlasm_scheme => "elf",
+
+ # Configure doesn't want to play nice and passes "--cross-compile-suffix"
+ # on to the GCC invocation
+ CC => "x86_64-pc-vinix-mlibc-gcc",
+ CXX => "x86_64-pc-vinix-mlibc-g++",
+ CC => "x86_64-vinix-mlibc-gcc",
+ CXX => "x86_64-vinix-mlibc-g++",
+
+ },
+
Expand Down
148 changes: 0 additions & 148 deletions patches/oss/jinx-working-patch.patch

This file was deleted.

11 changes: 10 additions & 1 deletion patches/python/jinx-working-patch.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git python-clean/configure.ac python-workdir/configure.ac
index 8a32cb5..e55edc7 100644
index d0d5405..ab4df08 100644
--- python-clean/configure.ac
+++ python-workdir/configure.ac
@@ -559,6 +559,9 @@ then
Expand All @@ -22,6 +22,15 @@ index 8a32cb5..e55edc7 100644
*)
# for now, limit cross builds to known configurations
MACHDEP="unknown"
@@ -1514,7 +1520,7 @@ if test $enable_shared = "yes"; then
PY3LIBRARY=libpython3.so
fi
;;
- Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*)
+ Linux*|Vinix*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*)
LDLIBRARY='libpython$(LDVERSION).so'
BLDLIBRARY='-L. -lpython$(LDVERSION)'
RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
@@ -3407,6 +3413,10 @@ then
CYGWIN*)
LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
Expand Down
13 changes: 13 additions & 0 deletions patches/tzdata/jinx-working-patch.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git tzdata-clean/northamerica tzdata-workdir/northamerica
index 01f392e..1af874b 100644
--- tzdata-clean/northamerica
+++ tzdata-workdir/northamerica
@@ -2631,7 +2631,7 @@ Zone America/Dawson -9:17:40 - LMT 1900 Aug 20
# http://puentelibre.mx/noticia/ciudad_juarez_cambio_horario_noviembre_2022/

# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
-Rule Mexico 1931 only - April 30 0:00 1:00 D
+Rule Mexico 1931 only - Apr 30 0:00 1:00 D
Rule Mexico 1931 only - Oct 1 0:00 0 S
Rule Mexico 1939 only - Feb 5 0:00 1:00 D
Rule Mexico 1939 only - Jun 25 0:00 0 S
13 changes: 13 additions & 0 deletions patches/xtrans/jinx-working-patch.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git xtrans-clean/Xtranssock.c xtrans-workdir/Xtranssock.c
index c9823bd..e380e70 100644
--- xtrans-clean/Xtranssock.c
+++ xtrans-workdir/Xtranssock.c
@@ -196,7 +196,7 @@ static Sockettrans2dev Sockettrans2devtab[] = {
static int TRANS(SocketINETClose) (XtransConnInfo ciptr);
#endif

-#if (defined(TCPCONN) && defined(TRANS_SERVER)) || defined(TRANS_REOPEN)
+#if defined(TCPCONN) || defined(TRANS_REOPEN)
static int
is_numeric (const char *str)
{
2 changes: 1 addition & 1 deletion recipes/core-libs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

name=core-libs
revision=1
deps="mlibc libgcc libstdc++ libintl libiconv libxcrypt"
deps="mlibc libgcc libstdc++ libintl libiconv libxcrypt tzdata"
2 changes: 1 addition & 1 deletion recipes/coreutils
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tarball_url="https://ftp.gnu.org/gnu/coreutils/coreutils-${version}.tar.xz"
tarball_blake2b="6fd3a77697c9e85f31415c6ad66559faf18acc7d346677a89d4a999c2027886551e78842a7283e7b3b44fe8ef2fde04ba2f88df32a7844d5f69d45bcb7a04b6f"
source_hostdeps="automake autoconf libtool pkg-config"
hostdeps="gcc automake autoconf libtool pkg-config"
deps="core-libs tzdata"
deps="core-libs"

prepare() {
autotools_recursive_regen
Expand Down
4 changes: 2 additions & 2 deletions recipes/frigg
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#! /bin/sh

name=frigg
version=91ada7d4e12b9e73a454e7be13919e989444faa2
version=805d23ed8737629e0ff170458f95b615a290c938
revision=1
tarball_url="https://github.com/managarm/frigg/archive/${version}.tar.gz"
tarball_blake2b="ba24af6c50bb8cce7b0a668be50679144af2a5fe06e95f36fa896ca01842a893909ee5e9423ebeea57819017b641522f700f9cbec43c2851dd6576acafbb3f03"
tarball_blake2b="0af92c25ef5321fce30fdad6133bb813b67989d4a8e0b76f1320376a6e4f6ca392daeb5ba484a479b22564d020376b1e2991dbcccce6be826c40c93e23bc4396"
imagedeps="meson ninja-build"
hostdeps="pkg-config"

Expand Down
4 changes: 2 additions & 2 deletions recipes/limine
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#! /bin/sh

name=limine
version=8.1.2
version=8.4.0
revision=1
tarball_url="https://github.com/limine-bootloader/limine/releases/download/v${version}/limine-${version}.tar.gz"
tarball_blake2b="b4517ed960686f7d854f71961134a32b5cc786026ad8064a543b86f0b971eeb7c6e38a4f1560484cfc4038e1ea71fe943c0a9d37da966ce0f302c307bf59d03b"
tarball_blake2b="924631c9cd6f6c6400bf2f355c3cb044c19c8574bf37758be9b8f773043071ae8a79d58acf3d4d46a8bf1bc53ce445e02b18d25889e3868539f34c2df91d7fc7"
source_hostdeps="autoconf automake libtool pkg-config"
imagedeps="mtools nasm"
hostdeps="gcc autoconf automake libtool pkg-config"
Expand Down
19 changes: 19 additions & 0 deletions recipes/lz4
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#! /bin/sh

name=lz4
version=1.9.4
revision=1
tarball_url="https://github.com/lz4/lz4/releases/download/v${version}/lz4-${version}.tar.gz"
tarball_blake2b="2289cdce36acd35283bf2f02ef4d6d8f4805563be6d5a3492f3d6ea7975fb6bd14e1ac2e505df9747776edf8bcf0da7ba4ae7084b150e3ec08a52a9885f92ad5"
hostdeps="gcc"
deps="core-libs"

build() {
cp -rp "${source_dir}"/. ./
make CC="${OS_TRIPLET}-gcc" AR="${OS_TRIPLET}-ar" -j${parallelism}
}

package() {
DESTDIR="${dest_dir}" PREFIX="${prefix}" make install
post_package_strip
}
Loading

0 comments on commit b1c9792

Please sign in to comment.