aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/pa/pa-hpux10.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/pa/pa-hpux10.h')
-rw-r--r--gcc/config/pa/pa-hpux10.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/config/pa/pa-hpux10.h b/gcc/config/pa/pa-hpux10.h
index 0354543e3d0..22f57be9d80 100644
--- a/gcc/config/pa/pa-hpux10.h
+++ b/gcc/config/pa/pa-hpux10.h
@@ -20,6 +20,12 @@ 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. */
+/* GCC always defines __STDC__. HP C++ compilers don't define it. This
+ causes trouble when sys/stdsyms.h is included. As a work around,
+ we define __STDC_EXT__. A similar situation exists with respect to
+ the definition of __cplusplus. We define _INCLUDE_LONGLONG
+ to prevent nlist.h from defining __STDC_32_MODE__ (no longlong
+ support). */
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
do \
@@ -36,6 +42,7 @@ Boston, MA 02111-1307, USA. */
{ \
builtin_define ("_HPUX_SOURCE"); \
builtin_define ("_INCLUDE_LONGLONG"); \
+ builtin_define ("__STDC_EXT__"); \
} \
else if (!flag_iso) \
{ \
@@ -82,10 +89,12 @@ Boston, MA 02111-1307, USA. */
#define LIB_SPEC \
"%{!shared:\
%{!p:%{!pg:\
- %{!threads:-lc}\
+ %{!threads:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}\
%{threads:-lcma -lc_r}}}\
- %{p: -L/lib/libp/ -lc}\
- %{pg: -L/lib/libp/ -lc}}"
+ %{p: -L/lib/libp/ -lc\
+ %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}\
+ %{pg: -L/lib/libp/ -lc\
+ %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}"
#undef THREAD_MODEL_SPEC
#define THREAD_MODEL_SPEC "%{!threads:single}%{threads:dce}"