How can I build different .o files using different flags?
The SPEC tools will apply the same set of compilation flags to each source file of a given language, consistent with the MPI2007 Run Rules. For the purpose of debugging, however, you may need to circumvent this and compile specific .o files with flags different from the ones inherited from the config-file. Note that this cannot be done in a reportable run, so be sure not to use the “dirty” executables beyond your debugging effort. • You need to edit the benchspec/Makefile.defaults to override the default rules inherited from the config file contents. Save off a copy of the file before you do this. • Add an explicit rule for each .o file being special-cased: %$(OBJ): %.cpp $(CXXC) $(CXXOBJOPT) $(FINAL_CXXFLAGS) $> objectnames endif angle.o: angle.cpp $(CXXC) $(CXXOBJOPT) $(OPTIMIZE) -DSPEC_MPI -DNDEBUG -DFFT_NONE -O5 -qipa=noobject -qipa=threads -q64 $(PORTABILITY) $(CXXPORTABILITY) $> objectnames endif The first form of the rule applies generically to all files with the .
The SPEC tools will apply the same set of compilation flags to each source file of a given language, consistent with the MPI2007 Run Rules. For the purpose of debugging, however, you may need to circumvent this and compile specific .o files with flags different from the ones inherited from the config-file. Note that this cannot be done in a reportable run, so be sure not to use the “dirty” executables beyond your debugging effort. • You need to edit the benchspec/Makefile.defaults to override the default rules inherited from the config file contents. Save off a copy of the file before you do this. • Add an explicit rule for each .o file being special-cased: %$(OBJ): %.cpp $(CXXC) $(CXXOBJOPT) $(FINAL_CXXFLAGS) $> objectnames endif angle.o: angle.cpp $(CXXC) $(CXXOBJOPT) $(OPTIMIZE) -DSPEC_MPI -DNDEBUG -DFFT_NONE -O5 -qipa=noobject -qipa=threads -q64 $(PORTABILITY) $(CXXPORTABILITY) $> objectnames endif The first form of the rule applies generically to all files with the .cpp extension;