From d0f1242751ab9d6c5bc114f8300b6376d0b8d32d Mon Sep 17 00:00:00 2001 From: Nathan Fisher Date: Sun, 20 Aug 2023 19:13:31 -0400 Subject: [PATCH] Update gcc, kernel, musl and fix some compilation issues --- config.mk | 2 +- distfiles/Makefile | 6 ++++++ include/mk/versions.mk | 9 +++++---- world/ca-certificates/Makefile | 15 +++++++++++++++ world/e2fsprogs/e2fsprogs_fallocate64.patch | 14 ++++++++++++++ world/lib/libbsd/src/config.h | 1 + world/usr.bin/hpk/Makefile | 2 +- world/usr.bin/rpcgen/src/config.h | 1 + 8 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 world/ca-certificates/Makefile create mode 100644 world/e2fsprogs/e2fsprogs_fallocate64.patch diff --git a/config.mk b/config.mk index 8f9d466..f170344 100644 --- a/config.mk +++ b/config.mk @@ -5,7 +5,7 @@ # armv7l (earlier Arm SBC's such as RPI and RPI2) # aarch64 (later Arm SBC's such as RPI3 and RPI4) # riscv64 (SiFive Unmatched, BeagleV) -arch = x86_64 +arch = aarch64 # If building for rpi3/4 we can automatically configure and build u-boot # by setting rpi to 1 diff --git a/distfiles/Makefile b/distfiles/Makefile index 43a23dd..e9dfaf6 100644 --- a/distfiles/Makefile +++ b/distfiles/Makefile @@ -21,6 +21,7 @@ binutils-${binutils_version}.tar.xz \ bison-${bison_version}.tar.xz \ busybox-${busybox_version}.tar.bz2 \ bzip2-${bzip2_version}.tar.gz \ +ca-certificates-$(ca-certificates_version).tar.xz \ cmake-$(cmake_version).tar.gz \ coreutils-${coreutils_version}.tar.xz \ dash-${dash_version}.tar.gz \ @@ -162,6 +163,11 @@ bzip2: bzip2-${bzip2_version}.tar.gz bzip2-${bzip2_version}.tar.gz: wget -c https://www.sourceware.org/pub/bzip2/$@ +ca-certificates: ca-certificates-$(ca-certificats_version).tar.xz + +ca-certificates-$(ca-certificates_version).tar.xz: + wget -c http://deb.debian.org/debian/pool/main/c/ca-certificates/$@ + cmake: cmake-$(cmake_version).tar.gz cmake-$(cmake_version).tar.gz: diff --git a/include/mk/versions.mk b/include/mk/versions.mk index 447bc56..bc26885 100644 --- a/include/mk/versions.mk +++ b/include/mk/versions.mk @@ -9,10 +9,11 @@ attr_version = 2.5.1 autoconf_version = 2.71 automake_version = 1.16.5 bc_version = 6.0.1 -binutils_version = 2.39 +binutils_version = 2.41 bison_version = 3.8.2 busybox_version = 1.31.1 bzip2_version = 1.0.8 +ca-certificates_version = 20230311 cmake_version = 3.18.1 coreutils_version = 8.32 curl_version = 7.84.0 @@ -29,7 +30,7 @@ file_version = 5.43 findutils_version = 4.9.0 flex_version = 2.6.4 gawk_version = 5.1.1 -gcc_version = 12.2.0 +gcc_version = 13.2.0 gdbm_version = 1.23 gettext_version = 0.21 gettext-tiny_version = 0.3.2 @@ -56,7 +57,7 @@ libnl_version = 3.5.0 libressl_version = 3.0.2 libtool_version = 2.4.7 libz_version = 1.2.8.2015.12.26 -linux_version = 6.1.12 +linux_version = 6.4.11 linux-firmware_version = 20220815 linux_rpi_version = 5.4.45 m4_version = 1.4.19 @@ -66,7 +67,7 @@ mandoc_version = 1.14.5 meson_version = 0.61.1 mpc_version = 1.2.1 mpfr_version = 4.1.0 -musl_version = 1.2.2 +musl_version = 1.2.4 musl-fts_version = 1.2.7 musl-obstack_version = 1.2.3 ncurses_version = 6.3 diff --git a/world/ca-certificates/Makefile b/world/ca-certificates/Makefile new file mode 100644 index 0000000..0c49a07 --- /dev/null +++ b/world/ca-certificates/Makefile @@ -0,0 +1,15 @@ +# Makefile - hhl - /usr/src/world/ca-certificates +# Copyright 2023 Nathan Fisher +# +distname = ca-certificates +no_objdir = 1 +use_configure = 0 +export CERTSDIR = /etc/ssl/certs +include world.mk +include targets.mk + +install: | $(DESTDIR)/$(CERTSDIR) + +$(DESTDIR)/$(CERTSDIR): + install -d $@ + diff --git a/world/e2fsprogs/e2fsprogs_fallocate64.patch b/world/e2fsprogs/e2fsprogs_fallocate64.patch new file mode 100644 index 0000000..e580b2e --- /dev/null +++ b/world/e2fsprogs/e2fsprogs_fallocate64.patch @@ -0,0 +1,14 @@ +diff -Naur e2fsprogs-1.46.5/misc/e4defrag.c e2fsprogs-1.46.5.orig/misc/e4defrag.c +--- e2fsprogs-1.46.5/misc/e4defrag.c 2021-12-30 00:54:33.000000000 -0500 ++++ e2fsprogs-1.46.5.orig/misc/e4defrag.c 2023-08-20 18:54:50.480371281 -0400 +@@ -195,10 +195,6 @@ + #error posix_fadvise not available! + #endif + +-#ifndef HAVE_FALLOCATE64 +-#error fallocate64 not available! +-#endif /* ! HAVE_FALLOCATE64 */ +- + /* + * get_mount_point() - Get device's mount point. + * diff --git a/world/lib/libbsd/src/config.h b/world/lib/libbsd/src/config.h index fab9bb3..d43b7eb 100644 --- a/world/lib/libbsd/src/config.h +++ b/world/lib/libbsd/src/config.h @@ -153,6 +153,7 @@ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +#define _LARGEFILE64_SOURCE /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/world/usr.bin/hpk/Makefile b/world/usr.bin/hpk/Makefile index 297dec0..071c4ae 100644 --- a/world/usr.bin/hpk/Makefile +++ b/world/usr.bin/hpk/Makefile @@ -3,11 +3,11 @@ # progname = hpk bins += hpk -export TARGET_CC = x86_64-hitchhiker-linux-musl-gcc FEATURES = --all-features INSTALL = $(tgt_dir)/$(rust_tgt)/release/bootstrap \ --target-dir=$(tgt_dir)/$(rust_tgt)/release $(build)/usr include hhl.cargo.mk +export TARGET_CC = ${tgt}-gcc srcs += Cargo.toml srcs += Cargo.lock diff --git a/world/usr.bin/rpcgen/src/config.h b/world/usr.bin/rpcgen/src/config.h index bd85267..0eabc24 100644 --- a/world/usr.bin/rpcgen/src/config.h +++ b/world/usr.bin/rpcgen/src/config.h @@ -46,3 +46,4 @@ /* Version number of package */ #define VERSION "1.4.2" +#define _LARGEFILE64_SOURCE