This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Define TARGET_C99_FUNCTIONS on AIX 5.x


The following patch fixes the failure of gcc.dg/builtins-20.c on
IBM AIX v5.1 and v5.2.  Recent versions of AIX have both float
and long double forms of the mathematical functions, ie. sqrtf
and sqrtl.

This patch has been tested on powerpc-ibm-aix5.2.0.0 with a full
"make bootstrap", all languages except java, ada and treelang, and
regression tested with a top-level "make -k check" with no new
failures.

Ok for mainline?


2003-07-03  Roger Sayle  <roger@eyesopen.com>

	* config/rs6000/aix51.h (TARGET_C99_FUNCTIONS): Define.
	* config/rs6000/aix52.h (TARGET_C99_FUNCTIONS): Likewise.


Index: aix51.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/rs6000/aix51.h,v
retrieving revision 1.19
diff -c -3 -p -r1.19 aix51.h
*** aix51.h	13 Apr 2003 17:51:06 -0000	1.19
--- aix51.h	3 Jul 2003 16:26:42 -0000
*************** do {									\
*** 196,198 ****
--- 196,203 ----

  #undef LD_INIT_SWITCH
  #define LD_INIT_SWITCH "-binitfini"
+
+ /* AIX 5.1 has the float and long double forms of math functions.  */
+ #undef TARGET_C99_FUNCTIONS
+ #define TARGET_C99_FUNCTIONS  1
+
Index: aix52.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/rs6000/aix52.h,v
retrieving revision 1.4
diff -c -3 -p -r1.4 aix52.h
*** aix52.h	13 Apr 2003 17:51:06 -0000	1.4
--- aix52.h	3 Jul 2003 16:26:42 -0000
*************** do {									\
*** 188,190 ****
--- 188,195 ----

  #undef LD_INIT_SWITCH
  #define LD_INIT_SWITCH "-binitfini"
+
+ /* AIX 5.2 has the float and long double forms of math functions.  */
+ #undef TARGET_C99_FUNCTIONS
+ #define TARGET_C99_FUNCTIONS  1
+


Roger
--
Roger Sayle,                         E-mail: roger@eyesopen.com
OpenEye Scientific Software,         WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road,     Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507.         Fax: (+1) 505-473-0833


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]