This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Contributing FreeBSD/aarch64 support
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Ed Maste <emaste at freebsd dot org>
- Cc: binutils <binutils at sourceware dot org>
- Date: Mon, 9 Feb 2015 13:05:17 -0800
- Subject: Re: Contributing FreeBSD/aarch64 support
- Authentication-results: sourceware.org; auth=none
- References: <CAPyFy2CuDQ3G=J32SmZ-_frpyBMeiq5HZujm8BJE_+tbJ2Jg6g at mail dot gmail dot com> <CA+=Sn1mkG2qOqP7pZuqwmHinW3LxuiTdPE10q0yB2t0iOK3LTw at mail dot gmail dot com> <CAPyFy2CQn2L=2tY6aXynZP1rc3aZy-H8PcQGOwNhvURKbPyc9Q at mail dot gmail dot com> <CAPyFy2DrVNaNDP2r2qs8rf9pQtVvHbnXvd4Wzi17tV2z6reG2w at mail dot gmail dot com>
On Mon, Feb 9, 2015 at 12:41 PM, Ed Maste <emaste@freebsd.org> wrote:
> On 9 February 2015 at 10:25, Ed Maste <emaste@freebsd.org> wrote:
>> On 8 February 2015 at 23:12, Andrew Pinski <pinskia@gmail.com> wrote:
>>>
>>> Also if you need
>>> -Wno-uninitialized, it might make sense to figure out better patches
>>> for those places where unitialized warnings happen.
>>
>> This one is fixed with:
>> - struct bfd_link_hash_entry ehdr_start_save = ehdr_start_save;
>> + struct bfd_link_hash_entry ehdr_start_save;
>
> I missed that the redundant assignment was added intentionally (I
> assumed it was an accident). It was done in commit f9c316c to
> eliminate an uninitialized warning from older GCC.
>
> H.J., do you have a suggestion on an approach for both old GCC and
> recent Clang? Perhaps an explicit #if condition on __GNUC__ and
> __GNUC_MINOR__ for the redundant assignment?
This is a common practice to silence GCC warning in biutils
I prefer not to add #if for clang.
Do you get clean results for "make check" with clang?
If not, I don't see why we should change source for clang.
You can always configure binutils with --disable-werror.
--
H.J.