* [PATCH] gcc: skip core pass 1 when it is unnecessary
@ 2014-02-26 16:00 Trevor Woerner
0 siblings, 0 replies; 6+ messages in thread
From: Trevor Woerner @ 2014-02-26 16:00 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: crossgcc, patches
# HG changeset patch
# User Trevor Woerner <trevor.woerner@linaro.org>
# Date 1393430367 18000
# Wed Feb 26 10:59:27 2014 -0500
# Node ID 76f3ac3697f23244c6246e87081ba452230d35f1
# Parent c727adf1b7bd2c1e891db512871dbe7b26797fa6
gcc: skip core pass 1 when it is unnecessary
If neither Linux headers nor libc start files are required, skip gcc's core
pass 1 since the build will simply move from pass 1 to pass 2 without doing
any work in between.
diff -r c727adf1b7bd -r 76f3ac3697f2 scripts/build/cc/gcc.sh
--- a/scripts/build/cc/gcc.sh Tue Feb 25 13:34:48 2014 -0500
+++ b/scripts/build/cc/gcc.sh Wed Feb 26 10:59:27 2014 -0500
@@ -88,6 +88,14 @@
return 0
fi
+ # skip gcc pass 1 if there are no Linux kernel headers
+ # nor libc start files to build/process
+ if [ "${CT_LIBC}" = "none" -o "${CT_LIBC}" = "newlib" ]; then
+ if [ "${CT_BARE_METAL}" = "y" ]; then
+ return 0
+ fi
+ fi
+
core_opts+=( "mode=static" )
core_opts+=( "host=${CT_BUILD}" )
core_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" )
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gcc: skip core pass 1 when it is unnecessary
2014-05-05 21:42 ` Yann E. MORIN
@ 2014-05-06 3:25 ` Trevor Woerner
0 siblings, 0 replies; 6+ messages in thread
From: Trevor Woerner @ 2014-05-06 3:25 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: crossgcc, patches
Hi Yann, All,
On 05/05/14 17:42, Yann E. MORIN wrote:
> Trevor, All,
>
> On 2014-02-26 11:15 -0500, Trevor Woerner spake thusly:
>> # HG changeset patch
>> # User Trevor Woerner <trevor.woerner@linaro.org>
>> # Date 1393431218 18000
>> # Wed Feb 26 11:13:38 2014 -0500
>> # Node ID e9f99d9bd902414c8e3f3c6fc36c0fc67f3a7593
>> # Parent c727adf1b7bd2c1e891db512871dbe7b26797fa6
>> gcc: skip core pass 1 when it is unnecessary
> I've pushed a different set of changes that should do what you want,
> now:
> cc: add options to differentiate the need for pass-1 and pass-2
> cc/gcc: only build required core passes
> libc/newlib: only requires core pass-2
>
> Thanks for the report! :-)
Thank you :-) I'll take a look shortly.
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gcc: skip core pass 1 when it is unnecessary
2014-02-26 16:15 Trevor Woerner
2014-05-05 20:10 ` Yann E. MORIN
@ 2014-05-05 21:42 ` Yann E. MORIN
2014-05-06 3:25 ` Trevor Woerner
1 sibling, 1 reply; 6+ messages in thread
From: Yann E. MORIN @ 2014-05-05 21:42 UTC (permalink / raw)
To: Trevor Woerner; +Cc: crossgcc, patches
Trevor, All,
On 2014-02-26 11:15 -0500, Trevor Woerner spake thusly:
> # HG changeset patch
> # User Trevor Woerner <trevor.woerner@linaro.org>
> # Date 1393431218 18000
> # Wed Feb 26 11:13:38 2014 -0500
> # Node ID e9f99d9bd902414c8e3f3c6fc36c0fc67f3a7593
> # Parent c727adf1b7bd2c1e891db512871dbe7b26797fa6
> gcc: skip core pass 1 when it is unnecessary
>
> If neither the Linux headers nor the libc start files are required, skip gcc's
> core pass 1 since the build will simply move from pass 1 to pass 2 without
> doing any work in between.
>
> Signed-off-by: Trevor Woerner <trevor.woerner@linaro.org>
>
> diff -r c727adf1b7bd -r e9f99d9bd902 scripts/build/cc/gcc.sh
> --- a/scripts/build/cc/gcc.sh Tue Feb 25 13:34:48 2014 -0500
> +++ b/scripts/build/cc/gcc.sh Wed Feb 26 11:13:38 2014 -0500
> @@ -88,6 +88,14 @@
> return 0
> fi
>
> + # skip gcc pass 1 if there are no Linux kernel headers
> + # nor libc start files to build/process
> + if [ "${CT_LIBC}" = "none" -o "${CT_LIBC}" = "newlib" ]; then
> + if [ "${CT_BARE_METAL}" = "y" ]; then
> + return 0
> + fi
> + fi
I've pushed a different set of changes that should do what you want,
now:
cc: add options to differentiate the need for pass-1 and pass-2
cc/gcc: only build required core passes
libc/newlib: only requires core pass-2
Thanks for the report! :-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gcc: skip core pass 1 when it is unnecessary
2014-05-05 20:10 ` Yann E. MORIN
@ 2014-05-05 20:59 ` Yann E. MORIN
0 siblings, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2014-05-05 20:59 UTC (permalink / raw)
To: Trevor Woerner; +Cc: crossgcc, patches
Trevor, All,
On 2014-05-05 22:09 +0200, Yann E. MORIN spake thusly:
> On 2014-02-26 11:15 -0500, Trevor Woerner spake thusly:
> > # HG changeset patch
> > # User Trevor Woerner <trevor.woerner@linaro.org>
> > # Date 1393431218 18000
> > # Wed Feb 26 11:13:38 2014 -0500
> > # Node ID e9f99d9bd902414c8e3f3c6fc36c0fc67f3a7593
> > # Parent c727adf1b7bd2c1e891db512871dbe7b26797fa6
> > gcc: skip core pass 1 when it is unnecessary
> >
> > If neither the Linux headers nor the libc start files are required, skip gcc's
> > core pass 1 since the build will simply move from pass 1 to pass 2 without
> > doing any work in between.
> >
> > Signed-off-by: Trevor Woerner <trevor.woerner@linaro.org>
> >
> > diff -r c727adf1b7bd -r e9f99d9bd902 scripts/build/cc/gcc.sh
> > --- a/scripts/build/cc/gcc.sh Tue Feb 25 13:34:48 2014 -0500
> > +++ b/scripts/build/cc/gcc.sh Wed Feb 26 11:13:38 2014 -0500
> > @@ -88,6 +88,14 @@
> > return 0
> > fi
> >
> > + # skip gcc pass 1 if there are no Linux kernel headers
> > + # nor libc start files to build/process
> > + if [ "${CT_LIBC}" = "none" -o "${CT_LIBC}" = "newlib" ]; then
> > + if [ "${CT_BARE_METAL}" = "y" ]; then
> > + return 0
>
> There is already an escape-point a few lines above:
> if [ "${CT_CC_CORE_PASSES_NEEDED}" != "y" ]; then
> return 0
> fi
>
> Also, LIBC == none or LIBC == newlib is only possible for bare-metal to
> start with. So, this would be equivalent to not select CC_CORE_PASSES_NEEDED
> for newlib, right?
Ah, no, in fact. CC_CORE_PASSES_NEEDED just disables both passes, when
we only want to disable pass-1.
I'll see what we can do...
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gcc: skip core pass 1 when it is unnecessary
2014-02-26 16:15 Trevor Woerner
@ 2014-05-05 20:10 ` Yann E. MORIN
2014-05-05 20:59 ` Yann E. MORIN
2014-05-05 21:42 ` Yann E. MORIN
1 sibling, 1 reply; 6+ messages in thread
From: Yann E. MORIN @ 2014-05-05 20:10 UTC (permalink / raw)
To: Trevor Woerner; +Cc: crossgcc, patches
Trevor, All,
Sorry for the delay... :-(
On 2014-02-26 11:15 -0500, Trevor Woerner spake thusly:
> # HG changeset patch
> # User Trevor Woerner <trevor.woerner@linaro.org>
> # Date 1393431218 18000
> # Wed Feb 26 11:13:38 2014 -0500
> # Node ID e9f99d9bd902414c8e3f3c6fc36c0fc67f3a7593
> # Parent c727adf1b7bd2c1e891db512871dbe7b26797fa6
> gcc: skip core pass 1 when it is unnecessary
>
> If neither the Linux headers nor the libc start files are required, skip gcc's
> core pass 1 since the build will simply move from pass 1 to pass 2 without
> doing any work in between.
>
> Signed-off-by: Trevor Woerner <trevor.woerner@linaro.org>
>
> diff -r c727adf1b7bd -r e9f99d9bd902 scripts/build/cc/gcc.sh
> --- a/scripts/build/cc/gcc.sh Tue Feb 25 13:34:48 2014 -0500
> +++ b/scripts/build/cc/gcc.sh Wed Feb 26 11:13:38 2014 -0500
> @@ -88,6 +88,14 @@
> return 0
> fi
>
> + # skip gcc pass 1 if there are no Linux kernel headers
> + # nor libc start files to build/process
> + if [ "${CT_LIBC}" = "none" -o "${CT_LIBC}" = "newlib" ]; then
> + if [ "${CT_BARE_METAL}" = "y" ]; then
> + return 0
There is already an escape-point a few lines above:
if [ "${CT_CC_CORE_PASSES_NEEDED}" != "y" ]; then
return 0
fi
Also, LIBC == none or LIBC == newlib is only possible for bare-metal to
start with. So, this would be equivalent to not select CC_CORE_PASSES_NEEDED
for newlib, right?
Regards,
Yann E. MORIN.
> + fi
> + fi
> +
> core_opts+=( "mode=static" )
> core_opts+=( "host=${CT_BUILD}" )
> core_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" )
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] gcc: skip core pass 1 when it is unnecessary
@ 2014-02-26 16:15 Trevor Woerner
2014-05-05 20:10 ` Yann E. MORIN
2014-05-05 21:42 ` Yann E. MORIN
0 siblings, 2 replies; 6+ messages in thread
From: Trevor Woerner @ 2014-02-26 16:15 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: crossgcc, patches
# HG changeset patch
# User Trevor Woerner <trevor.woerner@linaro.org>
# Date 1393431218 18000
# Wed Feb 26 11:13:38 2014 -0500
# Node ID e9f99d9bd902414c8e3f3c6fc36c0fc67f3a7593
# Parent c727adf1b7bd2c1e891db512871dbe7b26797fa6
gcc: skip core pass 1 when it is unnecessary
If neither the Linux headers nor the libc start files are required, skip gcc's
core pass 1 since the build will simply move from pass 1 to pass 2 without
doing any work in between.
Signed-off-by: Trevor Woerner <trevor.woerner@linaro.org>
diff -r c727adf1b7bd -r e9f99d9bd902 scripts/build/cc/gcc.sh
--- a/scripts/build/cc/gcc.sh Tue Feb 25 13:34:48 2014 -0500
+++ b/scripts/build/cc/gcc.sh Wed Feb 26 11:13:38 2014 -0500
@@ -88,6 +88,14 @@
return 0
fi
+ # skip gcc pass 1 if there are no Linux kernel headers
+ # nor libc start files to build/process
+ if [ "${CT_LIBC}" = "none" -o "${CT_LIBC}" = "newlib" ]; then
+ if [ "${CT_BARE_METAL}" = "y" ]; then
+ return 0
+ fi
+ fi
+
core_opts+=( "mode=static" )
core_opts+=( "host=${CT_BUILD}" )
core_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" )
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-05-06 3:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-26 16:00 [PATCH] gcc: skip core pass 1 when it is unnecessary Trevor Woerner
2014-02-26 16:15 Trevor Woerner
2014-05-05 20:10 ` Yann E. MORIN
2014-05-05 20:59 ` Yann E. MORIN
2014-05-05 21:42 ` Yann E. MORIN
2014-05-06 3:25 ` Trevor Woerner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).