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]

IA-64/AIX5 patches


These patches enable configuration for AIX5 on IA-64.  New
target-specific files are not included in this diff.  These patches are
against the gcc-3.0 branch.

* config.guess: Detect ia64/aix5 target (patch from sourceware/binutils,
already checked in)
* gcc/config.gcc: Add configuration for ia64*-*-aix*.
* gcc/config/ia64/frame-ia64.c: Supply a dummy find_fde implementation
for AIX.
* gcc/config/ia64/xm-ia64.h: Make bcopy unavailable for AIX, since it is
broken there (temporary).
* gcc/fixinc/fixincl.x: Regenerated.
* gcc/fixinc/inclhack.def: Patch  IA-64/AIX5 sys/types.h to use gcc's
builtin va_list type.

* gcc/config/ia64/aix.h: New. AIX-specific definitions.
* gcc/config/ia64/crti.asm: New. Static initializer prefix code.
* gcc/config/ia64/crtn.asm: New. Static initializer suffix code.
* gcc/config/ia64/t-aix: New. Make fragment for AIX5.
* gcc/config/ia64/va_list.h: New. Use gcc's built-in va_list rather than
the system-defined one.


? diff.txt
? update.txt
? gcc/config/ia64/aix.h
? gcc/config/ia64/t-aix
? gcc/config/ia64/va_list.h
? gcc/config/ia64/crti.asm
? gcc/config/ia64/crtn.asm
? gcc/testsuite/g++.old-deja/g++.robertl/eb83.C.hide
? gcc/testsuite/gcc.misc-tests/gcov.exp.hide
Index: config.guess
===================================================================
RCS file: /cvs/gcc/gcc/config.guess,v
retrieving revision 1.40
diff -d -c -p -b -w -r1.40 config.guess
*** config.guess	2000/10/05 21:18:00	1.40
--- config.guess	2001/03/01 16:08:51
***************
*** 3,9 ****
  #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
  #   Free Software Foundation, Inc.
  
! version='2000-10-03'
  
  # This file is free software; you can redistribute it and/or modify it
  # under the terms of the GNU General Public License as published by
--- 3,9 ----
  #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
  #   Free Software Foundation, Inc.
  
! version='2001-03-01'
  
  # This file is free software; you can redistribute it and/or modify it
  # under the terms of the GNU General Public License as published by
*************** EOF
*** 472,477 ****
--- 472,490 ----
  		IBM_REV=4.${UNAME_RELEASE}
  	fi
  	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ 	exit 0 ;;
+     *:AIX:*:5)
+ 	case "`lsattr -El proc0 -a type -F value`" in
+ 	    PowerPC*) IBM_ARCH=powerpc
+ 		      IBM_MANUF=ibm ;;
+ 	    Itanium)  IBM_ARCH=ia64
+ 		      IBM_MANUF=unknown ;;
+ 	    POWER*)   IBM_ARCH=power
+ 		      IBM_MANUF=ibm ;;
+ 	    *)        IBM_ARCH=powerpc
+ 		      IBM_MANUF=ibm ;;
+ 	esac
+ 	echo ${IBM_ARCH}-${IBM_MANUF}-aix${UNAME_VERSION}.${UNAME_RELEASE}
  	exit 0 ;;
      *:AIX:*:*)
  	echo rs6000-ibm-aix
Index: gcc/config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.27.2.1
diff -d -c -p -b -w -r1.27.2.1 config.gcc
*** config.gcc	2001/02/19 17:10:42	1.27.2.1
--- config.gcc	2001/03/01 16:09:01
*************** ia64*-*-elf*)
*** 1620,1625 ****
--- 1620,1631 ----
  	fi
  	float_format=i386
  	;;
+ ia64*-*-aix*)
+ 	tm_file=ia64/aix.h
+ 	tmake_file="ia64/t-ia64 ia64/t-aix"
+ 	target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
+ 	float_format=i386
+ 	;;
  ia64*-*-linux*)
  	tm_file=ia64/linux.h
  	tmake_file="t-linux ia64/t-ia64 ia64/t-glibc"
