mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-26 20:51:27 +01:00
+ tsettings.tlsmodel
git-svn-id: trunk@40271 -
This commit is contained in:
parent
9c041afc7c
commit
0d50a63c7d
@ -164,6 +164,8 @@ interface
|
|||||||
|
|
||||||
disabledircache : boolean;
|
disabledircache : boolean;
|
||||||
|
|
||||||
|
tlsmodel : ttlsmodel;
|
||||||
|
|
||||||
{$if defined(i8086)}
|
{$if defined(i8086)}
|
||||||
x86memorymodel : tx86memorymodel;
|
x86memorymodel : tx86memorymodel;
|
||||||
{$endif defined(i8086)}
|
{$endif defined(i8086)}
|
||||||
@ -556,6 +558,8 @@ interface
|
|||||||
minfpconstprec : s32real;
|
minfpconstprec : s32real;
|
||||||
|
|
||||||
disabledircache : false;
|
disabledircache : false;
|
||||||
|
|
||||||
|
tlsmodel : tlsm_none;
|
||||||
{$if defined(i8086)}
|
{$if defined(i8086)}
|
||||||
x86memorymodel : mm_small;
|
x86memorymodel : mm_small;
|
||||||
{$endif defined(i8086)}
|
{$endif defined(i8086)}
|
||||||
|
|||||||
@ -706,6 +706,13 @@ interface
|
|||||||
);
|
);
|
||||||
tprocinfoflags=set of tprocinfoflag;
|
tprocinfoflags=set of tprocinfoflag;
|
||||||
|
|
||||||
|
ttlsmodel = (tlsm_none,
|
||||||
|
{ elf tls model: works for all kind of code and thread vars }
|
||||||
|
tlsm_general,
|
||||||
|
{ elf tls model: works only if the thread vars are declared and used in the same executable }
|
||||||
|
tlsm_local
|
||||||
|
);
|
||||||
|
|
||||||
type
|
type
|
||||||
{ float types -- warning, this enum/order is used internally by the RTL
|
{ float types -- warning, this enum/order is used internally by the RTL
|
||||||
as well in rtl/inc/real2str.inc }
|
as well in rtl/inc/real2str.inc }
|
||||||
|
|||||||
@ -4031,6 +4031,15 @@ begin
|
|||||||
not(cs_link_separate_dbg_file in init_settings.globalswitches) then
|
not(cs_link_separate_dbg_file in init_settings.globalswitches) then
|
||||||
exclude(init_settings.globalswitches,cs_link_strip);
|
exclude(init_settings.globalswitches,cs_link_strip);
|
||||||
|
|
||||||
|
{ choose a reasonable tls model }
|
||||||
|
if (tf_section_threadvars in target_info.flags) and (init_settings.tlsmodel=tlsm_none) then
|
||||||
|
begin
|
||||||
|
if cs_create_pic in init_settings.moduleswitches then
|
||||||
|
init_settings.tlsmodel:=tlsm_general
|
||||||
|
else
|
||||||
|
init_settings.tlsmodel:=tlsm_local;
|
||||||
|
end;
|
||||||
|
|
||||||
{ set Mac OS X version default macros if not specified explicitly }
|
{ set Mac OS X version default macros if not specified explicitly }
|
||||||
option.MaybeSetDefaultMacVersionMacro;
|
option.MaybeSetDefaultMacVersionMacro;
|
||||||
|
|
||||||
|
|||||||
@ -3085,6 +3085,8 @@ type
|
|||||||
minfpconstprec:=tfloattype(tokenreadenum(sizeof(tfloattype)));
|
minfpconstprec:=tfloattype(tokenreadenum(sizeof(tfloattype)));
|
||||||
|
|
||||||
disabledircache:=boolean(tokenreadbyte);
|
disabledircache:=boolean(tokenreadbyte);
|
||||||
|
|
||||||
|
tlsmodel:=ttlsmodel(tokenreadenum(sizeof(ttlsmodel)));
|
||||||
{ TH: Since the field was conditional originally, it was not stored in PPUs. }
|
{ TH: Since the field was conditional originally, it was not stored in PPUs. }
|
||||||
{ While adding ControllerSupport constant, I decided not to store ct_none }
|
{ While adding ControllerSupport constant, I decided not to store ct_none }
|
||||||
{ on targets not supporting controllers, but this might be changed here and }
|
{ on targets not supporting controllers, but this might be changed here and }
|
||||||
@ -3166,6 +3168,9 @@ type
|
|||||||
tokenwriteenum(minfpconstprec,sizeof(tfloattype));
|
tokenwriteenum(minfpconstprec,sizeof(tfloattype));
|
||||||
|
|
||||||
recordtokenbuf.write(byte(disabledircache),1);
|
recordtokenbuf.write(byte(disabledircache),1);
|
||||||
|
|
||||||
|
tokenwriteenum(tlsmodel,sizeof(tlsmodel));
|
||||||
|
|
||||||
{ TH: See note about controllertype field in tokenreadsettings. }
|
{ TH: See note about controllertype field in tokenreadsettings. }
|
||||||
{$PUSH}
|
{$PUSH}
|
||||||
{$WARN 6018 OFF} (* Unreachable code due to compile time evaluation *)
|
{$WARN 6018 OFF} (* Unreachable code due to compile time evaluation *)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user