gpu-compute,misc: Removed unused 'vaddr' capture
[gem5.git] / SConstruct
index b7608a8b2a167ee4aaf27af70b3a5983a17fd3d2..370cd60241f18dbb0deac707fb8b57ecc91fcb9b 100755 (executable)
@@ -277,7 +277,7 @@ global_vars.AddVariables(
     ('CCFLAGS_EXTRA', 'Extra C and C++ compiler flags', ''),
     ('LDFLAGS_EXTRA', 'Extra linker flags', ''),
     ('PYTHON_CONFIG', 'Python config binary to use',
-     [ 'python2.7-config', 'python-config' ]),
+     [ 'python2.7-config', 'python-config', 'python3-config' ]),
     ('PROTOC', 'protoc tool', environ.get('PROTOC', 'protoc')),
     ('BATCH', 'Use batch pool for build and tests', False),
     ('BATCH_CMD', 'Batch pool submission command name', 'qdo'),
@@ -404,22 +404,27 @@ if main['GCC']:
 
     main['GCC_VERSION'] = gcc_version
 
-    if compareVersions(gcc_version, '4.9') >= 0 and \
-       compareVersions(gcc_version, '8.1') < 0:
+    if compareVersions(gcc_version, '4.9') >= 0:
         # Incremental linking with LTO is currently broken in gcc versions
-        # 4.9 to 8.1.
+        # 4.9 and above. A version where everything works completely hasn't
+        # yet been identified.
         #
         # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67548
-        #
+        main['BROKEN_INCREMENTAL_LTO'] = True
+    if compareVersions(gcc_version, '6.0') >= 0:
         # gcc versions 6.0 and greater accept an -flinker-output flag which
         # selects what type of output the linker should generate. This is
         # necessary for incremental lto to work, but is also broken in
-        # versions of gcc up to 8.1.
+        # current versions of gcc. It may not be necessary in future
+        # versions. We add it here since it might be, and as a reminder that
+        # it exists. It's excluded if lto is being forced.
         #
         # https://gcc.gnu.org/gcc-6/changes.html
         # https://gcc.gnu.org/ml/gcc-patches/2015-11/msg03161.html
         # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69866
-        main['BROKEN_INCREMENTAL_LTO'] = True
+        if not GetOption('force_lto'):
+            main.Append(PSHLINKFLAGS='-flinker-output=rel')
+            main.Append(PLINKFLAGS='-flinker-output=rel')
 
     disable_lto = GetOption('no_lto')
     if not disable_lto and main.get('BROKEN_INCREMENTAL_LTO', False) and \
@@ -471,6 +476,11 @@ elif main['CLANG']:
                          # interchangeably.
                          '-Wno-mismatched-tags',
                          ])
+    if compareVersions(clang_version, "10.0") >= 0:
+        main.Append(CCFLAGS=['-Wno-c99-designator'])
+
+    if compareVersions(clang_version, "8.0") >= 0:
+        main.Append(CCFLAGS=['-Wno-defaulted-function-deleted'])
 
     main.Append(TCMALLOC_CCFLAGS=['-fno-builtin'])