mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* kernel 2.6 and networking enhancements
  2004-08-18 23:13 ` Kbuild updates Sam Ravnborg
@ 2004-08-18 21:34   ` Imran Badr
  0 siblings, 0 replies; 11+ messages in thread
From: Imran Badr @ 2004-08-18 21:34 UTC (permalink / raw)
  To: linux-kernel


Hi,
I will really appreciate if someone can point me to documents, notes, papers
etc. about the enhancements in the networking stack of kernel 2.6,
guidelines for NIC driver development to make use of such enhancements,
ipsec offload, tcp offload etc.

Thanks,
Imran.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Kbuild updates
@ 2004-08-18 23:02 Sam Ravnborg
  2004-08-18 23:04 ` kbuild: Fix parallel build Sam Ravnborg
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Sam Ravnborg @ 2004-08-18 23:02 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel, Sam Ravnborg

Another bunch of smallish kbuild updates.

o Fix parrallel build
o Add make C=2 to force check of C code with sparse
o Fiw warnings in binoffset
o Removed dreadful check for undefined symbols in vmlinux
o Delete last occurence of HEAD in kbuild
o Add comments to Makefile.clean
o Introduce CHECKFLAGS enabling make CHECK=mysparse

Patches follows (most have been sent to lkml before).


Significant outstanding items in kbuild land is mainly package
handling.
Several issues needs to be adressed:
- Rename debian directory to deb/debian
- Utilise parallel build with make rpm
- Add one more prm package variant
- Add tar-pkg, targz.pkg
- Find a better way to identify relevant binaries to include in rpm, deb
	- Current KBUILD_IMAGE proves not to be good enough


And a patch relate to control alignment in gcc produced code.
Needs to land some consolidation stuff first. Planning to rename
check_gcc to gcc_option, and include a new one named gcc_option_ok.


For ppc we have a problem with as trashing /dev/null.
This is apperantly due to this code:
BAD_AGCC_AS :=  $(shell echo mftb 5 | $(AS) -mppc -many -o /dev/null >/dev/null 2>&1 && echo 0 || echo 1)
 
It seem like as deletes /dev/null and recreate it.
Not good if run as root - which is needed for modules_install for example.

Would it be considered acceptable to start using mktemp to generate temporary
filenames as part of a normal kernel build?
I do not fully understand the eventual security issues around this!

	Sam

^ permalink raw reply	[flat|nested] 11+ messages in thread

* kbuild: Fix parallel build
  2004-08-18 23:02 Kbuild updates Sam Ravnborg
@ 2004-08-18 23:04 ` Sam Ravnborg
  2004-08-18 23:05 ` kbuild: make C=2 forces sparse run Sam Ravnborg
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Sam Ravnborg @ 2004-08-18 23:04 UTC (permalink / raw)
  To: linux-kernel

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/08/17 22:35:04+02:00 sam@mars.ravnborg.org 
#   kbuild: Fix parallel build in a distclean'ed tree
#   
#   Fixes the following error:
#   make: *** No rule to make target `.tmp_kallsyms2.S', needed by `.tmp_kallsyms2.o'.
#   
#   Problem is that make does not know it have to visit scripts before it can use $(KALLSYMS)
#   $(KALLSYMS) is a dependency to .tmp_kallsyms% but make suddenly complains about
#   .tmp_kallsyms2 for some reasons.
#   
#   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
# 
# Makefile
#   2004/08/17 22:34:48+02:00 sam@mars.ravnborg.org +3 -0
#   Needs to tell make that $(KALLSYMS) is only build after visiting scripts
# 
diff -Nru a/Makefile b/Makefile
--- a/Makefile	2004-08-19 01:04:26 +02:00
+++ b/Makefile	2004-08-19 01:04:26 +02:00
@@ -600,6 +600,9 @@
 .tmp_vmlinux3: $(vmlinux-objs) .tmp_kallsyms2.o arch/$(ARCH)/kernel/vmlinux.lds FORCE
 	$(call if_changed_rule,vmlinux__)
 
+# Needs to visit scripts/ before $(KALLSYMS) can be used.
+$(KALLSYMS): scripts ;
+
 endif
 
 # Finally the vmlinux rule

^ permalink raw reply	[flat|nested] 11+ messages in thread

