Re: [PATCH 0/7] gcov kernel support
From: Andrew Morton
Date: Fri May 23 2008 - 12:58:20 EST
On Fri, 23 May 2008 13:06:00 +0200 Segher Boessenkool <segher@xxxxxxxxxxxxxxxxxxx> wrote:
> >> This is version #2 of the gcov kernel support patch set
> >
> > powerpc blew up:
> >
> > /opt/crosstool/gcc-4.1.0-glibc-2.3.6/powerpc64-unknown-linux-gnu/lib/
> > gcc/powerpc64-unknown-linux-gnu/4.1.0/../../../../powerpc64-unknown-
> > linux-gnu/bin/ld: skipping incompatible
> > /opt/crosstool/gcc-4.1.0-glibc-2.3.6/powerpc64-unknown-linux-gnu/lib/
> > gcc/powerpc64-unknown-linux-gnu/4.1.0/./libgcov.a when searching for
> > -lgcov
> > /opt/crosstool/gcc-4.1.0-glibc-2.3.6/powerpc64-unknown-linux-gnu/lib/
> > gcc/powerpc64-unknown-linux-gnu/4.1.0/../../../../powerpc64-unknown-
> > linux-gnu/bin/ld: cannot find -lgcov
> > collect2: ld returned 1 exit status
> > make[2]: *** [arch/powerpc/kernel/vdso32/vdso32.so.dbg] Error 1
> > make[1]: *** [arch/powerpc/kernel/vdso32] Error 2
>
> Sounds like your toolchain was built without biarch support, but you're
> using it for the 32-bit parts of the kernel anyway. Which works as long
> as you're not using any libraries, but now you need libgcov.a .
ok..
> What does
>
> /opt/crosstool/gcc-4.1.0-glibc-2.3.6/powerpc64-unknown-linux-gnu/bin/
> powerpc64-unknown-linux-gnu-gcc -v
>
> say?
y:/home/akpm> /opt/crosstool/gcc-4.1.0-glibc-2.3.6/powerpc64-unknown-linux-gnu/bin/powerpc64-unknown-linux-gnu-gcc -v
Using built-in specs.
Target: powerpc64-unknown-linux-gnu
Configured with: /home/axboe/crosstool-0.43/build/powerpc64-unknown-linux-gnu/gcc-4.1.0-glibc-2.3.6/gcc-4.1.0/configure --target=powerpc64-unknown-linux-gnu --host=x86_64-host_unknown-linux-gnu --prefix=/opt/crosstool/gcc-4.1.0-glibc-2.3.6/powerpc64-unknown-linux-gnu --disable-multilib --with-sysroot=/opt/crosstool/gcc-4.1.0-glibc-2.3.6/powerpc64-unknown-linux-gnu/powerpc64-unknown-linux-gnu/sys-root --with-local-prefix=/opt/crosstool/gcc-4.1.0-glibc-2.3.6/powerpc64-unknown-linux-gnu/powerpc64-unknown-linux-gnu/sys-root --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c --enable-shared --enable-c99 --enable-long-long
Thread model: posix
gcc version 4.1.0
> (Or whatever the correct path to that compiler is, the directory
> structure is a bit unusual here it seems). There shouldn't be a
> --disable-biarch there.
>
> Or, what does
>
> find
> /opt/crosstool/gcc-4.1.0-glibc-2.3.6/powerpc64-unknown-linux-gnu/4.1.0/
> -name libgcov.a
>
> say? (It should usually find three versions: 64-bit, 32-bit, 32-bit no
> float).
Only a single hit:
/opt/crosstool/gcc-4.1.0-glibc-2.3.6/powerpc64-unknown-linux-gnu/lib/gcc/powerpc64-unknown-linux-gnu/4.1.0/libgcov.a
and it contains
y:/home/akpm/ppc> ar x libgcov.a
y:/home/akpm/ppc> l
total 316
-rw-r--r-- 1 akpm akpm 44192 May 23 09:53 _gcov.o
-rw-r--r-- 1 akpm akpm 8448 May 23 09:53 _gcov_execl.o
-rw-r--r-- 1 akpm akpm 8584 May 23 09:53 _gcov_execle.o
-rw-r--r-- 1 akpm akpm 8456 May 23 09:53 _gcov_execlp.o
-rw-r--r-- 1 akpm akpm 7384 May 23 09:53 _gcov_execv.o
-rw-r--r-- 1 akpm akpm 7544 May 23 09:53 _gcov_execve.o
-rw-r--r-- 1 akpm akpm 7392 May 23 09:53 _gcov_execvp.o
-rw-r--r-- 1 akpm akpm 7264 May 23 09:53 _gcov_fork.o
-rw-r--r-- 1 akpm akpm 7240 May 23 09:53 _gcov_interval_profiler.o
-rw-r--r-- 1 akpm akpm 7464 May 23 09:53 _gcov_merge_add.o
-rw-r--r-- 1 akpm akpm 8544 May 23 09:53 _gcov_merge_delta.o
-rw-r--r-- 1 akpm akpm 8488 May 23 09:53 _gcov_merge_single.o
-rw-r--r-- 1 akpm akpm 6976 May 23 09:53 _gcov_one_value_profiler.o
-rw-r--r-- 1 akpm akpm 6856 May 23 09:53 _gcov_pow2_profiler.o
-rw-r--r-- 1 akpm akpm 146492 May 23 09:52 libgcov.a
y:/home/akpm/ppc> file _gcov_merge_delta.o
_gcov_merge_delta.o: ELF 64-bit MSB relocatable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), not stripped
>
> You *can* build with a non-biarch compiler, but then you need to point
> the kernel build system at a 32-bit toolchain to use for the 32-bit
> parts (via CROSS32_COMPILE).
Jens built this one, using crosstool. It is
http://userweb.kernel.org/~akpm/cross-compilers/power64-cross.tar.bz2
It was all working happily until gcov came along :(
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/