Linux USB
 help / color / mirror / Atom feed
From: Hongren Zheng <i@zenithal.me>
To: "Uwe Kleine-König" <ukleinek@debian.org>
Cc: Valentina Manea <valentina.manea.m@gmail.com>,
	Shuah Khan <shuah@kernel.org>,
	linux-usb@vger.kernel.org
Subject: Re: [PATCH v2] usbip: Use _FORTIFY_SOURCE=2 instead of (implicitly) =1
Date: Thu, 4 May 2023 11:40:27 +0800	[thread overview]
Message-ID: <ZFMpK2vA7r9y7DPQ@Sun> (raw)
In-Reply-To: <20230503173622.1072787-1-ukleinek@debian.org>

On Wed, May 03, 2023 at 07:36:22PM +0200, Uwe Kleine-König wrote:
> _FORTIFY_SOURCE=2 uses more and stricter checks. This is what e.g.
> Debian recommends to build packages with.
> 
> While at it fix a typo in the output of ./configure --help.
> 
> Signed-off-by: Uwe Kleine-König <ukleinek@debian.org>

Reviewed-By: Hongren Zheng <i@zenithal.me>

I've tested that with this patch the code still
compiles when --with-fortify and `usbip list/attach`
worked.

> ---
> Changes since (implicit) v1:
> 
> - s/_FORTIFY_SROUCE/_FORTIFY_SOURCE/ in the help text, noted (off-list)
>   by Cyril Brulebois.
> 
>  tools/usb/usbip/configure.ac | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/usb/usbip/configure.ac b/tools/usb/usbip/configure.ac
> index 607d05c5ccfd..8debf934f8b7 100644
> --- a/tools/usb/usbip/configure.ac
> +++ b/tools/usb/usbip/configure.ac
> @@ -94,11 +94,11 @@ AC_SUBST([USBIDS_DIR])
>  AC_MSG_CHECKING([whether to use fortify])
>  AC_ARG_WITH([fortify],
>  	    [AS_HELP_STRING([--with-fortify],
> -			    [use _FORTIFY_SROUCE option when compiling)])],
> +			    [use _FORTIFY_SOURCE=2 option when compiling)])],
>  			    dnl [ACTION-IF-GIVEN]
>  			    [if test "$withval" = "yes"; then
>  				AC_MSG_RESULT([yes])
> -				CFLAGS="$CFLAGS -D_FORTIFY_SOURCE -O"
> +				CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -O"
>  			     else
>  			     	AC_MSG_RESULT([no])
>  				CFLAGS="$CFLAGS -U_FORTIFY_SOURCE"
> -- 
> 2.39.2
> 

      reply	other threads:[~2023-05-04  3:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-03 17:36 [PATCH v2] usbip: Use _FORTIFY_SOURCE=2 instead of (implicitly) =1 Uwe Kleine-König
2023-05-04  3:40 ` Hongren Zheng [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZFMpK2vA7r9y7DPQ@Sun \
    --to=i@zenithal.me \
    --cc=linux-usb@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=ukleinek@debian.org \
    --cc=valentina.manea.m@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox