public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/54560] New: g++ with --sysroot and -save-temps don't play nicely
@ 2012-09-12 18:20 ianw at vmware dot com
  2012-10-01 16:20 ` [Bug c++/54560] " paolo.carlini at oracle dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ianw at vmware dot com @ 2012-09-12 18:20 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54560

             Bug #: 54560
           Summary: g++ with --sysroot and -save-temps don't play nicely
    Classification: Unclassified
           Product: gcc
           Version: 4.6.3
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ianw@vmware.com


We have a compiler built with a sysroot of "/dev/null", thus it always requires
a --sysroot argument.  A developer noticed that g++'s -save-temps option
doesn't work with this toolchain setup.

What happens is it gets to the stage of turning the .ii file in to the asm file
and cc1plus fails

---
/usr/bin/../libexec/gcc/x86_64-vmk-linux-gnu/4.6.3/cc1plus -fpreprocessed
foo.ii -quiet -dumpbase foo.cpp -m32 -march=i686 -auxbase-strip foo.o -g -O1
-Wall -Werror -Wno-unused-but-set-variable -Wno-conversion-null
-Wno-non-virtual-dtor -version -fwrapv -fno-working-directory -funwind-tables
-fasynchronous-unwind-tables -fstack-protector -fPIC -fno-strict-aliasing -o
foo.s
GNU C++ (GCC) version 4.6.3 (x86_64-vmk-linux-gnu)
    compiled by GNU C version 4.4.3, GMP version 5.0.4, MPFR version 2.4.2, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
cc1plus: error: /dev/null/usr/local/include: Not a directory
cc1plus: error: /dev/null/usr/include: Not a directory
GNU C++ (GCC) version 4.6.3 (x86_64-vmk-linux-gnu)
    compiled by GNU C version 4.4.3, GMP version 5.0.4, MPFR version 2.4.2, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
---

It's using the pre-processed source, so my feeling is that it doesn't require
the sysroot argument here.  Manually adding a -isysroot argument to *any* valid
directory (doesn't have to be a directory with the correct sysroot hierarchy in
it, e.g. /tmp) makes it work; so presumably the problem here is that
"/dev/null/usr/include" doesn't exist.

A quick search has not revealed to me where cc1plus is trying to access this
directory...

Another option might be to add a %I to the spec where this gets emitted [1] so
that a valid -isysroot value gets passed?

[1]
http://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/cp/lang-specs.h;h=a73aba3cdc0dd970b068ce9172acdfeb20fbe7f5;hb=HEAD


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

* [Bug c++/54560] g++ with --sysroot and -save-temps don't play nicely
  2012-09-12 18:20 [Bug c++/54560] New: g++ with --sysroot and -save-temps don't play nicely ianw at vmware dot com
@ 2012-10-01 16:20 ` paolo.carlini at oracle dot com
  2012-10-22 20:24 ` elesueur at vmware dot com
  2012-11-27 21:26 ` elesueur at vmware dot com
  2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-01 16:20 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54560

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bonzini at gnu dot org

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-01 16:20:27 UTC ---
First blush, I don't see anything C++ specific here. Paolo, can you help
triaging this? Thanks in advance..


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

* [Bug c++/54560] g++ with --sysroot and -save-temps don't play nicely
  2012-09-12 18:20 [Bug c++/54560] New: g++ with --sysroot and -save-temps don't play nicely ianw at vmware dot com
  2012-10-01 16:20 ` [Bug c++/54560] " paolo.carlini at oracle dot com
@ 2012-10-22 20:24 ` elesueur at vmware dot com
  2012-11-27 21:26 ` elesueur at vmware dot com
  2 siblings, 0 replies; 4+ messages in thread
From: elesueur at vmware dot com @ 2012-10-22 20:24 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54560

Etienne Le Sueur <elesueur at vmware dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |elesueur at vmware dot com

--- Comment #2 from Etienne Le Sueur <elesueur at vmware dot com> 2012-10-22 20:24:44 UTC ---
(In reply to comment #0) 
> Another option might be to add a %I to the spec where this gets emitted [1] so
> that a valid -isysroot value gets passed?
> 
> [1]
> http://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/cp/lang-specs.h;h=a73aba3cdc0dd970b068ce9172acdfeb20fbe7f5;hb=HEAD

That seems to work. Paolo, any chance this would get into 4.6.4 (if there is
such a release planned)?


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

* [Bug c++/54560] g++ with --sysroot and -save-temps don't play nicely
  2012-09-12 18:20 [Bug c++/54560] New: g++ with --sysroot and -save-temps don't play nicely ianw at vmware dot com
  2012-10-01 16:20 ` [Bug c++/54560] " paolo.carlini at oracle dot com
  2012-10-22 20:24 ` elesueur at vmware dot com
@ 2012-11-27 21:26 ` elesueur at vmware dot com
  2 siblings, 0 replies; 4+ messages in thread
From: elesueur at vmware dot com @ 2012-11-27 21:26 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54560

--- Comment #3 from Etienne Le Sueur <elesueur at vmware dot com> 2012-11-27 21:25:47 UTC ---
Ping. Any chance we can get this triaged? It breaks both ccache and distcc...


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

end of thread, other threads:[~2012-11-27 21:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-12 18:20 [Bug c++/54560] New: g++ with --sysroot and -save-temps don't play nicely ianw at vmware dot com
2012-10-01 16:20 ` [Bug c++/54560] " paolo.carlini at oracle dot com
2012-10-22 20:24 ` elesueur at vmware dot com
2012-11-27 21:26 ` elesueur at vmware dot com

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