04-21-2013, 07:36 AM
(This post was last modified: 08-27-2014, 06:37 PM by quequotion.)
I've set up a 32bit chroot to build pcsx2 from svn. The basic build works, and the program runs and plays games.
I want to make a profiled build for better performance. This is a two step process: building once with cflag "-fprofile-generate" and ldflag "-lgcov" then rebuild with cflag "-fprofile-use" and ldflag "-lgcov".
No matter what one specifies for the cflags in build.sh, the build will fail. Something is going wrong parsing this string which causes cmake to fall apart and give up. The only error reported comes from a temporary file that exists only during complie time....
This is what I added to flags in build.shI have tried other flags; the error never changes. Although the error mentions "target link libraries", it will be exactly the same without any specified ldflags.
I have also tried without the escape characters, which results in all of the flags being discarded or ignored.
I am fully aware that special configurations, and in particular the use of special cflags, are unsupported. The problem, I belive, is not the flags but how the strings are being parsed for or by cmake. This can probably be fixed by carefully looking over all of the cmake files in the source directory for an out of place quotation mark, parenthesis, or missing escape character.
I want to make a profiled build for better performance. This is a two step process: building once with cflag "-fprofile-generate" and ldflag "-lgcov" then rebuild with cflag "-fprofile-use" and ldflag "-lgcov".
No matter what one specifies for the cflags in build.sh, the build will fail. Something is going wrong parsing this string which causes cmake to fall apart and give up. The only error reported comes from a temporary file that exists only during complie time....
Code:
CMake Error: Error in cmake code at
/home/pcsx2-read-only/build/CMakeFiles/CMakeTmp/CMakeLists.txt:12:
Parse error. Function missing ending ")". Instead found unterminated string with text ")
TARGET_LINK_LIBRARIES(cmTryCompileExec ${LINK_LIBRARIES})
".
CMake Error: Internal CMake error, TryCompile configure of cmake failed
This is what I added to flags in build.sh
Code:
flags=" -DUSER_CMAKE_C_FLAGS:STRING=\"-fprofile-generate\" -DUSER_CMAKE_CXX_FLAGS:STRING=\"-fprofile-generate\" -DUSER_CMAKE_LD_FLAGS:STRING=\"-lgcov\" "
I have also tried without the escape characters, which results in all of the flags being discarded or ignored.
I am fully aware that special configurations, and in particular the use of special cflags, are unsupported. The problem, I belive, is not the flags but how the strings are being parsed for or by cmake. This can probably be fixed by carefully looking over all of the cmake files in the source directory for an out of place quotation mark, parenthesis, or missing escape character.