Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jun 2023 13:18:08 GMT
From:      Piotr Kubaj <pkubaj@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: dcbc273b6b19 - main - lang/gcc12: fix build on powerpc64* with CPUTYPE?=g[3-5]
Message-ID:  <202306191318.35JDI8Re051945@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by pkubaj:

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

commit dcbc273b6b19b13eac1b1fbbb013148e1721dc85
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-06-18 19:25:47 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-06-19 13:18:06 +0000

    lang/gcc12: fix build on powerpc64* with CPUTYPE?=g[3-5]
    
    GCC doesn't support -mcpu=g4, but it supports -mcpu=G4. Same for g3 and g5.
---
 lang/gcc12/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lang/gcc12/Makefile b/lang/gcc12/Makefile
index 1604c7fcfec8..fcca3cfd875d 100644
--- a/lang/gcc12/Makefile
+++ b/lang/gcc12/Makefile
@@ -60,6 +60,11 @@ MULTILIB_CONFIGURE_ENABLE=	multilib
 CONFIGURE_ARGS+=	--disable-multilib
 .endif
 
+.if ${CPUTYPE:Mg[3-5]}
+CFLAGS:=	${CFLAGS:S/mcpu=g/mcpu=G/}
+CXXFLAGS:=	${CFLAGS:S/mcpu=g/mcpu=G/}
+.endif
+
 .include <bsd.port.pre.mk>
 
 # Extraction fails with poudriere on aarch64 for GCC 12.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202306191318.35JDI8Re051945>