No announcement yet.

CC environment variable not overriding compiler used on Windows 10

  • Filter
  • Time
  • Show
Clear All
new posts

  • CC environment variable not overriding compiler used on Windows 10

    Setting CC environment variable is not overriding compiler used when install test with phoronix. I am sort of new to this flow so I might be doing something wrong. I alos mention this was on Windows 10 as this is what I was using but don't know if issue specific to that.

    From the image you can see that:
    - clang and (older) gcc are my path
    - the CC environment variable is set to 'clang' but a newer version (not in my path) of gcc is being used. So it appears CC is ignored.
    - the CFLAGS environment variable is set to '--version' and you can see this is honored as version is emitted.


    Some secondary questions:
    2) Does phoronix-test-suite have something like a verbose option to see what is going on? In particular would like to see exact compiler used and options passed to i.
    3) Does phoronix-test-suite have environment variables (or other mechanism) to override default link command and link options?

  • #2
    If CC isn't working, then it's the Windows program/test not honoring CC itself. PTS doesn't interfere with CC itself. PTS on Linux though does have additional safeguards to try to ensure CC is always honored by the program (symlinking magic trick to override other clang / gcc / cc commands, etc). But doesn't do that on Windows.

    No, PTS doesn't have any overrides/extra vars for linking and stuff beyond whatever the upstream program supports.
    Michael Larabel


    • #3
      I tried running the commands from original post on linux and can confirm the the CC environment variable does override the compiler used.

      "then it's the Windows program/test not honoring CC itself.", I tried about half a dozen other tests on Windows and none of them seemed to use/honor the CC environment flag. Btw, for me there was nothing special about the aobench test - it just seemed like a relatively simple test to experiment with change the compiler / options.


      • #4
        The same issue I have, I can't change the compiler from GCC to AOCC while benchmarking the stockfish test profile.
        I see there is an option to change the compiler while building the source of stockfish with 'make comp=clang'.
        Can I ask how much effort is required for the support it in Phoronix-test-suite or if it is possible or not?
        Happy to contribute to the Phoronix-test-suite repo.


        • #5
          Not all tests upstream honors CC/CXX, etc, so the fool-proof way to manage outside of PTS before starting is to update cc/gcc/clang symlinks to your intended compiler. It's outside the scope of PTS that may of the contained open-source software packages don't follow CC and such nicely.
          Michael Larabel