pa-linux configuration

Jeffrey A Law law@cygnus.com
Fri Jul 16 14:42:00 GMT 1999


This is an initial rough cut at a PA linux configuration.  It is meant to
provide the PA linux developers with a starting point for building their
tools.  It is expected to change as the PA linux system becomes better defined.

It is loosely based on some patches from Jerry Quinn along with heavy changes
from myself so that the configuration uses most of the generic linux.h
configuration file.

	* configure.in (hppa*-*-linux*): New configuration.
	* configure: Rebuilt.
	* pa.h (MAX_OFILE_ALIGNMENT): Delete.
	* pa/som.h (MAX_OFILE_ALIGNMENT): Define.
	* pa/pa-linux.h: New file.
	* pa/t-linux: New file.
	* pa/xm-linux.h: New file.

Index: configure.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/configure.in,v
retrieving revision 1.265
diff -c -3 -p -r1.265 configure.in
*** configure.in	1999/07/15 13:59:01	1.265
--- configure.in	1999/07/16 21:35:57
*************** changequote([,])dnl
*** 840,845 ****
--- 840,856 ----
  	h8300-*-*)
  		float_format=i32
  		;;
+ 	hppa*-*-linux*)
+ 		target_cpu_default="(MASK_PA_11 | MASK_GAS | MASK_JUMP_IN_DELAY)"
+ 		tm_file="${tm_file} pa/elf.h linux.h pa/pa-linux.h"
+ 		tmake_file="t-linux pa/t-linux"
+ 		extra_parts="crtbegin.o crtend.o"
+ 		xmake_file=none
+ 		gas=yes gnu_ld=yes
+  		if test x$enable_threads = xyes; then
+  			thread_file='posix'
+  		fi
+ 		;;
  	hppa*-*-openbsd*)
  		target_cpu_default="MASK_PA_11"
  		tmake_file=pa/t-openbsd
Index: config/pa/som.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/pa/som.h,v
retrieving revision 1.2
diff -c -3 -p -r1.2 som.h
*** som.h	1999/07/08 13:45:12	1.2
--- som.h	1999/07/16 21:37:17
*************** do {						\
*** 468,470 ****
--- 468,473 ----
    for (p = __DTOR_LIST__ + 1; *p; )		\
      (*p++) ();					\
  } while (0)
+ 
+ /* The .align directive in the HP assembler allows up to a 32 alignment.  */
+ #define MAX_OFILE_ALIGNMENT 32768
Index: config/pa/pa.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/pa/pa.h,v
retrieving revision 1.51
diff -c -3 -p -r1.51 pa.h
*** pa.h	1999/07/16 20:58:13	1.51
--- pa.h	1999/07/16 21:37:21
*************** int lhs_lshift_cint_operand ();
*** 379,387 ****
  /* No data type wants to be aligned rounder than this.  */
  #define BIGGEST_ALIGNMENT 64
  
- /* The .align directive in the HP assembler allows up to a 32 alignment.  */
- #define MAX_OFILE_ALIGNMENT 32768
- 
  /* Get around hp-ux assembler bug, and make strcpy of constants fast. */
  #define CONSTANT_ALIGNMENT(CODE, TYPEALIGN) \
    ((TYPEALIGN) < 32 ? 32 : (TYPEALIGN))
--- 379,384 ----
*** /dev/null	Fri Jul 16 15:32:46 1999
--- config/pa/pa-linux.h	Fri Jul 16 15:31:21 1999
***************
*** 0 ****
--- 1,55 ----
+ /* Definitions for PA_RISC with ELF format
+    Copyright (C) 1999 Free Software Foundation, Inc.
+ 
+ This file is part of GNU CC.
+ 
+ GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+ 
+ GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with GNU CC; see the file COPYING.  If not, write to
+ the Free Software Foundation, 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.  */
+ 
+ /* FIXME - this doesn't seem to be used anywhere */
+ #define LINUX_DEFAULT_ELF
+ 
+ #undef SIZE_TYPE
+ #define SIZE_TYPE "unsigned int"
+ 
+ #undef PTRDIFF_TYPE
+ #define PTRDIFF_TYPE "int"
+ 
+ #undef CPP_PREDEFINES
+ #define CPP_PREDEFINES "-D__ELF__ -Dunix -D__hppa__ -Dlinux -Asystem(unix) 
-Asystem(posix) -Acpu(hppa) -Amachine(hppa) -Amachine(bigendian)"
+ 
+ #undef CPP_SPEC
+ #define CPP_SPEC "%{posix:-D_POSIX_SOURCE}\
+  %{msnake:-D_PA_RISC1_1}\
+  %{mpa-risc-1-1:-D_PA_RISC1_1}"
+ 
+ #undef	LIB_SPEC
+ #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} -lmilli"
+ 
+ /* How to renumber registers for dbx and gdb.
+ 
+    It is entirely possible linux will use a different numbering scheme.
+    Until we know for sure, it's the same as hpux, osf & bsd, but we're
+    ready if it needs to be different.
+ 
+    Registers 0  - 31 remain unchanged.
+ 
+    Registers 32 - 87 are mapped to 72 - 127
+ 
+    Register 88 is mapped to 32.  */
+ 
+ #define DBX_REGISTER_NUMBER(REGNO) \
+   ((REGNO) <= 31 ? (REGNO) :						\
+    ((REGNO) > 31 && (REGNO) <= 87 ? (REGNO) + 40 : 32))
*** /dev/null	Fri Jul 16 15:32:46 1999
--- config/pa/t-linux	Fri Jul 16 15:10:58 1999
***************
*** 0 ****
--- 1 ----
+ ADA_CFLAGS=-mdisable-indexing
*** /dev/null	Fri Jul 16 15:32:46 1999
--- config/pa/xm-linux.h	Tue Jun 29 04:47:04 1999
***************
*** 0 ****
--- 1,47 ----
+ /* Configuration for GNU C-compiler for PA-RISC.
+    Copyright (C) 1999 Free Software Foundation, Inc.
+ 
+ This file is part of GNU CC.
+ 
+ GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+ 
+ GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with GNU CC; see the file COPYING.  If not, write to
+ the Free Software Foundation, 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.  */
+ 
+ 
+ extern int errno;
+ 
+ /* #defines that need visibility everywhere.  */
+ #define FALSE 0
+ #define TRUE 1
+ 
+ /* This describes the machine the compiler is hosted on.  */
+ #define HOST_BITS_PER_CHAR 8
+ #define HOST_BITS_PER_SHORT 16
+ #define HOST_BITS_PER_INT 32
+ #define HOST_BITS_PER_LONG 32
+ #define HOST_BITS_PER_LONGLONG 64
+ 
+ /* Doubles are stored in memory with the high order word first.  This
+    matters when cross-compiling.  */
+ #define HOST_WORDS_BIG_ENDIAN 1
+ 
+ /* target machine dependencies.
+    tm.h is a symbolic link to the actual target specific file.   */
+ #include "tm.h"
+ 
+ /* Arguments to use with `exit'.  */
+ #define SUCCESS_EXIT_CODE 0
+ #define FATAL_EXIT_CODE 33
+ 
+ #include <xm-linux.h>







More information about the Gcc-patches mailing list