In T5255#141976, @jukivili wrote:Unfortunately these are not enough to enable building with clang LTO. Build now fails when linking test executables (libgcrypt.so gets build however):
Any ideas what might be causing this?
- Queries
- All Stories
- Search
- Advanced Search
Feed Advanced Search
Advanced Search
Advanced Search
Yesterday
Yesterday
telans added a comment to T5255: libgcrypt: build "error: invalid operand for instruction" when compiling with Clang & LTO.
jukivili added a comment to T5255: libgcrypt: build "error: invalid operand for instruction" when compiling with Clang & LTO.
Configure output has still has some differences LTO vs non-LTO:
--- non-lto.log 2021-01-21 22:25:14.966099577 +0200 +++ lto.log 2021-01-21 22:25:23.174086100 +0200 @@ -63,7 +63,7 @@ checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib -checking command to parse /usr/bin/nm -B output from clang object... ok +checking command to parse /usr/bin/nm -B output from clang object... failed checking for sysroot... no checking for mt... mt checking if mt is a manifest tool... no @@ -75,7 +75,7 @@ checking if clang static flag -static works... yes checking if clang supports -c -o file.o... yes checking if clang supports -c -o file.o... (cached) yes -checking whether the clang linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes +checking whether the clang linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate @@ -168,8 +168,8 @@ checking whether 'asm' assembler keyword is supported... yes checking whether '__asm__' assembler keyword is supported... yes checking whether inline assembly memory barrier is supported... yes -checking whether GCC assembler is compatible for ARM assembly implementations... no -checking whether GCC assembler is compatible for ARMv8/Aarch64 assembly implementations... no +checking whether GCC assembler is compatible for ARM assembly implementations... yes +checking whether GCC assembler is compatible for ARMv8/Aarch64 assembly implementations... yes checking whether GCC assembler supports for CFI directives... yes checking whether GCC assembler supports for ELF directives... yes checking for _ prefix in compiled symbols... no @@ -240,7 +240,7 @@ checking if gcc supports -Wno-missing-field-initializers... yes checking if gcc supports -Wpointer-arith... yes checking whether non excutable stack support is requested... yes -checking whether assembler supports --noexecstack option... yes +checking whether assembler supports --noexecstack option... no checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile
jukivili added a comment to T5255: libgcrypt: build "error: invalid operand for instruction" when compiling with Clang & LTO.
Clang support Intel syntax after all, but not assembler macros that were used. Here's two patches that fix the configure.ac issue and removes use of assembly macros in Intel syntax assembly files:
0001-configure.ac-fix-Intel-syntax-check-with-clang-flto.patch1 KB
0002-sha512-sha256-remove-assembler-macros-from-AMD64-imp.patch109 KB
Wed, Jan 20
Wed, Jan 20
werner triaged T5256: libgcrypt, convert Intel syntax x86_64 assembly files to AT&T syntax as Normal priority.
jukivili added a comment to T5255: libgcrypt: build "error: invalid operand for instruction" when compiling with Clang & LTO.
Breakage appears to happen in configure.ac. When building with clang without LTO following check gives "no":
telans added a comment to T5255: libgcrypt: build "error: invalid operand for instruction" when compiling with Clang & LTO.
Both are affected. I updated to reflect that I tested the newer version
werner triaged T5255: libgcrypt: build "error: invalid operand for instruction" when compiling with Clang & LTO as Normal priority.
Nov 28 2019
Nov 28 2019
Apr 1 2019
Apr 1 2019
I think commit https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commit;h=09c27280cc09798d15369b3a143036b7ab5ddd69 should be backported to 1.8 branch of libgcrypt.
Mar 25 2019
Mar 25 2019
Thank you, it worked.
Mar 24 2019
Mar 24 2019
Jan 14 2019
Jan 14 2019
Jan 10 2019
Jan 10 2019
Set to high because it breaks a build.
Aug 15 2017
Aug 15 2017
It's been a month since last release, no error reports so far.
Jul 4 2017
Jul 4 2017
marcus changed the status of T3182: gnupg 1.4 built with gcc 7.0.1 fails the tests on ARM from Open to Testing.
Should be fixed in 782f804765b6f4226fd77843e59f57dcca61b6fb, can you verify that? Thanks!
Jun 7 2017
Jun 7 2017
Marcus, can you please check this?
Jun 1 2017
Jun 1 2017