This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 01/18] Configury support for --enable-stack-protector.


On 08 Mar 2016 13:50, Nix wrote:
> +AC_ARG_ENABLE([stack-protector],
> +            AC_HELP_STRING([--enable-stack-protector=@<:@yes|no|all|strong@:>@],

8 spaces -> tabs, and re-align the 2nd arg

> +                           [Detect stack overflows in glibc functions, either with local buffers (yes), or with those plus arrays (strong), or all functions (all)]),

is this really necessary ?  can't we just say something like "pass
-fstack-protector[-all|-strong]" and leave the rest to the gcc manual ?

> +            [enable_stack_protector=no])

should we default this to auto-detecting strong ?
or at least make that a follow up patch in this series ?

> +case x"$enable_stack_protector" in
> +    xall|xyes|xno|xstrong) ;;

don't need the x prefix.  that historical wart is related to empty
string compares with the test command, not the case command.

> +    *) AC_MSG_ERROR([Not a valid argument for --enable-stack-protector]);;

don't indent case statements

> +if test x$libc_cv_ssp = xyes; then

quote the LHS -- cache vars can be set via the env or config.site files

> +    no_stack_protector=-fno-stack-protector

indent with two spaces

> +if test x$enable_stack_protector = xyes && test $libc_cv_ssp = yes; then
> +  stack_protector=-fstack-protector
> +elif test x$enable_stack_protector = xall && test $libc_cv_ssp_all = yes; then
> +  stack_protector=-fstack-protector-all
> +elif test x$enable_stack_protector = xstrong && test $libc_cv_ssp_strong = yes; then
> +  stack_protector=-fstack-protector-strong
> +fi

all of these strings should be quoted imo.  they were before you changed
things too.
-mike

Attachment: signature.asc
Description: Digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]