From: Steve Ellcey Date: Thu, 5 May 2011 15:49:28 +0000 (+0000) Subject: config.gcc (hppa*64*-*-hpux11*): Modify tm_file and extra_options for 11.31. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fc4538e41ef500b68485407afaeecdac48bc8e5f;p=gcc.git config.gcc (hppa*64*-*-hpux11*): Modify tm_file and extra_options for 11.31. 2011-05-05 Steve Ellcey * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c19519f0a94..3e2129a37c7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2011-05-05 Steve Ellcey + + * 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 PR debug/48853 diff --git a/gcc/config.gcc b/gcc/config.gcc index c204ab1f954..385e78eb700 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -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 index 00000000000..36418be000e --- /dev/null +++ b/gcc/config/ia64/hpux-unix2003.h @@ -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}}" diff --git a/gcc/config/pa/pa-hpux.opt b/gcc/config/pa/pa-hpux.opt index ddbb68f03eb..ed5d6a4bd79 100644 --- a/gcc/config/pa/pa-hpux.opt +++ b/gcc/config/pa/pa-hpux.opt @@ -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 index 00000000000..bc4549bc0fd --- /dev/null +++ b/gcc/config/pa/pa-hpux1131.h @@ -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 +. */ + +/* 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 index 00000000000..c909f2270b1 --- /dev/null +++ b/gcc/config/pa/pa-hpux1131.opt @@ -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 +; . + +munix=2003 +Target RejectNegative Var(flag_pa_unix, 2003) +Specify UNIX standard for predefines and linking diff --git a/gcc/config/pa/pa64-hpux.h b/gcc/config/pa/pa64-hpux.h index cc9724a6e7e..37c4cb2ccfa 100644 --- a/gcc/config/pa/pa64-hpux.h +++ b/gcc/config/pa/pa64-hpux.h @@ -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} \