This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC Runtime Library Exception in gcc/config/* files?
- From: Jeff Law <law at redhat dot com>
- To: Georg-Johann Lay <gjl at gcc dot gnu dot org>, Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- Cc: GCC <gcc at gcc dot gnu dot org>
- Date: Wed, 2 Aug 2017 13:25:12 -0600
- Subject: Re: GCC Runtime Library Exception in gcc/config/* files?
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=law at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BFE4C61469
- References: <fb723cff-8db5-68bb-3f1b-fad8bfb82c5f@embedded-brains.de> <5972448F.4060605@gcc.gnu.org>
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