2 Replies Latest reply: Dec 20, 2012 2:52 AM by 980742 RSS

    Problems with ld.so (hardware capability unsupported)

    980742
      The program is like that.
      -----
      #include <stdio.h>
      static unsigned long int ulongval () { return (long int) (sizeof (void*)); }

      int main (void)
      {
      unsigned long int i = ulongval ();
      if (i != ((long int) (sizeof (void*))))
      return 1;
      printf("%ld", i);
      }
      -----
      When i compile it with -O2 or -O3 there's an error.
      bash-3.00$ cc -xtarget=native -O2 1.c
      bash-3.00$ file a.out
      a.out: ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+ Required, UltraSPARC3 Extensions Required [0x10000000], dynamically linked, not stripped
      bash-3.00$ ./a.out
      ld.so.1: a.out: fatal: hardware capability unsupported: 0x10000000 [ 0x10000000 ]
      Killed
      ----
      When without optimization or with -O4 up, there's no error.
      bash-3.00$ cc -xtarget=native -O4 1.c
      bash-3.00$ file a.out
      a.out: ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+ Required, UltraSPARC3 Extensions Required, dynamically linked, not stripped
      bash-3.00$ cc -xtarget=native 1.c
      bash-3.00$ file a.out
      a.out: ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+ Required, UltraSPARC3 Extensions Required, dynamically linked, not stripped

      I compile with 12.3 on SunOS bpc-t4-dev1 5.10 Generic_141444-09 sun4v sparc sun4v.
      That's T4-1.
        • 1. Re: Problems with ld.so (hardware capability unsupported)
          Peter.Damron-Oracle
          It seem your version of Solaris is not supporting T4 fully.

          Try this:
          % isainfo -x
          sparcv9: cbcond pause mont mpmul sha512 sha256 sha1 md5 camellia kasumi des aes cspare ima hpc vis3 fmaf asi_blk_init vis2 vis popc
          sparc: cbcond pause mont mpmul sha512 sha256 sha1 md5 camellia kasumi des aes cspare ima hpc vis3 fmaf asi_blk_init vis2 vis popc v8plus div32 mul32

          Or this:
          % fgrep AV_SPARC_CBCOND /usr/include/sys/auxv_SPARC.h
          #define AV_SPARC_CBCOND 0x10000000 /* compare and branch instructions */

          You probably need to upgrade Solaris to include full T4 support.
          It should be S10u10 or S11, I think.

          Peter.
          • 2. Re: Problems with ld.so (hardware capability unsupported)
            980742
            Thank you, Peter!
            This appears to be an issue. We indeed have 10/09 and ain't no CBCOND in auxv_SPARC.h on that system.

            But anyway i'll send this to a support, as it's surely a bug when we compile with target=native and are then being harassed by missing features.