Testsuite: RISC-V: Reset -march for tests with -mcpu
Resets the architecture flag (-march) in RISC-V tests when using -mcpu to ensure the architecture implied by -mcpu prevails.
This commit addresses a test failure in the RISC-V testsuite that occurs when --target_board sets -march to a 32-bit architecture, conflicting with the architecture implied by -mcpu. The fix resets the -march flag so the -mcpu setting takes precedence, ensuring the tests run with the intended architecture.
In Details
The commit fixes a test failure in the RISC-V testsuite. The issue arises when the -march flag, set by --target_board, conflicts with the architecture implied by the -mcpu flag. Resetting -march ensures the -mcpu setting prevails.
For Context
In GCC, the -march and -mcpu flags are used to specify the target architecture for compilation. -march specifies the base architecture, while -mcpu allows for more specific processor tuning within that architecture. Conflicts can arise if these flags are inconsistent, especially in testing environments where default configurations might set conflicting values.