From 00b07e8ca5664985bbbbdc1d375407ac36124317 Mon Sep 17 00:00:00 2001 From: Vineet Gupta Date: Thu, 13 Mar 2014 18:08:38 +0530 Subject: ARC: Make vfork weak in libc Anton reported: ------------------->8--------------------- Package iperf cannot be built in Buildroot due to following error: /home/akolesov/env/autobuild/tmp/host/usr/bin/arc-buildroot-linux-uclibc-g++ -Wall -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -Os --static -o iperf -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -Os -pthread -DHAVE_CONFIG_H Client.o Extractor.o Launch.o List.o Listener.o Locale.o PerfSocket.o ReportCSV.o ReportDefault.o Reporter.o Server.o Settings.o SocketAddr.o gnu_getopt.o gnu_getopt_long.o main.o service.o sockets.o stdio.o tcp_window_size.o ../compat/libcompat.a /home/akolesov/env/autobuild/tmp/host/usr/arc-buildroot-linux-uclibc/sysroot/usr/lib/libc.a(vfork.os): In function `vfork': (.text+0x0): multiple definition of `vfork' /home/akolesov/env/autobuild/tmp/host/usr/arc-buildroot-linux-uclibc/sysroot/usr/lib/libpthread.a(ptfork.os):ptfork.c:(.text+0xc0): first defined here collect2: error: ld returned 1 exit status ------------------->8--------------------- Signed-off-by: Vineet Gupta Cc: Anton Kolesov Cc: Francois Bedard Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/arc/vfork.S | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libc/sysdeps/linux') diff --git a/libc/sysdeps/linux/arc/vfork.S b/libc/sysdeps/linux/arc/vfork.S index 542239fb8..11959b66b 100644 --- a/libc/sysdeps/linux/arc/vfork.S +++ b/libc/sysdeps/linux/arc/vfork.S @@ -15,7 +15,7 @@ #define CLONE_VFORK 0x00004000 #define CLONE_FLAGS_FOR_VFORK (CLONE_VM|CLONE_VFORK|SIGCHLD) -ENTRY(vfork) +ENTRY(__vfork) mov r0, CLONE_FLAGS_FOR_VFORK mov_s r1, sp mov r8, __NR_clone @@ -25,5 +25,7 @@ ENTRY(vfork) jge [blink] ; pid >=0 return, else detour via tailcall to errno b __syscall_error -END(vfork) +END(__vfork) + +weak_alias(__vfork,vfork) libc_hidden_def(vfork) -- cgit v1.2.3