diff mbox series

[edk2] BaseTools/tools_def CLANG35: ignore unknown warning options

Message ID 20180119162207.13207-1-ard.biesheuvel@linaro.org
State New
Headers show
Series [edk2] BaseTools/tools_def CLANG35: ignore unknown warning options | expand

Commit Message

Ard Biesheuvel Jan. 19, 2018, 4:22 p.m. UTC
Ironically, disabling warnings in the OpensslLib library build is
causing breakage when using the CLANG35 toolchain to build for ARM:

error: unknown warning option '-Werror=maybe-uninitialized'; did you mean '-Werror=uninitialized'? [-Werror,-Wunknown-warning-option]

So let's add -Wno-unknown-warning-option to the list of warning to
ignore when using Clang 3.5

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
 BaseTools/Conf/tools_def.template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.11.0

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Gao, Liming Jan. 22, 2018, 2:21 a.m. UTC | #1
Reviewed-by: Liming Gao <liming.gao@intel.com>


>-----Original Message-----

>From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]

>Sent: Saturday, January 20, 2018 12:22 AM

>To: edk2-devel@lists.01.org

>Cc: leif.lindholm@linaro.org; Gao, Liming <liming.gao@intel.com>; Zhu,

>Yonghong <yonghong.zhu@intel.com>; Ard Biesheuvel

><ard.biesheuvel@linaro.org>

>Subject: [PATCH] BaseTools/tools_def CLANG35: ignore unknown warning

>options

>

>Ironically, disabling warnings in the OpensslLib library build is

>causing breakage when using the CLANG35 toolchain to build for ARM:

>

>error: unknown warning option '-Werror=maybe-uninitialized'; did you mean

>'-Werror=uninitialized'? [-Werror,-Wunknown-warning-option]

>

>So let's add -Wno-unknown-warning-option to the list of warning to

>ignore when using Clang 3.5

>

>Contributed-under: TianoCore Contribution Agreement 1.1

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

>---

> BaseTools/Conf/tools_def.template | 2 +-

> 1 file changed, 1 insertion(+), 1 deletion(-)

>

>diff --git a/BaseTools/Conf/tools_def.template

>b/BaseTools/Conf/tools_def.template

>index d8fde02ea351..6afe5ebe9fe3 100755

>--- a/BaseTools/Conf/tools_def.template

>+++ b/BaseTools/Conf/tools_def.template

>@@ -5595,7 +5595,7 @@ RELEASE_GCC5_AARCH64_DLINK_FLAGS =

>DEF(GCC5_AARCH64_DLINK_FLAGS) -flto -Os -L$(W

> DEFINE CLANG35_ARM_TARGET        = -target arm-linux-gnueabihf

> DEFINE CLANG35_AARCH64_TARGET    = -target aarch64-linux-gnu

>

>-DEFINE CLANG35_WARNING_OVERRIDES = -Wno-parentheses-equality -

>Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare

>-Wno-empty-body

>+DEFINE CLANG35_WARNING_OVERRIDES = -Wno-parentheses-equality -

>Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare

>-Wno-empty-body -Wno-unknown-warning-option

> DEFINE CLANG35_ARM_CC_FLAGS      = DEF(GCC_ARM_CC_FLAGS)

>DEF(CLANG35_ARM_TARGET) DEF(CLANG35_WARNING_OVERRIDES)

> DEFINE CLANG35_AARCH64_CC_FLAGS  = DEF(GCC_AARCH64_CC_FLAGS)

>DEF(CLANG35_AARCH64_TARGET) -mcmodel=small

>DEF(CLANG35_WARNING_OVERRIDES)

>

>--

>2.11.0


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Ard Biesheuvel Jan. 22, 2018, 8:51 a.m. UTC | #2
On 22 January 2018 at 02:21, Gao, Liming <liming.gao@intel.com> wrote:
> Reviewed-by: Liming Gao <liming.gao@intel.com>

>


Thanks Liming.

Do you agree to add this to CLANG38_WARNING_OVERRIDES as well? We need
this on ARM, and I assume on x86 as well.


>>-----Original Message-----

>>From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]

