|
From: Matt <ma...@us...> - 2005-03-21 03:59:37
|
Hi, Doing some testing to help the release a bit and ran into a problem. I understand that valgrind doesn't support instrumentation of x86-64 binaries, but it seems like I should be able to build it on x86-64 for use on i686 binaries. This is on a gentoo system with gcc 3.4.3.20050110, kernel 2.6.10, binutils 2.15.92.02, and glibc 2.3.4.20041102. I did this: ./autogen.sh ./configure --build=i686-linux-gnu --target=i686-linux-gnu This correctly generated makefiles. It then doesn't build because the -march flags aren't passed to gcc. --target= appears to not do much :( So I added CFLAGS=-m32 CCASFLAGS=-m32 CXXFLAGS=-m32 CPPFLAGS=-m32 To the front of the configure. Everything took except my additions to the CFLAGS. They are explicitly set to "-Wno-long-long" in configure.in and overwrites any options from the environment. We made a small patch, but perhaps things are this way for a reason? So, we edited the configure.in locally to fix the problem. Our -m32 was then showing up properly in the CFLAGS. Then we were stopped with many errors like this one: mc_translate.o(.text+0x726):/home/matt/src/valgrind-2.4/valgrind/memcheck/mc_translate.c:201: undefined reference to `vgPlain_printf' mc_translate.o(.text+0xacc): In function `create_PUTVF': /home/matt/src/valgrind-2.4/valgrind/memcheck/mc_translate.c:404: undefined reference to `vgPlain_new_UInstr1' collect2: ld returned 1 exit status make[3]: *** [vgskin_memcheck.so] Error 1 make[3]: Leaving directory `/home/matt/src/valgrind-2.4/valgrind/memcheck' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/matt/src/valgrind-2.4/valgrind/memcheck' make[1]: *** [all-recursive] Error 1 Please let me know if there's anything else I should try. It would be nice for valgrind to build/run OOTB on x86-64 systems (whose toolchains are built correctly). Thanks, and keep up the good work! :) -- tangled strands of DNA explain the way that I behave. http://www.clock.org/~matt |
|
From: Jeremy F. <je...@go...> - 2005-03-21 16:14:00
|
Matt wrote:
>Hi,
>
>Doing some testing to help the release a bit and ran into a problem. I
>understand that valgrind doesn't support instrumentation of x86-64
>binaries, but it seems like I should be able to build it on x86-64 for use
>on i686 binaries. This is on a gentoo system with gcc 3.4.3.20050110,
>kernel 2.6.10, binutils 2.15.92.02, and glibc 2.3.4.20041102.
>
>
>I did this:
>
>./autogen.sh
>./configure --build=i686-linux-gnu --target=i686-linux-gnu
>
>This correctly generated makefiles. It then doesn't build because the
>-march flags aren't passed to gcc. --target= appears to not do much :(
>
>So I added
>CFLAGS=-m32 CCASFLAGS=-m32 CXXFLAGS=-m32 CPPFLAGS=-m32
>To the front of the configure.
>
>
I normally use
CC='gcc -m32' CXX='g++ -m32' linux32 ./configure
J
|
|
From: Maurice v. d. P. <gri...@ge...> - 2005-03-21 16:54:57
|
On Sun, Mar 20, 2005 at 07:59:33PM -0800, Matt wrote: > This correctly generated makefiles. It then doesn't build because the > -march flags aren't passed to gcc. --target=3D appears to not do much :( >=20 > So I added > CFLAGS=3D-m32 CCASFLAGS=3D-m32 CXXFLAGS=3D-m32 CPPFLAGS=3D-m32 > To the front of the configure. >=20 > Everything took except my additions to the CFLAGS. They are explicitly set > to "-Wno-long-long" in configure.in and overwrites any options from the > environment. We made a small patch, but perhaps things are this way for a > reason? I entered a question about this in the bug database a little while ago when I needed to provide some extra CFLAGS myself. See comment #15 in this report: http://bugs.kde.org/show_bug.cgi?id=3D96321 No clue yet why CFLAGS are cleared. Gentoo's 2.2.0-r2 release of valgrind contains a patch to respect CFLAGS in the environment and so far I haven't had any complaints. Regards, Maurice. --=20 Maurice van der Pot Gentoo Linux Developer gri...@ge... http://www.gentoo.org Creator of BiteMe! gri...@kf... http://www.kfk4ever.com |