diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.build | 3 | ||||
-rw-r--r-- | scripts/genksyms/genksyms.c | 18 |
2 files changed, 9 insertions, 12 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 0e801c3cdaf8..d5d859c80729 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
@@ -211,7 +211,8 @@ $(obj)/%.i: $(src)/%.c FORCE | |||
211 | 211 | ||
212 | cmd_gensymtypes = \ | 212 | cmd_gensymtypes = \ |
213 | $(CPP) -D__GENKSYMS__ $(c_flags) $< | \ | 213 | $(CPP) -D__GENKSYMS__ $(c_flags) $< | \ |
214 | $(GENKSYMS) $(if $(1), -T $(2)) -a $(ARCH) \ | 214 | $(GENKSYMS) $(if $(1), -T $(2)) \ |
215 | $(patsubst y,-s _,$(CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX)) \ | ||
215 | $(if $(KBUILD_PRESERVE),-p) \ | 216 | $(if $(KBUILD_PRESERVE),-p) \ |
216 | -r $(firstword $(wildcard $(2:.symtypes=.symref) /dev/null)) | 217 | -r $(firstword $(wildcard $(2:.symtypes=.symref) /dev/null)) |
217 | 218 | ||
diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c index d25e4a118d37..88632df4381b 100644 --- a/scripts/genksyms/genksyms.c +++ b/scripts/genksyms/genksyms.c | |||
@@ -45,7 +45,6 @@ int in_source_file; | |||
45 | 45 | ||
46 | static int flag_debug, flag_dump_defs, flag_reference, flag_dump_types, | 46 | static int flag_debug, flag_dump_defs, flag_reference, flag_dump_types, |
47 | flag_preserve, flag_warnings; | 47 | flag_preserve, flag_warnings; |
48 | static const char *arch = ""; | ||
49 | static const char *mod_prefix = ""; | 48 | static const char *mod_prefix = ""; |
50 | 49 | ||
51 | static int errors; | 50 | static int errors; |
@@ -731,7 +730,7 @@ static void genksyms_usage(void) | |||
731 | { | 730 | { |
732 | fputs("Usage:\n" "genksyms [-adDTwqhV] > /path/to/.tmp_obj.ver\n" "\n" | 731 | fputs("Usage:\n" "genksyms [-adDTwqhV] > /path/to/.tmp_obj.ver\n" "\n" |
733 | #ifdef __GNU_LIBRARY__ | 732 | #ifdef __GNU_LIBRARY__ |
734 | " -a, --arch Select architecture\n" | 733 | " -s, --symbol-prefix Select symbol prefix\n" |
735 | " -d, --debug Increment the debug level (repeatable)\n" | 734 | " -d, --debug Increment the debug level (repeatable)\n" |
736 | " -D, --dump Dump expanded symbol defs (for debugging only)\n" | 735 | " -D, --dump Dump expanded symbol defs (for debugging only)\n" |
737 | " -r, --reference file Read reference symbols from a file\n" | 736 | " -r, --reference file Read reference symbols from a file\n" |
@@ -742,7 +741,7 @@ static void genksyms_usage(void) | |||
742 | " -h, --help Print this message\n" | 741 | " -h, --help Print this message\n" |
743 | " -V, --version Print the release version\n" | 742 | " -V, --version Print the release version\n" |
744 | #else /* __GNU_LIBRARY__ */ | 743 | #else /* __GNU_LIBRARY__ */ |
745 | " -a Select architecture\n" | 744 | " -s Select symbol prefix\n" |
746 | " -d Increment the debug level (repeatable)\n" | 745 | " -d Increment the debug level (repeatable)\n" |
747 | " -D Dump expanded symbol defs (for debugging only)\n" | 746 | " -D Dump expanded symbol defs (for debugging only)\n" |
748 | " -r file Read reference symbols from a file\n" | 747 | " -r file Read reference symbols from a file\n" |
@@ -763,7 +762,7 @@ int main(int argc, char **argv) | |||
763 | 762 | ||
764 | #ifdef __GNU_LIBRARY__ | 763 | #ifdef __GNU_LIBRARY__ |
765 | struct option long_opts[] = { | 764 | struct option long_opts[] = { |
766 | {"arch", 1, 0, 'a'}, | 765 | {"symbol-prefix", 1, 0, 's'}, |
767 | {"debug", 0, 0, 'd'}, | 766 | {"debug", 0, 0, 'd'}, |
768 | {"warnings", 0, 0, 'w'}, | 767 | {"warnings", 0, 0, 'w'}, |
769 | {"quiet", 0, 0, 'q'}, | 768 | {"quiet", 0, 0, 'q'}, |
@@ -776,14 +775,14 @@ int main(int argc, char **argv) | |||
776 | {0, 0, 0, 0} | 775 | {0, 0, 0, 0} |
777 | }; | 776 | }; |
778 | 777 | ||
779 | while ((o = getopt_long(argc, argv, "a:dwqVDr:T:ph", | 778 | while ((o = getopt_long(argc, argv, "s:dwqVDr:T:ph", |
780 | &long_opts[0], NULL)) != EOF) | 779 | &long_opts[0], NULL)) != EOF) |
781 | #else /* __GNU_LIBRARY__ */ | 780 | #else /* __GNU_LIBRARY__ */ |
782 | while ((o = getopt(argc, argv, "a:dwqVDr:T:ph")) != EOF) | 781 | while ((o = getopt(argc, argv, "s:dwqVDr:T:ph")) != EOF) |
783 | #endif /* __GNU_LIBRARY__ */ | 782 | #endif /* __GNU_LIBRARY__ */ |
784 | switch (o) { | 783 | switch (o) { |
785 | case 'a': | 784 | case 's': |
786 | arch = optarg; | 785 | mod_prefix = optarg; |
787 | break; | 786 | break; |
788 | case 'd': | 787 | case 'd': |
789 | flag_debug++; | 788 | flag_debug++; |
@@ -826,9 +825,6 @@ int main(int argc, char **argv) | |||
826 | genksyms_usage(); | 825 | genksyms_usage(); |
827 | return 1; | 826 | return 1; |
828 | } | 827 | } |
829 | if ((strcmp(arch, "h8300") == 0) || (strcmp(arch, "blackfin") == 0) || | ||
830 | (strcmp(arch, "metag") == 0)) | ||
831 | mod_prefix = "_"; | ||
832 | { | 828 | { |
833 | extern int yydebug; | 829 | extern int yydebug; |
834 | extern int yy_flex_debug; | 830 | extern int yy_flex_debug; |