--- gcc/Makefile 2018/04/24 16:55:28 1.1.1.18 +++ gcc/Makefile 2018/04/24 17:00:54 1.1.1.21 @@ -105,8 +105,18 @@ DIR = ../gcc # You might also want to remove limits.h from the definition of USER_H, # since the one that comes with the system is good for POSIX. # RANLIB = : -# CC = rcc -# OLDCC = rcc +# CC = rcc -Di386 -DM_UNIX -DM_I386 -DM_SYSV -DM_COFF +# OLDCC = rcc -Di386 -DM_UNIX -DM_I386 -DM_SYSV -DM_COFF + +# On a 386 running an ISC system, uncomment the following lines. +# You also need to add -D_POSIX_SOURCE to CFLAGS +# when compiling with GCC. +# INSTALL = cp +# CLIB = -lPW -lcposix + +# On a 386 running system V.4, uncomment the following lines. +# INSTALL = cp +# HARD_PARAMS_FLAGS = -DNO_LONG_DOUBLE # If you are making gcc for the first time, and if you are compiling it with # a non-gcc compiler, and if your system doesn't have a working alloca() in any @@ -232,10 +242,15 @@ CPLUS_TREE_H = $(TREE_H) cplus-tree.h c- # because all that file does, when not compiling with GCC, # is include the system varargs.h. -all: config.status gnulib gcc cc1 cpp float.h gnulib2 libg # cc1plus +all: config.status gnulib gcc cc1 cpp float.h gnulib2 # cc1plus + +# Use this instead of `all' if you need to convert the libraries +# before you can use the compiler. +# Don't forget to do `make gnulib2' before installation. +all-libconvert: config.status gnulib gcc cc1 cpp float.h # cc1plus -lang-c: config.status gnulib gcc cc1 cpp gnulib2 libg -# lang-cplus: config.status gnulib gcc cc1plus cpp gnulib2 libg +lang-c: config.status gnulib gcc cc1 cpp gnulib2 +# lang-cplus: config.status gnulib gcc cc1plus cpp gnulib2 config.status: @echo You must configure gcc. Look at the INSTALL file for details. @@ -256,16 +271,10 @@ cc1: $(C_OBJS) $(OBJS) $(LIBDEPS) cc1plus: $(CPLUS_OBJS) $(OBJS) $(LIBDEPS) $(CC) $(CFLAGS) $(LDFLAGS) -o cc1plus $(CPLUS_OBJS) $(OBJS) $(LIBS) -# Make sure there is some libg.a to be found, -# in case compiling with a GCC that was built but not installed. -libg: - if [ ! -f /lib/libg.a -a ! -f /usr/lib/libg.a ]; \ - then ar rc libg.a; else true; fi - #Library of arithmetic subroutines # Don't compile this with gcc! # (That would cause most arithmetic functions to call themselves.) -gnulib: gnulib.c $(CONFIG_H) +gnulib: gnulib.c $(CONFIG_H) config.status -rm -f stamp-gnulib2 rm -f tmpgnulib gnulib; \ for name in $(LIBFUNCS); \ @@ -310,7 +319,10 @@ float.h: # instead of GNU make. And the system's make might not support VPATH. # However, the compilation of hard-params should not need to use VPATH, # due to the explicit use of `$(srcdir)'. - make hard-params + make hard-params \ + HARD_PARAMS_FLAGS="$(HARD_PARAMS_FLAGS)" \ + CPPFLAGS="$(CPPFLAGS)" \ + LDFLAGS="$(LDFLAGS)" -./hard-params -f > float.h # Compile hard-params with standard cc. It avoids some headaches. @@ -600,22 +612,23 @@ realclean: cleanconfig -rm -f cpp.info* cpp.?? cpp.??s cpp.log cpp.toc cpp.*aux -rm -f gcc.info* gcc.?? gcc.??s gcc.log gcc.toc gcc.*aux -rm -f gplus.info* gplus.?? gplus.??s gplus.log gplus.toc gplus.*aux - -rm -f *.dvi + -rm -f *.dvi stage1 stage2 stage3 # Copy the files into directories where they will be run. install: all $(USER_H) float.h gvarargs.h gstdarg.h gcc.1 -mkdir $(libdir) + -mkdir $(bindir) -if [ -f cc1 ] ; then $(INSTALL) cc1 $(libdir)/gcc-cc1 ; else true; fi -if [ -f cc1plus ] ; then $(INSTALL) cc1plus $(libdir)/gcc-cc1plus ; else true; fi $(INSTALL) gnulib $(libdir)/gcc-gnulib -if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ; then (cd $(libdir); $(RANLIB) gcc-gnulib) ; else true; fi $(INSTALL) cpp $(libdir)/gcc-cpp - $(INSTALL) gcc $(bindir) + $(INSTALL) gcc $(bindir)/gcc -mkdir $(libdir)/gcc-include -chmod ugo+rx $(libdir)/gcc-include for file in $(USER_H); do \ for eachfile in $(srcdir)/$${file} ; do \ - $(INSTALL) $${eachfile} $(libdir)/gcc-include/`basename $${eachfile}`; \ + $(INSTALL) $(srcdir)/`basename $${eachfile}` $(libdir)/gcc-include/`basename $${eachfile}`; \ done ; done $(INSTALL) float.h $(libdir)/gcc-include/float.h $(INSTALL) $(srcdir)/gvarargs.h $(libdir)/gcc-include/varargs.h @@ -623,19 +636,6 @@ install: all $(USER_H) float.h gvarargs. -chmod a-x $(libdir)/gcc-include/*.h $(INSTALL) $(srcdir)/gcc.1 $(mandir)/gcc.$(manext) -chmod a-x $(mandir)/gcc.$(manext) -# Make sure -lg won't get an error message from the linker: -# create a library libg.a if there isn't one. - -if [ -f /lib/libg.a -o -f /usr/lib/libg.a ]; then \ - : ; \ - else \ - echo Installing a dummy libg.a into /usr/lib; \ - echo "_no_libg(){}" > _no_libg.c; \ - ./gcc -B./ -c _no_libg.c; \ - $(AR) rc libg.a _no_libg.o; \ - $(INSTALL) libg.a /usr/lib/libg.a; \ - if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ; then (cd /usr/lib; $(RANLIB) libg.a) ; else true; fi; \ - rm -f _no_libg.[co] libg.a; \ - fi # do make -f ../gcc/Makefile maketest DIR=../gcc # in the intended test directory to make it a suitable test directory. @@ -649,7 +649,7 @@ maketest: ln -s $(DIR)/config.gcc . ln -s $(DIR)/move-if-change . # The then and else were swapped to avoid a problem on Ultrix. - if [ ! -f Makefile ] ; then ln -s $(DIR)/Makefile . ; else false; fi + -if [ ! -f Makefile ] ; then ln -s $(DIR)/Makefile . ; else false; fi -rm tm.h aux-output.c config.h md make clean # You must then run config.gcc to set up for compilation.