public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Marc Poulhiès" <poulhies@adacore.com>
To: gcc-patches@gcc.gnu.org
Cc: Cedric Landet <landet@adacore.com>
Subject: [COMMITTED] ada: Document that gprof won't work on windows with PIE.
Date: Mon,  7 Nov 2022 09:41:52 +0100	[thread overview]
Message-ID: <20221107084152.152087-1-poulhies@adacore.com> (raw)

From: Cedric Landet <landet@adacore.com>

Document that gprof won't work on windows with PIE and -no-pie must be
used.

gcc/ada/

	* doc/gnat_ugn/gnat_and_program_execution.rst: Mention the needed
	-no-pie for windows to use gprof.
	* gnat_ugn.texi: Regenerate.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst | 8 ++++++--
 gcc/ada/gnat_ugn.texi                               | 7 +++++--
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst b/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst
index e827d1f9841..c239c363eae 100644
--- a/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst
+++ b/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst
@@ -1252,8 +1252,8 @@ most often, and are therefore the most time-consuming.
 better handle Ada programs and multitasking.
 It is currently supported on the following platforms
 
-* linux x86/x86_64
-* windows x86
+* Linux x86/x86_64
+* Windows x86/x86_64 (without PIE support)
 
 In order to profile a program using ``gprof``, several steps are needed:
 
@@ -1291,6 +1291,10 @@ Note that only the objects that were compiled with the ``-pg`` switch will
 be profiled; if you need to profile your whole project, use the ``-f``
 gnatmake switch to force full recompilation.
 
+Note that on Windows, gprof does not support PIE. The ``-no-pie`` switch
+should be added to the linker flags to disable this feature.
+
+
 .. _Program_execution:
 
 
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index ff5cfa9dbce..385f1d3deb5 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -19552,10 +19552,10 @@ It is currently supported on the following platforms
 @itemize *
 
 @item 
-linux x86/x86_64
+Linux x86/x86_64
 
 @item 
-windows x86
+Windows x86/x86_64 (without PIE support)
 @end itemize
 
 In order to profile a program using @code{gprof}, several steps are needed:
@@ -19614,6 +19614,9 @@ Note that only the objects that were compiled with the @code{-pg} switch will
 be profiled; if you need to profile your whole project, use the @code{-f}
 gnatmake switch to force full recompilation.
 
+Note that on Windows, gprof does not support PIE. The @code{-no-pie} switch
+should be added to the linker flags to disable this feature.
+
 @node Program execution,Running gprof,Compilation for profiling,Profiling an Ada Program with gprof
 @anchor{gnat_ugn/gnat_and_program_execution id23}@anchor{175}@anchor{gnat_ugn/gnat_and_program_execution program-execution}@anchor{176}
 @subsubsection Program execution
-- 
2.34.1


                 reply	other threads:[~2022-11-07  8:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20221107084152.152087-1-poulhies@adacore.com \
    --to=poulhies@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=landet@adacore.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).