Mercurial > hg > CbC > CbC_gcc
diff gcc/config/pa/pa-hpux11.h @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | f6334be47118 |
children | 84e7813d76e9 |
line wrap: on
line diff
--- a/gcc/config/pa/pa-hpux11.h Sun Aug 21 07:07:55 2011 +0900 +++ b/gcc/config/pa/pa-hpux11.h Fri Oct 27 22:46:09 2017 +0900 @@ -1,6 +1,5 @@ /* Definitions of target machine for GNU compiler, for HP PA-RISC - Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2007, 2008, 2010 - Free Software Foundation, Inc. + Copyright (C) 1998-2017 Free Software Foundation, Inc. This file is part of GCC. @@ -24,7 +23,9 @@ the definition of __cplusplus. We define _INCLUDE_LONGLONG to prevent nlist.h from defining __STDC_32_MODE__ (no longlong support). We define __STDCPP__ to get certain system headers - (notably assert.h) to assume standard preprocessor behavior in C++. */ + (notably assert.h) to assume standard preprocessor behavior in C++. + We define _XOPEN_SOURCE_EXTENDED when we define _HPUX_SOURCE to avoid + non standard hpux variants in _INCLUDE_XOPEN_SOURCE_EXTENDED. */ #undef TARGET_OS_CPP_BUILTINS #define TARGET_OS_CPP_BUILTINS() \ do \ @@ -41,47 +42,72 @@ if (c_dialect_cxx ()) \ { \ builtin_define ("_HPUX_SOURCE"); \ + builtin_define ("_REENTRANT"); \ builtin_define ("_INCLUDE_LONGLONG"); \ builtin_define ("__STDCPP__"); \ + builtin_define ("_LARGEFILE_SOURCE"); \ + builtin_define ("_LARGEFILE64_SOURCE"); \ + if (flag_pa_unix >= 1995) \ + { \ + builtin_define ("_XOPEN_UNIX"); \ + builtin_define ("_XOPEN_SOURCE_EXTENDED"); \ + } \ + if (flag_pa_unix >= 1998) \ + { \ + builtin_define ("_INCLUDE__STDC_A1_SOURCE"); \ + builtin_define ("_INCLUDE_XOPEN_SOURCE_500"); \ + } \ + if (flag_pa_unix >= 2003) \ + { \ + builtin_define ("_INCLUDE_STDC_SOURCE_PRE_199901"); \ + builtin_define ("_INCLUDE_STDC_SOURCE_199901"); \ + builtin_define ("_INCLUDE_XOPEN_SOURCE_PRE_500"); \ + builtin_define ("_INCLUDE_XOPEN_SOURCE_520"); \ + builtin_define ("_INCLUDE_XOPEN_SOURCE_PRE_600"); \ + builtin_define ("_INCLUDE_XOPEN_SOURCE_600"); \ + } \ + } \ + else if (flag_iso) \ + { \ + if (flag_isoc94) \ + builtin_define ("_INCLUDE__STDC_A1_SOURCE"); \ } \ else \ { \ - if (!flag_iso) \ + builtin_define ("_HPUX_SOURCE"); \ + builtin_define ("_REENTRANT"); \ + if (preprocessing_trad_p ()) \ + { \ + builtin_define ("hp9000s800"); \ + builtin_define ("hppa"); \ + builtin_define ("hpux"); \ + builtin_define ("unix"); \ + builtin_define ("__CLASSIC_C__"); \ + builtin_define ("_PWB"); \ + builtin_define ("PWB"); \ + } \ + if (flag_pa_unix >= 1995) \ { \ - builtin_define ("_HPUX_SOURCE"); \ - if (preprocessing_trad_p ()) \ - { \ - builtin_define ("hp9000s800"); \ - builtin_define ("hppa"); \ - builtin_define ("hpux"); \ - builtin_define ("unix"); \ - builtin_define ("__CLASSIC_C__"); \ - builtin_define ("_PWB"); \ - builtin_define ("PWB"); \ - } \ + builtin_define ("_XOPEN_UNIX"); \ + builtin_define ("_XOPEN_SOURCE_EXTENDED"); \ + } \ + if (flag_pa_unix >= 1998) \ + { \ + builtin_define ("_INCLUDE__STDC_A1_SOURCE"); \ + builtin_define ("_INCLUDE_XOPEN_SOURCE_500"); \ + } \ + if (flag_pa_unix >= 2003) \ + { \ + builtin_define ("_INCLUDE_STDC_SOURCE_PRE_199901"); \ + builtin_define ("_INCLUDE_STDC_SOURCE_199901"); \ + builtin_define ("_INCLUDE_XOPEN_SOURCE_PRE_500"); \ + builtin_define ("_INCLUDE_XOPEN_SOURCE_520"); \ + builtin_define ("_INCLUDE_XOPEN_SOURCE_PRE_600"); \ + builtin_define ("_INCLUDE_XOPEN_SOURCE_600"); \ } \ } \ if (!TARGET_64BIT) \ builtin_define ("_ILP32"); \ - if (flag_pa_unix >= 1995 && !flag_iso) \ - { \ - builtin_define ("_XOPEN_UNIX"); \ - builtin_define ("_XOPEN_SOURCE_EXTENDED"); \ - } \ - if (TARGET_HPUX_11_11) \ - { \ - if (flag_pa_unix >= 1998) \ - { \ - if (flag_isoc94 || flag_isoc99 || c_dialect_cxx() \ - || !flag_iso) \ - builtin_define ("_INCLUDE__STDC_A1_SOURCE"); \ - if (!flag_iso) \ - builtin_define ("_INCLUDE_XOPEN_SOURCE_500"); \ - } \ - else if (flag_isoc94 || flag_isoc99 || c_dialect_cxx ()) \ - warning (0, "-munix=98 option required for C89 " \ - "Amendment 1 features.\n"); \ - } \ if (TARGET_SIO) \ builtin_define ("_SIO"); \ else \ @@ -121,7 +147,8 @@ #undef LIB_SPEC #define LIB_SPEC \ "%{!shared:\ - %{fopenmp:%{static:-a archive_shared} -lrt %{static:-a archive}}\ + %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\ + %{static:-a archive_shared} -lrt %{static:-a archive}}\ %{mt|pthread:-lpthread} -lc\ %{static:%{!nolibdld:-a archive_shared -ldld -a archive -lc}\ %{!mt:%{!pthread:-a shared -lc -a archive}}}}\