Bring in a patch from the base system gcc3 and adapt example gcc3.mk file

accordingly.

  From: matthew green <mrg@netbsd.org>
  To: source-changes@NetBSD.org
  Subject: CVS commit: src/gnu/dist/gcc/gcc
  Message-Id: <20030725175744.B6FC4B004@cvs.netbsd.org>

  Module Name:    src
  Committed By:   mrg
  Date:           Fri Jul 25 17:57:44 UTC 2003

  Modified Files:
          src/gnu/dist/gcc/gcc: cppspec.c
          src/gnu/dist/gcc/gcc/config: netbsd.h

  Log Message:
  make `cpp -gcc' the default on NetBSD.


  To generate a diff of this commit:
  cvs rdiff -r1.1.1.1 -r1.2 src/gnu/dist/gcc/gcc/cppspec.c
  cvs rdiff -r1.1.1.1 -r1.2 src/gnu/dist/gcc/gcc/config/netbsd.h
This commit is contained in:
martin 2003-07-26 17:37:04 +00:00
parent 7ef7eff1bd
commit 361afca03b
4 changed files with 36 additions and 3 deletions

View file

@ -1,7 +1,9 @@
$NetBSD: distinfo,v 1.11 2003/07/08 16:30:45 abs Exp $
$NetBSD: distinfo,v 1.12 2003/07/26 17:37:04 martin Exp $
SHA1 (gcc-3.3.tar.bz2) = 18e23822c6dc9cb462e0ff88bc1b8a20c53da60a
Size (gcc-3.3.tar.bz2) = 23447616 bytes
SHA1 (patch-aa) = 9037d2504c5db6458494a18852d57c1ef5c9dcdb
SHA1 (patch-ab) = 8e899db69149894e737e1f68372f3eef9c403635
SHA1 (patch-ae) = e5dd184ca1b0c415215e82d0250469792a432741
SHA1 (patch-af) = ee41c43dbb6e710a9399954793c6ff7c4274e515
SHA1 (patch-ag) = 23fecd85ddca19a2c543827b60ea555ffbdcaa6c

View file

@ -1,9 +1,9 @@
# $NetBSD: gcc3.mk,v 1.10 2003/07/17 09:07:55 abs Exp $
# $NetBSD: gcc3.mk,v 1.11 2003/07/26 17:37:06 martin Exp $
#
# make configuration file for @DISTNAME@
CC= @GCC_PREFIX@/bin/gcc
CPP= @GCC_PREFIX@/bin/cpp -gcc
CPP= @GCC_PREFIX@/bin/cpp
CXX= @GCC_PREFIX@/bin/g++
F77= @GCC_PREFIX@/bin/g77
PKG_FC= @GCC_PREFIX@/bin/g77

View file

@ -0,0 +1,18 @@
$NetBSD: patch-af,v 1.1 2003/07/26 17:37:07 martin Exp $
--- gcc/cppspec.c Wed Jul 23 02:40:54 2003
+++ gcc/cppspec.c Fri Jul 25 17:57:41 2003
@@ -85,6 +85,13 @@
is_cpp_driver = 1;
+ /* NetBSD uses __GNUC__ and friends in header files processed with cpp
+ regularly. Default to old behaviour here. XXX - move me to
+ config/netbsd.h "DEFAULT_CPP_NEED_NO_GCC". */
+#ifdef DEFAULT_CPP_NEED_NO_GCC
+ need_no_gcc = DEFAULT_CPP_NEED_NO_GCC;
+#endif
+
/* First pass. If we see an -S or -c, barf. If we see an input file,
turn off read_stdin. If we see a second input file, it is actually
the output file. If we see a third input file, barf. */

View file

@ -0,0 +1,13 @@
$NetBSD: patch-ag,v 1.1 2003/07/26 17:37:08 martin Exp $
Index: gcc/config/netbsd.h
--- gcc/config/netbsd.h Wed Jul 23 02:41:37 2003
+++ gcc/config/netbsd.h Fri Jul 25 17:57:43 2003
@@ -234,3 +234,7 @@
/* 7 == PROT_READ | PROT_WRITE | PROT_EXEC */ \
(void) mprotect (page, end - page, 7); \
}
+
+/* NetBSD depends on "cpp" having GNUC semantics, and must default as if
+ "cpp -gcc" was called. */
+#define DEFAULT_CPP_NEED_NO_GCC 0