* kbuild: make C=2 forces sparse run
  2004-08-18 23:02 Kbuild updates Sam Ravnborg
  2004-08-18 23:04 ` kbuild: Fix parallel build Sam Ravnborg
@ 2004-08-18 23:05 ` Sam Ravnborg
  2004-08-18 23:06 ` kbuild: Fix warnings in binoffset.c Sam Ravnborg
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Sam Ravnborg @ 2004-08-18 23:05 UTC (permalink / raw)
  To: linux-kernel

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/08/17 23:02:08+02:00 sam@mars.ravnborg.org 
#   kbuild: make C=2 now force sparse to be run for all .c files
#   
#   With make C=2 sparse ($(CHECK)) will be run on all .c files also if they
#   do not need to be compiled.
#   Usefull to run sparse on a fully compiled kernel tree.
#   Implemented on request from Al Viro (although he liked to be able to
#   run sparse without building any source).
#   
#   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
# 
# scripts/Makefile.build
#   2004/08/17 23:01:51+02:00 sam@mars.ravnborg.org +9 -2
#   Allow sparse to be forced to be used - for all .c files.
# 
# Makefile
#   2004/08/17 23:01:51+02:00 sam@mars.ravnborg.org +2 -1
#   Document how to force use of sparse, even when no source needs to be compiled.
# 
diff -Nru a/Makefile b/Makefile
--- a/Makefile	2004-08-19 01:05:30 +02:00
+++ b/Makefile	2004-08-19 01:05:30 +02:00
@@ -958,7 +958,8 @@
 
 	@echo  '  make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build'
 	@echo  '  make O=dir [targets] Locate all output files in "dir", including .config'
-	@echo  '  make C=1   [targets] Check all c source with checker tool'
+	@echo  '  make C=1   [targets] Check all c source with $$CHECK (sparse)'
+	@echo  '  make C=2   [targets] Force check of all c source with $$CHECK (sparse)'
 	@echo  ''
 	@echo  'Execute "make" or "make all" to build all targets marked with [*] '
 	@echo  'For further info see the ./README file'
diff -Nru a/scripts/Makefile.build b/scripts/Makefile.build
--- a/scripts/Makefile.build	2004-08-19 01:05:30 +02:00
+++ b/scripts/Makefile.build	2004-08-19 01:05:30 +02:00
@@ -83,8 +83,13 @@
 
 # Linus' kernel sanity checking tool
 ifneq ($(KBUILD_CHECKSRC),0)
-quiet_cmd_checksrc = CHECK   $<
-      cmd_checksrc = $(CHECK) $(c_flags) $< ;
+  ifeq ($(KBUILD_CHECKSRC),2)
+    quiet_cmd_force_checksrc = CHECK   $<
+          cmd_force_checksrc = $(CHECK) $(c_flags) $< ;
+  else
+      quiet_cmd_checksrc     = CHECK   $<
+            cmd_checksrc     = $(CHECK) $(c_flags) $< ;
+  endif
 endif
 
 
@@ -182,11 +187,13 @@
 # Built-in and composite module parts
 
 %.o: %.c FORCE
+	$(call cmd,force_checksrc)
 	$(call if_changed_rule,cc_o_c)
 
 # Single-part modules are special since we need to mark them in $(MODVERDIR)
 
 $(single-used-m): %.o: %.c FORCE
+	$(call cmd,force_checksrc)
 	$(call if_changed_rule,cc_o_c)
 	@{ echo $(@:.o=.ko); echo $@; } > $(MODVERDIR)/$(@F:.o=.mod)
 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* kbuild: Fix warnings in binoffset.c
  2004-08-18 23:02 Kbuild updates Sam Ravnborg
  2004-08-18 23:04 ` kbuild: Fix parallel build Sam Ravnborg
  2004-08-18 23:05 ` kbuild: make C=2 forces sparse run Sam Ravnborg
@ 2004-08-18 23:06 ` Sam Ravnborg
  2004-08-18 23:07 ` kbuild: Remove last occurrence of HEAD Sam Ravnborg
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Sam Ravnborg @ 2004-08-18 23:06 UTC (permalink / raw)
  To: linux-kernel

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/08/18 00:02:40+02:00 rddunlap@osdl.org 
#   fix warnings in scripts/binoffset.c
#   
#   Correct gcc warnings for function return type, printf argument
#   types, and signed/unsigned compare.
#   
#   Cross-compiled with no warnings/errors for alpha, ia64,
#   ppc32, ppc64, sparc32, sparc64, x86_64, and native on i386.
#   (-W -Wall)
#   
#   [pre-built tool chains are available from:
#   http://developer.osdl.org/dev/plm/cross_compile/ ]
#   
#   Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
#   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
# 
# scripts/binoffset.c
#   2004/08/10 05:28:01+02:00 rddunlap@osdl.org +6 -6
#   fix warnings in scripts/binoffset.c
# 
diff -Nru a/scripts/binoffset.c b/scripts/binoffset.c
--- a/scripts/binoffset.c	2004-08-19 01:06:15 +02:00
+++ b/scripts/binoffset.c	2004-08-19 01:06:15 +02:00
@@ -41,7 +41,7 @@
 char		*progname;
 char		*inputname;
 int		inputfd;
-int		bix;			/* buf index */
+unsigned int	bix;			/* buf index */
 unsigned char	patterns [PAT_SIZE] = {0}; /* byte-sized pattern array */
 int		pat_len;		/* actual number of pattern bytes */
 unsigned char	*madr;			/* mmap address */
@@ -58,7 +58,7 @@
 	exit (1);
 }
 
-int get_pattern (int pat_count, char *pats [])
+void get_pattern (int pat_count, char *pats [])
 {
 	int ix, err, tmp;
 
@@ -81,7 +81,7 @@
 	pat_len = pat_count;
 }
 
-int search_pattern (void)
+void search_pattern (void)
 {
 	for (bix = 0; bix < filesize; bix++) {
 		if (madr[bix] == patterns[0]) {
@@ -109,7 +109,7 @@
 	struct stat stat;
 
 	err = fstat (fd, &stat);
-	fprintf (stderr, "filesize: %d\n", err < 0 ? err : stat.st_size);
+	fprintf (stderr, "filesize: %ld\n", err < 0 ? (long)err : stat.st_size);
 	if (err < 0)
 		return err;
 	return (size_t) stat.st_size;
@@ -154,8 +154,8 @@
 	fprintf (stderr, "number of pattern matches = %d\n", num_matches);
 	if (num_matches == 0)
 		firstloc = ~0;
-	printf ("%d\n", firstloc);
-	fprintf (stderr, "%d\n", firstloc);
+	printf ("%ld\n", firstloc);
+	fprintf (stderr, "%ld\n", firstloc);
 
 	exit (num_matches ? 0 : 2);
 }

^ permalink raw reply	[flat|nested] 11+ messages in thread

* kbuild: Remove last occurrence of HEAD
  2004-08-18 23:02 Kbuild updates Sam Ravnborg
                   ` (2 preceding siblings ...)
  2004-08-18 23:06 ` kbuild: Fix warnings in binoffset.c Sam Ravnborg
@ 2004-08-18 23:07 ` Sam Ravnborg
  2004-08-18 23:08 ` kbuild: Add comments to Makefile.clean Sam Ravnborg
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Sam Ravnborg @ 2004-08-18 23:07 UTC (permalink / raw)
  To: linux-kernel

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/08/18 23:09:23+02:00 coywolf@greatcn.org 
#   kbuild: remove obsolete HEAD in kbuild
#   
#   Makefile: remove obsolete HEAD
#   arch/cris/Makefile: replace HEAD with assignment to head-y
#   
#   
#   Signed-off-by: Coywolf Qi Hunt <coywolf@greatcn.org>
#   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
# 
# arch/cris/Makefile
#   2004/08/18 04:48:40+02:00 coywolf@greatcn.org +1 -1
#   kbuild: remove obsolete HEAD in kbuild
# 
# Makefile
#   2004/08/15 11:46:41+02:00 coywolf@greatcn.org +0 -1
#   kbuild: remove obsolete HEAD in kbuild
# 
diff -Nru a/Makefile b/Makefile
--- a/Makefile	2004-08-19 01:07:24 +02:00
+++ b/Makefile	2004-08-19 01:07:24 +02:00
@@ -510,7 +510,6 @@
 #       normal descending-into-subdirs phase, since at that time
 #       we cannot yet know if we will need to relink vmlinux.
 #	So we descend into init/ inside the rule for vmlinux again.
-head-y += $(HEAD)
 vmlinux-objs := $(head-y) $(init-y) $(core-y) $(libs-y) $(drivers-y) $(net-y)
 
 quiet_cmd_vmlinux__ = LD      $@
diff -Nru a/arch/cris/Makefile b/arch/cris/Makefile
--- a/arch/cris/Makefile	2004-08-19 01:07:24 +02:00
+++ b/arch/cris/Makefile	2004-08-19 01:07:24 +02:00
@@ -39,7 +39,7 @@
 CFLAGS += -fno-omit-frame-pointer
 endif
 
-HEAD := arch/$(ARCH)/$(SARCH)/kernel/head.o
+head-y := arch/$(ARCH)/$(SARCH)/kernel/head.o
 
 LIBGCC = $(shell $(CC) $(CFLAGS) -print-file-name=libgcc.a)
 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* kbuild: Add comments to Makefile.clean
  2004-08-18 23:02 Kbuild updates Sam Ravnborg
                   ` (3 preceding siblings ...)
  2004-08-18 23:07 ` kbuild: Remove last occurrence of HEAD Sam Ravnborg
@ 2004-08-18 23:08 ` Sam Ravnborg
  2004-08-18 23:09 ` kbuild: Added CHECKFLAGS to enable 'make CHECK=mysparse' Sam Ravnborg
  2004-08-18 23:13 ` Kbuild updates Sam Ravnborg
  6 siblings, 0 replies; 11+ messages in thread
