Bruce Leidl
e20e601129
Updated Recipes: gcr4 3.92 -> 4.0.0 geoclue 2.5.7 -> 2.7.0 gjs 1.73.2 -> 1.77.90 gnome-backgrounds 42.0 -> 45.0 gnome-control-center 43.0 -> 45.0 gnome-desktop 43.rc -> 44.0 gsettings-desktop-schema 43.0 -> 45.0 libblockdev 2.26 -> 2.28 libgweather4 4.0.0 -> 4.2.0 libnma 1.8.38 -> 1.10.6 mozjs 102 -> 115 nss 3.64 -> 3.74 ovmf 202205 -> 202211 New recipes: appstream 0.16.3 libei 1.1.0 libxmlb 0.3.14 tecla 45.0 webm/libvpx 1.13 Recipes updated to replace poky recipes with insufficient version: glib-2.0 2.78.0 gtk+/gtk+3 3.24.38 gtk+/gtk4 4.12.1 icu 73_2 wayland/wayland 1.22.0 wayland/wayland-protocols 1.32 wayland/libinput 1.24.0 libadwaita 1.4.0
55 lines
2.1 KiB
Diff
55 lines
2.1 KiB
Diff
From 5936d1a6a11b60320ce496f5937090b770292af4 Mon Sep 17 00:00:00 2001
|
|
From: Changqing Li <changqing.li@windriver.com>
|
|
Date: Thu, 18 Nov 2021 07:16:39 +0000
|
|
Subject: [PATCH] Rewrite cargo-host-linker in python3
|
|
|
|
Mozjs compile failed with this failure:
|
|
/bin/sh: /lib64/libc.so.6: version `GLIBC_2.33' not found (required by /build/tmp-glibc/work/corei7-64-wrs-linux/mozjs/91.1.0-r0/recipe-sysroot-native/usr/lib/libtinfo.so.5)
|
|
|
|
Root Cause:
|
|
cargo-host-linker has /bin/sh as it's interpreter, but cargo run the cmd
|
|
with LD_LIBRARY_PATH set to recipe-sysroot-native. The host /bin/sh links
|
|
libtinfo.so.5 under recipe-sysroot-native, which needs higher libc. But
|
|
host libc is older libc. So the incompatible problem occurred.
|
|
|
|
Solution:
|
|
rewrite cargo-host-linker in python3
|
|
|
|
Upstream-Status: Inappropriate [oe specific]
|
|
|
|
Signed-off-by: Changqing Li <changqing.li@windriver.com>
|
|
|
|
---
|
|
build/cargo-host-linker | 24 +++++++++++++++++++++---
|
|
1 file changed, 21 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/build/cargo-host-linker b/build/cargo-host-linker
|
|
index cbd0472bf7..87d43ce9ec 100755
|
|
--- a/build/cargo-host-linker
|
|
+++ b/build/cargo-host-linker
|
|
@@ -1,3 +1,21 @@
|
|
-#!/bin/sh
|
|
-# See comment in cargo-linker.
|
|
-eval ${MOZ_CARGO_WRAP_HOST_LD} ${MOZ_CARGO_WRAP_HOST_LDFLAGS} '"$@"'
|
|
+#!/usr/bin/env python3
|
|
+
|
|
+import os,sys
|
|
+
|
|
+if os.environ['MOZ_CARGO_WRAP_HOST_LD'].strip():
|
|
+ binary=os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0]
|
|
+else:
|
|
+ sys.exit(0)
|
|
+
|
|
+if os.environ['MOZ_CARGO_WRAP_HOST_LDFLAGS'].strip():
|
|
+ if os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[1:]:
|
|
+ args=[os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0]] + os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[1:] + [os.environ['MOZ_CARGO_WRAP_HOST_LDFLAGS']] + sys.argv[1:]
|
|
+ else:
|
|
+ args=[os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0]] + [os.environ['MOZ_CARGO_WRAP_HOST_LDFLAGS']] + sys.argv[1:]
|
|
+else:
|
|
+ if os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[1:]:
|
|
+ args=[os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0]] + os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[1:] + sys.argv[1:]
|
|
+ else:
|
|
+ args=[os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0]] + sys.argv[1:]
|
|
+
|
|
+os.execvp(binary, args)
|