Module Name:    src
Committed By:   tls
Date:           Sun Aug 10 06:57:41 UTC 2014

Modified Files:
        src/tools/gcc [tls-earlyentropy]: Makefile README.mknative mknative-gcc
Added Files:
        src/tools/gcc [tls-earlyentropy]: gcc-version.mk

Log Message:
Rebase.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.66.2.1 src/tools/gcc/Makefile
cvs rdiff -u -r1.18 -r1.18.2.1 src/tools/gcc/README.mknative
cvs rdiff -u -r0 -r1.1.2.2 src/tools/gcc/gcc-version.mk
cvs rdiff -u -r1.78 -r1.78.2.1 src/tools/gcc/mknative-gcc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tools/gcc/Makefile
diff -u src/tools/gcc/Makefile:1.66 src/tools/gcc/Makefile:1.66.2.1
--- src/tools/gcc/Makefile:1.66	Thu Feb 27 20:15:53 2014
+++ src/tools/gcc/Makefile	Sun Aug 10 06:57:41 2014
@@ -1,15 +1,11 @@
-#	$NetBSD: Makefile,v 1.66 2014/02/27 20:15:53 mrg Exp $
+#	$NetBSD: Makefile,v 1.66.2.1 2014/08/10 06:57:41 tls Exp $
 
 .include <bsd.own.mk>
 
 GCC_LANGUAGES=c c++ objc
 MODULE=			gcc4
 
-.if ${HAVE_GCC} < 45
-GCCDIST=	${.CURDIR}/../../gnu/dist/gcc4
-.else
 GCCDIST=	${.CURDIR}/../../external/gpl3/${EXTERNAL_GCC_SUBDIR}/dist
-.endif
 GNUHOSTDIST=	${GCCDIST}
 
 .if ${HAVE_GCC} == 48
@@ -35,13 +31,16 @@ MULTILIB_ARGS= --disable-multilib
 SOFTFLOAT_ARGS=	-with-float=soft
 .endif
 
+.include "gcc-version.mk"
+
 COMMON_CONFIGURE_ARGS=	--target=${MACHINE_GNU_PLATFORM} \
 			--enable-long-long \
 			--enable-threads \
 			--with-bugurl=http://www.NetBSD.org/Misc/send-pr.html \
-			--with-pkgversion="NetBSD nb1 20120916" \
+			--with-pkgversion="NetBSD ${NETBSD_GCC_VERSION}" \
 			--with-system-zlib \
-			--enable-__cxa_atexit
+			--enable-__cxa_atexit \
+			--enable-libstdcxx-threads
 .if defined(GCC_CONFIG_ARCH.${MACHINE_ARCH})
 COMMON_CONFIGURE_ARGS+=	--with-arch=${GCC_CONFIG_ARCH.${MACHINE_ARCH}}
 .endif
