فهرست منبع

Change conditions under which IDE executable is generated:

  Add GDBMI_IS_STATIC variable, set to true for systems
  which generate static FP IDE executable (without library dependencies)
  and can thus also be compiled in cross-compile conditions.

  Only add -sp fpmake option (which means skip executable generation)
  if GDBMI_IS_STATIC is not defined.

git-svn-id: trunk@34522 -
pierre 9 سال پیش
والد
کامیت
ca4f7719f3
1فایلهای تغییر یافته به همراه16 افزوده شده و 5 حذف شده
  1. 16 5
      ide/Makefile.fpc

+ 16 - 5
ide/Makefile.fpc

@@ -50,26 +50,37 @@ FPMAKE_OPT+=$(FPC_TARGETOPT)
 FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
 FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
 FPMAKE_OPT+=--compiler=$(FPC)
 FPMAKE_OPT+=--compiler=$(FPC)
 FPMAKE_OPT+=-bu
 FPMAKE_OPT+=-bu
-ifndef BUILDFULLNATIVE
-FPMAKE_OPT+=-sp
-endif
 ifdef NOGDB
 ifdef NOGDB
 FPMAKE_OPT+=--NoGDB=1
 FPMAKE_OPT+=--NoGDB=1
 else
 else
 ifndef NOGDBMI
 ifndef NOGDBMI
 ifneq ($(findstring $(OS_TARGET),$(GDBMI_DEFAULT_OS_LIST)),)
 ifneq ($(findstring $(OS_TARGET),$(GDBMI_DEFAULT_OS_LIST)),)
-FPMAKE_OPT+=--GDBMI=1
+GDBMI=1
 endif
 endif
-else
+endif # NOGDBMI
+
 ifdef GDBMI
 ifdef GDBMI
 FPMAKE_OPT+=--GDBMI=1
 FPMAKE_OPT+=--GDBMI=1
+# If the rtl does not require libc, then
+# IDE compiled with GDBMI should be a static executable
+# and can thus be cross-compiled 
+ifeq ($(findstring $(OS_TARGET),aix beos darwin haiku solaris),)
+GDBMI_IS_STATIC=1
 endif
 endif
 endif
 endif
+endifa # NOGDB
+
+ifndef GDBMI_IS_STATIC
+ifndef BUILDFULLNATIVE
+# Omit executable is only required if generated executable is not static
+FPMAKE_OPT+=-sp
 endif
 endif
+endif # GDBMI_IS_STATIC
 
 
 ifdef PPC_TARGET
 ifdef PPC_TARGET
 FPMAKE_OPT+=--CompilerTarget=$(PPC_TARGET)
 FPMAKE_OPT+=--CompilerTarget=$(PPC_TARGET)
 endif
 endif
+
 .NOTPARALLEL:
 .NOTPARALLEL:
 
 
 fpmake$(SRCEXEEXT): fpmake.pp
 fpmake$(SRCEXEEXT): fpmake.pp