[PATCH] D16688: [test-suite] A number of cmake configuration fixes for External/SPEC.

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 29 10:50:45 PST 2016


MatzeB added inline comments.

================
Comment at: External/SPEC/CINT2000/252.eon/CMakeLists.txt:5-6
@@ -4,4 +4,4 @@
 endif()
-list(APPEND CXXFLAGS -fno-exceptions -Wno-deprecated -fpermissive -stdlib=libstdc++)
-list(APPEND LDFLAGS -stdlib=libstdc++ -lm)
 list(APPEND LIBS -lm)
----------------
kristof.beyls wrote:
> MatzeB wrote:
> > Without the -stdlib=libstdc++ the benchmark does not compile for me because it cannot find <iostream.h>. I'm surprised that worked with clang/OS X for you, maybe it is because you have an older version than me. I guess we need something like a global LIBSTDCXX_AVAILABLE variable that defaults to true if APPLE is set?
> It turns out my copy of spec2000 has been modified to work around the iostream.h issue, by adding an iostream.h in the eon source code directory, which just does:
> #include <iostream>
> using namespace std;
> 
> 
> I really dislike changing the source code of the benchmark, but I also don't really like being stuck to use libstdc++ and not libc++.
> I think that the ideal work-around would be to add a workaround like "#include <iostream>\nusing namespace std;", but without having to change the SPEC source code. I'm not sure what the least-convoluted way would be to achieve something like that from just adapting the 252.eon/CMakeLists.txt file. I'll think a bit more about this next week, if no one else comes up with a reasonable suggestion by then.
Well it's clearly ancient C++ code in the benchmark so working around that a bit is fair IMO. Anyway if it is indeed just iostream.h then I'd suggest we place a file like you described into the directory where the CMakeLists.txt is and add a -I flag for that. We already did similar hacks if you look at (test-suite/SPEC/CINT2006/483.xalancbmk/ppc/endian.h and test-suite/SPEC/CINT95/124.m88ksim/builtins.h)


http://reviews.llvm.org/D16688





More information about the llvm-commits mailing list