* kbuild + kconfig: Updates
@ 2004-08-15 20:12 Sam Ravnborg
2004-08-15 20:15 ` kbuild: bogus has no CRC warning Sam Ravnborg
` (7 more replies)
0 siblings, 8 replies; 13+ messages in thread
From: Sam Ravnborg @ 2004-08-15 20:12 UTC (permalink / raw)
To: Andrew Morton, linux-kernel; +Cc: Sam Ravnborg
A number of kbuild updates and Randy's Kconfig.debug
Most important stuff is:
o Get rid og bogus "has no CRC" when building external modules
o Rename *.lds.s to *.lds (*)
o Allow external modules to use host-progs
(*) The renaming of the *.lds file has been doen to allow the kernel to
be build with for example Cygwin.
The major outstanding issue with Cygwin/Solaris are availability of
certain .h files for the tools in scripts/* and spread in the tree.
Tested patches that allows the tools to be build under Cygwin/Solaris
are appreciated.
Patches follows this mail.
Everything pushed to:
bk://linux-sam.bkbits.net/kbuild
Sam
^ permalink raw reply [flat|nested] 13+ messages in thread
* kbuild: bogus has no CRC warning
2004-08-15 20:12 kbuild + kconfig: Updates Sam Ravnborg
@ 2004-08-15 20:15 ` Sam Ravnborg
2004-08-15 20:16 ` kbuild: *.lds.s -> *.lds rename. Infrastructure Sam Ravnborg
` (6 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Sam Ravnborg @ 2004-08-15 20:15 UTC (permalink / raw)
To: Andrew Morton, linux-kernel
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/08/15 11:54:27+02:00 sam@mars.ravnborg.org
# kbuild: Bogus "has no CRC" in external module builds
#
# From: Pavel Roskin <proski@gnu.org>
# The recent fixes for the external module build have fixed the major
# breakage, but they left one annoyance unfixed. If CONFIG_MODVERSIONS is
# disabled, a warning is printed for every exported symbol that is has no
# CRC. For instance, I see this when compiling the standalone Orinoco
# driver on Linux 2.6.6-rc3:
#
# *** Warning: "__orinoco_down" [/usr/local/src/orinoco/spectrum_cs.ko] has
# no CRC!
# *** Warning: "hermes_struct_init" [/usr/local/src/orinoco/spectrum_cs.ko]
# has no CRC!
# *** Warning: "free_orinocodev" [/usr/local/src/orinoco/spectrum_cs.ko] has
# no CRC!
# [further warnings skipped]
#
# I have found that the "-i" option for modpost is used for external builds,
# whereas the internal modules use "-o". The "-i" option causes read_dump()
# in modpost.c to be called. This function sets "modversions" variable
# under some conditions that I don't understand. The comment before the
# modversions declarations says: "Are we using CONFIG_MODVERSIONS?"
#
# Apparently modpost fails to answer this question. I think it's better to
# use an explicit option rather than a kludge.
#
# The attached patch adds a new option "-m" that is specified if and only if
# CONFIG_MODVERSIONS is enabled. The patch has been successfully tested
# both with and without CONFIG_MODVERSIONS.
#
# Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
#
# scripts/mod/modpost.c
# 2004/08/15 11:54:12+02:00 sam@mars.ravnborg.org +4 -3
# Do not try to guess modversions - use -m option
#
# scripts/Makefile.modpost
# 2004/08/15 11:54:12+02:00 sam@mars.ravnborg.org +2 -1
# Pass -m option to modpost if CONFIG_MODVERSIONS
#
diff -Nru a/scripts/Makefile.modpost b/scripts/Makefile.modpost
--- a/scripts/Makefile.modpost 2004-08-15 22:14:34 +02:00
+++ b/scripts/Makefile.modpost 2004-08-15 22:14:34 +02:00
@@ -50,7 +50,8 @@
# Step 2), invoke modpost
# Includes step 3,4
quiet_cmd_modpost = MODPOST
- cmd_modpost = scripts/mod/modpost \
+ cmd_modpost = scripts/mod/modpost \
+ $(if $(CONFIG_MODVERSIONS),-m) \
$(if $(KBUILD_EXTMOD),-i,-o) $(symverfile) \
$(filter-out FORCE,$^)
diff -Nru a/scripts/mod/modpost.c b/scripts/mod/modpost.c
--- a/scripts/mod/modpost.c 2004-08-15 22:14:34 +02:00
+++ b/scripts/mod/modpost.c 2004-08-15 22:14:34 +02:00
@@ -343,7 +343,6 @@
crc = (unsigned int) sym->st_value;
add_exported_symbol(symname + strlen(CRC_PFX),
mod, &crc);
- modversions = 1;
}
break;
case SHN_UNDEF:
@@ -649,7 +648,6 @@
if (!(mod = find_module(modname))) {
if (is_vmlinux(modname)) {
- modversions = 1;
have_vmlinux = 1;
}
mod = new_module(NOFAIL(strdup(modname)));
@@ -696,10 +694,13 @@
char *dump_read = NULL, *dump_write = NULL;
int opt;
- while ((opt = getopt(argc, argv, "i:o:")) != -1) {
+ while ((opt = getopt(argc, argv, "i:mo:")) != -1) {
switch(opt) {
case 'i':
dump_read = optarg;
+ break;
+ case 'm':
+ modversions = 1;
break;
case 'o':
dump_write = optarg;
^ permalink raw reply [flat|nested] 13+ messages in thread
* kbuild: *.lds.s -> *.lds rename. Infrastructure
2004-08-15 20:12 kbuild + kconfig: Updates Sam Ravnborg
2004-08-15 20:15 ` kbuild: bogus has no CRC warning Sam Ravnborg
@ 2004-08-15 20:16 ` Sam Ravnborg
2004-08-15 20:17 ` kbuild/all archs: Rename all *.lds.s to *.lds Sam Ravnborg
` (5 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Sam Ravnborg @ 2004-08-15 20:16 UTC (permalink / raw)
To: Andrew Morton, linux-kernel
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/08/15 12:18:07+02:00 sam@mars.ravnborg.org
# kbuild: Generate *.lds instead of *.lds.s
#
# When building a kernel on platforms where the filesytem do
# not distingush between upper and lower case the rule:
# .S -> .s did not work.
# In a normal build this is only used for linker scripts.
# So create a separate rule for .lds files, and use generic cpp flags.
#
# Patch from: Dan Aloni <da-x@colinux.org>
# Modified to use cpp flags + added documentation.
#
# Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
#
# scripts/Makefile.lib
# 2004/08/15 12:17:51+02:00 sam@mars.ravnborg.org +5 -0
# Add flags to be used for generec preprocessing
#
# scripts/Makefile.build
# 2004/08/15 12:17:51+02:00 sam@mars.ravnborg.org +8 -0
# Add specific command for preprocessing linker scripts.
#
# arch/i386/kernel/Makefile
# 2004/08/15 12:17:51+02:00 sam@mars.ravnborg.org +1 -1
# Rename linker script from *lds.s to *.lds
#
# Makefile
# 2004/08/15 12:17:51+02:00 sam@mars.ravnborg.org +7 -7
# Renmae linker scripts from *.lds.s to *.lds
# Set new linker flags
#
# Documentation/kbuild/makefiles.txt
# 2004/08/15 12:17:51+02:00 sam@mars.ravnborg.org +31 -0
# Documented support for *lds files
#
diff -Nru a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
--- a/Documentation/kbuild/makefiles.txt 2004-08-15 22:16:13 +02:00
+++ b/Documentation/kbuild/makefiles.txt 2004-08-15 22:16:13 +02:00
@@ -938,6 +938,37 @@
will be displayed with "make KBUILD_VERBOSE=0".
+--- 6.8 Preprocessing linker scripts
+
+ When the vmlinux image is build the linker script:
+ arch/$(ARCH)/kernel/vmlinux.lds is used.
+ The script is a preprocessed variant of the file vmlinux.lds.S
+ located in the same directory.
+ kbuild knows .lds file and includes a rule *lds.S -> *lds.
+
+ Example:
+ #arch/i386/kernel/Makefile
+ always := vmlinux.lds
+
+ #Makefile
+ export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH)
+
+ The assigment to $(always) is used to tell kbuild to build the
+ target: vmlinux.lds.
+ The assignment to $(CPPFLAGS_vmlinux.lds) tell kbuild to use the
+ specified options when building the target vmlinux.lds.
+
+ When building the *.lds target kbuild used the variakles:
+ CPPFLAGS : Set in top-level Makefile
+ EXTRA_CPPFLAGS : May be set in the kbuild makefile
+ CPPFLAGS_$(@F) : Target specific flags.
+ Note that the full filename is used in this
+ assignment.
+
+ The kbuild infrastructure for *lds file are used in several
+ architecture specific files.
+
+
=== 7 Kbuild Variables
The top Makefile exports the following variables:
diff -Nru a/Makefile b/Makefile
--- a/Makefile 2004-08-15 22:16:13 +02:00
+++ b/Makefile 2004-08-15 22:16:13 +02:00
@@ -545,7 +545,7 @@
quiet_cmd_sysmap = SYSMAP
cmd_sysmap = $(CONFIG_SHELL) $(srctree)/scripts/mksysmap
-LDFLAGS_vmlinux += -T arch/$(ARCH)/kernel/vmlinux.lds.s
+LDFLAGS_vmlinux += -T arch/$(ARCH)/kernel/vmlinux.lds
# Generate section listing all symbols and add it into vmlinux
# It's a three stage process:
@@ -591,13 +591,13 @@
.tmp_kallsyms%.S: .tmp_vmlinux% $(KALLSYMS)
$(call cmd,kallsyms)
-.tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
+.tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds FORCE
$(call if_changed_rule,vmlinux__)
-.tmp_vmlinux2: $(vmlinux-objs) .tmp_kallsyms1.o arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
+.tmp_vmlinux2: $(vmlinux-objs) .tmp_kallsyms1.o arch/$(ARCH)/kernel/vmlinux.lds FORCE
$(call if_changed_rule,vmlinux__)
-.tmp_vmlinux3: $(vmlinux-objs) .tmp_kallsyms2.o arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
+.tmp_vmlinux3: $(vmlinux-objs) .tmp_kallsyms2.o arch/$(ARCH)/kernel/vmlinux.lds FORCE
$(call if_changed_rule,vmlinux__)
endif
@@ -618,13 +618,13 @@
$(rule_verify_kallsyms)
endef
-vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
+vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds FORCE
$(call if_changed_rule,vmlinux)
# The actual objects are generated when descending,
# make sure no implicit rule kicks in
-$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds.s: $(vmlinux-dirs) ;
+$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds: $(vmlinux-dirs) ;
# Handle descending into subdirectories listed in $(vmlinux-dirs)
# Preset locale variables to speed up the build process. Limit locale
@@ -687,7 +687,7 @@
# Leave this as default for preprocessing vmlinux.lds.S, which is now
# done in arch/$(ARCH)/kernel/Makefile
-export AFLAGS_vmlinux.lds.o += -P -C -U$(ARCH)
+export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH)
# Single targets
# ---------------------------------------------------------------------------
diff -Nru a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
--- a/arch/i386/kernel/Makefile 2004-08-15 22:16:13 +02:00
+++ b/arch/i386/kernel/Makefile 2004-08-15 22:16:13 +02:00
@@ -2,7 +2,7 @@
# Makefile for the linux kernel.
#
-extra-y := head.o init_task.o vmlinux.lds.s
+extra-y := head.o init_task.o vmlinux.lds
obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \
ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_i386.o \
diff -Nru a/scripts/Makefile.build b/scripts/Makefile.build
--- a/scripts/Makefile.build 2004-08-15 22:16:13 +02:00
+++ b/scripts/Makefile.build 2004-08-15 22:16:13 +02:00
@@ -219,6 +219,14 @@
targets += $(real-objs-y) $(real-objs-m) $(lib-y)
targets += $(extra-y) $(MAKECMDGOALS) $(always)
+# Linker scripts preprocessor (.lds.S -> .lds)
+# ---------------------------------------------------------------------------
+quiet_cmd_cpp_lds_S = LDS $@
+ cmd_cpp_lds_S = $(CPP) $(cpp_flags) -D__ASSEMBLY__ -o $@ $<
+
+%.lds: %.lds.S FORCE
+ $(call if_changed_dep,cpp_lds_S)
+
# Build the compiled-in targets
# ---------------------------------------------------------------------------
diff -Nru a/scripts/Makefile.lib b/scripts/Makefile.lib
--- a/scripts/Makefile.lib 2004-08-15 22:16:13 +02:00
+++ b/scripts/Makefile.lib 2004-08-15 22:16:13 +02:00
@@ -100,6 +100,7 @@
_c_flags = $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(*F).o)
_a_flags = $(AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o)
+_cpp_flags = $(CPPFLAGS) $(EXTRA_CPPFLAGS) $(CPPFLAGS_$(@F))
# If building the kernel in a separate objtree expand all occurrences
# of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/').
@@ -107,6 +108,7 @@
ifeq ($(KBUILD_SRC),)
__c_flags = $(_c_flags)
__a_flags = $(_a_flags)
+__cpp_flags = $(_cpp_flags)
else
# Prefix -I with $(srctree) if it is not an absolute path
@@ -120,6 +122,7 @@
# FIXME: Replace both with specific CFLAGS* statements in the makefiles
__c_flags = $(call addtree,-I$(obj)) $(call flags,_c_flags)
__a_flags = $(call flags,_a_flags)
+__cpp_flags = $(call flags,_cpp_flags)
endif
c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \
@@ -128,6 +131,8 @@
a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \
$(__a_flags) $(modkern_aflags)
+
+cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(__cpp_flags)
ld_flags = $(LDFLAGS) $(EXTRA_LDFLAGS)
^ permalink raw reply [flat|nested] 13+ messages in thread
* kbuild/all archs: Rename all *.lds.s to *.lds
2004-08-15 20:12 kbuild + kconfig: Updates Sam Ravnborg
2004-08-15 20:15 ` kbuild: bogus has no CRC warning Sam Ravnborg
2004-08-15 20:16 ` kbuild: *.lds.s -> *.lds rename. Infrastructure Sam Ravnborg
@ 2004-08-15 20:17 ` Sam Ravnborg
2004-08-15 20:19 ` kbuild: Delete unnessesary $(wildcard ...) Sam Ravnborg
` (4 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Sam Ravnborg @ 2004-08-15 20:17 UTC (permalink / raw)
To: Andrew Morton, linux-kernel
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/08/15 20:21:00+02:00 sam@mars.ravnborg.org
# kbuild/all archs: Rename *.lds.s to *.lds
#
# For all architectures use the new name for linker definition scripts.
# Based on patch from: Dan Aloni <da-x@colinux.org>
#
# Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
#
# arch/x86_64/kernel/Makefile
# 2004/08/15 20:20:44+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/x86_64/kernel/Makefile-HEAD
# 2004/08/15 20:20:44+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/v850/kernel/Makefile
# 2004/08/15 20:20:44+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/um/kernel/Makefile
# 2004/08/15 20:20:44+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/um/Makefile
# 2004/08/15 20:20:44+02:00 sam@mars.ravnborg.org +4 -4
# Renamed *.lds.s to *.lds
#
# arch/um/Makefile-skas
# 2004/08/15 20:20:44+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/sparc64/kernel/Makefile
# 2004/08/15 20:20:44+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/sparc64/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/sparc/kernel/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/sparc/boot/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/sh64/boot/compressed/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +3 -3
# Renamed *.lds.s to *.lds
#
# arch/sh/kernel/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/sh/boot/compressed/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/sh/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/s390/kernel/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/ppc64/kernel/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/ppc/kernel/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/ppc/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/parisc/kernel/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/mips/kernel/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/mips/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/m68knommu/kernel/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/m68k/kernel/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/ia64/kernel/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +5 -5
# Renamed *.lds.s to *.lds
#
# arch/h8300/kernel/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/cris/kernel/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/cris/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/arm26/kernel/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/arm26/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/arm/kernel/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/arm/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
# arch/alpha/kernel/Makefile
# 2004/08/15 20:20:43+02:00 sam@mars.ravnborg.org +1 -1
# Renamed *.lds.s to *.lds
#
diff -Nru a/arch/alpha/kernel/Makefile b/arch/alpha/kernel/Makefile
--- a/arch/alpha/kernel/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/alpha/kernel/Makefile 2004-08-15 22:17:11 +02:00
@@ -2,7 +2,7 @@
# Makefile for the linux kernel.
#
-extra-y := head.o vmlinux.lds.s
+extra-y := head.o vmlinux.lds
EXTRA_AFLAGS := $(CFLAGS)
EXTRA_CFLAGS := -Werror -Wno-sign-compare
diff -Nru a/arch/arm/Makefile b/arch/arm/Makefile
--- a/arch/arm/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/arm/Makefile 2004-08-15 22:17:11 +02:00
@@ -9,7 +9,7 @@
LDFLAGS_vmlinux :=-p --no-undefined -X
LDFLAGS_BLOB :=--format binary
-AFLAGS_vmlinux.lds.o = -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR)
+CPPFLAGS_vmlinux.lds = -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR)
OBJCOPYFLAGS :=-O binary -R .note -R .comment -S
GZFLAGS :=-9
#CFLAGS +=-pipe
diff -Nru a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
--- a/arch/arm/kernel/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/arm/kernel/Makefile 2004-08-15 22:17:11 +02:00
@@ -26,7 +26,7 @@
head-y := head.o
obj-$(CONFIG_DEBUG_LL) += debug.o
-extra-y := $(head-y) init_task.o vmlinux.lds.s
+extra-y := $(head-y) init_task.o vmlinux.lds
# Spell out some dependencies that aren't automatically figured out
$(obj)/entry-armv.o: $(obj)/entry-header.S include/asm-arm/constants.h
diff -Nru a/arch/arm26/Makefile b/arch/arm26/Makefile
--- a/arch/arm26/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/arm26/Makefile 2004-08-15 22:17:11 +02:00
@@ -9,7 +9,7 @@
LDFLAGS_vmlinux :=-p -X
LDFLAGS_BLOB :=--format binary
-AFLAGS_vmlinux.lds.o = -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR)
+CPPFLAGS_vmlinux.lds = -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR)
OBJCOPYFLAGS :=-O binary -R .note -R .comment -S
GZFLAGS :=-9
diff -Nru a/arch/arm26/kernel/Makefile b/arch/arm26/kernel/Makefile
--- a/arch/arm26/kernel/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/arm26/kernel/Makefile 2004-08-15 22:17:11 +02:00
@@ -14,5 +14,5 @@
obj-$(CONFIG_FIQ) += fiq.o
obj-$(CONFIG_MODULES) += armksyms.o
-extra-y := init_task.o vmlinux.lds.s
+extra-y := init_task.o vmlinux.lds
diff -Nru a/arch/cris/Makefile b/arch/cris/Makefile
--- a/arch/cris/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/cris/Makefile 2004-08-15 22:17:11 +02:00
@@ -29,7 +29,7 @@
OBJCOPYFLAGS := -O binary -R .note -R .comment -S
-AFLAGS_vmlinux.lds.o = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
+CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
AFLAGS += -mlinux
CFLAGS := $(CFLAGS) -mlinux -march=$(arch-y) -pipe
diff -Nru a/arch/cris/kernel/Makefile b/arch/cris/kernel/Makefile
--- a/arch/cris/kernel/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/cris/kernel/Makefile 2004-08-15 22:17:11 +02:00
@@ -3,7 +3,7 @@
# Makefile for the linux kernel.
#
-extra-y := vmlinux.lds.s
+extra-y := vmlinux.lds
obj-y := process.o traps.o irq.o ptrace.o setup.o \
time.o sys_cris.o semaphore.o
diff -Nru a/arch/h8300/kernel/Makefile b/arch/h8300/kernel/Makefile
--- a/arch/h8300/kernel/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/h8300/kernel/Makefile 2004-08-15 22:17:11 +02:00
@@ -2,7 +2,7 @@
# Makefile for the linux kernel.
#
-extra-y := vmlinux.lds.s
+extra-y := vmlinux.lds
obj-y := process.o traps.o ptrace.o ints.o \
sys_h8300.o time.o semaphore.o signal.o \
diff -Nru a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
--- a/arch/ia64/kernel/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/ia64/kernel/Makefile 2004-08-15 22:17:11 +02:00
@@ -2,7 +2,7 @@
# Makefile for the linux kernel.
#
-extra-y := head.o init_task.o vmlinux.lds.s
+extra-y := head.o init_task.o vmlinux.lds
obj-y := acpi.o entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o \
irq_lsapic.o ivt.o machvec.o pal.o patch.o process.o perfmon.o ptrace.o sal.o \
@@ -21,25 +21,25 @@
# The gate DSO image is built using a special linker script.
targets += gate.so gate-syms.o
-extra-y += gate.so gate-syms.o gate.lds.s gate.o
+extra-y := gate.so gate-syms.o gate.lds gate.o
# fp_emulate() expects f2-f5,f16-f31 to contain the user-level state.
CFLAGS_traps.o += -mfixed-range=f2-f5,f16-f31
-AFLAGS_gate.lds.o += -P -C -U$(ARCH)
+CPPFLAGS_gate.lds := -P -C -U$(ARCH)
quiet_cmd_gate = GATE $@
cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@
GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1
-$(obj)/gate.so: $(obj)/gate.lds.s $(obj)/gate.o FORCE
+$(obj)/gate.so: $(obj)/gate.lds $(obj)/gate.o FORCE
$(call if_changed,gate)
$(obj)/built-in.o: $(obj)/gate-syms.o
$(obj)/built-in.o: ld_flags += -R $(obj)/gate-syms.o
GATECFLAGS_gate-syms.o = -r
-$(obj)/gate-syms.o: $(src)/gate.lds.s $(obj)/gate.o FORCE
+$(obj)/gate-syms.o: $(obj)/gate.lds $(obj)/gate.o FORCE
$(call if_changed,gate)
# gate-data.o contains the gate DSO image as data in section .data.gate.
diff -Nru a/arch/m68k/kernel/Makefile b/arch/m68k/kernel/Makefile
--- a/arch/m68k/kernel/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/m68k/kernel/Makefile 2004-08-15 22:17:11 +02:00
@@ -7,7 +7,7 @@
else
extra-y := sun3-head.o
endif
-extra-y += vmlinux.lds.s
+extra-y += vmlinux.lds
obj-y := entry.o process.o traps.o ints.o signal.o ptrace.o \
sys_m68k.o time.o semaphore.o setup.o m68k_ksyms.o
diff -Nru a/arch/m68knommu/kernel/Makefile b/arch/m68knommu/kernel/Makefile
--- a/arch/m68knommu/kernel/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/m68knommu/kernel/Makefile 2004-08-15 22:17:11 +02:00
@@ -2,7 +2,7 @@
# Makefile for arch/m68knommu/kernel.
#
-extra-y := vmlinux.lds.s
+extra-y := vmlinux.lds
obj-y += dma.o entry.o init_task.o m68k_ksyms.o process.o ptrace.o semaphore.o \
setup.o signal.o syscalltable.o sys_m68k.o time.o traps.o
diff -Nru a/arch/mips/Makefile b/arch/mips/Makefile
--- a/arch/mips/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/mips/Makefile 2004-08-15 22:17:11 +02:00
@@ -643,7 +643,7 @@
# none has been choosen above.
#
-AFLAGS_vmlinux.lds.o := \
+CPPFLAGS_vmlinux.lds := \
-D"LOADADDR=$(load-y)" \
-D"JIFFIES=$(JIFFIES)" \
-imacros $(srctree)/include/asm-$(ARCH)/sn/mapped_kernel.h
diff -Nru a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
--- a/arch/mips/kernel/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/mips/kernel/Makefile 2004-08-15 22:17:11 +02:00
@@ -2,7 +2,7 @@
# Makefile for the Linux/MIPS kernel.
#
-extra-y := head.o init_task.o vmlinux.lds.s
+extra-y := head.o init_task.o vmlinux.lds
obj-y += cpu-probe.o branch.o entry.o genex.o irq.o process.o \
ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \
diff -Nru a/arch/parisc/kernel/Makefile b/arch/parisc/kernel/Makefile
--- a/arch/parisc/kernel/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/parisc/kernel/Makefile 2004-08-15 22:17:11 +02:00
@@ -4,7 +4,7 @@
head-y := head.o
head-$(CONFIG_PARISC64) := head64.o
-extra-y := init_task.o $(head-y) vmlinux.lds.s
+extra-y := init_task.o $(head-y) vmlinux.lds
AFLAGS_entry.o := -traditional
AFLAGS_pacache.o := -traditional
diff -Nru a/arch/ppc/Makefile b/arch/ppc/Makefile
--- a/arch/ppc/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/ppc/Makefile 2004-08-15 22:17:11 +02:00
@@ -73,7 +73,7 @@
all: zImage
-AFLAGS_vmlinux.lds.o := -Upowerpc
+CPPFLAGS_vmlinux.lds := -Upowerpc
# All the instructions talk about "make bzImage".
bzImage: zImage
diff -Nru a/arch/ppc/kernel/Makefile b/arch/ppc/kernel/Makefile
--- a/arch/ppc/kernel/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/ppc/kernel/Makefile 2004-08-15 22:17:11 +02:00
@@ -19,7 +19,7 @@
extra-$(CONFIG_8xx) := head_8xx.o
extra-$(CONFIG_6xx) += idle_6xx.o
extra-$(CONFIG_POWER4) += idle_power4.o
-extra-y += vmlinux.lds.s
+extra-y += vmlinux.lds
obj-y := entry.o traps.o irq.o idle.o time.o misc.o \
process.o signal.o ptrace.o align.o \
diff -Nru a/arch/ppc64/kernel/Makefile b/arch/ppc64/kernel/Makefile
--- a/arch/ppc64/kernel/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/ppc64/kernel/Makefile 2004-08-15 22:17:11 +02:00
@@ -3,7 +3,7 @@
#
EXTRA_CFLAGS += -mno-minimal-toc
-extra-y := head.o vmlinux.lds.s
+extra-y := head.o vmlinux.lds
obj-y := setup.o entry.o traps.o irq.o idle.o dma.o \
time.o process.o signal.o syscalls.o misc.o ptrace.o \
diff -Nru a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile
--- a/arch/s390/kernel/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/s390/kernel/Makefile 2004-08-15 22:17:11 +02:00
@@ -10,7 +10,7 @@
extra-$(CONFIG_ARCH_S390_31) += head.o
extra-$(CONFIG_ARCH_S390X) += head64.o
-extra-y += init_task.o vmlinux.lds.s
+extra-y += init_task.o vmlinux.lds
obj-$(CONFIG_MODULES) += s390_ksyms.o module.o
obj-$(CONFIG_SMP) += smp.o
diff -Nru a/arch/sh/Makefile b/arch/sh/Makefile
--- a/arch/sh/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/sh/Makefile 2004-08-15 22:17:11 +02:00
@@ -122,7 +122,7 @@
boot := arch/sh/boot
-AFLAGS_vmlinux.lds.o := -traditional
+CPPFLAGS_vmlinux.lds := -traditional
prepare: target_links
diff -Nru a/arch/sh/boot/compressed/Makefile b/arch/sh/boot/compressed/Makefile
--- a/arch/sh/boot/compressed/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/sh/boot/compressed/Makefile 2004-08-15 22:17:11 +02:00
@@ -22,7 +22,7 @@
CONFIG_BOOT_LINK_OFFSET ?= 0x00800000
IMAGE_OFFSET := $(shell printf "0x%8x" $$[0x80000000+$(CONFIG_MEMORY_START)+$(CONFIG_BOOT_LINK_OFFSET)])
-LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds.s
+LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds
$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE
$(call if_changed,ld)
diff -Nru a/arch/sh/kernel/Makefile b/arch/sh/kernel/Makefile
--- a/arch/sh/kernel/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/sh/kernel/Makefile 2004-08-15 22:17:11 +02:00
@@ -2,7 +2,7 @@
# Makefile for the Linux/SuperH kernel.
#
-extra-y := head.o init_task.o vmlinux.lds.s
+extra-y := head.o init_task.o vmlinux.lds
obj-y := process.o signal.o entry.o traps.o irq.o \
ptrace.o setup.o time.o sys_sh.o semaphore.o \
diff -Nru a/arch/sh64/boot/compressed/Makefile b/arch/sh64/boot/compressed/Makefile
--- a/arch/sh64/boot/compressed/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/sh64/boot/compressed/Makefile 2004-08-15 22:17:11 +02:00
@@ -12,7 +12,7 @@
#
targets := vmlinux vmlinux.bin vmlinux.bin.gz \
- head.o misc.o cache.o piggy.o vmlinux.lds.o
+ head.o misc.o cache.o piggy.o vmlinux.lds
EXTRA_AFLAGS := -traditional
@@ -25,7 +25,7 @@
ZIMAGE_OFFSET = $(shell printf "0x%8x" $$[$(CONFIG_MEMORY_START)+0x400000+0x10000])
LDFLAGS_vmlinux := -Ttext $(ZIMAGE_OFFSET) -e startup \
- -T $(obj)/../../kernel/vmlinux.lds.s \
+ -T $(obj)/../../kernel/vmlinux.lds \
--no-warn-mismatch
$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE
@@ -41,6 +41,6 @@
LDFLAGS_piggy.o := -r --format binary --oformat elf32-sh64-linux -T
OBJCOPYFLAGS += -R .empty_zero_page
-$(obj)/piggy.o: $(obj)/vmlinux.lds.s $(obj)/vmlinux.bin.gz FORCE
+$(obj)/piggy.o: $(obj)/vmlinux.lds $(obj)/vmlinux.bin.gz FORCE
$(call if_changed,ld)
diff -Nru a/arch/sparc/boot/Makefile b/arch/sparc/boot/Makefile
--- a/arch/sparc/boot/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/sparc/boot/Makefile 2004-08-15 22:17:11 +02:00
@@ -37,7 +37,7 @@
BTOBJS := $(HEAD_Y) $(INIT_Y)
BTLIBS := $(CORE_Y) $(LIBS_Y) $(DRIVERS_Y) $(NET_Y)
-LDFLAGS_image := -T arch/sparc/kernel/vmlinux.lds.s $(BTOBJS) \
+LDFLAGS_image := -T arch/sparc/kernel/vmlinux.lds $(BTOBJS) \
--start-group $(BTLIBS) --end-group \
$(kallsyms.o) $(obj)/btfix.o
diff -Nru a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile
--- a/arch/sparc/kernel/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/sparc/kernel/Makefile 2004-08-15 22:17:11 +02:00
@@ -2,7 +2,7 @@
# Makefile for the linux kernel.
#
-extra-y := head.o init_task.o vmlinux.lds.s
+extra-y := head.o init_task.o vmlinux.lds
EXTRA_AFLAGS := -ansi
diff -Nru a/arch/sparc64/Makefile b/arch/sparc64/Makefile
--- a/arch/sparc64/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/sparc64/Makefile 2004-08-15 22:17:11 +02:00
@@ -10,7 +10,7 @@
CHECK := $(CHECK) -D__sparc__=1 -D__sparc_v9__=1
-AFLAGS_vmlinux.lds.o += -Usparc
+CPPFLAGS_vmlinux.lds += -Usparc
CC := $(shell if $(CC) -m64 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo $(CC); else echo sparc64-linux-gcc; fi )
diff -Nru a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile
--- a/arch/sparc64/kernel/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/sparc64/kernel/Makefile 2004-08-15 22:17:11 +02:00
@@ -5,7 +5,7 @@
EXTRA_AFLAGS := -ansi
EXTRA_CFLAGS := -Werror
-extra-y := head.o init_task.o vmlinux.lds.s
+extra-y := head.o init_task.o vmlinux.lds
obj-y := process.o setup.o cpu.o idprom.o \
traps.o devices.o auxio.o \
diff -Nru a/arch/um/Makefile b/arch/um/Makefile
--- a/arch/um/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/um/Makefile 2004-08-15 22:17:11 +02:00
@@ -77,7 +77,7 @@
# CONFIG_MODE_SKAS + CONFIG_STATIC_LINK case.
LINK_TT = -static
-LD_SCRIPT_TT := uml.lds.s
+LD_SCRIPT_TT := uml.lds
ifeq ($(CONFIG_STATIC_LINK),y)
LINK-y += $(LINK_TT)
@@ -98,12 +98,12 @@
CONFIG_KERNEL_STACK_ORDER ?= 2
STACK_SIZE := $(shell echo $$[ 4096 * (1 << $(CONFIG_KERNEL_STACK_ORDER)) ] )
-AFLAGS_vmlinux.lds.o = -U$(SUBARCH) \
+CPPFLAGS_vmlinux.lds = -U$(SUBARCH) \
-DSTART=$$(($(TOP_ADDR) - $(SIZE))) -DELF_ARCH=$(ELF_ARCH) \
-DELF_FORMAT=\"$(ELF_FORMAT)\" $(CPP_MODE_TT) \
-DKERNEL_STACK_SIZE=$(STACK_SIZE)
-AFLAGS_$(LD_SCRIPT-y:.s=).o = $(AFLAGS_vmlinux.lds.o) -P -C -Uum
+CPPFLAGS_$(LD_SCRIPT-y) = $(CPPFLAGS_vmlinux.lds) -P -C -Uum
LD_SCRIPT-y := $(ARCH_DIR)/$(LD_SCRIPT-y)
@@ -122,7 +122,7 @@
# To get a definition of F_SETSIG
USER_CFLAGS += -D_GNU_SOURCE
-CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/uml.lds.s \
+CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/uml.lds \
$(ARCH_DIR)/dyn_link.ld.s $(GEN_HEADERS)
$(ARCH_DIR)/main.o: $(ARCH_DIR)/main.c
diff -Nru a/arch/um/Makefile-skas b/arch/um/Makefile-skas
--- a/arch/um/Makefile-skas 2004-08-15 22:17:11 +02:00
+++ b/arch/um/Makefile-skas 2004-08-15 22:17:11 +02:00
@@ -12,7 +12,7 @@
MODE_INCLUDE += -I$(TOPDIR)/$(ARCH_DIR)/kernel/skas/include
LINK_SKAS = -Wl,-rpath,/lib
-LD_SCRIPT_SKAS = dyn.lds.s
+LD_SCRIPT_SKAS = dyn.lds
GEN_HEADERS += $(ARCH_DIR)/kernel/skas/include/skas_ptregs.h
diff -Nru a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile
--- a/arch/um/kernel/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/um/kernel/Makefile 2004-08-15 22:17:11 +02:00
@@ -3,7 +3,7 @@
# Licensed under the GPL
#
-extra-y := vmlinux.lds.s
+extra-y := vmlinux.lds
obj-y = checksum.o config.o exec_kern.o exitcode.o frame_kern.o frame.o \
helper.o init_task.o irq.o irq_user.o ksyms.o mem.o mem_user.o \
diff -Nru a/arch/v850/kernel/Makefile b/arch/v850/kernel/Makefile
--- a/arch/v850/kernel/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/v850/kernel/Makefile 2004-08-15 22:17:11 +02:00
@@ -9,7 +9,7 @@
# for more details.
#
-extra-y := head.o init_task.o vmlinux.lds.s
+extra-y := head.o init_task.o vmlinux.lds
obj-y += intv.o entry.o process.o syscalls.o time.o semaphore.o setup.o \
signal.o irq.o mach.o ptrace.o bug.o
diff -Nru a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
--- a/arch/x86_64/kernel/Makefile 2004-08-15 22:17:11 +02:00
+++ b/arch/x86_64/kernel/Makefile 2004-08-15 22:17:11 +02:00
@@ -2,7 +2,7 @@
# Makefile for the linux kernel.
#
-extra-y := head.o head64.o init_task.o vmlinux.lds.s
+extra-y := head.o head64.o init_task.o vmlinux.lds
EXTRA_AFLAGS := -traditional
obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \
ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_x86_64.o \
diff -Nru a/arch/x86_64/kernel/Makefile-HEAD b/arch/x86_64/kernel/Makefile-HEAD
--- a/arch/x86_64/kernel/Makefile-HEAD 2004-08-15 22:17:11 +02:00
+++ b/arch/x86_64/kernel/Makefile-HEAD 2004-08-15 22:17:11 +02:00
@@ -2,7 +2,7 @@
# Makefile for the linux kernel.
#
-extra-y := head.o head64.o init_task.o vmlinux.lds.s
+extra-y := head.o head64.o init_task.o vmlinux.lds
EXTRA_AFLAGS := -traditional
obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \
ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_x86_64.o \
^ permalink raw reply [flat|nested] 13+ messages in thread
* kbuild: Delete unnessesary $(wildcard ...)
2004-08-15 20:12 kbuild + kconfig: Updates Sam Ravnborg
` (2 preceding siblings ...)
2004-08-15 20:17 ` kbuild/all archs: Rename all *.lds.s to *.lds Sam Ravnborg
@ 2004-08-15 20:19 ` Sam Ravnborg
2004-08-15 20:20 ` kbuild: Allow external modules to use host.progs with no warning Sam Ravnborg
` (3 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Sam Ravnborg @ 2004-08-15 20:19 UTC (permalink / raw)
To: Andrew Morton, linux-kernel
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/08/15 21:41:02+02:00 coywolf@greatcn.org
# kbuild: Remove wildcard on KBUILD_OUTPUT
#
# This patch removes unnecessary wildcard on KBUILD_OUTPUT
#
# Signed-off-by: Coywolf Qi Hunt <coywolf@greatcn.org>
# Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
#
# Makefile
# 2004/08/12 23:09:08+02:00 coywolf@greatcn.org +1 -1
# kbuild: Remove wildcard on KBUILD_OUTPUT
#
diff -Nru a/Makefile b/Makefile
--- a/Makefile 2004-08-15 22:19:15 +02:00
+++ b/Makefile 2004-08-15 22:19:15 +02:00
@@ -102,7 +102,7 @@
# check that the output directory actually exists
saved-output := $(KBUILD_OUTPUT)
KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd)
-$(if $(wildcard $(KBUILD_OUTPUT)),, \
+$(if $(KBUILD_OUTPUT),, \
$(error output directory "$(saved-output)" does not exist))
.PHONY: $(MAKECMDGOALS)
^ permalink raw reply [flat|nested] 13+ messages in thread
* kbuild: Allow external modules to use host.progs with no warning
2004-08-15 20:12 kbuild + kconfig: Updates Sam Ravnborg
` (3 preceding siblings ...)
2004-08-15 20:19 ` kbuild: Delete unnessesary $(wildcard ...) Sam Ravnborg
@ 2004-08-15 20:20 ` Sam Ravnborg
2004-08-15 20:22 ` kconfig: Kconfig.debug Sam Ravnborg
` (2 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Sam Ravnborg @ 2004-08-15 20:20 UTC (permalink / raw)
To: Andrew Morton, linux-kernel
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/08/15 21:54:22+02:00 sam@mars.ravnborg.org
# kbuild: Allow external modules to use host-progs with no warning
#
# Only warn if $(host-progs) and $(hostptogs-y) are not equal.
# This allows external modules to use:
# hostprogs-y := file ...
# host-progs := $(hostprogs-y)
#
# This is backwards compatible and will not warn.
#
# Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
#
# scripts/Makefile.build
# 2004/08/15 21:54:06+02:00 sam@mars.ravnborg.org +2 -0
# Only warn if $(host-progs) and $(hostptogs-y) are not equal.
# This allows external modules to use:
# hostprogs-y := file ...
# host-progs := $(hostprogs-y)
#
# This is backwards compatible and will not warn.
#
diff -Nru a/scripts/Makefile.build b/scripts/Makefile.build
--- a/scripts/Makefile.build 2004-08-15 22:20:04 +02:00
+++ b/scripts/Makefile.build 2004-08-15 22:20:04 +02:00
@@ -15,8 +15,10 @@
include scripts/Makefile.lib
ifdef host-progs
+ifneq ($(hostprogs-y),$(host-progs))
$(warning kbuild: $(obj)/Makefile - Usage of host-progs is deprecated. Please replace with hostprogs-y!)
hostprogs-y += $(host-progs)
+endif
endif
# Do not include host rules unles needed
^ permalink raw reply [flat|nested] 13+ messages in thread
* kconfig: Kconfig.debug
2004-08-15 20:12 kbuild + kconfig: Updates Sam Ravnborg
` (4 preceding siblings ...)
2004-08-15 20:20 ` kbuild: Allow external modules to use host.progs with no warning Sam Ravnborg
@ 2004-08-15 20:22 ` Sam Ravnborg
2004-08-15 20:42 ` kbuild + kconfig: Updates viro
2004-08-16 14:55 ` kbuild/ia64: Fix breakage in arch/ia64/kernel/Makefile Sam Ravnborg
7 siblings, 0 replies; 13+ messages in thread
From: Sam Ravnborg @ 2004-08-15 20:22 UTC (permalink / raw)
To: Andrew Morton, linux-kernel
On Sun, Aug 15, 2004 at 10:12:24PM +0200, Sam Ravnborg wrote:
> A number of kbuild updates and Randy's Kconfig.debug
Randy already posted his patch so it will
not be included here.
Sam
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: kbuild + kconfig: Updates
2004-08-15 20:12 kbuild + kconfig: Updates Sam Ravnborg
` (5 preceding siblings ...)
2004-08-15 20:22 ` kconfig: Kconfig.debug Sam Ravnborg
@ 2004-08-15 20:42 ` viro
2004-08-16 20:45 ` Sam Ravnborg
2004-08-16 14:55 ` kbuild/ia64: Fix breakage in arch/ia64/kernel/Makefile Sam Ravnborg
7 siblings, 1 reply; 13+ messages in thread
From: viro @ 2004-08-15 20:42 UTC (permalink / raw)
To: Andrew Morton, linux-kernel
On Sun, Aug 15, 2004 at 10:12:24PM +0200, Sam Ravnborg wrote:
> A number of kbuild updates and Randy's Kconfig.debug
>
> Most important stuff is:
> o Get rid og bogus "has no CRC" when building external modules
> o Rename *.lds.s to *.lds (*)
> o Allow external modules to use host-progs
>
> (*) The renaming of the *.lds file has been doen to allow the kernel to
> be build with for example Cygwin.
> The major outstanding issue with Cygwin/Solaris are availability of
> certain .h files for the tools in scripts/* and spread in the tree.
> Tested patches that allows the tools to be build under Cygwin/Solaris
> are appreciated.
>
> Patches follows this mail.
Speaking of kbuild, is there any reasonable way to do check-only runs?
Simple "set CC et.al. to scripts that will create target and do nothing
else" doesn't work for obvious reasons - we have some stuff that really
has to be compiled (e.g. empty.c + some arch-dependent files). Same
goes for make -n C=1 | grep sparse | ... variants.
Another thing that would be very nice to have: analog of allmodconfig with
some options pre-set. Trivial cases can be hanlded by patching Kconfig
(basically, adding depends on BROKEN), but IWBN to have something like
make allmodconfig PRESET=<file that looks like a subset of .config>...
^ permalink raw reply [flat|nested] 13+ messages in thread
* kbuild/ia64: Fix breakage in arch/ia64/kernel/Makefile
2004-08-15 20:12 kbuild + kconfig: Updates Sam Ravnborg
` (6 preceding siblings ...)
2004-08-15 20:42 ` kbuild + kconfig: Updates viro
@ 2004-08-16 14:55 ` Sam Ravnborg
7 siblings, 0 replies; 13+ messages in thread
From: Sam Ravnborg @ 2004-08-16 14:55 UTC (permalink / raw)
To: Andrew Morton, linux-kernel
Brown paperbag time :-(
The *.lds changes that I added to ia64 introduced an error.
Fix it so ia64 build againg.
Pushed to bk://linux-sam.bkbits.net/kbuild
Sam
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/08/16 16:51:51+02:00 sam@mars.ravnborg.org
# kbuild/ia64: Fix breakage in arch/ia64/kernel/Makefile
#
# Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
#
# arch/ia64/kernel/Makefile
# 2004/08/16 16:51:35+02:00 sam@mars.ravnborg.org +1 -1
# Fix breakage
#
diff -Nru a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
--- a/arch/ia64/kernel/Makefile 2004-08-16 16:52:33 +02:00
+++ b/arch/ia64/kernel/Makefile 2004-08-16 16:52:33 +02:00
@@ -21,7 +21,7 @@
# The gate DSO image is built using a special linker script.
targets += gate.so gate-syms.o
-extra-y := gate.so gate-syms.o gate.lds gate.o
+extra-y += gate.so gate-syms.o gate.lds gate.o
# fp_emulate() expects f2-f5,f16-f31 to contain the user-level state.
CFLAGS_traps.o += -mfixed-range=f2-f5,f16-f31
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: kbuild + kconfig: Updates
2004-08-16 20:45 ` Sam Ravnborg
@ 2004-08-16 20:01 ` viro
2004-08-16 22:20 ` Sam Ravnborg
0 siblings, 1 reply; 13+ messages in thread
From: viro @ 2004-08-16 20:01 UTC (permalink / raw)
To: Andrew Morton, linux-kernel
On Mon, Aug 16, 2004 at 10:45:50PM +0200, Sam Ravnborg wrote:
> $(single-used-m): %.o: %.c FORCE
> + $(cmd_force_checksrc)
> $(call if_changed_rule,cc_o_c)
> @{ echo $(@:.o=.ko); echo $@; } > $(MODVERDIR)/$(@F:.o=.mod)
>
>
> That should do it?
> I will push this if you are OK with it.
Uhh... It ends up running sparse *twice* and still runs gcc on every
file.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: kbuild + kconfig: Updates
2004-08-15 20:42 ` kbuild + kconfig: Updates viro
@ 2004-08-16 20:45 ` Sam Ravnborg
2004-08-16 20:01 ` viro
0 siblings, 1 reply; 13+ messages in thread
From: Sam Ravnborg @ 2004-08-16 20:45 UTC (permalink / raw)
To: viro; +Cc: Andrew Morton, linux-kernel
On Sun, Aug 15, 2004 at 09:42:29PM +0100, viro@parcelfarce.linux.theplanet.co.uk wrote:
>
> Speaking of kbuild, is there any reasonable way to do check-only runs?
> Simple "set CC et.al. to scripts that will create target and do nothing
> else" doesn't work for obvious reasons - we have some stuff that really
> has to be compiled (e.g. empty.c + some arch-dependent files). Same
> goes for make -n C=1 | grep sparse | ... variants.
Usage:
make C=2
===== scripts/Makefile.build 1.47 vs edited =====
--- 1.47/scripts/Makefile.build 2004-08-15 21:54:06 +02:00
+++ edited/scripts/Makefile.build 2004-08-16 22:38:51 +02:00
@@ -85,6 +85,9 @@
ifneq ($(KBUILD_CHECKSRC),0)
quiet_cmd_checksrc = CHECK $<
cmd_checksrc = $(CHECK) $(c_flags) $< ;
+ ifeq ($(KBUILD_CHECKSRC),2)
+ cmd_force_checksrc = $(call cmd,checksrc)
+ endif
endif
@@ -182,11 +185,13 @@
# Built-in and composite module parts
%.o: %.c FORCE
+ $(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
+ $(cmd_force_checksrc)
$(call if_changed_rule,cc_o_c)
@{ echo $(@:.o=.ko); echo $@; } > $(MODVERDIR)/$(@F:.o=.mod)
That should do it?
I will push this if you are OK with it.
>
> Another thing that would be very nice to have: analog of allmodconfig with
> some options pre-set. Trivial cases can be hanlded by patching Kconfig
> (basically, adding depends on BROKEN), but IWBN to have something like
> make allmodconfig PRESET=<file that looks like a subset of .config>...
Agree. Discussed a long time ago if we should introduce
preprocessed _defconfig files, but people told me
there were too little in common.
IIRC it is possible just to add to a .config file, and then the last
assignment will decide.
But I have not tested it since long time ago so I may be wrong.
Sam
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: kbuild + kconfig: Updates
2004-08-16 20:01 ` viro
@ 2004-08-16 22:20 ` Sam Ravnborg
2004-08-16 22:29 ` Sam Ravnborg
0 siblings, 1 reply; 13+ messages in thread
From: Sam Ravnborg @ 2004-08-16 22:20 UTC (permalink / raw)
To: viro; +Cc: Andrew Morton, linux-kernel, Sam Ravnborg
On Mon, Aug 16, 2004 at 09:01:59PM +0100, viro@parcelfarce.linux.theplanet.co.uk wrote:
> On Mon, Aug 16, 2004 at 10:45:50PM +0200, Sam Ravnborg wrote:
> > $(single-used-m): %.o: %.c FORCE
> > + $(cmd_force_checksrc)
> > $(call if_changed_rule,cc_o_c)
> > @{ echo $(@:.o=.ko); echo $@; } > $(MODVERDIR)/$(@F:.o=.mod)
> >
> >
> > That should do it?
> > I will push this if you are OK with it.
>
> Uhh... It ends up running sparse *twice* and still runs gcc on every
> file.
You are supposed to use: make C=2 only on a fully updated tree.
Then you will see sparse only being run once, and gcc will not be run
because the file is already updated.
That said it should not run sparse twice when a file needs to be updated.
Will take another look at it.
PS. Please keep me in cc:.
Sam
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: kbuild + kconfig: Updates
2004-08-16 22:20 ` Sam Ravnborg
@ 2004-08-16 22:29 ` Sam Ravnborg
0 siblings, 0 replies; 13+ messages in thread
From: Sam Ravnborg @ 2004-08-16 22:29 UTC (permalink / raw)
To: viro, Andrew Morton, linux-kernel
On Tue, Aug 17, 2004 at 12:20:05AM +0200, Sam Ravnborg wrote:
> >
> > Uhh... It ends up running sparse *twice* and still runs gcc on every
> > file.
This one should be better.
On the sparse topic. Do you see anything against
introducing CHECKFLAGS?
CHECKFLAGS would be assigned the sparse specific flags in
arch/*/Makefile.
I see no reason to introduce EXTRA_CHECKFLAGS, CHECKFLAGS_$(F*)
as known from CFLAGS, AFLAGS. But I like the split into CHECKFLAGS.
That should allow me to do:
make CHECK=my_hacked_sparse C=2
Sam
===== scripts/Makefile.build 1.47 vs edited =====
--- 1.47/scripts/Makefile.build 2004-08-15 21:54:06 +02:00
+++ edited/scripts/Makefile.build 2004-08-17 00:23:52 +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] 13+ messages in thread
end of thread, other threads:[~2004-08-16 20:29 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-15 20:12 kbuild + kconfig: Updates Sam Ravnborg
2004-08-15 20:15 ` kbuild: bogus has no CRC warning Sam Ravnborg
2004-08-15 20:16 ` kbuild: *.lds.s -> *.lds rename. Infrastructure Sam Ravnborg
2004-08-15 20:17 ` kbuild/all archs: Rename all *.lds.s to *.lds Sam Ravnborg
2004-08-15 20:19 ` kbuild: Delete unnessesary $(wildcard ...) Sam Ravnborg
2004-08-15 20:20 ` kbuild: Allow external modules to use host.progs with no warning Sam Ravnborg
2004-08-15 20:22 ` kconfig: Kconfig.debug Sam Ravnborg
2004-08-15 20:42 ` kbuild + kconfig: Updates viro
2004-08-16 20:45 ` Sam Ravnborg
2004-08-16 20:01 ` viro
2004-08-16 22:20 ` Sam Ravnborg
2004-08-16 22:29 ` Sam Ravnborg
2004-08-16 14:55 ` kbuild/ia64: Fix breakage in arch/ia64/kernel/Makefile Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).