forked from len0rd/rockbox
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
This commit is contained in:
parent
a532b60416
commit
ee1f54ca01
1 changed files with 12 additions and 3 deletions
|
@ -76,6 +76,7 @@ systemdlls = ['advapi32.dll',
|
||||||
|
|
||||||
gitrepo = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
|
gitrepo = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
|
||||||
|
|
||||||
|
|
||||||
# == Functions ==
|
# == Functions ==
|
||||||
def usage(myself):
|
def usage(myself):
|
||||||
print "Usage: %s [options]" % myself
|
print "Usage: %s [options]" % myself
|
||||||
|
@ -621,7 +622,7 @@ def deploy():
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
dllfiles = finddlls(sourcefolder + "/" + progexe[platform], \
|
dllfiles = finddlls(sourcefolder + "/" + progexe[platform], \
|
||||||
[os.path.dirname(qm)], cross)
|
[os.path.dirname(qm)], cross)
|
||||||
if dllfiles.count > 0:
|
if len(dllfiles) > 0:
|
||||||
progfiles.extend(dllfiles)
|
progfiles.extend(dllfiles)
|
||||||
archive = zipball(progfiles, ver, sourcefolder, platform)
|
archive = zipball(progfiles, ver, sourcefolder, platform)
|
||||||
# only when running native right now.
|
# only when running native right now.
|
||||||
|
@ -632,8 +633,16 @@ def deploy():
|
||||||
elif platform == "darwin":
|
elif platform == "darwin":
|
||||||
archive = macdeploy(ver, sourcefolder, platform)
|
archive = macdeploy(ver, sourcefolder, platform)
|
||||||
else:
|
else:
|
||||||
if os.uname()[4].endswith("64"):
|
if platform == "linux2":
|
||||||
ver += "-64bit"
|
for p in progfiles:
|
||||||
|
prog = sourcefolder + "/" + p
|
||||||
|
output = subprocess.Popen(["file", prog],
|
||||||
|
stdout=subprocess.PIPE)
|
||||||
|
res = output.communicate()
|
||||||
|
if re.findall("ELF 64-bit", res[0]):
|
||||||
|
ver += "-64bit"
|
||||||
|
break
|
||||||
|
|
||||||
archive = tarball(progfiles, ver, sourcefolder)
|
archive = tarball(progfiles, ver, sourcefolder)
|
||||||
|
|
||||||
# remove temporary files
|
# remove temporary files
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue