Hi Daniel,
* Daniel Gollub <[EMAIL PROTECTED]> [2008-08-20 15:05:00]:
> On Thursday 24 July 2008 06:22:59 Darren Hart wrote:
> > On Thu, 2008-07-24 at 05:06 +0530, Subrata Modak wrote:
> > > On Mon, 2008-07-21 at 15:57 +0200, Gilles Carry wrote:
> > > > Hi,
> > > >
> > > > When compiling powerpc binaries, gcc defaults to 32 bit.
> > > > To do some tests I needed to have a 64 bit binary.
> > > > Since I'm using realtime, I modified config.mk as below.
> > > > My questions: is there any official way to turn LTP in 64bit?
> > > > If not, what shall we do then? Should LTP default to 32 or native-arch
> > > > bit?
> > >
> > > It should default to native-arch bit. I hope the Makefile(s) take care
> > > of that stuff automatically.
> > >
> > > > Shall we use something like: "if (uname -m) ..." or use a command line
> > > > option?
> > > > Any comment?
> > > >
> > > > Gilles.
> > > >
> > > >
> > > > diff --git a/testcases/realtime/config.mk b/testcases/realtime/config.mk
> > > > index 19ccddc..083db58 100644
> > > > --- a/testcases/realtime/config.mk
> > > > +++ b/testcases/realtime/config.mk
> > > > @@ -23,3 +23,4 @@ LDLIBS += $(srcdir)/lib/libjvmsim.o \
> > > > $(srcdir)/lib/libstats.o \
> > > > -lpthread -lrt -lm
> > > >
> > > > +CFLAGS += -m64
> >
> > According to man gcc:
> >
> > -m64
> > Generate code for a 32-bit or 64-bit environment. The 32-bit
> > envi-
> > ronment sets int, long and pointer to 32 bits and generates code
> > that runs on any i386 system. The 64-bit environment sets int to
> > 32 bits and long and pointer to 64 bits and generates code for
> > AMD's x86-64 architecture. For darwin only the -m64 option turns
> > off the -fno-pic and -mdynamic-no-pic options.
> >
> > This seems like the right thing to do to me. Gilles, have you confirmed
> > that
> > this doesn't break things on the x86_64 platforms?
> >
> > No objection from me.
>
> Unfortunately this breaks build on i586:
>
> + make -C testcases/realtime/
> make: Entering directory
> `/usr/src/packages/BUILD/ltp-full-20080820/testcases/realtime'
> make[1]: Entering directory
> `/usr/src/packages/BUILD/ltp-full-20080820/testcases/realtime/lib'
> cc -march=i586 -mtune=i686 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2
> -fstack-protector -O2 -g -Wall -m64 -Wall -m64 -I../include -D_GNU_SOURCE -c
> -o libjvmsim.o libjvmsim.c
> libjvmsim.c:1: sorry, unimplemented: 64-bit mode not compiled in
> make[1]: *** [libjvmsim.o] Error 1
>
> What about adding -m64 only for ppc?
Will this not cause a problem for ppc 32bit?
> best regards,
> Daniel
>
> ---
>
> diff --git a/testcases/realtime/config.mk b/testcases/realtime/config.mk
> index 083db58..046bd93 100644
> --- a/testcases/realtime/config.mk
> +++ b/testcases/realtime/config.mk
> @@ -23,4 +23,7 @@ LDLIBS += $(srcdir)/lib/libjvmsim.o \
> $(srcdir)/lib/libstats.o \
> -lpthread -lrt -lm
>
> -CFLAGS += -m64
> +ifeq ($(shell uname -m), ppc)
This check could be for x86_64 and ppc64 ?
> + CFLAGS += -m64
> +endif
> +
-Thanks,
Chirag
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list