From 679a97e27c505c285e0a35ea5c0e572eac07cff3 Mon Sep 17 00:00:00 2001 From: sof Date: Sat, 1 Nov 2003 01:01:18 +0000 Subject: [PATCH] [project @ 2003-11-01 01:01:18 by sof] Maintain order of 'objs' when adding them to v_Ld_inputs. Fixes ghc-6.x linking bug when .a's are given explicitly on the command-line. merge to stable. --- ghc/compiler/main/Main.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/main/Main.hs b/ghc/compiler/main/Main.hs index 63c5e5f..bbdd8f8 100644 --- a/ghc/compiler/main/Main.hs +++ b/ghc/compiler/main/Main.hs @@ -1,7 +1,7 @@ {-# OPTIONS -fno-warn-incomplete-patterns -optc-DNON_POSIX_SOURCE #-} ----------------------------------------------------------------------------- --- $Id: Main.hs,v 1.135 2003/10/22 14:31:10 simonmar Exp $ +-- $Id: Main.hs,v 1.136 2003/11/01 01:01:18 sof Exp $ -- -- GHC Driver program -- @@ -222,7 +222,9 @@ main = normal_fileish_paths = map normalisePath fileish_args (srcs, objs) = partition looks_like_an_input normal_fileish_paths - mapM_ (add v_Ld_inputs) objs + -- Note: have v_Ld_inputs maintain the order in which 'objs' occurred on + -- the command-line. + mapM_ (add v_Ld_inputs) (reverse objs) ---------------- Display banners and configuration ----------- showBanners mode conf_file static_opts -- 1.7.10.4