Index: gcc/output.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/output.h,v
retrieving revision 1.55
diff -d -c -p -b -w -r1.55 output.h
Index: gcc/config/ia64/frame-ia64.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/frame-ia64.c,v
retrieving revision 1.7
diff -d -c -p -b -w -r1.7 frame-ia64.c
*** frame-ia64.c	2001/01/28 01:50:22	1.7
--- frame-ia64.c	2001/03/01 16:09:11
*************** __ia64_backtrace (void **array, int size
*** 1270,1272 ****
--- 1270,1282 ----
    return ia64_backtrace_helper (array, &my_frame, &originator, bsp,
  				stack_pointer, size);
  }
+ 
+ #ifdef _AIX
+ /* Temporary, until we do a real implementation somewhere appropriate */
+ /* Return a pointer to the FDE for the function containing PC.  */
+ fde *
+ __ia64_find_fde (void *pc, void **pc_base)
+ {
+   return NULL;
+ }
+ #endif
Index: gcc/config/ia64/xm-ia64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/xm-ia64.h,v
retrieving revision 1.3
diff -d -c -p -b -w -r1.3 xm-ia64.h
*** xm-ia64.h	2000/03/17 20:06:49	1.3
--- xm-ia64.h	2001/03/01 16:09:11
*************** Boston, MA 02111-1307, USA.  */
*** 58,61 ****
--- 58,66 ----
     tm.h is a symbolic link to the actual target specific file.   */
  #include "tm.h"
  
+ /* This is temporary, until IBM fixes their bcopy implementation... */
+ #ifdef _AIX
+ #undef HAVE_BCOPY
+ #endif
+ 
  /* end of xm-ia64.h */
Index: gcc/fixinc/fixincl.x
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fixinc/fixincl.x,v
retrieving revision 1.98.2.1
diff -d -c -p -b -w -r1.98.2.1 fixincl.x
*** fixincl.x	2001/02/21 20:08:16	1.98.2.1
--- fixincl.x	2001/03/01 16:09:31
***************
*** 5,11 ****
   * files which are fixed to work correctly with ANSI C and placed in a
   * directory that GNU C will search.
   *
!  * This file contains 134 fixup descriptions.
   *
   * See README for more information.
   *
--- 5,11 ----
   * files which are fixed to work correctly with ANSI C and placed in a
   * directory that GNU C will search.
   *
!  * This file contains 135 fixup descriptions.
   *
   * See README for more information.
   *
*************** static const char* apzSysz_Stdlib_For_Su
*** 4461,4469 ****
  
  /* * * * * * * * * * * * * * * * * * * * * * * * * *
   *
   *  Description of Tinfo_Cplusplus fix
   */
! #define TINFO_CPLUSPLUS_FIXIDX           110
  tSCC zTinfo_CplusplusName[] =
       "tinfo_cplusplus";
  
--- 4461,4504 ----
  
  /* * * * * * * * * * * * * * * * * * * * * * * * * *
   *
+  *  Description of Sys_Types_Va_List fix
+  */
+ #define SYS_TYPES_VA_LIST_FIXIDX         110
+ tSCC zSys_Types_Va_ListName[] =
+      "sys_types_va_list";
+ 
+ /*
+  *  File name selection pattern
+  */
+ tSCC zSys_Types_Va_ListList[] =
+   "|sys/types.h|";
+ /*
+  *  Machine/OS name selection pattern
+  */
+ #define apzSys_Types_Va_ListMachs (const char**)NULL
+ 
+ /*
+  *  content selection pattern - do fix if pattern found
+  */
+ tSCC zSys_Types_Va_ListSelect0[] =
+        "^[ \t]*typedef[ \t].*[ \t]va_list;";
+ 
+ #define    SYS_TYPES_VA_LIST_TEST_CT  1
+ static tTestDesc aSys_Types_Va_ListTests[] = {
+   { TT_EGREP,    zSys_Types_Va_ListSelect0, (regex_t*)NULL }, };
+ 
+ /*
+  *  Fix Command Arguments for Sys_Types_Va_List
+  */
+ static const char* apzSys_Types_Va_ListPatch[] = { "sed",
+     "-e", "s%^[ \t]*typedef[ \t].*[ \t]va_list;%typedef __builtin_va_list va_list; /* va_list */%g",
+     (char*)NULL };
+ 
+ /* * * * * * * * * * * * * * * * * * * * * * * * * *
+  *
   *  Description of Tinfo_Cplusplus fix
   */
