[klibc] tiny patch for klibc 0.198

H. Peter Anvin hpa at zytor.com
Mon Feb 7 11:44:15 PST 2005


Harald Dunkel wrote:
> Hi folks,
> 
> attached you can find a tiny patch for klibc-0.198
> to get rid of the symbolic link pointing to the
> kernel sources, and to get rid of some obsolete
> rebuilds during incremental.
> 
> Feel free to include it.
> 

I really *don't* want to include it, since it not necessarily correctly 
assumes that you want to use the running kernel as the basis.  I believe 
it's also wrong for the separated src/obj kernel trees.

Note that you can override the default symlink with KRNLSRC= and KRNLOBJ=.

> diff -ur old/klibc-0.198/ash/Makefile klibc-0.198/ash/Makefile
> --- old/klibc-0.198/ash/Makefile	2005-01-27 22:21:29.000000000 +0100
> +++ klibc-0.198/ash/Makefile	2005-02-06 15:56:36.478233705 +0100
> @@ -111,8 +111,7 @@
>  $(OBJ_NODES): nodes.h
>  $(OBJ_SYNTAX): syntax.h
> 
> -nodes.c nodes.h: mknodes.sh nodetypes nodes.c.pat nodes
> -nodes:
> +nodes.c nodes.h nodes: mknodes.sh nodetypes nodes.c.pat
>  	sh mknodes.sh nodetypes nodes.c.pat .
> 
>  signames.c: mksignames
> diff -ur old/klibc-0.198/utils/Makefile klibc-0.198/utils/Makefile
> --- old/klibc-0.198/utils/Makefile	2004-10-26 04:32:13.000000000 +0200
> +++ klibc-0.198/utils/Makefile	2005-02-06 16:35:45.967773830 +0100
> @@ -10,11 +10,14 @@
>  		insmod uname
>  STATICPROGS := $(patsubst %,static/%,$(PROGS))
>  SHAREDPROGS := $(patsubst %,shared/%,$(PROGS))
> +OBJS        := $(patsubst %,%.o,$(PROGS))
>  LIBOBJS	     = file_mode.o
>  LIBUTILS     = libutils.a
> 
>  all:	$(STATICPROGS) $(SHAREDPROGS)
> 
> +.SECONDARY: $(OBJS)
> +
>  static/%: %.o $(CRT0) $(LIBS) $(LIBUTILS)
>  	mkdir -p static static.g
>  	$(LD) $(LDFLAGS) -o $@ $(CRT0) $< $(LIBUTILS) $(LIBS)
> 

	-hpa



More information about the klibc mailing list