Article View: gnu.gcc.help
Article #53086Re: [MIPS] header file search-list problem
From: Nobuyuki Hikichi
Date: Sun, 15 Mar 1992 09:16
Date: Sun, 15 Mar 1992 09:16
349 lines
12244 bytes
12244 bytes
In article <CCHWITZ.92Mar13170241@kocb.kocb.astem.or.jp>, cchwitz@kocb writes:
>I have built gcc2.0 on our magnum 3000 running RISC/OS 4.52, and came
>across a problem building libg++2.0, that the original system header files
>are searched before the GNU header files. This seems to be happening due
>to the following CPP_SPEC definition in config/mips-sysv.h:
> %{!nostdinc: %{!ZBSD43: -I/sysv/usr/include} \
> %{ZBSD43: -I/bsd43/usr/include}} \
>Is this the right behavior?
>Do I always have to type like
> gcc -nostdinc -I/usr/local/GNU/gcc/magnum/include -I/usr/include ...
>?
>Also, the size_t definition conflicts, but is it all right?
Please try to my changes as following;
If you have any problem, please tell me.
Name: Nobuyuki Hikichi <hikichi@sra.co.jp>
Office: Software Research Associates, Inc. Japan.
ChangeLog
Sun Mar 15 18:02:51 1992 Gnu is not Unix (hikichi@sra.co.jp)
* config/mips.md: typo fixed for using branch likely.
* config/mips.h: fix for passing the assembler to mips 2 instruction
set flag.
* config/mips.c:
mips-tfile.c:
final.c:
use new cpp symbol, NO_STAB. It is for os of with mips
arch. and no bsd stab format.
* configure: new entry riscos4bsd for BSD type in RISC os verison 4.
config/mips-bsd.h:
xm-mips-bsd.h: bsd43 type in MIPS RISC os.
* collect2.c: [MIPS/USG] fix for undefine symbol.
1. patch the my changes.
2. configure riscos4bsd
3. make gcc 2.0
For eliminating size_t conflict,
4. $ cd /usr/local/lib/gcc/*/2.0/include
5. $ mkdir sys ; cd sys; cp /bsd43/usr/include/sys/types.h .
6. patch this file;
$ diff types.h /bsd43/usr/include/sys
85d84
< #ifndef _SIZE_T
88,89d86
< #define _SIZE_T
< #endif
7. $ cd .. ; mkdir -p bsd43/sys ; cd bsd43/sys
8. $ cp /bsd43/usr/include/bsd43/sys/types.h .
9. patch this file also;
85d84
< #ifndef _SIZE_T
88,89d86
< #define _SIZE_T
< #endif
#!/bin/sh
# This is a shell archive (produced by shar 3.49)
# To extract the files from this archive, save it to a file, remove
# everything above the "!/bin/sh" line above, and type "sh file_name".
#
# made 03/15/1992 09:01 UTC by gnu@srarc2
# Source directory /tmp
#
# existing files will NOT be overwritten unless -c is specified
#
# This shar contains:
# length mode name
# ------ ---------- ------------------------------------------
# 8215 -rw-rw-rw- riscos.diff
#
# ============= riscos.diff ==============
if test -f 'riscos.diff' -a X"$1" != X"-c"; then
echo 'x - skipping riscos.diff (File already exists)'
else
echo 'x - extracting riscos.diff (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'riscos.diff' &&
diff -rNc3 gcc-2.0.org/collect2.c gcc-2.0/collect2.c
*** gcc-2.0.org/collect2.c Fri Feb 21 15:33:59 1992
--- gcc-2.0/collect2.c Mon Feb 24 15:37:38 1992
***************
*** 77,82 ****
--- 77,87 ----
X #endif
X
X #ifdef USG
+ #ifndef R_OK
+ #define R_OK 4
+ #define W_OK 2
+ #define X_OK 1
+ #endif
X #define vfork fork
X #endif
X
diff -rNc3 gcc-2.0.org/config/mips-bsd.h gcc-2.0/config/mips-bsd.h
*** gcc-2.0.org/config/mips-bsd.h Thu Feb 13 00:42:52 1992
--- gcc-2.0/config/mips-bsd.h Thu Mar 12 22:33:19 1992
***************
*** 21,26 ****
--- 21,27 ----
X
X #define CPP_PREDEFINES "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000"
X
+ #if 0
X #define CPP_SPEC "\
X %{!ansi: %{!ZSYSV: -DSYSTYPE_BSD43} \
X %{ZSYSV: -DSYSTYPE_SYSV}} \
***************
*** 34,39 ****
--- 35,55 ----
X %{.m: -D__LANGUAGE_OBJECTIVE_C -D_LANGUAGE_OBJECTIVE_C} \
X %{.S: -D__LANGUAGE_ASSEMBLY -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
X %{!.S: -D__LANGUAGE_C -D_LANGUAGE_C %{!ansi:-DLANGUAGE_C}}"
+ #endif
+
+ #define CPP_SPEC "\
+ %{!ansi: %{!ZSYSV: -DSYSTYPE_BSD43} \
+ %{ZSYSV: -DSYSTYPE_SYSV}} \
+ %{!ZSYSV: -D__SYSTYPE_BSD43__} \
+ %{ZSYSV: -D__SYSTYPE_SYSV__} \
+ %{.cc: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \
+ %{.cxx: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \
+ %{.C: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \
+ %{.m: -D__LANGUAGE_OBJECTIVE_C -D_LANGUAGE_OBJECTIVE_C} \
+ %{.S: -D__LANGUAGE_ASSEMBLY -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
+ %{!.S: -D__LANGUAGE_C -D_LANGUAGE_C %{!ansi:-DLANGUAGE_C}}"
+
+ #define SYSTEM_INCLUDE_DIR "/bsd43/usr/include"
X
X #define LINK_SPEC "\
X %{G*} \
diff -rNc3 gcc-2.0.org/config/mips.c gcc-2.0/config/mips.c
*** gcc-2.0.org/config/mips.c Sat Feb 22 07:00:37 1992
--- gcc-2.0/config/mips.c Thu Mar 12 17:40:10 1992
***************
*** 50,56 ****
X #define X_OK 1
X #endif
X
! #ifdef USG
X #include "gstab.h" /* If doing DBX on sysV, use our own stab.h. */
X #else
X #include <stab.h> /* On BSD, use the system's stab.h. */
--- 50,56 ----
X #define X_OK 1
X #endif
X
! #if defined(USG) || defined(NO_STAB)
X #include "gstab.h" /* If doing DBX on sysV, use our own stab.h. */
X #else
X #include <stab.h> /* On BSD, use the system's stab.h. */
diff -rNc3 gcc-2.0.org/config/mips.h gcc-2.0/config/mips.h
*** gcc-2.0.org/config/mips.h Sat Feb 22 07:01:10 1992
--- gcc-2.0/config/mips.h Wed Mar 4 11:08:48 1992
***************
*** 313,318 ****
--- 313,319 ----
X %{EB} %{!EB:-EB} \
X %{EL: %e-EL not supported} \
X %{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3} \
+ %{mips2:-mips2} \
X %{g} %{g0} %{g1} %{g2} %{g3} %{v} %{K}} \
X %{G*}"
X
diff -rNc3 gcc-2.0.org/config/mips.md gcc-2.0/config/mips.md
*** gcc-2.0.org/config/mips.md Tue Feb 11 12:23:30 1992
--- gcc-2.0/config/mips.md Wed Mar 4 13:22:17 1992
***************
*** 103,109 ****
X (define_delay (eq_attr "type" "branch")
X [(and (eq_attr "dslot" "no") (eq_attr "length" "1"))
X (nil)
! (eq_attr "branch_likely" "yes")])
X
X (define_delay (eq_attr "type" "call,jump")
X [(and (eq_attr "dslot" "no") (eq_attr "length" "1"))
--- 103,109 ----
X (define_delay (eq_attr "type" "branch")
X [(and (eq_attr "dslot" "no") (eq_attr "length" "1"))
X (nil)
! (and (eq_attr "branch_likely" "yes") (eq_attr "length" "1"))])
X
X (define_delay (eq_attr "type" "call,jump")
X [(and (eq_attr "dslot" "no") (eq_attr "length" "1"))
diff -rNc3 gcc-2.0.org/config/x-riscos4bsd gcc-2.0/config/x-riscos4bsd
*** gcc-2.0.org/config/x-riscos4bsd
--- gcc-2.0/config/x-riscos4bsd Thu Mar 12 17:21:44 1992
***************
*** 0 ****
--- 1,19 ----
+ # Define CC and OLDCC as the same, so that the tests:
+ # if [ x"$(OLDCC)" = x"$(CC)" ] ...
+ #
+ # will succeed (if OLDCC != CC, it is assumed that GCC is
+ # being used in secondary stage builds). We need to pass
+ # the -Wf,-XNg1500 option so the compiler can compile the
+ # G++ file cp-parse.c. Otherwise it complains about
+ # too many case statements. Down with fixed size tables!
+
+ CC = $(OLDCC)
+ # compile with system V type instead of bsd43 if bsd43 type's cc will
+ # be invoked.
+ OLDCC = cc -systype bsd43 -Wf,-XNg1500
+
+ X_CFLAGS = -O1
+
+ # The bison output files are machine-indep,
+ # so different flags for a particular machine are not useful.
+ #BISONFLAGS = -l
diff -rNc3 gcc-2.0.org/config/xm-mips-bsd.h gcc-2.0/config/xm-mips-bsd.h
*** gcc-2.0.org/config/xm-mips-bsd.h
--- gcc-2.0/config/xm-mips-bsd.h Fri Mar 13 15:46:09 1992
***************
*** 0 ****
--- 1,30 ----
+ /* Configuration for GNU C-compiler for RISC/OS BSD type operating system
+ Copyright (C) 1989, 1990, 1991 Free Software Foundation, Inc.
+
+ This file is part of GNU CC.
+
+ GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GNU CC; see the file COPYING. If not, write to
+ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+ /*
+ * Notes for compiling gcc on mips risc os
+ * - change the -g in the CFLAGS to a -g3 or take it out all together.
+ * - do not define DBX_DEBUGGING_INFO in tm.h, it doesn't exist (unless
+ * you get one from a bsd system)
+ */
+
+ #define NO_STAB
+ #define NM_FLAGS "-Bp"
+
+ #include "xm-mips.h"
diff -rNc3 gcc-2.0.org/configure gcc-2.0/configure
*** gcc-2.0.org/configure Sun Feb 16 18:13:10 1992
--- gcc-2.0/configure Sun Mar 15 17:42:24 1992
***************
*** 539,544 ****
--- 539,554 ----
X tm_file=mips-sysv.h
X xm_file=xm-umips.h
X ;;
+ mips-mips-riscos4bsd)
+ xmake_file=x-riscos4bsd
+ tm_file=mips-bsd.h
+ xm_file=xm-mips-bsd.h
+ ;;
+ mips-mips-riscos4sysv)
+ xmake_file=x-riscos4
+ tm_file=mips-sysv.h
+ xm_file=xm-umips.h
+ ;;
X mips-mips-*) # Default MIPS environment.
X tm_file=mips.h
X ;;
diff -rNc3 gcc-2.0.org/dbxout.c gcc-2.0/dbxout.c
*** gcc-2.0.org/dbxout.c Fri Feb 21 16:06:52 1992
--- gcc-2.0/dbxout.c Thu Mar 12 17:39:28 1992
***************
*** 128,134 ****
X #define FORCE_TEXT
X #endif
X
! #if defined (USG) || defined (MIPS)
X #include "gstab.h" /* If doing DBX on sysV, use our own stab.h. */
X #else
X #include <stab.h> /* On BSD, use the system's stab.h. */
--- 128,134 ----
X #define FORCE_TEXT
X #endif
X
! #if defined (USG) || defined (NO_STAB)
X #include "gstab.h" /* If doing DBX on sysV, use our own stab.h. */
X #else
X #include <stab.h> /* On BSD, use the system's stab.h. */
diff -rNc3 gcc-2.0.org/final.c gcc-2.0/final.c
*** gcc-2.0.org/final.c Sun Feb 9 08:20:40 1992
--- gcc-2.0/final.c Thu Mar 12 17:39:36 1992
***************
*** 64,70 ****
X
X /* Get N_SLINE and N_SOL from stab.h if we can expect the file to exist. */
X #ifdef DBX_DEBUGGING_INFO
! #ifdef USG
X #include "gstab.h" /* If doing DBX on sysV, use our own stab.h. */
X #else
X #include <stab.h> /* On BSD, use the system's stab.h. */
--- 64,70 ----
X
X /* Get N_SLINE and N_SOL from stab.h if we can expect the file to exist. */
X #ifdef DBX_DEBUGGING_INFO
! #if defined(USG) || defined(NO_STAB)
X #include "gstab.h" /* If doing DBX on sysV, use our own stab.h. */
X #else
X #include <stab.h> /* On BSD, use the system's stab.h. */
diff -rNc3 gcc-2.0.org/mips-tfile.c gcc-2.0/mips-tfile.c
*** gcc-2.0.org/mips-tfile.c Tue Jan 14 01:23:40 1992
--- gcc-2.0/mips-tfile.c Thu Mar 12 17:40:50 1992
***************
*** 684,690 ****
X #include <signal.h>
X #include <sys/stat.h>
X
! #ifdef USG
X #include "gstab.h" /* If doing DBX on sysV, use our own stab.h. */
X #else
X #include <stab.h> /* On BSD, use the system's stab.h. */
--- 684,690 ----
X #include <signal.h>
X #include <sys/stat.h>
X
! #if defined(USG) || defined(NO_STAB)
X #include "gstab.h" /* If doing DBX on sysV, use our own stab.h. */
X #else
X #include <stab.h> /* On BSD, use the system's stab.h. */
SHAR_EOF
chmod 0666 riscos.diff ||
echo 'restore of riscos.diff failed'
Wc_c="`wc -c < 'riscos.diff'`"
test 8215 -eq "$Wc_c" ||
echo 'riscos.diff: original size 8215, current size' "$Wc_c"
fi
exit 0
Technical Details
Message-ID:
<1992Mar15.091618.25676@sra.co.jp>Path:
arc1-ca.pugleaf.net!sparky!uunet!think.com!mips!panasonic.com!chorus.mei!icspub!astemgw!sh.wide!wnoc-tyo-news!sranha!sranhd!sran230!newsReferences:
<CCHWITZ.92Mar13170241@kocb.kocb.astem.or.jp>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,aff9a64fc6857308 X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1992-03-15 02:30:55 PST Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!mips!panasonic.com!chorus.mei!icspub!astemgw!sh.wide!wnoc-tyo-news!sranha!sranhd!sran230!news From: hikichi@sra.co.jp (Nobuyuki Hikichi) Newsgroups: gnu.gcc.help Subject: Re: [MIPS] header file search-list problem Message-ID: <1992Mar15.091618.25676@sra.co.jp> Date: 15 Mar 92 09:16:18 GMT References: <CCHWITZ.92Mar13170241@kocb.kocb.astem.or.jp> Sender: news@sra.co.jp (News System) Reply-To: hikichi@sra.co.jp (Nobuyuki Hikichi) Distribution: gnu Organization: Software Research Associates, Inc. Lines: 349 In-Reply-To: cchwitz@kocb.astem.or.jp