Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-10]: src/external/gpl3/gcc/usr.bin Pull up following revision(s) ...



details:   https://anonhg.NetBSD.org/src/rev/19bd6fc3277d
branches:  netbsd-10
changeset: 376042:19bd6fc3277d
user:      martin <martin%NetBSD.org@localhost>
date:      Sun May 28 09:47:27 2023 +0000

description:
Pull up following revision(s) (requested by lukem in ticket #176):

        external/gpl3/gcc/usr.bin/libdecnumber/Makefile: revision 1.9
        external/gpl3/gcc/usr.bin/common/Makefile: revision 1.12
        external/gpl3/gcc/usr.bin/backend/Makefile: revision 1.67
        external/gpl3/gcc/usr.bin/common-target/Makefile: revision 1.12
        external/gpl3/gcc/usr.bin/frontend/Makefile: revision 1.15
        external/gpl3/gcc/usr.bin/libcpp/Makefile: revision 1.10

gcc: fix build with clang++ HOST_CXX

Define HOSTPROG_CXX before .include anything that brings in bsd.own.mk.

This ensures that HOST_DBG (etc) gets assigned before HOST_CFLAGS
and HOST_CXXFLAGS is created.

backend: .include <bsd.init.mk> much earlier, as per the other directories.

Fixes backend build when using clang++ as the host compiler (e.g., macOS),
because backend host tools are now built with -O.

Inspired by https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255760

Note that gcc.old/Makefile.prog may be mis-used because it defines HOSTPROG_CXX
and this Makefile fragment is included after bsd.*.mk in other Makefiles,
but they seem to build ok so leaving it alone for now.

Fixes PR toolchain/57014

diffstat:

 external/gpl3/gcc/usr.bin/backend/Makefile       |  10 +++++-----
 external/gpl3/gcc/usr.bin/common-target/Makefile |   5 ++---
 external/gpl3/gcc/usr.bin/common/Makefile        |   5 ++---
 external/gpl3/gcc/usr.bin/frontend/Makefile      |   5 ++---
 external/gpl3/gcc/usr.bin/libcpp/Makefile        |   5 ++---
 external/gpl3/gcc/usr.bin/libdecnumber/Makefile  |   5 ++---
 6 files changed, 15 insertions(+), 20 deletions(-)

diffs (130 lines):

diff -r 716950bed91c -r 19bd6fc3277d external/gpl3/gcc/usr.bin/backend/Makefile
--- a/external/gpl3/gcc/usr.bin/backend/Makefile        Sun May 28 09:43:26 2023 +0000
+++ b/external/gpl3/gcc/usr.bin/backend/Makefile        Sun May 28 09:47:27 2023 +0000
@@ -1,7 +1,11 @@
-#      $NetBSD: Makefile,v 1.66 2021/09/18 01:47:08 christos Exp $
+#      $NetBSD: Makefile,v 1.66.2.1 2023/05/28 09:47:27 martin Exp $
 
+HOSTPROG_CXX=  1
 LIBISPRIVATE=  yes
 
+# For ../Makefile.inc and bsd.own.mk
+.include <bsd.init.mk>
+
 LIB=           backend
 
 SRCS=          ${G_OBJS:S,analyzer/,,} ${G_out_file:T} regsub.c
@@ -28,10 +32,6 @@ CPPFLAGS.lto-streamer-in.c+= -DTARGET_MA
 
 HOST_CXXFLAGS+=        -std=gnu++98
 
-HOSTPROG_CXX=  1
-
-.include <bsd.init.mk>
-
 HOST_LIBIBERTYOBJ!=    cd ${.CURDIR}/../host-libiberty && ${PRINTOBJDIR}
 
 .include <bsd.lib.mk>
diff -r 716950bed91c -r 19bd6fc3277d external/gpl3/gcc/usr.bin/common-target/Makefile
--- a/external/gpl3/gcc/usr.bin/common-target/Makefile  Sun May 28 09:43:26 2023 +0000
+++ b/external/gpl3/gcc/usr.bin/common-target/Makefile  Sun May 28 09:47:27 2023 +0000
@@ -1,5 +1,6 @@
-#      $NetBSD: Makefile,v 1.11 2021/09/18 01:47:08 christos Exp $
+#      $NetBSD: Makefile,v 1.11.2.1 2023/05/28 09:47:27 martin Exp $
 
+HOSTPROG_CXX=  1
 LIBISPRIVATE=  yes
 
 # For ../Makefile.inc and bsd.own.mk
@@ -43,8 +44,6 @@ HOST_CPPFLAGS+=       -DGENERATOR_FILE
 MKPIC:=                no
 MKPICLIB:=     no
 
-HOSTPROG_CXX=  1
-
 .include <bsd.lib.mk>
 
 # Force using C++ for this
diff -r 716950bed91c -r 19bd6fc3277d external/gpl3/gcc/usr.bin/common/Makefile
--- a/external/gpl3/gcc/usr.bin/common/Makefile Sun May 28 09:43:26 2023 +0000
+++ b/external/gpl3/gcc/usr.bin/common/Makefile Sun May 28 09:47:27 2023 +0000
@@ -1,5 +1,6 @@
-#      $NetBSD: Makefile,v 1.11 2021/09/18 01:47:08 christos Exp $
+#      $NetBSD: Makefile,v 1.11.2.1 2023/05/28 09:47:27 martin Exp $
 
+HOSTPROG_CXX=  1
 LIBISPRIVATE=  yes
 
 # For ../Makefile.inc and bsd.own.mk
@@ -21,8 +22,6 @@ CPPFLAGS+=    -I${GCCARCH} -I${BACKENDOBJ} 
 MKPIC:=                no
 MKPICLIB:=     no
 
-HOSTPROG_CXX=  1
-
 COPTS.diagnostic.c=    -Wno-stack-protector
 COPTS.intl.c=          -Wno-stack-protector
 
diff -r 716950bed91c -r 19bd6fc3277d external/gpl3/gcc/usr.bin/frontend/Makefile
--- a/external/gpl3/gcc/usr.bin/frontend/Makefile       Sun May 28 09:43:26 2023 +0000
+++ b/external/gpl3/gcc/usr.bin/frontend/Makefile       Sun May 28 09:47:27 2023 +0000
@@ -1,5 +1,6 @@
-#      $NetBSD: Makefile,v 1.14 2021/09/18 01:47:08 christos Exp $
+#      $NetBSD: Makefile,v 1.14.2.1 2023/05/28 09:47:27 martin Exp $
 
+HOSTPROG_CXX=  1
 LIBISPRIVATE=  yes
 
 # For ../Makefile.inc and bsd.own.mk
@@ -9,8 +10,6 @@ LIB=           frontend
 
 SRCS=          gcc.c version.c prefix.c
 
-HOSTPROG_CXX=  1
-
 .include "../Makefile.driver"
 .include "../Makefile.target-defines"
 
diff -r 716950bed91c -r 19bd6fc3277d external/gpl3/gcc/usr.bin/libcpp/Makefile
--- a/external/gpl3/gcc/usr.bin/libcpp/Makefile Sun May 28 09:43:26 2023 +0000
+++ b/external/gpl3/gcc/usr.bin/libcpp/Makefile Sun May 28 09:47:27 2023 +0000
@@ -1,5 +1,6 @@
-#      $NetBSD: Makefile,v 1.9 2021/09/18 01:47:08 christos Exp $
+#      $NetBSD: Makefile,v 1.9.2.1 2023/05/28 09:47:27 martin Exp $
 
+HOSTPROG_CXX=  1
 LIBISPRIVATE=  yes
 
 .include <bsd.init.mk>
@@ -13,8 +14,6 @@ CPPFLAGS+=    -I${.CURDIR} -I${.CURDIR}/arc
                ${G_INCLUDES:M-I*:N-I.*} \
                -DPREFIX=\"/usr\"
 
-HOSTPROG_CXX=  1
-
 .include <bsd.lib.mk>
 
 COPTS+=        -Wno-stack-protector
diff -r 716950bed91c -r 19bd6fc3277d external/gpl3/gcc/usr.bin/libdecnumber/Makefile
--- a/external/gpl3/gcc/usr.bin/libdecnumber/Makefile   Sun May 28 09:43:26 2023 +0000
+++ b/external/gpl3/gcc/usr.bin/libdecnumber/Makefile   Sun May 28 09:47:27 2023 +0000
@@ -1,8 +1,9 @@
-#      $NetBSD: Makefile,v 1.8 2021/09/18 01:47:09 christos Exp $
+#      $NetBSD: Makefile,v 1.8.2.1 2023/05/28 09:47:27 martin Exp $
 
 DIST=          ${GCCDIST}
 GNUHOSTDIST=   ${DIST}
 
+HOSTPROG_CXX=  1
 LIBISPRIVATE=   yes
 
 .include <bsd.init.mk>
@@ -17,8 +18,6 @@ CPPFLAGS+=    -I${DIST}/libgcc
 COPTS.decNumber.c=-O0
 .endif
 
-HOSTPROG_CXX=  1
-
 .include <bsd.lib.mk>
 
 # Force using C++ for this



Home | Main Index | Thread Index | Old Index