Module: xenomai-3
Branch: stable-3.0.x
Commit: 6c476beb795956872a1dfcdf9ec36de7a3ad31ae
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=6c476beb795956872a1dfcdf9ec36de7a3ad31ae

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu Oct 19 12:57:54 2017 +0200

scripts/wrap-link.sh: fix -Ur vs -pie conflict

Often reported as a failure to build Xenomai over Debian Stretch,
which ships with gcc6 built with --enable-default-pie, ld's -Ur option
as given by wrap-link.sh does not mix well with -pie which is
implicitly enabled, causing the linker to bail out on error.

Since this script eventually completes the link stage to produce a
fully resolved executable, collecting the ctors/dtors and resolving
all references from the partially linked object file is implied
anyway, making -Ur useless in stage2 at best.

For details, see:
http://xenomai.org/pipermail/xenomai/2017-October/037799.html
https://xenomai.org/pipermail/xenomai/2017-August/037648.html
http://www.xenomai.org/pipermail/xenomai/2017-May/037312.html

---

 scripts/wrap-link.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/wrap-link.sh b/scripts/wrap-link.sh
index aab7899..fa83bd5 100755
--- a/scripts/wrap-link.sh
+++ b/scripts/wrap-link.sh
@@ -204,7 +204,7 @@ done
 
 if $stage2; then
     $verbose && set -x
-    $dryrun $cc -o "$output.tmp" -Wl,-Ur -nostdlib $stage1_args
+    $dryrun $cc -o "$output.tmp" -r -nostdlib $stage1_args
     $dryrun $cc -o "$output" "$output.tmp" $stage2_args
     $dryrun rm -f $output.tmp
 else


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to