diff options
| author | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-28 08:29:59 -0400 |
|---|---|---|
| committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-28 08:29:59 -0400 |
| commit | 185a257f2f73bcd89050ad02da5bedbc28fc43fa (patch) | |
| tree | 5e32586114534ed3f2165614cba3d578f5d87307 /scripts | |
| parent | 3f1a9aaeffd8d1cbc5ab9776c45cbd66af1c9699 (diff) | |
| parent | a77c64c1a641950626181b4857abb701d8f38ccc (diff) | |
Merge branch 'master' into gfs2
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/Kbuild.include | 7 | ||||
| -rw-r--r-- | scripts/gcc-x86_64-has-stack-protector.sh | 6 | ||||
| -rw-r--r-- | scripts/mod/file2alias.c | 12 |
3 files changed, 25 insertions, 0 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 3d523899fdc0..4f5ff19b992b 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
| @@ -63,6 +63,13 @@ as-option = $(shell if $(CC) $(CFLAGS) $(1) -Wa,-Z -c -o /dev/null \ | |||
| 63 | -xassembler /dev/null > /dev/null 2>&1; then echo "$(1)"; \ | 63 | -xassembler /dev/null > /dev/null 2>&1; then echo "$(1)"; \ |
| 64 | else echo "$(2)"; fi ;) | 64 | else echo "$(2)"; fi ;) |
| 65 | 65 | ||
| 66 | # as-instr | ||
| 67 | # Usage: cflags-y += $(call as-instr, instr, option1, option2) | ||
| 68 | |||
| 69 | as-instr = $(shell if echo -e "$(1)" | $(AS) >/dev/null 2>&1 -W -Z -o astest$$$$.out ; \ | ||
| 70 | then echo "$(2)"; else echo "$(3)"; fi; \ | ||
| 71 | rm -f astest$$$$.out) | ||
| 72 | |||
| 66 | # cc-option | 73 | # cc-option |
| 67 | # Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586) | 74 | # Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586) |
| 68 | 75 | ||
diff --git a/scripts/gcc-x86_64-has-stack-protector.sh b/scripts/gcc-x86_64-has-stack-protector.sh new file mode 100644 index 000000000000..325c0a1b03b6 --- /dev/null +++ b/scripts/gcc-x86_64-has-stack-protector.sh | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | echo "int foo(void) { char X[200]; return 3; }" | $1 -S -xc -c -O0 -mcmodel=kernel -fstack-protector - -o - 2> /dev/null | grep -q "%gs" | ||
| 4 | if [ "$?" -eq "0" ] ; then | ||
| 5 | echo $2 | ||
| 6 | fi | ||
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index de76da80443f..f61c9ccef6aa 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
| @@ -444,6 +444,14 @@ static int do_input_entry(const char *filename, struct input_device_id *id, | |||
| 444 | return 1; | 444 | return 1; |
| 445 | } | 445 | } |
| 446 | 446 | ||
| 447 | static int do_eisa_entry(const char *filename, struct eisa_device_id *eisa, | ||
| 448 | char *alias) | ||
| 449 | { | ||
| 450 | if (eisa->sig[0]) | ||
| 451 | sprintf(alias, EISA_DEVICE_MODALIAS_FMT "*", eisa->sig); | ||
| 452 | return 1; | ||
| 453 | } | ||
| 454 | |||
| 447 | /* Ignore any prefix, eg. v850 prepends _ */ | 455 | /* Ignore any prefix, eg. v850 prepends _ */ |
| 448 | static inline int sym_is(const char *symbol, const char *name) | 456 | static inline int sym_is(const char *symbol, const char *name) |
| 449 | { | 457 | { |
| @@ -547,6 +555,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, | |||
| 547 | do_table(symval, sym->st_size, | 555 | do_table(symval, sym->st_size, |
| 548 | sizeof(struct input_device_id), "input", | 556 | sizeof(struct input_device_id), "input", |
| 549 | do_input_entry, mod); | 557 | do_input_entry, mod); |
| 558 | else if (sym_is(symname, "__mod_eisa_device_table")) | ||
| 559 | do_table(symval, sym->st_size, | ||
| 560 | sizeof(struct eisa_device_id), "eisa", | ||
| 561 | do_eisa_entry, mod); | ||
| 550 | } | 562 | } |
| 551 | 563 | ||
| 552 | /* Now add out buffered information to the generated C source */ | 564 | /* Now add out buffered information to the generated C source */ |
