]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
config.gcc (hppa*64*-*-hpux11*): Modify tm_file and extra_options for 11.31.
authorSteve Ellcey <sje@cup.hp.com>
Thu, 5 May 2011 15:49:28 +0000 (15:49 +0000)
committerSteve Ellcey <sje@gcc.gnu.org>
Thu, 5 May 2011 15:49:28 +0000 (15:49 +0000)
2011-05-05  Steve Ellcey  <sje@cup.hp.com>

* config.gcc (hppa*64*-*-hpux11*): Modify tm_file and extra_options
for 11.31.
(hppa[12]*-*-hpux11*): Ditto.
(ia64*-*-hpux*): Add ia64/hpux-unix2003.h to tm_file.
* config/ia64/hpux-unix2003.h: New.
* config/pa/pa-hpux1131.opt: New.
* config/pa/pa-hpux1131.h: New.
* config/pa/pa64-hpux.h (STARTFILE_SPEC): Use unix2003.o if requested.
* config/pa/pa-hpux.opt (flag_pa_unix): Check TARGET_HPUX_11_31 value.
config/pa/pa.h (TARGET_HPUX_11_31): Provide default (0) value.

From-SVN: r173437

gcc/ChangeLog
gcc/config.gcc
gcc/config/ia64/hpux-unix2003.h [new file with mode: 0644]
gcc/config/pa/pa-hpux.opt
gcc/config/pa/pa-hpux1131.h [new file with mode: 0644]
gcc/config/pa/pa-hpux1131.opt [new file with mode: 0644]
gcc/config/pa/pa64-hpux.h

index c19519f0a944ec4c3b508bf81784480c119ece75..3e2129a37c771beb815303fb925bde89fb4a9a4e 100644 (file)
@@ -1,3 +1,16 @@
+2011-05-05  Steve Ellcey  <sje@cup.hp.com>
+
+       * config.gcc (hppa*64*-*-hpux11*): Modify tm_file and extra_options
+       for 11.31.
+       (hppa[12]*-*-hpux11*): Ditto.
+       (ia64*-*-hpux*): Add ia64/hpux-unix2003.h to tm_file.
+       * config/ia64/hpux-unix2003.h: New.
+       * config/pa/pa-hpux1131.opt: New.
+       * config/pa/pa-hpux1131.h: New.
+       * config/pa/pa64-hpux.h (STARTFILE_SPEC): Use unix2003.o if requested.
+       * config/pa/pa-hpux.opt (flag_pa_unix): Check TARGET_HPUX_11_31 value.
+       config/pa/pa.h (TARGET_HPUX_11_31): Provide default (0) value.
+
 2011-05-05  Jakub Jelinek  <jakub@redhat.com>
 
        PR debug/48853
index c204ab1f9545457bf33bdd95f98acc8c8fd61de7..385e78eb700a17ea0438a58143c764572465e263 100644 (file)
@@ -1065,10 +1065,14 @@ hppa*64*-*-hpux11*)
                 pa/pa64-regs.h pa/pa-hpux.h pa/pa-hpux1010.h \
                 pa/pa-hpux11.h"
        case ${target} in
-       *-*-hpux11.[1-9]*)
+       *-*-hpux11.[12]*)
                tm_file="${tm_file} pa/pa-hpux1111.h pa/pa-64.h pa/pa64-hpux.h"
                extra_options="${extra_options} pa/pa-hpux1111.opt"
                ;;
+       *-*-hpux11.[3-9]*)
+               tm_file="${tm_file} pa/pa-hpux1131.h pa/pa-64.h pa/pa64-hpux.h"
+               extra_options="${extra_options} pa/pa-hpux1131.opt"
+               ;;
        *)
                tm_file="${tm_file} pa/pa-64.h pa/pa64-hpux.h"
                ;;
@@ -1113,10 +1117,14 @@ hppa[12]*-*-hpux11*)
        extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux1010.opt \
                       hpux11.opt"
        case ${target} in
-       *-*-hpux11.[1-9]*)
+       *-*-hpux11.[12]*)
                tm_file="${tm_file} pa/pa-hpux1111.h"
                extra_options="${extra_options} pa/pa-hpux1111.opt"
                ;;
+       *-*-hpux11.[3-9]*)
+               tm_file="${tm_file} pa/pa-hpux1131.h"
+               extra_options="${extra_options} pa/pa-hpux1131.opt"
+               ;;
        esac
        tmake_file="pa/t-pa-hpux11 pa/t-pa-hpux pa/t-hpux-shlib"
        # Set the libgcc version number
@@ -1582,6 +1590,11 @@ ia64*-*-hpux*)
        extra_options="${extra_options} ia64/ilp32.opt hpux11.opt"
        use_gcc_stdint=wrap
        tm_file="${tm_file} hpux-stdint.h"
