Thanks Misha. I tried the "gcc -dM -E /tmp/file.c | grep __sparcv9" but there was no output. Maybe this is the probelm, I do have CXX = g++ -mcpu=v9 CC := gcc -mcpu=v9 in the Makefile.config. Do I need to add -m64 as well? Thanks. Shukang On Thu, 7 Oct 2004, Misha Brukman wrote:> Is your compiler configured to define __sparcv9 when it compiles? > The following should tell you: > > % touch /tmp/file.c > % gcc -dM -E /tmp/file.c | grep __sparcv9 > > If the output is similar to the below, you're fine: > #define __sparcv9 1 > > If the above command gives no output, then you need to specify -mcpu=v9 > or reconfigure/recompile GCC to default to outputting V9 code. >
On Thu, Oct 07, 2004 at 06:46:18PM -0400, Shukang Zhou wrote:> Thanks Misha. I tried the "gcc -dM -E /tmp/file.c | grep __sparcv9" > but there was no output. Maybe this is the probelm, I do have > > CXX = g++ -mcpu=v9 > CC := gcc -mcpu=v9 > > in the Makefile.config. Do I need to add -m64 as well? Thanks.Just run the test that I mentioned before:> On Thu, 7 Oct 2004, Misha Brukman wrote: > > % touch /tmp/file.c > > % gcc -dM -E /tmp/file.c | grep __sparcv9 > > > > If the output is similar to the below, you're fine: > > #define __sparcv9 1If the above command gives no output, then try again, specifying -m64. The key is to get __sparcv9 #defined, because there is code in the SparcV9 JIT that is conditionally compiled based on it. -- Misha Brukman :: http://misha.brukman.net :: http://llvm.cs.uiuc.edu
I'm sorry, I did not completely understand your email, let me clarify my response. On Thu, Oct 07, 2004 at 06:46:18PM -0400, Shukang Zhou wrote:> Thanks Misha. I tried the "gcc -dM -E /tmp/file.c | grep __sparcv9" > but there was no output. Maybe this is the probelm, I do have > > CXX = g++ -mcpu=v9 > CC := gcc -mcpu=v9 > > in the Makefile.config. Do I need to add -m64 as well? Thanks.Just run the test that I mentioned before:> On Thu, 7 Oct 2004, Misha Brukman wrote: > > % touch /tmp/file.c > > % gcc -mcpu=v9 -dM -E /tmp/file.c | grep __sparcv9^^^^^^^^ you need to specify that here <====== correction> > > > If the output is similar to the below, you're fine: > > #define __sparcv9 1If the above command gives no output, then try again, specifying -m64. The key is to get __sparcv9 #defined, because there is code in the SparcV9 JIT that is conditionally compiled based on it. If none of the above define __sparcv9, what is the output of the following? % gcc -dumpmachine -- Misha Brukman :: http://misha.brukman.net :: http://llvm.cs.uiuc.edu