public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Pass CXXFLAGS to binutils/gold
@ 2011-10-05  1:21 Michael Hope
  2011-10-05  2:15 ` Mike Frysinger
  2011-10-05 21:58 ` Yann E. MORIN
  0 siblings, 2 replies; 6+ messages in thread
From: Michael Hope @ 2011-10-05  1:21 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

# HG changeset patch
# User Michael Hope <michael.hope@linaro.org>
# Date 1317777345 -46800
# Node ID f051032a1070eda28557dd738c35446b44787217
# Parent  a56c84719b61620308d4a579991b98f936e7abf7
Pass CXXFLAGS to binutils/gold.

The GOLD linker is written in C++.  Pass CT_CFLAGS_FOR_HOST as
CXXFLAGS to configure so that any host specific flags are passed
through.

It feels a bit funny passing CFLAGS as CXXFLAGS, but the PPL and GCC
target rules already do the same.

Signed-off-by: Michael Hope <michael.hope@linaro.org>

diff -r a56c84719b61 -r f051032a1070 scripts/build/binutils/binutils.sh
--- a/scripts/build/binutils/binutils.sh	Wed Oct 05 11:16:49 2011 +1300
+++ b/scripts/build/binutils/binutils.sh	Wed Oct 05 14:15:45 2011 +1300
@@ -69,6 +69,7 @@
 
     CT_DoExecLog CFG                                            \
     CFLAGS="${CT_CFLAGS_FOR_HOST}"                              \
+    CXXFLAGS="${CT_CFLAGS_FOR_HOST}"                            \
     "${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}/configure"   \
         --build=${CT_BUILD}                                     \
         --host=${CT_HOST}                                       \

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Pass CXXFLAGS to binutils/gold
  2011-10-05  1:21 [PATCH] Pass CXXFLAGS to binutils/gold Michael Hope
@ 2011-10-05  2:15 ` Mike Frysinger
  2011-10-05 21:31   ` Michael Hope
  2011-10-05 21:58 ` Yann E. MORIN
  1 sibling, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2011-10-05  2:15 UTC (permalink / raw)
  To: crossgcc; +Cc: Michael Hope, Yann E. MORIN

[-- Attachment #1: Type: Text/Plain, Size: 283 bytes --]

On Tuesday 04 October 2011 21:21:21 Michael Hope wrote:
> It feels a bit funny passing CFLAGS as CXXFLAGS, but the PPL and GCC
> target rules already do the same.

especially because there are flags valid for the C compiler which are not valid 
for the C++ compiler ...
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Pass CXXFLAGS to binutils/gold
  2011-10-05  2:15 ` Mike Frysinger
@ 2011-10-05 21:31   ` Michael Hope
  2011-10-05 21:45     ` Yann E. MORIN
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Hope @ 2011-10-05 21:31 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: crossgcc, Yann E. MORIN

On Wed, Oct 5, 2011 at 3:14 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Tuesday 04 October 2011 21:21:21 Michael Hope wrote:
>> It feels a bit funny passing CFLAGS as CXXFLAGS, but the PPL and GCC
>> target rules already do the same.
>
> especially because there are flags valid for the C compiler which are not valid
> for the C++ compiler ...

Yip.  There's a good amount of deliberate overlap between the gcc,
g++, and gfortran flags.  In crosstool-NG it's currently only used for
-pipe.

