cipher/sha1-ssse3-amd64.S

Jussi Kivilinna jussi.kivilinna at iki.fi
Thu Jan 2 20:03:55 CET 2014


On 02.01.2014 17:41, Richard PALO wrote:
> Le 02/01/14 15:36, Richard PALO a écrit :
>> Hi, sorry I forgot to mention that all the other cipher/*amd64.S modules
>> seem to build without error.
>> cheers
>>
>> Le 02/01/14 15:26, Richard PALO a écrit :
>>> Hyvää Paivää,
>>>
>>> I understand you more or less maintain the amd64 cipher code in
>>> libgcrypt.
>>>
>>> I'm experiencing the following trying to do a pkgsrc build with
>>> libgcrypt-1.6.O on SunOS (illumos):
>>>
>>>> richard at devzoneX:/var/tmp/pkgsrc/security/libgcrypt/work/libgcrypt-1.6.0/cipher$
>>>>
>>>> /opt/local/gcc48/bin/gcc -DHAVE_CONFIG_H -I. -I.. -I../src
>>>> -I/var/tmp/pkgsrc/security/libgcrypt/work/.buildlink/include
>>>> -I/var/tmp/pkgsrc/security/libgcrypt/work/.buildlink/include/gettext
>>>> -D_REENTRANT -O2 -MT sha1-ssse3-amd64.lo -MD -MP -MF
>>>> .deps/sha1-ssse3-amd64.Tpo -c sha1-ssse3-amd64.S  -fPIC -DPIC -o
>>>> .libs/sha1-ssse3-amd64.o -v
>>>> Using built-in specs.
>>>> COLLECT_GCC=/opt/local/gcc48/bin/gcc
>>>> Target: x86_64-sun-solaris2.11
>>>> Configured with: ../gcc-4.8.2/configure --enable-languages='c obj-c++
>>>> objc go fortran c++' --enable-shared --enable-long-long
>>>> --with-local-prefix=/opt/local/gcc48 --enable-libssp
>>>> --enable-threads=posix --with-boot-ldflags='-static-libstdc++
>>>> -static-libgcc -Wl,-R/opt/local/lib ' --disable-nls
>>>> --with-cloog=/opt/local --enable-cloog-backend=isl
>>>> --enable-__cxa_atexit
>>>> --with-gxx-include-dir=/opt/local/gcc48/include/c++/ --with-gnu-as
>>>> --with-as=/usr/gnu/bin/as --without-gnu-ld --with-ld=/usr/bin/ld
>>>> --prefix=/opt/local/gcc48 --build=x86_64-sun-solaris2.11
>>>> --host=x86_64-sun-solaris2.11 --infodir=/opt/local/gcc48/info
>>>> --mandir=/opt/local/gcc48/man
>>>> Thread model: posix
>>>> gcc version 4.8.2 (GCC)
>>>> COLLECT_GCC_OPTIONS='-D' 'HAVE_CONFIG_H' '-I' '.' '-I' '..' '-I'
>>>> '../src' '-I'
>>>> '/var/tmp/pkgsrc/security/libgcrypt/work/.buildlink/include' '-I'
>>>> '/var/tmp/pkgsrc/security/libgcrypt/work/.buildlink/include/gettext'
>>>> '-D' '_REENTRANT' '-O2' '-MT' 'sha1-ssse3-amd64.lo' '-MD' '-MP' '-MF'
>>>> '.deps/sha1-ssse3-amd64.Tpo' '-c' '-fPIC' '-D' 'PIC' '-o'
>>>> '.libs/sha1-ssse3-amd64.o' '-v' '-mtune=generic' '-march=x86-64'
>>>>  /opt/local/gcc48/libexec/gcc/x86_64-sun-solaris2.11/4.8.2/cc1 -E
>>>> -lang-asm -quiet -v -I . -I .. -I ../src -I
>>>> /var/tmp/pkgsrc/security/libgcrypt/work/.buildlink/include -I
>>>> /var/tmp/pkgsrc/security/libgcrypt/work/.buildlink/include/gettext -MD
>>>> .libs/sha1-ssse3-amd64.d -MF .deps/sha1-ssse3-amd64.Tpo -MP -MT
>>>> sha1-ssse3-amd64.lo -P -D HAVE_CONFIG_H -D _REENTRANT -D PIC
>>>> sha1-ssse3-amd64.S -mtune=generic -march=x86-64 -fPIC -O2
>>>> -fno-directives-only -o /var/tmp//ccAxWPXX.s
>>>> ignoring nonexistent directory
>>>> "/opt/local/gcc48/lib/gcc/x86_64-sun-solaris2.11/4.8.2/../../../../x86_64-sun-solaris2.11/include"
>>>>
>>>>
>>>> #include "..." search starts here:
>>>> #include <...> search starts here:
>>>>  .
>>>>  ..
>>>>  ../src
>>>>  /var/tmp/pkgsrc/security/libgcrypt/work/.buildlink/include
>>>>  /var/tmp/pkgsrc/security/libgcrypt/work/.buildlink/include/gettext
>>>>  /opt/local/gcc48/lib/gcc/x86_64-sun-solaris2.11/4.8.2/include
>>>>  /opt/local/gcc48/include
>>>>  /opt/local/gcc48/lib/gcc/x86_64-sun-solaris2.11/4.8.2/include-fixed
>>>>  /usr/include
>>>> End of search list.
>>>> COLLECT_GCC_OPTIONS='-D' 'HAVE_CONFIG_H' '-I' '.' '-I' '..' '-I'
>>>> '../src' '-I'
>>>> '/var/tmp/pkgsrc/security/libgcrypt/work/.buildlink/include' '-I'
>>>> '/var/tmp/pkgsrc/security/libgcrypt/work/.buildlink/include/gettext'
>>>> '-D' '_REENTRANT' '-O2' '-MT' 'sha1-ssse3-amd64.lo' '-MD' '-MP' '-MF'
>>>> '.deps/sha1-ssse3-amd64.Tpo' '-c' '-fPIC' '-D' 'PIC' '-o'
>>>> '.libs/sha1-ssse3-amd64.o' '-v' '-mtune=generic' '-march=x86-64'
>>>>  /usr/gnu/bin/as -v -I . -I .. -I ../src -I
>>>> /var/tmp/pkgsrc/security/libgcrypt/work/.buildlink/include -I
>>>> /var/tmp/pkgsrc/security/libgcrypt/work/.buildlink/include/gettext -V
>>>> -Qy -s --64 -o .libs/sha1-ssse3-amd64.o /var/tmp//ccAxWPXX.s
>>>> GNU assembler version 2.23.1 (i386-pc-solaris2.11) using BFD version
>>>> (GNU Binutils) 2.23.1
>>>> /var/tmp//ccAxWPXX.s: Assembler messages:
>>>> /var/tmp//ccAxWPXX.s:34: Error: unbalanced parenthesis in operand 1.
>>>> /var/tmp//ccAxWPXX.s:38: Error: unbalanced parenthesis in operand 1.
>>>> /var/tmp//ccAxWPXX.s:42: Error: unbalanced parenthesis in operand 1.
>>>> /var/tmp//ccAxWPXX.s:46: Error: unbalanced parenthesis in operand 1.
>>>> /var/tmp//ccAxWPXX.s:54: Error: unbalanced parenthesis in operand 1.
>>>> /var/tmp//ccAxWPXX.s:58: Error: unbalanced parenthesis in operand 1.
>>>> /var/tmp//ccAxWPXX.s:62: Error: unbalanced parenthesis in operand 1.
>>>> /var/tmp//ccAxWPXX.s:66: Error: unbalanced parenthesis in operand 1.
>>>> /var/tmp//ccAxWPXX.s:70: Error: unbalanced parenthesis in operand 1.
>>>> /var/tmp//ccAxWPXX.s:74: Error: unbalanced parenthesis in operand 1.
>>>> /var/tmp//ccAxWPXX.s:78: Error: unbalanced parenthesis in operand 1.
>>>> /var/tmp//ccAxWPXX.s:82: Error: unbalanced parenthesis in operand 1.
>>>> /var/tmp//ccAxWPXX.s:86: Error: unbalanced parenthesis in operand 1.
>>>> /var/tmp//ccAxWPXX.s:90: Error: unbalanced parenthesis in operand 1.
>>>> /var/tmp//ccAxWPXX.s:94: Error: unbalanced parenthesis in operand 1.
>>>> /var/tmp//ccAxWPXX.s:98: Error: unbalanced parenthesis in operand 1.
>>>> /var/tmp//ccAxWPXX.s:102: Error: unbalanced parenthesis in operand 1.
>>>> /var/tmp//ccAxWPXX.s:106: Error: unbalanced parenthesis in operand 1.
>>>> /var/tmp//ccAxWPXX.s:110: Error: unbalanced parenthesis in operand 1.
>>>> /var/tmp//ccAxWPXX.s:114: Error: unbalanced parenthesis in operand 1.
>>>> /var/tmp//ccAxWPXX.s:119: Error: unbalanced parenthesis in operand 1.
>>>> /var/tmp//ccAxWPXX.s:123: Error: unbalanced parenthesis in operand 1.
>>>> /var/tmp//ccAxWPXX.s:127: Error: unbalanced parenthesis in operand 1.
>>>> /var/tmp//ccAxWPXX.s:132: Error: unbalanced parenthesis in operand 1.
>>>
>>>
>>> apparently the paddd code, such as
>>>      `paddd (.LK_XMM + ((i)/20)*16) RIP, tmp0;`
>>> isn't digested well, appended is the generated assembler code.
>>>
>>> Do you have any suggestions other than configure `--disable-asm`?
>>>
>>> thanks,
>>>
>>> richard
>>
> 
> 
> Hi again, after finding the following:
> https://sourceware.org/bugzilla/show_bug.cgi?id=4572
> 
> I tried using '-Wa,--divide' and that seemed to workaround the problem...
> 
> perhaps the code, or at least the Makefile could be adapted accordingly?
> 

I think proper check for this should be added to configure.ac and update
CFLAGS if '-Wa,--divide' is required. (And if '-Wa,--divide' does not work,
assembly code could be disabled.)

-Jussi

> cheers
> 




More information about the Gcrypt-devel mailing list