diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2012-02-26 17:09:08 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2012-02-26 17:11:36 +0100 |
commit | ee1f54ca0101030beb047e89327dcb76feee0c1b (patch) | |
tree | 8c15085345a44894faf9c040a2d9331033bc550c | |
parent | a532b6041602f2f2129dd3130a3bb0a67bc156e9 (diff) | |
download | rockbox-ee1f54ca0101030beb047e89327dcb76feee0c1b.tar.gz rockbox-ee1f54ca0101030beb047e89327dcb76feee0c1b.zip |
Append "64bit" only on 64bit binary.
Don't rely on the build host having the same bitsize as the created binary.
Fixes building a 32bit binary getting a "64bit" postfix when built on a 64bit
Linux.
Change-Id: I2aa61dee82beddd60ebfc8e227551ea49d769664
-rwxr-xr-x | utils/common/deploy.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/utils/common/deploy.py b/utils/common/deploy.py index a01954c42d..070cea65b5 100755 --- a/utils/common/deploy.py +++ b/utils/common/deploy.py | |||
@@ -76,6 +76,7 @@ systemdlls = ['advapi32.dll', | |||
76 | 76 | ||
77 | gitrepo = os.path.abspath(os.path.join(os.path.dirname(__file__), "../..")) | 77 | gitrepo = os.path.abspath(os.path.join(os.path.dirname(__file__), "../..")) |
78 | 78 | ||
79 | |||
79 | # == Functions == | 80 | # == Functions == |
80 | def usage(myself): | 81 | def usage(myself): |
81 | print "Usage: %s [options]" % myself | 82 | print "Usage: %s [options]" % myself |
@@ -621,7 +622,7 @@ def deploy(): | |||
621 | sys.exit(1) | 622 | sys.exit(1) |
622 | dllfiles = finddlls(sourcefolder + "/" + progexe[platform], \ | 623 | dllfiles = finddlls(sourcefolder + "/" + progexe[platform], \ |
623 | [os.path.dirname(qm)], cross) | 624 | [os.path.dirname(qm)], cross) |
624 | if dllfiles.count > 0: | 625 | if len(dllfiles) > 0: |
625 | progfiles.extend(dllfiles) | 626 | progfiles.extend(dllfiles) |
626 | archive = zipball(progfiles, ver, sourcefolder, platform) | 627 | archive = zipball(progfiles, ver, sourcefolder, platform) |
627 | # only when running native right now. | 628 | # only when running native right now. |
@@ -632,8 +633,16 @@ def deploy(): | |||
632 | elif platform == "darwin": | 633 | elif platform == "darwin": |
633 | archive = macdeploy(ver, sourcefolder, platform) | 634 | archive = macdeploy(ver, sourcefolder, platform) |
634 | else: | 635 | else: |
635 | if os.uname()[4].endswith("64"): | 636 | if platform == "linux2": |
636 | ver += "-64bit" | 637 | for p in progfiles: |
638 | prog = sourcefolder + "/" + p | ||
639 | output = subprocess.Popen(["file", prog], | ||
640 | stdout=subprocess.PIPE) | ||
641 | res = output.communicate() | ||
642 | if re.findall("ELF 64-bit", res[0]): | ||
643 | ver += "-64bit" | ||
644 | break | ||
645 | |||
637 | archive = tarball(progfiles, ver, sourcefolder) | 646 | archive = tarball(progfiles, ver, sourcefolder) |
638 | 647 | ||
639 | # remove temporary files | 648 | # remove temporary files |