Fix the linker so that it will not silently generate ELF binaries with invalid progra...
[deliverable/binutils-gdb.git] / gdb / gdbserver / Makefile.in
index bed2b1e4404d963e72b4c80b3cce8d6ca9666d6c..c25d21eec0570a511b6d2cfd7d3d8a1429ef9163 100644 (file)
@@ -49,13 +49,9 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
 RANLIB = @RANLIB@
 
-# The name of the compiler to use.
-COMPILER = @COMPILER@
-# Set to CFLAGS or CXXFLAGS, depending on compiler/language.
-COMPILER_CFLAGS = @COMPILER_CFLAGS@
-
 CC = @CC@
 CXX = @CXX@
+CXX_DIALECT= @CXX_DIALECT@
 AR = @AR@
 AR_FLAGS = rc
 
@@ -66,7 +62,7 @@ depcomp = $(SHELL) $(srcdir)/../depcomp
 
 # Note that these are overridden by GNU make-specific code below if
 # GNU make is used.  The overrides implement dependency tracking.
-COMPILE.pre = $(COMPILER)
+COMPILE.pre = $(CXX) $(CXX_DIALECT)
 COMPILE.post = -c -o $@
 COMPILE = $(COMPILE.pre) $(INTERNAL_CFLAGS) $(COMPILE.post)
 POSTCOMPILE = @true
@@ -84,8 +80,8 @@ 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=$(COMPILER)
+#CC_LD=g++ -static
+CC_LD=$(CXX) $(CXX_DIALECT)
 
 # Where is the "include" directory?  Traditionally ../include or ./include
 INCLUDE_DIR =  ${srcdir}/../../include
@@ -138,7 +134,7 @@ CXXFLAGS = @CXXFLAGS@
 CPPFLAGS = @CPPFLAGS@
 
 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
-INTERNAL_CFLAGS_BASE =  ${COMPILER_CFLAGS} ${GLOBAL_CFLAGS} \
+INTERNAL_CFLAGS_BASE =  ${CXXFLAGS} ${GLOBAL_CFLAGS} \
        ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS}
 INTERNAL_WARN_CFLAGS =  ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS)
 INTERNAL_CFLAGS =  ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER
@@ -185,7 +181,8 @@ SFILES=     $(srcdir)/gdbreplay.c $(srcdir)/inferiors.c $(srcdir)/dll.c \
        $(srcdir)/common/btrace-common.c \
        $(srcdir)/common/fileio.c $(srcdir)/nat/linux-namespaces.c \
        $(srcdir)/arch/arm.c $(srcdir)/common/common-regcache.c \
-       $(srcdir)/arch/arm-linux.c $(srcdir)/arch/arm-get-next-pcs.c
+       $(srcdir)/arch/arm-linux.c $(srcdir)/arch/arm-get-next-pcs.c \
+       $(srcdir)/common/new-op.c
 
 DEPFILES = @GDBSERVER_DEPFILES@
 
@@ -200,7 +197,7 @@ OBS = agent.o ax.o inferiors.o regcache.o remote-utils.o server.o signals.o \
       common-utils.o ptid.o buffer.o format.o filestuff.o dll.o notif.o \
       tdesc.o print-utils.o rsp-low.o errors.o common-debug.o cleanups.o \
       common-exceptions.o symbol.o btrace-common.o fileio.o common-regcache.o \
-      signals-state-save-restore.o \
+      signals-state-save-restore.o new-op.o \
       $(XML_BUILTIN) $(DEPFILES) $(LIBOBJS)
 GDBREPLAY_OBS = gdbreplay.o version.o
 GDBSERVER_LIBS = @GDBSERVER_LIBS@
@@ -259,7 +256,7 @@ FLAGS_TO_PASS = \
 # All generated files which can be included by another file.
 generated_files = config.h $(GNULIB_H)
 
-.c.o:
+%.o: %.c
        $(COMPILE) $<
        $(POSTCOMPILE)
 
@@ -648,6 +645,15 @@ rsp-low-ipa.o: ../common/rsp-low.c
 errors-ipa.o: ../common/errors.c
        $(IPAGENT_COMPILE) $<
        $(POSTCOMPILE)
+x32-linux-ipa.o: x32-linux.c
+       $(IPAGENT_COMPILE) $<
+       $(POSTCOMPILE)
+x32-avx-linux-ipa.o: x32-avx-linux.c
+       $(IPAGENT_COMPILE) $<
+       $(POSTCOMPILE)
+x32-avx512-linux-ipa.o: x32-avx512-linux.c
+       $(IPAGENT_COMPILE) $<
+       $(POSTCOMPILE)
 
 ax.o: ax.c
        $(COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
@@ -719,6 +725,9 @@ common-regcache.o: ../common/common-regcache.c
 signals-state-save-restore.o: ../common/signals-state-save-restore.c
        $(COMPILE) $<
        $(POSTCOMPILE)
+new-op.o: ../common/new-op.c
+       $(COMPILE) $<
+       $(POSTCOMPILE)
 
 # Arch object files rules form ../arch
 
@@ -793,14 +802,14 @@ aarch64.c : $(srcdir)/../regformats/aarch64.dat $(regdat_sh)
        $(SHELL) $(regdat_sh) $(srcdir)/../regformats/aarch64.dat aarch64.c
 reg-arm.c : $(srcdir)/../regformats/reg-arm.dat $(regdat_sh)
        $(SHELL) $(regdat_sh) $(srcdir)/../regformats/reg-arm.dat reg-arm.c
-arm-with-iwmmxt.c : $(srcdir)/../regformats/arm-with-iwmmxt.dat $(regdat_sh)
-       $(SHELL) $(regdat_sh) $(srcdir)/../regformats/arm-with-iwmmxt.dat arm-with-iwmmxt.c
-arm-with-vfpv2.c : $(srcdir)/../regformats/arm-with-vfpv2.dat $(regdat_sh)
-       $(SHELL) $(regdat_sh) $(srcdir)/../regformats/arm-with-vfpv2.dat arm-with-vfpv2.c
-arm-with-vfpv3.c : $(srcdir)/../regformats/arm-with-vfpv3.dat $(regdat_sh)
-       $(SHELL) $(regdat_sh) $(srcdir)/../regformats/arm-with-vfpv3.dat arm-with-vfpv3.c
-arm-with-neon.c : $(srcdir)/../regformats/arm-with-neon.dat $(regdat_sh)
-       $(SHELL) $(regdat_sh) $(srcdir)/../regformats/arm-with-neon.dat arm-with-neon.c
+arm-with-iwmmxt.c : $(srcdir)/../regformats/arm/arm-with-iwmmxt.dat $(regdat_sh)
+       $(SHELL) $(regdat_sh) $(srcdir)/../regformats/arm/arm-with-iwmmxt.dat arm-with-iwmmxt.c
+arm-with-vfpv2.c : $(srcdir)/../regformats/arm/arm-with-vfpv2.dat $(regdat_sh)
+       $(SHELL) $(regdat_sh) $(srcdir)/../regformats/arm/arm-with-vfpv2.dat arm-with-vfpv2.c
+arm-with-vfpv3.c : $(srcdir)/../regformats/arm/arm-with-vfpv3.dat $(regdat_sh)
+       $(SHELL) $(regdat_sh) $(srcdir)/../regformats/arm/arm-with-vfpv3.dat arm-with-vfpv3.c
+arm-with-neon.c : $(srcdir)/../regformats/arm/arm-with-neon.dat $(regdat_sh)
+       $(SHELL) $(regdat_sh) $(srcdir)/../regformats/arm/arm-with-neon.dat arm-with-neon.c
 reg-bfin.c : $(srcdir)/../regformats/reg-bfin.dat $(regdat_sh)
        $(SHELL) $(regdat_sh) $(srcdir)/../regformats/reg-bfin.dat reg-bfin.c
 reg-cris.c : $(srcdir)/../regformats/reg-cris.dat $(regdat_sh)
@@ -965,26 +974,24 @@ reg-tilegx32.c : $(srcdir)/../regformats/reg-tilegx32.dat $(regdat_sh)
        $(SHELL) $(regdat_sh) $(srcdir)/../regformats/reg-tilegx32.dat reg-tilegx32.c
 
 #
-# Dependency tracking.  Most of this is conditional on GNU Make being
-# found by configure; if GNU Make is not found, we fall back to a
-# simpler scheme.
+# Dependency tracking.
 #
 
-@GMAKE_TRUE@ifeq ($(DEPMODE),depmode=gcc3)
+ifeq ($(DEPMODE),depmode=gcc3)
 # Note that we put the dependencies into a .Tpo file, then move them
 # into place if the compile succeeds.  We need this because gcc does
 # not atomically write the dependency output file.
-@GMAKE_TRUE@override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
-@GMAKE_TRUE@   -MF $(DEPDIR)/$(basename $(@F)).Tpo
-@GMAKE_TRUE@override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \
-@GMAKE_TRUE@   $(DEPDIR)/$(basename $(@F)).Po
-@GMAKE_TRUE@else
-@GMAKE_TRUE@override COMPILE.pre = source='$<' object='$@' libtool=no \
-@GMAKE_TRUE@   DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC)
+override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
+       -MF $(DEPDIR)/$(basename $(@F)).Tpo
+override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \
+       $(DEPDIR)/$(basename $(@F)).Po
+else
+override COMPILE.pre = source='$<' object='$@' libtool=no \
+       DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC)
 # depcomp handles atomicity for us, so we don't need a postcompile
 # step.
-@GMAKE_TRUE@override POSTCOMPILE =
-@GMAKE_TRUE@endif
+override POSTCOMPILE =
+endif
 
 # A list of all the objects we might care about in this build, for
 # dependency tracking.
@@ -993,13 +1000,13 @@ all_object_files = $(OBS) $(GDBREPLAY_OBS) $(IPA_OBJS)
 # Ensure that generated files are created early.  Use order-only
 # dependencies if available.  They require GNU make 3.80 or newer,
 # and the .VARIABLES variable was introduced at the same time.
-@GMAKE_TRUE@ifdef .VARIABLES
-@GMAKE_TRUE@$(all_object_files): | $(generated_files)
-@GMAKE_TRUE@else
+ifdef .VARIABLES
+$(all_object_files): | $(generated_files)
+else
 $(all_object_files) : $(generated_files)
-@GMAKE_TRUE@endif
+endif
 
 # Dependencies.
-@GMAKE_TRUE@-include $(patsubst %.o, $(DEPDIR)/%.Po, $(all_object_files))
+-include $(patsubst %.o, $(DEPDIR)/%.Po, $(all_object_files))
 
 # This is the end of "Makefile.in".
This page took 0.026475 seconds and 4 git commands to generate.