Explorar el Código

* No need for the FPC_NATIVE define anymore. This define held the wrong
compiler for compiling fpmake and fpmkunit-bootstrap during cross-cpu
compiles. (bug #19263) Now the proper compiler is determined by executing
fpc -PB.

git-svn-id: trunk@17649 -

joost hace 14 años
padre
commit
0cf1eeb45b
Se han modificado 5 ficheros con 267 adiciones y 289 borrados
  1. 19 24
      Makefile
  2. 19 24
      packages/Makefile
  3. 19 24
      packages/fpmkunit/Makefile
  4. 184 187
      utils/fpcm/fpcmake.inc
  5. 26 30
      utils/fpcm/fpcmake.ini

+ 19 - 24
Makefile

@@ -1,5 +1,5 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/05/28]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/06/03]
 #
 default: help
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
@@ -107,36 +107,24 @@ FPC=$(PP)
 endif
 endif
 ifndef FPC
-DETERMINE_NATIVE_COMPILER=1
-else
-ifdef CROSSCOMPILE
-ifndef FPCFPMAKE
-DETERMINE_NATIVE_COMPILER=1
-endif
-endif
-endif
-ifdef DETERMINE_NATIVE_COMPILER
 FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
 ifneq ($(FPCPROG),)
 FPCPROG:=$(firstword $(FPCPROG))
 ifneq ($(CPU_TARGET),)
-FPCNATIVE:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
+FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
 else
-FPCNATIVE:=$(shell $(FPCPROG) -PB)
+FPC:=$(shell $(FPCPROG) -PB)
 endif
-ifneq ($(findstring Error,$(FPCNATIVE)),)
-override FPCNATIVE=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
 else
-ifeq ($(strip $(wildcard $(FPCNATIVE))),)
-FPCNATIVE:=$(firstword $(FPCPROG))
+ifeq ($(strip $(wildcard $(FPC))),)
+FPC:=$(firstword $(FPCPROG))
 endif
 endif
 else
-override FPCNATIVE=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
-endif
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
 endif
-ifndef FPC
-FPC=$(FPCNATIVE)
 endif
 override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
 override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
@@ -279,7 +267,16 @@ PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(F
 ifndef FPCFPMAKE
 ifdef CROSSCOMPILE
 ifeq ($(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR)))),)
-FPCFPMAKE:=$(FPCNATIVE)
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPCFPMAKE:=$(shell $(FPCPROG) -PB)
+ifeq ($(strip $(wildcard $(FPCFPMAKE))),)
+FPCFPMAKE:=$(firstword $(FPCPROG))
+endif
+else
+override FPCFPMAKE=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
 else
 FPCFPMAKE=$(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR))))
 FPMAKE_SKIP_CONFIG=-n
@@ -287,10 +284,8 @@ export FPCFPMAKE
 export FPMAKE_SKIP_CONFIG
 endif
 else
-FPCFPMAKE=$(FPC)
 FPMAKE_SKIP_CONFIG=-n
-export FPCFPMAKE
-export FPMAKE_SKIP_CONFIG
+FPCFPMAKE=$(FPC)
 endif
 endif
 override PACKAGE_NAME=fpc

+ 19 - 24
packages/Makefile

@@ -1,5 +1,5 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/06/01]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/06/03]
 #
 default: all
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
@@ -107,36 +107,24 @@ FPC=$(PP)
 endif
 endif
 ifndef FPC
-DETERMINE_NATIVE_COMPILER=1
-else
-ifdef CROSSCOMPILE
-ifndef FPCFPMAKE
-DETERMINE_NATIVE_COMPILER=1
-endif
-endif
-endif
-ifdef DETERMINE_NATIVE_COMPILER
 FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
 ifneq ($(FPCPROG),)
 FPCPROG:=$(firstword $(FPCPROG))
 ifneq ($(CPU_TARGET),)
-FPCNATIVE:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
+FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
 else
-FPCNATIVE:=$(shell $(FPCPROG) -PB)
+FPC:=$(shell $(FPCPROG) -PB)
 endif
