Commit 5132893c authored by Ronald Oussoren's avatar Ronald Oussoren

Finish support for --with-universal-archs=intel

and --with-universal-archs=3-way (issue6245)
parent 7bb74b86
...@@ -144,11 +144,26 @@ def get_platform(): ...@@ -144,11 +144,26 @@ def get_platform():
machine = 'fat' machine = 'fat'
cflags = get_config_vars().get('CFLAGS') cflags = get_config_vars().get('CFLAGS')
if '-arch x86_64' in cflags: archs = re.findall('-arch\s+(\S+)', cflags)
if '-arch i386' in cflags: archs.sort()
archs = tuple(archs)
if len(archs) == 1:
machine = archs[0]
elif archs == ('i386', 'ppc'):
machine = 'fat'
elif archs == ('i386', 'x86_64'):
machine = 'intel'
elif archs == ('i386', 'ppc', 'x86_64'):
machine = 'fat3'
elif archs == ('ppc64', 'x86_64'):
machine = 'fat64'
elif archs == ('i386', 'ppc', 'ppc64', 'x86_64'):
machine = 'universal' machine = 'universal'
else: else:
machine = 'fat64' raise ValueError(
"Don't know machine value for archs=%r"%(archs,))
elif machine in ('PowerPC', 'Power_Macintosh'): elif machine in ('PowerPC', 'Power_Macintosh'):
# Pick a sane name for the PPC architecture. # Pick a sane name for the PPC architecture.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment