diff mbox series

rs6000: Fix bootstrap (libffi)

Message ID 3eee26ca85f89aee42595ecdb20b4a67fbd3ab18.1635204640.git.segher@kernel.crashing.org
State New
Headers show
Series rs6000: Fix bootstrap (libffi) | expand

Commit Message

Segher Boessenkool Oct. 25, 2021, 11:39 p.m. UTC
This fixes bootstrap for the current problems building libffi.

I'll work on getting this into upstream as well.  If the maintainers
want it done differently, at least we have bootstrap working again
until then.

Tested on powerpc64-linux {-m32,-m64}.


Segher


2021-10-25  Segher Boessenkool  <segher@kernel.crashing.org>

libffi/
	* src/powerpc/linux64.S: Enable AltiVec insns.
	* src/powerpc/linux64_closure.S: Ditto.
---
 libffi/src/powerpc/linux64.S         | 2 ++
 libffi/src/powerpc/linux64_closure.S | 2 ++
 2 files changed, 4 insertions(+)

Comments

H.J. Lu Oct. 27, 2021, 6:44 p.m. UTC | #1
On Mon, Oct 25, 2021 at 4:39 PM Segher Boessenkool
<segher@kernel.crashing.org> wrote:
>
> This fixes bootstrap for the current problems building libffi.
>
> I'll work on getting this into upstream as well.  If the maintainers
> want it done differently, at least we have bootstrap working again
> until then.
>
> Tested on powerpc64-linux {-m32,-m64}.
>
>
> Segher
>
>
> 2021-10-25  Segher Boessenkool  <segher@kernel.crashing.org>
>
> libffi/
>         * src/powerpc/linux64.S: Enable AltiVec insns.
>         * src/powerpc/linux64_closure.S: Ditto.
> ---
>  libffi/src/powerpc/linux64.S         | 2 ++
>  libffi/src/powerpc/linux64_closure.S | 2 ++
>  2 files changed, 4 insertions(+)
>
> diff --git a/libffi/src/powerpc/linux64.S b/libffi/src/powerpc/linux64.S
> index e92d64af34fd..1f876ea39edd 100644
> --- a/libffi/src/powerpc/linux64.S
> +++ b/libffi/src/powerpc/linux64.S
> @@ -29,6 +29,8 @@
>  #include <fficonfig.h>
>  #include <ffi.h>
>
> +       .machine altivec
> +
>  #ifdef POWERPC64
>         .hidden ffi_call_LINUX64
>         .globl  ffi_call_LINUX64
> diff --git a/libffi/src/powerpc/linux64_closure.S b/libffi/src/powerpc/linux64_closure.S
> index 3469a2cbb01e..199981db3307 100644
> --- a/libffi/src/powerpc/linux64_closure.S
> +++ b/libffi/src/powerpc/linux64_closure.S
> @@ -30,6 +30,8 @@
>
>         .file   "linux64_closure.S"
>
> +       .machine altivec
> +
>  #ifdef POWERPC64
>         FFI_HIDDEN (ffi_closure_LINUX64)
>         .globl  ffi_closure_LINUX64
> --
> 1.8.3.1
>

I am checking in this patch:

https://gcc.gnu.org/pipermail/gcc-patches/2021-October/582717.html
Segher Boessenkool Oct. 27, 2021, 11:19 p.m. UTC | #2
Hi!

On Wed, Oct 27, 2021 at 11:44:59AM -0700, H.J. Lu wrote:
> On Mon, Oct 25, 2021 at 4:39 PM Segher Boessenkool
> <segher@kernel.crashing.org> wrote:
> > This fixes bootstrap for the current problems building libffi.
> >
> > I'll work on getting this into upstream as well.  If the maintainers
> > want it done differently, at least we have bootstrap working again
> > until then.

> I am checking in this patch:
> 
> https://gcc.gnu.org/pipermail/gcc-patches/2021-October/582717.html

Ah thanks :-)  I thought I'd get it fixed upstream soon, but that might
not happen (or not in time, etc.)  This is a good idea no matter what.


Segher
diff mbox series

Patch

diff --git a/libffi/src/powerpc/linux64.S b/libffi/src/powerpc/linux64.S
index e92d64af34fd..1f876ea39edd 100644
--- a/libffi/src/powerpc/linux64.S
+++ b/libffi/src/powerpc/linux64.S
@@ -29,6 +29,8 @@ 
 #include <fficonfig.h>
 #include <ffi.h>
 
+	.machine altivec
+
 #ifdef POWERPC64
 	.hidden	ffi_call_LINUX64
 	.globl	ffi_call_LINUX64
diff --git a/libffi/src/powerpc/linux64_closure.S b/libffi/src/powerpc/linux64_closure.S
index 3469a2cbb01e..199981db3307 100644
--- a/libffi/src/powerpc/linux64_closure.S
+++ b/libffi/src/powerpc/linux64_closure.S
@@ -30,6 +30,8 @@ 
 
 	.file	"linux64_closure.S"
 
+	.machine altivec
+
 #ifdef POWERPC64
 	FFI_HIDDEN (ffi_closure_LINUX64)
 	.globl  ffi_closure_LINUX64