> On April 2, 2012, 2:06 p.m., Ali Saidi wrote:
> > it's fine with the caveat that things which are deprecated today are 
> > normally gone tomorrow. Putting the no-deprecated warning is a bit 
> > dangerous. Is there perhaps a hash_map replacement that we could grab with 
> > version ifdefs?
> >
> 
> Andreas Hansson wrote:
>     The new data structure that replaces ext/hash_map is unordered_map. 
> However, ifdefs won't do the trick, as it seems we also have to add 
> -std=c++0x on the command line for this to work, but I'll do some more 
> digging around.
>
> 
> Nathan Binkert wrote:
>     Seems like we should have a conf.CheckHeader for the unordered map and do 
> the proper #ifdefs off that in base/hashmap.hh
> 
> Andreas Hansson wrote:
>     Sorry if it is covered by CheckHeader, but how does that solve the 
> inclusion of -std=c++0x in the compiler flags, or do you suggest to do that 
> unconditionally?
> 
> Nathan Binkert wrote:
>     The Configure() object (where CheckHeader comes from) takes an 
> environment.  If you want to make it entirely programmatic, you can clone the 
> main environment.  Add -std=c++0x, create a configure object and then use 
> CheckHeader.  If all that passes, you can add the -std=c++0x to the main 
> environment itself, and then you can add a flag to the export_vars which will 
> give you a #include that you can grab a #define from.
>     
>     (It may be entirelly possible t add the -std=c++0x flag to CheckHeader 
> itself.  I'm just not sure.  I'd probably figure that out first.)
> 
> Nathan Binkert wrote:
>     I'm also not opposed to -std=c++0x for all clang if that works.  (Or just 
> checking the version of clang and doing it for certain versions.)

I should add that the same problem arises with gcc >= 4.6 and that there 
currently is a corresponding "-Wno-deprecated" for these cases. Thus, what ever 
we choose for clang we should also do for gcc >= 4.6.


- Andreas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/1119/#review2400
-----------------------------------------------------------


On April 2, 2012, 12:43 p.m., Andreas Hansson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/1119/
> -----------------------------------------------------------
> 
> (Updated April 2, 2012, 12:43 p.m.)
> 
> 
> Review request for Default.
> 
> 
> Description
> -------
> 
> clang: Fix compilation problems with clang 3.0 on Ubuntu 12.04
> 
> This patch disables the warning for deprecated headers since the
> ext/hash_map is considered deprecated with clang 3.0 on Ubuntu 12.04
> (compiled against gcc 4.6 headers). It also fixes the build flags for
> the debug target that used to be shared with gcc.
> 
> 
> Diffs
> -----
> 
>   SConstruct 97f06a79b6f5 
>   src/SConscript 97f06a79b6f5 
> 
> Diff: http://reviews.gem5.org/r/1119/diff/
> 
> 
> Testing
> -------
> 
> util/regress all passing (disregarding t1000 and eio) with gcc 4.6.2, 
> and compiling with clang 2.9 and 3.0 on Ubuntu 12.04 and MacOSX 10.7.3
> 
> 
> Thanks,
> 
> Andreas Hansson
> 
>

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

Reply via email to