Commit 030c5ce0 authored by kgardas's avatar kgardas Committed by Marge Bot

hadrian: use stage0 linker to merge objects when done during the stage0

Fixes #18800.
parent d6dff830
......@@ -15,6 +15,7 @@ ld = @LdCmd@
make = @MakeCmd@
nm = @NmCmd@
merge-objects = @MergeObjsCmd@
system-merge-objects = @LD_STAGE0@
objdump = @ObjdumpCmd@
ranlib = @REAL_RANLIB_CMD@
sphinx-build = @SPHINXBUILD@
......
......@@ -317,6 +317,15 @@ systemBuilderPath builder = case builder of
Happy -> fromKey "happy"
HsCpp -> fromKey "hs-cpp"
Ld _ -> fromKey "ld"
-- MergeObjects Stage0 is a special case in case of
-- cross-compiling. We're building stage1, e.g. code which will be
-- executed on the host and hence we need to use host's merge
-- objects tool and not the target merge object tool.
-- Note, merge object tool is usually platform linker with some
-- parameters. E.g. building a cross-compiler on and for x86_64
-- which will target ppc64 means that MergeObjects Stage0 will use
-- x86_64 linker and MergeObject _ will use ppc64 linker.
MergeObjects Stage0 -> fromKey "system-merge-objects"
MergeObjects _ -> fromKey "merge-objects"
Make _ -> fromKey "make"
Makeinfo -> fromKey "makeinfo"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment