Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/40857 )
Change subject: scons: Trim down a check for mac OS and arch setting flags.
......................................................................
scons: Trim down a check for mac OS and arch setting flags.
This check used uname to determine if scons was running on macos, and
then a fairly elaborate check to see if the version was above 9, and if
the hardware supported 64 bit. I think at this point it's safe to assume
both that we're at least at macos 10 which is 19 years old, and that Mac
hardware supports 64 bit.
We may even be able to remove this chunk of code entirely since I
wouldn't be surprised if 64 bit was now the default, but I couldn't find
any documentation to back that up, nor do I have access to a machine
running MacOS where I could try it.
Change-Id: Ice66df2530bbcc929d3a37e7679634b75ba7b860
---
M SConstruct
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/SConstruct b/SConstruct
index f7726e9..7ec4d77 100755
--- a/SConstruct
+++ b/SConstruct
@@ -574,18 +574,12 @@
'CheckLinkFlag' : CheckLinkFlag,
})
-# Check if we should compile a 64 bit binary on Mac OS X/Darwin
-try:
- import platform
- uname = platform.uname()
- if uname[0] == 'Darwin' and compareVersions(uname[2], '9.0.0') >= 0:
- if int(readCommand('sysctl -n hw.cpu64bit_capable')[0]):
- main.Append(CCFLAGS=['-arch', 'x86_64'])
- main.Append(CFLAGS=['-arch', 'x86_64'])
- main.Append(LINKFLAGS=['-arch', 'x86_64'])
- main.Append(ASFLAGS=['-arch', 'x86_64'])
-except:
- pass
+# We should compile a 64 bit binary on Mac OS X/Darwin
+if sys.platform == "darwin":
+ main.Append(CCFLAGS=['-arch', 'x86_64'])
+ main.Append(CFLAGS=['-arch', 'x86_64'])
+ main.Append(LINKFLAGS=['-arch', 'x86_64'])
+ main.Append(ASFLAGS=['-arch', 'x86_64'])
# Recent versions of scons substitute a "Null" object for Configure()
# when configuration isn't necessary, e.g., if the "--help" option is
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/40857
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ice66df2530bbcc929d3a37e7679634b75ba7b860
Gerrit-Change-Number: 40857
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s