public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] BaseTools/header.makefile: revert gcc-8 "-Wno-xxx" options on OSX
@ 2018-03-07  9:32 Laszlo Ersek
  2018-03-07 11:51 ` Gao, Liming
  0 siblings, 1 reply; 5+ messages in thread
From: Laszlo Ersek @ 2018-03-07  9:32 UTC (permalink / raw)
  To: edk2-devel-01; +Cc: Liming Gao, Yonghong Zhu

I recently added the gcc-8 specific "-Wno-stringop-truncation" and
"-Wno-restrict" options to BUILD_CFLAGS, both for "Darwin" (XCODE5 /
clang, OSX) and otherwise (gcc, Linux / Cygwin).

I also regression-tested the change with gcc-4.8 on Linux -- gcc-4.8 does
not know either of the (gcc-8 specific) "-Wno-stringop-truncation" and
"-Wno-restrict" options, yet the build completed fine (by GCC design).

Regarding OSX, my expectation was that

- XCODE5 / clang would either recognize these warnings options (because
  clang does recognize most -W options of gcc),

- or, similarly to gcc, clang would simply ignore the "-Wno-xxx" flags
  that it didn't recognize.

Neither is the case; the new flags have broken the BaseTools build on OSX.
Revert them (for OSX only).

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Reported-by: Liming Gao <liming.gao@intel.com>
Fixes: 1d212a83df0eaf32a6f5d4159beb2d77832e0231
Fixes: 9222154ae7b3eef75ae88cdb56158256227cb929
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 BaseTools/Source/C/Makefiles/header.makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile
index 065a998bf5de..db436773cf40 100644
--- a/BaseTools/Source/C/Makefiles/header.makefile
+++ b/BaseTools/Source/C/Makefiles/header.makefile
@@ -71,7 +71,7 @@ INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKE
 BUILD_CPPFLAGS = $(INCLUDE) -O2
 ifeq ($(DARWIN),Darwin)
 # assume clang or clang compatible flags on OS X
-BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict -Wno-self-assign -Wno-unused-result -nostdlib -c -g
+BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g
 else
 BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict -Wno-unused-result -nostdlib -c -g
 endif
-- 
2.14.1.3.gb7cf6e02401b



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] BaseTools/header.makefile: revert gcc-8 "-Wno-xxx" options on OSX
  2018-03-07  9:32 [PATCH] BaseTools/header.makefile: revert gcc-8 "-Wno-xxx" options on OSX Laszlo Ersek
@ 2018-03-07 11:51 ` Gao, Liming
  2018-03-07 20:28   ` Laszlo Ersek
  0 siblings, 1 reply; 5+ messages in thread
From: Gao, Liming @ 2018-03-07 11:51 UTC (permalink / raw)
  To: Laszlo Ersek, edk2-devel-01

Reviewed-by: Liming Gao <liming.gao@intel.com>

> -----Original Message-----
> From: Laszlo Ersek [mailto:lersek@redhat.com]
> Sent: Wednesday, March 7, 2018 5:33 PM
> To: edk2-devel-01 <edk2-devel@lists.01.org>
> Cc: Gao, Liming <liming.gao@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com>
> Subject: [PATCH] BaseTools/header.makefile: revert gcc-8 "-Wno-xxx" options on OSX
> 
> I recently added the gcc-8 specific "-Wno-stringop-truncation" and
> "-Wno-restrict" options to BUILD_CFLAGS, both for "Darwin" (XCODE5 /
> clang, OSX) and otherwise (gcc, Linux / Cygwin).
> 
> I also regression-tested the change with gcc-4.8 on Linux -- gcc-4.8 does
> not know either of the (gcc-8 specific) "-Wno-stringop-truncation" and
> "-Wno-restrict" options, yet the build completed fine (by GCC design).
> 
> Regarding OSX, my expectation was that
> 
> - XCODE5 / clang would either recognize these warnings options (because
>   clang does recognize most -W options of gcc),
> 
> - or, similarly to gcc, clang would simply ignore the "-Wno-xxx" flags
>   that it didn't recognize.
> 
> Neither is the case; the new flags have broken the BaseTools build on OSX.
> Revert them (for OSX only).
> 
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Yonghong Zhu <yonghong.zhu@intel.com>
> Reported-by: Liming Gao <liming.gao@intel.com>
> Fixes: 1d212a83df0eaf32a6f5d4159beb2d77832e0231
> Fixes: 9222154ae7b3eef75ae88cdb56158256227cb929
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
>  BaseTools/Source/C/Makefiles/header.makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile
> index 065a998bf5de..db436773cf40 100644
> --- a/BaseTools/Source/C/Makefiles/header.makefile
> +++ b/BaseTools/Source/C/Makefiles/header.makefile
> @@ -71,7 +71,7 @@ INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKE
>  BUILD_CPPFLAGS = $(INCLUDE) -O2
>  ifeq ($(DARWIN),Darwin)
>  # assume clang or clang compatible flags on OS X
> -BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation
> -Wno-restrict -Wno-self-assign -Wno-unused-result -nostdlib -c -g
> +BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign
> -Wno-unused-result -nostdlib -c -g
>  else
>  BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation
> -Wno-restrict -Wno-unused-result -nostdlib -c -g
>  endif
> --
> 2.14.1.3.gb7cf6e02401b



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] BaseTools/header.makefile: revert gcc-8 "-Wno-xxx" options on OSX
  2018-03-07 11:51 ` Gao, Liming
