changeset 133d8bb2024f in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=133d8bb2024f
description:
scons: remove dead leading underscore check
e56c3d8 (2008) added it but 8e37348 (2010) removed its only use.
diffstat:
SConstruct | 31 -------------------------------
1 files changed, 0 insertions(+), 31 deletions(-)
diffs (51 lines):
diff -r 61a56f76222b -r 133d8bb2024f SConstruct
--- a/SConstruct Fri Jul 03 10:14:34 2015 -0400
+++ b/SConstruct Fri Jul 03 10:14:35 2015 -0400
@@ -819,32 +819,6 @@
# replace the scanners list that has what we want
main['SCANNERS'] = scanners
-# Add a custom Check function to the Configure context so that we can
-# figure out if the compiler adds leading underscores to global
-# variables. This is needed for the autogenerated asm files that we
-# use for embedding the python code.
-def CheckLeading(context):
- context.Message("Checking for leading underscore in global variables...")
- # 1) Define a global variable called x from asm so the C compiler
- # won't change the symbol at all.
- # 2) Declare that variable.
- # 3) Use the variable
- #
- # If the compiler prepends an underscore, this will successfully
- # link because the external symbol 'x' will be called '_x' which
- # was defined by the asm statement. If the compiler does not
- # prepend an underscore, this will not successfully link because
- # '_x' will have been defined by assembly, while the C portion of
- # the code will be trying to use 'x'
- ret = context.TryLink('''
- asm(".globl _x; _x: .byte 0");
- extern int x;
- int main() { return x; }
- ''', extension=".c")
- context.env.Append(LEADING_UNDERSCORE=ret)
- context.Result(ret)
- return ret
-
# Add a custom Check function to test for structure members.
def CheckMember(context, include, decl, member, include_quotes="<>"):
context.Message("Checking for member %s in %s..." %
@@ -871,14 +845,9 @@
conf_dir = joinpath(build_root, '.scons_config'),
log_file = joinpath(build_root, 'scons_config.log'),
custom_tests = {
- 'CheckLeading' : CheckLeading,
'CheckMember' : CheckMember,
})
-# Check for leading underscores. Don't really need to worry either
-# way so don't need to check the return code.
-conf.CheckLeading()
-
# Check if we should compile a 64 bit binary on Mac OS X/Darwin
try:
import platform
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev