Support Arch (x84_64, aarch64) 85/92485/3
authorSeunghwan Lee <sh.cat.lee@samsung.com>
Mon, 17 Oct 2016 07:06:31 +0000 (16:06 +0900)
committerSeunghwan Lee <sh.cat.lee@samsung.com>
Thu, 20 Oct 2016 10:10:12 +0000 (19:10 +0900)
Change-Id: I909b54d44e44728cb45543be9a503428b752020e
Signed-off-by: Seunghwan Lee <sh.cat.lee@samsung.com>
abs [changed mode: 0644->0755]

diff --git a/abs b/abs
old mode 100644 (file)
new mode 100755 (executable)
index d7b9d9c..6fdbd34
--- a/abs
+++ b/abs
@@ -154,7 +154,7 @@ class _Rootstrap(object):
         cmdline = self.tizen + ' list rootstrap'
         ret = Executor().run(cmdline, show=False)
         for x in ret.splitlines():
-            if re.search('(mobile|wearable)-(2.4|3.0)-(device|emulator).core.*', x):
+            if re.search('(mobile|wearable)-(2.4|3.0)-(device|emulator|device64|emulator64).core.*', x):
                 if self.rootstrap_list == None:
                     self.rootstrap_list = []
                 self.rootstrap_list.append(x.split(' ')[0])
@@ -348,16 +348,21 @@ class Sdk(object):
             rootstrap = _rootstrap
             self.arch = 'x86'
         elif arch is None:
-            if 'emulator' in rootstrap: self.arch = 'x86'
+            if 'emulator64' in rootstrap: self.arch = 'x86_64'
+            elif 'device64' in rootstrap: self.arch = 'aarch64'
+            elif 'emulator' in rootstrap: self.arch = 'x86'
             elif 'device' in rootstrap: self.arch = 'arm'
         elif rootstrap is None:
-            if arch not in ['x86', 'arm']:
+            if arch not in ['x86', 'arm', 'aarch64', 'x86_64']:
                 raise LocalError('Architecture and rootstrap mismatch')
+
             rootstrap = _rootstrap
-            if arch == 'arm': rootstrap = rootstrap.replace('emulator', 'device')
+            if arch == 'x86_64': rootstrap = rootstrap.replace('emulator', 'emulator64')
+            elif arch == 'aarch64': rootstrap = rootstrap.replace('emulator', 'device64')
+            elif arch == 'arm': rootstrap = rootstrap.replace('emulator', 'device')
 
         for x in source.project_list:
-            out = self._run('build-native', ['-r', rootstrap, '-a', self.arch, '-C', conf, '--' , x['path']], checker=True)
+            out = self._run('build-native', ['-r', rootstrap, '-a', self.arch, '-C', conf, '-c', 'gcc', '--' , x['path']], checker=True)
             logpath = os.path.join(source.output_dir, \
                                   'build_%s_%s' % (rootstrap, os.path.basename(x['path'])))
             if not os.path.isdir(source.output_dir):
@@ -452,6 +457,10 @@ class Sdk(object):
                 strip_cmd = os.path.join(os.path.dirname(self.tizen), '../../i386-linux-gnueabi-gcc-4.9/bin/i386-linux-gnueabi-strip')
             elif self.arch == 'arm' :
                 strip_cmd = os.path.join(os.path.dirname(self.tizen), '../../arm-linux-gnueabi-gcc-4.9/bin/arm-linux-gnueabi-strip')
+            elif self.arch == 'x86_64' :
+                strip_cmd = os.path.join(os.path.dirname(self.tizen), '../../x86_64-linux-gnu-gcc-4.9/bin/x86_64-linux-gnu-strip')
+            elif self.arch == 'aarch64' :
+                strip_cmd = os.path.join(os.path.dirname(self.tizen), '../../aarch64-linux-gnu-gcc-4.9/bin/aarch64-linux-gnu-strip')
 
             print strip_cmd
 
@@ -580,7 +589,7 @@ def argument_parsing(argv):
     build.add_argument('-r', '--rootstrap', action='store', dest='rootstrap', \
                         help='(ex, mobile-3.0-device.core) rootstrap name')
     build.add_argument('-a', '--arch', action='store', dest='arch', \
-                        help='(x86|arm) Architecture to build')
+                        help='(x86|arm|x86_64|aarch64) Architecture to build')
     build.add_argument('-t', '--type', action='store', dest='type', \
                         help='(tpk|wgt) Packaging type')
     build.add_argument('-s', '--cert', action='store', dest='cert', \