Browse Source

* the final build of packages and rtl are compiled with the general tls model on i386 as they could be used in dyn. libraries.
This does not hurt much as the linker optimized the threadvar access if possible

git-svn-id: trunk@43072 -

florian 5 years ago
parent
commit
c652cd629a
2 changed files with 14 additions and 0 deletions
  1. 5 0
      Makefile
  2. 9 0
      Makefile.fpc

+ 5 - 0
Makefile

@@ -470,6 +470,11 @@ endif
 ifneq ($(OPT),)
 ifneq ($(OPT),)
 OPTNEW+=$(OPT)
 OPTNEW+=$(OPT)
 endif
 endif
+ifneq ($(findstring $(OS_TARGET),linux),)
+ifneq ($(findstring $(CPU_TARGET),i386),)
+override OPTNEW+=-CVgeneral
+endif
+endif
 CLEANOPTS=FPC=$(PPNEW)
 CLEANOPTS=FPC=$(PPNEW)
 BUILDOPTS=FPC=$(PPNEW) FPCFPMAKE=$(FPCFPMAKENEW) RELEASE=1 'OPT=$(OPTNEW)'
 BUILDOPTS=FPC=$(PPNEW) FPCFPMAKE=$(FPCFPMAKENEW) RELEASE=1 'OPT=$(OPTNEW)'
 INSTALLOPTS=FPC=$(PPNEW) ZIPDESTDIR=$(BASEDIR) FPCMAKE=$(FPCMAKENEW)
 INSTALLOPTS=FPC=$(PPNEW) ZIPDESTDIR=$(BASEDIR) FPCMAKE=$(FPCMAKENEW)

+ 9 - 0
Makefile.fpc

@@ -197,6 +197,15 @@ endif
 ifneq ($(OPT),)
 ifneq ($(OPT),)
 OPTNEW+=$(OPT)
 OPTNEW+=$(OPT)
 endif
 endif
+
+# some targets do not generate PIC by default so we have select explicitly 
+# the general threading model when compiling the final versions of rtl and packages
+ifneq ($(findstring $(OS_TARGET),linux),)
+ifneq ($(findstring $(CPU_TARGET),i386),)
+override OPTNEW+=-CVgeneral
+endif
+endif
+
 CLEANOPTS=FPC=$(PPNEW)
 CLEANOPTS=FPC=$(PPNEW)
 BUILDOPTS=FPC=$(PPNEW) FPCFPMAKE=$(FPCFPMAKENEW) RELEASE=1 'OPT=$(OPTNEW)'
 BUILDOPTS=FPC=$(PPNEW) FPCFPMAKE=$(FPCFPMAKENEW) RELEASE=1 'OPT=$(OPTNEW)'
 INSTALLOPTS=FPC=$(PPNEW) ZIPDESTDIR=$(BASEDIR) FPCMAKE=$(FPCMAKENEW)
 INSTALLOPTS=FPC=$(PPNEW) ZIPDESTDIR=$(BASEDIR) FPCMAKE=$(FPCMAKENEW)