From patchwork Thu Mar 13 12:38:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vineet Gupta X-Patchwork-Id: 329893 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 6EFDE2C009E for ; Thu, 13 Mar 2014 23:39:02 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 340A333361; Thu, 13 Mar 2014 12:39:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zeMSk9h242YF; Thu, 13 Mar 2014 12:39:00 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id E3AB833341; Thu, 13 Mar 2014 12:38:59 +0000 (UTC) X-Original-To: uclibc@lists.busybox.net Delivered-To: uclibc@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 5AFA81BF9ED for ; Thu, 13 Mar 2014 12:38:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 568A033339 for ; Thu, 13 Mar 2014 12:38:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5P+ZFXPZo3ul for ; Thu, 13 Mar 2014 12:38:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtprelay.synopsys.com (us01smtprelay-2.synopsys.com [198.182.60.111]) by silver.osuosl.org (Postfix) with ESMTPS id 4CDBB331AE for ; Thu, 13 Mar 2014 12:38:57 +0000 (UTC) Received: from us02secmta2.synopsys.com (us02secmta2.synopsys.com [10.12.235.98]) by smtprelay.synopsys.com (Postfix) with ESMTP id 7EB0D10C0724 for ; Thu, 13 Mar 2014 05:38:56 -0700 (PDT) Received: from us02secmta2.internal.synopsys.com (us02secmta2.internal.synopsys.com [127.0.0.1]) by us02secmta2.internal.synopsys.com (Service) with ESMTP id 7235B55F15 for ; Thu, 13 Mar 2014 05:38:56 -0700 (PDT) Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by us02secmta2.internal.synopsys.com (Service) with ESMTP id 4349255F02 for ; Thu, 13 Mar 2014 05:38:56 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 37E17D61 for ; Thu, 13 Mar 2014 05:38:56 -0700 (PDT) Received: from US01WEHTC3.internal.synopsys.com (us01wehtc3.internal.synopsys.com [10.15.84.232]) by mailhost.synopsys.com (Postfix) with ESMTP id 30D76D60 for ; Thu, 13 Mar 2014 05:38:56 -0700 (PDT) Received: from IN01WEHTCB.internal.synopsys.com (10.144.199.105) by US01WEHTC3.internal.synopsys.com (10.15.84.232) with Microsoft SMTP Server (TLS) id 14.3.158.1; Thu, 13 Mar 2014 05:38:56 -0700 Received: from vg-E6520.internal.synopsys.com (10.12.197.50) by IN01WEHTCB.internal.synopsys.com (10.144.199.243) with Microsoft SMTP Server (TLS) id 14.3.158.1; Thu, 13 Mar 2014 18:08:52 +0530 From: Vineet Gupta To: Subject: [PATCH] ARC: Make vfork weak in libc Date: Thu, 13 Mar 2014 18:08:38 +0530 Message-ID: <1394714318-8331-1-git-send-email-vgupta@synopsys.com> X-Mailer: git-send-email 1.8.3.2 MIME-Version: 1.0 X-Originating-IP: [10.12.197.50] Cc: Anton Kolesov , Vineet Gupta , Francois Bedard X-BeenThere: uclibc@uclibc.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion and development of uClibc \(the embedded C library\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: uclibc-bounces@uclibc.org Sender: uclibc-bounces@uclibc.org 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 --- libc/sysdeps/linux/arc/vfork.S | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libc/sysdeps/linux/arc/vfork.S b/libc/sysdeps/linux/arc/vfork.S index 542239fb8421..11959b66b34c 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)