[PATCH 3/4] hppa: Install __sync libfuncs for linux.

Richard Henderson rth@redhat.com
Sat Nov 12 03:56:00 GMT 2011


Cc: John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
---
 gcc/config/pa/pa-linux.h |    3 +++
 gcc/config/pa/pa.c       |    3 +++
 gcc/config/pa/pa.h       |    5 +++++
 3 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/gcc/config/pa/pa-linux.h b/gcc/config/pa/pa-linux.h
index 6c6cf21..addc0e1 100644
--- a/gcc/config/pa/pa-linux.h
+++ b/gcc/config/pa/pa-linux.h
@@ -136,3 +136,6 @@ along with GCC; see the file COPYING3.  If not see
 /* Linux always uses gas.  */
 #undef TARGET_GAS
 #define TARGET_GAS 1
+
+#undef TARGET_SYNC_LIBCALL
+#define TARGET_SYNC_LIBCALL 1
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 66574ba..134f1f8 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -5587,6 +5587,9 @@ pa_init_libfuncs (void)
       set_conv_libfunc (ufloat_optab, TFmode, DImode,
 			"_U_Qfcnvxf_udbl_to_quad");
     }
+
+  if (TARGET_SYNC_LIBCALL)
+    init_sync_libfuncs (UNITS_PER_WORD);
 }
 
 /* HP's millicode routines mean something special to the assembler.
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index 2f1295b..c52e3d5 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -74,6 +74,11 @@ extern unsigned long total_code_bytes;
 #define HPUX_LONG_DOUBLE_LIBRARY 0
 #endif
 
+/* Linux kernel atomic operation support.  */
+#ifndef TARGET_SYNC_LIBCALL
+#define TARGET_SYNC_LIBCALL 0
+#endif
+
 /* The following three defines are potential target switches.  The current
    defines are optimal given the current capabilities of GAS and GNU ld.  */
 
-- 
1.7.6.4



More information about the Gcc-patches mailing list