* link with -nopie on OpenBSD only if PIC code generation is disabled

git-svn-id: trunk@41652 -
This commit is contained in:
nickysn 2019-03-09 16:11:52 +00:00
parent cb5b407e89
commit 3a58a6261a

View File

@ -800,8 +800,9 @@ begin
DynLinKStr:=DynLinkStr+' -dynamic'; // one dash!
end;
{ Use -nopie on OpenBSD }
if (target_info.system in systems_openbsd) then
{ Use -nopie on OpenBSD if PIC support is turned off }
if (target_info.system in systems_openbsd) and
not(cs_create_pic in current_settings.moduleswitches) then
Info.ExtraOptions:=Info.ExtraOptions+' -nopie';
{ -N seems to be needed on NetBSD/earm }