Fix cross-compiling with static linking in gdbserver Makefile.in

Message ID CAGBPMwiYgqJVvVM+UAtTi1gpfYtgMnnmUbhbRaa5KWC+TB-n8Q@mail.gmail.com
State New, archived
Headers

Commit Message

Filipe Utzig Nov. 10, 2014, 10:46 a.m. UTC
  The Makefile.in of gdbserver is written to use gcc instead ${CC} when
you choose to compile the target with libraries linked statically. In
fact is not a bug itself, but the comment says to set that line if you
want/need to compile with the -static flag, and I saw some users
having troubles with this, so I believe that's a good idea do the
comment in the right way.

This patch should fix that.
  

Patch

From f9d4369866dc3551d01df8b160e9d75b3e220f7d Mon Sep 17 00:00:00 2001
From: Filipe Franciel Utzig <futzig@parks.com.br>
Date: Mon, 3 Nov 2014 10:55:41 -0200
Subject: [PATCH] Fix cross-compiling static linked build

---
 gdb/gdbserver/Makefile.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 8b0318a..c2ef44c 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -78,7 +78,7 @@  VPATH = @srcdir@
 
 # Set this up with gcc if you have gnu ld and the loader will print out
 # line numbers for undefinded refs.
-#CC-LD=gcc -static
+#CC-LD=${CC} -static
 CC-LD=${CC}
 
 # Where is the "include" directory?  Traditionally ../include or ./include
-- 
1.9.1