public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH, newlib/ARM] Fix cpp invocation for C++ in nano spec
@ 2017-02-07 16:58 Thomas Preudhomme
  2017-02-13  8:20 ` Corinna Vinschen
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Preudhomme @ 2017-02-07 16:58 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 525 bytes --]

Hi,

The changes in c028685518a261f6d0dab0d7ed15f9570ab9b3d0 to use
newlib-nano's include directory work for cc1 but not cc1plus. cc1plus
comes with its own cpp spec which does not have a name attached to it.

This patch uses the renaming trick on cpp_options instead of cpp, as
cpp_options is used both by cc1 and cc1plus.


Tested with a small C program including string.h. Preprocess annotations show 
that both when using -x c and -x c++ newlib'nano's newlib.h gets chosen.

Is this ok for master?

Best regards,

Thomas

[-- Attachment #2: fix_nano_spec_cpp_invocation.patch --]
[-- Type: text/x-patch, Size: 1168 bytes --]

From ae65c363338e95148e222dc88c31d12ad4749c3b Mon Sep 17 00:00:00 2001
From: Thomas Preud'homme <thomas.preudhomme@arm.com>
Date: Mon, 6 Feb 2017 15:51:02 +0000
Subject: [PATCH] [PATCH, newlib/ARM] Fix cpp invocation for C++ in nano spec

Hi,

The changes in c028685518a261f6d0dab0d7ed15f9570ab9b3d0 to use
newlib-nano's include directory work for cc1 but not cc1plus. cc1plus
comes with its own cpp spec which does not have a name attached to it.

This patch uses the renaming trick on cpp_options instead of cpp, as
cpp_options is used both by cc1 and cc1plus.
---
 libgloss/arm/elf-nano.specs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libgloss/arm/elf-nano.specs b/libgloss/arm/elf-nano.specs
index 575f47d..324107e 100644
--- a/libgloss/arm/elf-nano.specs
+++ b/libgloss/arm/elf-nano.specs
@@ -1,9 +1,9 @@
 %rename link                nano_link
 %rename link_gcc_c_sequence                nano_link_gcc_c_sequence
-%rename cpp		nano_cpp
+%rename cpp_options		nano_cpp_options
 
-*cpp:
--isystem =/include/newlib-nano %(nano_cpp)
+*cpp_options:
+-isystem =/include/newlib-nano %(nano_cpp_options)
 
 *nano_libc:
 -lc_nano
-- 
1.9.1


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

* Re: [PATCH, newlib/ARM] Fix cpp invocation for C++ in nano spec
  2017-02-07 16:58 [PATCH, newlib/ARM] Fix cpp invocation for C++ in nano spec Thomas Preudhomme
@ 2017-02-13  8:20 ` Corinna Vinschen
  0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2017-02-13  8:20 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 675 bytes --]

On Feb  7 16:58, Thomas Preudhomme wrote:
> Hi,
> 
> The changes in c028685518a261f6d0dab0d7ed15f9570ab9b3d0 to use
> newlib-nano's include directory work for cc1 but not cc1plus. cc1plus
> comes with its own cpp spec which does not have a name attached to it.
> 
> This patch uses the renaming trick on cpp_options instead of cpp, as
> cpp_options is used both by cc1 and cc1plus.
> 
> 
> Tested with a small C program including string.h. Preprocess annotations
> show that both when using -x c and -x c++ newlib'nano's newlib.h gets
> chosen.
> 
> Is this ok for master?

Pushed.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2017-02-13  8:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-07 16:58 [PATCH, newlib/ARM] Fix cpp invocation for C++ in nano spec Thomas Preudhomme
2017-02-13  8:20 ` Corinna Vinschen

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