#
# TEST: tc-ld-is-gold
#
-tbegin "tc-ld-is-gold (bfd selected)"
-LD=ld.bfd tc-ld-is-gold && ret=1 || ret=0
+tbegin "tc-ld-is-gold (ld=bfd cc=bfd)"
+LD=ld.bfd LDFLAGS=-fuse-ld=bfd tc-ld-is-gold && ret=1 || ret=0
tend ${ret}
-tbegin "tc-ld-is-gold (gold selected)"
+tbegin "tc-ld-is-gold (ld=gold cc=default)"
LD=ld.gold tc-ld-is-gold
ret=$?
tend ${ret}
-tbegin "tc-ld-is-gold (bfd selected via flags)"
+tbegin "tc-ld-is-gold (ld=gold cc=bfd)"
LD=ld.gold LDFLAGS=-fuse-ld=bfd tc-ld-is-gold
ret=$?
tend ${ret}
-tbegin "tc-ld-is-gold (gold selected via flags)"
+tbegin "tc-ld-is-gold (ld=bfd cc=gold)"
LD=ld.bfd LDFLAGS=-fuse-ld=gold tc-ld-is-gold
ret=$?
tend ${ret}
#
tbegin "tc-ld-disable-gold (bfd selected)"
(
-export LD=ld.bfd LDFLAGS=
+export LD=ld.bfd LDFLAGS=-fuse-ld=bfd
ewarn() { :; }
tc-ld-disable-gold
-[[ ${LD} == "ld.bfd" && -z ${LDFLAGS} ]]
+[[ ${LD} == "ld.bfd" && ${LDFLAGS} == "-fuse-ld=bfd" ]]
)
tend $?
-tbegin "tc-ld-disable-gold (gold selected)"
+tbegin "tc-ld-disable-gold (ld=gold)"
(
export LD=ld.gold LDFLAGS=
ewarn() { :; }
)
tend $?
-tbegin "tc-ld-disable-gold (gold selected via flags)"
+tbegin "tc-ld-disable-gold (cc=gold)"
(
export LD= LDFLAGS="-fuse-ld=gold"
ewarn() { :; }