This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch v3 01/16] gdbserver, build: add -DGDBSERVER
- From: markus dot t dot metzger at intel dot com
- To: gdb-patches at sourceware dot org
- Cc: markus dot t dot metzger at gmail dot com, jan dot kratochvil at redhat dot com, palves at redhat dot com, tromey at redhat dot com, kettenis at gnu dot org, Markus Metzger <markus dot t dot metzger at intel dot com>
- Date: Tue, 14 Aug 2012 14:59:16 +0200
- Subject: [patch v3 01/16] gdbserver, build: add -DGDBSERVER
- References: <1344949171-9545-1-git-send-email-markus.t.metzger@intel.com>
From: Markus Metzger <markus.t.metzger@intel.com>
A use of common/vec.h in gdbserver may result in compile errors if GDBSERVER is
not defined.
Add -DGDBSERVER to all gdbserver cflags.
2012-08-14 Markus Metzger <markus.t.metzger@intel.com>
gdbserver/
* Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
(various make rules): Remove -DGDBSERVER
---
gdb/gdbserver/Makefile.in | 27 +++++++++++++++------------
1 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index f62799e..ae5a60e 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -113,6 +113,9 @@ INTERNAL_CFLAGS_BASE = ${CFLAGS} ${GLOBAL_CFLAGS} \
INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS)
INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS)
+# Let all files know we're compiling for gdbserver.
+INTERNAL_CFLAGS += -DGDBSERVER
+
# LDFLAGS is specifically reserved for setting from the command line
# when running make.
LDFLAGS = @LDFLAGS@
@@ -447,7 +450,7 @@ UST_CFLAGS = $(ustinc) -DCONFIG_UST_GDB_INTEGRATION
# Note, we only build the IPA if -fvisibility=hidden is supported in
# the first place.
IPAGENT_CFLAGS = $(CPPFLAGS) $(INTERNAL_CFLAGS) $(UST_CFLAGS) \
- -fPIC -DGDBSERVER -DIN_PROCESS_AGENT \
+ -fPIC -DIN_PROCESS_AGENT \
-fvisibility=hidden
# In-process agent object rules
@@ -494,40 +497,40 @@ gdbreplay.o: gdbreplay.c config.h
dll.o: dll.c $(server_h)
signals.o: ../common/signals.c $(server_h) $(signals_def)
- $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< -DGDBSERVER
+ $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $<
linux-procfs.o: ../common/linux-procfs.c $(server_h)
- $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< -DGDBSERVER
+ $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $<
linux-ptrace.o: ../common/linux-ptrace.c $(server_h)
- $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< -DGDBSERVER
+ $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $<
common-utils.o: ../common/common-utils.c $(server_h)
- $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< -DGDBSERVER
+ $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $<
vec.o: ../common/vec.c $(vec_h)
- $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< -DGDBSERVER
+ $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $<
gdb_vecs.o: ../common/gdb_vecs.c $(vec_h) $(gdb_vecs_h) $(host_defs_h)
$(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< -DGDBSERVER
xml-utils.o: ../common/xml-utils.c $(server_h)
- $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< -DGDBSERVER
+ $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $<
linux-osdata.o: ../common/linux-osdata.c $(server_h) $(linux_osdata_h) ../common/gdb_dirent.h
- $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< -DGDBSERVER
+ $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $<
ptid.o: ../common/ptid.c $(ptid_h)
- $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< -DGDBSERVER
+ $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $<
buffer.o: ../common/buffer.c $(server_h)
- $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< -DGDBSERVER
+ $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $<
format.o: ../common/format.c $(server_h)
- $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< -DGDBSERVER
+ $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $<
agent.o: ../common/agent.c $(server_h) $(agent_h)
- $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< -DGDBSERVER
+ $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $<
# We build vasprintf with -DHAVE_CONFIG_H because we want that unit to
# include our config.h file. Otherwise, some system headers do not get
--
1.7.1