From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8613 invoked by alias); 17 Feb 2015 16:21:16 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 8592 invoked by uid 89); 17 Feb 2015 16:21:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 17 Feb 2015 16:21:14 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1YNktY-0001xg-Vb from joseph_myers@mentor.com ; Tue, 17 Feb 2015 08:21:09 -0800 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-02.mgc.mentorg.com (137.202.0.106) with Microsoft SMTP Server id 14.3.224.2; Tue, 17 Feb 2015 16:21:07 +0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.82) (envelope-from ) id 1YNktW-0006Ss-2J; Tue, 17 Feb 2015 16:21:06 +0000 Date: Tue, 17 Feb 2015 16:21:00 -0000 From: Joseph Myers To: Jakub Jelinek CC: Ilya Verbin , Bernd Schmidt , Thomas Schwinge , Richard Biener , Jan Hubicka , Subject: Re: nvptx offloading patches [3/n], RFD In-Reply-To: <20150217153918.GX1746@tucnak.redhat.com> Message-ID: References: <5454CAB9.3040907@codesourcery.com> <20150204113817.GO1746@tucnak.redhat.com> <20150216210812.GO1746@tucnak.redhat.com> <20150217133206.GA62715@msticlxl57.ims.intel.com> <20150217153918.GX1746@tucnak.redhat.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2015-02/txt/msg01031.txt.bz2 On Tue, 17 Feb 2015, Jakub Jelinek wrote: > Third attempt failed with: > ../../../libgcc/config/nvptx/realloc.c:24:20: fatal error: stdlib.h: No such file or directory > compilation terminated. > ../../../libgcc/static-object.mk:17: recipe for target 'realloc.o' failed > make[2]: *** [realloc.o] Error 1 > make[2]: *** Waiting for unfinished jobs.... > make[2]: Leaving directory '/usr/src/gcc/objnvptx/nvptx-none/libgcc' > I have nvptx-newlib symlinked into the gcc tree as newlib, so I expected it > would be built in-tree, is that not the case (at least wiki/Offloading > mentions that). Or is it just that libgcc can't really have dependencies on > newlib headers as newlib is built after libgcc? I've committed this patch to fix this last issue (the header dependence, that is; I don't know about the in-tree build). 2015-02-17 Joseph Myers * config/nvptx/realloc.c: Include instead of and . (__nvptx_realloc): Call __builtin_memcpy instead of memcpy. Index: libgcc/config/nvptx/realloc.c =================================================================== --- libgcc/config/nvptx/realloc.c (revision 220763) +++ libgcc/config/nvptx/realloc.c (working copy) @@ -21,8 +21,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ -#include -#include +#include #include "nvptx-malloc.h" void * @@ -44,7 +43,7 @@ __nvptx_realloc (void *ptr, size_t newsz) oldsz = *sp; } if (oldsz != 0) - memcpy (newptr, ptr, oldsz > newsz ? newsz : oldsz); + __builtin_memcpy (newptr, ptr, oldsz > newsz ? newsz : oldsz); __nvptx_free (ptr); return newptr; -- Joseph S. Myers joseph@codesourcery.com