>>Sent: Saturday, January 20, 2018 12:22 AM

>>To: edk2-devel@lists.01.org

>>Cc: leif.lindholm@linaro.org; Gao, Liming <liming.gao@intel.com>; Zhu,

>>Yonghong <yonghong.zhu@intel.com>; Ard Biesheuvel

>><ard.biesheuvel@linaro.org>

>>Subject: [PATCH] BaseTools/tools_def CLANG35: ignore unknown warning

>>options

>>

>>Ironically, disabling warnings in the OpensslLib library build is

>>causing breakage when using the CLANG35 toolchain to build for ARM:

>>

>>error: unknown warning option '-Werror=maybe-uninitialized'; did you mean

>>'-Werror=uninitialized'? [-Werror,-Wunknown-warning-option]

>>

>>So let's add -Wno-unknown-warning-option to the list of warning to

>>ignore when using Clang 3.5

>>

>>Contributed-under: TianoCore Contribution Agreement 1.1

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

>>---

>> BaseTools/Conf/tools_def.template | 2 +-

>> 1 file changed, 1 insertion(+), 1 deletion(-)

>>

>>diff --git a/BaseTools/Conf/tools_def.template

>>b/BaseTools/Conf/tools_def.template

>>index d8fde02ea351..6afe5ebe9fe3 100755

>>--- a/BaseTools/Conf/tools_def.template

>>+++ b/BaseTools/Conf/tools_def.template

>>@@ -5595,7 +5595,7 @@ RELEASE_GCC5_AARCH64_DLINK_FLAGS =

>>DEF(GCC5_AARCH64_DLINK_FLAGS) -flto -Os -L$(W

>> DEFINE CLANG35_ARM_TARGET        = -target arm-linux-gnueabihf

>> DEFINE CLANG35_AARCH64_TARGET    = -target aarch64-linux-gnu

>>

>>-DEFINE CLANG35_WARNING_OVERRIDES = -Wno-parentheses-equality -

>>Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare

>>-Wno-empty-body

>>+DEFINE CLANG35_WARNING_OVERRIDES = -Wno-parentheses-equality -

>>Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare

>>-Wno-empty-body -Wno-unknown-warning-option

>> DEFINE CLANG35_ARM_CC_FLAGS      = DEF(GCC_ARM_CC_FLAGS)

>>DEF(CLANG35_ARM_TARGET) DEF(CLANG35_WARNING_OVERRIDES)

>> DEFINE CLANG35_AARCH64_CC_FLAGS  = DEF(GCC_AARCH64_CC_FLAGS)

>>DEF(CLANG35_AARCH64_TARGET) -mcmodel=small

>>DEF(CLANG35_WARNING_OVERRIDES)

>>

>>--

>>2.11.0

>

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Gao, Liming Jan. 22, 2018, 9:05 a.m. UTC | #3
Ard:
  I don't meet with the error on CLANG38 for x86. I use clang3.8 compiler. 

Thanks
Liming
>-----Original Message-----

>From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]

>Sent: Monday, January 22, 2018 4:52 PM

>To: Gao, Liming <liming.gao@intel.com>

>Cc: edk2-devel@lists.01.org; leif.lindholm@linaro.org; Zhu, Yonghong

><yonghong.zhu@intel.com>

>Subject: Re: [PATCH] BaseTools/tools_def CLANG35: ignore unknown warning

>options

>

>On 22 January 2018 at 02:21, Gao, Liming <liming.gao@intel.com> wrote:

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

>>

>

>Thanks Liming.

>

>Do you agree to add this to CLANG38_WARNING_OVERRIDES as well? We

>need

>this on ARM, and I assume on x86 as well.

>

>

>>>-----Original Message-----

>>>From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]

>>>Sent: Saturday, January 20, 2018 12:22 AM

>>>To: edk2-devel@lists.01.org

>>>Cc: leif.lindholm@linaro.org; Gao, Liming <liming.gao@intel.com>; Zhu,

>>>Yonghong <yonghong.zhu@intel.com>; Ard Biesheuvel

>>><ard.biesheuvel@linaro.org>

>>>Subject: [PATCH] BaseTools/tools_def CLANG35: ignore unknown warning

>>>options

>>>

>>>Ironically, disabling warnings in the OpensslLib library build is

>>>causing breakage when using the CLANG35 toolchain to build for ARM:

>>>

>>>error: unknown warning option '-Werror=maybe-uninitialized'; did you

>mean

>>>'-Werror=uninitialized'? [-Werror,-Wunknown-warning-option]

>>>

>>>So let's add -Wno-unknown-warning-option to the list of warning to

>>>ignore when using Clang 3.5

>>>

>>>Contributed-under: TianoCore Contribution Agreement 1.1

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

>>>---

>>> BaseTools/Conf/tools_def.template | 2 +-

>>> 1 file changed, 1 insertion(+), 1 deletion(-)

>>>

>>>diff --git a/BaseTools/Conf/tools_def.template

>>>b/BaseTools/Conf/tools_def.template

>>>index d8fde02ea351..6afe5ebe9fe3 100755

>>>--- a/BaseTools/Conf/tools_def.template

>>>+++ b/BaseTools/Conf/tools_def.template

>>>@@ -5595,7 +5595,7 @@ RELEASE_GCC5_AARCH64_DLINK_FLAGS =

>>>DEF(GCC5_AARCH64_DLINK_FLAGS) -flto -Os -L$(W

>>> DEFINE CLANG35_ARM_TARGET        = -target arm-linux-gnueabihf

>>> DEFINE CLANG35_AARCH64_TARGET    = -target aarch64-linux-gnu

>>>

>>>-DEFINE CLANG35_WARNING_OVERRIDES = -Wno-parentheses-equality -

>>>Wno-tautological-compare -Wno-tautological-constant-out-of-range-

>compare

>>>-Wno-empty-body

>>>+DEFINE CLANG35_WARNING_OVERRIDES = -Wno-parentheses-equality -

>>>Wno-tautological-compare -Wno-tautological-constant-out-of-range-

>compare

>>>-Wno-empty-body -Wno-unknown-warning-option

>>> DEFINE CLANG35_ARM_CC_FLAGS      = DEF(GCC_ARM_CC_FLAGS)

>>>DEF(CLANG35_ARM_TARGET) DEF(CLANG35_WARNING_OVERRIDES)

>>> DEFINE CLANG35_AARCH64_CC_FLAGS  = DEF(GCC_AARCH64_CC_FLAGS)

>>>DEF(CLANG35_AARCH64_TARGET) -mcmodel=small

>>>DEF(CLANG35_WARNING_OVERRIDES)

>>>

>>>--

>>>2.11.0

>>

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Ard Biesheuvel Jan. 22, 2018, 9:39 a.m. UTC | #4
On 22 January 2018 at 09:05, Gao, Liming <liming.gao@intel.com> wrote:
> Ard:

>   I don't meet with the error on CLANG38 for x86. I use clang3.8 compiler.

>


I solved the mystery: CLANG38 for x86 already has -Wno-unknown-warning-option

So if you agree, I will add it to CLANG35_WARNING_OVERRIDES (as in
this patch) and move it from CLANG38_ALL_CC_FLAGS to
CLANG38_WARNING_OVERRIDES as well.


>>-----Original Message-----

>>From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]

>>Sent: Monday, January 22, 2018 4:52 PM

>>To: Gao, Liming <liming.gao@intel.com>

>>Cc: edk2-devel@lists.01.org; leif.lindholm@linaro.org; Zhu, Yonghong

>><yonghong.zhu@intel.com>

>>Subject: Re: [PATCH] BaseTools/tools_def CLANG35: ignore unknown warning

>>options

>>

>>On 22 January 2018 at 02:21, Gao, Liming <liming.gao@intel.com> wrote:

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

>>>

>>

>>Thanks Liming.

>>

>>Do you agree to add this to CLANG38_WARNING_OVERRIDES as well? We

>>need

>>this on ARM, and I assume on x86 as well.

>>

>>

>>>>-----Original Message-----

>>>>From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]

>>>>Sent: Saturday, January 20, 2018 12:22 AM

>>>>To: edk2-devel@lists.01.org

>>>>Cc: leif.lindholm@linaro.org; Gao, Liming <liming.gao@intel.com>; Zhu,

>>>>Yonghong <yonghong.zhu@intel.com>; Ard Biesheuvel

>>>><ard.biesheuvel@linaro.org>

>>>>Subject: [PATCH] BaseTools/tools_def CLANG35: ignore unknown warning

>>>>options

>>>>

>>>>Ironically, disabling warnings in the OpensslLib library build is

>>>>causing breakage when using the CLANG35 toolchain to build for ARM:

>>>>

>>>>error: unknown warning option '-Werror=maybe-uninitialized'; did you

>>mean

>>>>'-Werror=uninitialized'? [-Werror,-Wunknown-warning-option]

>>>>

>>>>So let's add -Wno-unknown-warning-option to the list of warning to

>>>>ignore when using Clang 3.5

>>>>

>>>>Contributed-under: TianoCore Contribution Agreement 1.1

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

>>>>---

>>>> BaseTools/Conf/tools_def.template | 2 +-

>>>> 1 file changed, 1 insertion(+), 1 deletion(-)

>>>>

>>>>diff --git a/BaseTools/Conf/tools_def.template

>>>>b/BaseTools/Conf/tools_def.template

>>>>index d8fde02ea351..6afe5ebe9fe3 100755

>>>>--- a/BaseTools/Conf/tools_def.template

>>>>+++ b/BaseTools/Conf/tools_def.template

>>>>@@ -5595,7 +5595,7 @@ RELEASE_GCC5_AARCH64_DLINK_FLAGS =

>>>>DEF(GCC5_AARCH64_DLINK_FLAGS) -flto -Os -L$(W

>>>> DEFINE CLANG35_ARM_TARGET        = -target arm-linux-gnueabihf

>>>> DEFINE CLANG35_AARCH64_TARGET    = -target aarch64-linux-gnu

>>>>

>>>>-DEFINE CLANG35_WARNING_OVERRIDES = -Wno-parentheses-equality -

>>>>Wno-tautological-compare -Wno-tautological-constant-out-of-range-

>>compare

>>>>-Wno-empty-body

>>>>+DEFINE CLANG35_WARNING_OVERRIDES = -Wno-parentheses-equality -

>>>>Wno-tautological-compare -Wno-tautological-constant-out-of-range-

>>compare

>>>>-Wno-empty-body -Wno-unknown-warning-option

>>>> DEFINE CLANG35_ARM_CC_FLAGS      = DEF(GCC_ARM_CC_FLAGS)

>>>>DEF(CLANG35_ARM_TARGET) DEF(CLANG35_WARNING_OVERRIDES)

>>>> DEFINE CLANG35_AARCH64_CC_FLAGS  = DEF(GCC_AARCH64_CC_FLAGS)

>>>>DEF(CLANG35_AARCH64_TARGET) -mcmodel=small

>>>>DEF(CLANG35_WARNING_OVERRIDES)

>>>>

>>>>--

>>>>2.11.0

>>>

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Gao, Liming Jan. 22, 2018, 3:18 p.m. UTC | #5
It's ok to me. Thanks!

> -----Original Message-----

> From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]

> Sent: Monday, January 22, 2018 4:52 PM

> To: Gao, Liming <liming.gao@intel.com>

> Cc: edk2-devel@lists.01.org; leif.lindholm@linaro.org; Zhu, Yonghong <yonghong.zhu@intel.com>

> Subject: Re: [PATCH] BaseTools/tools_def CLANG35: ignore unknown warning options

> 

> On 22 January 2018 at 02:21, Gao, Liming <liming.gao@intel.com> wrote:

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

> >

> 

> Thanks Liming.

> 

