Ver código fonte

* don't compile gdbver when the target is not the same as the source

peter 23 anos atrás
pai
commit
f2cdeaf6a6
2 arquivos alterados com 17 adições e 0 exclusões
  1. 7 0
      packages/base/gdbint/Makefile
  2. 10 0
      packages/base/gdbint/Makefile.fpc

+ 7 - 0
packages/base/gdbint/Makefile

@@ -1349,6 +1349,7 @@ makefiles: fpc_makefiles
 ifneq ($(wildcard fpcmake.loc),)
 include fpcmake.loc
 endif
+ifeq ($(OS_SOURCE)$(CPU_SOURCE),$(OS_TARGET)$(CPU_TARGET))
 ifeq ($(GDBFOUND),1)
 $(CURRDIR)getver$(EXEEXT) : gdbver.pp
 	$(COMPILER) -o$(CURRDIR)getver$(EXEEXT) gdbver.pp
@@ -1368,6 +1369,12 @@ gdbint$(PPUEXT): gdbint.pp
 	@$(ECHO) libgdb.a not found, using default GDB $(GDBVER)
 	$(COMPILER) -d$(GDBVER) gdbint.pp
 endif
+else
+GDBVER=GDB_V5
+gdbint$(PPUEXT): gdbint.pp
+	@$(ECHO) Different target os or cpu, using default GDB $(GDBVER)
+	$(COMPILER) -d$(GDBVER) gdbint.pp
+endif
 gdbcon$(PPUEXT): gdbcon.pp gdbint$(PPUEXT)
 ifeq ($(OS_TARGET),go32v2)
 DBGCOM=dbgcom$(OEXT)

+ 10 - 0
packages/base/gdbint/Makefile.fpc

@@ -58,6 +58,8 @@ endif
 
 
 [rules]
+ifeq ($(OS_SOURCE)$(CPU_SOURCE),$(OS_TARGET)$(CPU_TARGET))
+
 ifeq ($(GDBFOUND),1)
 # libgdb.a found
 
@@ -85,6 +87,14 @@ gdbint$(PPUEXT): gdbint.pp
         $(COMPILER) -d$(GDBVER) gdbint.pp
 endif
 
+else
+# Different OS_TARGET, default to libgdb v5
+GDBVER=GDB_V5
+gdbint$(PPUEXT): gdbint.pp
+        @$(ECHO) Different target os or cpu, using default GDB $(GDBVER)
+        $(COMPILER) -d$(GDBVER) gdbint.pp
+endif
+
 gdbcon$(PPUEXT): gdbcon.pp gdbint$(PPUEXT)
 
 ifeq ($(OS_TARGET),go32v2)