From 02ec3974571a05252fb9ac7c255b3da2e08ee290 Mon Sep 17 00:00:00 2001 From: Maxime Perrotin Date: Fri, 28 Jul 2017 14:21:48 +0200 Subject: [PATCH] compile buildsupport with -no-pie Recent versions of gcc are compiled by default with -pie (position-independent executable) enabled, which makes the symbol addresses in binaries depending on an offset which is only known at runtime. The side effect is that addr2line becomes unable to locate the symbols to display traceback in case of a runtime exception. --- buildsupport.gpr | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/buildsupport.gpr b/buildsupport.gpr index 31860c2..1005a6d 100644 --- a/buildsupport.gpr +++ b/buildsupport.gpr @@ -27,7 +27,8 @@ project BuildSupport is "-gnatwa", "-gnatoa", "-gnatg", - "-fstack-check"); + "-fstack-check", + "-no-pie"); for Default_Switches ("C") use ("-g", @@ -53,7 +54,8 @@ project BuildSupport is "-Wno-error=old-style-cast", "-Wundef", "-std=c11", - "-pedantic"); + "-pedantic", + "-no-pie"); end Compiler; end BuildSupport; -- GitLab