提交 f309c1ae 编写于 作者: R Richard Levitte

So, I discovered that if you have your $PATH set so a ld different from

GNU ld comes first, checking the usage of collect2 gives that instead of
GNU ld, even if GNU ld would be the one that would get used if we link using
gcc.  It's much better, apparently, to ask gcc directly what the path to
GNU ld is (provided it's there at all and gcc knows about it), and ask
the result if it's a GNU or not.  The bonus is that our GNU ld detection
mechanism got shorter and easier to understand...
上级 82a20fb0
...@@ -275,9 +275,7 @@ do_gnu-shared: ...@@ -275,9 +275,7 @@ do_gnu-shared:
done done
DETECT_GNU_LD=${CC} -v 2>&1 | grep '^gcc' >/dev/null 2>&1 && \ DETECT_GNU_LD=${CC} -v 2>&1 | grep '^gcc' >/dev/null 2>&1 && \
collect2=`gcc -print-prog-name=collect2 2>&1` && \ ld=`gcc -print-prog-name=ld 2>&1` && \
[ -n "$$collect2" ] && \
my_ld=`$$collect2 --help 2>&1 | grep Usage: | sed 's/^Usage: *\([^ ][^ ]*\).*/\1/'` && \
[ -n "$$my_ld" ] && \ [ -n "$$my_ld" ] && \
$$my_ld -v 2>&1 | grep 'GNU ld' >/dev/null 2>&1 $$my_ld -v 2>&1 | grep 'GNU ld' >/dev/null 2>&1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册