kupfer@orc.olivetti.com (Mike Kupfer) (12/22/89)
gcc 1.36 is set up so that you compile gnulib using some compiler other than gcc. For systems that only have gcc (e.g., Mach on the i386), one needs another approach. So, I've hacked the gcc Makefile so that you can either generate gnulib the old way, or you can generate gnulib from a set of C and assembly sources. Enclosed are (1) diffs to our gcc Makefile and (2) a subdirectory Makefile for the i386 gnulib. I obtained the .s files from an old gcc build directory; I assume they were built using the System V compiler. --------------------------- cut here --------------------------------- *** /tmp/,RCSt1a20699 Thu Dec 21 15:27:45 1989 --- /tmp/,RCSt2a20699 Thu Dec 21 15:27:46 1989 *************** *** 17,23 **** --- 17,31 ---- #along with GNU CC; see the file COPYING. If not, write to #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + # + # $Log: Makefile,v $ + # Revision 1.2 89/12/21 14:58:44 kupfer + # Add support for gnulib written in assembly (rather than generated + # by some other compiler). + # + # + #CFLAGS = -g CFLAGS = -O CC = cc *************** *** 114,119 **** --- 122,133 ---- _floatsidf _floatdidf _truncdfsf2 _extendsfdf2 \ _addsf3 _negsf2 _subsf3 _cmpsf2 _mulsf3 _divsf3 _varargs + # For systems that have only gcc, there is a subdirectory containing + # assembly language and C sources for gnulib. For everyone else, compile + # gnulib using your old, pre-gcc compiler. + #GNULIB_SRC = gnulib.common + GNULIB_SRC = gnulib.i386 + # Header files that are made available to programs compiled with gcc. USER_H = stddef.h stdarg.h assert.h varargs.h va-*.h limits.h *************** *** 147,155 **** cc1plus: $(CPLUS_OBJS) $(OBJS) $(LIBDEPS) $(CC) $(CFLAGS) $(LDFLAGS) -o cc1plus $(CPLUS_OBJS) $(OBJS) $(LIBS) #Library of arithmetic subroutines # Don't compile this with gcc! ! gnulib: gnulib.c -mkdir libtemp cd libtemp; \ rm -f gnulib; \ --- 161,172 ---- cc1plus: $(CPLUS_OBJS) $(OBJS) $(LIBDEPS) $(CC) $(CFLAGS) $(LDFLAGS) -o cc1plus $(CPLUS_OBJS) $(OBJS) $(LIBS) + gnulib: $(GNULIB_SRC) + if [ -f /usr/bin/ranlib ] ; then ranlib gnulib ;fi + #Library of arithmetic subroutines # Don't compile this with gcc! ! gnulib.common: gnulib.c -mkdir libtemp cd libtemp; \ rm -f gnulib; \ *************** *** 164,175 **** done mv libtemp/gnulib . #rvb rm -rf libtemp - if [ -f /usr/bin/ranlib ] ; then ranlib gnulib ;fi # On HPUX, if you are working with the GNU assembler and linker, # the previous line must be replaced with the following two lines. # No change is needed here if you are using the HPUX assembler and linker. # mv gnulib gnulib-hp # ../hp-bin/hpxt gnulib-hp gnulib # C language specific files. --- 181,196 ---- done mv libtemp/gnulib . #rvb rm -rf libtemp # On HPUX, if you are working with the GNU assembler and linker, # the previous line must be replaced with the following two lines. # No change is needed here if you are using the HPUX assembler and linker. # mv gnulib gnulib-hp # ../hp-bin/hpxt gnulib-hp gnulib + + gnulib.i386: + cd lib.i386; make $(MFLAGS) gnulib + rm -f gnulib + cp lib.i386/gnulib . # C language specific files. ----------------------------- cut here -------------------------------- # Makefile for GNU C compiler. # Copyright (C) 1987, 1988 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 1, 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. # # $Log: Makefile,v $ # Revision 1.1 89/12/21 14:59:53 kupfer # Initial revision # # CPP = /lib/cpp OBJS = _eprintf.o _builtin_new.o _builtin_New.o _builtin_del.o \ _umulsi3.o _mulsi3.o _udivsi3.o _divsi3.o _umodsi3.o _modsi3.o \ _lshrsi3.o _lshlsi3.o _ashrsi3.o _ashlsi3.o _cmpdi2.o _ucmpdi2.o \ _divdf3.o _muldf3.o _negdf2.o _adddf3.o _subdf3.o _cmpdf2.o \ _fixunsdfsi.o _fixunsdfdi.o _fixdfsi.o _fixdfdi.o \ _floatsidf.o _floatdidf.o _truncdfsf2.o _extendsfdf2.o \ _addsf3.o _negsf2.o _subsf3.o _cmpsf2.o _mulsf3.o _divsf3.o _varargs CFLAGS = -O .s.o: $(CPP) $*.s | as -o $*.o gnulib: $(OBJS) rm -f gnulib ar cr gnulib $(OBJS) Mike Kupfer kupfer@orc.olivetti.com 415-496-6238 {decwrl!oli-stl, ames!oli-stl, oliveb}!orc!kupfer ucbvax!kupfer