Source-Changes-HG archive

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

[src/trunk]: src/share/mk define EXTERNAL_GCC_SUBDIR based upon HAVE_GCC, for...



details:   https://anonhg.NetBSD.org/src/rev/dfc4589240dd
branches:  trunk
changeset: 327050:dfc4589240dd
user:      mrg <mrg%NetBSD.org@localhost>
date:      Wed Feb 26 02:51:02 2014 +0000

description:
define EXTERNAL_GCC_SUBDIR based upon HAVE_GCC, for GCC >= 4.5,
and use it in the one place (bsd.lib.mk) it's used in share/mk.

diffstat:

 share/mk/bsd.lib.mk |   4 ++--
 share/mk/bsd.own.mk |  14 +++++++++++++-
 2 files changed, 15 insertions(+), 3 deletions(-)

diffs (46 lines):

diff -r 739686c57d22 -r dfc4589240dd share/mk/bsd.lib.mk
--- a/share/mk/bsd.lib.mk       Wed Feb 26 02:39:29 2014 +0000
+++ b/share/mk/bsd.lib.mk       Wed Feb 26 02:51:02 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.lib.mk,v 1.345 2014/01/14 11:31:01 apb Exp $
+#      $NetBSD: bsd.lib.mk,v 1.346 2014/02/26 02:51:02 mrg Exp $
 #      @(#)bsd.lib.mk  8.3 (Berkeley) 4/22/94
 
 .include <bsd.init.mk>
@@ -602,7 +602,7 @@
 . elif defined(HAVE_GCC) && ${HAVE_GCC} == 4
 LIBDPLIBS+=     stdc++ ${.CURDIR}/../../../../../gnu/lib/libstdc++-v3_4
 . else
-LIBDPLIBS+=     stdc++ ${.CURDIR}/../../../../../external/gpl3/gcc/lib/libstdc++-v3
+LIBDPLIBS+=     stdc++ ${.CURDIR}/../../../../../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libstdc++-v3
 . endif
 .else
 LIBCC:=        ${CC}
diff -r 739686c57d22 -r dfc4589240dd share/mk/bsd.own.mk
--- a/share/mk/bsd.own.mk       Wed Feb 26 02:39:29 2014 +0000
+++ b/share/mk/bsd.own.mk       Wed Feb 26 02:51:02 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.own.mk,v 1.767 2014/02/24 07:23:41 skrll Exp $
+#      $NetBSD: bsd.own.mk,v 1.768 2014/02/26 02:51:02 mrg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -58,6 +58,18 @@
 .endif
 .endif
 
+#
+# We import the old gcc as "gcc.old" when upgrading.  EXTERNAL_GCC_SUBDIR is
+# set to the relevant subdirectory in src/external/gpl3 for his HAVE_GCC.
+#
+.if ${HAVE_GCC} == 45
+EXTERNAL_GCC_SUBDIR=   gcc.old
+EXTERNAL_GCC_SUBDIR=   gcc
+.elif ${HAVE_GCC} == 48
+EXTERNAL_GCC_SUBDIR=   gcc
+.else
+EXTERNAL_GCC_SUBDIR=   /does/not/exist
+.endif
 
 .if ${MACHINE_ARCH} == "ia64"
 USE_COMPILERCRTSTUFF?= yes



Home | Main Index | Thread Index | Old Index