This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PR18810, darwin don't unlink /dev/null on make install
- From: Peter O'Gorman <peter at pogma dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 10 Feb 2005 23:11:03 +0900
- Subject: PR18810, darwin don't unlink /dev/null on make install
Hi,
I was getting my /dev/null unlinked when I did make install, I didn't really
like that.
There are a number of things at play here. For example, I have no idea why
make is deciding it needs to rebuild libgcc.a on my system when I do 'sudo
make install', another is, why does darwin's as have
(void)unlink(out_file_name);
in write_object.c, and of course, why does sudo rm /dev/null actually work.
Could someone please apply this. The output file is named vis_test___out.o
so it is highly unlikely to conflict with anything that gcc actually needs.
It is safe to have an output file because we are always going to be in
$(top_build_dir)/gcc here and that must be writable.
Thanks,
Peter
--
Peter O'Gorman - http://www.pogma.com
Index: gcc/ChangeLog
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/ChangeLog,v
retrieving revision 2.7429
diff -u -3 -p -u -r2.7429 ChangeLog
--- gcc/ChangeLog 10 Feb 2005 08:37:50 -0000 2.7429
+++ gcc/ChangeLog 10 Feb 2005 13:52:43 -0000
@@ -1,3 +1,8 @@
+2005-02-10 Peter O'Gorman <peter@pogma.com>
+
+ * mklibgcc.in (vis_hide): Don't use -o /dev/null on the test. On
+ at least darwin -o /dev/null can result in as unlinking /dev/null.
+
2005-02-10 Steven Bosscher <stevenb@suse.de>
* doc/md.texi: Replace @samp{length} with @code{length}.
Index: gcc/mklibgcc.in
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/mklibgcc.in,v
retrieving revision 1.81
diff -u -3 -p -u -r1.81 mklibgcc.in
--- gcc/mklibgcc.in 9 Feb 2005 20:58:02 -0000 1.81
+++ gcc/mklibgcc.in 10 Feb 2005 13:52:44 -0000
@@ -102,8 +102,9 @@ if [ "$SHLIB_LINK" ]; then
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_test___out.o 2> /dev/null; \\"
echo " then echo @fvisibility=hidden @DHIDE_EXPORTS; \\"
+ echo " rm ./vis_test___out.o 2> /dev/null; \\"
echo " fi)))"
echo