diff options
author | Vincent Grande | 2021-01-05 20:25:00 -0500 |
---|---|---|
committer | Vincent Grande | 2021-01-05 20:25:00 -0500 |
commit | 2de1b09dcbb1069c543bf93d2945f0bc84feda72 (patch) | |
tree | 82248ebe3b098320ab6c43b845c4c1979c72bf4e | |
parent | c67a2952c577711b7d6dfaf749c07efe676aa9be (diff) | |
download | aur-2de1b09dcbb1069c543bf93d2945f0bc84feda72.tar.gz |
fix
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | 0001-Hack-mpi_x64.s-to-work-with-fno-plt.patch | 57 | ||||
-rw-r--r-- | PKGBUILD | 8 |
3 files changed, 64 insertions, 3 deletions
@@ -16,6 +16,8 @@ pkgbase = lib32-nss-hg provides = lib32-nss conflicts = lib32-nss source = hg+https://hg.mozilla.org/projects/nss + source = 0001-Hack-mpi_x64.s-to-work-with-fno-plt.patch + sha256sums = SKIP sha256sums = SKIP pkgname = lib32-nss-hg diff --git a/0001-Hack-mpi_x64.s-to-work-with-fno-plt.patch b/0001-Hack-mpi_x64.s-to-work-with-fno-plt.patch new file mode 100644 index 000000000000..59597965b0d4 --- /dev/null +++ b/0001-Hack-mpi_x64.s-to-work-with-fno-plt.patch @@ -0,0 +1,57 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> +Date: Sat, 12 Dec 2020 13:43:54 +0100 +Subject: [PATCH] Hack mpi_x64.s to work with -fno-plt + +--- + lib/freebl/mpi/mpi_x86.s | 23 +++++++++++++++++++++-- + 1 file changed, 21 insertions(+), 2 deletions(-) + +diff --git a/lib/freebl/mpi/mpi_x86.s b/lib/freebl/mpi/mpi_x86.s +index 8f7e2130c3..b3ca1ce5b4 100644 +--- a/lib/freebl/mpi/mpi_x86.s ++++ b/lib/freebl/mpi/mpi_x86.s +@@ -22,22 +22,41 @@ is_sse: .long -1 + # + .ifndef NO_PIC + .macro GET var,reg +- movl \var@GOTOFF(%ebx),\reg ++ call thunk.ax ++ addl $_GLOBAL_OFFSET_TABLE_, %eax ++ movl \var@GOTOFF(%eax),\reg + .endm + .macro PUT reg,var +- movl \reg,\var@GOTOFF(%ebx) ++ call thunk.dx ++ addl $_GLOBAL_OFFSET_TABLE_, %edx ++ movl \reg,\var@GOTOFF(%edx) + .endm + .else + .macro GET var,reg + movl \var,\reg + .endm + .macro PUT reg,var + movl \reg,\var + .endm + .endif + + .text + ++.ifndef NO_PIC ++.globl thunk.ax ++.hidden thunk.ax ++.type thunk.ax, @function ++thunk.ax: ++ movl (%esp),%eax ++ ret ++ ++.globl thunk.dx ++.hidden thunk.dx ++.type thunk.dx, @function ++thunk.dx: ++ movl (%esp),%edx ++ ret ++.endif + + # ebp - 36: caller's esi + # ebp - 32: caller's edi @@ -16,8 +16,10 @@ depends=(lib32-nspr lib32-sqlite lib32-zlib 'lib32-p11-kit') makedepends=(perl python gyp) provides=(lib32-nss) conflicts=(lib32-nss) -source=("hg+https://hg.mozilla.org/projects/nss") -sha256sums=('SKIP') +source=("hg+https://hg.mozilla.org/projects/nss" + "0001-Hack-mpi_x64.s-to-work-with-fno-plt.patch") +sha256sums=('SKIP' + 'SKIP') pkgver() { local vmajor vminor vpatch @@ -33,7 +35,7 @@ prepare() { cd nss # https://bugzilla.mozilla.org/show_bug.cgi?id=1382942 -# patch -Np1 -i "$srcdir/0001-Hack-mpi_x64.s-to-work-with-fno-plt.patch" + patch -Np1 -i "$srcdir/0001-Hack-mpi_x64.s-to-work-with-fno-plt.patch" } build() { |