Open petk opened 2 months ago
Note that last sun studio release is from 2017. That reason alone is sufficient for not bothering with IMHO. Not the same thing than asking to support Intel ICC for example. Not sure it fully support C99, the zend engine uses a lot of gcc/clang specific features.
Somewhat related to this one.
What about if we do a fatal error in the configure step to notify the user to use GNU C or Clang compiler on Solaris when SunPro compiler is detected? This compiler does seem dead to me too. Or should be better say here that it is not moving beyond the C 11 standard: https://forums.oracle.com/ords/apexds/post/is-developer-studio-abandoned-and-discontinued-by-oracle-3285
I m personally fine with configure failure in that case.
What about if we do a fatal error in the configure step to notify the user to use GNU C or Clang compiler on Solaris when SunPro compiler is detected? This compiler does seem dead to me too.
I agree with this.
I wouldn’t do a hard failure; there’s always the possibility of things like cproc getting more popular. A warning should be sufficient.
(My stance on Studio et al support is more, if you have a patch…)
Another option here would be to configure script check if there is gcc (or clang) available as an alternative and use that compiler. But the issue is that changing this configure.ac is (still) a bit difficult considering what all of this might impact. I should check and test all of this.
I've also checked some other open source C projects, none build with Oracle Developer Studio compiler.
--- a/configure.ac
+++ b/configure.ac
-AC_PROG_CC([cc gcc])
+AC_PROG_CC
Description
On Solaris 11.4 with Oracle Developer Studio compiler 12.6 the following code:
Resulted in this output:
But I expected this output instead:
The issue here is not the
inet_ntop
but that this combination of compiler and linker doesn't support the--ffp-contract=off
flag to build dynamic executable:But this can be (still) easily bypassed by removing the
--ffp-contract=off
flag from configure.ac (or if we refactor the specific flag check into a link test instead of only compile):However, then the compile errors start to pop up on the gmake step:
Building with GCC works ok, otherwise. Should such compiler be even supported by PHP or not?
PHP Version
PHP 8.2+
Operating System
Oracle Solaris 11.4