diff options
author | Jerome Forissier <jerome.forissier@linaro.org> | 2016-02-24 13:01:45 +0100 |
---|---|---|
committer | Jerome Forissier <jerome.forissier@linaro.org> | 2016-02-29 10:46:37 +0100 |
commit | b09cddcab1eee090886ca94ab9a4958ec6e174e0 (patch) | |
tree | 18210c4c584cea39c8193a30668882153924d0af /mk/gcc.mk | |
parent | 92db3e0c5a6797849a081225cd48c7e6a22348c8 (diff) |
Introduce CFLAGS32 and CFLAGS64
Previously, compile.mk and gcc.mk were using $(CFLAGS) which cannot
properly handle 32-bit and 64-bit compiles. This commit introduces
CFLAGS32 and CFLAGS64 instead, which are set to $(CFLAGS) by defaut
for convenience.
For each submodule (core, ta_arm32, ta_arm64) a new internal variable
is defined in the architecture makefile (core/arch/arm/arm.mk):
arch-bits-$(sm). Its value is either 32 or 64. This can later be used
to reference the proper CFLAGS.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'mk/gcc.mk')
-rw-r--r-- | mk/gcc.mk | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -12,7 +12,7 @@ nostdinc$(sm) := -nostdinc -isystem $(shell $(CC$(sm)) \ -print-file-name=include 2> /dev/null) # Get location of libgcc from gcc -libgcc$(sm) := $(shell $(CC$(sm)) $(CFLAGS) $(comp-cflags$(sm)) \ +libgcc$(sm) := $(shell $(CC$(sm)) $(CFLAGS$(arch-bits-$(sm))) $(comp-cflags$(sm)) \ -print-libgcc-file-name 2> /dev/null) # Define these to something to discover accidental use |