Article View: gnu.gcc.help
Article #53174Patch file for GCC2.0 under SCO UNIX 3.2.2
From: Linas Petras
Date: Sun, 01 Mar 1992 13:11
Date: Sun, 01 Mar 1992 13:11
287 lines
9828 bytes
9828 bytes
The following patch file can be used to compile up a version of GCC-2.0 CC
running under SCO UNIX 3.2.2. I have not tried to compile C++ or OBJ-C
Linas Petras (linas@hparc0.aus.hp.com)
#include <standard.disclaimer>
These are my comments and not those of my employer......
-----------------------Beginning of Patch-----------------------------------
diff -rc2N gcc-2.0/INSTALL gcc-2.0.sco/INSTALL
*** gcc-2.0/INSTALL Sun Feb 16 18:44:25 1992
--- gcc-2.0.sco/INSTALL Sun Mar 1 22:20:03 1992
***************
*** 531,559 ****
! Installing GNU CC on SCO System V 3.2
! =====================================
! The compiler that comes with this system does not work properly with
! `-O'. Therefore, you should redefine the Make variable `CCLIBFLAGS'
! not to use `-O'.
! In addition, the compiler produces incorrect output when compiling
! parts of GNU CC; the resulting executable `cc1' does not work properly
! when it is used with `-O'.
! Therefore, what you must do after building the first stage is use
! GNU CC to compile itself without optimization. Here is how:
! make -k cc1 CC="./gcc -B./"
! You can think of this as "stage 1.1" of the installation process.
! However, using this command has the effect of discarding the faulty
! stage 1 executable for `cc1' and replacing it with stage 1.1. You can
! then proceed with `make stage1' and the rest of installation.
! On Xenix, the same thing is necessary; in addition, you may have to
! remove `-g' from the options used with `cc', and you may have to
! simplify complicated statements in the sources of GNU CC to get them
! to compile.
--- 531,553 ----
! Installing GNU CC on SCO System V 3.2.2
! ========================================
! 1. This info applies to the C-compiler only and not C++ or OBJ-C. At least you
! are a fair way along the path if you can get the C-compiler built. Use the
! following line to configure under SCO:
! ./configure sco
! 2. You will need to fix the '/usr/include/sys/signal.h' file. The problem
! line is the .ident clause on line 6. Just comment it out.
! 3. Then to create the initial c-compiler using rcc (NOTE: This generates a
! lot of warning messages but their is nothing in the warnings that stops
! the generated compiler working) do:
! make LANGUAGES=c 2>&1 | tee mklog
! 4. You can now proceed with `make stage1' and the rest of installation.
diff -rc2N gcc-2.0/Makefile.in gcc-2.0.sco/Makefile.in
*** gcc-2.0/Makefile.in Sat Feb 22 18:12:34 1992
--- gcc-2.0.sco/Makefile.in Sun Mar 1 18:03:03 1992
***************
*** 42,47 ****
# XCFLAGS is used for most compilations but not when using the GCC just built.
XCFLAGS =
! CFLAGS = -g
! BOOT_CFLAGS = -O $(CFLAGS)
# These exists to be overridden by the x-* and t-* files, respectively.
X_CFLAGS =
--- 42,47 ----
# XCFLAGS is used for most compilations but not when using the GCC just built.
XCFLAGS =
! CFLAGS =
! BOOT_CFLAGS = $(CFLAGS)
# These exists to be overridden by the x-* and t-* files, respectively.
X_CFLAGS =
***************
*** 83,87 ****
# CFLAGS for use with OLDCC, for compiling libgcc1.a.
# NOTE: -O does not work on some Unix systems!
! CCLIBFLAGS = -O
# Version of ar to use when compiling libgcc1.a.
--- 83,87 ----
# CFLAGS for use with OLDCC, for compiling libgcc1.a.
# NOTE: -O does not work on some Unix systems!
! CCLIBFLAGS =
# Version of ar to use when compiling libgcc1.a.
***************
*** 535,539 ****
do \
echo $${name}; \
! $(GCC_FOR_TARGET) -fstrength-reduce -O $(INCLUDES) \
$(LIBGCC2_CFLAGS) -c -DL$${name} \
$(srcdir)/libgcc2.c -o $${name}.o; \
--- 535,539 ----
do \
echo $${name}; \
! $(GCC_FOR_TARGET) -fstrength-reduce $(INCLUDES) \
$(LIBGCC2_CFLAGS) -c -DL$${name} \
$(srcdir)/libgcc2.c -o $${name}.o; \
***************
*** 557,561 ****
if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
else true; fi; \
! $(GCC_FOR_TARGET) -fstrength-reduce -O $(INCLUDES) \
$(LIBGCC2_CFLAGS) -c $${file}; \
if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
--- 557,561 ----
if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
else true; fi; \
! $(GCC_FOR_TARGET) -fstrength-reduce $(INCLUDES) \
$(LIBGCC2_CFLAGS) -c $${file}; \
if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
***************
*** 1118,1121 ****
--- 1118,1122 ----
-rm -f collect collect2 ld mips-tfile mips-tdump
-rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg
+
# delete all files made by compilation.
diff -rc2N gcc-2.0/README.SCO gcc-2.0.sco/README.SCO
*** gcc-2.0/README.SCO Thu Jan 16 13:59:23 1992
--- gcc-2.0.sco/README.SCO Sun Mar 1 16:18:04 1992
***************
*** 1,64 ****
- ========= Checklist from of Ari Kautonen (akk@tut.fi) ======================
- Part 1. Compiling Gnu C in SCO Unix System V 3.2
! 1. Rename stamp_extract.c to stamp-ext.c
- 2. Change all occurrences of stamp-extract to stamp-ext in Makefile
! 3. Remove all -g and -O options from the Makefile including the ones
! in libgcc1 and libgcc2 compiling rules.
- (4. If needed use 'yacc' instead of 'bison' in BISON from Makefile.)
-
- 5. Change all statements using 'ranlib' to use 'ar ts' insteadt.
- Example:
- Old: if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ; then ranlib libgcc.a ;fi
- New: ar ts libgcc.a
-
- 6. Do not use libPW -library but use alloca.c from Gnu Emacs distribution.
- Uncomment 'ALLOCA = alloca.o' and make the following change to Makefile:
- Replace:
- alloca.o: alloca.c
- $(CC) $(CFLAGS) -S `echo $(srcdir)/alloca.c | sed 's,^\./,,'`
- as alloca.s -o alloca.o
- With:
- alloca.o: alloca.c
- $(CC) $(CFLAGS) -c $(srcdir)/alloca.c
-
- 7. Run: config.gcc i386-sysv
-
- 8. Run: make cpp
-
- 9. Rename explow.c, reload.c and recog.c to end with .gnu.
-
- 10. In csh, run the following:
- foreach i (explow reload recog)
- ./cpp -P -I. -I./config <$i.gnu >$i.c
- end
-
- 11. Run: make
-
- This should produce a cc-compiled gcc, that is neither optimized nor
- capable of optimization.
-
- 12. Run: make stage1
-
- 13. Comment out the statement 'ALLOCA = alloca.o' from Makefile
-
- 14. Rename files that end with .gnu to end with .c
-
- 15. Run: make CC=stage1/gcc CFLAGS="-Bstage1/"
-
- This should produce an unoptimized gcc capable of optimization.
-
- 16. Run: make stage1
-
- 17. Run: make CC=stage1/gcc CFLAGS="-O -g -Bstage1/"
-
- This should produce an optimized gcc capable of producing optimized and
- debuggable code.
-
- 18. Change installation options in Makefile and run 'make install'
-
- That's it! (I hope ;-))
--- 1,8 ----
! The comments in this file from Ari Kautomen (akk@tut.fi) are no longer valid
! for GCC-2.0 (or above). Check the comments in the file INSTALL under SCO
! Linas Petras (linas@hparc0.aus.hp.com)
diff -rc2N gcc-2.0/config/i386sco.h gcc-2.0.sco/config/i386sco.h
*** gcc-2.0/config/i386sco.h Fri Dec 20 07:04:58 1991
--- gcc-2.0.sco/config/i386sco.h Sat Feb 29 00:16:22 1992
***************
*** 5,8 ****
--- 5,9 ----
#include "i386v.h"
+ #undef CPP_SPEC
/* Use crt1.o as a startup file and crtn.o as a closing file. */
***************
*** 9,13 ****
#undef STARTFILE_SPEC
! #define STARTFILE_SPEC "%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}"
#define ENDFILE_SPEC "crtn.o%s"
--- 10,14 ----
#undef STARTFILE_SPEC
! #define STARTFILE_SPEC "%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}} crtbegin.o%s"
#define ENDFILE_SPEC "crtn.o%s"
***************
*** 17,21 ****
#undef LIB_SPEC
#define LIB_SPEC \
! "%{p:-L/usr/lib/libp}%{pg:-L/usr/lib/libp} %{scointl:libintl.a%s} -lc"
/* Specify predefined symbols in preprocessor. */
--- 18,22 ----
#undef LIB_SPEC
#define LIB_SPEC \
! "%{p:-L/usr/lib/libp}%{pg:-L/usr/lib/libp} %{scointl:libintl.a%s} -lc crtend.o%s"
/* Specify predefined symbols in preprocessor. */
diff -rc2N gcc-2.0/config/x-i386sco gcc-2.0.sco/config/x-i386sco
*** gcc-2.0/config/x-i386sco Wed Nov 27 07:21:26 1991
--- gcc-2.0.sco/config/x-i386sco Sun Mar 1 17:54:31 1992
***************
*** 2,5 ****
RANLIB = :
RANLIB_TEST = false
! CC = rcc -Di386
! OLDCC = rcc -Di386
--- 2,8 ----
RANLIB = :
RANLIB_TEST = false
! CC = rcc
! OLDCC = rcc
! RCCFLAGS = -Dunix -Di386 -DM_UNIX -DM_I386
! XCFLAGS = $(RCCFLAGS)
! CLIB = -lPW
diff -rc2N gcc-2.0/gcc.1 gcc-2.0.sco/gcc.1
*** gcc-2.0/gcc.1 Fri Feb 7 06:53:26 1992
--- gcc-2.0.sco/gcc.1 Sun Mar 1 16:57:03 1992
***************
*** 290,293 ****
--- 290,305 ----
\-msoft\-float
+ .I 80386 and 80486 Options
+ .br
+ \-m80387
+ \-msoft\-float
+ \-m486
+ \-mno486
+ \-m386
+ \-mrtd
+ \-mnortd
+ \-mregparm
+ \-mnoregparm
+
.I VAX Options
.br
---------------------End of Patch ------------------------------------------
Technical Details
Message-ID:
<4050003@hparc0.aus.hp.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!spool.mu.edu!wupost!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!sdd.hp.com!hplabs!hpl-opus!hpcc05!hparc0!linasShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,59bbd140f925ca1d,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1992-03-01 20:10:37 PST Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!spool.mu.edu!wupost!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!sdd.hp.com!hplabs!hpl-opus!hpcc05!hparc0!linas From: linas@hparc0.aus.hp.com (Linas Petras) Newsgroups: gnu.gcc.help Subject: Patch file for GCC2.0 under SCO UNIX 3.2.2 Message-ID: <4050003@hparc0.aus.hp.com> Date: 1 Mar 92 13:11:14 GMT Article-I.D.: hparc0.4050003 Organization: HP Australasian Response Centre (Melbourne) Lines: 287