Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
1979ee13
Commit
1979ee13
authored
7 years ago
by
danh-arm
Committed by
GitHub
7 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #1008 from douglas-raillard-arm/dr/add_TF_LDFLAGS
Introduce TF_LDFLAGS and improve CFLAGS documentation
parents
6bf36249
f7ad7a63
master
v2.5
v2.5-rc1
v2.5-rc0
v2.4
v2.4-rc2
v2.4-rc1
v2.4-rc0
v2.3
v2.3-rc2
v2.3-rc1
v2.3-rc0
v2.2
v2.2-rc2
v2.2-rc1
v2.2-rc0
v2.1
v2.1-rc1
v2.1-rc0
v2.0
v2.0-rc0
v1.6
v1.6-rc1
v1.6-rc0
v1.5
v1.5-rc3
v1.5-rc2
v1.5-rc1
v1.5-rc0
v1.4
v1.4-rc0
arm_cca_v0.2
arm_cca_v0.1
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Makefile
+3
-4
Makefile
docs/user-guide.md
+11
-1
docs/user-guide.md
lib/cpus/cpu-ops.mk
+2
-2
lib/cpus/cpu-ops.mk
make_helpers/build_macros.mk
+2
-2
make_helpers/build_macros.mk
with
18 additions
and
9 deletions
+18
-9
Makefile
View file @
1979ee13
...
...
@@ -151,10 +151,9 @@ TF_CFLAGS += $(CPPFLAGS) $(TF_CFLAGS_$(ARCH)) \
-ffreestanding
-fno-builtin
-Wall
-std
=
gnu99
\
-Os
-ffunction-sections
-fdata-sections
LDFLAGS
+=
$
(
LDFLAGS_
$(ARCH)
)
LDFLAGS
+=
--fatal-warnings
-O1
LDFLAGS
+=
--gc-sections
TF_LDFLAGS
+=
--fatal-warnings
-O1
TF_LDFLAGS
+=
--gc-sections
TF_LDFLAGS
+=
$
(
TF_LDFLAGS_
$(ARCH)
)
################################################################################
# Common sources and include directories
...
...
This diff is collapsed.
Click to expand it.
docs/user-guide.md
View file @
1979ee13
...
...
@@ -269,6 +269,9 @@ performed.
*
`BUILD_STRING`
: Input string for VERSION_STRING, which allows the TF build
to be uniquely identified. Defaults to the current git commit id.
*
`CFLAGS`
: Extra user options appended on the compiler's command line in
addition to the options set by the build system.
*
`COLD_BOOT_SINGLE_CPU`
: This option indicates whether the platform may
release several CPUs out of reset. It can take either 0 (several CPUs may be
brought up) or 1 (only one CPU will ever be brought up during cold reset).
...
...
@@ -385,6 +388,9 @@ performed.
AArch64 and facilitates the loading of
`SP_MIN`
and BL33 as AArch32 executable
images.
*
`LDFLAGS`
: Extra user options appended to the linkers' command line in
addition to the one set by the build system.
*
`LOAD_IMAGE_V2`
: Boolean option to enable support for new version (v2) of
image loading, which provides more flexibility and scalability around what
images are loaded and executed during boot. Default is 0.
...
...
@@ -684,11 +690,15 @@ NOTE: Using `-O0` could cause output images to be larger and base addresses
might need to be recalculated (see the
**
Memory layout on ARM development
platforms
**
section in the [Firmware Design]).
Extra debug options can be passed to the build system by setting
`CFLAGS`
:
Extra debug options can be passed to the build system by setting
`CFLAGS`
or
`LDFLAGS`
:
CFLAGS='-O0 -gdwarf-2' \
make PLAT=<platform> DEBUG=1 V=1 all
Note that using
`-Wl,`
style compilation driver options in
`CFLAGS`
will be
ignored as the linker is called directly.
It is also possible to introduce an infinite loop to help in debugging the
post-BL2 phase of the Trusted Firmware. This can be done by rebuilding BL1 with
the
`SPIN_ON_BL1_EXIT=1`
build flag. Refer to the "Summary of build options"
...
...
This diff is collapsed.
Click to expand it.
lib/cpus/cpu-ops.mk
View file @
1979ee13
...
...
@@ -145,10 +145,10 @@ $(eval $(call add_define,ERRATA_A57_833471))
# Errata build flags
ifneq
(${ERRATA_A53_843419},0)
LDFLAGS_aarch64
+=
--fix-cortex-a53-843419
TF_
LDFLAGS_aarch64
+=
--fix-cortex-a53-843419
endif
ifneq
(${ERRATA_A53_835769},0)
TF_CFLAGS_aarch64
+=
-mfix-cortex-a53-835769
LDFLAGS_aarch64
+=
--fix-cortex-a53-835769
TF_
LDFLAGS_aarch64
+=
--fix-cortex-a53-835769
endif
This diff is collapsed.
Click to expand it.
make_helpers/build_macros.mk
View file @
1979ee13
...
...
@@ -313,8 +313,8 @@ else
const char version_string[] = "
${VERSION_STRING}
";'
|
\
$
$(CC)
$
$(TF_CFLAGS)
$
$(CFLAGS)
-xc
-c
-
-o
$(BUILD_DIR)
/build_message.o
endif
$
$(Q)
$
$(LD)
-o
$$
@
$
$(LDFLAGS)
-Map
=
$(MAPFILE)
--script
$(LINKER
FILE)
\
$(BUILD_DIR)
/build_message.o
$(OBJS)
$
$(Q)
$
$(LD)
-o
$$
@
$
$(
TF_
LDFLAGS)
$
$(LDFLAGS)
-Map
=
$(MAP
FILE)
\
--script
$(LINKERFILE)
$(BUILD_DIR)
/build_message.o
$(OBJS)
$(DUMP)
:
$(ELF)
@
echo
" OD
$$
@"
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help