> Do you agree to add this to CLANG38_WARNING_OVERRIDES as well? We need

> this on ARM, and I assume on x86 as well.

> 

> 

> >>-----Original Message-----

> >>From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]

> >>Sent: Saturday, January 20, 2018 12:22 AM

> >>To: edk2-devel@lists.01.org

> >>Cc: leif.lindholm@linaro.org; Gao, Liming <liming.gao@intel.com>; Zhu,

> >>Yonghong <yonghong.zhu@intel.com>; Ard Biesheuvel

> >><ard.biesheuvel@linaro.org>

> >>Subject: [PATCH] BaseTools/tools_def CLANG35: ignore unknown warning

> >>options

> >>

> >>Ironically, disabling warnings in the OpensslLib library build is

> >>causing breakage when using the CLANG35 toolchain to build for ARM:

> >>

> >>error: unknown warning option '-Werror=maybe-uninitialized'; did you mean

> >>'-Werror=uninitialized'? [-Werror,-Wunknown-warning-option]

> >>

> >>So let's add -Wno-unknown-warning-option to the list of warning to

> >>ignore when using Clang 3.5

> >>

> >>Contributed-under: TianoCore Contribution Agreement 1.1

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

> >>---

> >> BaseTools/Conf/tools_def.template | 2 +-

> >> 1 file changed, 1 insertion(+), 1 deletion(-)

> >>

> >>diff --git a/BaseTools/Conf/tools_def.template

> >>b/BaseTools/Conf/tools_def.template

> >>index d8fde02ea351..6afe5ebe9fe3 100755

> >>--- a/BaseTools/Conf/tools_def.template

> >>+++ b/BaseTools/Conf/tools_def.template

> >>@@ -5595,7 +5595,7 @@ RELEASE_GCC5_AARCH64_DLINK_FLAGS =

> >>DEF(GCC5_AARCH64_DLINK_FLAGS) -flto -Os -L$(W

> >> DEFINE CLANG35_ARM_TARGET        = -target arm-linux-gnueabihf

> >> DEFINE CLANG35_AARCH64_TARGET    = -target aarch64-linux-gnu

> >>

> >>-DEFINE CLANG35_WARNING_OVERRIDES = -Wno-parentheses-equality -

> >>Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare

> >>-Wno-empty-body

> >>+DEFINE CLANG35_WARNING_OVERRIDES = -Wno-parentheses-equality -

> >>Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare

> >>-Wno-empty-body -Wno-unknown-warning-option

> >> DEFINE CLANG35_ARM_CC_FLAGS      = DEF(GCC_ARM_CC_FLAGS)

> >>DEF(CLANG35_ARM_TARGET) DEF(CLANG35_WARNING_OVERRIDES)

> >> DEFINE CLANG35_AARCH64_CC_FLAGS  = DEF(GCC_AARCH64_CC_FLAGS)

> >>DEF(CLANG35_AARCH64_TARGET) -mcmodel=small

> >>DEF(CLANG35_WARNING_OVERRIDES)

> >>

> >>--

> >>2.11.0

> >

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox series

Patch

diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index d8fde02ea351..6afe5ebe9fe3 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -5595,7 +5595,7 @@  RELEASE_GCC5_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -flto -Os -L$(W
 DEFINE CLANG35_ARM_TARGET        = -target arm-linux-gnueabihf
 DEFINE CLANG35_AARCH64_TARGET    = -target aarch64-linux-gnu
 
-DEFINE CLANG35_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body
+DEFINE CLANG35_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body -Wno-unknown-warning-option
 DEFINE CLANG35_ARM_CC_FLAGS      = DEF(GCC_ARM_CC_FLAGS) DEF(CLANG35_ARM_TARGET) DEF(CLANG35_WARNING_OVERRIDES)
 DEFINE CLANG35_AARCH64_CC_FLAGS  = DEF(GCC_AARCH64_CC_FLAGS) DEF(CLANG35_AARCH64_TARGET) -mcmodel=small DEF(CLANG35_WARNING_OVERRIDES)