|
@@ -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 }
|