From: Sam Ravnborg @ 2004-08-18 23:08 UTC (permalink / raw)
  To: linux-kernel

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/08/18 23:17:03+02:00 sam@mars.ravnborg.org 
#   kbuild: add comments to Makefile.clean
#   
#   Chris Wedgwood <cw@f00f.org> wrote:
#   > P.S. I'd love to see the rules in scripts/Makefile.* documented.  I
#   >      would offer a patch for this but I don't understand the rules
#   >      myself...
#   And provided the following patch, slightly modified by me.
#   
#   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
# 
# scripts/Makefile.clean
#   2004/08/18 23:16:47+02:00 sam@mars.ravnborg.org +12 -0
#   Add comments
# 
diff -Nru a/scripts/Makefile.clean b/scripts/Makefile.clean
--- a/scripts/Makefile.clean	2004-08-19 01:08:07 +02:00
+++ b/scripts/Makefile.clean	2004-08-19 01:08:07 +02:00
@@ -29,13 +29,25 @@
 # Add subdir path
 
 subdir-ymn	:= $(addprefix $(obj)/,$(subdir-ymn))
+
+# build a list of files to remove, usually releative to the current
+# directory
+
 __clean-files	:= $(extra-y) $(EXTRA_TARGETS) $(always) \
 		   $(targets) $(clean-files)             \
 		   $(host-progs)                         \
 		   $(hostprogs-y) $(hostprogs-m) $(hostprogs-)
