lib.c: skip --param parameters
PATCH 1/1 lib.c: skip --param parameters
Very dumb patch to just skip --param allow-store-data-races=0 introduced in newest Linux kernel buildsystem.
Actually the option is present in few GCC versions and probably should be handled properly.
--- lib.c | 7 +++++++ 1 file changed, 7 insertions(+)
lib.c +7 -0
@@ -673,6 +673,12 @@ static char **handle_version(char *arg, char **next)exit (0 ); } +static char **handle_param (char *arg,char **next) +{ + ++next; +return ++next; +} +struct switches {const char *name;char **(*fn)(char *,char **);
@@ -681,6 +687,7 @@ struct switches {static char **handle_long_options (char *arg,char **next) {static struct switches cmd[] = { + {"param" , handle_param }, {"version" , handle_version }, {NULL ,NULL } };
Signature · 1 line
2.0.0
Quoted 7 lines · Andy Shevchenko
Very dumb patch to just skip --param allow-store-data-races=0 introduced in newest Linux kernel buildsystem.
Actually the option is present in few GCC versions and probably should be handled properly.
Signed-off-by Andy Shevchenko <[email protected]>
As far as I can tell, this seems to only handle "--param arg"; however, according to the thread on LKML, GCC handles --param=arg as well. Could you please handle that variant too?
Quoted 35 lines
lib.c | 7 +++++++ 1 file changed, 7 insertions(+)lib.c +7
-0@@ -673,6 +673,12 @@ static char **handle_version(char *arg, char **next)exit (0 ); } +static char **handle_param (char *arg,char **next) +{ + ++next; +return ++next; +} +struct switches {const char *name;char **(*fn)(char *,char **);@@ -681,6 +687,7 @@ struct switches {static char **handle_long_options (char *arg,char **next) {static struct switches cmd[] = { + {"param" , handle_param }, {"version" , handle_version }, {NULL ,NULL } };Signature · 6 lines
2.0.0 -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · Josh Triplett
Quoted 3 lines · Andy Shevchenko
Very dumb patch to just skip --param allow-store-data-races=0 introduced in newest Linux kernel buildsystem.
Quoted 9 lines
Quoted 4 lines
Actually the option is present in few GCC versions and probably should be handled properly.
Signed-off-by Andy Shevchenko <[email protected]>As far as I can tell, this seems to only handle "--param arg"; however, according to the thread on LKML, GCC handles --param=arg as well. Could you please handle that variant too?
This is only from linux-next and not Linus's tree, correct?
Is this still necessary since the "./Makefile: tell gcc optimizer to never introduce new data races" patch has been removed from -mm due to failures?
See http://marc.info/?l=linux-mm-commits&m=140295825623471
Quoted 28 lines
Quoted 28 lines
lib.c | 7 +++++++ 1 file changed, 7 insertions(+)lib.c +7
-0@@ -673,6 +673,12 @@ static char **handle_version(char *arg, char **next)exit (0 ); } +static char **handle_param (char *arg,char **next) +{ + ++next; +return ++next; +} +struct switches {const char *name;char **(*fn)(char *,char **);@@ -681,6 +687,7 @@ struct switches {static char **handle_long_options (char *arg,char **next) {static struct switches cmd[] = { + {"param" , handle_param }, {"version" , handle_version }, {NULL ,NULL } };
Quoted 16 lines · David Rientjes
Quoted 4 lines · Josh Triplett
Quoted 3 lines · Andy Shevchenko
Very dumb patch to just skip --param allow-store-data-races=0 introduced in newest Linux kernel buildsystem.
Quoted 9 lines
Quoted 4 lines
Actually the option is present in few GCC versions and probably should be handled properly.
Signed-off-by Andy Shevchenko <[email protected]>As far as I can tell, this seems to only handle "--param arg"; however, according to the thread on LKML, GCC handles --param=arg as well. Could you please handle that variant too?
Quoted 6 lines
This is only from linux-next and not Linus's tree, correct?
Is this still necessary since the "./Makefile: tell gcc optimizer to never introduce new data races" patch has been removed from -mm due to failures?
I'd still like to see Sparse not choke on the option, in either form, whether the kernel ends up using it or not.
- Josh Triplett
Quoted 4 lines · Josh Triplett
Quoted 3 lines · Andy Shevchenko
Very dumb patch to just skip --param allow-store-data-races=0 introduced in newest Linux kernel buildsystem.
Quoted 8 lines
Quoted 4 lines
Actually the option is present in few GCC versions and probably should be handled properly.
Signed-off-by Andy Shevchenko <[email protected]>As far as I can tell, this seems to only handle "--param arg"; however, according to the thread on LKML, GCC handles --param=arg as well. Could you please handle that variant too?
Yes, I will in v2.
Quoted 36 lines
Quoted 36 lines
lib.c | 7 +++++++ 1 file changed, 7 insertions(+)lib.c +7
-0@@ -673,6 +673,12 @@ static char **handle_version(char *arg, char **next)exit (0 ); } +static char **handle_param (char *arg,char **next) +{ + ++next; +return ++next; +} +struct switches {const char *name;char **(*fn)(char *,char **);@@ -681,6 +687,7 @@ struct switches {static char **handle_long_options (char *arg,char **next) {static struct switches cmd[] = { + {"param" , handle_param }, {"version" , handle_version }, {NULL ,NULL } };Signature · 6 lines
2.0.0 -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy