This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/18810] Operation not supported while installing 4.0.0 on apple-darmin-7.6.0.
- From: "peter at pogma dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Feb 2005 03:08:18 -0000
- Subject: [Bug bootstrap/18810] Operation not supported while installing 4.0.0 on apple-darmin-7.6.0.
- References: <20041203142409.18810.3dw4rd@verizon.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From peter at pogma dot com 2005-02-10 03:08 -------
My /dev/null also gets unlinked during 'sudo make install', so I decided to find the problem. I made a
shared library that contained an unlink function:
#include <sys/syscall.h>
#include <string.h>
int unlink(const char *path)
{
if (!strcmp("/dev/null",path)) {
sleep(180);
return 0;
}
return syscall(SYS_unlink,path);
}
and used DYLD_INSERT_LIBRARIES before doing make install as root. Doing this, I discovered that my
gcc/libgcc.mk contains:
vis_hide := $(strip $(subst @,-,\
$(shell if echo 'void foo(void); void foo(void) {}' | \
$(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -fvisibility=hidden -Werror \
-c -xc - -o /dev/null 2> /dev/null; \
then echo @fvisibility=hidden @DHIDE_EXPORTS; \
fi)))
and that darwin's as has a write_object.c which at aoround line 582 has:
(void)unlink(out_file_name);
I suggest changing the bit of gcc/mklibgcc.in that says:
# Test -fvisibility=hidden. We need both a -fvisibility=hidden on
# 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 "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 " then echo @fvisibility=hidden @DHIDE_EXPORTS; \\"
echo " fi)))"
echo
So the -o /dev/null goes away. It shouldn't be too hard to make a temporary file name and rm the temp
file here.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18810