re PR bootstrap/18810 (Darwin's as unlinks /dev/null)
authorPeter O'Gorman <peter@pogma.com>
Wed, 16 Feb 2005 04:48:47 +0000 (04:48 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Wed, 16 Feb 2005 04:48:47 +0000 (20:48 -0800)
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

gcc/ChangeLog
gcc/mklibgcc.in

index b10ecb0adae7381de48ac8425cf409ee624ca064..34725947a28fef39f16683b7b21d4067289c5689 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2005-02-15  Andy Hutchinson  <HutchinsonAndy@netscape.net>
 
        PR target/19924
index c88fca98186cb4fc1c8345e24d7c2714a49441ef..3a789350868437216d05bdf6bb36e5931879fa41 100644 (file)
@@ -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