+       case ${target} in
+       *-*-hpux11.3*)
+               tm_file="${tm_file} ia64/hpux-unix2003.h"
+               ;;
+       esac
        ;;
 ia64-hp-*vms*)
        tm_file="${tm_file} elfos.h ia64/sysv4.h ia64/elf.h ia64/vms.h ia64/vms64.h"
diff --git a/gcc/config/ia64/hpux-unix2003.h b/gcc/config/ia64/hpux-unix2003.h
new file mode 100644 (file)
index 0000000..36418be
--- /dev/null
@@ -0,0 +1,8 @@
+
+/* For HP-UX 11.31 and greater, use unix2003.o instead of unix98.o to
+   get correct C99 snprintf behaviour with buffer overflow.  */
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "%{!shared:%{static:crt0%O%s} \
+                         %{mlp64:/usr/lib/hpux64/unix2003%O%s} \
+                         %{!mlp64:/usr/lib/hpux32/unix2003%O%s}}"
index ddbb68f03eb7e6c05ec6cbfe3e3c024a2700dccc..ed5d6a4bd795eb4b5d5fc40a5f54dea9c2393baf 100644 (file)
@@ -20,7 +20,7 @@
 
 ; The UNIX standard to use for predefines and linking.
 Variable
-int flag_pa_unix = TARGET_HPUX_11_11 ? 1998 : TARGET_HPUX_10_10 ? 1995 : 1993
+int flag_pa_unix = TARGET_HPUX_11_31 ? 2003 : TARGET_HPUX_11_11 ? 1998 : TARGET_HPUX_10_10 ? 1995 : 1993
 
 msio
 Target RejectNegative Mask(SIO) MaskExists
diff --git a/gcc/config/pa/pa-hpux1131.h b/gcc/config/pa/pa-hpux1131.h
new file mode 100644 (file)
index 0000000..bc4549b
--- /dev/null
@@ -0,0 +1,29 @@
+/* Definitions of target machine for GNU compiler, for HP PA-RISC
+   Copyright (C) 2004, 2007 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC 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 3, or (at your option)
+any later version.
+
+GCC 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 GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
+
+/* HP-UX 11i multibyte and UNIX 98 extensions.  */
+#undef TARGET_HPUX_11_11
+#define TARGET_HPUX_11_11 1
+#undef TARGET_HPUX_11_31
+#define TARGET_HPUX_11_31 1
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC \
+  "%{!shared:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}} \
+     %{munix=95:unix95%O%s}%{munix=98:unix98%O%s}%{!munix=93:%{!munix=95:%{!munix=98:unix2003%O%s}}}}"
diff --git a/gcc/config/pa/pa-hpux1131.opt b/gcc/config/pa/pa-hpux1131.opt
new file mode 100644 (file)
index 0000000..c909f22
--- /dev/null
@@ -0,0 +1,23 @@
+; Options for the HP PA-RISC port of the compiler.
+
+; Copyright (C) 2005, 2007, 2011 Free Software Foundation, Inc.
+;
+; This file is part of GCC.
+;
+; GCC 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 3, or (at your option) any later
+; version.
+;
+; GCC 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 GCC; see the file COPYING3.  If not see
+; <http://www.gnu.org/licenses/>.
+
+munix=2003
+Target RejectNegative Var(flag_pa_unix, 2003)
+Specify UNIX standard for predefines and linking
index cc9724a6e7ebbb5b22ba31d78306fe6f52531a84..37c4cb2ccfac2e37640dbc008cf023dafbeaadf5 100644 (file)
@@ -304,7 +304,14 @@ do {                                                               \
 /* The following STARTFILE_SPEC and ENDFILE_SPEC defines provide the
    magic needed to run initializers and finalizers.  */
 #undef STARTFILE_SPEC
-#if TARGET_HPUX_11_11
+#if TARGET_HPUX_11_31
+#define STARTFILE_SPEC \
+  "%{!shared: %{!symbolic: crt0%O%s} \
+     %{munix=95:unix95.o%s} %{munix=98:unix98.o%s} \
+     %{!munix=93:%{!munix=95:%{!munix=98:unix2003%O%s}}}} \
+     %{static:crtbeginT%O%s} \
+   %{!static:%{!shared:crtbegin%O%s} %{shared:crtbeginS%O%s}}"
+#elif TARGET_HPUX_11_11
 #define STARTFILE_SPEC \
   "%{!shared: %{!symbolic: crt0%O%s} %{munix=95:unix95.o%s} \
      %{!munix=93:%{!munix=95:unix98%O%s}}} %{static:crtbeginT%O%s} \