Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
1c5f90fb
Commit
1c5f90fb
authored
Dec 03, 2019
by
Manish Pandey
Committed by
TrustedFirmware Code Review
Dec 03, 2019
Browse files
Merge "Refactor the warning flags" into integration
parents
45d46115
9ab81b5e
Changes
1
Show whitespace changes
Inline
Side-by-side
Makefile
View file @
1c5f90fb
...
@@ -228,6 +228,13 @@ endif
...
@@ -228,6 +228,13 @@ endif
ASFLAGS_aarch32
=
$
(
march32-directive
)
ASFLAGS_aarch32
=
$
(
march32-directive
)
ASFLAGS_aarch64
=
$
(
march64-directive
)
ASFLAGS_aarch64
=
$
(
march64-directive
)
# General warnings
WARNINGS
:=
-Wall
-Wmissing-include-dirs
-Wunused
\
-Wdisabled-optimization
-Wvla
\
-Wno-unused-parameter
# Additional warnings
# Level 1
WARNING1
:=
-Wextra
WARNING1
:=
-Wextra
WARNING1
+=
-Wmissing-declarations
WARNING1
+=
-Wmissing-declarations
WARNING1
+=
-Wmissing-format-attribute
WARNING1
+=
-Wmissing-format-attribute
...
@@ -253,17 +260,14 @@ WARNING3 += -Wredundant-decls
...
@@ -253,17 +260,14 @@ WARNING3 += -Wredundant-decls
WARNING3
+=
-Wswitch-default
WARNING3
+=
-Wswitch-default
ifeq
(${W},1)
ifeq
(${W},1)
WARNINGS
:
=
$(WARNING1)
WARNINGS
+
=
$(WARNING1)
else
ifeq
(${W},2)
else
ifeq
(${W},2)
WARNINGS
:
=
$(WARNING1)
$(WARNING2)
WARNINGS
+
=
$(WARNING1)
$(WARNING2)
else
ifeq
(${W},3)
else
ifeq
(${W},3)
WARNINGS
:
=
$(WARNING1)
$(WARNING2)
$(WARNING3)
WARNINGS
+
=
$(WARNING1)
$(WARNING2)
$(WARNING3)
endif
endif
WARNINGS
+=
-Wunused
-Wno-unused-parameter
\
# Compiler specific warnings
-Wdisabled-optimization
\
-Wvla
ifeq
($(findstring clang,$(notdir $(CC))),)
ifeq
($(findstring clang,$(notdir $(CC))),)
# not using clang
# not using clang
WARNINGS
+=
-Wunused-but-set-variable
\
WARNINGS
+=
-Wunused-but-set-variable
\
...
@@ -280,11 +284,11 @@ ERRORS := -Werror
...
@@ -280,11 +284,11 @@ ERRORS := -Werror
endif
endif
CPPFLAGS
=
${DEFINES}
${INCLUDES}
${MBEDTLS_INC}
-nostdinc
\
CPPFLAGS
=
${DEFINES}
${INCLUDES}
${MBEDTLS_INC}
-nostdinc
\
-Wmissing-include-dirs
$(ERRORS)
$(WARNINGS)
$(ERRORS)
$(WARNINGS)
ASFLAGS
+=
$(CPPFLAGS)
$
(
ASFLAGS_
$(ARCH)
)
\
ASFLAGS
+=
$(CPPFLAGS)
$
(
ASFLAGS_
$(ARCH)
)
\
-ffreestanding
-Wa
,--fatal-warnings
-ffreestanding
-Wa
,--fatal-warnings
TF_CFLAGS
+=
$(CPPFLAGS)
$
(
TF_CFLAGS_
$(ARCH)
)
\
TF_CFLAGS
+=
$(CPPFLAGS)
$
(
TF_CFLAGS_
$(ARCH)
)
\
-ffreestanding
-fno-builtin
-Wall
-std
=
gnu99
\
-ffreestanding
-fno-builtin
-std
=
gnu99
\
-Os
-ffunction-sections
-fdata-sections
-Os
-ffunction-sections
-fdata-sections
ifeq
(${SANITIZE_UB},on)
ifeq
(${SANITIZE_UB},on)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment