Summary: | dev-libs/libgcrypt-1.10.2: compile on i686 with -Og fails with error: 'asm' operand has impossible constraints | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | tedheadster |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
See Also: | https://dev.gnupg.org/T6892 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
emerge --info
libgcrypt build.log |
Description
tedheadster
2023-10-02 01:18:58 UTC
Created attachment 872066 [details]
emerge --info
Created attachment 872067 [details]
libgcrypt build.log
What is the status of this bug? It means open, I hadn't seen it at the time. Is 1.10.3 any better? No change in 1.10.3, it fails with the same error. -O2 is fine but -Og fails for me too. libtool: compile: gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/dev-libs/libgcrypt-1.10.3/work/libgcrypt-1.10.3/mpi -I.. -I../src -I/var/tmp/portage/dev-libs/libgcrypt-1.10.3/work/libgcrypt-1.10.3/src -Og -march=i686 -fvisibility=hidden -fno-delete-null-pointer-checks -Wall -c /var/tmp/portage/dev-libs/libgcrypt-1.10.3/work/libgcrypt-1.10.3/mpi/ec-nist.c -fPIC -DPIC -o .libs/ec-nist.o In file included from /var/tmp/portage/dev-libs/libgcrypt-1.10.3/work/libgcrypt-1.10.3/mpi/ec-nist.c:34: /var/tmp/portage/dev-libs/libgcrypt-1.10.3/work/libgcrypt-1.10.3/mpi/ec-nist.c: In function '_gcry_mpi_ec_nist256_mod': /var/tmp/portage/dev-libs/libgcrypt-1.10.3/work/libgcrypt-1.10.3/mpi/ec-inline.h:701:3: error: 'asm' operand has impossible constraints 701 | __asm__ ("subl %11, %3\n" \ | ^~~~~~~ /var/tmp/portage/dev-libs/libgcrypt-1.10.3/work/libgcrypt-1.10.3/mpi/ec-inline.h:894:9: note: in expansion of macro 'SUB4_LIMB32' 894 | SUB4_LIMB32(A1.hi, A1.lo, A0.hi, A0.lo, \ | ^~~~~~~~~~~ /var/tmp/portage/dev-libs/libgcrypt-1.10.3/work/libgcrypt-1.10.3/mpi/ec-inline.h:1009:5: note: in expansion of macro 'SUB2_LIMB64' 1009 | SUB2_LIMB64(A4, A3, B4, B3, C4, C3); \ | ^~~~~~~~~~~ /var/tmp/portage/dev-libs/libgcrypt-1.10.3/work/libgcrypt-1.10.3/mpi/ec-nist.c:474:3: note: in expansion of macro 'SUB5_LIMB64' 474 | SUB5_LIMB64 (s[4], s[3], s[2], s[1], s[0], | ^~~~~~~~~~~ make[2]: *** [Makefile:664: ec-nist.lo] Error 1 make[2]: Leaving directory '/var/tmp/portage/dev-libs/libgcrypt-1.10.3/work/libgcrypt-1.10.3-abi_x86_32.x86/mpi' make[1]: *** [Makefile:505: all-recursive] Error 1 make[1]: Leaving directory '/var/tmp/portage/dev-libs/libgcrypt-1.10.3/work/libgcrypt-1.10.3-abi_x86_32.x86' make: *** [Makefile:437: all] Error 2 * ERROR: dev-libs/libgcrypt-1.10.3::gentoo failed (compile phase): Reported upstream at https://dev.gnupg.org/T6892. As a workaround, use -O2. Should we enlist help from the compiler group? (In reply to tedheadster from comment #8) > Should we enlist help from the compiler group? It's already being discussed upstream (see the link). If you mean the compiler/toolchain group in Gentoo, we could, but: 1) I'm one of them; 2) upstream are already working on it, so what's the point? Ultimately, as mentioned on the upstream bug, less optimisation is often quite challenging on (32-bit) x86 because of the small number of GPRs. Anything which might result in an extra register being needed (because of a missed/skipped optimisation) can have quite a big impact. I don't really see the need for any intervention. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=361b44c3bbbb24c615c26b5ba36cc84a80968f33 commit 361b44c3bbbb24c615c26b5ba36cc84a80968f33 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-03-04 02:37:32 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-03-04 02:37:32 +0000 dev-libs/libgcrypt: backport asm fixes * Backport fixes for x86 with less/no optimisation * Backport HPPA asm fix Closes: https://bugs.gentoo.org/915060 Closes: https://bugs.gentoo.org/925284 Signed-off-by: Sam James <sam@gentoo.org> .../libgcrypt/files/libgcrypt-1.10.3-hppa.patch | 110 ++++++ .../files/libgcrypt-1.10.3-x86-refactor.patch | 428 +++++++++++++++++++++ .../libgcrypt/files/libgcrypt-1.10.3-x86.patch | 94 +++++ dev-libs/libgcrypt/libgcrypt-1.10.3-r2.ebuild | 178 +++++++++ 4 files changed, 810 insertions(+) |