diff mbox

Added a flag for skipping core passes

Message ID 150eadb0117e697d79aa.1353625025@blackmint
State Accepted
Commit bd172b161ff8
Headers show

Commit Message

Yann Diorcet Nov. 22, 2012, 10:57 p.m. UTC
# HG changeset patch
# User Yann Diorcet <diorcet.yann@gmail.com>
# Date 1353625018 -3600
# Node ID 150eadb0117e697d79aa35cf523a5c851817e2db
# Parent  2af20cfd210bac338ec18d774458c84fd585ef07
Added a flag for skipping core passes.
It is used for skipping unnecessary compilation steps when the libc doesn't need
to be compiled.

cc: add CC_CORE_PASSES_NEEDED flag
libc: all libc select CC_CORE_PASSES_NEEDED
script: skip cc1 and cc2 if CT_CC_CORE_PASSES_NEEDED is selected

Signed-off-by: Yann Diorcet <diorcet.yann@gmail.com>


--
For unsubscribe information see http://sourceware.org/lists.html#faq

Comments

Yann E. MORIN Nov. 24, 2012, 5:07 p.m. UTC | #1
Yann, All,

Your patch:
    cc: add a flag for skipping core passes

has been applied as: #bd172b161ff8
    http://crosstool-ng.org/hg/crosstool-ng/rev/bd172b161ff8

Thank you!

Regards,
Yann E. MORIN.



--
For unsubscribe information see http://sourceware.org/lists.html#faq
diff mbox

Patch

diff -r 2af20cfd210b -r 150eadb0117e 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 150eadb0117e 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 150eadb0117e 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 150eadb0117e 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 150eadb0117e 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 150eadb0117e 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 150eadb0117e 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
@@ -82,6 +82,10 @@ 
 # Core gcc pass 1
 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}" )
@@ -103,6 +107,10 @@ 
 # Core gcc pass 2
 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}" )