+
+# as clean-files is given relative to the current directory, this adds
+# a $(obj) prefix, except for absolute paths
+
 __clean-files   := $(wildcard                                               \
                    $(addprefix $(obj)/, $(filter-out /%, $(__clean-files))) \
 		   $(filter /%, $(__clean-files)))
+
+# as clean-dirs is given relative to the current directory, this adds
+# a $(obj) prefix, except for absolute paths
+
 __clean-dirs    := $(wildcard                                               \
                    $(addprefix $(obj)/, $(filter-out /%, $(clean-dirs)))    \
 		   $(filter /%, $(clean-dirs)))

^ permalink raw reply	[flat|nested] 11+ messages in thread

* kbuild: Added CHECKFLAGS to enable 'make CHECK=mysparse'
  2004-08-18 23:02 Kbuild updates Sam Ravnborg
                   ` (4 preceding siblings ...)
  2004-08-18 23:08 ` kbuild: Add comments to Makefile.clean Sam Ravnborg
@ 2004-08-18 23:09 ` Sam Ravnborg
  2004-08-18 23:13 ` Kbuild updates Sam Ravnborg
  6 siblings, 0 replies; 11+ messages in thread
From: Sam Ravnborg @ 2004-08-18 23:09 UTC (permalink / raw)
  To: linux-kernel

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/08/18 23:31:32+02:00 sam@mars.ravnborg.org 
#   kbuild/all archs: added CHECKFLAGS
#   
#   Using separate assignment for CHECKFLAGS allows convenient redefinition of CHECK
#   on the command line:
#   make CHECK=~/bin64/sparse C=2
#   to use a special 64 bit version.
#   Introduced usage in all archs that assined values to CHECK.
#   
#   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
# 
# scripts/Makefile.build
#   2004/08/18 23:31:15+02:00 sam@mars.ravnborg.org +2 -2
#   Use CHECKFLAGS
# 
# arch/x86_64/Makefile
#   2004/08/18 23:31:15+02:00 sam@mars.ravnborg.org +1 -1
#   Replace assigment to CHECK with assignment to CHECKFLAGS
# 
# arch/sparc64/Makefile
#   2004/08/18 23:31:15+02:00 sam@mars.ravnborg.org +1 -1
#   Replace assigment to CHECK with assignment to CHECKFLAGS
# 
# arch/sparc/Makefile
#   2004/08/18 23:31:15+02:00 sam@mars.ravnborg.org +1 -1
#   Replace assigment to CHECK with assignment to CHECKFLAGS
# 
# arch/ppc64/Makefile
#   2004/08/18 23:31:15+02:00 sam@mars.ravnborg.org +1 -1
#   Replace assigment to CHECK with assignment to CHECKFLAGS
# 
# arch/ppc/Makefile
#   2004/08/18 23:31:15+02:00 sam@mars.ravnborg.org +1 -1
#   Replace assigment to CHECK with assignment to CHECKFLAGS
# 
# arch/m68k/Makefile
#   2004/08/18 23:31:15+02:00 sam@mars.ravnborg.org +1 -1
#   Replace assigment to CHECK with assignment to CHECKFLAGS
# 
# arch/i386/Makefile
#   2004/08/18 23:31:15+02:00 sam@mars.ravnborg.org +1 -1
#   Replace assigment to CHECK with assignment to CHECKFLAGS
# 
# arch/arm/Makefile
#   2004/08/18 23:31:15+02:00 sam@mars.ravnborg.org +1 -1
#   Replace assigment to CHECK with assignment to CHECKFLAGS
# 
# arch/alpha/Makefile
#   2004/08/18 23:31:15+02:00 sam@mars.ravnborg.org +1 -1
#   Replace assigment to CHECK with assignment to CHECKFLAGS
# 
# Makefile
#   2004/08/18 23:31:15+02:00 sam@mars.ravnborg.org +2 -1
#   Introduce CHECKFLAGS
# 
diff -Nru a/Makefile b/Makefile
--- a/Makefile	2004-08-19 01:08:59 +02:00
+++ b/Makefile	2004-08-19 01:08:59 +02:00
@@ -285,6 +285,7 @@
 KALLSYMS	= scripts/kallsyms
 PERL		= perl
 CHECK		= sparse
+CHECKFLAGS     :=
 MODFLAGS	= -DMODULE
 CFLAGS_MODULE   = $(MODFLAGS)
 AFLAGS_MODULE   = $(MODFLAGS)
@@ -308,7 +309,7 @@
 export	VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \
 	CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
 	CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE \
-	HOSTCXX HOSTCXXFLAGS LDFLAGS_BLOB LDFLAGS_MODULE CHECK
+	HOSTCXX HOSTCXXFLAGS LDFLAGS_BLOB LDFLAGS_MODULE CHECK CHECKFLAGS
 
 export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
 export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE 
diff -Nru a/arch/alpha/Makefile b/arch/alpha/Makefile
--- a/arch/alpha/Makefile	2004-08-19 01:08:59 +02:00
+++ b/arch/alpha/Makefile	2004-08-19 01:08:59 +02:00
@@ -11,7 +11,7 @@
 NM := $(NM) -B
 
 LDFLAGS_vmlinux	:= -static -N #-relax
-CHECK		:= $(CHECK) -D__alpha__=1
+CHECKFLAGS	+= -D__alpha__=1
 cflags-y	:= -pipe -mno-fp-regs -ffixed-8
 
 # Determine if we can use the BWX instructions with GAS.
diff -Nru a/arch/arm/Makefile b/arch/arm/Makefile
--- a/arch/arm/Makefile	2004-08-19 01:08:59 +02:00
+++ b/arch/arm/Makefile	2004-08-19 01:08:59 +02:00
@@ -58,7 +58,7 @@
 CFLAGS		+=-mapcs-32 $(arch-y) $(tune-y) $(call check_gcc,-malignment-traps,-mshort-load-bytes) -msoft-float -Wa,-mno-fpu -Uarm
 AFLAGS		+=-mapcs-32 $(arch-y) $(tune-y) -msoft-float -Wa,-mno-fpu
 
-CHECK		:= $(CHECK) -D__arm__=1
+CHECKFLAGS	+= -D__arm__=1
 
 #Default value
 DATAADDR	:= .
diff -Nru a/arch/i386/Makefile b/arch/i386/Makefile
--- a/arch/i386/Makefile	2004-08-19 01:08:59 +02:00
+++ b/arch/i386/Makefile	2004-08-19 01:08:59 +02:00
@@ -18,7 +18,7 @@
 LDFLAGS		:= -m elf_i386
 OBJCOPYFLAGS	:= -O binary -R .note -R .comment -S
 LDFLAGS_vmlinux :=
-CHECK		:= $(CHECK) -D__i386__=1
+CHECKFLAGS	+= -D__i386__=1
 
 CFLAGS += -pipe -msoft-float
 
diff -Nru a/arch/m68k/Makefile b/arch/m68k/Makefile
--- a/arch/m68k/Makefile	2004-08-19 01:08:59 +02:00
+++ b/arch/m68k/Makefile	2004-08-19 01:08:59 +02:00
@@ -28,7 +28,7 @@
 LDFLAGS_vmlinux = -N
 endif
 
-CHECK := $(CHECK) -D__mc68000__=1 -I$(shell $(CC) -print-file-name=include)
+CHECKFLAGS += -D__mc68000__=1 -I$(shell $(CC) -print-file-name=include)
 
 # without -fno-strength-reduce the 53c7xx.c driver fails ;-(
 CFLAGS += -pipe -fno-strength-reduce -ffixed-a2
diff -Nru a/arch/ppc/Makefile b/arch/ppc/Makefile
--- a/arch/ppc/Makefile	2004-08-19 01:08:59 +02:00
+++ b/arch/ppc/Makefile	2004-08-19 01:08:59 +02:00
@@ -27,7 +27,7 @@
 		-ffixed-r2 -Wno-uninitialized -mmultiple
 CPP		= $(CC) -E $(CFLAGS)
 
-CHECK		:= $(CHECK) -D__powerpc__=1
+CHECKFLAGS	+= -D__powerpc__=1
 
 ifndef CONFIG_E500
 CFLAGS		+= -mstring
diff -Nru a/arch/ppc64/Makefile b/arch/ppc64/Makefile
--- a/arch/ppc64/Makefile	2004-08-19 01:08:59 +02:00
+++ b/arch/ppc64/Makefile	2004-08-19 01:08:59 +02:00
@@ -22,7 +22,7 @@
 CC		:= $(CC) -m64
 endif
 
-CHECK		:= $(CHECK) -m64 -D__powerpc__=1
+CHECKFLAGS	+= -m64 -D__powerpc__=1
 
 LDFLAGS		:= -m elf64ppc
 LDFLAGS_vmlinux	:= -Bstatic -e $(KERNELLOAD) -Ttext $(KERNELLOAD)
diff -Nru a/arch/sparc/Makefile b/arch/sparc/Makefile
--- a/arch/sparc/Makefile	2004-08-19 01:08:59 +02:00
+++ b/arch/sparc/Makefile	2004-08-19 01:08:59 +02:00
@@ -13,7 +13,7 @@
 
 AS              := $(AS) -32
 LDFLAGS		:= -m elf32_sparc
