public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/46334] New: C++ compiler gets g++ switch even if it isn't g++
@ 2010-11-06 16:45 jay.krell at cornell dot edu
  2010-11-07 23:08 ` [Bug other/46334] " jay.krell at cornell dot edu
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: jay.krell at cornell dot edu @ 2010-11-06 16:45 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: C++ compiler gets g++ switch even if it isn't g++
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jay.krell@cornell.edu


if C compiler is gcc and C++ compiler is not g++, C++ compiler gets g++ flags
(maybe redirect to autoconf?)

export CXX=/usr/bin/CC
gcc-4.5.1/configure -enable-build-with-cxx


 /usr/bin/CC -c  -g -DIN_GCC   -W -Wall -Wwrite-strings
-Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings   -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.5/gcc
-I../../gcc-4.5/gcc/. -I../../gcc-4.5/gcc/../include
-I../../gcc-4.5/gcc/../libcpp/include
-I/home/jkrell/dev2/cm3/m3-sys/m3cc/SOLsun/./gmp
-I/home/jkrell/dev2/cm3/m3-sys/m3cc/gcc-4.5/gmp 
-I../../gcc-4.5/gcc/../libdecnumber -I../../gcc-4.5/gcc/../libdecnumber/dpd
-I../libdecnumber   -I/usr/include/libelf  ../../gcc-4.5/gcc/df-core.c -o
df-core.o
CC: Warning: Option -W passed to ld, if ld is invoked, ignored otherwise
CC: Warning: Option -Wall passed to ld, if ld is invoked, ignored otherwise
CC: Warning: Option -Wwrite-strings passed to ld, if ld is invoked, ignored
otherwise
CC: Warning: Option -Wmissing-format-attribute passed to ld, if ld is invoked,
ignored otherwise
CC: Warning: Option -pedantic passed to ld, if ld is invoked, ignored otherwise
CC: Warning: Option -Wno-long-long passed to ld, if ld is invoked, ignored
otherwise
CC: Warning: Option -Wno-variadic-macros passed to ld, if ld is invoked,
ignored otherwise
CC: Warning: Option -Wno-overlength-strings passed to ld, if ld is invoked,
ignored otherwise
/usr/bin/CC -c  -g -DIN_GCC   -W -Wall -Wwrite-strings
-Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros


seems a bit off.

I'm trying now with CXX=CC, CC=cc.
The autoconf log is looking better.


 - Jay


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

* [Bug other/46334] C++ compiler gets g++ switch even if it isn't g++
  2010-11-06 16:45 [Bug other/46334] New: C++ compiler gets g++ switch even if it isn't g++ jay.krell at cornell dot edu
@ 2010-11-07 23:08 ` jay.krell at cornell dot edu
  2010-11-07 23:09 ` jay.krell at cornell dot edu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: jay.krell at cornell dot edu @ 2010-11-07 23:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jay <jay.krell at cornell dot edu> 2010-11-07 23:08:17 UTC ---
Created attachment 22315
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22315
toplevel config.log


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

* [Bug other/46334] C++ compiler gets g++ switch even if it isn't g++
  2010-11-06 16:45 [Bug other/46334] New: C++ compiler gets g++ switch even if it isn't g++ jay.krell at cornell dot edu
  2010-11-07 23:08 ` [Bug other/46334] " jay.krell at cornell dot edu
@ 2010-11-07 23:09 ` jay.krell at cornell dot edu
  2010-11-07 23:10 ` jay.krell at cornell dot edu
  2010-11-08  1:10 ` jay.krell at cornell dot edu
  3 siblings, 0 replies; 5+ messages in thread
From: jay.krell at cornell dot edu @ 2010-11-07 23:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jay <jay.krell at cornell dot edu> 2010-11-07 23:08:57 UTC ---
Created attachment 22316
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22316
libcpp config.log


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

* [Bug other/46334] C++ compiler gets g++ switch even if it isn't g++
  2010-11-06 16:45 [Bug other/46334] New: C++ compiler gets g++ switch even if it isn't g++ jay.krell at cornell dot edu
  2010-11-07 23:08 ` [Bug other/46334] " jay.krell at cornell dot edu
  2010-11-07 23:09 ` jay.krell at cornell dot edu
@ 2010-11-07 23:10 ` jay.krell at cornell dot edu
  2010-11-08  1:10 ` jay.krell at cornell dot edu
  3 siblings, 0 replies; 5+ messages in thread
From: jay.krell at cornell dot edu @ 2010-11-07 23:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jay <jay.krell at cornell dot edu> 2010-11-07 23:10:50 UTC ---
jkrell@login [login]:~/src > ssh current10s
Last login: Sun Nov  7 23:09:51 2010 from login.bo.opencs
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
-bash-4.1$ cd obj
-bash-4.1$ mkdir b
-bash-4.1$ cd b
-bash-4.1$ which gcc
no gcc in /home/jkrell/sparc/bin /opt/csw/bin /usr/bin /usr/ccs/bin
/opt/csw/bin
-bash-4.1$ export CC=/opt/csw/gcc4/bin/gcc
-bash-4.1$ $CC -v
Using built-in specs.
Target: sparc-sun-solaris2.8
Configured with: ../gcc-4.3.3/configure --prefix=/opt/csw/gcc4
--exec-prefix=/opt/csw/gcc4 --with-gnu-as --with-as=/opt/csw/bin/gas
--without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-nls --with-included-gettext
--with-libiconv-prefix=/opt/csw --with-x --with-mpfr=/opt/csw
--with-gmp=/opt/csw --enable-java-awt=xlib --enable-libada --enable-libssp
--enable-objc-gc --enable-threads=posix --enable-stage1-languages=c
--enable-languages=ada,c,c++,fortran,java,objc
Thread model: posix
gcc version 4.3.3 (GCC) 
-bash-4.1$ export CXX=CC
-bash-4.1$ $CXX -V
CC: Sun C++ 5.9 SunOS_sparc 2007/05/03
-bash-4.1$ which ar
/usr/ccs/bin/ar
-bash-4.1$ which gmake
/opt/csw/bin/gmake
-bash-4.1$ which make
/usr/ccs/bin/make
-bash-4.1$ export MAKE=gmake
-bash-4.1$ uname -a
SunOS current10s 5.10 Generic_142909-17 sun4v sparc SUNW,SPARC-Enterprise-T5220


/home/jkrell/src/gcc-trunk/configure -prefix=$HOME/test2 -enable-build-with-cxx
&& $MAKE

.....


gmake[3]: Entering directory `/home/jkrell/obj/b/libcpp'
source='/home/jkrell/src/gcc-trunk/libcpp/charset.c' object='charset.o'
libtool=no DEPDIR=.deps depmode=dashXmstdout /bin/bash
/home/jkrell/src/gcc-trunk/libcpp/../depcomp CC 
-I/home/jkrell/src/gcc-trunk/libcpp -I.
-I/home/jkrell/src/gcc-trunk/libcpp/../include -I./../intl
-I/home/jkrell/src/gcc-trunk/libcpp/include  -g -W -Wall -Wwrite-strings
-Wmissing-format-attribute -pedantic -Wno-long-long 
-I/home/jkrell/src/gcc-trunk/libcpp -I.
-I/home/jkrell/src/gcc-trunk/libcpp/../include -I./../intl
-I/home/jkrell/src/gcc-trunk/libcpp/include  -c
/home/jkrell/src/gcc-trunk/libcpp/charset.c
CC: Warning: Option -W passed to ld, if ld is invoked, ignored otherwise
CC: Warning: Option -Wall passed to ld, if ld is invoked, ignored otherwise
CC: Warning: Option -Wwrite-strings passed to ld, if ld is invoked, ignored
otherwise
CC: Warning: Option -Wmissing-format-attribute passed to ld, if ld is invoked,
ignored otherwise
CC: Warning: Option -pedantic passed to ld, if ld is invoked, ignored otherwise
CC: Warning: Option -Wno-long-long passed to ld, if ld is invoked, ignored
otherwise


attached toplevel config.log and libcpp/config.log
excerpt:

configure:4440: checking whether /opt/csw/gcc4/bin/gcc supports -pedantic
-Wno-long-long
WARN_PEDANTIC='-pedantic -Wno-long-long'


so you can see, CC and CXX are configured the same by autoconf, even though
they
might not be related.


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

* [Bug other/46334] C++ compiler gets g++ switch even if it isn't g++
  2010-11-06 16:45 [Bug other/46334] New: C++ compiler gets g++ switch even if it isn't g++ jay.krell at cornell dot edu
                   ` (2 preceding siblings ...)
  2010-11-07 23:10 ` jay.krell at cornell dot edu
@ 2010-11-08  1:10 ` jay.krell at cornell dot edu
  3 siblings, 0 replies; 5+ messages in thread
From: jay.krell at cornell dot edu @ 2010-11-08  1:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jay <jay.krell at cornell dot edu> 2010-11-08 01:10:25 UTC ---
another, this is an older Darwin/powerpc machine, using some version of g++


http://hudson.modula3.com:8080/job/cm3-current-m3cc-PPC_DARWIN/93/consoleFull


g++  -g  -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wmissing-format-attribute    -DHAVE_CONFIG_H  -o m3cgc1
m3cg/parse.o m3cg/m3-convert.o attribs.o main.o  libbackend.a
../libcpp/libcpp.a ../libcpp/libcpp.a ../libiberty/libiberty.a 
-L/Volumes/luthien/home/hudson2/workspace/cm3-m3cc-PPC_DARWIN/cm3/m3-sys/m3cc/PPC_DARWIN/./gmp/.libs
-lgmp  
-L/Volumes/luthien/home/hudson2/workspace/cm3-m3cc-PPC_DARWIN/cm3/m3-sys/m3cc/PPC_DARWIN/./gmp/.libs
-lgmp   


ld: Undefined symbols:
__Z29legitimate_indirect_address_pP7rtx_defi


Presumed fix: remove inline on
config/rs6000/rs6000.c/legitimate_indirect_address.


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

end of thread, other threads:[~2010-11-08  1:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-06 16:45 [Bug other/46334] New: C++ compiler gets g++ switch even if it isn't g++ jay.krell at cornell dot edu
2010-11-07 23:08 ` [Bug other/46334] " jay.krell at cornell dot edu
2010-11-07 23:09 ` jay.krell at cornell dot edu
2010-11-07 23:10 ` jay.krell at cornell dot edu
2010-11-08  1:10 ` jay.krell at cornell dot edu

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