On Thu, Jul 26, 2018 at 11:55 AM, Zack Weinberg <za...@panix.com> wrote:
> On Thu, Jul 26, 2018 at 11:47 AM, Jeffrey Walton <noloa...@gmail.com> wrote:
>>
>> AC_COMPILE_ELSEIF and AC_LINK_ELSEIF often misdetects which results in
>> bad configurations and broken compiles on AIX with XL C/C++ and
>> Solaris with SunCC. We found we can't use the macros.
>
> Could you please supply a short, self-contained configure.ac that
> shows the problem?  I don't think I understand the issue from your
> description.

Yes. I can also supply SSH access to a Solaris 11.3 machine with SunCC
installed. I need authorized_keys file.

You can get access to AIX and the IBM XL C/C++ compiler on the GCC
compile farm at https://gcc.gnu.org/wiki/CompileFarm .

I did not state it, but the highest SunCC -xarch at the moment is
-xarch=aes. We are waiting for Sun to make -xarch=sha available. When
GCC -msha or SunCC -xarch=sha is available we enable SHA code paths
like https://github.com/weidai11/cryptopp/blob/master/sha-simd.cpp#L200
, which results in a failed compile on Soalris x86.

Here's what SunCC and illegal -xarch options looks like under Autotools:

    $ autoreconf -f -i
    ...

    $ CXX=/opt/developerstudio12.6/bin/CC ./configure
    checking whether the C++ compiler works... yes
    checking for C++ compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C++ compiler... no
    checking whether /opt/developerstudio12.6/bin/CC accepts -g... yes
    checking for -xarch=sha... checking for gcc... gcc
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    yes

********************

And SunCC:

    $ /opt/developerstudio12.6/bin/CC test.cxx -xarch=sha -o test.exe
    CC: Warning: illegal use of -xarch option, illegal value ignored: sha
    $ echo $?
    0

********************

    $ cat configure.ac
    AC_INIT([Test], [1.0])
    AC_PROG_CXX

    SAVED_CXXFLAGS="$CXXFLAGS"
    CXXFLAGS="-xarch=sha"
    AC_MSG_CHECKING([for -xarch=sha])
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
      [AC_MSG_RESULT([yes])],
      [AC_MSG_RESULT([no])]
    )
    CXXFLAGS="$SAVED_CXXFLAGS"

********************

And the test driver:

$ cat test.cxx
#include <xmmintrin.h>
int main (int argc, char* argv)
{
  return 0;
}

_______________________________________________
Autoconf mailing list
Autoconf@gnu.org
https://lists.gnu.org/mailman/listinfo/autoconf

Reply via email to