On 2023/01/15 10:19, Stuart Henderson wrote:
> On 2023/01/14 22:04, Mark Kettenis wrote:
> > > Date: Sat, 14 Jan 2023 21:08:38 +0100
> > > From: Theo Buehler <tb@theobuehler.org>
> > >
> > > This moves constants from .text into .rodata.
> > >
> > > All tests pass, gnupg tests work, gpgme and gcr build.
> >
> > Right, and then the idiots did this:
> >
> > https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commit;h=fd02e8e78470deb661269c429f3348f811c054c6
> >
> > so future versions will need furher patching. At least they used a
> > macro, so it is relatively easy to revert.
>
> I tried the newer branch before --no-execute-only went in, it doesn't
> build as-is so needs further patching anyway.
>
Since I still had my WIP of libgcrypt head lying around from when
I tried that to see if it would help, I've updated it with the diff
from https://marc.info/?l=gcrypt-devel&m=167380913210961 added.
It's not important for ports yet (though presumably will be later)
and I won't look at this more now, but I've included the diff below
(I sighed at the getrandom call that I #ifdef'd out) and FWIW
this is how build now fails on aarch64:
(On amd64 it builds; most tests pass but "basic" / "basic-disable-all-hwf"
fail with SIGFPE.)
ld: error: relocation R_AARCH64_ADR_PREL_PG_HI21 cannot be used against symbol _gcry_chacha20_aarch64_blocks4_data_rot8; recompile with -fPIC
>>> defined in /usr/ports/pobj/libgcrypt-20230106/libgcrypt-5e1a04f/cipher/.libs/libcipher.a(chacha20-aarch64.o)
>>> referenced by chacha20-aarch64.S:211
>>> chacha20-aarch64.o:(_gcry_chacha20_aarch64_blocks4) in archive /usr/ports/pobj/libgcrypt-20230106/libgcrypt-5e1a04f/cipher/.libs/libcipher.a
ld: error: can't create dynamic relocation R_AARCH64_ADD_ABS_LO12_NC against symbol: _gcry_chacha20_aarch64_blocks4_data_rot8 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in /usr/ports/pobj/libgcrypt-20230106/libgcrypt-5e1a04f/cipher/.libs/libcipher.a(chacha20-aarch64.o)
>>> referenced by chacha20-aarch64.S:211
>>> chacha20-aarch64.o:(_gcry_chacha20_aarch64_blocks4) in archive /usr/ports/pobj/libgcrypt-20230106/libgcrypt-5e1a04f/cipher/.libs/libcipher.a
ld: error: relocation R_AARCH64_ADR_PREL_PG_HI21 cannot be used against symbol _gcry_chacha20_aarch64_blocks4_data_inc_counter; recompile with -fPIC
>>> defined in /usr/ports/pobj/libgcrypt-20230106/libgcrypt-5e1a04f/cipher/.libs/libcipher.a(chacha20-aarch64.o)
>>> referenced by chacha20-aarch64.S:214
>>> chacha20-aarch64.o:(_gcry_chacha20_aarch64_blocks4) in archive /usr/ports/pobj/libgcrypt-20230106/libgcrypt-5e1a04f/cipher/.libs/libcipher.a
ld: error: can't create dynamic relocation R_AARCH64_ADD_ABS_LO12_NC against symbol: _gcry_chacha20_aarch64_blocks4_data_inc_counter in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in /usr/ports/pobj/libgcrypt-20230106/libgcrypt-5e1a04f/cipher/.libs/libcipher.a(chacha20-aarch64.o)
>>> referenced by chacha20-aarch64.S:214
>>> chacha20-aarch64.o:(_gcry_chacha20_aarch64_blocks4) in archive /usr/ports/pobj/libgcrypt-20230106/libgcrypt-5e1a04f/cipher/.libs/libcipher.a
ld: error: relocation R_AARCH64_ADR_PREL_PG_HI21 cannot be used against symbol _gcry_chacha20_aarch64_blocks4_data_rot8; recompile with -fPIC
>>> defined in /usr/ports/pobj/libgcrypt-20230106/libgcrypt-5e1a04f/cipher/.libs/libcipher.a(chacha20-aarch64.o)
>>> referenced by chacha20-aarch64.S:388
>>> chacha20-aarch64.o:(_gcry_chacha20_poly1305_aarch64_blocks4) in archive /usr/ports/pobj/libgcrypt-20230106/libgcrypt-5e1a04f/cipher/.libs/libcipher.a
ld: error: can't create dynamic relocation R_AARCH64_ADD_ABS_LO12_NC against symbol: _gcry_chacha20_aarch64_blocks4_data_rot8 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in /usr/ports/pobj/libgcrypt-20230106/libgcrypt-5e1a04f/cipher/.libs/libcipher.a(chacha20-aarch64.o)
>>> referenced by chacha20-aarch64.S:388
>>> chacha20-aarch64.o:(_gcry_chacha20_poly1305_aarch64_blocks4) in archive /usr/ports/pobj/libgcrypt-20230106/libgcrypt-5e1a04f/cipher/.libs/libcipher.a
ld: error: relocation R_AARCH64_ADR_PREL_PG_HI21 cannot be used against symbol _gcry_chacha20_aarch64_blocks4_data_inc_counter; recompile with -fPIC
>>> defined in /usr/ports/pobj/libgcrypt-20230106/libgcrypt-5e1a04f/cipher/.libs/libcipher.a(chacha20-aarch64.o)
>>> referenced by chacha20-aarch64.S:391
>>> chacha20-aarch64.o:(_gcry_chacha20_poly1305_aarch64_blocks4) in archive /usr/ports/pobj/libgcrypt-20230106/libgcrypt-5e1a04f/cipher/.libs/libcipher.a
ld: error: can't create dynamic relocation R_AARCH64_ADD_ABS_LO12_NC against symbol: _gcry_chacha20_aarch64_blocks4_data_inc_counter in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in /usr/ports/pobj/libgcrypt-20230106/libgcrypt-5e1a04f/cipher/.libs/libcipher.a(chacha20-aarch64.o)
>>> referenced by chacha20-aarch64.S:391
>>> chacha20-aarch64.o:(_gcry_chacha20_poly1305_aarch64_blocks4) in archive /usr/ports/pobj/libgcrypt-20230106/libgcrypt-5e1a04f/cipher/.libs/libcipher.a
cc: error: linker command failed with exit code 1 (use -v to see invocation)
Index: Makefile
===================================================================
RCS file: /cvs/ports/security/libgcrypt/Makefile,v
retrieving revision 1.82
diff -u -p -r1.82 Makefile
--- Makefile 15 Jan 2023 09:35:41 -0000 1.82
+++ Makefile 16 Jan 2023 13:40:20 -0000
@@ -1,9 +1,13 @@
COMMENT= crypto library based on code used in GnuPG
-DISTNAME= libgcrypt-1.10.1
-REVISION= 2
+DISTNAME= libgcrypt-20230106
CATEGORIES= security
+C= 5e1a04f77933a8295df69d818e9effc076dc68cd
+CS= ${C:C/^(.......)(.*)/\1/}
+DISTFILES= libgcrypt-HEAD-5e1a04f.tar.gz{gitweb.cgi?p=libgcrypt.git\;a=snapshot\;h=$C\;sf=tgz}
+WRKDIST= ${WRKDIR}/libgcrypt-${CS}
+
SHARED_LIBS += gcrypt 21.0 # 24.1
HOMEPAGE= https://www.gnupg.org/software/libgcrypt/index.html
@@ -15,18 +19,26 @@ PERMIT_PACKAGE= Yes
WANTLIB += c gpg-error iconv intl
-MASTER_SITES= ${MASTER_SITE_GNUPG:=libgcrypt/}
+#MASTER_SITES= ${MASTER_SITE_GNUPG:=libgcrypt/}
+MASTER_SITES= https://git.gnupg.org/cgi-bin/
LIB_DEPENDS= security/libgpg-error
-CONFIGURE_STYLE= gnu
+CONFIGURE_STYLE= autoreconf
+AUTORECONF= ./autogen.sh
+AUTOCONF_VERSION= 2.71
+AUTOMAKE_VERSION= 1.16
+
CONFIGURE_ARGS= --enable-static \
--disable-drng-support
-.if ${MACHINE_ARCH} != aarch64
-USE_NOEXECONLY= Yes
-.endif
+#.if ${MACHINE_ARCH} != aarch64
+#USE_NOEXECONLY= Yes
+#.endif
DEBUG_PACKAGES= ${BUILD_PACKAGES}
+
+post-extract:
+ printf '@set UPDATED 28 March 2022\n@set UPDATED-MONTH March 2022\n@set EDITION 1.10.1\n@set VERSION 1.10.1\n' > ${WRKSRC}/doc/version.texi
.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/security/libgcrypt/distinfo,v
retrieving revision 1.43
diff -u -p -r1.43 distinfo
--- distinfo 29 Mar 2022 07:15:13 -0000 1.43
+++ distinfo 16 Jan 2023 13:40:20 -0000
@@ -1,2 +1,2 @@
-SHA256 (libgcrypt-1.10.1.tar.gz) = wDFZxmERfoD/2XoT0Uxe6ItImfi1eQFpPAmdKwQtwSQ=
-SIZE (libgcrypt-1.10.1.tar.gz) = 4484715
+SHA256 (libgcrypt-HEAD-5e1a04f.tar.gz) = YkrchpoNEtOSmYj5jyoQK+6ERN0XoldwAiE3AzNmHeE=
+SIZE (libgcrypt-HEAD-5e1a04f.tar.gz) = 4012633
Index: patches/patch-cipher_asm-common-aarch64_h
===================================================================
RCS file: patches/patch-cipher_asm-common-aarch64_h
diff -N patches/patch-cipher_asm-common-aarch64_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-cipher_asm-common-aarch64_h 16 Jan 2023 13:40:20 -0000
@@ -0,0 +1,23 @@
+https://marc.info/?l=gcrypt-devel&m=167380913210961
+
+Index: cipher/asm-common-aarch64.h
+--- cipher/asm-common-aarch64.h.orig
++++ cipher/asm-common-aarch64.h
+@@ -29,8 +29,15 @@
+ # define ELF(...) /*_*/
+
No comments:
Post a Comment