-ifneq ($(findstring Error,$(FPCNATIVE)),)
-override FPCNATIVE=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
 else
-ifeq ($(strip $(wildcard $(FPCNATIVE))),)
-FPCNATIVE:=$(firstword $(FPCPROG))
+ifeq ($(strip $(wildcard $(FPC))),)
+FPC:=$(firstword $(FPCPROG))
 endif
 endif
 else
-override FPCNATIVE=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
-endif
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
 endif
-ifndef FPC
-FPC=$(FPCNATIVE)
 endif
 override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
 override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
@@ -279,7 +267,16 @@ PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(F
 ifndef FPCFPMAKE
 ifdef CROSSCOMPILE
 ifeq ($(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR)))),)
-FPCFPMAKE:=$(FPCNATIVE)
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPCFPMAKE:=$(shell $(FPCPROG) -PB)
+ifeq ($(strip $(wildcard $(FPCFPMAKE))),)
+FPCFPMAKE:=$(firstword $(FPCPROG))
+endif
+else
+override FPCFPMAKE=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
 else
 FPCFPMAKE=$(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR))))
 FPMAKE_SKIP_CONFIG=-n
@@ -287,10 +284,8 @@ export FPCFPMAKE
 export FPMAKE_SKIP_CONFIG
 endif
 else
-FPCFPMAKE=$(FPC)
 FPMAKE_SKIP_CONFIG=-n
-export FPCFPMAKE
-export FPMAKE_SKIP_CONFIG
+FPCFPMAKE=$(FPC)
 endif
 endif
 ifeq ($(FULL_TARGET),i386-linux)

+ 19 - 24
packages/fpmkunit/Makefile

@@ -1,5 +1,5 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/05/28]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/06/03]
 #
 default: all
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
@@ -107,36 +107,24 @@ FPC=$(PP)
 endif
 endif
 ifndef FPC
-DETERMINE_NATIVE_COMPILER=1
-else
-ifdef CROSSCOMPILE
-ifndef FPCFPMAKE
-DETERMINE_NATIVE_COMPILER=1
-endif
-endif
-endif
-ifdef DETERMINE_NATIVE_COMPILER
 FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
 ifneq ($(FPCPROG),)
 FPCPROG:=$(firstword $(FPCPROG))
 ifneq ($(CPU_TARGET),)
-FPCNATIVE:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
+FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
 else
-FPCNATIVE:=$(shell $(FPCPROG) -PB)
+FPC:=$(shell $(FPCPROG) -PB)
 endif
-ifneq ($(findstring Error,$(FPCNATIVE)),)
-override FPCNATIVE=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
 else
-ifeq ($(strip $(wildcard $(FPCNATIVE))),)
-FPCNATIVE:=$(firstword $(FPCPROG))
+ifeq ($(strip $(wildcard $(FPC))),)
+FPC:=$(firstword $(FPCPROG))
 endif
 endif
 else
-override FPCNATIVE=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
-endif
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
 endif
-ifndef FPC
-FPC=$(FPCNATIVE)
 endif
 override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
 override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
@@ -279,7 +267,16 @@ PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(F
 ifndef FPCFPMAKE
 ifdef CROSSCOMPILE
 ifeq ($(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR)))),)
-FPCFPMAKE:=$(FPCNATIVE)
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPCFPMAKE:=$(shell $(FPCPROG) -PB)
+ifeq ($(strip $(wildcard $(FPCFPMAKE))),)
+FPCFPMAKE:=$(firstword $(FPCPROG))
+endif
+else
+override FPCFPMAKE=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
 else
 FPCFPMAKE=$(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR))))
 FPMAKE_SKIP_CONFIG=-n
@@ -287,10 +284,8 @@ export FPCFPMAKE
 export FPMAKE_SKIP_CONFIG
 endif
 else
-FPCFPMAKE=$(FPC)
 FPMAKE_SKIP_CONFIG=-n
-export FPCFPMAKE
-export FPMAKE_SKIP_CONFIG
+FPCFPMAKE=$(FPC)
 endif
 endif
 override PACKAGE_NAME=fpmkunit

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 184 - 187
utils/fpcm/fpcmake.inc


+ 26 - 30
utils/fpcm/fpcmake.ini

@@ -160,52 +160,34 @@ FPC=$(PP)
 endif
 endif
 
-# The compiler to compile for the current system has to be determined
-# in case FPC is not defined, or when FPC is defined but a crossinstall
-# is performed. (This is to compile fpmake files)
-ifndef FPC
-DETERMINE_NATIVE_COMPILER=1
-else
-ifdef CROSSCOMPILE
-ifndef FPCFPMAKE
-DETERMINE_NATIVE_COMPILER=1
-endif
-endif
-endif
-
 # Try to detect the ppcXXX file to use by using "fpc -PB" option
 # to query for the default ppcXXX the fpc executable tries. When
 # fpc is not found use ppc386 by default. Also when fpc -PB gives
 # an error ppc386 will be used.
-ifdef DETERMINE_NATIVE_COMPILER
+ifndef FPC
 # check if fpc exists
 FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
 ifneq ($(FPCPROG),)
 FPCPROG:=$(firstword $(FPCPROG))
 ifneq ($(CPU_TARGET),)
-FPCNATIVE:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
+FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
 else
-FPCNATIVE:=$(shell $(FPCPROG) -PB)
+FPC:=$(shell $(FPCPROG) -PB)
 endif
 # Older fpc executables didn't support it and return
 # Error: Illegal processor... If found then fallback to ppc386
-ifneq ($(findstring Error,$(FPCNATIVE)),)
-override FPCNATIVE=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
 else
 # if the cross compiler is not found, fall back to fpc
-ifeq ($(strip $(wildcard $(FPCNATIVE))),)
-FPCNATIVE:=$(firstword $(FPCPROG))
+ifeq ($(strip $(wildcard $(FPC))),)
+FPC:=$(firstword $(FPCPROG))
 endif
 endif
 else
 # fpc binary not found, fallback to ppc386
-override FPCNATIVE=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
-endif
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
 endif
-
-# If FPC is not set, use the native compiler.
-ifndef FPC
-FPC=$(FPCNATIVE)
 endif
 
 # Get a clean executable name
@@ -333,14 +315,28 @@ export OS_TARGET OS_SOURCE ARCH CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TA
 # If FPCFPMAKE is not set and we're cross-compiling, try to find a
 # native compiler.
 ifndef FPCFPMAKE
+
 ifdef CROSSCOMPILE
 # Search for the (native) ppc compiler which is used to do the latest build
 # of the native rtl
+
 ifeq ($(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR)))),)
 # If that compiler is not found, use the common, installed native compiler
 # Note that in this case FPCFPMAKE is not exported, because it could be that
-# this compiler is compiled later on
-FPCFPMAKE:=$(FPCNATIVE)
+# a more suitable compiler is compiled later on
+# check if fpc exists
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPCFPMAKE:=$(shell $(FPCPROG) -PB)
+# if a native compiler is not found, fall back to fpc
+ifeq ($(strip $(wildcard $(FPCFPMAKE))),)
+FPCFPMAKE:=$(firstword $(FPCPROG))
+endif
+else
+# fpc binary not found, fallback to ppc386
+override FPCFPMAKE=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
 else
 # Use the ppc compiler. Because the path to the compiler is relative, do not
 # evaluate the variable here, but do that on the fly.
@@ -349,12 +345,12 @@ FPMAKE_SKIP_CONFIG=-n
 export FPCFPMAKE
 export FPMAKE_SKIP_CONFIG
 endif
+
 else
 FPCFPMAKE=$(FPC)
 FPMAKE_SKIP_CONFIG=-n
-export FPCFPMAKE
-export FPMAKE_SKIP_CONFIG
 endif
+
 endif
 
 

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio