> On 2012-01-11 10:48:20, Nathan Binkert wrote:
> > This is awesome!  Thanks for the work.  There are two things I don't like: 
> > the namespace moves and the pkt->Packet:: stuff.  I'd like to figure out 
> > ways to make it work without that.
> > 
> > Also, did you make sure that this all still compiles with GCC?

Thanks, let's start from easy stuff, the pkt->Packet:: stuff. WIthout Packet::, 
clang complains "lookup of 'set' in member access expression is ambiguous", 
because of the ambiguity between STL set and Packet::set. I can think of two 
trivial alternative ways to deal with the problem.
   1. add '-Wno-ambiguous-member-template' to CCFLAGS
   2. get rid of "using namespace std;", which means adding "std::" when 
necessary
Which one do you prefer? Did I miss any trivial solution?

The namespace move is trick. Yes, it's a hack. Let's use the change in 
'src/arch/alpha/isa/main.isa" as an example to illustrate this problem. Without 
the change, I got error message like:
  In file included from build/ALPHA_FS/arch/alpha/atomic_simple_cpu_exec.cc:17: 
build/ALPHA_FS/arch/generic/memhelpers.hh:67:15: error: call to function 'gtoh' 
that
      is neither visible in the template definition nor found by 
argument-dependent
      lookup
        mem = gtoh(mem);
I know we should use 'using namespace AlphaISA;"  or "using namespace 
LittleEndianGuest;' earlier so that clang will know 'gtoh()' is the the 
LittleEndianGuest one. But I don't know where is the right place to add it. Any 
suggestion? 

And, yes, I compiled changed code with gcc-4.2 (what comes with Xocde 4.2) and 
gcc-4.6 without problem.


- Koan-Sin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/986/#review1905
-----------------------------------------------------------


On 2012-01-10 23:18:13, Koan-Sin Tan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.m5sim.org/r/986/
> -----------------------------------------------------------
> 
> (Updated 2012-01-10 23:18:13)
> 
> 
> Review request for Default.
> 
> 
> Summary
> -------
> 
> Initial patch to make gem5 compile with clang/llvm. Tested on Mac OS X 10.7.2 
> + clang/llvm from Xcode 4.2
> 
> 
> Diffs
> -----
> 
>   SConstruct UNKNOWN 
>   src/SConscript UNKNOWN 
>   src/arch/alpha/isa/main.isa UNKNOWN 
>   src/arch/alpha/linux/process.cc UNKNOWN 
>   src/arch/alpha/process.cc UNKNOWN 
>   src/arch/alpha/tlb.hh UNKNOWN 
>   src/arch/alpha/tlb.cc UNKNOWN 
>   src/arch/alpha/tru64/process.cc UNKNOWN 
>   src/arch/arm/insts/static_inst.hh UNKNOWN 
>   src/arch/arm/insts/vfp.hh UNKNOWN 
>   src/arch/arm/isa/templates/basic.isa UNKNOWN 
>   src/arch/x86/bios/intelmp.cc UNKNOWN 
>   src/arch/x86/intmessage.hh UNKNOWN 
>   src/arch/x86/linux/syscalls.cc UNKNOWN 
>   src/arch/x86/process.cc UNKNOWN 
>   src/base/fast_alloc.cc UNKNOWN 
>   src/base/range_map.hh UNKNOWN 
>   src/base/stl_helpers.hh UNKNOWN 
>   src/cpu/func_unit.hh UNKNOWN 
>   src/cpu/inorder/thread_context.hh UNKNOWN 
>   src/cpu/inorder/thread_state.hh UNKNOWN 
>   src/cpu/o3/iew.hh UNKNOWN 
>   src/cpu/o3/inst_queue.hh UNKNOWN 
>   src/cpu/o3/mem_dep_unit.cc UNKNOWN 
>   src/cpu/o3/sat_counter.hh UNKNOWN 
>   src/cpu/o3/thread_context.hh UNKNOWN 
>   src/cpu/o3/thread_state.hh UNKNOWN 
>   src/cpu/static_inst.hh UNKNOWN 
>   src/cpu/thread_context.hh UNKNOWN 
>   src/cpu/thread_state.hh UNKNOWN 
>   src/dev/alpha/tsunami_cchip.cc UNKNOWN 
>   src/dev/alpha/tsunami_io.cc UNKNOWN 
>   src/dev/arm/pl111.cc UNKNOWN 
>   src/dev/copy_engine.cc UNKNOWN 
>   src/dev/ide_ctrl.cc UNKNOWN 
>   src/dev/ns_gige.cc UNKNOWN 
>   src/dev/pciconfigall.cc UNKNOWN 
>   src/dev/pcidev.cc UNKNOWN 
>   src/mem/cache/base.hh UNKNOWN 
>   src/mem/packet.hh UNKNOWN 
>   src/mem/ruby/system/Sequencer.hh UNKNOWN 
>   src/python/m5/SimObject.py UNKNOWN 
>   src/sim/core.hh UNKNOWN 
>   src/sim/process.hh UNKNOWN 
> 
> Diff: http://reviews.m5sim.org/r/986/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Koan-Sin
> 
>

_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to