This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: build overhaul [PATCH]


Some notes about questionable things i found while browsing through the
patch:

|> Index: README.template
|> --- README.template	Sat, 09 May 1998 13:36:13 -0400 zack  0.3
|> +++ README.template	Sat, 30 May 1998 15:54:11 -0400 zack  Z.6
|> @@ -90,5 +90,5 @@
|>  you can still send bug reports to <bug-glibc@gnu.org> as normal electronic
|>  mails.
|>  
|> -The GNU C Library is free software.  See the file COPYING.LIB for copying
|> +The GNU C Library is free software.  See the file COPYING for copying
|>  conditions.

What is this good for?  The GNU libc is distributed under the LGPL, not
the GPL, and i don't think that this will change.

|> -ifdef ARCH
|> -ifeq ($(filter /%,$(ARCH)),)
|> -objdir := $(..)$(ARCH)
|> -else
|> -objdir = $(ARCH)
|> -endif

This needs to be re-added somewhere.

|> +config-subdirs = csu assert ctype db2 locale intl catgets math setjmp	\
|> +		 signal stdlib stdio-common $(stdio) malloc string	\
|> +		 wcsmbs time dirent grp pwd posix io termios resource	\
|> +		 misc socket sysvipc gmon gnulib iconv iconvdata	\
|> +		 wctype manual shadow md5-crypt po argp $(add-ons) nss	\
|> +		 localedata timezone rt $(sysdep-subdirs)		\
|> +		 $(binfmt-subdir)
|> +

|> +# These lists are used by `make dist' and a few others.
|> +all-subdirs =	aout argp assert bare catgets csu ctype db db2 dirent	\
|> +		elf gmon gnulib grp hesiod iconv iconvdata inet intl	\
|> +		io libio locale localedata login malloc manual math	\
|> +		md5-crypt misc nis nscd nss po posix pwd resolv		\
|> +		resource rt setjmp shadow signal socket stdio		\
|> +		stdio-common stdlib streams string sunrpc sysvipc	\
|> +		termios time timezone wcsmbs wctype hurd mach		\

Why nearly the same list in two places?  This is error prone.  Use another
variable to record the common members and compute the others from it.

|> +$(objpfx)dir-dist:

This should depend on something, otherwise it will never be remade once it
exists.

|> +ifeq (yes,$(build-static))
|> +others: $(objpfx)libdl.a
|> +$(objpfx)libdl.a: $(libdl-routines:%=$(objpfx)%.o)
|> +	$(build-extra-lib)
|> +install-lib += libdl.a
|> +endif
|> +
|> +ifeq (yes,$(build-shared))
|> +others: $(objpfx)libdl.so$(libdl.so-version)
|> +$(objpfx)libdl.so$(libdl.so-version): $(objpfx)libdl.so
|> +	$(make-link)
|> +$(objpfx)libdl_pic.a: $(libdl-routines:%=$(objpfx)%.os)
|> +	$(build-extra-lib)
|> +endif
|> +

Why not autogenerate the rules via $(object-suffixes) and $(libtype%)?
This will magically restore the profiled, debugged and bounded version.

|> +# Kludge.
|> +$(common-objpfx)libc_pic.a:
|> +	$(MAKE) -C $(..) -f Make-top $@

$@ must be changed to be relative to $(..).

|> -glibc-doc-$(edition).tar: $(doc-only-dist) $(distribute)

Does it mean that there won't be a separate glibc-doc distribution any
more?

|> Index: scripts/unT.c
|> --- scripts/unT.c	Sat, 30 May 1998 18:41:01 -0400 zack ()
|> +++ scripts/unT.c	Sat, 30 May 1998 15:54:11 -0400 zack 
|> @@ -0,0 +1,42 @@
|> +/* unT.c
|> + *
|> + * This program does exactly one thing: it takes a list of filenames
|> + * as arguments, and it chops 'T' off the end of their names.
|> + *
|> + * It's written to be fast and dumb, since it is only used from a script
|> + * and during its execution NO DYNAMICALLY LINKED PROGRAM CAN RUN.
|> + * No attempt is made to recover from errors.  If it fails you're toast.
|> + */
|> +
|> +#include <unistd.h>
|> +#include <string.h>
|> +#include <stdlib.h>
|> +
|> +#define max(x, y) (((x) >= (y)) ? (x) : (y))
|> +int
|> +main(int argc, char **argv)
|> +{
|> +    char *cur, *new;
|> +    int bufsiz = 1024, len;
|> +
|> +    new = malloc(bufsiz);
|> +    

This does not conform to the GNU coding standards.  Please filter it
through indent.  Also, since it is built with the host compiler it must be
able to cope with absent <string.h> and <stdlib.h>.  The host compiler has
never been required to be GCC.

|> Index: scripts/tarprefix.c
|> --- scripts/tarprefix.c	Sat, 30 May 1998 18:41:01 -0400 zack ()
|> +++ scripts/tarprefix.c	Sat, 30 May 1998 15:54:11 -0400 zack 
|> @@ -0,0 +1,165 @@
|> +/* tarprefix.c
|> +   Copy the tarfile on stdin to stdout, prepending all filenames
|> +   with the single argument. */
|> +
|> +#include <sys/types.h>
|> +#include <stdlib.h>
|> +#include <string.h>
|> +#include <unistd.h>
|> +#include <stdio.h>
|> +#include <errno.h>
|> +#include <fcntl.h>
|> +
|> +/* Tarfile info */
|> +#define MAGIC "ustar  "

This needs to be able to cope with true POSIX tar files and maybe the old
V7 format.  See the tar sources for more information.

Andreas.

-- 
Andreas Schwab                                      "And now for something
schwab@issan.informatik.uni-dortmund.de              completely different"
schwab@gnu.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]