From 489ce9e7ab25a049ae546f36aada3f5e5a3646d8 Mon Sep 17 00:00:00 2001 From: Peter O'Gorman Date: Wed, 16 Feb 2005 04:48:47 +0000 Subject: [PATCH] re PR bootstrap/18810 (Darwin's as unlinks /dev/null) 2005-02-15 Peter O'Gorman PR bootstrap/18810 * mklibgcc.in (vis_hide): Use a temporary object file, not -o /dev/null. From-SVN: r95096 --- gcc/ChangeLog | 6 ++++++ gcc/mklibgcc.in | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b10ecb0adae..34725947a28 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-02-15 Peter O'Gorman + + PR bootstrap/18810 + * mklibgcc.in (vis_hide): Use a temporary object file, not + -o /dev/null. + 2005-02-15 Andy Hutchinson PR target/19924 diff --git a/gcc/mklibgcc.in b/gcc/mklibgcc.in index c88fca98186..3a789350868 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 -- 2.30.2