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
52a9e53b
Unverified
Commit
52a9e53b
authored
Oct 10, 2018
by
Soby Mathew
Committed by
GitHub
Oct 10, 2018
Browse files
Merge pull request #1612 from antonio-nino-diaz-arm/an/tools
tools: Make invocation of host compiler correct
parents
821d3547
750e8d80
Changes
4
Show whitespace changes
Inline
Side-by-side
tools/cert_create/Makefile
View file @
52a9e53b
#
#
# Copyright (c) 2015-201
7
, ARM Limited and Contributors. All rights reserved.
# Copyright (c) 2015-201
8
, ARM Limited and Contributors. All rights reserved.
#
#
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-License-Identifier: BSD-3-Clause
#
#
...
@@ -22,7 +22,7 @@ OBJECTS := src/cert.o \
...
@@ -22,7 +22,7 @@ OBJECTS := src/cert.o \
src/tbbr/tbb_ext.o
\
src/tbbr/tbb_ext.o
\
src/tbbr/tbb_key.o
src/tbbr/tbb_key.o
CFLAGS
:=
-Wall
-std
=
c99
HOSTC
CFLAGS
:=
-Wall
-std
=
c99
MAKE_HELPERS_DIRECTORY
:=
../../make_helpers/
MAKE_HELPERS_DIRECTORY
:=
../../make_helpers/
include
${MAKE_HELPERS_DIRECTORY}build_macros.mk
include
${MAKE_HELPERS_DIRECTORY}build_macros.mk
...
@@ -46,9 +46,9 @@ endif
...
@@ -46,9 +46,9 @@ endif
endif
endif
ifeq
(${DEBUG},1)
ifeq
(${DEBUG},1)
CFLAGS
+=
-g
-O0
-DDEBUG
-DLOG_LEVEL
=
40
HOSTC
CFLAGS
+=
-g
-O0
-DDEBUG
-DLOG_LEVEL
=
40
else
else
CFLAGS
+=
-O2
-DLOG_LEVEL
=
20
HOSTC
CFLAGS
+=
-O2
-DLOG_LEVEL
=
20
endif
endif
ifeq
(${V},0)
ifeq
(${V},0)
Q
:=
@
Q
:=
@
...
@@ -57,7 +57,7 @@ else
...
@@ -57,7 +57,7 @@ else
endif
endif
$(eval
$(call
add_define,USE_TBBR_DEFS))
$(eval
$(call
add_define,USE_TBBR_DEFS))
CFLAGS
+=
${DEFINES}
HOSTC
CFLAGS
+=
${DEFINES}
# Make soft links and include from local directory otherwise wrong headers
# Make soft links and include from local directory otherwise wrong headers
# could get pulled in from firmware tree.
# could get pulled in from firmware tree.
...
@@ -72,15 +72,15 @@ HOSTCC ?= gcc
...
@@ -72,15 +72,15 @@ HOSTCC ?= gcc
all
:
clean ${BINARY}
all
:
clean ${BINARY}
${BINARY}
:
${OBJECTS} Makefile
${BINARY}
:
${OBJECTS} Makefile
@
echo
"
LD
$@
"
@
echo
"
HOSTLD
$@
"
@
echo
'const char build_msg[] = "Built : "__TIME__", "__DATE__; \
@
echo
'const char build_msg[] = "Built : "__TIME__", "__DATE__; \
const char platform_msg[] = "
${PLAT_MSG}
";'
|
\
const char platform_msg[] = "
${PLAT_MSG}
";'
|
\
${HOSTCC}
-c
${CFLAGS}
-xc
-
-o
src/build_msg.o
${HOSTCC}
-c
${
HOSTC
CFLAGS}
-xc
-
-o
src/build_msg.o
${Q}${HOSTCC}
src/build_msg.o
${OBJECTS}
${LIB_DIR}
${LIB}
-o
$@
${Q}${HOSTCC}
src/build_msg.o
${OBJECTS}
${LIB_DIR}
${LIB}
-o
$@
%.o
:
%.c
%.o
:
%.c
@
echo
"
CC
$<
"
@
echo
"
HOSTCC
$<
"
${Q}${HOSTCC}
-c
${CFLAGS}
${INC_DIR}
$<
-o
$@
${Q}${HOSTCC}
-c
${
HOSTC
CFLAGS}
${INC_DIR}
$<
-o
$@
clean
:
clean
:
$(
call
SHELL_DELETE_ALL, src/build_msg.o
${OBJECTS}
)
$(
call
SHELL_DELETE_ALL, src/build_msg.o
${OBJECTS}
)
...
...
tools/doimage/Makefile
View file @
52a9e53b
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
PROJECT
=
doimage
PROJECT
=
doimage
OBJECTS
=
doimage.o
OBJECTS
=
doimage.o
CFLAGS
=
-Wall
-Werror
HOSTC
CFLAGS
=
-Wall
-Werror
ifeq
(${DEBUG},1)
ifeq
(${DEBUG},1)
CFLAGS
+=
-g
-O0
-DDEBUG
HOSTC
CFLAGS
+=
-g
-O0
-DDEBUG
else
else
CFLAGS
+=
-O2
HOSTC
CFLAGS
+=
-O2
endif
endif
ifeq
(${MARVELL_SECURE_BOOT},1)
ifeq
(${MARVELL_SECURE_BOOT},1)
...
@@ -19,13 +19,13 @@ DOIMAGE_CC_FLAGS := -DCONFIG_MVEBU_SECURE_BOOT
...
@@ -19,13 +19,13 @@ DOIMAGE_CC_FLAGS := -DCONFIG_MVEBU_SECURE_BOOT
DOIMAGE_LD_FLAGS
:=
-lconfig
-lmbedtls
-lmbedcrypto
-lmbedx509
DOIMAGE_LD_FLAGS
:=
-lconfig
-lmbedtls
-lmbedcrypto
-lmbedx509
endif
endif
CFLAGS
+=
${DOIMAGE_CC_FLAGS}
HOSTC
CFLAGS
+=
${DOIMAGE_CC_FLAGS}
# Make soft links and include from local directory otherwise wrong headers
# Make soft links and include from local directory otherwise wrong headers
# could get pulled in from firmware tree.
# could get pulled in from firmware tree.
INCLUDE_PATHS
=
-I
.
INCLUDE_PATHS
=
-I
.
CC
:
=
gcc
HOST
CC
?
=
gcc
RM
:=
rm
-rf
RM
:=
rm
-rf
.PHONY
:
all clean
.PHONY
:
all clean
...
@@ -33,15 +33,15 @@ RM := rm -rf
...
@@ -33,15 +33,15 @@ RM := rm -rf
all
:
${PROJECT}
all
:
${PROJECT}
${PROJECT}
:
${OBJECTS} Makefile
${PROJECT}
:
${OBJECTS} Makefile
@
echo
"
LD
$@
"
@
echo
"
HOSTLD
$@
"
${Q}${CC}
${OBJECTS}
${DOIMAGE_LD_FLAGS}
-o
$@
${Q}${
HOST
CC}
${OBJECTS}
${DOIMAGE_LD_FLAGS}
-o
$@
@
echo
@
echo
@
echo
"Built
$@
successfully"
@
echo
"Built
$@
successfully"
@
echo
@
echo
%.o
:
%.c Makefile
%.o
:
%.c Makefile
@
echo
"
CC
$<
"
@
echo
"
HOSTCC
$<
"
${Q}${CC}
-c
${CFLAGS}
${INCLUDE_PATHS}
$<
-o
$@
${Q}${
HOST
CC}
-c
${
HOSTC
CFLAGS}
${INCLUDE_PATHS}
$<
-o
$@
clean
:
clean
:
${Q}${RM}
${PROJECT}
${Q}${RM}
${PROJECT}
...
...
tools/fiptool/Makefile
View file @
52a9e53b
#
#
# Copyright (c) 2014-201
7
, ARM Limited and Contributors. All rights reserved.
# Copyright (c) 2014-201
8
, ARM Limited and Contributors. All rights reserved.
#
#
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-License-Identifier: BSD-3-Clause
#
#
...
@@ -13,11 +13,11 @@ OBJECTS := fiptool.o tbbr_config.o
...
@@ -13,11 +13,11 @@ OBJECTS := fiptool.o tbbr_config.o
V
?=
0
V
?=
0
override
CPPFLAGS
+=
-D_GNU_SOURCE
-D_XOPEN_SOURCE
=
700
override
CPPFLAGS
+=
-D_GNU_SOURCE
-D_XOPEN_SOURCE
=
700
CFLAGS
:=
-Wall
-Werror
-pedantic
-std
=
c99
HOSTC
CFLAGS
:=
-Wall
-Werror
-pedantic
-std
=
c99
ifeq
(${DEBUG},1)
ifeq
(${DEBUG},1)
CFLAGS
+=
-g
-O0
-DDEBUG
HOSTC
CFLAGS
+=
-g
-O0
-DDEBUG
else
else
CFLAGS
+=
-O2
HOSTC
CFLAGS
+=
-O2
endif
endif
LDLIBS
:=
-lcrypto
LDLIBS
:=
-lcrypto
...
@@ -36,15 +36,15 @@ HOSTCC ?= gcc
...
@@ -36,15 +36,15 @@ HOSTCC ?= gcc
all
:
${PROJECT}
all
:
${PROJECT}
${PROJECT}
:
${OBJECTS} Makefile
${PROJECT}
:
${OBJECTS} Makefile
@
echo
"
LD
$@
"
@
echo
"
HOSTLD
$@
"
${Q}${HOSTCC}
${OBJECTS}
-o
$@
${LDLIBS}
${Q}${HOSTCC}
${OBJECTS}
-o
$@
${LDLIBS}
@
${ECHO_BLANK_LINE}
@
${ECHO_BLANK_LINE}
@
echo
"Built
$@
successfully"
@
echo
"Built
$@
successfully"
@
${ECHO_BLANK_LINE}
@
${ECHO_BLANK_LINE}
%.o
:
%.c %.h Makefile
%.o
:
%.c %.h Makefile
@
echo
"
CC
$<
"
@
echo
"
HOSTCC
$<
"
${Q}${HOSTCC}
-c
${CPPFLAGS}
${CFLAGS}
${INCLUDE_PATHS}
$<
-o
$@
${Q}${HOSTCC}
-c
${CPPFLAGS}
${
HOSTC
CFLAGS}
${INCLUDE_PATHS}
$<
-o
$@
clean
:
clean
:
$(
call
SHELL_DELETE_ALL,
${PROJECT}
${OBJECTS}
)
$(
call
SHELL_DELETE_ALL,
${PROJECT}
${OBJECTS}
)
tools/stm32image/Makefile
View file @
52a9e53b
...
@@ -12,11 +12,12 @@ PROJECT := stm32image${BIN_EXT}
...
@@ -12,11 +12,12 @@ PROJECT := stm32image${BIN_EXT}
OBJECTS
:=
stm32image.o
OBJECTS
:=
stm32image.o
V
:=
0
V
:=
0
CFLAGS
:=
-Wall
-Werror
-pedantic
-std
=
c99
-D_GNU_SOURCE
HOSTCCFLAGS
:=
-Wall
-Werror
-pedantic
-std
=
c99
-D_GNU_SOURCE
ifeq
(${DEBUG},1)
ifeq
(${DEBUG},1)
CFLAGS
+=
-g
-O0
-DDEBUG
HOSTC
CFLAGS
+=
-g
-O0
-DDEBUG
else
else
CFLAGS
+=
-O2
HOSTC
CFLAGS
+=
-O2
endif
endif
ifeq
(${V},0)
ifeq
(${V},0)
...
@@ -25,22 +26,22 @@ else
...
@@ -25,22 +26,22 @@ else
Q
:=
Q
:=
endif
endif
CC
:=
gcc
HOST
CC
:=
gcc
.PHONY
:
all clean distclean
.PHONY
:
all clean distclean
all
:
${PROJECT}
all
:
${PROJECT}
${PROJECT}
:
${OBJECTS} Makefile
${PROJECT}
:
${OBJECTS} Makefile
@
echo
"
LD
$@
"
@
echo
"
HOSTLD
$@
"
${Q}${CC}
${OBJECTS}
-o
$@
${Q}${
HOST
CC}
${OBJECTS}
-o
$@
@
${ECHO_BLANK_LINE}
@
${ECHO_BLANK_LINE}
@
echo
"Built
$@
successfully"
@
echo
"Built
$@
successfully"
@
${ECHO_BLANK_LINE}
@
${ECHO_BLANK_LINE}
%.o
:
%.c Makefile
%.o
:
%.c Makefile
@
echo
"
CC
$<
"
@
echo
"
HOSTCC
$<
"
${Q}${CC}
-c
${CFLAGS}
$<
-o
$@
${Q}${
HOST
CC}
-c
${
HOSTC
CFLAGS}
$<
-o
$@
clean
:
clean
:
$(
call
SHELL_DELETE_ALL,
${PROJECT}
${OBJECTS}
)
$(
call
SHELL_DELETE_ALL,
${PROJECT}
${OBJECTS}
)
...
...
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