]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdbserver/Makefile.in
elf: Add GNU_PROPERTY_UINT32_AND_XXX/GNU_PROPERTY_UINT32_OR_XXX
[thirdparty/binutils-gdb.git] / gdbserver / Makefile.in
index a2fe302d247131e252af8a7ad59c3b7ca3a79ab0..12e9b2777aef115e686840cef56c0844919c96f5 100644 (file)
@@ -103,7 +103,16 @@ INCLUDE_DIR = ${srcdir}/../include
 INCLUDE_DEP = $$(INCLUDE_DIR)
 
 LIBIBERTY_BUILDDIR = ../libiberty
-LIBIBERTY = $(LIBIBERTY_BUILDDIR)/libiberty.a
+LIBIBERTY_NORMAL = $(LIBIBERTY_BUILDDIR)/libiberty.a
+LIBIBERTY_NOASAN = $(LIBIBERTY_BUILDDIR)/noasan/libiberty.a
+LIBIBERTY_PIC = $(LIBIBERTY_BUILDDIR)/pic/libiberty.a
+LIBIBERTY_FOR_SHLIB = \
+  $(if $(wildcard $(LIBIBERTY_NOASAN)),\
+       $(LIBIBERTY_NOASAN),\
+       $(if $(wildcard $(LIBIBERTY_PIC)),\
+           $(LIBIBERTY_PIC),\
+           $(LIBIBERTY_NORMAL)))
+LIBIBERTY = $(LIBIBERTY_NORMAL)
 
 GDBSUPPORT_BUILDDIR = ../gdbsupport
 GDBSUPPORT = $(GDBSUPPORT_BUILDDIR)/libgdbsupport.a
@@ -113,8 +122,8 @@ ustlibs = @ustlibs@
 ustinc = @ustinc@
 
 # gnulib
-GNULIB_BUILDDIR = ../gnulib
-include $(GNULIB_BUILDDIR)/Makefile.gnulib.inc
+GNULIB_PARENT_DIR = ..
+include $(GNULIB_PARENT_DIR)/gnulib/Makefile.gnulib.inc
 
 # Where is the INTL library?  Typically in ../intl.
 INTL = @LIBINTL@
@@ -177,7 +186,6 @@ SFILES = \
        $(srcdir)/dll.cc \
        $(srcdir)/gdbreplay.cc \
        $(srcdir)/hostio.cc \
-       $(srcdir)/hostio-errno.cc \
        $(srcdir)/i387-fp.cc \
        $(srcdir)/inferiors.cc \
        $(srcdir)/linux-aarch64-low.cc \
@@ -220,6 +228,7 @@ SFILES = \
        $(srcdir)/../gdb/arch/arm-linux.c \
        $(srcdir)/../gdb/arch/ppc-linux-common.c \
        $(srcdir)/../gdb/arch/riscv.c \
+       $(srcdir)/../gdb/nat/aarch64-mte-linux-ptrace.c \
        $(srcdir)/../gdb/nat/aarch64-sve-linux-ptrace.c \
        $(srcdir)/../gdb/nat/linux-btrace.c \
        $(srcdir)/../gdb/nat/linux-namespaces.c \
@@ -395,7 +404,7 @@ $(IPA_LIB): $(sort $(IPA_OBJS)) ${CDEPS}
        $(ECHO_CXXLD) $(CC_LD) -shared -fPIC -Wl,--soname=$(IPA_LIB) \
                -Wl,--no-undefined $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) \
                 $(CXXFLAGS) \
-               -o $(IPA_LIB) ${IPA_OBJS} $(LIBIBERTY) -ldl -pthread
+               -o $(IPA_LIB) ${IPA_OBJS} $(LIBIBERTY_FOR_SHLIB) -ldl -pthread
 
 # Put the proper machine-specific files first, so M-. on a machine
 # specific routine gets the one for the correct machine.
@@ -481,7 +490,7 @@ UST_CFLAGS = $(ustinc) -DCONFIG_UST_GDB_INTEGRATION
 # Undo gnulib replacements for the IPA shared library build.
 # The gnulib headers are still needed, but gnulib is not linked
 # into the IPA lib so replacement apis don't work.
-UNDO_GNULIB_CFLAGS = -Drpl_strerror_r=strerror_r
+UNDO_GNULIB_CFLAGS = -Drpl_strerror_r=strerror_r -Drpl_free=free
 
 # Note, we only build the IPA if -fvisibility=hidden is supported in
 # the first place.