[klibc] [PATCH] Add support for --param=name=value
maximilian attems
max at stro.at
Wed Aug 3 02:00:18 PDT 2011
On Tue, 02 Aug 2011, Mike Pagano wrote:
> Thanks for the input. I've attached a patch that keeps the check for
> --param and --param=name=value separate, took some of your pointers and
> hopefully simplied everything in a more acceptable manner.
thank you for resending, sorry for sounding picky at having new
criticism. overall it looks like heading in the right direction.
> ---
>
> Later versions of gcc include an option in the form of --param=name=value. This patch adds support for this.
>
> Signed-off-by: Mike Pagano <mpagano at gentoo.org>
> ---
> klcc/klcc.in | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/klcc/klcc.in b/klcc/klcc.in
> index 711a832..c69389b 100644
> --- a/klcc/klcc.in
> +++ b/klcc/klcc.in
> @@ -162,6 +162,13 @@ while ( defined($a = shift(@ARGV)) ) {
> } elsif ( $a eq '--param' ) {
> push(@ccopt, $a);
> push(@ccopt, shift(@ARGV));
> + } elsif ( $a =~ /^--param+=/ ) {
> + # support --param=name=value
> + my (@values) = split('=', $a);
> + if (@values == 3) {
> + push(@ccopt, $values[0]);
> + push(@ccopt, join('=', $values[1],$values[2]));
> + }
> } elsif ( $a =~ /^-[gp]/ || $a eq '-p' ) {
> # Debugging options to gcc
> push(@ccopt, $a);
does this actually work?
isn't the case already caught with the elsif above?
I in fact liked the merge of both cases in one block,
couldn't you check the split for 2 values returned for the exiting
--param support?
thanks
--
maks
More information about the klibc
mailing list