cc/gcc: Add Fortran support for Baremetal build

Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
[yann.morin.1998@free.fr: fix damage due to mailer]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <CACgzC7D5HCVS-qX=ydcQphNFH=VGgJzTdZWQWaLKAv-CdE8crA@mail.gmail.com>
Patchwork-Id: 292703
This commit is contained in:
Zhenqiang Chen 2013-11-19 14:44:02 +08:00
parent b9adbff8e1
commit 2f94f99dd8
2 changed files with 12 additions and 2 deletions

View File

@ -46,8 +46,6 @@ config CC_LANG_CXX
Only select this if you know that your specific version of the Only select this if you know that your specific version of the
compiler supports this language. compiler supports this language.
if ! BARE_METAL
config CC_LANG_FORTRAN config CC_LANG_FORTRAN
bool bool
prompt "Fortran" prompt "Fortran"
@ -58,6 +56,8 @@ config CC_LANG_FORTRAN
Only select this if you know that your specific version of the Only select this if you know that your specific version of the
compiler supports this language. compiler supports this language.
if ! BARE_METAL
config CC_LANG_JAVA config CC_LANG_JAVA
bool bool
prompt "Java" prompt "Java"

View File

@ -164,6 +164,7 @@ do_cc_core_pass_2() {
# lang_list : the list of languages to build : string : (empty) # lang_list : the list of languages to build : string : (empty)
# build_libgcc : build libgcc or not : bool : no # build_libgcc : build libgcc or not : bool : no
# build_libstdcxx : build libstdc++ or not : bool : no # build_libstdcxx : build libstdc++ or not : bool : no
# build_libgfortran : build libgfortran or not : bool : no
# build_staticlinked : build statically linked or not : bool : no # build_staticlinked : build statically linked or not : bool : no
# build_manuals : whether to build manuals or not : bool : no # build_manuals : whether to build manuals or not : bool : no
# cflags : cflags to use : string : (empty) # cflags : cflags to use : string : (empty)
@ -173,6 +174,7 @@ do_cc_core_backend() {
local mode local mode
local build_libgcc=no local build_libgcc=no
local build_libstdcxx=no local build_libstdcxx=no
local build_libgfortran=no
local build_staticlinked=no local build_staticlinked=no
local build_manuals=no local build_manuals=no
local host local host
@ -457,6 +459,12 @@ do_cc_core_backend() {
core_targets+=( target-libstdc++-v3 ) core_targets+=( target-libstdc++-v3 )
fi fi
if [ "${build_libgfortran}" = "yes" \
-a "${CT_CC_LANG_FORTRAN}" = "y" \
]; then
core_targets+=( target-libgfortran )
fi
CT_DoLog EXTRA "Building gcc" CT_DoLog EXTRA "Building gcc"
CT_DoExecLog ALL make ${JOBSFLAGS} "${core_targets[@]/#/all-}" CT_DoExecLog ALL make ${JOBSFLAGS} "${core_targets[@]/#/all-}"
@ -521,6 +529,7 @@ do_cc_for_build() {
build_final_opts+=( "mode=baremetal" ) build_final_opts+=( "mode=baremetal" )
build_final_opts+=( "build_libgcc=yes" ) build_final_opts+=( "build_libgcc=yes" )
build_final_opts+=( "build_libstdcxx=yes" ) build_final_opts+=( "build_libstdcxx=yes" )
build_final_opts+=( "build_libgfortran=yes" )
if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then
build_final_opts+=( "build_staticlinked=yes" ) build_final_opts+=( "build_staticlinked=yes" )
fi fi
@ -557,6 +566,7 @@ do_cc_for_host() {
final_opts+=( "mode=baremetal" ) final_opts+=( "mode=baremetal" )
final_opts+=( "build_libgcc=yes" ) final_opts+=( "build_libgcc=yes" )
final_opts+=( "build_libstdcxx=yes" ) final_opts+=( "build_libstdcxx=yes" )
final_opts+=( "build_libgfortran=yes" )
if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then
final_opts+=( "build_staticlinked=yes" ) final_opts+=( "build_staticlinked=yes" )
fi fi