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
ab15922e
Unverified
Commit
ab15922e
authored
6 years ago
by
Soby Mathew
Committed by
GitHub
6 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #1884 from AlexeiFedorov/af/set_march_to_arch_minor
Allow setting compiler's target architecture
parents
b9d20d0e
fa6f774b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+12
-12
Makefile
docs/firmware-design.rst
+5
-1
docs/firmware-design.rst
with
17 additions
and
13 deletions
+17
-13
Makefile
View file @
ab15922e
...
...
@@ -147,26 +147,34 @@ target32-directive = -target arm-none-eabi
# Will set march32-directive from platform configuration
else
target32-directive
=
-target
armv8a-none-eabi
# Set the compiler's target architecture profile based on ARM_ARCH_MINOR option
ifeq
(${ARM_ARCH_MINOR},0)
march32-directive
=
-march
=
armv8-a
march64-directive
=
-march
=
armv8-a
else
march32-directive
=
-march
=
armv8.
${ARM_ARCH_MINOR}
-a
march64-directive
=
-march
=
armv8.
${ARM_ARCH_MINOR}
-a
endif
endif
ifneq
($(findstring armclang,$(notdir $(CC))),)
TF_CFLAGS_aarch32
=
-target
arm-arm-none-eabi
$
(
march32-directive
)
TF_CFLAGS_aarch64
=
-target
aarch64-arm-none-eabi
-
march
=
armv8-a
TF_CFLAGS_aarch64
=
-target
aarch64-arm-none-eabi
$
(
march
64-directive
)
LD
=
$(LINKER)
AS
=
$(CC)
-c
-x
assembler-with-cpp
$
(
TF_CFLAGS_
$(ARCH)
)
CPP
=
$(CC)
-E
$
(
TF_CFLAGS_
$(ARCH)
)
PP
=
$(CC)
-E
$
(
TF_CFLAGS_
$(ARCH)
)
else
ifneq
($(findstring clang,$(notdir $(CC))),)
TF_CFLAGS_aarch32
=
$
(
target32-directive
)
$
(
march32-directive
)
TF_CFLAGS_aarch64
=
-target
aarch64-elf
TF_CFLAGS_aarch64
=
-target
aarch64-elf
$
(
march64-directive
)
LD
=
$(LINKER)
AS
=
$(CC)
-c
-x
assembler-with-cpp
$
(
TF_CFLAGS_
$(ARCH)
)
CPP
=
$(CC)
-E
PP
=
$(CC)
-E
else
TF_CFLAGS_aarch32
=
$
(
march32-directive
)
TF_CFLAGS_aarch64
=
-
march
=
armv8-a
TF_CFLAGS_aarch64
=
$
(
march
64-directive
)
LD
=
$(LINKER)
endif
...
...
@@ -182,15 +190,7 @@ TF_CFLAGS_aarch32 += -mno-unaligned-access
TF_CFLAGS_aarch64
+=
-mgeneral-regs-only
-mstrict-align
ASFLAGS_aarch32
=
$
(
march32-directive
)
ASFLAGS_aarch64
=
-march
=
armv8-a
# Set the compiler to ARMv8.3 mode so that it uses all the ARMv8.3-PAuth
# instructions. Keeping it in 8.0 would make the compiler emit
# backwards-compatible hint instructions, which needs more space.
ifeq
(${ENABLE_PAUTH},1)
TF_CFLAGS_aarch64
+=
-march
=
armv8.3-a
ASFLAGS_aarch64
+=
-march
=
armv8.3-a
endif
ASFLAGS_aarch64
=
$
(
march64-directive
)
WARNING1
:=
-Wextra
WARNING1
+=
-Wunused
-Wno-unused-parameter
...
...
This diff is collapsed.
Click to expand it.
docs/firmware-design.rst
View file @
ab15922e
...
...
@@ -2521,7 +2521,7 @@ section lists the usage of Architecture Extensions, and build flags
controlling
them
.
In
general
,
and
unless
individually
mentioned
,
the
build
options
``
ARM_ARCH_MAJOR
``
and
``
ARM_ARCH_MINOR
``
select
s
the
Architecture
Extension
to
``
ARM_ARCH_MAJOR
``
and
``
ARM_ARCH_MINOR
``
select
the
Architecture
Extension
to
target
when
building
TF
-
A
.
Subsequent
Arm
Architecture
Extensions
are
backward
compatible
with
previous
versions
.
...
...
@@ -2570,6 +2570,10 @@ Armv8.3-A
``
CTX_INCLUDE_PAUTH_REGS
``
to
1.
This
enables
pointer
authentication
in
BL1
,
BL2
,
BL31
,
and
the
TSP
if
it
is
used
.
If
``
ARM_ARCH_MAJOR
==
8
``
and
``
ARM_ARCH_MINOR
>=
3
``
the
code
footprint
of
enabling
PAuth
is
lower
because
the
compiler
will
use
the
optimized
PAuth
instructions
rather
than
the
backwards
-
compatible
ones
.
Armv7
-
A
~~~~~~~
...
...
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