From 2aadf050934f369fcabab8f67ca84a4b4b9ac7c5 Mon Sep 17 00:00:00 2001 From: marco Date: Fri, 30 Jun 2006 20:14:01 +0000 Subject: [PATCH] * link reordering git-svn-id: trunk@4016 - --- compiler/systems/t_bsd.pas | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/compiler/systems/t_bsd.pas b/compiler/systems/t_bsd.pas index 6ccf84b29f..7e7c411617 100644 --- a/compiler/systems/t_bsd.pas +++ b/compiler/systems/t_bsd.pas @@ -315,7 +315,12 @@ Begin if (cs_link_pthread in aktglobalswitches) Then // convert libpthread to libc_r. LinkLibraryAliases.add('pthread','c_r'); end; - end; + end +else + begin + LinkLibraryOrder.add('gcc','',15); + LinkLibraryOrder.add('c','',50); + end; End; Function TLinkerBSD.WriteResponseFile(isdll:boolean) : Boolean; @@ -366,14 +371,13 @@ begin if linklibc then prtobj:=cprtobj; end; - if reorder Then - ExpandAndApplyOrder(SharedLibFiles); // after this point addition of shared libs not allowed. end else begin { for darwin: always link dynamically against libc } linklibc := true; + reorder:=reorderentries; if not(isdll) then if not(cs_profile in aktmoduleswitches) then begin @@ -388,6 +392,8 @@ begin prtobj:=''; end; + if reorder Then + ExpandAndApplyOrder(SharedLibFiles); { Open link.res file } LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);