Hi! On 2017-01-13T19:11:23+0100, Jakub Jelinek wrote: > Especially for distributions it is undesirable to need to have proprietary > CUDA libraries and headers installed when building GCC. > I've talked to our lawyers and they said that the cuda.h header included > in this patch doesn't infringe anyone's copyright or is otherwise a fair > use, it has been created by gathering all the cu*/CU* symbols from the > current and older nvptx plugin and some oacc tests, then stubbing the > pointer-ish typedefs, grabing most enum values and function prototypes from > https://raw.githubusercontent.com/shinpei0208/gdev/master/cuda/driver/cuda.h > and verifying assembly with that header against assembly when compiled > against NVidia's cuda.h. ..., and later accordingly was slightly extended, as necessary to use further CUDA features in libgomp's nvptx plugin. > --- libgomp/plugin/cuda/cuda.h.jj 2017-01-13 15:58:00.966544147 +0100 > +++ libgomp/plugin/cuda/cuda.h 2017-01-13 17:02:47.355817896 +0100 > @@ -0,0 +1,174 @@ > +/* CUDA API description. > + Copyright (C) 2017 Free Software Foundation, Inc. > + > +This file is part of GCC. > + > +GCC is free software; you can redistribute it and/or modify > +it under the terms of the GNU General Public License as published by > +the Free Software Foundation; either version 3, or (at your option) > +any later version. > + > +GCC is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +GNU General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with GCC; see the file COPYING3. If not see > +. > + > +This header provides the minimum amount of typedefs, enums and function > +declarations to be able to compile plugin-nvptx.c if cuda.h and > +libcuda.so.1 are not available. */ > + > +#ifndef GCC_CUDA_H > +#define GCC_CUDA_H > +[...] > +#endif /* GCC_CUDA_H */ OK to push the attached "Move 'libgomp/plugin/cuda/cuda.h' to 'include/cuda/cuda.h'", so that I'm also able to use that file in the nvptx-tools, which inherit GCC's 'include' directory? Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955