diff mbox

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

Message ID 1321054334-21865-4-git-send-email-rth@redhat.com
State New
Headers show

Commit Message

Richard Henderson Nov. 11, 2011, 11:32 p.m. UTC
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(-)

Comments

Gerald Pfeifer Nov. 12, 2011, 8:42 p.m. UTC | #1
On Fri, 11 Nov 2011, Richard Henderson wrote:
> @@ -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

John, Richard, while you are at it, mind making this GNU/Linux per
guidance from RMS?  (That'll save us work later on.)

I assume the ChangeLog entry also should refer to GNU/Linux?

Gerald
John David Anglin Nov. 13, 2011, 4:02 a.m. UTC | #2
On 12-Nov-11, at 3:42 PM, Gerald Pfeifer wrote:

> John, Richard, while you are at it, mind making this GNU/Linux per
> guidance from RMS?  (That'll save us work later on.)

Yes.  I don't want to participate in this controversy.

I believe the file was initially contributed by developers working under
a HP contract to port the PA-RISC architecture to the "Linux" kernel.

John David Anglin
Richard Henderson Nov. 13, 2011, 9:36 p.m. UTC | #3
On 11/12/2011 10:42 AM, Gerald Pfeifer wrote:
> I assume the ChangeLog entry also should refer to GNU/Linux?

Meh.  It really does refer specifically to the Linux kernel,
and not the GNU userland.


r~
Gerald Pfeifer Nov. 13, 2011, 9:45 p.m. UTC | #4
On Sun, 13 Nov 2011, Richard Henderson wrote:
>> I assume the ChangeLog entry also should refer to GNU/Linux?
> Meh.  It really does refer specifically to the Linux kernel,
> and not the GNU userland.

Ah, cool then.

The comment, however, reads
  /* Linux always uses gas.  */
which does seem to warrant GNU/Linux in RMS diction.

Gerald
Richard Henderson Nov. 13, 2011, 9:47 p.m. UTC | #5
On 11/13/2011 11:45 AM, Gerald Pfeifer wrote:
> The comment, however, reads
>   /* Linux always uses gas.  */
> which does seem to warrant GNU/Linux in RMS diction.

Oh, unrelated to my actual patch then.


r~
diff mbox

Patch

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.  */