Summary: | no 4.3.3 libraries for non-C languages if 4.3.3 and 4.4.0 in parallel | ||
---|---|---|---|
Product: | gcc | Reporter: | Thomas Koenig <tkoenig> |
Component: | driver | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | major | CC: | dfranke, gcc-bugs, gerald, jsm28, tkoenig |
Priority: | P3 | Keywords: | link-failure |
Version: | 4.4.0 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: |
Description
Thomas Koenig
2008-12-26 10:42:00 UTC
Same problem with g++: tkoenig@gcc16:/tmp$ g++ hello.cc tkoenig@gcc16:/tmp$ g++ -V4.3.3 hello.cc /tmp/ccQtuMbq.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0' collect2: ld returned 1 exit status tkoenig@gcc16:/tmp$ Adjusting subject. Hmm... just wondering, did this ever work? --enable-version-specific-runtime-libs, maybe? IIRC this is by design. (In reply to comment #3) > IIRC this is by design. What on earth for? Especially, what could be the reason for having -V, while making sure it doesn't work? I'll try the switch suggested by Daniel. (In reply to comment #2) > --enable-version-specific-runtime-libs, maybe? > Doesn't do what I want: tkoenig@gcc16:/tmp$ g++ -V4.3.3 -v Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: ../gcc-4_3/configure --prefix=/home/tkoenig --enable-languages=c,fortran,c++ --with-gmp=/opt/cfarm/mpfr-2.3.2/ --enable-version-specific-runtime-libs Thread model: posix gcc version 4.3.3 20081226 (prerelease) (GCC) tkoenig@gcc16:/tmp$ g++ -V4.3.3 hello.cc /tmp/cc40A3Ee.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0' collect2: ld returned 1 exit status tkoenig@gcc16:/tmp$ Just to make sure, you cleaned out the prefix before? I use a similar setup at work, 4.2, 4.3 and trunk, all in the same prefix. Besides "--enable-version-specific-runtime-libs", I also have "--program-suffix=-${branch}". The binaries are called gfortran-4.2, gfortran-4.3 and gfortran-svn and this works nicely for me. That is because when you use -V, it calls ${target}-gcc-4.3 rather than ${target}-gfortran-4.3 or ${target}-4.3-g++. Plus this is documented this way: http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Target-Options.html#index-V-901 The -V and -b options work by running the <machine>-gcc-<version> executable, so there's no real reason to use them if you can just run that directly. (In reply to comment #8) > Plus this is documented this way: > http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Target-Options.html#index-V-901 I see this works for gcc. I also see (in the 4.4.0 docs) # The C++ compiler is G++, the Ada compiler is GNAT, and so on. When we # talk about compiling one of those languages, we might refer to that # compiler by its own name, or as GCC. Either is correct. In the text you quoted, it says # The argument version specifies which version of GCC to run. so GCC clearly refers to any of the suite of GCC compilers, not just the gcc command itself. The documentation doesn't match what's happening, so this is a bug. |