Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 765841 - dev-libs/libgcrypt: [clang] fails to compile "error: invalid operand for instruction"
Summary: dev-libs/libgcrypt: [clang] fails to compile "error: invalid operand for inst...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mikle Kolyada (RETIRED)
URL: https://dev.gnupg.org/T5255
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-17 22:02 UTC by James Beddek
Modified: 2021-09-25 08:44 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log.xz,132.38 KB, application/x-xz)
2021-01-17 22:02 UTC, James Beddek
Details
emerge --info (file_765841.txt,7.90 KB, text/plain)
2021-01-17 22:03 UTC, James Beddek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Beddek 2021-01-17 22:02:15 UTC
Created attachment 683443 [details]
build.log

Both 1.8.7 & 1.8.6 exhibit the same errors. Clang/LLVM 11.0.1

/var/tmp/portage/dev-libs/libgcrypt-1.8.7/work/libgcrypt-1.8.7/cipher/sha512-avx-amd64.S:341:2: error: invalid operand for instruction
 add [digest + 8*(7)], h_64
 ^
/var/tmp/portage/dev-libs/libgcrypt-1.8.7/work/libgcrypt-1.8.7/cipher/sha512-avx-amd64.S:344:6: error: ambiguous operand size for instruction 'add'
 add msg, 16*8
Comment 1 James Beddek 2021-01-17 22:03:35 UTC
Created attachment 683446 [details]
emerge --info
Comment 2 Ionen Wolkens gentoo-dev 2021-01-17 22:26:22 UTC
I can only reproduce if I add -flto=thin to a amd64 build (x86 not using this asm, so).

Builds fine otherwise, I did have to add USE=o-flag-munging though.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-01-17 22:28:29 UTC
This should really go upstream.
Comment 4 James Beddek 2021-01-17 22:57:04 UTC
I did test without -flto=thin, but I didn't check if the error was any different (emerge --keep-going). Looks like it just turns into https://bugs.gentoo.org/707330.

Is it worth opening -flto* bugs here?
Comment 5 Ionen Wolkens gentoo-dev 2021-01-17 23:05:59 UTC
(In reply to Theo Anderson from comment #4)
> I did test without -flto=thin, but I didn't check if the error was any
> different (emerge --keep-going). Looks like it just turns into
> https://bugs.gentoo.org/707330.
Yes, that's what USE=o-flag-munging I mentioned fixes.

> Is it worth opening -flto* bugs here?
clang/lld issues alone doesn't seem so bad (to me), but lto or other exotic flag may be a bit much to ask for. Worse if it's asm issues. Not that I can speak for every maintainers.

Still better to try and get these fixed upstream though, unless it's an issue gentoo is introducing.
Comment 6 James Beddek 2021-02-01 20:55:35 UTC
Closing as fixed in 1.9.1