From f380b80b3e6a7dcf16f631142c0e5d409dce541a Mon Sep 17 00:00:00 2001 From: pierre Date: Fri, 30 Oct 2015 13:37:03 +0000 Subject: [PATCH] Also set cs_create_pic in init_settings so that units are compiled with this setting if tf_library_needs_pic is in target info flags git-svn-id: trunk@32199 - --- compiler/pmodules.pas | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/pmodules.pas b/compiler/pmodules.pas index 953ede2ac2..f8551aacf0 100644 --- a/compiler/pmodules.pas +++ b/compiler/pmodules.pas @@ -2027,7 +2027,11 @@ type exportlib.preparelib(program_name); if tf_library_needs_pic in target_info.flags then - include(current_settings.moduleswitches,cs_create_pic); + begin + include(current_settings.moduleswitches,cs_create_pic); + { also set create_pic for all unit compilation } + include(init_settings.moduleswitches,cs_create_pic); + end; { setup things using the switches, do this before the semicolon, because after the semicolon has been read, all following directives are parsed as well }