summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-05-02 16:22:09 +0000
committerflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-05-02 16:22:09 +0000
commite48c6409cf6d50d9bf3f2d1a45004f9fae5dc471 (patch)
tree3fab8fe658033de30197aee2fa9852633e417ced
parent9d607cf5de95a56cc695f20f480bdfd653243ad9 (diff)
downloadfpc-target-subdir.tar.gz
+ create subarch directories if a subarch is passed to a makefiletarget-subdir
+ 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: http://svn.freepascal.org/svn/fpc/branches/target-subdir@30766 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--utils/fpcm/fpcmake.ini18
-rw-r--r--utils/fpcmkcfg/fpc.cft9
2 files changed, 26 insertions, 1 deletions
diff --git a/utils/fpcm/fpcmake.ini b/utils/fpcm/fpcmake.ini
index 313b280730..f8549fd5e6 100644
--- a/utils/fpcm/fpcmake.ini
+++ b/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
diff --git a/utils/fpcmkcfg/fpc.cft b/utils/fpcmkcfg/fpc.cft
index 857f39c658..ebfba6c605 100644
--- a/utils/fpcmkcfg/fpc.cft
+++ b/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%