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
81b491ff
Commit
81b491ff
authored
Apr 18, 2016
by
danh-arm
Browse files
Merge pull request #595 from sandrine-bailleux-arm/sb/unoptimised-build
Add support for unoptimised (-O0) build
parents
7b4838e4
10c252c1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
81b491ff
...
@@ -136,7 +136,7 @@ export Q
...
@@ -136,7 +136,7 @@ export Q
$(eval
$(call
add_define,DEBUG))
$(eval
$(call
add_define,DEBUG))
ifneq
(${DEBUG}, 0)
ifneq
(${DEBUG}, 0)
BUILD_TYPE
:=
debug
BUILD_TYPE
:=
debug
CFLAGS
+=
-g
TF_
CFLAGS
+=
-g
ASFLAGS
+=
-g
-Wa
,--gdwarf-2
ASFLAGS
+=
-g
-Wa
,--gdwarf-2
# Use LOG_LEVEL_INFO by default for debug builds
# Use LOG_LEVEL_INFO by default for debug builds
LOG_LEVEL
:=
40
LOG_LEVEL
:=
40
...
@@ -179,12 +179,12 @@ ASFLAGS += -nostdinc -ffreestanding -Wa,--fatal-warnings \
...
@@ -179,12 +179,12 @@ ASFLAGS += -nostdinc -ffreestanding -Wa,--fatal-warnings \
-Werror
-Wmissing-include-dirs
\
-Werror
-Wmissing-include-dirs
\
-mgeneral-regs-only
-D__ASSEMBLY__
\
-mgeneral-regs-only
-D__ASSEMBLY__
\
${DEFINES}
${INCLUDES}
${DEFINES}
${INCLUDES}
CFLAGS
+=
-nostdinc
-ffreestanding
-Wall
\
TF_
CFLAGS
+=
-nostdinc
-ffreestanding
-Wall
\
-Werror
-Wmissing-include-dirs
\
-Werror
-Wmissing-include-dirs
\
-mgeneral-regs-only
-mstrict-align
\
-mgeneral-regs-only
-mstrict-align
\
-std
=
c99
-c
-Os
\
-std
=
c99
-c
-Os
\
${DEFINES}
${INCLUDES}
${DEFINES}
${INCLUDES}
CFLAGS
+=
-ffunction-sections
-fdata-sections
TF_
CFLAGS
+=
-ffunction-sections
-fdata-sections
LDFLAGS
+=
--fatal-warnings
-O1
LDFLAGS
+=
--fatal-warnings
-O1
LDFLAGS
+=
--gc-sections
LDFLAGS
+=
--gc-sections
...
@@ -331,7 +331,7 @@ endif
...
@@ -331,7 +331,7 @@ endif
# Check if -pedantic option should be used
# Check if -pedantic option should be used
ifeq (${DISABLE_PEDANTIC},0)
ifeq (${DISABLE_PEDANTIC},0)
CFLAGS
+= -pedantic
TF_
CFLAGS += -pedantic
endif
endif
# Using the ARM Trusted Firmware BL2 implies that a BL33 image also needs to be
# Using the ARM Trusted Firmware BL2 implies that a BL33 image also needs to be
...
@@ -487,7 +487,7 @@ msg_start:
...
@@ -487,7 +487,7 @@ msg_start:
# Check if deprecated declarations should be treated as error or not.
# Check if deprecated declarations should be treated as error or not.
ifeq
(${ERROR_DEPRECATED},0)
ifeq
(${ERROR_DEPRECATED},0)
CFLAGS
+=
-Wno-error
=
deprecated-declarations
TF_
CFLAGS
+=
-Wno-error
=
deprecated-declarations
endif
endif
# Expand build macros for the different images
# Expand build macros for the different images
...
...
include/common/context_mgmt.h
View file @
81b491ff
...
@@ -55,7 +55,6 @@ void cm_set_context_by_index(unsigned int cpu_idx,
...
@@ -55,7 +55,6 @@ void cm_set_context_by_index(unsigned int cpu_idx,
unsigned
int
security_state
);
unsigned
int
security_state
);
void
*
cm_get_context
(
uint32_t
security_state
);
void
*
cm_get_context
(
uint32_t
security_state
);
void
cm_set_context
(
void
*
context
,
uint32_t
security_state
);
void
cm_set_context
(
void
*
context
,
uint32_t
security_state
);
inline
void
cm_set_next_context
(
void
*
context
);
void
cm_init_context
(
uint64_t
mpidr
,
void
cm_init_context
(
uint64_t
mpidr
,
const
struct
entry_point_info
*
ep
)
__deprecated
;
const
struct
entry_point_info
*
ep
)
__deprecated
;
void
cm_init_my_context
(
const
struct
entry_point_info
*
ep
);
void
cm_init_my_context
(
const
struct
entry_point_info
*
ep
);
...
@@ -80,7 +79,7 @@ uint32_t cm_get_scr_el3(uint32_t security_state);
...
@@ -80,7 +79,7 @@ uint32_t cm_get_scr_el3(uint32_t security_state);
* return. This initializes the SP_EL3 to a pointer to a 'cpu_context' set for
* return. This initializes the SP_EL3 to a pointer to a 'cpu_context' set for
* the required security state
* the required security state
******************************************************************************/
******************************************************************************/
inline
void
cm_set_next_context
(
void
*
context
)
static
inline
void
cm_set_next_context
(
void
*
context
)
{
{
#if DEBUG
#if DEBUG
uint64_t
sp_mode
;
uint64_t
sp_mode
;
...
...
include/lib/bakery_lock.h
View file @
81b491ff
...
@@ -96,7 +96,7 @@ typedef bakery_info_t bakery_lock_t;
...
@@ -96,7 +96,7 @@ typedef bakery_info_t bakery_lock_t;
#endif
/* __USE_COHERENT_MEM__ */
#endif
/* __USE_COHERENT_MEM__ */
inline
void
bakery_lock_init
(
bakery_lock_t
*
bakery
)
{}
static
inline
void
bakery_lock_init
(
bakery_lock_t
*
bakery
)
{}
void
bakery_lock_get
(
bakery_lock_t
*
bakery
);
void
bakery_lock_get
(
bakery_lock_t
*
bakery
);
void
bakery_lock_release
(
bakery_lock_t
*
bakery
);
void
bakery_lock_release
(
bakery_lock_t
*
bakery
);
...
...
make_helpers/build_macros.mk
View file @
81b491ff
...
@@ -208,11 +208,11 @@ $(eval IMAGE := IMAGE_BL$(call uppercase,$(3)))
...
@@ -208,11 +208,11 @@ $(eval IMAGE := IMAGE_BL$(call uppercase,$(3)))
$(OBJ)
:
$(2)
$(OBJ)
:
$(2)
@
echo
" CC
$$
<"
@
echo
" CC
$$
<"
$
$(Q)
$
$(CC)
$
$(CFLAGS)
-D
$(IMAGE)
-c
$$
<
-o
$$
@
$
$(Q)
$
$(CC)
$
$(TF_CFLAGS)
$
$(CFLAGS)
-D
$(IMAGE)
-c
$$
<
-o
$$
@
$(PREREQUISITES)
:
$(2) | bl$(3)_dirs
$(PREREQUISITES)
:
$(2) | bl$(3)_dirs
@
echo
" DEPS
$$
@"
@
echo
" DEPS
$$
@"
$
$(Q)
$
$(CC)
$
$(CFLAGS)
-M
-MT
$(OBJ)
-MF
$$
@
$$
<
$
$(Q)
$
$(CC)
$
$(TF_CFLAGS)
$
$(CFLAGS)
-M
-MT
$(OBJ)
-MF
$$
@
$$
<
ifdef
IS_ANYTHING_TO_BUILD
ifdef
IS_ANYTHING_TO_BUILD
-include
$(PREREQUISITES)
-include
$(PREREQUISITES)
...
@@ -351,7 +351,7 @@ ifdef MAKE_BUILD_STRINGS
...
@@ -351,7 +351,7 @@ ifdef MAKE_BUILD_STRINGS
else
else
@
echo
'const char build_message[] = "Built : "
$(BUILD_MESSAGE_TIMESTAMP)
; \
@
echo
'const char build_message[] = "Built : "
$(BUILD_MESSAGE_TIMESTAMP)
; \
const char version_string[] = "
${VERSION_STRING}
";'
|
\
const char version_string[] = "
${VERSION_STRING}
";'
|
\
$
$(CC)
$
$(CFLAGS)
-xc
-
-o
$(BUILD_DIR)
/build_message.o
$
$(CC)
$
$(TF_CFLAGS)
$
$(CFLAGS)
-xc
-
-o
$(BUILD_DIR)
/build_message.o
endif
endif
$
$(Q)
$
$(LD)
-o
$$
@
$
$(LDFLAGS)
-Map
=
$(MAPFILE)
--script
$(LINKERFILE)
\
$
$(Q)
$
$(LD)
-o
$$
@
$
$(LDFLAGS)
-Map
=
$(MAPFILE)
--script
$(LINKERFILE)
\
$(BUILD_DIR)
/build_message.o
$(OBJS)
$(BUILD_DIR)
/build_message.o
$(OBJS)
...
...
make_helpers/windows.mk
View file @
81b491ff
...
@@ -104,6 +104,6 @@ BUILT_TIME_DATE_STRING = const char build_message[] = "Built : "${BUILD_MESSAGE_
...
@@ -104,6 +104,6 @@ BUILT_TIME_DATE_STRING = const char build_message[] = "Built : "${BUILD_MESSAGE_
VERSION_STRING_MESSAGE
=
const char version_string[]
=
"
${VERSION_STRING}
"
;
VERSION_STRING_MESSAGE
=
const char version_string[]
=
"
${VERSION_STRING}
"
;
define
MAKE_BUILD_STRINGS
define
MAKE_BUILD_STRINGS
@echo
$$(BUILT_TIME_DATE_STRING)
$$(VERSION_STRING_MESSAGE)
|
\
@echo
$$(BUILT_TIME_DATE_STRING)
$$(VERSION_STRING_MESSAGE)
|
\
$$(CC)
$$(CFLAGS)
-x
c
-
-o
$1
$$(CC)
$$(TF_CFLAGS)
$$(CFLAGS)
-x
c
-
-o
$1
endef
endef
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