Browse Source

+ take care of OPTNEW when building utils

git-svn-id: trunk@44866 -
florian 5 years ago
parent
commit
c96a3cc9d1
2 changed files with 14 additions and 0 deletions
  1. 9 0
      compiler/utils/Makefile
  2. 5 0
      compiler/utils/Makefile.fpc

+ 9 - 0
compiler/utils/Makefile

@@ -202,6 +202,12 @@ $(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx1
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -335,6 +341,9 @@ FPMAKE_SKIP_CONFIG=-n
 FPCFPMAKE=$(FPC)
 endif
 endif
+ifdef OPTNEW
+override FPCOPT+=$(OPTNEW)
+endif
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
 endif

+ 5 - 0
compiler/utils/Makefile.fpc

@@ -25,6 +25,11 @@ fpcdir=../..
 [shared]
 build=n
 
+[prerules]
+ifdef OPTNEW
+override FPCOPT+=$(OPTNEW)
+endif
+
 [rules]
 #
 # PPU Tools