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]

hpux11 support



This is for the mainline tree only.  Threads did not work last I checked, but
I was not using an official hpux11 release.

I would greatly appreciate it if any interested party tested the hpux11
thread support on an official hpux11 release and let me know if it works.



	* configure.in (hppa*-hp-hpux11*): New configuration.
	* configure: Rebuilt.
	* pa/pa-hpux11.h: New file.
	* pa.h (CPP_SPEC): Conditionally add -D__STDC_EXT__ to the cpp
	command line.

Index: configure.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/configure.in,v
retrieving revision 1.258
diff -c -3 -p -r1.258 configure.in
*** configure.in	1999/06/24 21:48:31	1.258
--- configure.in	1999/06/29 12:04:52
*************** changequote([,])dnl
*** 965,970 ****
--- 965,1008 ----
  		install_headers_dir=install-headers-cpio
  		use_collect2=yes
  		;;
+ 	hppa1.1-*-hpux11* | hppa2*-*-hpux11*)
+ 		target_cpu_default=1
+ 		tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux11.h"
+ 		xm_file=pa/xm-pahpux.h
+ 		xmake_file=pa/x-pa-hpux
+ 		tmake_file=pa/t-pa
+ 		if [[ x$gas = xyes ]]
+ 		then
+ 			tm_file="${tm_file} pa/pa-gas.h"
+ 		fi
+ #		if [[ x$enable_threads = x ]]; then
+ #		    enable_threads=$have_pthread_h
+ #		fi
+ # 		if [[ x$enable_threads = xyes ]]; then
+ #			thread_file='dce'
+ #			tmake_file="${tmake_file} pa/t-dce-thr"
+ #		fi
+ 		install_headers_dir=install-headers-cpio
+ 		use_collect2=yes
+ 		;;
+ 	hppa1.0-*-hpux11*)
+ 		tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux11.h"
+ 		xm_file=pa/xm-pahpux.h
+ 		xmake_file=pa/x-pa-hpux
+ 		if [[ x$gas = xyes ]]
+ 		then
+ 			tm_file="${tm_file} pa/pa-gas.h"
+ 		fi
+ #		if [[ x$enable_threads = x ]]; then
+ #		    enable_threads=$have_pthread_h
+ #		fi
+ # 		if [[ x$enable_threads = xyes ]]; then
+ #			thread_file='dce'
+ #			tmake_file="${tmake_file} pa/t-dce-thr"
+ #		fi
+ 		install_headers_dir=install-headers-cpio
+ 		use_collect2=yes
+ 		;;
  	hppa1.1-*-hpux* | hppa2*-*-hpux*)
  		target_cpu_default="MASK_PA_11"
  		tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
Index: config/pa/pa.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/pa/pa.h,v
retrieving revision 1.46
diff -c -3 -p -r1.46 pa.h
*** pa.h	1999/05/08 22:11:24	1.46
--- pa.h	1999/06/29 12:04:56
*************** extern int target_flags;
*** 278,288 ****
  #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11) == 0
  #define CPP_SPEC "%{msnake:-D__hp9000s700 -D_PA_RISC1_1}\
   %{mpa-risc-1-1:-D__hp9000s700 -D_PA_RISC1_1}\
!  %{!ansi: -D_HPUX_SOURCE -D_HIUX_SOURCE}\
   %{threads:-D_REENTRANT -D_DCE_THREADS}"
  #else
  #define CPP_SPEC "%{!mpa-risc-1-0:%{!mnosnake:%{!msoft-float:-D__hp9000s700 
-D_PA_RISC1_1}}} \
!  %{!ansi: -D_HPUX_SOURCE -D_HIUX_SOURCE}\
   %{threads:-D_REENTRANT -D_DCE_THREADS}"
  #endif
  
--- 278,288 ----
  #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11) == 0
  #define CPP_SPEC "%{msnake:-D__hp9000s700 -D_PA_RISC1_1}\
   %{mpa-risc-1-1:-D__hp9000s700 -D_PA_RISC1_1}\
!  %{!ansi: -D_HPUX_SOURCE -D_HIUX_SOURCE -D__STDC_EXT__}\
   %{threads:-D_REENTRANT -D_DCE_THREADS}"
  #else
  #define CPP_SPEC "%{!mpa-risc-1-0:%{!mnosnake:%{!msoft-float:-D__hp9000s700 
-D_PA_RISC1_1}}} \
!  %{!ansi: -D_HPUX_SOURCE -D_HIUX_SOURCE -D__STDC_EXT__}\
   %{threads:-D_REENTRANT -D_DCE_THREADS}"
  #endif
  
*** /dev/null	Tue Jun 29 05:56:44 1999
--- config/pa/pa-hpux11.h	Tue Jun 29 05:58:43 1999
***************
*** 0 ****
--- 1,93 ----
+ /* Definitions of target machine for GNU compiler, for HP PA-RISC 1.1
+    Copyright (C) 1998, 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.  */
+ 
+ /* We can debug dynamically linked executables on hpux11; we also
+    want dereferencing of a NULL pointer to cause a SEGV.  */
+ #undef LINK_SPEC
+ #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & 1)
+ #define LINK_SPEC \
+   "%{!mpa-risc-1-0:%{!shared:-L/lib/pa1.1 -L/usr/lib/pa1.1 }} -z 
%{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:-b}"
+ #else
+ #define LINK_SPEC \
+   "-z %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:-b}"
+ #endif
+ 
+ /* Like the default, except no -lg.  */
+ #undef LIB_SPEC
+ #define LIB_SPEC \
+   "%{!shared:\
+      %{!p:\
+        %{!pg:\
+          %{!threads:-lc}\
+          %{threads:-lcma -lc_r}}\
+        %{p: -L/lib/libp/ -lc}\
+        %{pg: -L/lib/libp/ -lc}}}"
+ 
+ /* The hpux11 assembler requires a .LEVEL pseudo-op at the start of the
+    assembly file.  */
+ #undef ASM_FILE_START
+ #define ASM_FILE_START(FILE) \
+ do {  \
+      if (TARGET_PA_20) \
+        fputs("\t.LEVEL 2.0\n", FILE); \
+      else if (TARGET_PA_11) \
+        fputs("\t.LEVEL 1.1\n", FILE); \
+      else \
+        fputs("\t.LEVEL 1.0\n", FILE); \
+      fputs ("\t.SPACE $PRIVATE$\n\
+ \t.SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31\n\
+ \t.SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82\n\
+ \t.SPACE $TEXT$\n\
+ \t.SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44\n\
+ \t.SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY\n\
+ \t.IMPORT $global$,DATA\n\
+ \t.IMPORT $$dyncall,MILLICODE\n", FILE);\
+      if (profile_flag)\
+        fprintf (FILE, "\t.IMPORT _mcount, CODE\n");\
+      if (write_symbols != NO_DEBUG) \
+        output_file_directive ((FILE), main_input_filename); \
+    } while (0)
+ 
+ /* Under hpux11, the normal location of the `ld' and `as' programs is the
+    /usr/ccs/bin directory.  */
+ 
+ #ifndef CROSS_COMPILE
+ #undef MD_EXEC_PREFIX
+ #define MD_EXEC_PREFIX "/usr/ccs/bin/"
+ #endif
+ 
+ /* Under hpux11 the normal location of the various *crt*.o files is the
+    /usr/ccs/lib directory.  */
+ 
+ #ifndef CROSS_COMPILE
+ #undef MD_STARTFILE_PREFIX
+ #define MD_STARTFILE_PREFIX "/usr/ccs/lib/"
+ #endif
+ 
+ /* hpux11 has the new HP assembler.  It's still lousy, but it's a whole lot
+    better than the assembler shipped with older versions of hpux.  */
+ #define NEW_HP_ASSEMBLER
+ 
+ /* Make GCC agree with types.h.  */
+ #undef SIZE_TYPE
+ #undef PTRDIFF_TYPE
+ 
+ #define SIZE_TYPE "long unsigned int"
+ #define PTRDIFF_TYPE "long int"



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