git: ebfe943ce41f - main - devel/freebsd-sysroot: Try to fix powerpc64_elfv1 flavor

From: Tobias Kortkamp <tobik_at_FreeBSD.org>
Date: Thu, 25 Aug 2022 21:35:24 UTC
The branch main has been updated by tobik:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ebfe943ce41f5a5fb8016ae3f9fc75c214b8d2cb

commit ebfe943ce41f5a5fb8016ae3f9fc75c214b8d2cb
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2022-08-25 21:16:22 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2022-08-25 21:16:22 +0000

    devel/freebsd-sysroot: Try to fix powerpc64_elfv1 flavor
    
    The freebsd-gcc9 default ABI switch to elfv2 in
    bf742277557cd64e9017df3844ca82173529c1ae breaks it:
    
    /usr/local/bin/powerpc64-unknown-freebsd13.0-ld: /tmp//ccNlmC42.o: ABI version 2 is not compatible with ABI version 1 output
     /usr/local/bin/powerpc64-unknown-freebsd13.0-ld: failed to merge target specific data of file /tmp//ccNlmC42.o
---
 devel/freebsd-sysroot/files/powerpc64_elfv1-c++.in | 2 +-
 devel/freebsd-sysroot/files/powerpc64_elfv1-cc.in  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/devel/freebsd-sysroot/files/powerpc64_elfv1-c++.in b/devel/freebsd-sysroot/files/powerpc64_elfv1-c++.in
index 293a20c2f59e..2cb877d1c80c 100644
--- a/devel/freebsd-sysroot/files/powerpc64_elfv1-c++.in
+++ b/devel/freebsd-sysroot/files/powerpc64_elfv1-c++.in
@@ -1,4 +1,4 @@
 #!/bin/sh
 : ${FREEBSD_SYSROOT_CXX:="%%FREEBSD_SYSROOT_CXX_ELFV1%%"}
 : ${FREEBSD_SYSROOT:="%%FREEBSD_SYSROOT%%"}
-exec "${FREEBSD_SYSROOT_CXX}" --sysroot="${FREEBSD_SYSROOT}" -Wl,-rpath=/usr/local/lib/gcc9 -L"${FREEBSD_SYSROOT}/usr/local/lib/gcc9" -isystem="%%LOCALBASE%%/lib/gcc9/include/c++" -isystem="%%FREEBSD_SYSROOT_CXXINC_ELFV1%%" "$@"
+exec "${FREEBSD_SYSROOT_CXX}" -mabi=elfv1 --sysroot="${FREEBSD_SYSROOT}" -Wl,-rpath=/usr/local/lib/gcc9 -L"${FREEBSD_SYSROOT}/usr/local/lib/gcc9" -isystem="%%LOCALBASE%%/lib/gcc9/include/c++" -isystem="%%FREEBSD_SYSROOT_CXXINC_ELFV1%%" "$@"
diff --git a/devel/freebsd-sysroot/files/powerpc64_elfv1-cc.in b/devel/freebsd-sysroot/files/powerpc64_elfv1-cc.in
index c7f09d85afba..2a6535da0cd0 100644
--- a/devel/freebsd-sysroot/files/powerpc64_elfv1-cc.in
+++ b/devel/freebsd-sysroot/files/powerpc64_elfv1-cc.in
@@ -1,4 +1,4 @@
 #!/bin/sh
 : ${FREEBSD_SYSROOT_CC:="%%FREEBSD_SYSROOT_CC_ELFV1%%"}
 : ${FREEBSD_SYSROOT:="%%FREEBSD_SYSROOT%%"}
-exec "${FREEBSD_SYSROOT_CC}" --sysroot="${FREEBSD_SYSROOT}" -Wl,-rpath=/usr/local/lib/gcc9 -L"${FREEBSD_SYSROOT}/usr/local/lib/gcc9" "$@"
+exec "${FREEBSD_SYSROOT_CC}" -mabi=elfv1 --sysroot="${FREEBSD_SYSROOT}" -Wl,-rpath=/usr/local/lib/gcc9 -L"${FREEBSD_SYSROOT}/usr/local/lib/gcc9" "$@"