Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-2.6.18

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-2.6.18:
gitignore: gitignore quilt's files
kbuild: always use $(CC) for $(call cc-version)
kconfig: correct oldconfig for unset choice options
kbuild: -fno-stack-protector is not good
kbuild: fix typo in modpost
kbuild: improve error from file2alias
kbuild: .gitignore utsrelease.h
kbuild: version.h and new headers_* targets does not require a kernel config
kbuild: hardcode value of YACC&LEX for aic7-triple-x

+56 -25
+5
.gitignore
··· 30 30 include/linux/autoconf.h 31 31 include/linux/compile.h 32 32 include/linux/version.h 33 + include/linux/utsrelease.h 33 34 34 35 # stgit generated dirs 35 36 patches-* 37 + 38 + # quilt's files 39 + patches 40 + series
+3 -2
Makefile
··· 310 310 CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ 311 311 -fno-strict-aliasing -fno-common 312 312 # Force gcc to behave correct even for buggy distributions 313 - CFLAGS += $(call cc-option, -fno-stack-protector-all \ 314 - -fno-stack-protector) 313 + CFLAGS += $(call cc-option, -fno-stack-protector) 314 + 315 315 AFLAGS := -D__ASSEMBLY__ 316 316 317 317 # Read KERNELRELEASE from include/config/kernel.release (if it exists) ··· 368 368 369 369 no-dot-config-targets := clean mrproper distclean \ 370 370 cscope TAGS tags help %docs check% \ 371 + include/linux/version.h headers_% \ 371 372 kernelrelease kernelversion 372 373 373 374 config-targets := 0
+2
drivers/scsi/aic7xxx/aicasm/Makefile
··· 14 14 clean-files:= ${GENSRCS} ${GENHDRS} $(YSRCS:.y=.output) $(PROG) 15 15 # Override default kernel CFLAGS. This is a userland app. 16 16 AICASM_CFLAGS:= -I/usr/include -I. 17 + LEX= flex 18 + YACC= bison 17 19 YFLAGS= -d 18 20 19 21 NOMAN= noman
+1 -2
scripts/Kbuild.include
··· 77 77 78 78 # cc-version 79 79 # Usage gcc-ver := $(call cc-version, $(CC)) 80 - cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh \ 81 - $(if $(1), $(1), $(CC))) 80 + cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC)) 82 81 83 82 # cc-ifversion 84 83 # Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1)
+1 -1
scripts/Makefile.modpost
··· 40 40 include scripts/Makefile.lib 41 41 42 42 kernelsymfile := $(objtree)/Module.symvers 43 - modulesymfile := $(KBUILD_EXTMOD)/Modules.symvers 43 + modulesymfile := $(KBUILD_EXTMOD)/Module.symvers 44 44 45 45 # Step 1), find all modules listed in $(MODVERDIR)/ 46 46 __modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod)))
+1 -1
scripts/kconfig/confdata.c
··· 357 357 for (e = prop->expr; e; e = e->left.expr) 358 358 if (e->right.sym->visible != no) 359 359 flags &= e->right.sym->flags; 360 - sym->flags |= flags & SYMBOL_DEF_USER; 360 + sym->flags &= flags | ~SYMBOL_DEF_USER; 361 361 } 362 362 363 363 sym_change_count += conf_warnings || conf_unsaved;
+43 -19
scripts/mod/file2alias.c
··· 52 52 sprintf(str + strlen(str), "*"); \ 53 53 } while(0) 54 54 55 + /** 56 + * Check that sizeof(device_id type) are consistent with size of section 57 + * in .o file. If in-consistent then userspace and kernel does not agree 58 + * on actual size which is a bug. 59 + **/ 60 + static void device_id_size_check(const char *modname, const char *device_id, 61 + unsigned long size, unsigned long id_size) 62 + { 63 + if (size % id_size || size < id_size) { 64 + fatal("%s: sizeof(struct %s_device_id)=%lu is not a modulo " 65 + "of the size of section __mod_%s_device_table=%lu.\n" 66 + "Fix definition of struct %s_device_id " 67 + "in mod_devicetable.h\n", 68 + modname, device_id, id_size, device_id, size, device_id); 69 + } 70 + } 71 + 55 72 /* USB is special because the bcdDevice can be matched against a numeric range */ 56 73 /* Looks like "usb:vNpNdNdcNdscNdpNicNiscNipN" */ 57 74 static void do_usb_entry(struct usb_device_id *id, ··· 169 152 unsigned int i; 170 153 const unsigned long id_size = sizeof(struct usb_device_id); 171 154 172 - if (size % id_size || size < id_size) { 173 - warn("%s ids %lu bad size " 174 - "(each on %lu)\n", mod->name, size, id_size); 175 - } 155 + device_id_size_check(mod->name, "usb", size, id_size); 156 + 176 157 /* Leave last one: it's the terminator. */ 177 158 size -= id_size; 178 159 ··· 449 434 450 435 static void do_table(void *symval, unsigned long size, 451 436 unsigned long id_size, 437 + const char *device_id, 452 438 void *function, 453 439 struct module *mod) 454 440 { ··· 457 441 char alias[500]; 458 442 int (*do_entry)(const char *, void *entry, char *alias) = function; 459 443 460 - if (size % id_size || size < id_size) { 461 - warn("%s ids %lu bad size " 462 - "(each on %lu)\n", mod->name, size, id_size); 463 - } 444 + device_id_size_check(mod->name, device_id, size, id_size); 464 445 /* Leave last one: it's the terminator. */ 465 446 size -= id_size; 466 447 ··· 489 476 + sym->st_value; 490 477 491 478 if (sym_is(symname, "__mod_pci_device_table")) 492 - do_table(symval, sym->st_size, sizeof(struct pci_device_id), 479 + do_table(symval, sym->st_size, 480 + sizeof(struct pci_device_id), "pci", 493 481 do_pci_entry, mod); 494 482 else if (sym_is(symname, "__mod_usb_device_table")) 495 483 /* special case to handle bcdDevice ranges */ 496 484 do_usb_table(symval, sym->st_size, mod); 497 485 else if (sym_is(symname, "__mod_ieee1394_device_table")) 498 - do_table(symval, sym->st_size, sizeof(struct ieee1394_device_id), 486 + do_table(symval, sym->st_size, 487 + sizeof(struct ieee1394_device_id), "ieee1394", 499 488 do_ieee1394_entry, mod); 500 489 else if (sym_is(symname, "__mod_ccw_device_table")) 501 - do_table(symval, sym->st_size, sizeof(struct ccw_device_id), 490 + do_table(symval, sym->st_size, 491 + sizeof(struct ccw_device_id), "ccw", 502 492 do_ccw_entry, mod); 503 493 else if (sym_is(symname, "__mod_serio_device_table")) 504 - do_table(symval, sym->st_size, sizeof(struct serio_device_id), 494 + do_table(symval, sym->st_size, 495 + sizeof(struct serio_device_id), "serio", 505 496 do_serio_entry, mod); 506 497 else if (sym_is(symname, "__mod_pnp_device_table")) 507 - do_table(symval, sym->st_size, sizeof(struct pnp_device_id), 498 + do_table(symval, sym->st_size, 499 + sizeof(struct pnp_device_id), "pnp", 508 500 do_pnp_entry, mod); 509 501 else if (sym_is(symname, "__mod_pnp_card_device_table")) 510 - do_table(symval, sym->st_size, sizeof(struct pnp_card_device_id), 502 + do_table(symval, sym->st_size, 503 + sizeof(struct pnp_card_device_id), "pnp_card", 511 504 do_pnp_card_entry, mod); 512 505 else if (sym_is(symname, "__mod_pcmcia_device_table")) 513 - do_table(symval, sym->st_size, sizeof(struct pcmcia_device_id), 506 + do_table(symval, sym->st_size, 507 + sizeof(struct pcmcia_device_id), "pcmcia", 514 508 do_pcmcia_entry, mod); 515 509 else if (sym_is(symname, "__mod_of_device_table")) 516 - do_table(symval, sym->st_size, sizeof(struct of_device_id), 510 + do_table(symval, sym->st_size, 511 + sizeof(struct of_device_id), "of", 517 512 do_of_entry, mod); 518 513 else if (sym_is(symname, "__mod_vio_device_table")) 519 - do_table(symval, sym->st_size, sizeof(struct vio_device_id), 514 + do_table(symval, sym->st_size, 515 + sizeof(struct vio_device_id), "vio", 520 516 do_vio_entry, mod); 521 517 else if (sym_is(symname, "__mod_i2c_device_table")) 522 - do_table(symval, sym->st_size, sizeof(struct i2c_device_id), 518 + do_table(symval, sym->st_size, 519 + sizeof(struct i2c_device_id), "i2c", 523 520 do_i2c_entry, mod); 524 521 else if (sym_is(symname, "__mod_input_device_table")) 525 - do_table(symval, sym->st_size, sizeof(struct input_device_id), 522 + do_table(symval, sym->st_size, 523 + sizeof(struct input_device_id), "input", 526 524 do_input_entry, mod); 527 525 } 528 526