--disable-asm flag not being fully honored

Jussi Kivilinna jussi.kivilinna at iki.fi
Sat Sep 21 12:47:59 CEST 2013


On 20.09.2013 22:07, Chris Ballinger wrote:
> Yeah that sounds good to me. I wasn't trying to start a compiler war...
> 
> It would be nice to eventually be able to use the ARM and x86 (especially AES-NI) assembly with clang in a way that maintains compatibility with GCC, but I'm not exactly sure what that would entail.
> 
> Also, the --disable-asm flag I think should be renamed to --disable-mpi-asm if that's all it does and a new option called --disable-asm actually disable all use of assembler. Or at the very least mention in the docs that --disable-asm doesn't disable asm and you need to manually pass -DNO_ASM in your CFLAGS.
> 

I did some testing with clang, on x86-64 libgcrypt builds just fine (even AES-NI is enabled).

On i386, only problem is with mpi/longlong.h and easiest change is to add !__clang__ check (or make those changes that clang wants).

-Jussi

> 
> On Fri, Sep 20, 2013 at 7:22 AM, Jussi Kivilinna <jussi.kivilinna at iki.fi <mailto:jussi.kivilinna at iki.fi>> wrote:
> 
>     On 20.09.2013 14:53, Werner Koch wrote:
>     > On Fri, 20 Sep 2013 11:44, jussi.kivilinna at iki.fi <mailto:jussi.kivilinna at iki.fi> said:
>     >
>     >> Maybe we could add Clang detection to configure.ac <http://configure.ac> and then #undef __GNUC__ if compiler is Clang. This would be because "GCC support" in Clang appears to be broken.
>     >
>     > ./configure --disable-heinous-clang-illness
>     >
>     > ?
> 
>     Users are still going to try Clang and complain when libgcrypt does not work out of box with it.
> 
>     Maybe this should be dealt as portability issue and accept fact that there are broken compilers that lie about their ability to behave as GCC within '#ifdef __GNUC__/#endif'. So instead of checking for Clang specifically, we could add check for broken __GNUC__.
> 
>     -Jussi
> 
>     >
>     >
>     > Shalom-Salam,
>     >
>     >    Werner
>     >
> 
> 
>     _______________________________________________
>     Gcrypt-devel mailing list
>     Gcrypt-devel at gnupg.org <mailto:Gcrypt-devel at gnupg.org>
>     http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
> 
> 
> 
> 
> _______________________________________________
> Gcrypt-devel mailing list
> Gcrypt-devel at gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
> 




More information about the Gcrypt-devel mailing list