base: Use system libelf instead of ext
[gem5.git] / SConstruct
index 4dc48ae78d13b7bb72496a2f107a949bc41b1d43..bbfa37ad5e10f4f2a6e76576de1fd2ec316223a1 100755 (executable)
@@ -748,6 +748,10 @@ if not conf.CheckLibWithHeader('z', 'zlib.h', 'C++','zlibVersion();'):
           'and/or zlib.h header file.\n'
           'Please install zlib and try again.')
 
+if not conf.CheckLibWithHeader('elf', 'gelf.h', 'C++',
+                               'elf_version(EV_CURRENT);'):
+    error('Did not find ELF access library libelf')
+
 # If we have the protobuf compiler, also make sure we have the
 # development libraries. If the check passes, libprotobuf will be
 # automatically added to the LIBS environment variable. After
@@ -1000,8 +1004,6 @@ sticky_vars.AddVariables(
     BoolVariable('USE_POSIX_CLOCK', 'Use POSIX Clocks', have_posix_clock),
     BoolVariable('USE_FENV', 'Use <fenv.h> IEEE mode control', have_fenv),
     BoolVariable('USE_PNG',  'Enable support for PNG images', have_png),
-    BoolVariable('CP_ANNOTATE', 'Enable critical path annotation capability',
-                 False),
     BoolVariable('USE_KVM', 'Enable hardware virtualized (KVM) CPU models',
                  have_kvm),
     BoolVariable('USE_TUNTAP',
@@ -1018,7 +1020,7 @@ sticky_vars.AddVariables(
     )
 
 # These variables get exported to #defines in config/*.hh (see src/SConscript).
-export_vars += ['USE_FENV', 'TARGET_ISA', 'TARGET_GPU_ISA', 'CP_ANNOTATE',
+export_vars += ['USE_FENV', 'TARGET_ISA', 'TARGET_GPU_ISA',
                 'USE_POSIX_CLOCK', 'USE_KVM', 'USE_TUNTAP', 'PROTOCOL',
                 'HAVE_PROTOBUF', 'HAVE_VALGRIND',
                 'HAVE_PERF_ATTR_EXCLUDE_HOST', 'USE_PNG',