This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[nvptx, committed] Disable -gstatement-frontiers for nvptx
- From: Tom de Vries <Tom_deVries at mentor dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>, Richard Biener <richard dot guenther at gmail dot com>, Jeff Law <law at redhat dot com>, Jason Merrill <jason at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Thomas Schwinge <thomas at codesourcery dot com>
- Date: Wed, 27 Dec 2017 09:00:29 +0100
- Subject: [nvptx, committed] Disable -gstatement-frontiers for nvptx
- Authentication-results: sourceware.org; auth=none
- References: <orlgjec1b5.fsf_-_@lxoliva.fsfla.org> <20171110023448.28164-6-aoliva@redhat.com>
[ was: Re: [SFN+LVU+IEPM v4 6/9] [SFN] Introduce -gstatement-frontiers
option, enable debug markers ]
On 11/10/2017 03:34 AM, Alexandre Oliva wrote:
Introduce a command line option to enable statement frontiers, enabled
by default in optimized builds with DWARF2+ debug information.
This patch depends on an earlier patch that completed the
infrastructure for debug markers, and on another patch that turns -g
into a negatable option prefix.
gcc/ChangeLog
* common.opt (gstatement-frontiers): New, setting
debug_nonbind_markers_p.
Hi,
the ptx syntax for the .loc directive is limited to:
...
.loc file_index line_number column_position
...
so this causes ptxas errors when compiling something for nvptx with -g,
which breaks the nvptx build.
This patch disables gstatement-frontiers for nvptx.
Tested libgomp for x86_64 with nvptx accelerator.
Committed.
Thanks,
- Tom
Disable -gstatement-frontiers for nvptx
2017-12-27 Tom de Vries <tom@codesourcery.com>
* config/nvptx/nvptx.c (nvptx_option_override): Disable
-gstatement-frontiers.
---
gcc/config/nvptx/nvptx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c
index cce0a55..e024570 100644
--- a/gcc/config/nvptx/nvptx.c
+++ b/gcc/config/nvptx/nvptx.c
@@ -177,6 +177,8 @@ nvptx_option_override (void)
if (!global_options_set.x_flag_toplevel_reorder)
flag_toplevel_reorder = 1;
+ debug_nonbind_markers_p = 0;
+
/* Set flag_no_common, unless explicitly disabled. We fake common
using .weak, and that's not entirely accurate, so avoid it
unless forced. */