Skip to content

Commit 8609fbf

Browse files
committed
BaseTools/Source/C: Remove duplicate -fshort-wchar
`-fshort-wchar -flto -DUSING_LTO` was added via CPPFLAGS to all relevant uses of gcc and g++ in commit 2f61ab9. However CFLAGS, as defined in the lines above that change, is never consumed without CPPFLAGS, therefore `-fshort-wchar` can be removed from CFLAGS to avoid it appearing twice in every call to gcc which uses CFLAGS. Note that the affected files within BaseTools/Source/C (those that include the changed file, and all those that those include) are: ``` Makefiles/app.makefile Makefiles/lib.makefile GNUmakefile VfrCompile/GNUmakefile Makefiles/footer.makefile Makefiles/header.makefile ``` Note also that in VfrCompile/GNUmakefile g++ is affected by CPPFLAGS, but not CXXFLAGS. Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
1 parent 80adbac commit 8609fbf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

BaseTools/Source/C/Makefiles/header.makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,16 @@ BUILD_OPTFLAGS = -O2 $(EXTRA_OPTFLAGS)
9797

9898
ifeq ($(DARWIN),Darwin)
9999
# assume clang or clang compatible flags on OS X
100-
CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror \
100+
CFLAGS = -MD -fno-strict-aliasing -Wall -Werror \
101101
-Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -g
102102
else
103103
ifneq ($(CLANG),)
104-
CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fwrapv \
104+
CFLAGS = -MD -fno-strict-aliasing -fwrapv \
105105
-fno-delete-null-pointer-checks -Wall -Werror \
106106
-Wno-deprecated-declarations -Wno-self-assign \
107107
-Wno-unused-result -nostdlib -g
108108
else
109-
CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fwrapv \
109+
CFLAGS = -MD -fno-strict-aliasing -fwrapv \
110110
-fno-delete-null-pointer-checks -Wall -Werror \
111111
-Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict \
112112
-Wno-unused-result -nostdlib -g

0 commit comments

Comments
 (0)