nvptx offloading patches [3/n], RFD

Bernd Schmidt bernds@codesourcery.com
Thu Feb 19 10:20:00 GMT 2015


On 02/17/2015 05:40 PM, Jakub Jelinek wrote:
> On Tue, Feb 17, 2015 at 04:21:06PM +0000, Joseph Myers wrote:
>> 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).
>
> Thanks, sure, libgcc now builds fine, the in-tree build fails:
> configure:4261: checking for C compiler default output file name
> configure:4283: /usr/src/gcc/objnvptx/./gcc/xgcc -B/usr/src/gcc/objnvptx/./gcc/ -nostdinc -B/usr/src/gcc/objnvptx/nvptx-none/newlib/ -isystem /usr/src/gcc/objnvptx/nvptx-none/newlib/targ-include -isystem /usr/src/gcc/newlib/libc/include -B/usr/local/nvptx-none/bin/ -B/usr/local/nvptx-none/lib/ -isystem /usr/local/nvptx-none/include -isystem /usr/local/nvptx-none/sys-include    -g -O2   conftest.c  >&5
> error opening libc.a
> collect2: error: ld returned 1 exit status
> very early during in-tree newlib configure.

Not a fix for your problem, but there's a similar issue when trying to 
get at the libgcc for the nvptx accel compiler after it's been 
installed. The libgcc Makefile puts it in the wrong place - 
gcc/nvptx-none/accel/nvptx-none instead of gcc/host/accel/nvptx-none. 
The patch below corrects that and removes an intelmicemul special case 
which I believe has the same effect - Ilya, could you test this?


Bernd

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lgcc-ptx.diff
Type: text/x-patch
Size: 2944 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150219/1dcd9183/attachment.bin>


More information about the Gcc-patches mailing list