steve@robobar.co.uk (Steve Bleazard) (09/11/90)
Submitted-by: steve@robobar.co.uk (Steve Bleazard) Archive-name: g++-x386/patch-kit.01 Here is a patch kit and instructions for building g++ 1.37.1 for SCO Xenix 386. You will need Bison 1.03 GCC 1.37.1/GAS 1.3[456] with Xenix patches posted by me previously. in addition to this patch kit and the g++-1.37.1 source from the FSF. #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create the files: # README # g++-x386.pch # This archive created: Mon Sep 10 15:29:27 1990 export PATH; PATH=/bin:$PATH echo shar: extracting "'README'" '(2767 characters)' if test -f 'README' then echo shar: will not over-write existing file "'README'" else sed 's/^X//' << \SHAR_EOF > 'README' XHere is a patch kit and instructions for building g++ 1.37.1 for XSCO Xenix 386. You will need X X Bison 1.03 X GCC 1.37.1/GAS 1.3[456] with Xenix patches posted by me previously. X Xin addition to this patch kit and the g++-1.37.1 source from the FSF. X X1. Build and install bison 1.03 and the XENIX verion of GCC and GAS X using the patch kits posted by me previously. X X2. Ensure that the standard header files are fixed. Depending on how X many of my GCC patches you have installed, and depending on whether X or not you have used the fix.h.xenix script from one of my later GCC X patches, you may or may not have to do one or more of the following: X X a. delete the lines X X #ifdef M_XENIX X #define _SIZE_T X #endif X X from stddef.h in the GCC source directory X X b. put these lines at the top X X #ifndef _STDIO_H_INCLUDED X #define _STDIO_H_INCLUDED X X and this line at the bottom X X #endif /* _STDIO_H_INCLUDED */ X X of the standard include file /usr/include/stdio.h. If this has X already been done to the copy in /usr/local/lib/gcc-include/stdio.h, X you probably don't have to do this. X X c. In whichever stdio.h file is relevant, ensure that: X X i. The definition of va_list has been removed X ii. add #define _SIZE_T to mark the typedef of size_t there. X X d. Remove the definition of time_t and size_t from the relevant time.h X X3. In the GCC source directory, add gnulib2 to gnulib by typing X X make gnulib2 X X Install this version of gnulib as /usr/local/lib/gcc-gnulib X X4. unpack g++ in the Gnu source directory, so that the current X directory contains the following directories, X X gcc-1.37/ X g++-1.37.0/ X X5. mkdir g++ X X6. ln g++-1.37.0/* g++ X X7. cd g++ X X8. patch -p < g++-x386.pch # the patch contained within this kit. X # (or just feed the kit itself to patch) X9. make maketest X X (ignore errors from ln) X X10. sh config.g++ xenix386 X X11. Edit the Makefile to taste. X Pay particular attention to the value of COFFLAGS: current Xenix X versions of /lib/ldr require the definition of FASCIST_LDR. X X You need to define FASCIST_LDR if ld -r truncates symbols to 40 X characters. You can check this by compiling one-line the program: X X aaaaaaaaTaaaaaaaaaTaaaaaaaaaTaaaaaaaaaT123456789T123456789T(){} X X with the commands: X X gcc -c test.c X ld -r -o test.R test.o X X The command: X X nm test.R X X will then show if the name has been truncated. (If nm reports X 'symbol table read error' or something to that effect, then ld -r X may possibly be working.) The ldr in SLS fix lng238 *should* not have X needed FASCIST_LDR, but it core dumps when linking groff, so you X apprently still need to define FASCIST_LDR with it. Sigh. X X12. make X X13. make install X X14. Enjoy! X XSteve. X(steve@robobar.co.uk) SHAR_EOF if test 2767 -ne "`wc -c < 'README'`" then echo shar: error transmitting "'README'" '(should have been 2767 characters)' fi fi # end of overwriting check echo shar: extracting "'g++-x386.pch'" '(20344 characters)' if test -f 'g++-x386.pch' then echo shar: will not over-write existing file "'g++-x386.pch'" else sed 's/^X//' << \SHAR_EOF > 'g++-x386.pch' X*** Makefile.old Mon Feb 26 09:37:46 1990 X--- Makefile Fri Sep 7 09:04:13 1990 X*************** X*** 39,44 **** X--- 39,49 ---- X # On COFF systems, use one of the definitions below. (see collect.c) X # COFFLAGS = -DUSE_COLLECT -DCOFF X # COFFLAGS = -DUSE_COLLECT -DEXTENDED_COFF X+ # On SCO Xenix 386 systems, use the definition below. (see collect.c) X+ # COFFLAGS = -DUSE_COLLECT X+ # On SCO Xenix 386 systems where ld -r truncates symbols to 40 character, X+ # use the definition below. (see collect.c) X+ COFFLAGS = -DUSE_COLLECT -DFASCIST_LDR X X # On some BSD systems (like Vax, unlike Sun), there is no file X # /usr/include/unistd.h. If this is the case for your system X*************** X*** 46,52 **** X # HAVE_UNISTD_H = -DNO_UNISTD_H X X # CFLAGS = -g -DSOS -DESKIT -O X! CFLAGS = -g -DGATHER_STATISTICS -O $(COFFLAGS) -B../gcc-test/ X CC = gcc X BISON = bison X BISONFLAGS = -v -d X--- 51,57 ---- X # HAVE_UNISTD_H = -DNO_UNISTD_H X X # CFLAGS = -g -DSOS -DESKIT -O X! CFLAGS = -DGATHER_STATISTICS -O $(COFFLAGS) X CC = gcc X BISON = bison X BISONFLAGS = -v -d X*************** X*** 53,61 **** X AR = ar X SHELL = /bin/sh X # on sysV, define this as cp. X! INSTALL = install -c X # on sysV, define this as ln. X! LINK = ln -s X X # Compiler to use for compiling gnulib. X # OLDCC should not be the GNU C compiler. X--- 58,66 ---- X AR = ar X SHELL = /bin/sh X # on sysV, define this as cp. X! INSTALL = cp X # on sysV, define this as ln. X! LINK = ln X X # Compiler to use for compiling gnulib. X # OLDCC should not be the GNU C compiler. X*************** X*** 96,104 **** X OBSTACK=obstack.o X X # Directory to link to, when using the target `maketest'. X! DIR = ../gcc X # this is the GNU CC build directory X! TDIR = ../gcc-test X X # End of variables for you to override. X X--- 101,109 ---- X OBSTACK=obstack.o X X # Directory to link to, when using the target `maketest'. X! DIR = ../gcc-1.37 X # this is the GNU CC build directory X! TDIR = ../gcc-1.37 X X # End of variables for you to override. X X*************** X*** 204,212 **** X X # gnulib is not a target because a proper installation of GNU CC X # will place it where g++ can find it. Same with cpp X! all: crt1+.o g++ cc1plus ld++ g++filt # collect crt0+.o X # On COFF systems, use the target below. X # all: g++ cc1plus collect # crt0+.o crt1+.o X X doc: $(srcdir)/cpp.info $(srcdir)/g++.info X X--- 209,222 ---- X X # gnulib is not a target because a proper installation of GNU CC X # will place it where g++ can find it. Same with cpp X! # all: crt1+.o g++ cc1plus ld++ g++filt # collect crt0+.o X # On COFF systems, use the target below. X # all: g++ cc1plus collect # crt0+.o crt1+.o X+ # ON Xenix386 systems use the target below. X+ # all: g++ cc1plus collect gnulib++ # crt0+.o crt1+.o X+ # ON Xenix386 systems where ld -r truncates symbols to 40 characters use X+ # the target below. X+ all: g++ cc1plus collect gnulib++ g++dummy # crt0+.o crt1+.o X X doc: $(srcdir)/cpp.info $(srcdir)/g++.info X X*************** X*** 215,220 **** X--- 225,236 ---- X g++: gcc.o version.o $(LIBDEPS) X $(CC) $(CFLAGS) $(LDFLAGS) -o g++ gcc.o version.o $(LIBS) X X+ gnulib++: gnulib3.c X+ $(CC) $(CFLAGS) -c -o gnulib++ gnulib3.c X+ X+ g++dummy: g++dummy.S X+ $(CC) -c -o g++dummy g++dummy.S X+ X # Note: If you have SunOS 4.0, you can't use GNU LD to link programs X # which use shared libraries. You could add -DNO_GNU_LD to this X # command line, but be warned that collect is not really powerful X*************** X*** 222,230 **** X # be better if you could just add support to GNU LD to handle X # shared libraries. X gcc.o: gcc.c $(CONFIG_H) X! $(CC) $(CFLAGS) $(INCLUDES) \ X! -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \ X! -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-\" -c \ X `echo $(srcdir)/gcc.c | sed 's,^\./,,'` X X version.o: version.c X--- 238,244 ---- X # be better if you could just add support to GNU LD to handle X # shared libraries. X gcc.o: gcc.c $(CONFIG_H) X! $(CC) $(CFLAGS) $(INCLUDES) -c \ X `echo $(srcdir)/gcc.c | sed 's,^\./,,'` X X version.o: version.c X*************** X*** 286,292 **** X else \ X COLLECT_OPTIONS=''; \ X fi; \ X! $(CC) -o collect $(PROFILE) $$COLLECT_OPTIONS $(CFLAGS) $(INCLUDES) $< -lg -lc $$COLLECT_LIBS X X collect2: collect2.c config.h X $(CC) -o collect2 collect2.c $(PROFILE) $$COLLECT_OPTIONS $(CFLAGS) $(INCLUDES) -lc X--- 300,306 ---- X else \ X COLLECT_OPTIONS=''; \ X fi; \ X! $(CC) -o collect $(PROFILE) $(COLLECT_OPTIONS) $(CFLAGS) $(INCLUDES) $< X X collect2: collect2.c config.h X $(CC) -o collect2 collect2.c $(PROFILE) $$COLLECT_OPTIONS $(CFLAGS) $(INCLUDES) -lc X*************** X*** 602,607 **** X--- 616,623 ---- X -if [ -f ld++ ] ; then $(INSTALL) ld++ $(libdir)/gcc-ld ;fi X # -if [ -f crt0+.o ] ; then $(INSTALL) crt0+.o $(startdir)/crt0+.o ;fi X -if [ -f crt1+.o ] ; then $(INSTALL) crt1+.o $(startdir)/crt1+.o ;fi X+ -if [ -f gnulib++ ] ; then $(INSTALL) gnulib++ $(startdir)/gcc-gnulib++ ;fi X+ -if [ -f g++dummy ] ; then $(INSTALL) g++dummy $(startdir)/g++dummy ;fi X -mkdir $(libdir)/g++-include X -chmod ugo+rx $(libdir)/g++-include X X*************** X*** 634,639 **** X--- 650,659 ---- X $(TDIR)/insn-extract.c $(TDIR)/insn-flags.h $(TDIR)/insn-codes.h \ X $(TDIR)/insn-config.h $(TDIR)/insn-peep.c . X -rm tm.h aux-output.c config.h md X+ # Comment the next line out if you have compiled gcc without -traditional X+ -rm *.o X+ -mv config.g++ config.g++.old X+ -$(LINK) $(TDIR)/config.gcc config.g++ X # You must then run config.g++ to set up for compilation. X X bootstrap: all force X*** collect.old Wed Nov 22 23:29:14 1989 X--- collect.c Fri Sep 7 08:58:24 1990 X*************** X*** 68,75 **** X--- 68,77 ---- X */ X #ifdef i386 X #define ASM_INT_OP ASM_LONG X+ #ifndef M_XENIX X #define NO_UNDERSCORES 1 X #endif X+ #endif X X #ifndef ASM_OUTPUT_INT_CONST X #define ASM_OUTPUT_INT_CONST(FILE,VALUE) \ X*************** X*** 330,336 **** X--- 332,342 ---- X /* Write out the CTOR tabel */ X ASM_FILE_START(outfile); X X+ #ifndef M_XENIX X fprintf (outfile, "%s\n", TEXT_SECTION_ASM_OP); X+ #else X+ fprintf (outfile, "%s\n", DATA_SECTION_ASM_OP); X+ #endif X ASM_GLOBALIZE_LABEL (outfile, CTOR_TABLE_NAME); X ASM_OUTPUT_LABEL (outfile, CTOR_TABLE_NAME); X ASM_OUTPUT_INT_CONST(outfile,ctor_chain_length); X*************** X*** 470,475 **** X--- 476,751 ---- X } X X #else X+ #ifdef M_XENIX X+ #ifndef FASCIST_LDR X+ X+ #undef i386 X+ #define HDRSIZE 3 X+ #define NOERROR 0 X+ #define NODATA 1 X+ #define ILLSTRLEN 2 X+ #define EOFERR 3 X+ #define OMFNAMELENGTH 127 X+ #define MPUBDEF 0x90 X+ #define MPUB386 0x91 X+ X+ FILE *objfile; X+ int objerror = NOERROR; X+ X+ int rdbytes(buff, count) X+ char *buff; X+ int count; X+ { X+ int retval; X+ X+ if (retval = (fread(buff, 1, count, objfile) != count)) X+ objerror = EOFERR; X+ return !retval; X+ } X+ X+ int checkcnt(from, count) X+ int *from, count; X+ { X+ if ((*from - 1) < count) X+ { X+ objerror = NODATA; X+ return FALSE; X+ } X+ *from -= count; X+ return TRUE; X+ } X+ X+ X+ long rdvint(count, reclen) X+ int count; X+ int *reclen; X+ { X+ long val = 0; X+ unsigned char b; X+ int i = 0; X+ X+ if (!checkcnt(reclen, count)) X+ return -1; X+ while (i < count) X+ { X+ rdbytes(&b, 1); X+ val = val | ((long)b << ( 8 * i)); X+ i++; X+ } X+ return val; X+ } X+ X+ long rdoffset(i386, reclen) X+ int i386; X+ int *reclen; X+ { X+ return rdvint(i386 ? 4 : 2, reclen); X+ } X+ X+ unsigned int rdword(reclen) X+ int *reclen; X+ { X+ return (unsigned int)rdvint(2, reclen); X+ } X+ X+ unsigned char rdbyte(reclen) X+ int *reclen; X+ { X+ unsigned char b; X+ X+ if (!checkcnt(reclen, 1)) X+ return 0; X+ rdbytes(&b, 1); X+ return b; X+ } X+ X+ unsigned int rdindex(reclen) X+ int *reclen; X+ { X+ unsigned char b, b1; X+ X+ b = rdbyte(reclen); X+ if (b < 128) X+ return b; X+ b1 = rdbyte(reclen); X+ return (((unsigned int)b & 0x7f) << 8) + b1; X+ } X+ X+ void rdomfstr(name, reclen) X+ char *name; X+ int *reclen; X+ { X+ unsigned char l; X+ X+ l = rdbyte(reclen); X+ if (l > OMFNAMELENGTH) X+ { X+ name[0] = '\0'; X+ objerror = ILLSTRLEN; X+ fseek(objfile, (long)reclen, 1); X+ return; X+ } X+ if (!checkcnt(reclen, l)) X+ { X+ name[0] = '\0'; X+ return; X+ } X+ rdbytes(name, l); name[l] = '\0'; X+ } X+ X+ void pubdef(i386, reclen) X+ int i386; X+ int reclen; X+ { X+ unsigned int grpindex, segindex, framenum; X+ X+ grpindex = rdindex(&reclen); X+ segindex = rdindex(&reclen); X+ if (grpindex == 0 && segindex == 0) X+ framenum = rdword(&reclen); X+ X+ while (reclen > 1) X+ { X+ unsigned char symbol_name[OMFNAMELENGTH+2]; X+ unsigned long offset; X+ int type; X+ X+ rdomfstr(symbol_name, &reclen); X+ offset = rdoffset(i386, &reclen); X+ type = rdindex(&reclen); X+ X+ X+ X+ if (! strncmp (CTOR_DTOR_MARKER_NAME, symbol_name, X+ CTOR_DTOR_MARKER_LENGTH)) X+ add_ctor_dtor_elem(symbol_name); X+ } X+ fseek(objfile, (long)reclen, 1); X+ } X+ X+ X+ enum error_code process (fp, filename) X+ FILE *fp; X+ char *filename; X+ { X+ unsigned char buff[HDRSIZE+2]; X+ unsigned int reclen, rectype; X+ X+ objfile = fp; X+ objerror = NOERROR; X+ while (rdbytes(buff, HDRSIZE)) X+ { X+ int rectype, reclen; X+ X+ rectype = buff[0]; X+ reclen = buff[1] | ((int)buff[2] << 8); X+ switch (rectype) X+ { X+ case MPUBDEF: X+ pubdef(0, reclen); X+ break; X+ case MPUB386: X+ pubdef(1, reclen); X+ break; X+ default: X+ fseek(objfile, (long)reclen, 1); X+ break; X+ } X+ if (objerror != NOERROR) X+ return RANDOM_ERROR; X+ } X+ return (OK); X+ } X+ #else /* FASCIST_LDR */ X+ #include <sys/relsym.h> X+ X+ #define IGNORE_ATTR (-1) X+ X+ struct xseg *seg_table; X+ long num_seg_table_entries; X+ X+ enum error_code process_symbol_table(fp, segsize, name) X+ FILE *fp; X+ int segsize; X+ char *name; X+ { X+ char *symdata, *p; X+ long i; X+ struct sym symb; X+ X+ /* grab the symbol table */ X+ X+ symdata = alloca(segsize + 1); X+ if (fread(symdata, segsize, 1, fp) != 1) X+ return RANDOM_ERROR; X+ X+ p = symdata; X+ while (p < symdata + segsize) X+ { X+ int len; X+ X+ symb = *((struct sym *)p); X+ p += sizeof(struct sym); X+ X+ if (((symb.s_type & S_TYPE) == S_TEXT) && X+ ! strncmp (CTOR_DTOR_MARKER_NAME, p, CTOR_DTOR_MARKER_LENGTH)) X+ add_ctor_dtor_elem(p); X+ p += strlen(p) + 1; X+ } X+ return OK; X+ } X+ X+ static read_seg_table(fp, pos, size, name) X+ FILE *fp; X+ long pos, size; X+ { X+ seg_table = (struct xseg *) xmalloc(size); X+ fseek(fp, pos, 0); X+ if (fread((char *)seg_table, size, 1, fp) != 1) X+ perror("collect cannot read seg table"); X+ num_seg_table_entries = size / sizeof (struct xseg); X+ } X+ X+ struct xseg *find_segment(type, attr) X+ int type, attr; X+ { X+ struct xseg *cseg; X+ X+ for (cseg = seg_table; cseg < seg_table + num_seg_table_entries; ++cseg) X+ if (cseg->xs_type == type && X+ (attr == IGNORE_ATTR || attr == cseg->xs_attr)) X+ return cseg; X+ return NULL; X+ } X+ X+ enum error_code process (fp, name) X+ FILE *fp; X+ char *name; X+ { X+ struct xexec exec_aouthdr; X+ struct xext *xext; X+ struct xseg *cseg; X+ X+ fseek(fp, 0L, 0); X+ X+ if (fread((char *)&exec_aouthdr, sizeof(struct xexec), 1, fp) != 1) X+ return RANDOM_ERROR; X+ X+ xext = (struct xext *) alloca(exec_aouthdr.x_ext); X+ if (fread((char *)xext, exec_aouthdr.x_ext, 1, fp) != 1) X+ return RANDOM_ERROR; X+ X+ read_seg_table(fp, xext->xe_segpos, xext->xe_segsize, name); X+ X+ if (cseg = find_segment(XS_TSYMS, 1)) X+ { X+ fseek(fp, cseg->xs_filpos, 0); X+ process_symbol_table(fp, cseg->xs_psize, name); X+ } X+ } X+ #endif /* !FASCIST_LDR */ X+ X+ #else /* not M_XENIX */ X X /***************************************************************************** X * X*************** X*** 646,651 **** X--- 922,928 ---- X } X return OK; X } X+ #endif /* M_XENIX */ X #endif X X /* Output to FILE a reference to the assembler name of a C-level name NAME. X*** /dev/null Sun Apr 15 02:01:07 1990 X--- g++dummy.S Sun Apr 15 12:07:36 1990 X*************** X*** 0 **** X--- 1,12 ---- X+ .file "g++dummy.S" X+ .data X+ .globl ___CTOR_LIST__ X+ ___CTOR_LIST__: X+ .long 0 X+ .long 0 X+ .data X+ .globl ___DTOR_LIST__ X+ ___DTOR_LIST__: X+ .long 0 X+ .long 0 X+ .long 0 X*** gcc.old Sat Jan 20 07:21:10 1990 X--- gcc.c Fri Sep 7 17:35:01 1990 X*************** X*** 157,162 **** X--- 157,165 ---- X void validate_switches (); X void validate_all_switches (); X void fancy_abort (); X+ #ifdef M_XENIX X+ char *find_lib (); X+ #endif /* M_XENIX */ X X /* config.h can define ASM_SPEC to provide extra args to the assembler X or extra switch-translations. */ X*************** X*** 224,229 **** X--- 227,233 ---- X to do_spec. */ X }; X X+ #ifndef M_XENIX X #define cplusplus_string \ X "cpp -+ %{nostdinc} %{C} %{v} %{D*} %{U*} %{I*} %{M*} %{i*} \ X -undef -D__GNUC__ -D__GNUG__ -D__cplusplus %p %P\ X*************** X*** 239,244 **** X--- 243,265 ---- X %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %{gg:-G %g.sym}\ X %{c:%{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\ X %{!pipe:%g.s}\n }}}" X+ #else /* M_XENIX */ X+ #define cplusplus_string \ X+ "cpp -+ %{nostdinc} %{C} %{v} %{D*} %{U*} %{I*} %{M*} %{i*} \ X+ -undef -D__GNUC__ -D__GNUG__ -D__cplusplus %p %P\ X+ %c %{O:-D__OPTIMIZE__} %{traditional} %{pedantic}\ X+ %{Wcomment*} %{Wtrigraphs} %{Wall} %C\ X+ %i %{!M*:%{!E:%{!pipe:%g.cpp}}}%{E:%{o*}}%{M*:%{o*}} |\n\ X+ %{!M*:%{!E:cc1plus %{!pipe:%g.cpp} %1\ X+ %{!Q:-quiet} -dumpbase %i %{Y*} %{d*} %{m*} %{f*} %{+e*} %{a}\ X+ %{g} %{g0} %{O} %{W*} %{w} %{pedantic} %{traditional}\ X+ %{v:-version} %{gg:-symout %g.sym} %{pg:-p} %{p}\ X+ %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ X+ %{S:%{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ X+ %{!S:gas %{R} %{j} %{J} %{h} %{d2} %a %{gg:-G %g.sym}\ X+ %{c:%{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\ X+ %{!pipe:%g.s}\n }}}" X+ #endif /* !M_XENIX */ X X /* Here are the specs for compiling files with various known suffixes. X A file that does not end in any of these suffixes will be passed X*************** X*** 274,279 **** X--- 295,301 ---- X {".cxx", X cplusplus_string}, X X+ #ifndef M_XENIX X {".i", X "cc1 %i %1 %{!Q:-quiet} %{Y*} %{d*} %{m*} %{f*} %{a}\ X %{g} %{O} %{W*} %{w} %{pedantic} %{ansi} %{traditional}\ X*************** X*** 293,298 **** X--- 315,341 ---- X %{!M*:%{!E:%{!S:as %{R} %{j} %{J} %{h} %{d2} %a \ X %{c:%{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\ X %{!pipe:%g.s}\n }}}"}, X+ #else /* M_XENIX */ X+ {".i", X+ "cc1 %i %1 %{!Q:-quiet} %{Y*} %{d*} %{m*} %{f*} %{a}\ X+ %{g} %{O} %{W*} %{w} %{pedantic} %{ansi} %{traditional}\ X+ %{v:-version} %{gg:-symout %g.sym} %{pg:-p} %{p}\ X+ %{S:%{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ X+ %{!S:gas %{R} %{j} %{J} %{h} %{d2} %a %{gg:-G %g.sym}\ X+ %{c:%{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o} %{!pipe:%g.s}\n }"}, X+ {".s", X+ "%{!S:gas %{R} %{j} %{J} %{h} %{d2} %a \ X+ %{c:%{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o} %i\n }"}, X+ {".S", X+ "cpp %{nostdinc} %{C} %{v} %{D*} %{U*} %{I*} %{i*} %{M*} %{trigraphs} \ X+ -undef -D__GNUC__ -$ %p %P\ X+ %c %{O:-D__OPTIMIZE__} %{traditional} %{pedantic}\ X+ %{Wcomment*} %{Wtrigraphs} %{Wall} %C\ X+ %i %{!M*:%{!E:%{!pipe:%g.s}}}%{E:%{o*}}%{M*:%{o*}} |\n\ X+ %{!M*:%{!E:%{!S:gas %{R} %{j} %{J} %{h} %{d2} %a \ X+ %{c:%{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\ X+ %{!pipe:%g.s}\n }}}"}, X+ #endif /* M_XENIX */ X /* Mark end of table */ X {0, 0} X }; X*************** X*** 300,317 **** X--- 343,389 ---- X #ifdef USE_COLLECT X /* C++: Here is the spec for collecting global ctor and dtor X requirements. */ X+ #ifndef M_XENIX X char *collect_spec = X "%{!c:%{!M*:%{!E:%{!S:collect -o %g.S %g.R\n\ X as %g.S -o %g.O\n\ X ld %{o*} %g.R %g.O\n\ X }}}}"; X+ #else /* M_XENIX */ X+ #ifdef FASCIST_LDR X+ char *collect_spec = X+ "%{!c:%{!M*:%{!E:%{!S:collect -o %g.S %g.R\n\ X+ gas %g.S -o %g.O\n\ X+ ld %{o*} %{!o:-o a.out} %{!nostdlib:%S } %l %{g:-g} \ X+ %o %g.O %{!nostdlib:Slibg++.a%s gnulib++%s gnulib%s %L } \n\ X+ }}}}"; X+ #else X+ char *collect_spec = X+ "%{!c:%{!M*:%{!E:%{!S:collect -o %g.S %g.R\n\ X+ gas %g.S -o %g.O\n\ X+ ld %{o*} %{!o:-o a.out} %{!nostdlib:%S } %g.R %g.O \ X+ %{!nostdlib:gnulib++%s gnulib%s %L } \n\ X+ }}}}"; X+ #endif X+ #endif /* M_XENIX */ X X+ #ifndef M_XENIX X /* Here is the spec for running the linker, after compiling all files. */ X char *link_spec = "%{!c:%{!M*:%{!E:%{!S:ld -r -o %g.R %l\ X %{A} %{d} %{e*} %{N} %{n} %{r} %{s} %{S} %{T*} %{t} %{u*} %{X} %{x} %{z}\ X %{y*} %{!nostdlib:%S} \ X %{L*} %o %{!nostdlib:-lg++ gnulib%s %{g:-lg} %L}\n }}}}"; X+ #else /* M_XENIX */ X+ #ifdef FASCIST_LDR X+ char *link_spec = "%{!c:%{!M*:%{!E:%{!S:ld -o %g.R \ X+ %{!nostdlib:%S } %l %{g:-g}\ X+ %o %{!nostdlib:Slibg++.a%s gnulib++%s gnulib%s g++dummy%s %L }\n }}}}"; X #else X+ char *link_spec = "%{!c:%{!M*:%{!E:%{!S:ld -r -o %g.R %l %{g:-g}\ X+ %o %{!nostdlib:Slibg++.a%s %L }\n }}}}"; X+ #endif X+ #endif /* !M_XENIX */ X+ #else X /* Here is the spec for running the linker, after compiling all files. */ X char *link_spec = "%{!c:%{!M*:%{!E:%{!S:ld %{o*} %l\ X %{A} %{d} %{e*} %{N} %{n} %{r} %{s} %{S} %{T*} %{t} %{u*} %{X} %{x} %{z}\ X*************** X*** 366,380 **** X--- 438,467 ---- X #endif /* !defined STANDARD_EXEC_PREFIX */ X X char *standard_exec_prefix = STANDARD_EXEC_PREFIX; X+ #ifndef M_XENIX X char *standard_exec_prefix_1 = "/usr/lib/gcc-"; X+ #else /* M_XENIX */ X+ char *standard_exec_prefix_1 = "/usr/local/bin/"; X+ #endif /* not M_XENIX */ X X+ #ifndef M_XENIX X #ifndef STANDARD_STARTFILE_PREFIX X #define STANDARD_STARTFILE_PREFIX "/usr/local/lib/" X #endif /* !defined STANDARD_STARTFILE_PREFIX */ X+ #else /* M_XENIX */ X+ #ifndef STANDARD_STARTFILE_PREFIX X+ #define STANDARD_STARTFILE_PREFIX "/lib/386/gcc-" X+ #endif /* !defined STANDARD_STARTFILE_PREFIX */ X+ #endif /* not M_XENIX */ X X char *standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; X+ #ifndef M_XENIX X char *standard_startfile_prefix_1 = "/lib/"; X char *standard_startfile_prefix_2 = "/usr/lib/"; X+ #else /* M_XENIX */ X+ char *standard_startfile_prefix_1 = "/lib/386/"; X+ char *standard_startfile_prefix_2 = "/usr/local/lib/"; X+ #endif /* not M_XENIX */ X X /* Clear out the vector of arguments (after a command is executed). */ X X*************** X*** 1039,1044 **** X--- 1126,1136 ---- X n_switches++; X } X else X+ #ifdef M_XENIX X+ if (argv[i][0] == '-' && argv[i][1] == 'l') X+ infiles[n_infiles++] = find_lib(&argv[i][2]); X+ else X+ #endif /* M_XENIX */ X infiles[n_infiles++] = argv[i]; X } X X*************** X*** 1679,1684 **** X--- 1771,1793 ---- X return save_string (temp, strlen (temp)); X return name; X } X+ X+ #ifdef M_XENIX X+ char * X+ find_lib (name) X+ char *name; X+ { X+ char *temp, *rp; X+ X+ temp = (char *) alloca (strlen(name) + 8); X+ strcpy(temp, "Slib"); X+ strcat(temp, name); X+ strcat(temp, ".a"); X+ rp = find_file(temp); X+ return (rp == temp) ? name : rp; X+ } X+ #endif /* M_XENIX */ X+ X X /* On fatal signals, delete all the temporary files. */ X X*** make-links.old Thu Apr 12 15:22:43 1990 X--- make-links.g++ Thu Apr 12 16:36:12 1990 X*************** X*** 1,3 **** X--- 1,4 ---- X+ : X #!/bin/sh X # Script to make links for GNU C++ X # Copyright (C) 1988 Free Software Foundation, Inc. X*************** X*** 44,50 **** X make_directory=mkdir X change_directory=cd X hard_link=ln X! symbolic_link='ln -s' X X #for Test X #remove="echo rm" X--- 45,51 ---- X make_directory=mkdir X change_directory=cd X hard_link=ln X! symbolic_link=ln X X #for Test X #remove="echo rm" X*************** X*** 63,70 **** X borrowed_made_files="insn-emit.c insn-peep.c insn-recog.c insn-extract.c \ X insn-output.c insn-flags.h insn-config.h insn-codes.h" X X! $remove -f config X! $symbolic_link ${CDIR} ./config 2>/dev/null || $hard_link ${CDIR} ./config X if [ ! -r ${CDIR} ] X then X echo "$progname: unable to link \`${CDIR}'." X--- 64,76 ---- X borrowed_made_files="insn-emit.c insn-peep.c insn-recog.c insn-extract.c \ X insn-output.c insn-flags.h insn-config.h insn-codes.h" X X! $remove -rf config X! $make_directory ./config X! for file in ${CDIR}/* X! do X! $hard_link $file ./config X! done X! X if [ ! -r ${CDIR} ] X then X echo "$progname: unable to link \`${CDIR}'." SHAR_EOF if test 20344 -ne "`wc -c < 'g++-x386.pch'`" then echo shar: error transmitting "'g++-x386.pch'" '(should have been 20344 characters)' fi fi # end of overwriting check # End of shell archive exit 0