On 07/21/2017 12:14 PM, Georg-Johann Lay wrote: > Sebastian Huber schrieb: >> Hello, >> >> there are some files in gcc/config/* that contain the GCC Runtime >> Library Exception >> >> grep -r --include='*.[ch]' 'GCC Runtime Library Exception' -l >> gcc/config | wc >> 186 186 5361 >> >> and some files that don't include it >> >> grep -r --include='*.[ch]' 'GCC Runtime Library Exception' -l >> gcc/config -v | wc >> 753 753 20927 >> >> Does it matter? What should be used for new files? > > Some machine headers are needed by libgcc. Not all information is > available by means of built-in macros, so that compile-time decisions > in libgcc might need the target headers. But just because we make a compile time decision doesn't mean the tm.h file needs to have the exception clause. IMHO what matters is whether or not code gets embedded.
For example, if there's a macro in a tm.h file that generates a blob of assembly code and that assembly code is embedded into libgcc. Then we probably need an exception clause. > > Likely, this dates back to the time when machine specific libgcc bits > where in gcc/config/$target. > > Some users of (lib)gcc which compile their (proprietary) software > with gcc are paranoid about being infected by GPL due to using > libgcc which uses headers without runtime library exception. Yes, but that doesn't mean we just blindly put the exception clause on all the target headers. > > https://gcc.gnu.org/ml/gcc-help/2012-08/msg00235.html > > See also > > https://gcc.gnu.org/PR61152 IMHO the proper thing to do here is identify what parts potentially introduce *code* into the library. Those need to have the exception clause. Adding the exception clause to the tm.h files blindly seems wrong to me. jeff