-CHECK		:= $(CHECK) -D__sparc__=1
+CHECKFLAGS	+= -D__sparc__=1
 
 #CFLAGS := $(CFLAGS) -g -pipe -fcall-used-g5 -fcall-used-g7
 CFLAGS := $(CFLAGS) -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
diff -Nru a/arch/sparc64/Makefile b/arch/sparc64/Makefile
--- a/arch/sparc64/Makefile	2004-08-19 01:08:59 +02:00
+++ b/arch/sparc64/Makefile	2004-08-19 01:08:59 +02:00
@@ -8,7 +8,7 @@
 # Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz)
 #
 
-CHECK		:= $(CHECK) -D__sparc__=1 -D__sparc_v9__=1
+CHECKFLAGS	+= -D__sparc__=1 -D__sparc_v9__=1
 
 CPPFLAGS_vmlinux.lds += -Usparc
 
diff -Nru a/arch/x86_64/Makefile b/arch/x86_64/Makefile
--- a/arch/x86_64/Makefile	2004-08-19 01:08:59 +02:00
+++ b/arch/x86_64/Makefile	2004-08-19 01:08:59 +02:00
@@ -37,7 +37,7 @@
 OBJCOPYFLAGS	:= -O binary -R .note -R .comment -S
 LDFLAGS_vmlinux := -e stext
 
-CHECK           := $(CHECK) -D__x86_64__=1
+CHECKFLAGS      += -D__x86_64__=1
 
 cflags-$(CONFIG_MK8) += $(call check_gcc,-march=k8,)
 cflags-$(CONFIG_MPSC) += $(call check_gcc,-march=nocona,)
diff -Nru a/scripts/Makefile.build b/scripts/Makefile.build
--- a/scripts/Makefile.build	2004-08-19 01:08:59 +02:00
+++ b/scripts/Makefile.build	2004-08-19 01:08:59 +02:00
@@ -85,10 +85,10 @@
 ifneq ($(KBUILD_CHECKSRC),0)
   ifeq ($(KBUILD_CHECKSRC),2)
     quiet_cmd_force_checksrc = CHECK   $<
-          cmd_force_checksrc = $(CHECK) $(c_flags) $< ;
+          cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< ;
   else
       quiet_cmd_checksrc     = CHECK   $<
-            cmd_checksrc     = $(CHECK) $(c_flags) $< ;
+            cmd_checksrc     = $(CHECK) $(CHECKFLAGS) $(c_flags) $< ;
   endif
 endif
 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Kbuild updates
  2004-08-18 23:02 Kbuild updates Sam Ravnborg
                   ` (5 preceding siblings ...)
  2004-08-18 23:09 ` kbuild: Added CHECKFLAGS to enable 'make CHECK=mysparse' Sam Ravnborg
@ 2004-08-18 23:13 ` Sam Ravnborg
  2004-08-18 21:34   ` kernel 2.6 and networking enhancements Imran Badr
  6 siblings, 1 reply; 11+ messages in thread
From: Sam Ravnborg @ 2004-08-18 23:13 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel

On Thu, Aug 19, 2004 at 01:02:52AM +0200, Sam Ravnborg wrote:
> Another bunch of smallish kbuild updates.

Everything pushed to:
bk://linux-sam.bkbits.net/kbuild for BK users.

	Sam

^ permalink raw reply	[flat|nested] 11+ messages in thread

* kbuild updates
@ 2004-08-30 19:39 Sam Ravnborg
  0 siblings, 0 replies; 11+ messages in thread
From: Sam Ravnborg @ 2004-08-30 19:39 UTC (permalink / raw)
  To: Andrew Morton, Linus Torvalds, linux-kernel, Sam Ravnborg

Hi Linus, Andrew, lkml.

Here follows a few kbuild updates.
None of these are critical fixes so they may live in -mm for a while,
but safe to add to mainline.

o Adaptions for solaris and cygwin
  - I would be happy to hear reports of outstanding issues when
  building a kernel on non-linux platforms
  - The primary target group for this is embedded people that
  often use non-Linux environements.
  
o new static analyser tool 'namespacecheck' from Keith Owens.
  - Try it on your code and fix the issues
  - The kernel shall be build before running the tool:
    -> make namespacecheck
    Read comments in scripts/namespacecheck.pl to interpret the output
  - The output is comprehensive: ~8000 lines for allmodconfig kernel

Patches not previously posted will be posted to lkml.

Everything pushed to:
bk://linux-sam.bkbits.net/kbuild

	Sam

^ permalink raw reply	[flat|nested] 11+ messages in thread

* kbuild updates
@ 2004-08-13 19:28 Sam Ravnborg
  0 siblings, 0 replies; 11+ messages in thread
From: Sam Ravnborg @ 2004-08-13 19:28 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton; +Cc: Linus Torvalds

This is the accumulated list of kbuild patches.
Mostly trivial stuff but also a bit of interest:

o replaced host-progs with hostprogs-y
o Use a shell script to generate System.map
	Includes check for undefined symbols in vmlinux
	Filter out __crc_ from System.map
  -> This replaces two other patches in -mm
	- rmk's ldchk function
	- wli btfixup patch, number 13 in his serie
  This patch replaces both
o Randy's patch to put version in .config
o One patch to a few files so we use POSIX header in some of the
  tools. 
  This is a slow start on improving the build on non-linux platforms.

This does in no way clear my kbuild queue - but the rest
is put on hold for a while.

Everything pushed to:
bk://linux-sam.bkbits.net/kbuild

When the patches has been in -mm for a while they will be pushed
to Linus.
None of this is pre 2.6.8 material.

Patches will follow in seperate mails.

	Sam

 
 

Files touched:

 Documentation/DocBook/Makefile     |    4 
 Documentation/kbuild/makefiles.txt |   50 ++++++++----
 Makefile                           |   37 ++++++--
 arch/alpha/boot/Makefile           |    2 
 arch/i386/boot/Makefile            |    4 
 arch/ppc/boot/Makefile             |    4 
 arch/ppc64/boot/Makefile           |    4 
 arch/sparc/boot/Makefile           |   42 +++++++---
 arch/sparc64/boot/Makefile         |    2 
 arch/um/sys-i386/util/Makefile     |    4 
 arch/x86_64/boot/Makefile          |    2 
 drivers/atm/Makefile               |    2 
 drivers/md/Makefile                |    2 
 drivers/media/dvb/ttpci/Makefile   |    2 
 drivers/pci/Makefile               |    2 
 drivers/zorro/Makefile             |    2 
 lib/Makefile                       |    2 
 scripts/Makefile                   |   17 ++--
 scripts/Makefile.build             |   94 ++--------------------
 scripts/Makefile.clean             |   32 +++++--
 scripts/Makefile.host              |  154 +++++++++++++++++++++++++++++++++++++
 scripts/Makefile.lib               |   49 -----------
 scripts/basic/Makefile             |    4 
 scripts/basic/fixdep.c             |    2 
 scripts/genksyms/Makefile          |    4 
 scripts/kconfig/Makefile           |    2 
 scripts/kconfig/confdata.c         |   17 +++-
 scripts/lxdialog/Makefile          |    4 
 scripts/mksysmap                   |   61 ++++++++++++++
 scripts/mod/Makefile               |    4 
 scripts/mod/sumversion.c           |    2 
 scripts/package/Makefile           |    6 -
 sound/oss/Makefile                 |    2 
 usr/Makefile                       |    2 
 34 files changed, 406 insertions(+), 217 deletions(-)

through these ChangeSets:

<sam@mars.ravnborg.org> (04/08/13 1.1912)
   kbuild: __crc_* symbols in System.map
   
   David S. Miller <davem@redhat.com> wrote:
   Shouldn't we be grepping __crc_ symbols out of the System.map file?
   
   For one thing, these can confuse readprofile.  It's algorithm is
   to start at _stext, then stop when it sees a line in the System.map
   which is not text (mode is one of 'T' 't' 'W' or 'w')
   
   It will exit early if there are some intermixed __crc_* things in
   there (since they are are mode 'A').
   
   For example, in my current sparc64 kernel I have this:
   
   00000000004cef80 t do_split
   00000000004cf2a0 t add_dirent_to_buf
   00000000004cf5a7 A __crc_init_special_inode
   00000000004cf640 t make_indexed_dir
   00000000004cf900 t ext3_add_entry
   
   So no symbols after add_dirent_to_buf will be shown in the profiling
   output of readprofile.
   
   Implementation ported to mksysmap by Sam.
   Included two System.map related fixes:
   - Print "SYSMAP  System.map" during build
   - Sort symbols in System.map
   
   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

