Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!rutgers!okstate!uokmax!rmtodd
From: rmtodd@uokmax.UUCP (Richard Michael Todd)
Newsgroups: comp.os.minix
Subject: Re: rebuilding libc.a
Message-ID: <629@uokmax.UUCP>
Date: Tue, 21-Jul-87 22:57:38 EDT
Article-I.D.: uokmax.629
Posted: Tue Jul 21 22:57:38 1987
Date-Received: Fri, 24-Jul-87 00:50:40 EDT
References: <364@louie.udel.EDU>
Reply-To: rmtodd@uokmax.UUCP (Richard Michael Todd)
Organization: University of Oklahoma, Norman
Lines: 44

In article <364@louie.udel.EDU> ncoverby%NDSUVAX.BITNET@wiscvm.wisc.edu writes:
>From: Glen Overby 
>I have been attempting to recompile Minix with the V1.2 patches posted
>recently, but there are a few routines missing from the v1.1 libc.a. All
>the missing routines exist in source form, but when I compiled them and
>appended them to the archive (ar r), cc still reports some missing routines
>(which ARE in libc.a), so apparently my libc.a needs to be re-ordered.
>My question: has anybody rebuilt the Minix library from scratch ON MINIX,
>and how did you do it?
'ar r' is broke.  It somehow screws up the library ordering.  What I do is
have a subdirectory of src/lib called libobjs, cd to that directory, 
copy libc.a to that directory, unpack EVERYTHING out of it ("ar x libc.a"),
delete libc.a, move my altered versions of the *.s files into the libobjs
directory, and rebuild the archive from scratch with a shell script.  My shell
script consists of "ar av libc.a" commands with the library modules specified
on the command line in order.  An article I recently posted on how to 
fix the library so that all buffers get flushed on exit() contained the shell
script I use to rebuild the library.  Here it is in case you didn't see it the
first time:
--------------------------cut here for make.libc script ------------------
ar av libc.a getgrent.s getpwent.s crypt.s
ar av libc.a fgets.s fprintf.s fputs.s fread.s freopen.s fclose.s
ar av libc.a fopen.s fseek.s ftell.s fwrite.s gets.s scanf.s getc.s printdat.s
ar av libc.a fflush.s setbuf.s sprintf.s doprintf.s putc.s ungetc.s strcmp.s
ar av libc.a access.s chdir.s chmod.s chown.s chroot.s creat.s dup.s dup2.s
ar av libc.a exec.s exit.s fakecleanup.s fork.s isatty.s fstat.s getegid.s getenv.s
ar av libc.a geteuid.s getgid.s getpass.s close.s getuid.s ioctl.s kill.s
ar av libc.a link.s lseek.s malloc.s brk.s brk2.s brksize.s mknod.s mktemp.s
ar av libc.a getpid.s mount.s open.s perror.s pipe.s prints.s read.s setgid.s
ar av libc.a setuid.s sleep.s alarm.s pause.s signal.s catchsig.s stat.s
ar av libc.a stime.s strcat.s strcpy.s strlen.s strncat.s strncmp.s strncpy.s
ar av libc.a sync.s time.s times.s umask.s umount.s unlink.s utime.s wait.s 
ar av libc.a stderr.s write.s syslib.s call.s atoi.s message.s sendrec.s
ar av libc.a printk.s abort.s itoa.s stb.s abs.s atol.s ctype.s index.s bcopy.s
ar av libc.a getutil.s rand.s rindex.s adi.s and.s cii.s cms.s cmu4.s com.s
ar av libc.a csa2.s csb2.s cuu.s .dup.s dvi.s dvi4.s dvu.s dvu4.s exg.s fakfp.s
ar av libc.a gto.s iaar.s ilar.s inn.s ior.s isar.s lar2.s loi.s mli.s mli4.s
ar av libc.a ngi.s nop.s rck.s rmi.s rmi4.s rmu.s rmu4.s rol.s ror.s sar2.s
ar av libc.a sbi.s set.s sli.s sri.s sti.s xor.s error.s unknown.s trp.s
ar av libc.a setjmp.s
--------------------------------------------------------------------------
Richard Todd
USSnail:820 Annie Court,Norman OK 73069
UUCP: {allegra!cbosgd|ihnp4}!okstate!uokmax!rmtodd