@@ -50,14 +49,11 @@ COMMON_CONFIGURE_ARGS+=	--with-tune=${GC
 .endif
 
 CONFIGURE_ARGS=	${COMMON_CONFIGURE_ARGS}
-.if ${HAVE_GCC} >= 45
 CONFIGURE_ARGS+= \
 		--with-sysroot=${DESTDIR} \
 		--with-mpc=${TOOLDIR} \
 		--with-mpfr=${TOOLDIR} \
-		--with-gmp=${TOOLDIR}
-.endif
-CONFIGURE_ARGS+= \
+		--with-gmp=${TOOLDIR} \
 		--disable-nls \
 		${MULTILIB_ARGS} \
 		${SOFTFLOAT_ARGS} \
@@ -85,23 +81,21 @@ BUILD_MAKE=${TOOL_GMAKE}
 # mknative-gcc specific stuff
 #
 
-MKNATIVE_CONFIG_TARGET_LIBS= \
-	configure-target-libstdc++-v3 \
-	configure-target-libobjc
+MKNATIVE_CONFIG_TARGET_LIBS=
 
 .if ${HAVE_GCC} == 48
-MKNATIVE_CONFIG_TARGET_LIBS += configure-target-libgcc
+MKNATIVE_CONFIG_TARGET_LIBS+=	configure-target-libgcc
+MKNATIVE_CONFIG_TARGET_LIBS+=	configure-target-libgomp
 MKNATIVE_TARGET=	gcc48
-MKNATIVE_CONFIG_TARGET_LIBS+= \
-	configure-target-libgomp
 .elif ${HAVE_GCC} == 45
+MKNATIVE_CONFIG_TARGET_LIBS+=	configure-target-libgomp
 MKNATIVE_TARGET=	gcc45
-MKNATIVE_CONFIG_TARGET_LIBS+= \
-	configure-target-libgomp
-.else
-MKNATIVE_TARGET=	gcc4
 .endif
 
+MKNATIVE_CONFIG_TARGET_LIBS+= \
+	configure-target-libstdc++-v3 \
+	configure-target-libobjc
+
 BINENV=		/usr/bin/env -i
 
 
@@ -158,7 +152,6 @@ native-gcc: .native/.configure_done
 		${MACHINE_GNU_PLATFORM} ${DESTDIR} ${TOOLDIR}
 
 NATIVE_CONFIGURE_ARGS=	${COMMON_CONFIGURE_ARGS}
-.if ${HAVE_GCC} >= 45
 MPC=		${NETBSDSRCDIR}/external/lgpl3/mpc
 MPFR=		${NETBSDSRCDIR}/external/lgpl3/mpfr
 GMP=		${NETBSDSRCDIR}/external/lgpl3/gmp
@@ -176,13 +169,13 @@ NATIVE_CONFIGURE_ARGS+=	\
 			--with-mpfr-include=${MPFR}/dist/src \
 			--with-gmp-include=${GMP}/lib/libgmp/arch/${GMP_MACHINE_ARCH}
 
-.  if ${MACHINE_ARCH} != "vax"
+.if ${MACHINE_ARCH} != "vax"
 NATIVE_CONFIGURE_ARGS+= --enable-tls
-.  endif
-.  if !empty(MACHINE_ARCH:Mearm*)
+.endif
+.if !empty(MACHINE_ARCH:Mearm*)
 NATIVE_CONFIGURE_ARGS+=	--enable-initfini-array
-.  endif
 .endif
+
 NATIVE_CONFIGURE_ARGS+=	\
 			--disable-multilib \
 			--disable-symvers \

Index: src/tools/gcc/README.mknative
diff -u src/tools/gcc/README.mknative:1.18 src/tools/gcc/README.mknative:1.18.2.1
--- src/tools/gcc/README.mknative:1.18	Wed Feb 26 09:54:34 2014
+++ src/tools/gcc/README.mknative	Sun Aug 10 06:57:41 2014
@@ -1,4 +1,4 @@
-$NetBSD: README.mknative,v 1.18 2014/02/26 09:54:34 mrg Exp $
+$NetBSD: README.mknative,v 1.18.2.1 2014/08/10 06:57:41 tls Exp $
 
 This file describes how to bootstrap the native toolchain on a new NetBSD
 platform (and how to update the new toolchain files, if needed).  These
@@ -29,7 +29,7 @@ work.
    to build.sh. Use -M instead. (The differences are in layout and pathname
    prefixes in the object directory pointed to by each option.)
 
-3. In src/tools/gcc, do "nbmake-MACHINE HAVE_GCC=45 bootstrap-libgcc".
+3. In src/tools/gcc, do "nbmake-MACHINE HAVE_GCC=48 bootstrap-libgcc".
 
    This will create just enough glue in src/external/gpl3/gcc/lib/libgcc/arch
    to make it possible to build, based on the toolchain built in
@@ -39,28 +39,24 @@ work.
    will regenerate the "proper" libgcc config files.
 
 4. At top level, do
-   "nbmake-MACHINE obj do-distrib-dirs MKGCC=no MKBINUTILS=no HAVE_GCC=45", and
-   "nbmake-MACHINE includes HAVE_GCC= MKGCC=no MKBINUTILS=no HAVE_GCC=45".
-   (Note: replace 45 [for gcc 4.5.x] with the appropriate version you are
+   "nbmake-MACHINE obj do-distrib-dirs MKGCC=no MKBINUTILS=no HAVE_GCC=48", and
+   "nbmake-MACHINE includes HAVE_GCC= MKGCC=no MKBINUTILS=no HAVE_GCC=48".
+   (Note: replace 48 [for gcc 4.8.x] with the appropriate version you are
    going to mknative-for, the MKGCC=no prevents the standard makefiles from
    picking up any gcc version info automatically)
 
 5. In src/lib/csu, do
    "nbmake-MACHINE dependall". and "nbmake-MACHINE install".
 
-6. If the platform sets USE_COMPILERCRTSTUFF=yes, then in
-   src/external/gpl3/gcc/lib/crtstuff/ do
-   "nbmake-MACHINE obj dependall install"
-
-7. In src/external/gpl3/gcc/lib/libgcc, do
+6. In src/external/gpl3/gcc/lib/libgcc, do
    "nbmake-MACHINE obj includes dependall install".
 
-8. In each of src/external/lgpl3/gmp/lib/libgmp,
+7. In each of src/external/lgpl3/gmp/lib/libgmp,
    src/external/lgpl3/mpfr/lib/libmpfr, src/external/lgpl3/mpc/lib/libmpc
    do "nbmake-MACHINE obj dependall".
 
-9. In src/lib, do
-   "nbmake-MACHINE dependall install MKGCC=no HAVE_GCC=45".
+8. In src/lib, do
+   "nbmake-MACHINE dependall install MKGCC=no HAVE_GCC=48".
 
    Optionally, all of the following may be set in the environment to reduce
    the amount of code needed to build at this step.  Basically, it must be
@@ -74,7 +70,7 @@ work.
    MKSHARE=no
    MKRUMP=no
 
-10. In src/tools/gcc, do "nbmake-MACHINE native-gcc".
+9. In src/tools/gcc, do "nbmake-MACHINE native-gcc".
 
    This will do a full configury in ${.OBJDIR}/.native that is a "Canadian"
    cross toolchain (--build reflects the host platform, but --host and
@@ -82,7 +78,7 @@ work.
    native-to-NetBSD compiler on a cross host, and mknative pulls glue data
    from this.
 
-11. Try out a full build using "nbmake-MACHINE"; the result should include
+10. Try out a full build using "nbmake-MACHINE"; the result should include
    a native compiler.
 
-12. If all is well, commit the glue files added to src/gnu/{lib,usr.bin}/*.
+11. If all is well, commit the glue files added to src/gnu/{lib,usr.bin}/*.

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.78 src/tools/gcc/mknative-gcc:1.78.2.1
--- src/tools/gcc/mknative-gcc:1.78	Sun Mar  2 04:58:20 2014
+++ src/tools/gcc/mknative-gcc	Sun Aug 10 06:57:41 2014
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.78 2014/03/02 04:58:20 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.78.2.1 2014/08/10 06:57:41 tls Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -219,8 +219,6 @@ get_libstdcxx_v3 () {
 			<$_TMPDIR/$_PLATFORM/libstdc++-v3/include/$_PLATFORM/bits/$h
 	done
 
-	write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/config.h \
-		<$_TMPDIR/$_PLATFORM/libstdc++-v3/config.h
 	write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/gstdint.h \
 		<$_TMPDIR/$_PLATFORM/libstdc++-v3/include/gstdint.h
 

Added files:

Index: src/tools/gcc/gcc-version.mk
diff -u /dev/null src/tools/gcc/gcc-version.mk:1.1.2.2
--- /dev/null	Sun Aug 10 06:57:41 2014
+++ src/tools/gcc/gcc-version.mk	Sun Aug 10 06:57:41 2014
@@ -0,0 +1,5 @@
+#	$NetBSD: gcc-version.mk,v 1.1.2.2 2014/08/10 06:57:41 tls Exp $
+
+# common location for tools and native build
+
+NETBSD_GCC_VERSION=nb1 20140527

Reply via email to