[Darwin,libgcc,comitted] Allow vec save asm to build with modern assembler.

Message ID 7215595C-E661-4514-9C22-516B559ECF18@sandoe.co.uk
State New
Headers show
Series
  • [Darwin,libgcc,comitted] Allow vec save asm to build with modern assembler.
Related show

Commit Message

Iain Sandoe May 12, 2019, 7:29 p.m.
Some of the newer assemblers for Darwin check that the CPU type is consistent with the file type and fail to build when they don’t match.

Fixed thus for trunk
thanks
Iain

libgcc/

2019-05-12  Iain Sandoe  <iain@sandoe.co.uk>

	* config/rs6000/darwin-vecsave.S: Set .machine appropriately.

Patch

Index: libgcc/config/rs6000/darwin-vecsave.S
===================================================================
--- libgcc/config/rs6000/darwin-vecsave.S	(revision 271110)
+++ libgcc/config/rs6000/darwin-vecsave.S	(working copy)
@@ -31,8 +31,14 @@ 
    (4 bytes) to do the operation; for Vector regs, 2 instructions are
    required (8 bytes.).   */
 
+/* With some assemblers, we need the correct machine directive to get the
+   right CPU type / subtype in the file header.  */
+#if	__ppc64__
+	.machine ppc64
+#else
 	.machine ppc7400
-.text
+#endif
+	.text
 	.align 2
 
 .private_extern saveVEC