Return to BSD News archive
Path: sserve!manuel.anu.edu.au!munnari.oz.au!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!ljo From: ljo@r2d2.eeap.cwru.edu (L. Jonas Olsson) Newsgroups: comp.unix.bsd Subject: [386BSD] make-3.62 patches Date: 25 Oct 1992 23:04:27 GMT Organization: Case Western Reserve Univ. Cleveland, Ohio (USA) Lines: 233 Message-ID: <1cf95rINN9gd@usenet.INS.CWRU.Edu> References: <1992Oct25.112332.25964@fcom.cc.utah.edu> <1992Oct25.183912@eklektix.com> <1cf4v8INNidl@terminator.rs.itd.umich.edu> NNTP-Posting-Host: johnny5.eeap.cwru.edu I'm here posting some patches for make-3.62 that I have used to successfully compile libg++. The patches are derived from patches to bsdi that are available at bsdi.com. The resulting make works fine, but there is a hidden problem with setgid. The fix to this is to install make without any setguid bit and not use any load average. Hopefully other people that have ported make-3.62 will correct the errors I've made/overlooked. These patches would not have been done without the ref machine that Julian Elischer has so kindly provided. Jonas Olsson ljo@po.cwru.edu Procedure: ========== get make-3.62 from a favorite site zcat make-3.62.tar.Z|tar xvf - patch -p0 < make-3.62.diffs cd make-3.62 make make install Diff File: ========== <start of make-3.62.diffs> diff -rc make-3.62.orig/Makefile make-3.62/Makefile *** make-3.62.orig/Makefile Tue Oct 29 18:04:26 1991 --- make-3.62/Makefile Sun Oct 25 14:52:47 1992 *************** *** 38,45 **** # without complaint but produce losing code, # so beware. # NeXT 1.0a uses an old version of GCC, which required -D__inline=inline. ! defines = ! # Define these for your system as follows: # -DUMAX Encore UMAX # -DUMAX_43 Encore UMAX 4.3 (also define UMAX) --- 38,44 ---- # without complaint but produce losing code, # so beware. # NeXT 1.0a uses an old version of GCC, which required -D__inline=inline. ! defines =-UPOSIX # Define these for your system as follows: # -DUMAX Encore UMAX # -DUMAX_43 Encore UMAX 4.3 (also define UMAX) *************** *** 52,58 **** # Define: # -DNLIST_NAME_UNION If `struct nlist' has a n_un member. # -DNLIST_NAME_ARRAY If `n_name' is an array. ! LOAD_AVG = # If you don't want archive support, comment these out. ARCHIVES = arscan.o ar.o --- 51,57 ---- # Define: # -DNLIST_NAME_UNION If `struct nlist' has a n_un member. # -DNLIST_NAME_ARRAY If `n_name' is an array. ! LOAD_AVG =-DNO_LDAV # If you don't want archive support, comment these out. ARCHIVES = arscan.o ar.o *************** *** 80,92 **** # Comment this out if POSIX.2 glob is installed on your system # (it's in the GNU C Library, so if you're using that, this is # not needed at all.) ! globdep = glob/libglob.a # Library containing POSIX.2 `glob' function. # Comment this line out if it's in the C library (which is the case if you # are using the GNU C Library), or change it to the appropriate file name # or -l switch. ! globlib = $(globdep) # Name under which to install GNU make. instname = make --- 79,91 ---- # Comment this out if POSIX.2 glob is installed on your system # (it's in the GNU C Library, so if you're using that, this is # not needed at all.) ! # globdep = glob/libglob.a # Library containing POSIX.2 `glob' function. # Comment this line out if it's in the C library (which is the case if you # are using the GNU C Library), or change it to the appropriate file name # or -l switch. ! # globlib = $(globdep) # Name under which to install GNU make. instname = make *************** *** 160,167 **** $(bindir)/$(instname): make cp make $@.new # These are necessary for load-average checking to work on most Unix machines. ! chgrp $(group) $@.new ! chmod g+s $@.new mv $@.new $@ $(mandir)/$(instname).$(manext): make.man --- 159,166 ---- $(bindir)/$(instname): make cp make $@.new # These are necessary for load-average checking to work on most Unix machines. ! # chgrp $(group) $@.new ! # chmod g+s $@.new mv $@.new $@ $(mandir)/$(instname).$(manext): make.man Only in make-3.62: Makefile~ diff -rc make-3.62.orig/arscan.c make-3.62/arscan.c *** make-3.62.orig/arscan.c Tue Oct 22 18:30:25 1991 --- make-3.62/arscan.c Sat Oct 24 19:16:27 1992 *************** *** 95,101 **** --- 95,105 ---- #if defined(__GNU_LIBRARY__) || defined(POSIX) || defined(_IBMR2) #include <unistd.h> #else + #ifndef __386BSD__ extern int read (), open (), close (), write (), fstat (); + #else + extern int read (), close (), write (), fstat (); + #endif extern long int lseek (), atol (); extern int atoi (); #endif diff -rc make-3.62.orig/job.c make-3.62/job.c *** make-3.62.orig/job.c Thu Oct 24 14:58:33 1991 --- make-3.62/job.c Sat Oct 24 19:03:10 1992 *************** *** 38,44 **** --- 38,46 ---- #else /* Not POSIX. */ #ifndef USG #include <sys/param.h> + #ifndef __386BSD__ #define NGROUPS_MAX NGROUPS + #endif #endif /* Not USG. */ #endif /* POSIX. */ *************** *** 55,67 **** --- 57,73 ---- #include <sys/resource.h> #ifndef wait3 + #ifndef __386BSD__ extern int wait3 (); #endif + #endif #define WAIT_NOHANG(status) \ wait3((union wait *) (status), WNOHANG, (struct rusage *) 0) #if !defined (wait) && !defined (POSIX) + #ifndef __386BSD__ extern int wait (); + #endif #endif #endif /* HAVE_SYS_WAIT || !USG */ #endif /* POSIX. */ diff -rc make-3.62.orig/make.h make-3.62/make.h *** make-3.62.orig/make.h Sat Oct 26 14:19:58 1991 --- make-3.62/make.h Sat Oct 24 19:13:12 1992 *************** *** 222,233 **** extern int sigsetmask (); extern int sigblock (); #endif extern int kill (); extern void abort (), exit (); extern int unlink (), stat (); extern void qsort (); extern int atoi (); ! extern int pipe (), close (), read (), write (), open (); extern long int lseek (); extern char *ctime (); #endif /* GNU C library or POSIX. */ --- 222,238 ---- extern int sigsetmask (); extern int sigblock (); #endif + #ifndef __386BSD__ extern int kill (); + #endif extern void abort (), exit (); extern int unlink (), stat (); extern void qsort (); extern int atoi (); ! extern int pipe (), close (), read (), write (); ! #ifndef __386BSD__ ! extern int open (); ! #endif extern long int lseek (); extern char *ctime (); #endif /* GNU C library or POSIX. */ *************** *** 245,251 **** --- 250,258 ---- #if !defined(__GNU_LIBRARY__) && (!defined(vfork) || !defined(POSIX)) #ifdef POSIX + #ifndef __386BSD__ extern pid_t vfork (); + #endif #else extern int vfork (); #endif diff -rc make-3.62.orig/read.c make-3.62/read.c *** make-3.62.orig/read.c Thu Oct 10 13:20:54 1991 --- make-3.62/read.c Sat Oct 24 18:50:10 1992 *************** *** 25,31 **** --- 25,35 ---- #ifdef __GNU_LIBRARY__ #include <glob.h> #else + #ifndef __386BSD__ #include "glob/glob.h" + #else + #include <glob.h> + #endif /*__386BSD__*/ #endif #include <pwd.h> <end of make-3.62.diffs>