# HG changeset patch # User Yann Diorcet # Date 1353625018 -3600 # Node ID bd172b161ff8bbb375119de22bdf1009a8480d0f # Parent 2af20cfd210bac338ec18d774458c84fd585ef07 cc: add a flag for skipping core passes It is used for skipping unnecessary compilation steps when the libc doesn't need to be compiled (eg. when we do not use a C library). Signed-off-by: Yann Diorcet Message-Id: <150eadb0117e697d79aa.1353625025@blackmint> Patchwork-Id: 201222 diff -r 2af20cfd210b -r bd172b161ff8 config/cc.in --- a/config/cc.in Thu Nov 22 19:43:26 2012 +0100 +++ b/config/cc.in Thu Nov 22 23:56:58 2012 +0100 @@ -8,6 +8,9 @@ config CC_VERSION string +config CC_CORE_PASSES_NEEDED + bool + source "config.gen/cc.in" config CC_SUPPORT_CXX diff -r 2af20cfd210b -r bd172b161ff8 config/libc/eglibc.in --- a/config/libc/eglibc.in Thu Nov 22 19:43:26 2012 +0100 +++ b/config/libc/eglibc.in Thu Nov 22 23:56:58 2012 +0100 @@ -4,6 +4,7 @@ ## ## select LIBC_SUPPORT_NPTL ## select LIBC_SUPPORT_LINUXTHREADS +## select CC_CORE_PASSES_NEEDED ## ## help EGLIBC (Embedded GLIBC) is a variant of the standard GNU GLIBC ## help that is designed to work well on embedded systems. EGLIBC strives diff -r 2af20cfd210b -r bd172b161ff8 config/libc/glibc.in --- a/config/libc/glibc.in Thu Nov 22 19:43:26 2012 +0100 +++ b/config/libc/glibc.in Thu Nov 22 23:56:58 2012 +0100 @@ -3,6 +3,7 @@ ## depends on ! WINDOWS && ! BARE_METAL && ARCH_USE_MMU ## ## select LIBC_SUPPORT_NPTL +## select CC_CORE_PASSES_NEEDED ## ## help The de-facto standard for Linux distributions. ## help Feature-rich, but large... Most usefull for desktop-like systems. diff -r 2af20cfd210b -r bd172b161ff8 config/libc/mingw.in --- a/config/libc/mingw.in Thu Nov 22 19:43:26 2012 +0100 +++ b/config/libc/mingw.in Thu Nov 22 23:56:58 2012 +0100 @@ -3,6 +3,7 @@ ## depends on WINDOWS ## ## select LIBC_SUPPORT_WIN32THREADS +## select CC_CORE_PASSES_NEEDED ## ## help The de-facto standard for Mingw distributions. diff -r 2af20cfd210b -r bd172b161ff8 config/libc/newlib.in --- a/config/libc/newlib.in Thu Nov 22 19:43:26 2012 +0100 +++ b/config/libc/newlib.in Thu Nov 22 23:56:58 2012 +0100 @@ -3,6 +3,7 @@ ## depends on BARE_METAL ## ## select LIBC_SUPPORT_THREADS_NONE +## select CC_CORE_PASSES_NEEDED ## ## help Newlib is a C library intended for use on embedded systems. It is a ## help conglomeration of several library parts, all under free software diff -r 2af20cfd210b -r bd172b161ff8 config/libc/uClibc.in --- a/config/libc/uClibc.in Thu Nov 22 19:43:26 2012 +0100 +++ b/config/libc/uClibc.in Thu Nov 22 23:56:58 2012 +0100 @@ -4,6 +4,7 @@ ## ## select LIBC_SUPPORT_LINUXTHREADS ## select LIBC_SUPPORT_THREADS_NONE +## select CC_CORE_PASSES_NEEDED ## ## help The de-facto standard for embeded linux systems. ## help diff -r 2af20cfd210b -r bd172b161ff8 scripts/build/cc/gcc.sh --- a/scripts/build/cc/gcc.sh Thu Nov 22 19:43:26 2012 +0100 +++ b/scripts/build/cc/gcc.sh Thu Nov 22 23:56:58 2012 +0100 @@ -83,6 +83,10 @@ do_cc_core_pass_1() { local -a core_opts + if [ "${CT_CC_CORE_PASSES_NEEDED}" != "y" ]; then + return 0 + fi + core_opts+=( "mode=static" ) core_opts+=( "host=${CT_BUILD}" ) core_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" ) @@ -104,6 +108,10 @@ do_cc_core_pass_2() { local -a core_opts + if [ "${CT_CC_CORE_PASSES_NEEDED}" != "y" ]; then + return 0 + fi + # Common options: core_opts+=( "host=${CT_BUILD}" ) core_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )