git: ece15876b8a8 - stable/13 - usr.bin/gh-bc: fix Makefile for WITHOUT_NLS_CATALOGS case

From: Stefan Eßer <se_at_FreeBSD.org>
Date: Thu, 18 Jan 2024 17:48:17 UTC
The branch stable/13 has been updated by se:

URL: https://cgit.FreeBSD.org/src/commit/?id=ece15876b8a86031afa7c1e37fdda341ad65089d

commit ece15876b8a86031afa7c1e37fdda341ad65089d
Author:     Stefan Eßer <se@FreeBSD.org>
AuthorDate: 2023-07-29 18:52:53 +0000
Commit:     Stefan Eßer <se@FreeBSD.org>
CommitDate: 2024-01-18 17:47:06 +0000

    usr.bin/gh-bc: fix Makefile for WITHOUT_NLS_CATALOGS case
    
    Some macro definitions had been moved into a Makefile section
    that depends on MK_NLS_CATALOGS != "no", leading to LTO and the
    installation of tests being disabled in the WITHOUT_NLS_CATALOGS
    case.
    
    Reported by:    Yuri <yuri@aetern.org>
    
    (cherry picked from commit 382af2f8d7bf576ff583543737e1134701ccc63d)
---
 usr.bin/gh-bc/Makefile | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/usr.bin/gh-bc/Makefile b/usr.bin/gh-bc/Makefile
index c7fdc3c5a797..e78ab4b2994b 100644
--- a/usr.bin/gh-bc/Makefile
+++ b/usr.bin/gh-bc/Makefile
@@ -60,6 +60,14 @@ CFLAGS+=	-DNDEBUG
 CFLAGS+=	-DNLSPATH=/usr/share/nls/%L/%N.cat
 CFLAGS+=	-I${BCDIR}/include
 
+# prevent floating point incompatibilities caused by -flto on some architectures
+.if ${MACHINE_ARCH} != riscv64
+CFLAGS+=	-flto
+.endif
+
+HAS_TESTS=	yes
+SUBDIR.${MK_TESTS}+= tests
+
 .if ${MK_NLS_CATALOGS} == "no"
 CFLAGS+=	-DBC_ENABLE_NLS=0
 MAN_SRC_BC=	bc/N.1
@@ -69,15 +77,6 @@ CFLAGS+=	-DBC_ENABLE_NLS=1
 MAN_SRC_BC=	bc/A.1
 MAN_SRC_DC=	dc/A.1
 
-# prevent floating point incompatibilities caused by -flto on some architectures
-.if ${MACHINE_ARCH:Mmips*} == "" && ${MACHINE_ARCH} != powerpc64 && \
-	${MACHINE_ARCH} != riscv64
-CFLAGS+=	-flto
-.endif
-
-HAS_TESTS=	yes
-SUBDIR.${MK_TESTS}+= tests
-
 .for catalog in ${CATALOGS}
 NLS+=           ${catalog:C/.*://}
 NLSSRCFILES_${catalog:C/.*://}= ${catalog:C/.*://}.msg