@ 2018-03-07 20:28   ` Laszlo Ersek
  2018-03-07 20:42     ` Ard Biesheuvel
  0 siblings, 1 reply; 5+ messages in thread
From: Laszlo Ersek @ 2018-03-07 20:28 UTC (permalink / raw)
  To: Gao, Liming, Ard Biesheuvel; +Cc: edk2-devel-01, Zhu, Yonghong

On 03/07/18 12:51, Gao, Liming wrote:
> Reviewed-by: Liming Gao <liming.gao@intel.com>

Thank you, Liming.

Ard, are you OK with this patch as well?

Thanks
Laszlo


>> -----Original Message-----
>> From: Laszlo Ersek [mailto:lersek@redhat.com]
>> Sent: Wednesday, March 7, 2018 5:33 PM
>> To: edk2-devel-01 <edk2-devel@lists.01.org>
>> Cc: Gao, Liming <liming.gao@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com>
>> Subject: [PATCH] BaseTools/header.makefile: revert gcc-8 "-Wno-xxx" options on OSX
>>
>> I recently added the gcc-8 specific "-Wno-stringop-truncation" and
>> "-Wno-restrict" options to BUILD_CFLAGS, both for "Darwin" (XCODE5 /
>> clang, OSX) and otherwise (gcc, Linux / Cygwin).
>>
>> I also regression-tested the change with gcc-4.8 on Linux -- gcc-4.8 does
>> not know either of the (gcc-8 specific) "-Wno-stringop-truncation" and
>> "-Wno-restrict" options, yet the build completed fine (by GCC design).
>>
>> Regarding OSX, my expectation was that
>>
>> - XCODE5 / clang would either recognize these warnings options (because
>>   clang does recognize most -W options of gcc),
>>
>> - or, similarly to gcc, clang would simply ignore the "-Wno-xxx" flags
>>   that it didn't recognize.
>>
>> Neither is the case; the new flags have broken the BaseTools build on OSX.
>> Revert them (for OSX only).
>>
>> Cc: Liming Gao <liming.gao@intel.com>
>> Cc: Yonghong Zhu <yonghong.zhu@intel.com>
>> Reported-by: Liming Gao <liming.gao@intel.com>
>> Fixes: 1d212a83df0eaf32a6f5d4159beb2d77832e0231
>> Fixes: 9222154ae7b3eef75ae88cdb56158256227cb929
>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
>> ---
>>  BaseTools/Source/C/Makefiles/header.makefile | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile
>> index 065a998bf5de..db436773cf40 100644
>> --- a/BaseTools/Source/C/Makefiles/header.makefile
>> +++ b/BaseTools/Source/C/Makefiles/header.makefile
>> @@ -71,7 +71,7 @@ INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKE
>>  BUILD_CPPFLAGS = $(INCLUDE) -O2
>>  ifeq ($(DARWIN),Darwin)
>>  # assume clang or clang compatible flags on OS X
>> -BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation
>> -Wno-restrict -Wno-self-assign -Wno-unused-result -nostdlib -c -g
>> +BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign
>> -Wno-unused-result -nostdlib -c -g
>>  else
>>  BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation
>> -Wno-restrict -Wno-unused-result -nostdlib -c -g
>>  endif
>> --
>> 2.14.1.3.gb7cf6e02401b
> 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] BaseTools/header.makefile: revert gcc-8 "-Wno-xxx" options on OSX
  2018-03-07 20:28   ` Laszlo Ersek
@ 2018-03-07 20:42     ` Ard Biesheuvel
  2018-03-07 21:46       ` Laszlo Ersek
  0 siblings, 1 reply; 5+ messages in thread
From: Ard Biesheuvel @ 2018-03-07 20:42 UTC (permalink / raw)
  To: Laszlo Ersek; +Cc: Gao, Liming, edk2-devel-01, Zhu, Yonghong

On 7 March 2018 at 20:28, Laszlo Ersek <lersek@redhat.com> wrote:
> On 03/07/18 12:51, Gao, Liming wrote:
>> Reviewed-by: Liming Gao <liming.gao@intel.com>
>
> Thank you, Liming.
>
> Ard, are you OK with this patch as well?
>

Sure

Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

>>> -----Original Message-----
>>> From: Laszlo Ersek [mailto:lersek@redhat.com]
>>> Sent: Wednesday, March 7, 2018 5:33 PM
>>> To: edk2-devel-01 <edk2-devel@lists.01.org>
>>> Cc: Gao, Liming <liming.gao@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com>
>>> Subject: [PATCH] BaseTools/header.makefile: revert gcc-8 "-Wno-xxx" options on OSX
>>>
>>> I recently added the gcc-8 specific "-Wno-stringop-truncation" and
>>> "-Wno-restrict" options to BUILD_CFLAGS, both for "Darwin" (XCODE5 /
>>> clang, OSX) and otherwise (gcc, Linux / Cygwin).
>>>
>>> I also regression-tested the change with gcc-4.8 on Linux -- gcc-4.8 does
>>> not know either of the (gcc-8 specific) "-Wno-stringop-truncation" and
>>> "-Wno-restrict" options, yet the build completed fine (by GCC design).
>>>
>>> Regarding OSX, my expectation was that
>>>
>>> - XCODE5 / clang would either recognize these warnings options (because
>>>   clang does recognize most -W options of gcc),
>>>
>>> - or, similarly to gcc, clang would simply ignore the "-Wno-xxx" flags
>>>   that it didn't recognize.
>>>
>>> Neither is the case; the new flags have broken the BaseTools build on OSX.
>>> Revert them (for OSX only).
>>>
>>> Cc: Liming Gao <liming.gao@intel.com>
>>> Cc: Yonghong Zhu <yonghong.zhu@intel.com>
>>> Reported-by: Liming Gao <liming.gao@intel.com>
>>> Fixes: 1d212a83df0eaf32a6f5d4159beb2d77832e0231
>>> Fixes: 9222154ae7b3eef75ae88cdb56158256227cb929
>>> Contributed-under: TianoCore Contribution Agreement 1.1
>>> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
>>> ---
>>>  BaseTools/Source/C/Makefiles/header.makefile | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile
>>> index 065a998bf5de..db436773cf40 100644
>>> --- a/BaseTools/Source/C/Makefiles/header.makefile
>>> +++ b/BaseTools/Source/C/Makefiles/header.makefile
>>> @@ -71,7 +71,7 @@ INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKE
>>>  BUILD_CPPFLAGS = $(INCLUDE) -O2
>>>  ifeq ($(DARWIN),Darwin)
>>>  # assume clang or clang compatible flags on OS X
>>> -BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation
>>> -Wno-restrict -Wno-self-assign -Wno-unused-result -nostdlib -c -g
>>> +BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign
>>> -Wno-unused-result -nostdlib -c -g
>>>  else
>>>  BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation
>>> -Wno-restrict -Wno-unused-result -nostdlib -c -g
>>>  endif
>>> --
>>> 2.14.1.3.gb7cf6e02401b
>>
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] BaseTools/header.makefile: revert gcc-8 "-Wno-xxx" options on OSX
  2018-03-07 20:42     ` Ard Biesheuvel
@ 2018-03-07 21:46       ` Laszlo Ersek
  0 siblings, 0 replies; 5+ messages in thread
From: Laszlo Ersek @ 2018-03-07 21:46 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: edk2-devel-01, Gao, Liming

On 03/07/18 21:42, Ard Biesheuvel wrote:
> On 7 March 2018 at 20:28, Laszlo Ersek <lersek@redhat.com> wrote:
>> On 03/07/18 12:51, Gao, Liming wrote:
>>> Reviewed-by: Liming Gao <liming.gao@intel.com>
>>
>> Thank you, Liming.
>>
>> Ard, are you OK with this patch as well?
>>
> 
> Sure
> 
> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Thank you both; commit 777f4aa083e9.

Laszlo


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-03-07 21:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-07  9:32 [PATCH] BaseTools/header.makefile: revert gcc-8 "-Wno-xxx" options on OSX Laszlo Ersek
2018-03-07 11:51 ` Gao, Liming
2018-03-07 20:28   ` Laszlo Ersek
2018-03-07 20:42     ` Ard Biesheuvel
2018-03-07 21:46       ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox