aboutsummaryrefslogtreecommitdiff
path: root/gcc/mklibgcc.in
diff options
context:
space:
mode:
authorPeter O'Gorman <peter@pogma.com>2005-02-16 04:48:47 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2005-02-15 20:48:47 -0800
commit489ce9e7ab25a049ae546f36aada3f5e5a3646d8 (patch)
tree4b2634e86686c58e08459634610971676f159fc0 /gcc/mklibgcc.in
parent7e9534bc544cd62cb587a17c50eed08f8ca68185 (diff)
downloadgcc-489ce9e7ab25a049ae546f36aada3f5e5a3646d8.zip
gcc-489ce9e7ab25a049ae546f36aada3f5e5a3646d8.tar.gz
gcc-489ce9e7ab25a049ae546f36aada3f5e5a3646d8.tar.bz2
re PR bootstrap/18810 (Darwin's as unlinks /dev/null)
2005-02-15 Peter O'Gorman <peter@pogma.com> PR bootstrap/18810 * mklibgcc.in (vis_hide): Use a temporary object file, not -o /dev/null. From-SVN: r95096
Diffstat (limited to 'gcc/mklibgcc.in')
-rw-r--r--gcc/mklibgcc.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/mklibgcc.in b/gcc/mklibgcc.in
index c88fca9..3a78935 100644
--- a/gcc/mklibgcc.in
+++ b/gcc/mklibgcc.in
@@ -100,11 +100,15 @@ if [ "$SHLIB_LINK" ]; then
# the command line, and a #define to prevent libgcc2.h etc from
# overriding that with #pragmas. The dance with @ is to prevent
# echo from seeing anything it might take for an option.
+ # echo turns the \$\$\$\$ into $$$$ and when make sees it it
+ # becomes $$ and the shell substitutes the pid. Makes for a
+ # slightly safer temp file.
echo "vis_hide := \$(strip \$(subst @,-,\\"
echo " \$(shell if echo 'void foo(void); void foo(void) {}' | \\"
echo " $gcc_compile -fvisibility=hidden -Werror \\"
- echo " -c -xc - -o /dev/null 2> /dev/null; \\"
+ echo " -c -xc - -o vis_temp_file\$\$\$\$.o 2> /dev/null; \\"
echo " then echo @fvisibility=hidden @DHIDE_EXPORTS; \\"
+ echo " rm vis_temp_file\$\$\$\$.o 2> /dev/null; \\"
echo " fi)))"
echo