-- Michael

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Pass CXXFLAGS to binutils/gold
  2011-10-05 21:31   ` Michael Hope
@ 2011-10-05 21:45     ` Yann E. MORIN
  2011-10-06  3:07       ` Michael Hope
  0 siblings, 1 reply; 6+ messages in thread
From: Yann E. MORIN @ 2011-10-05 21:45 UTC (permalink / raw)
  To: Michael Hope; +Cc: Mike Frysinger, crossgcc

Michael, Mike, All,

On Wednesday 05 October 2011 23:30:53 Michael Hope wrote:
> On Wed, Oct 5, 2011 at 3:14 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> > On Tuesday 04 October 2011 21:21:21 Michael Hope wrote:
> >> It feels a bit funny passing CFLAGS as CXXFLAGS, but the PPL and GCC
> >> target rules already do the same.
> >
> > especially because there are flags valid for the C compiler which are not
> > valid for the C++ compiler ...
> 
> Yip.  There's a good amount of deliberate overlap between the gcc,
> g++, and gfortran flags.  In crosstool-NG it's currently only used for
> -pipe.

Yes, it feels icky... But those flags are usually very limited in their
use; currently they're used only for '-pipe'.

However, with Michael's other patch, it becomes possible for the user to
pass arbitrary flags. But the use case is limited, and focuses on generic
flags. Eg. disabling SSP or fortify, which is documented in the help entry.

In this case, it's pretty much harmless, I guess...

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] Pass CXXFLAGS to binutils/gold
  2011-10-05  1:21 [PATCH] Pass CXXFLAGS to binutils/gold Michael Hope
  2011-10-05  2:15 ` Mike Frysinger
@ 2011-10-05 21:58 ` Yann E. MORIN
  1 sibling, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2011-10-05 21:58 UTC (permalink / raw)
  To: crossgcc; +Cc: Michael Hope

Michael, All,

On Wednesday 05 October 2011 03:21:21 Michael Hope wrote:
> # HG changeset patch
> # User Michael Hope <michael.hope@linaro.org>
> # Date 1317777345 -46800
> # Node ID f051032a1070eda28557dd738c35446b44787217
> # Parent  a56c84719b61620308d4a579991b98f936e7abf7
> Pass CXXFLAGS to binutils/gold.

Applied as #9cd87d279a99. Thank you!

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] Pass CXXFLAGS to binutils/gold
  2011-10-05 21:45     ` Yann E. MORIN
@ 2011-10-06  3:07       ` Michael Hope
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Hope @ 2011-10-06  3:07 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Mike Frysinger, crossgcc

On Thu, Oct 6, 2011 at 10:45 AM, Yann E. MORIN
<yann.morin.1998@anciens.enib.fr> wrote:
> Michael, Mike, All,
>
> On Wednesday 05 October 2011 23:30:53 Michael Hope wrote:
>> On Wed, Oct 5, 2011 at 3:14 PM, Mike Frysinger <vapier@gentoo.org> wrote:
>> > On Tuesday 04 October 2011 21:21:21 Michael Hope wrote:
>> >> It feels a bit funny passing CFLAGS as CXXFLAGS, but the PPL and GCC
>> >> target rules already do the same.
>> >
>> > especially because there are flags valid for the C compiler which are not
>> > valid for the C++ compiler ...
>>
>> Yip.  There's a good amount of deliberate overlap between the gcc,
>> g++, and gfortran flags.  In crosstool-NG it's currently only used for
>> -pipe.
>
> Yes, it feels icky... But those flags are usually very limited in their
> use; currently they're used only for '-pipe'.
>
> However, with Michael's other patch, it becomes possible for the user to
> pass arbitrary flags. But the use case is limited, and focuses on generic
> flags. Eg. disabling SSP or fortify, which is documented in the help entry.
>
> In this case, it's pretty much harmless, I guess...

I called the config item 'FLAGS' instead of CFLAGS and documented them
as going to both the C and C++ compiler.  For my particular (and may
other) use cases, there's no need to have a separate entry for C vs
C++.

-- Michael

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-10-06  3:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-05  1:21 [PATCH] Pass CXXFLAGS to binutils/gold Michael Hope
2011-10-05  2:15 ` Mike Frysinger
2011-10-05 21:31   ` Michael Hope
2011-10-05 21:45     ` Yann E. MORIN
2011-10-06  3:07       ` Michael Hope
2011-10-05 21:58 ` Yann E. MORIN

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).