No announcement yet.

how to use different gcc versions and optimization parameters

  • Filter
  • Time
  • Show
Clear All
new posts

  • how to use different gcc versions and optimization parameters

    I am new to phoronix test suite. I have two questions and maybe the two questions are same. Firstly, My gcc version is 5.4, I want to compare gcc5.4 with gcc7.2 . I want to know how to reproduce a result like "". After I execute "phoronix-test-suite benchmark hpcg", the result is about gcc5.4. How can I get a comparison gcc5.4 and gcc7.2? Do I need to install gcc7.2 in my laptop at first?
    Secondly, how should I use different gcc optimization paremeters, for example, "-O1", "-O2",..., getting a result like ""?
    Thanks in advance.

  • #2
    You need to first install the compilers on the system and then update the PATH or point cc to the correct compiler, etc. Likewise, CFLAGS / CXXFLAGS for compiler flags.
    Michael Larabel


    • #3
      Thank you for your reply and helps. You are right, and I indeed need to install alternative compiler. Now I can compare results of different compilers and optimization parameters by setting CFLAGS and CXXFLAGS. The post "" is helpful. I am now studying other features about phoronix-test-suite. Thanks a lot.