Hi, In a build of GCC 4.7.0-RC-20120302 with --enable-languages=c,c++ [0], I’m seeing C++-mangled name for common functions, like:
$ objdump -T cc1 | grep build1_stat_loc 0000000000640a00 g DF .text 000000000000007a Base _Z20fold_build1_stat_locj9tree_codeP9tree_nodeS1_ Indeed, ‘tree.c’, for instance, eventually gets built with g++, not gcc: /tmp/nix-build-djlxw37gcj9gy88ya1550crn49fpzqck-gcc-debug-4.7.0rc20120302.drv-0/build/./prev-gcc/g++ -B/tmp/nix-build-djlxw37gcj9gy88ya1550crn49fpzqck-gcc-debug-4.7.0rc20120302.drv-0/build/./prev-gcc/ -B/nix/store/glikf0cfxhhswagdh7wdwgmp20n9bfcl-gcc-debug-4.7.0rc20120302/x86_64-unknown-linux-gnu/bin/ -nostdinc++ -B/tmp/nix-build-djlxw37gcj9gy88ya1550crn49fpzqck-gcc-debug-4.7.0rc20120302.drv-0/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -B/tmp/nix-build-djlxw37gcj9gy88ya1550crn49fpzqck-gcc-debug-4.7.0rc20120302.drv-0/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -I/tmp/nix-build-djlxw37gcj9gy88ya1550crn49fpzqck-gcc-debug-4.7.0rc20120302.drv-0/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu -I/tmp/nix-build-djlxw37gcj9gy88ya1550crn49fpzqck-gcc-debug-4.7.0rc20120302.drv-0/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include -I/tmp/nix-build-djlxw37gcj9gy88ya1550crn49fpzqck-gcc-debug-4.7.0rc20120302.drv-0/gcc-4.7.0-RC-20120302/libstdc++-v3/libsupc++ -L/tmp/nix-build-djlxw37gcj9gy88ya1550crn49fpzqck-gcc-debug-4.7.0rc20120302.drv-0/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/tmp/nix-build-djlxw37gcj9gy88ya1550crn49fpzqck-gcc-debug-4.7.0rc20120302.drv-0/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -c -O2 -g -I/nix/store/6cgraa4mxbg1gfi95a4yhxq6yzb56s4v-glibc-2.13/include -B/nix/store/6cgraa4mxbg1gfi95a4yhxq6yzb56s4v-glibc-2.13/lib/ -idirafter /nix/store/6cgraa4mxbg1gfi95a4yhxq6yzb56s4v-glibc-2.13/include -idirafter /nix/store/fghwm2dz41sz9b2l87ffgv11zadq7dxr-gcc-4.6.3/lib/gcc/*/*/include-fixed -Wl,-L/nix/store/6cgraa4mxbg1gfi95a4yhxq6yzb56s4v-glibc-2.13/lib -Wl,-rpath -Wl,/nix/store/6cgraa4mxbg1gfi95a4yhxq6yzb56s4v-glibc-2.13/lib -Wl,-L/nix/store/6cgraa4mxbg1gfi95a4yhxq6yzb56s4v-glibc-2.13/lib -Wl,-dynamic-linker -Wl,/nix/store/6cgraa4mxbg1gfi95a4yhxq6yzb56s4v-glibc-2.13/lib/ld-linux-x86-64.so.2 -gtoggle -DIN_GCC -fno-exceptions -fno-rtti -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.7.0-RC-20120302/gcc -I../../gcc-4.7.0-RC-20120302/gcc/. -I../../gcc-4.7.0-RC-20120302/gcc/../include -I../../gcc-4.7.0-RC-20120302/gcc/../libcpp/include -I/nix/store/z5hcwkvzbzhy85lm3ibxzqmal22jgjwj-gmp-5.0.3/include -I/nix/store/xjks1ifzrh9ylnsjj15sy267r30b1ca5-mpfr-3.1.0/include -I/nix/store/36b2ghjhi40gyzfqx0qqqc034mc3ziii-mpc-0.9/include -I../../gcc-4.7.0-RC-20120302/gcc/../libdecnumber -I../../gcc-4.7.0-RC-20120302/gcc/../libdecnumber/bid -I../libdecnumber -I/nix/store/3fk4lylmhsyqkq2vna2gqwssgfr51ynd-ppl-0.11.2/include -I/nix/store/gq2pi083kf1vkl48j0wigpqzhga0bx9v-cloog-0.16.3/include -DCLOOG_INT_GMP -DCLOOG_ORG ../../gcc-4.7.0-RC-20120302/gcc/tree.c -o tree.o I believe this is not intentional, right? What am I doing wrong? Thanks, Ludo’. [0] Full log at <http://hydra.nixos.org/build/2267886/nixlog/1/raw>.