[cfe-dev] compiling C++ with clang++

Salman Pervez spervez at purdue.edu
Tue Mar 2 18:25:09 PST 2010


Here's the whole dump!

Configured with: /scratch/portage/tmp/portage/sys-devel/gcc-4.3.2-r3/ 
work/gcc-4.3.2/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux- 
gnu/gcc-bin/4.3.2 --includedir=/us\
r/lib/gcc/x86_64-pc-linux-gnu/4.3.2/include --datadir=/usr/share/gcc- 
data/x86_64-pc-linux-gnu/4.3.2 --mandir=/usr/share/gcc-data/x86_64-pc- 
linux-gnu/4.3.2/man --infodir=/us\
r/share/gcc-data/x86_64-pc-linux-gnu/4.3.2/info --with-gxx-include- 
dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/include/g++-v4 -- 
host=x86_64-pc-linux-gnu --build=x86_64-pc-li\
nux-gnu --disable-altivec --disable-fixed-point --disable-nls --with- 
system-zlib --disable-checking --disable-werror --enable-secureplt -- 
enable-multilib --enable-libmudfla\
p --disable-libssp --enable-libgomp --enable-java-awt=gtk --enable- 
languages=c,c++,java,treelang,fortran --enable-shared --enable- 
threads=posix --enable-__cxa_atexit --enab\
le-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with- 
pkgversion='Gentoo 4.3.2-r3 p1.6, pie-10.1.5'
Thread model: posix
gcc version 4.3.2 (Gentoo 4.3.2-r3 p1.6, pie-10.1.5)
COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic'
  /usr/libexec/gcc/x86_64-pc-linux-gnu/4.3.2/cc1plus -quiet -v - 
D_GNU_SOURCE vec1.cpp -quiet -dumpbase vec1.cpp -mtune=generic - 
auxbase vec1 -version -o /tmp/ccQ7Ek9N.s
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-linux-gnu/ 
4.3.2/../../../../x86_64-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
  /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/include/g++-v4
  /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/include/g++-v4/x86_64-pc- 
linux-gnu
  /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/include/g++-v4/backward
  /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/include
  /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/include-fixed
  /usr/include
End of search list.
GNU C++ (Gentoo 4.3.2-r3 p1.6, pie-10.1.5) version 4.3.2 (x86_64-pc- 
linux-gnu)
         compiled by GNU C version 4.3.2, GMP version 4.2.4, MPFR  
version 2.4.1-p1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min- 
heapsize=131072
Compiler executable checksum: e6963323901a51065250c11068e53fdf
COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic'
  /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../x86_64-pc-linux- 
gnu/bin/as -V -Qy -o /tmp/cciEVqNH.o /tmp/ccQ7Ek9N.s
GNU assembler version 2.18 (x86_64-pc-linux-gnu) using BFD version  
(GNU Binutils) 2.18

COMPILER_PATH=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.3.2/:/usr/libexec/ 
gcc/x86_64-pc-linux-gnu/4.3.2/:/usr/libexec/gcc/x86_64-pc-linux-gnu/:/ 
usr/lib/gcc/x86_64-pc-linux-gnu\
/4.3.2/:/usr/lib/gcc/x86_64-pc-linux-gnu/:/usr/libexec/gcc/x86_64-pc- 
linux-gnu/4.3.2/:/usr/libexec/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/ 
x86_64-pc-linux-gnu/4.3.2/:/usr/lib\
/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/x86_64-pc-linux-gnu/ 
4.3.2/../../../../x86_64-pc-linux-gnu/bin/
LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/:/usr/lib/gcc/ 
x86_64-pc-linux-gnu/4.3.2/:/usr/lib/gcc/x86_64-pc-linux-gnu/ 
4.3.2/../../../../lib64/:/lib/../lib64/:/usr/l\
ib/../lib64/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../x86_64- 
pc-linux-gnu/lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../:/ 
lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic'
  /usr/libexec/gcc/x86_64-pc-linux-gnu/4.3.2/collect2 --eh-frame-hdr - 
m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 /usr/lib/gcc/ 
x86_64-pc-linux-gnu/4.3.2/../../.\
./../lib64/crt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../ 
lib64/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/crtbegin.o -L/usr/ 
lib/gcc/x86_64-pc-linux-gnu/4.3.2\
  -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2 -L/usr/lib/gcc/x86_64-pc- 
linux-gnu/4.3.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 - 
L/usr/lib/gcc/x86_64-pc-linux-gnu/\
4.3.2/../../../../x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc- 
linux-gnu/4.3.2/../../.. /tmp/cciEVqNH.o -lstdc++ -lm -lgcc_s -lgcc - 
lc -lgcc_s -lgcc /usr/lib/gcc/x86_64\
-pc-linux-gnu/4.3.2/crtend.o /usr/lib/gcc/x86_64-pc-linux-gnu/ 
4.3.2/../../../../lib64/crtn.o

-------------------------------------------------

are these the relevant paths?

  /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/include/g++-v4
  /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/include/g++-v4/x86_64-pc- 
linux-gnu
  /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/include/g++-v4/backward
  /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/include
  /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/include-fixed

How do I tell clang where these live?

Salman


On Mar 2, 2010, at 9:11 PM, Eric Christopher wrote:

>
> On Mar 2, 2010, at 6:01 PM, Salman Pervez wrote:
>
>> I'm using Gentoo Linux, 64 bit.
>
> I need more information :)
>
> Where does g++ think iostream is? I.e. what is it searching for  
> headers?  You can get this information via -v when compiling.
>
> -eric




More information about the cfe-dev mailing list