# HG changeset patch # User Zhenqiang Chen # Date 1384843442 -28800 # Node ID e2e0f34eab6cd9241f2b9f423b5909082d7b7078 # Parent 15c6976026f3a274e0c968f871afcdf2f83b62e1 cc/gcc: Add Fortran support for Baremetal build Signed-off-by: Zhenqiang Chen [yann.morin.1998@free.fr: fix damage due to mailer] Signed-off-by: "Yann E. MORIN" Message-Id: Patchwork-Id: 292703 diff -r 15c6976026f3 -r e2e0f34eab6c config/cc.in --- a/config/cc.in Sun Dec 08 12:53:14 2013 +0100 +++ b/config/cc.in Tue Nov 19 14:44:02 2013 +0800 @@ -46,8 +46,6 @@ Only select this if you know that your specific version of the compiler supports this language. -if ! BARE_METAL - config CC_LANG_FORTRAN bool prompt "Fortran" @@ -58,6 +56,8 @@ Only select this if you know that your specific version of the compiler supports this language. +if ! BARE_METAL + config CC_LANG_JAVA bool prompt "Java" diff -r 15c6976026f3 -r e2e0f34eab6c scripts/build/cc/gcc.sh --- a/scripts/build/cc/gcc.sh Sun Dec 08 12:53:14 2013 +0100 +++ b/scripts/build/cc/gcc.sh Tue Nov 19 14:44:02 2013 +0800 @@ -164,6 +164,7 @@ # lang_list : the list of languages to build : string : (empty) # build_libgcc : build libgcc 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_manuals : whether to build manuals or not : bool : no # cflags : cflags to use : string : (empty) @@ -173,6 +174,7 @@ local mode local build_libgcc=no local build_libstdcxx=no + local build_libgfortran=no local build_staticlinked=no local build_manuals=no local host @@ -457,6 +459,12 @@ core_targets+=( target-libstdc++-v3 ) fi + if [ "${build_libgfortran}" = "yes" \ + -a "${CT_CC_LANG_FORTRAN}" = "y" \ + ]; then + core_targets+=( target-libgfortran ) + fi + CT_DoLog EXTRA "Building gcc" CT_DoExecLog ALL make ${JOBSFLAGS} "${core_targets[@]/#/all-}" @@ -521,6 +529,7 @@ build_final_opts+=( "mode=baremetal" ) build_final_opts+=( "build_libgcc=yes" ) build_final_opts+=( "build_libstdcxx=yes" ) + build_final_opts+=( "build_libgfortran=yes" ) if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then build_final_opts+=( "build_staticlinked=yes" ) fi @@ -557,6 +566,7 @@ final_opts+=( "mode=baremetal" ) final_opts+=( "build_libgcc=yes" ) final_opts+=( "build_libstdcxx=yes" ) + final_opts+=( "build_libgfortran=yes" ) if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then final_opts+=( "build_staticlinked=yes" ) fi