wechat-uos: fix crashing issue caused by zerocallusedregs hardening

This commit is contained in:
Lan Tian 2024-08-18 11:34:52 -07:00
parent abcef4da4e
commit 539f2e7291
No known key found for this signature in database
GPG Key ID: 04E66B6B25A0862B

View File

@ -63,6 +63,11 @@
uosLicense ? null
}:
let
# zerocallusedregs hardening breaks WeChat
glibcWithoutHardening = stdenv.cc.libc.overrideAttrs (old: {
hardeningDisable = (old.hardeningDisable or [ ]) ++ [ "zerocallusedregs" ];
});
wechat-uos-env = stdenvNoCC.mkDerivation {
meta.priority = 1;
name = "wechat-uos-env";
@ -108,6 +113,9 @@ let
};
wechat-uos-runtime = with xorg; [
# Make sure our glibc without hardening gets picked up first
(lib.hiPrio glibcWithoutHardening)
stdenv.cc.cc
stdenv.cc.libc
pango
@ -240,7 +248,7 @@ let
license = licenses.unfree;
platforms = [ "x86_64-linux" "aarch64-linux" "loongarch64-linux" ];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
maintainers = with maintainers; [ pokon548 ];
maintainers = with maintainers; [ pokon548 xddxdd ];
mainProgram = "wechat-uos";
};
};