From 9688a4384e7d15aeb272b0b7382965c4b015afca Mon Sep 17 00:00:00 2001 From: mrg Date: Tue, 15 Mar 2016 19:12:06 +0000 Subject: [PATCH] move the target defines into a makefile fragment and add the new GCC 5.3 defines necessary. remove "cp/" prefix from sources. --- external/gpl3/gcc/usr.bin/Makefile.target-defines | 8 ++++++++ external/gpl3/gcc/usr.bin/cpp/Makefile | 8 ++------ external/gpl3/gcc/usr.bin/frontend/Makefile | 11 +++++------ external/gpl3/gcc/usr.bin/g++/Makefile | 10 +++------- external/gpl3/gcc/usr.bin/gcc/Makefile | 8 ++------ 5 files changed, 20 insertions(+), 25 deletions(-) create mode 100644 external/gpl3/gcc/usr.bin/Makefile.target-defines diff --git a/external/gpl3/gcc/usr.bin/Makefile.target-defines b/external/gpl3/gcc/usr.bin/Makefile.target-defines new file mode 100644 index 000000000000..4aedffcab1e5 --- /dev/null +++ b/external/gpl3/gcc/usr.bin/Makefile.target-defines @@ -0,0 +1,8 @@ +# $NetBSD: Makefile.target-defines,v 1.1 2016/03/15 19:12:06 mrg Exp $ + +CPPFLAGS+= -I${BACKENDOBJ} +CPPFLAGS+= -DCONFIGURE_SPECS="\"\"" \ + -DDEFAULT_TARGET_VERSION=\"${G_version}\" \ + -DDEFAULT_TARGET_MACHINE=\"${MACHINE_GNU_PLATFORM}\" \ + -DDEFAULT_REAL_TARGET_MACHINE=\"${MACHINE_GNU_PLATFORM}\" \ + -DACCEL_DIR_SUFFIX=\"\" diff --git a/external/gpl3/gcc/usr.bin/cpp/Makefile b/external/gpl3/gcc/usr.bin/cpp/Makefile index 4ba21160b36a..8c39bb5cedec 100644 --- a/external/gpl3/gcc/usr.bin/cpp/Makefile +++ b/external/gpl3/gcc/usr.bin/cpp/Makefile @@ -1,13 +1,9 @@ -# $NetBSD: Makefile,v 1.8 2014/05/31 22:55:17 mrg Exp $ +# $NetBSD: Makefile,v 1.9 2016/03/15 19:12:06 mrg Exp $ PROG= cpp SRCS= cppspec.c ${G_GCC_OBJS:.o=.c} -CPPFLAGS+= -I${BACKENDOBJ} -# XXX -CPPFLAGS+= -DCONFIGURE_SPECS="\"\"" \ - -DDEFAULT_TARGET_VERSION=\"${G_version}\" \ - -DDEFAULT_TARGET_MACHINE=\"${MACHINE_GNU_PLATFORM}\" +.include "../Makefile.target-defines" COPTS+= -Wno-stack-protector diff --git a/external/gpl3/gcc/usr.bin/frontend/Makefile b/external/gpl3/gcc/usr.bin/frontend/Makefile index 48e6e8440e98..a2489ee10f62 100644 --- a/external/gpl3/gcc/usr.bin/frontend/Makefile +++ b/external/gpl3/gcc/usr.bin/frontend/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 2015/01/07 02:05:41 christos Exp $ +# $NetBSD: Makefile,v 1.10 2016/03/15 19:12:06 mrg Exp $ LIBISPRIVATE= yes @@ -21,12 +21,11 @@ SRCS+= driver-rs6000.c .PATH: ${DIST}/gcc/config/rs6000 .endif -CPPFLAGS+= -I${GCCARCH} -I${BACKENDOBJ} -I. \ +.include "../Makefile.target-defines" + +CPPFLAGS+= -I${GCCARCH} -I. \ ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} \ - -DPREFIX=\"/usr\" \ - -DDEFAULT_TARGET_VERSION=\"${G_version}\" \ - -DDEFAULT_TARGET_MACHINE=\"${MACHINE_GNU_PLATFORM}\" \ - -DCONFIGURE_SPECS="\"\"" + -DPREFIX=\"/usr\" HOST_CPPFLAGS+= -I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} DPSRCS+= specs.h diff --git a/external/gpl3/gcc/usr.bin/g++/Makefile b/external/gpl3/gcc/usr.bin/g++/Makefile index c86ac212c3cf..87a6afd0b5b6 100644 --- a/external/gpl3/gcc/usr.bin/g++/Makefile +++ b/external/gpl3/gcc/usr.bin/g++/Makefile @@ -1,17 +1,13 @@ -# $NetBSD: Makefile,v 1.5 2014/05/31 22:55:17 mrg Exp $ +# $NetBSD: Makefile,v 1.6 2016/03/15 19:12:06 mrg Exp $ PROG= gplusplus PROGNAME= g++ -SRCS= ${G_GXX_OBJS:.o=.c} +SRCS= ${G_GXX_OBJS:S/cp\///:.o=.c} NOMAN= # Linked to gcc.1 .include -CPPFLAGS+= -I${BACKENDOBJ} -# XXX -CPPFLAGS+= -DCONFIGURE_SPECS="\"\"" \ - -DDEFAULT_TARGET_VERSION=\"${G_version}\" \ - -DDEFAULT_TARGET_MACHINE=\"${MACHINE_GNU_PLATFORM}\" +.include "../Makefile.target-defines" LINKS+= ${BINDIR}/g++ ${BINDIR}/c++ diff --git a/external/gpl3/gcc/usr.bin/gcc/Makefile b/external/gpl3/gcc/usr.bin/gcc/Makefile index b7f54b6b000b..b88d5a880d50 100644 --- a/external/gpl3/gcc/usr.bin/gcc/Makefile +++ b/external/gpl3/gcc/usr.bin/gcc/Makefile @@ -1,13 +1,9 @@ -# $NetBSD: Makefile,v 1.6 2015/04/17 12:41:46 martin Exp $ +# $NetBSD: Makefile,v 1.7 2016/03/15 19:12:06 mrg Exp $ PROG= gcc SRCS= gccspec.c ${G_GCC_OBJS:.o=.c} -CPPFLAGS+= -I${BACKENDOBJ} -# XXX -CPPFLAGS+= -DCONFIGURE_SPECS="\"\"" \ - -DDEFAULT_TARGET_VERSION=\"${G_version}\" \ - -DDEFAULT_TARGET_MACHINE=\"${MACHINE_GNU_PLATFORM}\" +.include "../Makefile.target-defines" COPTS.builtins.c = -Wno-stack-protector