From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Cody Schafer <dev@codyps.com>
Cc: crossgcc@sourceware.org
Subject: Re: [PATCH] Allow CC_EXTRA_CONFIG_ARRAY on baremetal
Date: Sun, 11 May 2014 12:39:00 -0000 [thread overview]
Message-ID: <20140511123938.GC3428@free.fr> (raw)
In-Reply-To: <20140511110743.GA3428@free.fr>
Cody, All,
On 2014-05-11 13:07 +0200, Yann E. MORIN spake thusly:
> On 2014-05-09 19:14 -0700, Cody Schafer spake thusly:
> > # HG changeset patch
> > # User Cody Schafer <dev@codyps.com>
> > # Date 1399688029 25200
> > # Fri May 09 19:13:49 2014 -0700
> > # Node ID 22181e546ba746202489cda96887be0356be19c1
> > # Parent 2cc5b5a97e93a0f28a5801b3da34dc00aea74bba
> > Allow CC_EXTRA_CONFIG_ARRAY on baremetal
> >
> > diff --git a/config/cc/gcc.in.2 b/config/cc/gcc.in.2
> > --- a/config/cc/gcc.in.2
> > +++ b/config/cc/gcc.in.2
> > @@ -29,7 +29,6 @@
> > string
> > prompt "gcc extra config"
> > default ""
> > - depends on ! BARE_METAL
> > help
> > Extra flags to pass onto ./configure when configuring gcc.
>
> Although I understand the idea behind this change, I'm afraid it will
> not do what you expect it to do.
>
> The bare-metal compiler is built using the core backend, not the final
> backend. Thus it uses the CC_CORE_EXTRA_CONFIG_ARRAY variable.
>
> Setting the CC_EXTRA_CONFIG_ARRAY variable will thus havve no impact on
> the bare-metal compiler.
>
> I'll see what we can do, but it will be a bit more involved than just
> enabling this variable in the menuconfig.
What about this?
diff --git a/config/cc/gcc.in.2 b/config/cc/gcc.in.2
--- a/config/cc/gcc.in.2
+++ b/config/cc/gcc.in.2
@@ -15,6 +15,7 @@
string
prompt "Core gcc extra config"
default ""
+ depends on CC_CORE_PASS_1_NEEDED || CC_CORE_PASS_2_NEEDED
help
Extra flags to pass onto ./configure when configuring the core gcc.
@@ -29,7 +30,6 @@
string
prompt "gcc extra config"
default ""
- depends on ! BARE_METAL
help
Extra flags to pass onto ./configure when configuring gcc.
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh
--- a/scripts/build/cc/gcc.sh
+++ b/scripts/build/cc/gcc.sh
@@ -188,6 +188,7 @@
local -a extra_config
local -a core_LDFLAGS
local -a core_targets
+ local -a extra_user_config
local arg
for arg in "$@"; do
@@ -201,17 +202,20 @@
extra_config+=("--with-newlib")
extra_config+=("--enable-threads=no")
extra_config+=("--disable-shared")
+ extra_user_config=( "${CT_CC_CORE_EXTRA_CONFIG_ARRAY[@]}" )
copy_headers=y # For baremetal, as there's no headers to copy,
# we copy an empty directory. So, who
# cares?
;;
shared)
extra_config+=("--enable-shared")
+ extra_user_config=( "${CT_CC_CORE_EXTRA_CONFIG_ARRAY[@]}" )
copy_headers=y
;;
baremetal)
extra_config+=("--with-newlib")
extra_config+=("--enable-threads=no")
extra_config+=("--disable-shared")
+ extra_user_config=( "${CT_CC_EXTRA_CONFIG_ARRAY[@]}" )
copy_headers=n
;;
*)
@@ -391,7 +395,7 @@
${CC_CORE_SYSROOT_ARG} \
"${extra_config[@]}" \
--enable-languages="${lang_list}" \
- "${CT_CC_CORE_EXTRA_CONFIG_ARRAY[@]}"
+ "${extra_user_config[@]}"
if [ "${build_libgcc}" = "yes" ]; then
# HACK: we need to override SHLIB_LC from
# gcc/config/t-slibgcc-elf-ver or
It seems to be doing what you expected, right?
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
next prev parent reply other threads:[~2014-05-11 12:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-10 2:14 Cody Schafer
2014-05-11 0:16 ` Cody P Schafer
2014-05-11 11:07 ` Yann E. MORIN
2014-05-11 12:39 ` Yann E. MORIN [this message]
2014-05-11 20:42 ` Cody P Schafer
2014-05-11 17:58 ` cc/gcc: allow " Yann E. MORIN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140511123938.GC3428@free.fr \
--to=yann.morin.1998@free.fr \
--cc=crossgcc@sourceware.org \
--cc=dev@codyps.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).