From e9920217e875a18b0207d6a3e5f4df8a6bae58a9 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Thu, 22 Nov 2012 23:56:58 +0100 Subject: 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 --git a/config/cc.in b/config/cc.in index 680afb9..d244e99 100644 --- a/config/cc.in +++ b/config/cc.in @@ -8,6 +8,9 @@ config CC config CC_VERSION string +config CC_CORE_PASSES_NEEDED + bool + source "config.gen/cc.in" config CC_SUPPORT_CXX diff --git a/config/libc/eglibc.in b/config/libc/eglibc.in index 586b234..4f6ed12 100644 --- a/config/libc/eglibc.in +++ b/config/libc/eglibc.in @@ -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 --git a/config/libc/glibc.in b/config/libc/glibc.in index e65c22b..70780a3 100644 --- a/config/libc/glibc.in +++ b/config/libc/glibc.in @@ -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 --git a/config/libc/mingw.in b/config/libc/mingw.in index fddf1ed..7e27ae0 100644 --- a/config/libc/mingw.in +++ b/config/libc/mingw.in @@ -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 --git a/config/libc/newlib.in b/config/libc/newlib.in index 8350fba..26eccd7 100644 --- a/config/libc/newlib.in +++ b/config/libc/newlib.in @@ -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 --git a/config/libc/uClibc.in b/config/libc/uClibc.in index dec99d1..2ca056b 100644 --- a/config/libc/uClibc.in +++ b/config/libc/uClibc.in @@ -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 --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index d7ba606..36a1a90 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -83,6 +83,10 @@ cc_gcc_lang_list() { 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_1() { 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}" ) -- cgit v0.10.2-6-g49f6