Răsfoiți Sursa

+ create subarch directories if a subarch is passed to a makefile
+ pass the ABI with -Ca if the makefile is called with an ABI parameter
* create a default config, which searches in $subarch-$fpcabi as well

git-svn-id: branches/target-subdir@30766 -

florian 10 ani în urmă
părinte
comite
aa4a8e1b1a
2 a modificat fișierele cu 26 adăugiri și 1 ștergeri
  1. 18 0
      utils/fpcm/fpcmake.ini
  2. 8 1
      utils/fpcmkcfg/fpc.cft

+ 18 - 0
utils/fpcm/fpcmake.ini

@@ -252,6 +252,12 @@ endif
 FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
 FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
 
+ifeq ($(ABI),)
+ABI:=default
+else
+override FPCOPT+=-Ca$(ABI)
+endif
+
 ifeq ($(CPU_TARGET),armeb)
 ARCH=arm
 override FPCOPT+=-Cb
@@ -259,6 +265,7 @@ else
 ifeq ($(CPU_TARGET),armel)
 ARCH=arm
 override FPCOPT+=-CaEABI
+override ABI:=eabi
 else
 ARCH=$(CPU_TARGET)
 endif
@@ -475,6 +482,10 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
 ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
+# encode subarch?
+ifneq ($(SUBARCH),)
+UNITSDIR:=$(UNITSDIR)/$(SUBARCH)-$(ABI)
+endif
 
 # Packages dir
 PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
@@ -621,6 +632,9 @@ COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
 else
 COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
 endif
+ifneq ($(SUBARCH),)
+COMPILER_UNITTARGETDIR:=$(COMPILER_UNITTARGETDIR)/$(SUBARCH)-$(ABI)
+endif
 endif
 ifndef COMPILER_TARGETDIR
 COMPILER_TARGETDIR=.
@@ -673,6 +687,10 @@ ifdef PACKAGE_NAME
 INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
 endif
 endif
+# encode subarch?
+ifneq ($(SUBARCH),)
+INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(SUBARCH)-$(ABI)
+endif
 endif
 
 # Where to install shared libraries

+ 8 - 1
utils/fpcmkcfg/fpc.cft

@@ -147,6 +147,9 @@
 -Fu%basepath%/units/$fpctarget
 -Fu%basepath%/units/$fpctarget/*
 -Fu%basepath%/units/$fpctarget/rtl
+-Fu%basepath%/units/$fpctarget/$subarch-$fpcabi
+-Fu%basepath%/units/$fpctarget/$subarch-$fpcabi/*
+-Fu%basepath%/units/$fpctarget/$subarch-$fpcabi/rtl
 
 #ifdef cpui8086
 -Fu%basepath%/units/$fpctarget/$fpcsubarch-$fpcmemorymodel
@@ -156,16 +159,20 @@
 
 #IFDEF FPCAPACHE_1_3
 -Fu%basepath%/units/$fpctarget/httpd13/
+-Fu%basepath%/units/$fpctarget/$subarch-$fpcabi/httpd13/
 #ELSE
 #IFDEF FPCAPACHE_2_0
 -Fu%basepath%/units/$fpctarget/httpd20
+-Fu%basepath%/units/$fpctarget/$subarch-$fpcabi/httpd20
 #ELSE
 -Fu%basepath%/units/$fpctarget/httpd22
+-Fu%basepath%/units/$fpctarget/$subarch-$fpcabi/httpd22
 #ENDIF
 #ENDIF
 
 # searchpath for fppkg user-specific packages
--Fu%localbasepath%/units/$FPCTARGET/*
+-Fu%localbasepath%/units/$fpctarget/*
+-Fu%localbasepath%/units/$fpctarget/$subarch-$fpcabi/*
 
 # path to the gcclib
 %gcclibpath%