diff --git a/Makefile b/Makefile index 0540293a..02fb7d04 100644 --- a/Makefile +++ b/Makefile @@ -52,6 +52,15 @@ include $(CONFIG) # Unless otherwise specified, we are building for heads CONFIG_HEADS ?= y +# Determine arch part for a host triplet +ifeq "$(CONFIG_TARGET_ARCH)" "x86" +MUSL_ARCH := x86_64 +else ifeq "$(CONFIG_TARGET_ARCH)" "ppc64" +MUSL_ARCH := powerpc64le +else +$(error "Unexpected value of $$(CONFIG_TARGET_ARCH): $(CONFIG_TARGET_ARCH)") +endif + # Create directories if they don't already exist BUILD_LOG := $(shell mkdir -p "$(log_dir)") PACKAGES := $(shell mkdir -p "$(packages)") diff --git a/blobs/dev.cpio b/blobs/dev.cpio index 43f10880..3b103d4e 100644 Binary files a/blobs/dev.cpio and b/blobs/dev.cpio differ diff --git a/modules/busybox b/modules/busybox index e011402a..ae240690 100644 --- a/modules/busybox +++ b/modules/busybox @@ -26,6 +26,7 @@ $(initrd_tmp_dir)/bin/busybox: $(build)/$(busybox_dir)/.build $(MAKE) \ -C $(build)/$(busybox_dir) \ CC="$(heads_cc)" \ + CROSS_COMPILE="$(CROSS)" \ CONFIG_PREFIX="$(initrd_bin_dir)/.." \ install \ | tee -a $(build)/log/busybox.log \ diff --git a/modules/cairo b/modules/cairo index 647ed2ca..f281166d 100644 --- a/modules/cairo +++ b/modules/cairo @@ -10,7 +10,7 @@ cairo_configure := \ $(CROSS_TOOLS) \ CFLAGS="-DCAIRO_NO_MUTEX=1 -O3" \ ./configure \ - --host i386-elf-linux \ + --host $(MUSL_ARCH)-elf-linux \ --prefix="/" \ --disable-xlib --disable-xcb --disable-pdf \ --disable-ps --disable-svg --disable-script \ diff --git a/modules/coreboot b/modules/coreboot index af1ba826..41706bf7 100644 --- a/modules/coreboot +++ b/modules/coreboot @@ -5,6 +5,16 @@ ifeq "$(CONFIG_COREBOOT)" "y" CONFIG_COREBOOT_ROM ?= coreboot.rom CONFIG_COREBOOT_BOOTBLOCK ?= +ifeq "$(CONFIG_TARGET_ARCH)" "x86" + COREBOOT_TARGET := i386 + LINUX_IMAGE_FILE := bzImage +else ifeq "$(CONFIG_TARGET_ARCH)" "ppc64" + COREBOOT_TARGET := ppc64 + LINUX_IMAGE_FILE := zImage +else + $(error "$(CONFIG_TARGET_ARCH) target isn't supported by this module") +endif + ifeq "$(CONFIG_COREBOOT_VERSION)" "4.8.1" coreboot_version := 4.8.1 coreboot_hash := f0ddf4db0628c1fe1e8348c40084d9cbeb5771400c963fd419cda3995b69ad23 @@ -60,15 +70,21 @@ coreboot_configure := \ COREBOOT_IASL="$(build)/$(coreboot_base_dir)/util/crossgcc/xgcc/bin/iasl" -# coreboot is built with the 32-bit compiler; ideally we could use the same -# x86_64-linux-musl -m32 to build it, but this causes some link errors that need -# to be tracked down. +# coreboot for x86 is built with the 32-bit compiler; ideally we could use the +# same x86_64-linux-musl -m32 to build it, but this causes some link errors that +# need to be tracked down. # CROSS="$(CROSS)" \ +ifeq "$(CONFIG_TARGET_ARCH)" "x86" +COREBOOT_CROSS := $(dir $(CROSS))i386-linux-musl- +else +COREBOOT_CROSS := $(CROSS) +endif + coreboot_target := \ -C "$(build)/$(coreboot_base_dir)" \ obj="$(build)/$(coreboot_dir)" \ - CROSS="$(dir $(CROSS))i386-linux-musl-" \ + CROSS="$(COREBOOT_CROSS)" \ IASL="$(COREBOOT_IASL)" \ DOTCONFIG="$(build)/$(coreboot_dir)/.config" \ BUILD_TIMELESS=1 \ @@ -82,13 +98,13 @@ coreboot_depend += linux initrd $(musl_dep) COREBOOT_TOOLCHAIN="$(build)/$(coreboot_base_dir)/.xcompile" $(COREBOOT_TOOLCHAIN): $(build)/$(coreboot_base_dir)/.canary - $(MAKE) -C "$(build)/$(coreboot_base_dir)" CPUS=$(CPUS) crossgcc-i386 + $(MAKE) -C "$(build)/$(coreboot_base_dir)" CPUS=$(CPUS) "crossgcc-$(COREBOOT_TARGET)" $(build)/$(coreboot_dir)/.configured: $(COREBOOT_TOOLCHAIN) # Force a rebuild if the inputs have changed $(build)/$(coreboot_dir)/.build: \ - $(build)/$(BOARD)/bzImage \ + $(build)/$(BOARD)/$(LINUX_IMAGE_FILE) \ $(build)/$(BOARD)/initrd.cpio.xz \ # This produces a ROM image that is written with the flashrom program diff --git a/modules/cryptsetup b/modules/cryptsetup index 4cea7f35..0f89ee80 100644 --- a/modules/cryptsetup +++ b/modules/cryptsetup @@ -12,7 +12,7 @@ cryptsetup_hash := af2b04e8475cf40b8d9ffd97a1acfa73aa787c890430afd89804fb544d6ad # build path. cryptsetup_configure := ./configure \ $(CROSS_TOOLS) \ - --host i386-elf-linux \ + --host $(MUSL_ARCH)-elf-linux \ --prefix "/" \ --disable-gcrypt-pbkdf2 \ --enable-cryptsetup-reencrypt \ diff --git a/modules/cryptsetup2 b/modules/cryptsetup2 index af7fe381..bfb1446b 100644 --- a/modules/cryptsetup2 +++ b/modules/cryptsetup2 @@ -12,7 +12,7 @@ cryptsetup2_hash := 3bca4ffe39e2f94cef50f6ea65acb873a6dbce5db34fc6bcefe38b6d095e # build path. cryptsetup2_configure := ./configure \ $(CROSS_TOOLS) \ - --host i386-elf-linux \ + --host $(MUSL_ARCH)-elf-linux \ --prefix "/" \ --disable-rpath \ --disable-gcrypt-pbkdf2 \ diff --git a/modules/dropbear b/modules/dropbear index 1649bcf3..285f97bb 100644 --- a/modules/dropbear +++ b/modules/dropbear @@ -9,7 +9,7 @@ dropbear_hash := 2720ea54ed009af812701bcc290a2a601d5c107d12993e5d92c0f5f81f71889 dropbear_configure := ./configure \ $(CROSS_TOOLS) \ - --host i386-elf-linux \ + --host $(MUSL_ARCH)-elf-linux \ --prefix "/" \ --disable-syslog \ --disable-lastlog \ diff --git a/modules/gpg b/modules/gpg index 4d4440a1..4d4df3de 100644 --- a/modules/gpg +++ b/modules/gpg @@ -19,8 +19,8 @@ gpg_hash := 6b47a3100c857dcab3c60e6152e56a997f2c7862c1b8b2b25adf3884a1ae2276 # gpg_configure := ./configure \ $(CROSS_TOOLS) \ - --build i386-elf-linux \ - --host x86_64-linux-musl \ + --build $(MUSL_ARCH)-elf-linux \ + --host $(MUSL_ARCH)-linux-musl \ --with-libusb="$(INSTALL)" \ --prefix "/" \ --enable-card-support \ diff --git a/modules/gpg2 b/modules/gpg2 index 1f2c8635..aaeb6fad 100644 --- a/modules/gpg2 +++ b/modules/gpg2 @@ -14,7 +14,7 @@ gpg2_hash := 61e83278fb5fa7336658a8b73ab26f379d41275bb1c7c6e694dd9f9a6e8e76ec gpg2_configure := ./configure \ $(CROSS_TOOLS) \ CPPFLAGS="-I$(INSTALL)/include/libusb-1.0" \ - --host x86_64-linux-musl \ + --host $(MUSL_ARCH)-linux-musl \ --with-libusb="$(INSTALL)" \ --with-gpg-error-prefix="$(INSTALL)" \ --with-libgcrypt-prefix="$(INSTALL)" \ diff --git a/modules/kexec b/modules/kexec index 19cee214..6bcc4e24 100644 --- a/modules/kexec +++ b/modules/kexec @@ -8,8 +8,8 @@ kexec_hash := 40623d4321be2865ef9ea2cd6ec998d31dcf93d0f74353cbd3aa06d8821e3e41 kexec_configure := ./configure \ $(CROSS_TOOLS) \ - --host i386-elf-linux \ - --target x86_64 \ + --host $(MUSL_ARCH)-elf-linux \ + --target $(MUSL_ARCH) \ --prefix="/" \ --without-lzma \ && $(MAKE) clean diff --git a/modules/libassuan b/modules/libassuan index 111e6625..4d8dd554 100644 --- a/modules/libassuan +++ b/modules/libassuan @@ -1,4 +1,5 @@ modules-$(CONFIG_GPG2) += libassuan + libassuan_version := 2.5.3 libassuan_dir := libassuan-$(libassuan_version) libassuan_tar := libassuan-$(libassuan_version).tar.bz2 @@ -7,7 +8,7 @@ libassuan_hash := 91bcb0403866b4e7c4bc1cc52ed4c364a9b5414b3994f718c70303f7f765e7 libassuan_configure := ./configure \ $(CROSS_TOOLS) \ - --host x86_64-linux-musl \ + --host $(MUSL_ARCH)-linux-musl \ --prefix "/" \ --disable-static \ --disable-debug \ diff --git a/modules/libgcrypt b/modules/libgcrypt index 3c2e5d9a..e64307e2 100644 --- a/modules/libgcrypt +++ b/modules/libgcrypt @@ -1,4 +1,5 @@ modules-$(CONFIG_GPG2) += libgcrypt + libgcrypt_version := 1.8.6 libgcrypt_dir := libgcrypt-$(libgcrypt_version) libgcrypt_tar := libgcrypt-$(libgcrypt_version).tar.bz2 @@ -7,7 +8,7 @@ libgcrypt_hash := 0cba2700617b99fc33864a0c16b1fa7fdf9781d9ed3509f5d767178e5fd7b9 libgcrypt_configure := ./configure \ $(CROSS_TOOLS) \ - --host=x86_64-linux-musl \ + --host=$(MUSL_ARCH)-linux-musl \ --prefix "/" \ --disable-static \ --with-gpg-error-prefix="$(INSTALL)" \ diff --git a/modules/libgpg-error b/modules/libgpg-error index 00bd0644..9919eee2 100644 --- a/modules/libgpg-error +++ b/modules/libgpg-error @@ -1,4 +1,5 @@ modules-$(CONFIG_GPG2) += libgpg-error + libgpg-error_version := 1.37 libgpg-error_dir := libgpg-error-$(libgpg-error_version) libgpg-error_tar := libgpg-error-$(libgpg-error_version).tar.bz2 @@ -8,7 +9,7 @@ libgpg-error_hash := b32d6ff72a73cf79797f7f2d039e95e9c6f92f0c1450215410840ab62ae libgpg-error_configure := ./configure \ $(CROSS_TOOLS) \ --prefix "/" \ - --host=x86_64-linux-musl \ + --host=$(MUSL_ARCH)-linux-musl \ --disable-static \ --disable-nls \ --disable-languages \ diff --git a/modules/libhidapi-libusb b/modules/libhidapi-libusb index baaf538f..aa3e15b2 100644 --- a/modules/libhidapi-libusb +++ b/modules/libhidapi-libusb @@ -16,7 +16,7 @@ MY_CROSS_TOOLS := \ libhidapi-libusb_configure := ./bootstrap && \ ./configure \ $(MY_CROSS_TOOLS) \ - --host i386-elf-linux\ + --host $(MUSL_ARCH)-elf-linux\ --prefix "/" diff --git a/modules/libksba b/modules/libksba index bf88d2da..6961f68d 100644 --- a/modules/libksba +++ b/modules/libksba @@ -1,4 +1,5 @@ modules-$(CONFIG_GPG2) += libksba + libksba_version := 1.4.0 libksba_dir := libksba-$(libksba_version) libksba_tar := libksba-$(libksba_version).tar.bz2 @@ -7,7 +8,7 @@ libksba_hash := bfe6a8e91ff0f54d8a329514db406667000cb207238eded49b599761bfca41b6 libksba_configure := ./configure \ $(CROSS_TOOLS) \ - --host x86_64-linux-musl \ + --host $(MUSL_ARCH)-linux-musl \ --prefix "/" \ --disable-static \ --with-gpg-error-prefix="$(INSTALL)" \ diff --git a/modules/libpng b/modules/libpng index e5c3d718..6fd23dc9 100644 --- a/modules/libpng +++ b/modules/libpng @@ -9,7 +9,7 @@ libpng_hash := 574623a4901a9969080ab4a2df9437026c8a87150dfd5c235e28c94b212964a7 libpng_configure := \ $(CROSS_TOOLS) \ ./configure \ - --host i386-elf-linux \ + --host $(MUSL_ARCH)-elf-linux \ --prefix="/" \ libpng_target := \ diff --git a/modules/libusb b/modules/libusb index 971edfdb..86a9b769 100644 --- a/modules/libusb +++ b/modules/libusb @@ -11,7 +11,7 @@ libusb_hash := 7dce9cce9a81194b7065ee912bcd55eeffebab694ea403ffb91b67db66b1824b libusb_configure := ./configure\ $(CROSS_TOOLS)\ - --host i386-elf-linux\ + --host $(MUSL_ARCH)-elf-linux\ --prefix "/"\ --disable-udev\ --disable-tests\ diff --git a/modules/libusb-compat b/modules/libusb-compat index f95854ee..af771a39 100644 --- a/modules/libusb-compat +++ b/modules/libusb-compat @@ -13,7 +13,7 @@ libusb-compat_hash := 404ef4b6b324be79ac1bfb3d839eac860fbc929e6acb1ef88793a6ea32 libusb-compat_configure := ./configure \ $(CROSS_TOOLS) \ - --host i386-elf-linux \ + --host $(MUSL_ARCH)-elf-linux \ --prefix "/" \ PKG_CONFIG=/bin/false \ LIBUSB_1_0_CFLAGS="-I$(INSTALL)/include/libusb-1.0" \ diff --git a/modules/linux b/modules/linux index 6a3a84a2..88251d01 100644 --- a/modules/linux +++ b/modules/linux @@ -1,5 +1,15 @@ modules-y += linux +ifeq "$(CONFIG_TARGET_ARCH)" "x86" + LINUX_ARCH := x86 + LINUX_IMAGE_FILE := bzImage +else ifeq "$(CONFIG_TARGET_ARCH)" "ppc64" + LINUX_ARCH := powerpc + LINUX_IMAGE_FILE := zImage +else + $(error "$(CONFIG_TARGET_ARCH) target isn't supported by this module") +endif + ifeq "$(CONFIG_LINUX_VERSION)" "4.14.62" linux_version := 4.14.62 linux_hash := 51ca4d7e8ee156dc0f19bc7768915cfae41dbb0b4f251e4fa8b178c5674c22ab @@ -43,17 +53,19 @@ linux_configure := \ mkdir -p "$(build)/$(linux_dir)" \ && $(call install_config,$(pwd)/$(linux_kconfig),$(build)/$(linux_dir)/.config) \ && $(MAKE) -C .. \ + ARCH="$(LINUX_ARCH)" \ CROSS_COMPILE="$(CROSS)" \ O="$(build)/$(linux_dir)" \ olddefconfig \ -linux_output += arch/x86/boot/bzImage +linux_output += arch/$(LINUX_ARCH)/boot/$(LINUX_IMAGE_FILE) # Once we have extracted the kernel tar file, install the headers # so that other submodules can make use of them. $(INSTALL)/include/linux/limits.h: $(build)/$(linux_base_dir)/.canary $(MAKE) \ -C "$(build)/$(linux_base_dir)" \ + ARCH="$(LINUX_ARCH)" \ INSTALL_HDR_PATH="$(INSTALL)" \ O="$(linux_dir)" \ KCONFIG_CONFIG="$(pwd)/$(linux_kconfig)" \ @@ -117,6 +129,7 @@ EXTRA_FLAGS := -fdebug-prefix-map=$(pwd)=heads -gno-record-gcc-switches linux_target := \ O="$(build)/$(linux_dir)" \ + ARCH="$(LINUX_ARCH)" \ CROSS_COMPILE="$(CROSS)" \ AFLAGS_KERNEL="$(EXTRA_FLAGS)" \ CFLAGS_KERNEL="$(EXTRA_FLAGS)" \ @@ -167,10 +180,10 @@ $(build)/$(BOARD)/modules.cpio: $(build)/$(linux_dir)/.build @$(RM) -rf "$(module_initrd_dir)" -# The output of the linux.intermediate is the bzImage in the -# linus build directory. We need to copy it into our board +# The output of the linux.intermediate is usually the bzImage in the +# linux build directory. We need to copy it into our board # specific directory for ease of locating it later. -$(build)/$(BOARD)/bzImage: $(build)/$(linux_dir)/.build +$(build)/$(BOARD)/$(LINUX_IMAGE_FILE): $(build)/$(linux_dir)/.build $(call do-copy,$(dir $<)/$(linux_output),$@) @touch $@ # force a timestamp update @sha256sum "$@" | tee -a "$(HASHES)" diff --git a/modules/lvm2 b/modules/lvm2 index e3005f1b..74f3e3be 100644 --- a/modules/lvm2 +++ b/modules/lvm2 @@ -15,7 +15,7 @@ lvm2_configure := \ ac_cv_func_malloc_0_nonnull=yes \ ac_cv_func_realloc_0_nonnull=yes \ ./configure \ - --host i386-elf-linux \ + --host $(MUSL_ARCH)-elf-linux \ --prefix "/" \ --enable-devmapper \ --disable-selinux \ diff --git a/modules/musl-cross b/modules/musl-cross index c4ae5953..b17f675f 100644 --- a/modules/musl-cross +++ b/modules/musl-cross @@ -31,15 +31,11 @@ musl-cross_libraries := \ else -# Force a full build of the cross compiler for x86_64 -# (do not build i386 since coreboot uses its own compiler) - +# Force a full build of the cross compiler for target platform +# No need to build i386 for x86 since coreboot uses its own compiler musl-cross_configure := \ - /bin/echo -e >> Makefile 'both: musl-x86_64' ; \ - /bin/echo -e >> Makefile 'musl-x86_64: extract_all' ; \ - /bin/echo -e >> Makefile '\t$$$$''(MAKE) TARGET=x86_64-linux-musl install' ; \ - /bin/echo -e >> Makefile 'musl-i386: extract_all' ; \ - /bin/echo -e >> Makefile '\t$$$$''(MAKE) TARGET=i386-linux-musl install' ; \ + /bin/echo -e >> Makefile 'musl-target:' ; \ + /bin/echo -e >> Makefile '\t$$$$(MAKE) TARGET="$(MUSL_ARCH)-linux-musl" install' ; CROSS_PATH ?= $(pwd)/crossgcc/$(CONFIG_TARGET_ARCH) @@ -47,10 +43,10 @@ musl-cross_target := \ OUTPUT="$(CROSS_PATH)" \ MAKE="$(MAKE)" \ $(MAKE_JOBS) \ - both + "musl-target" -CROSS := $(CROSS_PATH)/bin/x86_64-linux-musl- -musl-cross_libraries := $(CROSS_PATH)/x86_64-linux-musl/lib/libc.so +CROSS := $(CROSS_PATH)/bin/$(subst -,_,$(MUSL_ARCH))-linux-musl- +musl-cross_libraries := $(CROSS_PATH)/$(subst -,_,$(MUSL_ARCH))-linux-musl/lib/libc.so endif diff --git a/modules/newt b/modules/newt index 5e927cbe..b76e23ed 100644 --- a/modules/newt +++ b/modules/newt @@ -23,5 +23,5 @@ newt_libraries := \ newt_configure := ./autogen.sh; ./configure \ $(CROSS_TOOLS) \ --prefix "/" \ - --host i386-elf-linux \ + --host $(MUSL_ARCH)-elf-linux \ --without-tcl diff --git a/modules/npth b/modules/npth index 2128e1d4..b6bdb79d 100644 --- a/modules/npth +++ b/modules/npth @@ -1,4 +1,5 @@ modules-$(CONFIG_GPG2) += npth + npth_version := 1.6 npth_dir := npth-$(npth_version) npth_tar := npth-$(npth_version).tar.bz2 @@ -7,7 +8,7 @@ npth_hash := 1393abd9adcf0762d34798dc34fdcf4d0d22a8410721e76f1e3afcd1daa4e2d1 npth_configure := ./configure \ $(CROSS_TOOLS) \ - --host x86_64-linux-musl \ + --host $(MUSL_ARCH)-linux-musl \ --prefix "/" \ --disable-static \ --with-gpg-error-prefix="$(INSTALL)" \ diff --git a/modules/pciutils b/modules/pciutils index 7ad14d23..08ba7b77 100644 --- a/modules/pciutils +++ b/modules/pciutils @@ -19,6 +19,7 @@ pciutils_hash := 64293c6ab9318c40ef262b76d87bd9097531759752bac556e50979b1e63cfe6 pciutils_target := \ $(MAKE_JOBS) \ $(CROSS_TOOLS) \ + HOST=$(MUSL_ARCH)-linux-musl \ ZLIB=no \ HWDB=no \ LIBKMOD=no \ diff --git a/modules/pinentry b/modules/pinentry index 54d40e11..6f6ef91e 100644 --- a/modules/pinentry +++ b/modules/pinentry @@ -15,7 +15,7 @@ pinentry_hash := 68076686fa724a290ea49cdf0d1c0c1500907d1b759a3bcbfbec0293e8f5657 # location. pinentry_configure := ./configure \ $(CROSS_TOOLS) \ - --host x86_64-linux-musl \ + --host $(MUSL_ARCH)-linux-musl \ --prefix "/" \ --enable-pinentry-tty \ --disable-libsecret \ diff --git a/modules/pixman b/modules/pixman index 65a2e200..cbacd73f 100644 --- a/modules/pixman +++ b/modules/pixman @@ -9,7 +9,7 @@ pixman_hash := 21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e pixman_configure := \ $(CROSS_TOOLS) \ ./configure \ - --host i386-elf-linux \ + --host $(MUSL_ARCH)-elf-linux \ --prefix="/" \ --disable-gtk diff --git a/modules/popt b/modules/popt index b3b0b045..010ae66e 100644 --- a/modules/popt +++ b/modules/popt @@ -9,7 +9,7 @@ popt_hash := e728ed296fe9f069a0e005003c3d6b2dde3d9cad453422a10d6558616d304cc8 popt_configure := ./configure \ $(CROSS_TOOLS) \ --prefix "/" \ - --host i386-elf-linux \ + --host $(MUSL_ARCH)-elf-linux \ popt_target := \ $(MAKE_JOBS) \ diff --git a/modules/qrencode b/modules/qrencode index fb73c7ba..61d8b533 100644 --- a/modules/qrencode +++ b/modules/qrencode @@ -12,7 +12,7 @@ qrencode_configure := ./configure \ $(CROSS_TOOLS) \ --prefix "/" \ --without-tools \ - --host i386-elf-linux \ + --host $(MUSL_ARCH)-elf-linux \ qrencode_target := \ $(MAKE_JOBS) \ diff --git a/modules/slang b/modules/slang index a4ac84bc..91c57402 100644 --- a/modules/slang +++ b/modules/slang @@ -10,7 +10,7 @@ slang_configure := ./configure \ $(CROSS_TOOLS) \ ac_cv_path_nc5config=no \ --prefix "/" \ - --host i386-elf-linux \ + --host $(MUSL_ARCH)-elf-linux \ --with-z=no \ --with-png=no \ --with-pcre=no \ diff --git a/modules/util-linux b/modules/util-linux index 908ff3e7..3fd41d97 100644 --- a/modules/util-linux +++ b/modules/util-linux @@ -8,7 +8,7 @@ util-linux_hash := accea4d678209f97f634f40a93b7e9fcad5915d1f4749f6c47bee6bf110fe util-linux_configure := ./configure \ $(CROSS_TOOLS) \ - --host i386-elf-linux \ + --host $(MUSL_ARCH)-elf-linux \ --prefix "/" \ --oldincludedir "$(INSTALL)/include" \ --without-ncurses \ diff --git a/patches/libgcrypt-1.8.6.patch b/patches/libgcrypt-1.8.6.patch index 902d96ec..efe2ccd9 100644 --- a/patches/libgcrypt-1.8.6.patch +++ b/patches/libgcrypt-1.8.6.patch @@ -174,3 +174,19 @@ diff -u -r libgcrypt-1.8.3-clean/configure libgcrypt-1.8.3/configure # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +diff --git a/random/jitterentropy-base-user.h b/random/jitterentropy-base-user.h +index 75dd768..8a8dbd5 100644 +--- a/random/jitterentropy-base-user.h ++++ b/random/jitterentropy-base-user.h +@@ -86,9 +86,9 @@ jent_get_nstime(u64 *out) + * not rely on that extra little entropy. */ + if (!clock_gettime (CLOCK_REALTIME, &tv)) + { +- tmp = time.tv_sec; ++ tmp = tv.tv_sec; + tmp = tmp << 32; +- tmp = tmp | time.tv_nsec; ++ tmp = tmp | tv.tv_nsec; + } + else + tmp = 0; diff --git a/patches/libgpg-error-1.37.patch b/patches/libgpg-error-1.37.patch new file mode 100644 index 00000000..ece35fc6 --- /dev/null +++ b/patches/libgpg-error-1.37.patch @@ -0,0 +1,31 @@ +diff --git a/src/syscfg/lock-obj-pub.powerpc64le-unknown-linux-musl.h b/src/syscfg/lock-obj-pub.powerpc64le-unknown-linux-musl.h +new file mode 100644 +index 0000000..635e6eb +--- /dev/null ++++ b/src/syscfg/lock-obj-pub.powerpc64le-unknown-linux-musl.h +@@ -0,0 +1,25 @@ ++## lock-obj-pub.powerpc64le-unknown-linux-musl.h ++## File created by gen-posix-lock-obj - DO NOT EDIT ++## To be included by mkheader into gpg-error.h ++ ++typedef struct ++{ ++ long _vers; ++ union { ++ volatile char _priv[40]; ++ long _x_align; ++ long *_xp_align; ++ } u; ++} gpgrt_lock_t; ++ ++#define GPGRT_LOCK_INITIALIZER {1,{{0,0,0,0,0,0,0,0, \ ++ 0,0,0,0,0,0,0,0, \ ++ 0,0,0,0,0,0,0,0, \ ++ 0,0,0,0,0,0,0,0, \ ++ 0,0,0,0,0,0,0,0}}} ++## ++## Local Variables: ++## mode: c ++## buffer-read-only: t ++## End: ++##