forked from Mirrors/opensbi
Makefile: Rename CROSS_COMPILE to CROSS_COMPILE_PREFIX
Make it clear what this environment variable defines and update the README.md file to explain that. Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
This commit is contained in:
14
Makefile
14
Makefile
@@ -102,7 +102,7 @@ deps-y+=$(lib-objs-path-y:.o=.dep)
|
|||||||
deps-y+=$(firmware-objs-path-y:.o=.dep)
|
deps-y+=$(firmware-objs-path-y:.o=.dep)
|
||||||
|
|
||||||
# Setup compilation environment
|
# Setup compilation environment
|
||||||
cpp=$(CROSS_COMPILE)cpp
|
cpp=$(CROSS_COMPILE_PREFIX)cpp
|
||||||
cppflags+=-DOPENSBI_MAJOR=$(MAJOR)
|
cppflags+=-DOPENSBI_MAJOR=$(MAJOR)
|
||||||
cppflags+=-DOPENSBI_MINOR=$(MINOR)
|
cppflags+=-DOPENSBI_MINOR=$(MINOR)
|
||||||
cppflags+=-I$(platform_dir)/include
|
cppflags+=-I$(platform_dir)/include
|
||||||
@@ -110,7 +110,7 @@ cppflags+=-I$(platform_common_dir)/include
|
|||||||
cppflags+=-I$(include_dir)
|
cppflags+=-I$(include_dir)
|
||||||
cppflags+=$(platform-cppflags-y)
|
cppflags+=$(platform-cppflags-y)
|
||||||
cppflags+=$(firmware-cppflags-y)
|
cppflags+=$(firmware-cppflags-y)
|
||||||
cc=$(CROSS_COMPILE)gcc
|
cc=$(CROSS_COMPILE_PREFIX)gcc
|
||||||
cflags=-g -Wall -Werror -nostdlib -fno-strict-aliasing -O2
|
cflags=-g -Wall -Werror -nostdlib -fno-strict-aliasing -O2
|
||||||
cflags+=-fno-omit-frame-pointer -fno-optimize-sibling-calls
|
cflags+=-fno-omit-frame-pointer -fno-optimize-sibling-calls
|
||||||
cflags+=-mno-save-restore -mstrict-align
|
cflags+=-mno-save-restore -mstrict-align
|
||||||
@@ -118,7 +118,7 @@ cflags+=$(cppflags)
|
|||||||
cflags+=$(platform-cflags-y)
|
cflags+=$(platform-cflags-y)
|
||||||
cflags+=$(firmware-cflags-y)
|
cflags+=$(firmware-cflags-y)
|
||||||
cflags+=$(EXTRA_CFLAGS)
|
cflags+=$(EXTRA_CFLAGS)
|
||||||
as=$(CROSS_COMPILE)gcc
|
as=$(CROSS_COMPILE_PREFIX)gcc
|
||||||
asflags=-g -Wall -nostdlib -D__ASSEMBLY__
|
asflags=-g -Wall -nostdlib -D__ASSEMBLY__
|
||||||
asflags+=-fno-omit-frame-pointer -fno-optimize-sibling-calls
|
asflags+=-fno-omit-frame-pointer -fno-optimize-sibling-calls
|
||||||
asflags+=-mno-save-restore -mstrict-align
|
asflags+=-mno-save-restore -mstrict-align
|
||||||
@@ -126,15 +126,15 @@ asflags+=$(cppflags)
|
|||||||
asflags+=$(platform-asflags-y)
|
asflags+=$(platform-asflags-y)
|
||||||
asflags+=$(firmware-asflags-y)
|
asflags+=$(firmware-asflags-y)
|
||||||
asflags+=$(EXTRA_ASFLAGS)
|
asflags+=$(EXTRA_ASFLAGS)
|
||||||
ar=$(CROSS_COMPILE)ar
|
ar=$(CROSS_COMPILE_PREFIX)ar
|
||||||
arflags=rcs
|
arflags=rcs
|
||||||
ld=$(CROSS_COMPILE)gcc
|
ld=$(CROSS_COMPILE_PREFIX)gcc
|
||||||
ldflags=-g -Wall -nostdlib -Wl,--build-id=none
|
ldflags=-g -Wall -nostdlib -Wl,--build-id=none
|
||||||
ldflags+=$(platform-ldflags-y)
|
ldflags+=$(platform-ldflags-y)
|
||||||
ldflags+=$(firmware-ldflags-y)
|
ldflags+=$(firmware-ldflags-y)
|
||||||
merge=$(CROSS_COMPILE)ld
|
merge=$(CROSS_COMPILE_PREFIX)ld
|
||||||
mergeflags=-r
|
mergeflags=-r
|
||||||
objcopy=$(CROSS_COMPILE)objcopy
|
objcopy=$(CROSS_COMPILE_PREFIX)objcopy
|
||||||
|
|
||||||
# Setup functions for compilation
|
# Setup functions for compilation
|
||||||
define dynamic_flags
|
define dynamic_flags
|
||||||
|
@@ -28,8 +28,9 @@ We can create three things using the RISC-V OpenSBI project:
|
|||||||
How to Build?
|
How to Build?
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
For cross-compiling, please ensure that CROSS_COMPILE environment
|
For cross-compiling, the environment variable CROSS_COMPILE_PREFIX must be
|
||||||
variable is set before starting build system.
|
defined to specify the toolchain executable name prefix, e.g.
|
||||||
|
"riscv64-unknown-elf-" for riscv64-unknown-elf-gcc.
|
||||||
|
|
||||||
The libplatsbi.a and firmwares are optional and only built when
|
The libplatsbi.a and firmwares are optional and only built when
|
||||||
`PLATFORM=<platform_subdir>` parameter is specified to top-level make.
|
`PLATFORM=<platform_subdir>` parameter is specified to top-level make.
|
||||||
@@ -78,4 +79,4 @@ We also prefer source level documentation, so wherever possible we describe
|
|||||||
stuff directly in the source code. This helps us maintain source and its
|
stuff directly in the source code. This helps us maintain source and its
|
||||||
documentation at the same place. For source level documentation we strictly
|
documentation at the same place. For source level documentation we strictly
|
||||||
follow Doxygen style. Please refer [Doxygen manual]
|
follow Doxygen style. Please refer [Doxygen manual]
|
||||||
(http://www.stack.nl/~dimitri/doxygen/manual.html) for details.
|
(http://www.stack.nl/~dimitri/doxygen/manual.html) for details.
|
||||||
|
Reference in New Issue
Block a user