[SPEC2017] Use -fno-strict-aliasing when compiling 502.gcc_r, 505.mcf_r

As suggested on SPEC's documentation page (Known Portability Issues) [1][2]
the spec_qsort.c routine does not strictly obey the ANSI aliasing rules.
In the absence of -fno-strict-aliasing the test suite fails when Function
Specialization is enabled with both LTO and PGO
(see https://reviews.llvm.org/D140210).

[1] https://www.spec.org/cpu2017/Docs/benchmarks/502.gcc_r.html
[2] https://www.spec.org/cpu2017/Docs/benchmarks/505.mcf_r.html

Differential Revision: https://reviews.llvm.org/D141474
diff --git a/External/SPEC/CINT2017rate/502.gcc_r/CMakeLists.txt b/External/SPEC/CINT2017rate/502.gcc_r/CMakeLists.txt
index 5cad24a..731d66a 100644
--- a/External/SPEC/CINT2017rate/502.gcc_r/CMakeLists.txt
+++ b/External/SPEC/CINT2017rate/502.gcc_r/CMakeLists.txt
@@ -8,7 +8,7 @@
 
 add_definitions(-DSPEC_502 -DIN_GCC -DHAVE_CONFIG_H)
 speccpu2017_add_include_dirs(. include spec_qsort)
-add_compile_options(-fgnu89-inline)
+add_compile_options(-fgnu89-inline -fno-strict-aliasing)
 
 ## test ########################################################################
 
diff --git a/External/SPEC/CINT2017rate/505.mcf_r/CMakeLists.txt b/External/SPEC/CINT2017rate/505.mcf_r/CMakeLists.txt
index ce15988..d09cd81 100644
--- a/External/SPEC/CINT2017rate/505.mcf_r/CMakeLists.txt
+++ b/External/SPEC/CINT2017rate/505.mcf_r/CMakeLists.txt
@@ -7,6 +7,7 @@
 speccpu2017_benchmark(RATE)
 
 speccpu2017_add_include_dirs(spec_qsort)
+add_compile_options(-fno-strict-aliasing)
 
 ## test ########################################################################