Linux DTrace development list
 help / color / mirror / Atom feed
From: Kris Van Hees <kris.van.hees@oracle.com>
To: Nick Alcock <nick.alcock@oracle.com>
Cc: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: Re: [PATCH 1/2] tests: do not pass -flto to the compiler or linker
Date: Thu, 16 Jan 2025 17:22:34 -0500	[thread overview]
Message-ID: <Z4mGqmxNh4M5uSDy@oracle.com> (raw)
In-Reply-To: <20250116215418.417155-1-nick.alcock@oracle.com>

On Thu, Jan 16, 2025 at 09:54:17PM +0000, Nick Alcock wrote:
> We don't want to compile tests with -flto by default: if the distro
> compiler automatically activates it, turn it off by explicitly passing
> -fno-lto to all compiler and linker invocations in the testsuite.
> 
> (This is a bit fiddly because this is the first CPPFLAG which is
> not also a valid flag to dtrace(1) itself, so we have to split
> a variable up a bit.)
> 
> Signed-off-by: Nick Alcock <nick.alcock@oracle.com>

Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>

> ---
>  runtest.sh | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/runtest.sh b/runtest.sh
> index 94634f80c2ebf..1cb5be8213396 100755
> --- a/runtest.sh
> +++ b/runtest.sh
> @@ -589,8 +589,9 @@ else
>          exit 1
>      fi
>  fi
> -export test_cppflags
> -export test_ldflags
> +core_raw_dt_flags="$test_cppflags"
> +export test_cppflags="$test_cppflags -fno-lto"
> +export test_ldflags="$test_ldflags -fno-lto"
>  export test_libdir
>  
>  # Figure out if the preprocessor supports -fno-diagnostics-show-option: if it
> @@ -1085,7 +1086,7 @@ for dt in $dtrace; do
>          # Default and substitute in flags.  The raw_dt_flags apply even to a
>          # sh invocation.
>  
> -        raw_dt_flags="$test_cppflags"
> +        raw_dt_flags="$core_raw_dt_flags"
>  
>          expected_tag=
>          if [[ $testonly =~ ^err\.D_ ]]; then
> -- 
> 2.47.1.279.g84c5f4e78e
> 

      parent reply	other threads:[~2025-01-16 22:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-16 21:54 [PATCH 1/2] tests: do not pass -flto to the compiler or linker Nick Alcock
2025-01-16 21:54 ` [PATCH 2/2] drti: do not compile with LTO Nick Alcock
2025-01-16 22:24   ` Kris Van Hees
2025-01-16 22:22 ` Kris Van Hees [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=Z4mGqmxNh4M5uSDy@oracle.com \
    --to=kris.van.hees@oracle.com \
    --cc=dtrace-devel@oss.oracle.com \
    --cc=dtrace@lists.linux.dev \
    --cc=nick.alcock@oracle.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