This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix cross-compiling with static linking in gdbserver Makefile.in


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.

-- 
Greetings,
Filipe Utzig.
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]