<sam@mars.ravnborg.org> (04/08/10 1.1911)
   kbuild: Use POSIX headers for ntoh functions
   
   From: Benno <benjl@cse.unsw.edu.au>
   When compiling Linux on Mac OSX I had trouble with scripts/sumversion.c.
   It includes <netinet/in.h> to obtain to definitions of htonl and ntohl.
   
   On Mac OSX these are found in <arpa/inet.h>. After checking the POSIX
   specification it appears that this is the correct place to get
   the definitons for these functions.
   
   (http://www.opengroup.org/onlinepubs/009695399/functions/htonl.html)
   
   Using this header also appears to work on Linux (at least with
   Glibc-2.3.2).
   
   It seems clearer to me to go with the POSIX standard than implementing
   #if __APPLE__ style macros, but if such an approach is preferred I can
   supply patches for that instead.
   
   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

<sam@mars.ravnborg.org> (04/08/10 1.1910)
   kbuild: Fix hostprogs-y
   
   Allow the same target to be specified more than once without causing a warnign from make.
   The same target may be specified twice when using the following pattern:
   hostprogs-$(CONFIG_FOO) += program
   hostprogs-$(CONFIG_BAR) += program
   
   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

<sam@mars.ravnborg.org> (04/08/10 1.1909)
   kbuild: Replace host-progs with hostprogs-y
   
   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

<sam@mars.ravnborg.org> (04/08/10 1.1908)
   kbuild: Introduce hostprogs-y, deprecate host-progs
   
   Introducing hostprogs-y allows a user to use the typical Kbuild
   pattern in a Kbuild file:
   hostprogs-$(CONFIG_KALLSYMS) += ...
   
   And then during cleaning the referenced file are still deleted.
   Deprecate the old host-progs assignment but kept the functionlity.
   
   External modules will continue to use host-progs for a while - drawback is
   that they now see a warning.
   Workaround - just assign both variables:
   hostprogs-y := foo
   host-progs  := $(hostprogs-y)
   
   All in-kernel users will be converted in next patch.
   
   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

<sam@mars.ravnborg.org> (04/08/10 1.1907)
   kbuild: Separate out host-progs handling
   
   Concentrating all host-progs functionality in one file made a more
   readable Makefile.lib - and allow for potential reuse of host-progs
   functionality.
   Processing of host-progs related stuff are avoided when no host-progs are specified. 
   
   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

<sam@mars.ravnborg.org> (04/08/09 1.1906)
   kbuild: Accept absolute paths in clean-files and introduce clean-dirs
   
   Teach kbuild to accept absolute paths in clean-files. This avoids using
   clean-rules in several places.
   Introduced clean-dirs to delete complete directories.
   Kept clean-rule - but do not print anything when used.
   Cleaned up a few places now the infrastructure are improved.
   
   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

<sam@mars.ravnborg.org> (04/08/08 1.1905)
   kbuild: Use LINUXINCLUDE to specify include/ directory
   
   Peter Chubb <peterc@gelato.unsw.edu.au> reported that building i386
   on a non-i386 platform failed, because gcc could not locate boot.h.
   Root cause was the extra include2 directory used when using O=
   to specify the output directory.
   Added LINUXINCLUDE as a portable way to specify the include/
   directory, and changed the two users.
   This avoids hardcoding 'include2' in non-kbuild core files.
   
   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

<sam@mars.ravnborg.org> (04/08/08 1.1904)
   kbuild: Selective compile of targets in scripts/
   
   Do not build executables unless needed.
   Same goes for scripts/mod/, descend only when CONFIG_MODULES are enabled.
   With inputs form: Russell King <rmk+lkml@arm.linux.org.uk> and  Brian Gerst <bgerst@quark.didntduck.org>
   
   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

<rddunlap@osdl.org> (04/08/08 1.1903)
   kconfig: save kernel version in .config file
   
   Save kernel version info and date when writing .config file.
   Tested with 'make {menuconfig|xconfig|gconfig}'.
   
   Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

<sam@mars.ravnborg.org> (04/08/08 1.1902)
   kbuild/sparc: Use new generic mksysmap script to generate System.map
   
   o Introduced usage of the mksysmap script.
   o Improved the non-verbose output to look like this:
     BTFIX   arch/sparc/boot/btfix.S
     AS      arch/sparc/boot/btfix.o
     LD      arch/sparc/boot/image
     SYSMAP  arch/sparc/boot/System.map
   
   o No longer generate System.map for each build
   o Use normal AS rule to compile btfix.S
   
   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

<sam@mars.ravnborg.org> (04/08/07 1.1901)
   kbuild: Check for undefined symbols in vmlinux
   
   At least one bin-utils version for ARM is know to ignore undefined
   symbols when performing the final link of vmlinux.
   Add an explicit check for undefined symbols to catch this.
   The check is made in combination with generating the System.map file
   and the actual algorithm is moved to a small shell script - mksysmap.
   
   External symbols with three leading underscores are ignored - sparc
   uses them for the BTFIXUP logic.
   
   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-08-30 19:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-18 23:02 Kbuild updates Sam Ravnborg
2004-08-18 23:04 ` kbuild: Fix parallel build Sam Ravnborg
2004-08-18 23:05 ` kbuild: make C=2 forces sparse run Sam Ravnborg
2004-08-18 23:06 ` kbuild: Fix warnings in binoffset.c Sam Ravnborg
2004-08-18 23:07 ` kbuild: Remove last occurrence of HEAD Sam Ravnborg
2004-08-18 23:08 ` kbuild: Add comments to Makefile.clean Sam Ravnborg
2004-08-18 23:09 ` kbuild: Added CHECKFLAGS to enable 'make CHECK=mysparse' Sam Ravnborg
2004-08-18 23:13 ` Kbuild updates Sam Ravnborg
2004-08-18 21:34   ` kernel 2.6 and networking enhancements Imran Badr
  -- strict thread matches above, loose matches on Subject: below --
2004-08-30 19:39 kbuild updates Sam Ravnborg
2004-08-13 19:28 Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®