! #define TINFO_CPLUSPLUS_FIXIDX           111
  tSCC zTinfo_CplusplusName[] =
       "tinfo_cplusplus";
  
*************** static const char* apzTinfo_CplusplusPat
*** 4499,4505 ****
   *
   *  Description of Ultrix_Atof_Param fix
   */
! #define ULTRIX_ATOF_PARAM_FIXIDX         111
  tSCC zUltrix_Atof_ParamName[] =
       "ultrix_atof_param";
  
--- 4534,4540 ----
   *
   *  Description of Ultrix_Atof_Param fix
   */
! #define ULTRIX_ATOF_PARAM_FIXIDX         112
  tSCC zUltrix_Atof_ParamName[] =
       "ultrix_atof_param";
  
*************** static const char* apzUltrix_Atof_ParamP
*** 4535,4541 ****
   *
   *  Description of Ultrix_Const fix
   */
! #define ULTRIX_CONST_FIXIDX              112
  tSCC zUltrix_ConstName[] =
       "ultrix_const";
  
--- 4570,4576 ----
   *
   *  Description of Ultrix_Const fix
   */
! #define ULTRIX_CONST_FIXIDX              113
  tSCC zUltrix_ConstName[] =
       "ultrix_const";
  
*************** static const char* apzUltrix_ConstPatch[
*** 4572,4578 ****
   *
   *  Description of Ultrix_Const2 fix
   */
! #define ULTRIX_CONST2_FIXIDX             113
  tSCC zUltrix_Const2Name[] =
       "ultrix_const2";
  
--- 4607,4613 ----
   *
   *  Description of Ultrix_Const2 fix
   */
! #define ULTRIX_CONST2_FIXIDX             114
  tSCC zUltrix_Const2Name[] =
       "ultrix_const2";
  
*************** static const char* apzUltrix_Const2Patch
*** 4609,4615 ****
   *
   *  Description of Ultrix_Fix_Fixproto fix
   */
! #define ULTRIX_FIX_FIXPROTO_FIXIDX       114
  tSCC zUltrix_Fix_FixprotoName[] =
       "ultrix_fix_fixproto";
  
--- 4644,4650 ----
   *
   *  Description of Ultrix_Fix_Fixproto fix
   */
! #define ULTRIX_FIX_FIXPROTO_FIXIDX       115
  tSCC zUltrix_Fix_FixprotoName[] =
       "ultrix_fix_fixproto";
  
*************** static const char* apzUltrix_Fix_Fixprot
*** 4647,4653 ****
   *
   *  Description of Ultrix_Ifdef fix
   */
! #define ULTRIX_IFDEF_FIXIDX              115
  tSCC zUltrix_IfdefName[] =
       "ultrix_ifdef";
  
--- 4682,4688 ----
   *
   *  Description of Ultrix_Ifdef fix
   */
! #define ULTRIX_IFDEF_FIXIDX              116
  tSCC zUltrix_IfdefName[] =
       "ultrix_ifdef";
  
*************** static const char* apzUltrix_IfdefPatch[
*** 4683,4689 ****
   *
   *  Description of Ultrix_Math_Ifdef fix
   */
! #define ULTRIX_MATH_IFDEF_FIXIDX         116
  tSCC zUltrix_Math_IfdefName[] =
       "ultrix_math_ifdef";
  
--- 4718,4724 ----
   *
   *  Description of Ultrix_Math_Ifdef fix
   */
! #define ULTRIX_MATH_IFDEF_FIXIDX         117
  tSCC zUltrix_Math_IfdefName[] =
       "ultrix_math_ifdef";
  
*************** static const char* apzUltrix_Math_IfdefP
*** 4719,4725 ****
   *
   *  Description of Ultrix_Nested_Ioctl fix
   */
! #define ULTRIX_NESTED_IOCTL_FIXIDX       117
  tSCC zUltrix_Nested_IoctlName[] =
       "ultrix_nested_ioctl";
  
--- 4754,4760 ----
   *
   *  Description of Ultrix_Nested_Ioctl fix
   */
! #define ULTRIX_NESTED_IOCTL_FIXIDX       118
  tSCC zUltrix_Nested_IoctlName[] =
       "ultrix_nested_ioctl";
  
*************** static const char* apzUltrix_Nested_Ioct
*** 4754,4760 ****
   *
   *  Description of Ultrix_Nested_Svc fix
   */
! #define ULTRIX_NESTED_SVC_FIXIDX         118
  tSCC zUltrix_Nested_SvcName[] =
       "ultrix_nested_svc";
  
--- 4789,4795 ----
   *
   *  Description of Ultrix_Nested_Svc fix
   */
! #define ULTRIX_NESTED_SVC_FIXIDX         119
  tSCC zUltrix_Nested_SvcName[] =
       "ultrix_nested_svc";
  
*************** static const char* apzUltrix_Nested_SvcP
*** 4789,4795 ****
   *
   *  Description of Ultrix_Stat fix
   */
! #define ULTRIX_STAT_FIXIDX               119
  tSCC zUltrix_StatName[] =
       "ultrix_stat";
  
--- 4824,4830 ----
   *
   *  Description of Ultrix_Stat fix
   */
! #define ULTRIX_STAT_FIXIDX               120
  tSCC zUltrix_StatName[] =
       "ultrix_stat";
  
*************** static const char* apzUltrix_StatPatch[]
*** 4830,4836 ****
   *
   *  Description of Ultrix_Static fix
   */
! #define ULTRIX_STATIC_FIXIDX             120
  tSCC zUltrix_StaticName[] =
       "ultrix_static";
  
--- 4865,4871 ----
   *
   *  Description of Ultrix_Static fix
   */
! #define ULTRIX_STATIC_FIXIDX             121
  tSCC zUltrix_StaticName[] =
       "ultrix_static";
  
*************** static const char* apzUltrix_StaticPatch
*** 4867,4873 ****
   *
   *  Description of Ultrix_Strings fix
   */
! #define ULTRIX_STRINGS_FIXIDX            121
  tSCC zUltrix_StringsName[] =
       "ultrix_strings";
  
--- 4902,4908 ----
   *
   *  Description of Ultrix_Strings fix
   */
! #define ULTRIX_STRINGS_FIXIDX            122
  tSCC zUltrix_StringsName[] =
       "ultrix_strings";
  
*************** static const char* apzUltrix_StringsPatc
*** 4902,4908 ****
   *
   *  Description of Undefine_Null fix
   */
! #define UNDEFINE_NULL_FIXIDX             122
  tSCC zUndefine_NullName[] =
       "undefine_null";
  
--- 4937,4943 ----
   *
   *  Description of Undefine_Null fix
   */
! #define UNDEFINE_NULL_FIXIDX             123
  tSCC zUndefine_NullName[] =
       "undefine_null";
  
*************** static const char* apzUndefine_NullPatch
*** 4948,4954 ****
   *
   *  Description of Uw7_Byteorder_Fix fix
   */
! #define UW7_BYTEORDER_FIX_FIXIDX         123
  tSCC zUw7_Byteorder_FixName[] =
       "uw7_byteorder_fix";
  
--- 4983,4989 ----
   *
   *  Description of Uw7_Byteorder_Fix fix
   */
! #define UW7_BYTEORDER_FIX_FIXIDX         124
  tSCC zUw7_Byteorder_FixName[] =
       "uw7_byteorder_fix";
  
*************** static const char* apzUw7_Byteorder_FixP
*** 4999,5005 ****
   *
   *  Description of Va_I960_Macro fix
   */
! #define VA_I960_MACRO_FIXIDX             124
  tSCC zVa_I960_MacroName[] =
       "va_i960_macro";
  
--- 5034,5040 ----
   *
   *  Description of Va_I960_Macro fix
   */
! #define VA_I960_MACRO_FIXIDX             125
  tSCC zVa_I960_MacroName[] =
       "va_i960_macro";
  
*************** static const char* apzVa_I960_MacroPatch
*** 5035,5041 ****
   *
   *  Description of Void_Null fix
   */
! #define VOID_NULL_FIXIDX                 125
  tSCC zVoid_NullName[] =
       "void_null";
  
--- 5070,5076 ----
   *
   *  Description of Void_Null fix
   */
! #define VOID_NULL_FIXIDX                 126
  tSCC zVoid_NullName[] =
       "void_null";
  
*************** static const char* apzVoid_NullPatch[] =
*** 5071,5077 ****
   *
   *  Description of Vxworks_Gcc_Problem fix
   */
! #define VXWORKS_GCC_PROBLEM_FIXIDX       126
  tSCC zVxworks_Gcc_ProblemName[] =
       "vxworks_gcc_problem";
  
--- 5106,5112 ----
   *
   *  Description of Vxworks_Gcc_Problem fix
   */
! #define VXWORKS_GCC_PROBLEM_FIXIDX       127
  tSCC zVxworks_Gcc_ProblemName[] =
       "vxworks_gcc_problem";
  
*************** static const char* apzVxworks_Gcc_Proble
*** 5121,5127 ****
   *
   *  Description of Vxworks_Needs_Vxtypes fix
   */
! #define VXWORKS_NEEDS_VXTYPES_FIXIDX     127
  tSCC zVxworks_Needs_VxtypesName[] =
       "vxworks_needs_vxtypes";
  
--- 5156,5162 ----
   *
   *  Description of Vxworks_Needs_Vxtypes fix
   */
! #define VXWORKS_NEEDS_VXTYPES_FIXIDX     128
  tSCC zVxworks_Needs_VxtypesName[] =
       "vxworks_needs_vxtypes";
  
*************** static const char* apzVxworks_Needs_Vxty
*** 5157,5163 ****
   *
   *  Description of Vxworks_Needs_Vxworks fix
   */
! #define VXWORKS_NEEDS_VXWORKS_FIXIDX     128
  tSCC zVxworks_Needs_VxworksName[] =
       "vxworks_needs_vxworks";
  
--- 5192,5198 ----
   *
   *  Description of Vxworks_Needs_Vxworks fix
   */
! #define VXWORKS_NEEDS_VXWORKS_FIXIDX     129
  tSCC zVxworks_Needs_VxworksName[] =
       "vxworks_needs_vxworks";
  
*************** static const char* apzVxworks_Needs_Vxwo
*** 5206,5212 ****
   *
   *  Description of Vxworks_Time fix
   */
! #define VXWORKS_TIME_FIXIDX              129
  tSCC zVxworks_TimeName[] =
       "vxworks_time";
  
--- 5241,5247 ----
   *
   *  Description of Vxworks_Time fix
   */
! #define VXWORKS_TIME_FIXIDX              130
  tSCC zVxworks_TimeName[] =
       "vxworks_time";
  
*************** typedef void (*__gcc_VOIDFUNCPTR) ();\n\
*** 5257,5263 ****
   *
   *  Description of X11_Class fix
   */
! #define X11_CLASS_FIXIDX                 130
  tSCC zX11_ClassName[] =
       "x11_class";
  
--- 5292,5298 ----
   *
   *  Description of X11_Class fix
   */
! #define X11_CLASS_FIXIDX                 131
  tSCC zX11_ClassName[] =
       "x11_class";
  
*************** static const char* apzX11_ClassPatch[] =
*** 5304,5310 ****
   *
   *  Description of X11_Class_Usage fix
   */
! #define X11_CLASS_USAGE_FIXIDX           131
  tSCC zX11_Class_UsageName[] =
       "x11_class_usage";
  
--- 5339,5345 ----
   *
   *  Description of X11_Class_Usage fix
   */
! #define X11_CLASS_USAGE_FIXIDX           132
  tSCC zX11_Class_UsageName[] =
       "x11_class_usage";
  
*************** static const char* apzX11_Class_UsagePat
*** 5347,5353 ****
   *
   *  Description of X11_New fix
   */
! #define X11_NEW_FIXIDX                   132
  tSCC zX11_NewName[] =
       "x11_new";
  
--- 5382,5388 ----
   *
   *  Description of X11_New fix
   */
! #define X11_NEW_FIXIDX                   133
  tSCC zX11_NewName[] =
       "x11_new";
  
*************** static const char* apzX11_NewPatch[] = {
*** 5388,5394 ****
   *
   *  Description of X11_Sprintf fix
   */
! #define X11_SPRINTF_FIXIDX               133
  tSCC zX11_SprintfName[] =
       "x11_sprintf";
  
--- 5423,5429 ----
   *
   *  Description of X11_Sprintf fix
   */
! #define X11_SPRINTF_FIXIDX               134
  tSCC zX11_SprintfName[] =
       "x11_sprintf";
  
*************** static const char* apzX11_SprintfPatch[]
*** 5427,5435 ****
   *
   *  List of all fixes
   */
! #define REGEX_COUNT          140
  #define MACH_LIST_SIZE_LIMIT 279
! #define FIX_COUNT            134
  
  tFixDesc fixDescList[ FIX_COUNT ] = {
    {  zAaa_Ki_IfaceName,    zAaa_Ki_IfaceList,
--- 5462,5470 ----
   *
   *  List of all fixes
   */
! #define REGEX_COUNT          141
  #define MACH_LIST_SIZE_LIMIT 279
! #define FIX_COUNT            135
  
  tFixDesc fixDescList[ FIX_COUNT ] = {
    {  zAaa_Ki_IfaceName,    zAaa_Ki_IfaceList,
*************** tFixDesc fixDescList[ FIX_COUNT ] = {
*** 5981,5986 ****
--- 6016,6026 ----
       apzSysz_Stdlib_For_SunMachs,
       SYSZ_STDLIB_FOR_SUN_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
       aSysz_Stdlib_For_SunTests,   apzSysz_Stdlib_For_SunPatch, 0 },
+ 
+   {  zSys_Types_Va_ListName,    zSys_Types_Va_ListList,
+      apzSys_Types_Va_ListMachs,
+      SYS_TYPES_VA_LIST_TEST_CT, FD_MACH_ONLY,
+      aSys_Types_Va_ListTests,   apzSys_Types_Va_ListPatch, 0 },
  
    {  zTinfo_CplusplusName,    zTinfo_CplusplusList,
       apzTinfo_CplusplusMachs,
Index: gcc/fixinc/inclhack.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fixinc/inclhack.def,v
retrieving revision 1.101.2.1
diff -d -c -p -b -w -r1.101.2.1 inclhack.def
*** inclhack.def	2001/02/21 20:08:17	1.101.2.1
--- inclhack.def	2001/03/01 16:09:40
*************** fix = {
*** 2720,2725 ****
--- 2720,2737 ----
  
  
  /*
+  * Fix va_list definition in sys/types.h for AIX 5.0.
+  */
+ fix = {
+     hackname = sys_types_va_list;
+     files    = sys/types.h;
+     select   = "^[ \t]*typedef[ \t].*[ \t]va_list;";
+     sed      = "s%^[ \t]*typedef[ \t].*[ \t]va_list;%"
+                "typedef __builtin_va_list va_list; /* va_list */%g";
+ 
+ };
+ 
+ /*
   *  if the #if says _cplusplus, not the double underscore __cplusplus
   *  that it should be
   */

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