packages/libffado/libffado-simple-power-detect.patch

48 lines
2.0 KiB
Diff

--- libffado-2.4.1/SConstruct.orig 2019-02-20 12:16:38.576884822 +0100
+++ libffado-2.4.1/SConstruct 2019-02-20 12:17:11.466999088 +0100
@@ -606,8 +606,7 @@
# 64-bit (x86_64/AMD64/Intel64)
# Long Mode (x86-64: amd64, also known as Intel 64, i.e. 64-bit capable)
self.is_64bit = (self.is_x86 and 'lm' in self.x86_flags) or \
- (self.is_powerpc and \
- ('970' in self.ppc_type or 'power8' in self.ppc_type.lower()))
+ (self.is_powerpc)
# Hardware virtualization capable: vmx (Intel), svm (AMD)
self.has_hwvirt = self.is_x86 and (
@@ -768,22 +767,9 @@
"""add certain gcc -m flags based on CPU model
"""
cc_opts = []
- if cpuinfo.is_altivec_supported:
- cc_opts.append ('-maltivec')
- cc_opts.append ('-mabi=altivec')
-
- if re.match('74[0145][0578]A?', cpuinfo.ppc_type) is not None:
- cc_opts.append ('-mcpu=7400')
- cc_opts.append ('-mtune=7400')
- elif re.match('750', cpuinfo.ppc_type) is not None:
- cc_opts.append ('-mcpu=750')
- cc_opts.append ('-mtune=750')
- elif re.match('PPC970', cpuinfo.ppc_type) is not None:
- cc_opts.append ('-mcpu=970')
- cc_opts.append ('-mtune=970')
- elif re.match('Cell Broadband Engine', cpuinfo.ppc_type) is not None:
- cc_opts.append('-mcpu=cell')
- cc_opts.append('-mtune=cell')
+ cc_opts.append ('-maltivec')
+ cc_opts.append ('-mabi=altivec')
+
return cc_opts
#=== End Revised CXXFLAGS =========================================
@@ -826,7 +812,7 @@
print("Doing a 32-bit PowerPC build for %s CPU" % cpuinfo.ppc_type)
machineflags = { 'CXXFLAGS' : ['-m32'] }
else:
- print("Doing a 64-bit PowerPC build for %s CPU" % cpuinfo.ppc_type)
+ print("Doing a 64-bit PowerPC build for POWER8 CPU")
machineflags = { 'CXXFLAGS' : ['-m64'] }
env.MergeFlags( machineflags )
elif cpuinfo.is_x86: