mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 20:39:25 +02:00
* ignore pic directive/switch if the platform doesn't support pic, resolves #9281
git-svn-id: trunk@8157 -
This commit is contained in:
parent
8b11f99765
commit
5e60b52f28
@ -345,8 +345,8 @@ scanner_e_illegal_warn_state=02079_E_Illegal state for $WARN directive
|
||||
% Only ON and OFF can be used as state with a \$warn compiler directive
|
||||
scan_e_only_packset=02080_E_Illegal set packing value
|
||||
% Only 0, 1, 2, 4, 8, DEFAULT and NORMAL are allowed as packset parameter
|
||||
scan_w_pic_ignored=02081_W_PIC directive ignored
|
||||
% Several targets like windows do not support the PIC directive and need it to be
|
||||
scan_w_pic_ignored=02081_W_PIC directive or switch ignored
|
||||
% Several targets like windows do not support neither need PIC so the PIC directive and switch are
|
||||
% ignored.
|
||||
scan_w_unsupported_switch_by_target=02082_W_The switch "$1" is not supported by the currently selected target
|
||||
% Some compiler switches like $E are not supported by all targets.
|
||||
|
@ -729,7 +729,7 @@ const
|
||||
option_info=11024;
|
||||
option_help_pages=11025;
|
||||
|
||||
MsgTxtSize = 43728;
|
||||
MsgTxtSize = 43738;
|
||||
|
||||
MsgIdxMax : array[1..20] of longint=(
|
||||
24,83,237,83,63,49,107,22,135,60,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -496,7 +496,10 @@ begin
|
||||
break;
|
||||
end;
|
||||
'g' :
|
||||
include(init_settings.moduleswitches,cs_create_pic);
|
||||
if tf_no_pic_supported in target_info.flags then
|
||||
message(scan_w_pic_ignored)
|
||||
else
|
||||
include(init_settings.moduleswitches,cs_create_pic);
|
||||
'h' :
|
||||
begin
|
||||
val(copy(more,j+1,length(more)-j),heapsize,code);
|
||||
@ -672,7 +675,12 @@ begin
|
||||
'f' :
|
||||
begin
|
||||
if more='PIC' then
|
||||
include(init_settings.moduleswitches,cs_create_pic)
|
||||
begin
|
||||
if tf_no_pic_supported in target_info.flags then
|
||||
message(scan_w_pic_ignored)
|
||||
else
|
||||
include(init_settings.moduleswitches,cs_create_pic)
|
||||
end
|
||||
else
|
||||
IllegalPara(opt);
|
||||
end;
|
||||
|
@ -851,10 +851,10 @@ implementation
|
||||
procedure dir_pic;
|
||||
begin
|
||||
{ windows doesn't need/support pic }
|
||||
if not(target_info.system in system_windows+system_wince) then
|
||||
do_moduleswitch(cs_create_pic)
|
||||
if tf_no_pic_supported in target_info.flags then
|
||||
message(scan_w_pic_ignored)
|
||||
else
|
||||
message(scan_w_pic_ignored);
|
||||
do_moduleswitch(cs_create_pic);
|
||||
end;
|
||||
|
||||
procedure dir_pop;
|
||||
|
@ -313,7 +313,8 @@ interface
|
||||
tf_winlikewidestring,
|
||||
tf_dwarf_relative_addresses, // use offsets where the Dwarf spec requires this instead of absolute addresses (the latter is needed by Linux binutils)
|
||||
tf_dwarf_only_local_labels, // only use local labels inside the Dwarf debug_info section (needed for e.g. Darwin)
|
||||
tf_requires_proper_alignment
|
||||
tf_requires_proper_alignment,
|
||||
tf_no_pic_supported
|
||||
);
|
||||
|
||||
psysteminfo = ^tsysteminfo;
|
||||
|
@ -33,7 +33,7 @@ unit i_win;
|
||||
name : 'Win32 for i386';
|
||||
shortname : 'Win32';
|
||||
flags : [tf_files_case_aware,tf_has_dllscanner,tf_use_function_relative_addresses
|
||||
,tf_smartlink_sections{,tf_section_threadvars}{,tf_needs_dwarf_cfi},tf_winlikewidestring];
|
||||
,tf_smartlink_sections{,tf_section_threadvars}{,tf_needs_dwarf_cfi},tf_winlikewidestring,tf_no_pic_supported];
|
||||
cpu : cpu_i386;
|
||||
unit_env : 'WIN32UNITS';
|
||||
extradefines : 'MSWINDOWS;WINDOWS';
|
||||
@ -92,7 +92,8 @@ unit i_win;
|
||||
system : system_x86_64_win64;
|
||||
name : 'Win64 for x64';
|
||||
shortname : 'Win64';
|
||||
flags : [tf_files_case_aware,tf_has_dllscanner,tf_use_function_relative_addresses,tf_winlikewidestring];
|
||||
flags : [tf_files_case_aware,tf_has_dllscanner,tf_use_function_relative_addresses,
|
||||
tf_winlikewidestring,tf_no_pic_supported];
|
||||
cpu : cpu_x86_64;
|
||||
unit_env : 'WIN64UNITS';
|
||||
extradefines : 'MSWINDOWS;WINDOWS';
|
||||
@ -151,7 +152,8 @@ unit i_win;
|
||||
system : system_arm_wince;
|
||||
name : 'WinCE for ARM';
|
||||
shortname : 'WinCE';
|
||||
flags : [tf_files_case_aware,tf_use_function_relative_addresses{,tf_winlikewidestring},tf_smartlink_sections,tf_requires_proper_alignment];
|
||||
flags : [tf_files_case_aware,tf_use_function_relative_addresses{,tf_winlikewidestring},
|
||||
tf_smartlink_sections,tf_requires_proper_alignment,tf_no_pic_supported];
|
||||
cpu : cpu_arm;
|
||||
unit_env : '';
|
||||
extradefines : 'UNDER_CE;WINDOWS;UNICODE';
|
||||
@ -210,7 +212,8 @@ unit i_win;
|
||||
system : system_i386_wince;
|
||||
name : 'WinCE for i386';
|
||||
shortname : 'WinCE';
|
||||
flags : [tf_files_case_aware,tf_use_function_relative_addresses{,tf_winlikewidestring},tf_smartlink_sections];
|
||||
flags : [tf_files_case_aware,tf_use_function_relative_addresses
|
||||
{,tf_winlikewidestring},tf_smartlink_sections,tf_no_pic_supported];
|
||||
cpu : cpu_i386;
|
||||
unit_env : '';
|
||||
extradefines : 'UNDER_CE;WINDOWS;UNICODE';
|
||||
|
Loading…
Reference in New Issue
Block a user