mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-04 20:06:43 +02:00
testing/py3-litex-hub-modules: new aport
https://github.com/litex-hub Python modules containing verilog and/or data files for use with LiteX
This commit is contained in:
parent
8c554f697b
commit
ac188023ea
@ -0,0 +1,405 @@
|
||||
Ran 2to3 to run python code on python3
|
||||
diff --color -rupN a/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/lib/asan/scripts/asan_symbolize.py b/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/lib/asan/scripts/asan_symbolize.py
|
||||
--- a/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/lib/asan/scripts/asan_symbolize.py 2020-04-09 07:33:54.000000000 +0200
|
||||
+++ b/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/lib/asan/scripts/asan_symbolize.py 2024-01-11 13:21:54.089653123 +0100
|
||||
@@ -84,7 +84,7 @@ class LLVMSymbolizer(Symbolizer):
|
||||
for hint in self.dsym_hints:
|
||||
cmd.append('--dsym-hint=%s' % hint)
|
||||
if DEBUG:
|
||||
- print ' '.join(cmd)
|
||||
+ print(' '.join(cmd))
|
||||
try:
|
||||
result = subprocess.Popen(cmd, stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE)
|
||||
@@ -100,8 +100,8 @@ class LLVMSymbolizer(Symbolizer):
|
||||
try:
|
||||
symbolizer_input = '"%s" %s' % (binary, offset)
|
||||
if DEBUG:
|
||||
- print symbolizer_input
|
||||
- print >> self.pipe.stdin, symbolizer_input
|
||||
+ print(symbolizer_input)
|
||||
+ print(symbolizer_input, file=self.pipe.stdin)
|
||||
while True:
|
||||
function_name = self.pipe.stdout.readline().rstrip()
|
||||
if not function_name:
|
||||
@@ -146,7 +146,7 @@ class Addr2LineSymbolizer(Symbolizer):
|
||||
cmd += ['--demangle']
|
||||
cmd += ['-e', self.binary]
|
||||
if DEBUG:
|
||||
- print ' '.join(cmd)
|
||||
+ print(' '.join(cmd))
|
||||
return subprocess.Popen(cmd,
|
||||
stdin=subprocess.PIPE, stdout=subprocess.PIPE)
|
||||
|
||||
@@ -156,8 +156,8 @@ class Addr2LineSymbolizer(Symbolizer):
|
||||
return None
|
||||
lines = []
|
||||
try:
|
||||
- print >> self.pipe.stdin, offset
|
||||
- print >> self.pipe.stdin, self.output_terminator
|
||||
+ print(offset, file=self.pipe.stdin)
|
||||
+ print(self.output_terminator, file=self.pipe.stdin)
|
||||
is_first_frame = True
|
||||
while True:
|
||||
function_name = self.pipe.stdout.readline().rstrip()
|
||||
@@ -214,7 +214,7 @@ class DarwinSymbolizer(Symbolizer):
|
||||
|
||||
def open_atos(self):
|
||||
if DEBUG:
|
||||
- print 'atos -o %s -arch %s' % (self.binary, self.arch)
|
||||
+ print('atos -o %s -arch %s' % (self.binary, self.arch))
|
||||
cmdline = ['atos', '-o', self.binary, '-arch', self.arch]
|
||||
self.atos = UnbufferedLineConverter(cmdline, close_stderr=True)
|
||||
|
||||
@@ -229,7 +229,7 @@ class DarwinSymbolizer(Symbolizer):
|
||||
# foo(type1, type2) (in object.name) (filename.cc:80)
|
||||
match = re.match('^(.*) \(in (.*)\) \((.*:\d*)\)$', atos_line)
|
||||
if DEBUG:
|
||||
- print 'atos_line: ', atos_line
|
||||
+ print('atos_line: ', atos_line)
|
||||
if match:
|
||||
function_name = match.group(1)
|
||||
function_name = re.sub('\(.*?\)', '', function_name)
|
||||
@@ -304,7 +304,7 @@ class BreakpadSymbolizer(Symbolizer):
|
||||
pass
|
||||
elif fragments[0] == 'FUNC':
|
||||
cur_function_addr = int(fragments[1], 16)
|
||||
- if not cur_function_addr in self.symbols.keys():
|
||||
+ if not cur_function_addr in list(self.symbols.keys()):
|
||||
self.symbols[cur_function_addr] = ' '.join(fragments[4:])
|
||||
else:
|
||||
# Line starting with an address.
|
||||
@@ -319,7 +319,7 @@ class BreakpadSymbolizer(Symbolizer):
|
||||
|
||||
def get_sym_file_line(self, addr):
|
||||
key = None
|
||||
- if addr in self.addresses.keys():
|
||||
+ if addr in list(self.addresses.keys()):
|
||||
key = addr
|
||||
else:
|
||||
index = bisect.bisect_left(self.address_list, addr)
|
||||
@@ -343,7 +343,7 @@ class BreakpadSymbolizer(Symbolizer):
|
||||
function_name, file_name, line_no = res
|
||||
result = ['%s in %s %s:%d' % (
|
||||
addr, function_name, file_name, line_no)]
|
||||
- print result
|
||||
+ print(result)
|
||||
return result
|
||||
else:
|
||||
return None
|
||||
@@ -425,7 +425,7 @@ class SymbolizationLoop(object):
|
||||
self.frame_no = 0
|
||||
for line in logfile:
|
||||
processed = self.process_line(line)
|
||||
- print '\n'.join(processed)
|
||||
+ print('\n'.join(processed))
|
||||
|
||||
def process_line_echo(self, line):
|
||||
return [line.rstrip()]
|
||||
@@ -439,7 +439,7 @@ class SymbolizationLoop(object):
|
||||
if not match:
|
||||
return [self.current_line]
|
||||
if DEBUG:
|
||||
- print line
|
||||
+ print(line)
|
||||
_, frameno_str, addr, binary, offset = match.groups()
|
||||
if frameno_str == '0':
|
||||
# Assume that frame #0 is the first frame of new stack trace.
|
||||
diff --color -rupN a/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/lib/dfsan/scripts/build-libc-list.py b/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/lib/dfsan/scripts/build-libc-list.py
|
||||
--- a/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/lib/dfsan/scripts/build-libc-list.py 2020-04-09 07:33:54.000000000 +0200
|
||||
+++ b/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/lib/dfsan/scripts/build-libc-list.py 2024-01-11 13:21:54.209651423 +0100
|
||||
@@ -87,10 +87,10 @@ for l in libs:
|
||||
if os.path.exists(l):
|
||||
functions += defined_function_list(l)
|
||||
else:
|
||||
- print >> sys.stderr, 'warning: library %s not found' % l
|
||||
+ print('warning: library %s not found' % l, file=sys.stderr)
|
||||
|
||||
functions = list(set(functions))
|
||||
functions.sort()
|
||||
|
||||
for f in functions:
|
||||
- print 'fun:%s=uninstrumented' % f
|
||||
+ print('fun:%s=uninstrumented' % f)
|
||||
diff --color -rupN a/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/lib/sanitizer_common/scripts/cpplint.py b/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/lib/sanitizer_common/scripts/cpplint.py
|
||||
--- a/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/lib/sanitizer_common/scripts/cpplint.py 2020-04-09 07:33:54.000000000 +0200
|
||||
+++ b/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/lib/sanitizer_common/scripts/cpplint.py 2024-01-11 13:21:54.762976917 +0100
|
||||
@@ -321,7 +321,7 @@ _ALT_TOKEN_REPLACEMENT = {
|
||||
# and multi-line strings (http://go/beujw ), but those have always been
|
||||
# troublesome for cpplint.
|
||||
_ALT_TOKEN_REPLACEMENT_PATTERN = re.compile(
|
||||
- r'[ =()](' + ('|'.join(_ALT_TOKEN_REPLACEMENT.keys())) + r')(?=[ (]|$)')
|
||||
+ r'[ =()](' + ('|'.join(list(_ALT_TOKEN_REPLACEMENT.keys()))) + r')(?=[ (]|$)')
|
||||
|
||||
|
||||
# These constants define types of headers for use with
|
||||
@@ -620,7 +620,7 @@ class _CppLintState(object):
|
||||
|
||||
def PrintErrorCounts(self):
|
||||
"""Print a summary of errors by category, and the total."""
|
||||
- for category, count in self.errors_by_category.iteritems():
|
||||
+ for category, count in self.errors_by_category.items():
|
||||
sys.stderr.write('Category \'%s\' errors found: %d\n' %
|
||||
(category, count))
|
||||
sys.stderr.write('Total errors found: %d\n' % self.error_count)
|
||||
@@ -1041,7 +1041,7 @@ def FindEndOfExpressionInLine(line, star
|
||||
Returns:
|
||||
Index just after endchar.
|
||||
"""
|
||||
- for i in xrange(startpos, len(line)):
|
||||
+ for i in range(startpos, len(line)):
|
||||
if line[i] == startchar:
|
||||
depth += 1
|
||||
elif line[i] == endchar:
|
||||
@@ -1100,7 +1100,7 @@ def CheckForCopyright(filename, lines, e
|
||||
|
||||
# We'll say it should occur by line 10. Don't forget there's a
|
||||
# dummy line at the front.
|
||||
- for line in xrange(1, min(len(lines), 11)):
|
||||
+ for line in range(1, min(len(lines), 11)):
|
||||
if re.search(r'Copyright', lines[line], re.I): break
|
||||
else: # means no copyright line was found
|
||||
error(filename, 0, 'legal/copyright', 5,
|
||||
@@ -1221,7 +1221,7 @@ def CheckForUnicodeReplacementCharacters
|
||||
error: The function to call with any errors found.
|
||||
"""
|
||||
for linenum, line in enumerate(lines):
|
||||
- if u'\ufffd' in line:
|
||||
+ if '\ufffd' in line:
|
||||
error(filename, linenum, 'readability/utf8', 5,
|
||||
'Line contains invalid UTF-8 (or Unicode replacement character).')
|
||||
|
||||
@@ -1978,7 +1978,7 @@ def CheckForFunctionLengths(filename, cl
|
||||
|
||||
if starting_func:
|
||||
body_found = False
|
||||
- for start_linenum in xrange(linenum, clean_lines.NumLines()):
|
||||
+ for start_linenum in range(linenum, clean_lines.NumLines()):
|
||||
start_line = lines[start_linenum]
|
||||
joined_line += ' ' + start_line.lstrip()
|
||||
if Search(r'(;|})', start_line): # Declarations and trivial functions
|
||||
@@ -2777,7 +2777,7 @@ def GetLineWidth(line):
|
||||
The width of the line in column positions, accounting for Unicode
|
||||
combining characters and wide characters.
|
||||
"""
|
||||
- if isinstance(line, unicode):
|
||||
+ if isinstance(line, str):
|
||||
width = 0
|
||||
for uc in unicodedata.normalize('NFC', line):
|
||||
if unicodedata.east_asian_width(uc) in ('W', 'F'):
|
||||
@@ -3109,7 +3109,7 @@ def _GetTextInside(text, start_pattern):
|
||||
|
||||
# Give opening punctuations to get the matching close-punctuations.
|
||||
matching_punctuation = {'(': ')', '{': '}', '[': ']'}
|
||||
- closing_punctuation = set(matching_punctuation.itervalues())
|
||||
+ closing_punctuation = set(matching_punctuation.values())
|
||||
|
||||
# Find the position to start extracting text.
|
||||
match = re.search(start_pattern, text, re.M)
|
||||
@@ -3675,7 +3675,7 @@ def CheckForIncludeWhatYouUse(filename,
|
||||
required = {} # A map of header name to linenumber and the template entity.
|
||||
# Example of required: { '<functional>': (1219, 'less<>') }
|
||||
|
||||
- for linenum in xrange(clean_lines.NumLines()):
|
||||
+ for linenum in range(clean_lines.NumLines()):
|
||||
line = clean_lines.elided[linenum]
|
||||
if not line or line[0] == '#':
|
||||
continue
|
||||
@@ -3723,7 +3723,7 @@ def CheckForIncludeWhatYouUse(filename,
|
||||
|
||||
# include_state is modified during iteration, so we iterate over a copy of
|
||||
# the keys.
|
||||
- header_keys = include_state.keys()
|
||||
+ header_keys = list(include_state.keys())
|
||||
for header in header_keys:
|
||||
(same_module, common_path) = FilesBelongToSameModule(abs_filename, header)
|
||||
fullpath = common_path + header
|
||||
@@ -3842,7 +3842,7 @@ def ProcessFileData(filename, file_exten
|
||||
|
||||
RemoveMultiLineComments(filename, lines, error)
|
||||
clean_lines = CleansedLines(lines)
|
||||
- for line in xrange(clean_lines.NumLines()):
|
||||
+ for line in range(clean_lines.NumLines()):
|
||||
ProcessLine(filename, file_extension, clean_lines, line,
|
||||
include_state, function_state, nesting_state, error,
|
||||
extra_check_functions)
|
||||
diff --color -rupN a/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/lib/sanitizer_common/scripts/gen_dynamic_list.py b/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/lib/sanitizer_common/scripts/gen_dynamic_list.py
|
||||
--- a/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/lib/sanitizer_common/scripts/gen_dynamic_list.py 2020-04-09 07:33:54.000000000 +0200
|
||||
+++ b/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/lib/sanitizer_common/scripts/gen_dynamic_list.py 2024-01-11 13:21:54.896308362 +0100
|
||||
@@ -100,7 +100,7 @@ def main(argv):
|
||||
print('global:')
|
||||
result.sort()
|
||||
for f in result:
|
||||
- print(u' %s;' % f)
|
||||
+ print((' %s;' % f))
|
||||
if args.version_list:
|
||||
print('local:')
|
||||
print(' *;')
|
||||
diff --color -rupN a/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/lib/sanitizer_common/scripts/sancov.py b/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/lib/sanitizer_common/scripts/sancov.py
|
||||
--- a/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/lib/sanitizer_common/scripts/sancov.py 2020-04-09 07:33:54.000000000 +0200
|
||||
+++ b/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/lib/sanitizer_common/scripts/sancov.py 2024-01-11 13:21:55.032973093 +0100
|
||||
@@ -14,12 +14,12 @@ import sys
|
||||
prog_name = ""
|
||||
|
||||
def Usage():
|
||||
- print >> sys.stderr, "Usage: \n" + \
|
||||
+ print("Usage: \n" + \
|
||||
" " + prog_name + " merge FILE [FILE...] > OUTPUT\n" \
|
||||
" " + prog_name + " print FILE [FILE...]\n" \
|
||||
" " + prog_name + " unpack FILE [FILE...]\n" \
|
||||
" " + prog_name + " rawunpack FILE [FILE ...]\n" \
|
||||
- " " + prog_name + " missing BINARY < LIST_OF_PCS\n"
|
||||
+ " " + prog_name + " missing BINARY < LIST_OF_PCS\n", file=sys.stderr)
|
||||
exit(1)
|
||||
|
||||
def CheckBits(bits):
|
||||
@@ -65,15 +65,15 @@ def ReadOneFile(path):
|
||||
bits = ReadMagicAndReturnBitness(f, path)
|
||||
size -= 8
|
||||
s = array.array(TypeCodeForBits(bits), f.read(size))
|
||||
- print >>sys.stderr, "%s: read %d %d-bit PCs from %s" % (prog_name, size * 8 / bits, bits, path)
|
||||
+ print("%s: read %d %d-bit PCs from %s" % (prog_name, size * 8 / bits, bits, path), file=sys.stderr)
|
||||
return s
|
||||
|
||||
def Merge(files):
|
||||
s = set()
|
||||
for f in files:
|
||||
s = s.union(set(ReadOneFile(f)))
|
||||
- print >> sys.stderr, "%s: %d files merged; %d PCs total" % \
|
||||
- (prog_name, len(files), len(s))
|
||||
+ print("%s: %d files merged; %d PCs total" % \
|
||||
+ (prog_name, len(files), len(s)), file=sys.stderr)
|
||||
return sorted(s)
|
||||
|
||||
def PrintFiles(files):
|
||||
@@ -81,10 +81,10 @@ def PrintFiles(files):
|
||||
s = Merge(files)
|
||||
else: # If there is just on file, print the PCs in order.
|
||||
s = ReadOneFile(files[0])
|
||||
- print >> sys.stderr, "%s: 1 file merged; %d PCs total" % \
|
||||
- (prog_name, len(s))
|
||||
+ print("%s: 1 file merged; %d PCs total" % \
|
||||
+ (prog_name, len(s)), file=sys.stderr)
|
||||
for i in s:
|
||||
- print "0x%x" % i
|
||||
+ print("0x%x" % i)
|
||||
|
||||
def MergeAndPrint(files):
|
||||
if sys.stdout.isatty():
|
||||
@@ -100,7 +100,7 @@ def MergeAndPrint(files):
|
||||
|
||||
def UnpackOneFile(path):
|
||||
with open(path, mode="rb") as f:
|
||||
- print >> sys.stderr, "%s: unpacking %s" % (prog_name, path)
|
||||
+ print("%s: unpacking %s" % (prog_name, path), file=sys.stderr)
|
||||
while True:
|
||||
header = f.read(12)
|
||||
if not header: return
|
||||
@@ -112,8 +112,8 @@ def UnpackOneFile(path):
|
||||
assert(len(module) == module_length)
|
||||
assert(len(blob) == blob_size)
|
||||
extracted_file = "%s.%d.sancov" % (module, pid)
|
||||
- print >> sys.stderr, "%s: extracting %s" % \
|
||||
- (prog_name, extracted_file)
|
||||
+ print("%s: extracting %s" % \
|
||||
+ (prog_name, extracted_file), file=sys.stderr)
|
||||
# The packed file may contain multiple blobs for the same pid/module
|
||||
# pair. Append to the end of the file instead of overwriting.
|
||||
with open(extracted_file, 'ab') as f2:
|
||||
@@ -129,7 +129,7 @@ def Unpack(files):
|
||||
def UnpackOneRawFile(path, map_path):
|
||||
mem_map = []
|
||||
with open(map_path, mode="rt") as f_map:
|
||||
- print >> sys.stderr, "%s: reading map %s" % (prog_name, map_path)
|
||||
+ print("%s: reading map %s" % (prog_name, map_path), file=sys.stderr)
|
||||
bits = int(f_map.readline())
|
||||
if bits != 32 and bits != 64:
|
||||
raise Exception('Wrong bits size in the map')
|
||||
@@ -143,7 +143,7 @@ def UnpackOneRawFile(path, map_path):
|
||||
mem_map_keys = [m[0] for m in mem_map]
|
||||
|
||||
with open(path, mode="rb") as f:
|
||||
- print >> sys.stderr, "%s: unpacking %s" % (prog_name, path)
|
||||
+ print("%s: unpacking %s" % (prog_name, path), file=sys.stderr)
|
||||
|
||||
f.seek(0, 2)
|
||||
size = f.tell()
|
||||
@@ -157,7 +157,7 @@ def UnpackOneRawFile(path, map_path):
|
||||
(start, end, base, module_path) = mem_map[map_idx]
|
||||
assert pc >= start
|
||||
if pc >= end:
|
||||
- print >> sys.stderr, "warning: %s: pc %x outside of any known mapping" % (prog_name, pc)
|
||||
+ print("warning: %s: pc %x outside of any known mapping" % (prog_name, pc), file=sys.stderr)
|
||||
continue
|
||||
mem_map_pcs[map_idx].append(pc - base)
|
||||
|
||||
@@ -165,7 +165,7 @@ def UnpackOneRawFile(path, map_path):
|
||||
if len(pc_list) == 0: continue
|
||||
assert path.endswith('.sancov.raw')
|
||||
dst_path = module_path + '.' + os.path.basename(path)[:-4]
|
||||
- print >> sys.stderr, "%s: writing %d PCs to %s" % (prog_name, len(pc_list), dst_path)
|
||||
+ print("%s: writing %d PCs to %s" % (prog_name, len(pc_list), dst_path), file=sys.stderr)
|
||||
arr = array.array(TypeCodeForBits(bits))
|
||||
arr.fromlist(sorted(pc_list))
|
||||
with open(dst_path, 'ab') as f2:
|
||||
@@ -199,18 +199,17 @@ def PrintMissing(binary):
|
||||
if not os.path.isfile(binary):
|
||||
raise Exception('File not found: %s' % binary)
|
||||
instrumented = GetInstrumentedPCs(binary)
|
||||
- print >> sys.stderr, "%s: found %d instrumented PCs in %s" % (prog_name,
|
||||
+ print("%s: found %d instrumented PCs in %s" % (prog_name,
|
||||
len(instrumented),
|
||||
- binary)
|
||||
+ binary), file=sys.stderr)
|
||||
covered = set(int(line, 16) for line in sys.stdin)
|
||||
- print >> sys.stderr, "%s: read %d PCs from stdin" % (prog_name, len(covered))
|
||||
+ print("%s: read %d PCs from stdin" % (prog_name, len(covered)), file=sys.stderr)
|
||||
missing = instrumented - covered
|
||||
- print >> sys.stderr, "%s: %d PCs missing from coverage" % (prog_name, len(missing))
|
||||
+ print("%s: %d PCs missing from coverage" % (prog_name, len(missing)), file=sys.stderr)
|
||||
if (len(missing) > len(instrumented) - len(covered)):
|
||||
- print >> sys.stderr, \
|
||||
- "%s: WARNING: stdin contains PCs not found in binary" % prog_name
|
||||
+ print("%s: WARNING: stdin contains PCs not found in binary" % prog_name, file=sys.stderr)
|
||||
for pc in sorted(missing):
|
||||
- print "0x%x" % pc
|
||||
+ print("0x%x" % pc)
|
||||
|
||||
if __name__ == '__main__':
|
||||
prog_name = sys.argv[0]
|
||||
diff --color -rupN a/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/test/asan/android_commands/android_common.py b/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/test/asan/android_commands/android_common.py
|
||||
--- a/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/test/asan/android_commands/android_common.py 2020-04-09 07:33:54.000000000 +0200
|
||||
+++ b/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/test/asan/android_commands/android_common.py 2024-01-11 13:21:55.146304820 +0100
|
||||
@@ -10,7 +10,7 @@ if os.environ.get('ANDROID_RUN_VERBOSE')
|
||||
|
||||
def adb(args):
|
||||
if verbose:
|
||||
- print args
|
||||
+ print(args)
|
||||
devnull = open(os.devnull, 'w')
|
||||
return subprocess.call([ADB] + args, stdout=devnull, stderr=subprocess.STDOUT)
|
||||
|
||||
diff --color -rupN a/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/test/asan/android_commands/android_compile.py b/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/test/asan/android_commands/android_compile.py
|
||||
--- a/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/test/asan/android_commands/android_compile.py 2020-04-09 07:33:54.000000000 +0200
|
||||
+++ b/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/test/asan/android_commands/android_compile.py 2024-01-11 13:21:55.259636548 +0100
|
||||
@@ -21,7 +21,7 @@ while args:
|
||||
output = args.pop(0)
|
||||
|
||||
if output == None:
|
||||
- print "No output file name!"
|
||||
+ print("No output file name!")
|
||||
sys.exit(1)
|
||||
|
||||
ret = subprocess.call(sys.argv[1:])
|
||||
diff --color -rupN a/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/test/asan/android_commands/android_run.py b/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/test/asan/android_commands/android_run.py
|
||||
--- a/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/test/asan/android_commands/android_run.py 2020-04-09 07:33:54.000000000 +0200
|
||||
+++ b/pythondata-software-compiler_rt-2020.04/pythondata_software_compiler_rt/data/test/asan/android_commands/android_run.py 2024-01-11 13:21:55.372968276 +0100
|
||||
@@ -13,7 +13,7 @@ def build_env():
|
||||
# Android linker ignores RPATH. Set LD_LIBRARY_PATH to Output dir.
|
||||
args.append('LD_LIBRARY_PATH=%s:%s' %
|
||||
(ANDROID_TMPDIR, os.environ.get('LD_LIBRARY_PATH', '')))
|
||||
- for (key, value) in os.environ.items():
|
||||
+ for (key, value) in list(os.environ.items()):
|
||||
if key in ['ASAN_OPTIONS', 'ASAN_ACTIVATION_OPTIONS']:
|
||||
args.append('%s="%s"' % (key, value))
|
||||
return ' '.join(args)
|
||||
File diff suppressed because it is too large
Load Diff
230
testing/py3-litex-hub-modules/APKBUILD
Normal file
230
testing/py3-litex-hub-modules/APKBUILD
Normal file
@ -0,0 +1,230 @@
|
||||
# Contributor: Marian Buschsieweke <marian.buschsieweke@posteo.net>
|
||||
# Maintainer: Marian Buschsieweke <marian.buschsieweke@posteo.net>
|
||||
pkgname=py3-litex-hub-modules
|
||||
_pkgname=litex
|
||||
pkgver=2023.12
|
||||
pkgrel=0
|
||||
pkgdesc="Python modules containing verilog and/or data files for use with LiteX"
|
||||
url="https://github.com/litex-hub"
|
||||
license="BSD-2-Clause"
|
||||
arch="all"
|
||||
# match this commit against https://github.com/litex-hub/pythondata-software-picolibc/tree/master/pythondata_software_picolibc
|
||||
_picolibc_commit="f165dc22f1f67e3e8bdc8edf750ff7dc596de2ff"
|
||||
_fpnew_commit="855bb82b6e85772fc290fa8b9c14fdd8f1b16be7"
|
||||
_riscv_dbg_commit="6d38d957b036231db668666255e938c91b7ce424"
|
||||
_trace_debugger_commit="0aafa398e208ad79826407e3805642987287cfae"
|
||||
_common_cells_commit="790f2385c01c83022474eede55809666209216e3"
|
||||
_fpu_div_sqrt_mvp_commit="83a601f97934ed5e06d737b9c80d98b08867c5fa"
|
||||
_modules="
|
||||
pythondata-cpu-blackparrot:2023.12:BSD-3-Clause
|
||||
pythondata-cpu-cv32e40p:2023.12:Apache-2.0
|
||||
pythondata-cpu-cv32e41p:2023.12:Apache-2.0
|
||||
pythondata-cpu-cva5:2023.12:Apache-2.0
|
||||
pythondata-cpu-cva6:2023.12:Apache-2.0
|
||||
pythondata-cpu-ibex:2023.12:Apache-2.0
|
||||
pythondata-cpu-lm32:2020.04:EPL-1.0
|
||||
pythondata-cpu-marocchino:2023.12:MPL-2.0
|
||||
pythondata-cpu-microwatt:2023.12:CC-BY-SA-4.0
|
||||
pythondata-cpu-minerva:2023.12:BSD-2-Clause
|
||||
pythondata-cpu-mor1kx:2020.04:MPL-2.0
|
||||
pythondata-cpu-naxriscv:2023.12:MIT
|
||||
pythondata-cpu-picorv32:2020.04:ISC
|
||||
pythondata-cpu-rocket:2020.04:Apache-2.0
|
||||
pythondata-cpu-serv:2020.04:ISC
|
||||
pythondata-cpu-vexriscv:2020.04:MIT
|
||||
pythondata-cpu-vexriscv_smp:2023.12:MIT
|
||||
pythondata-misc-tapcfg:2020.04:LGPL-2.1-only
|
||||
pythondata-software-compiler_rt:2020.04:Apache-2.0
|
||||
pythondata-software-picolibc:2023.12:BSD-3-Clause
|
||||
valentyusb:2023.12:BSD-3-Clause
|
||||
"
|
||||
depends="
|
||||
python3
|
||||
"
|
||||
makedepends="
|
||||
py3-setuptools
|
||||
py3-gpep517
|
||||
py3-wheel
|
||||
py3-installer
|
||||
"
|
||||
subpackages="$pkgname-pyc"
|
||||
source="
|
||||
picolibc-$_picolibc_commit.tar.gz::https://github.com/picolibc/picolibc/archive/$_picolibc_commit.tar.gz
|
||||
fpnew-$_fpnew_commit.tar.gz::https://github.com/antmicro/fpnew/archive/$_fpnew_commit.tar.gz
|
||||
riscv-dbg-$_riscv_dbg_commit.tar.gz::https://github.com/antmicro/riscv-dbg/archive/$_riscv_dbg_commit.tar.gz
|
||||
trace_debugger-$_trace_debugger_commit.tar.gz::https://github.com/antmicro/trace_debugger/archive/$_trace_debugger_commit.tar.gz
|
||||
common_cells-$_common_cells_commit.tar.gz::https://github.com/pulp-platform/common_cells/archive/$_common_cells_commit.tar.gz
|
||||
fpu_div_sqrt_mvp-$_fpu_div_sqrt_mvp_commit.tar.gz::https://github.com/pulp-platform/fpu_div_sqrt_mvp/archive/$_fpu_div_sqrt_mvp_commit.tar.gz
|
||||
|
||||
0001-fix-pythondata_software_compiler_rt-python3.patch
|
||||
0002-fix-pythondata-cpu-blackparrot-python3.patch
|
||||
"
|
||||
builddir="$srcdir"
|
||||
# most LiteX-Hub repos contain no unit tests. The basically wrap upstream
|
||||
# repos in a fashion suitable for use with LiteX, so they can rely on unit
|
||||
# tests of the upstream repos. Those LiteX-Hub repos that do have tests
|
||||
# depend on LiteX to be installed, but LiteX depends on these for its unit
|
||||
# tests (circular dependency). The unit tests in LiteX are more important, so
|
||||
# we disable tests here.
|
||||
options="!check"
|
||||
|
||||
# The data contains ELF files intended for the softcore CPUs, which cannot
|
||||
# be stripped with the native toolchain due to mismatching target architecture.
|
||||
options="$options !strip"
|
||||
|
||||
_repo_name() {
|
||||
echo $1 | cut -d : -f 1
|
||||
}
|
||||
|
||||
_pkgver() {
|
||||
echo $1 | cut -d : -f 2
|
||||
}
|
||||
|
||||
_version_by_name() {
|
||||
for _name_ver_license in $_modules; do
|
||||
if [ "$1" = "$(_repo_name "$_name_ver_license")" ]; then
|
||||
_pkgver "$_name_ver_license"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
_supply_git_submodule() {
|
||||
rmdir "$1" || rm "$1"
|
||||
ln -s "$2" "$1"
|
||||
}
|
||||
|
||||
_license() {
|
||||
echo $1 | cut -d : -f 3
|
||||
}
|
||||
|
||||
for _name_ver_license in $_modules; do
|
||||
_name="$(_repo_name "$_name_ver_license")"
|
||||
_ver="$(_pkgver "$_name_ver_license")"
|
||||
source="$source $_name-$_ver.tar.gz::https://github.com/litex-hub/$_name/archive/refs/tags/$_ver.tar.gz"
|
||||
subpackages="$subpackages py3-litex-hub-$_name:_subpkg"
|
||||
done
|
||||
|
||||
prepare() {
|
||||
local _name
|
||||
local _ver
|
||||
default_prepare
|
||||
|
||||
# remove drivers for OSX, Solaris and Windows as well as tools for mingw.
|
||||
# We don't need them and they cause lots of warnings
|
||||
rm -rf "$srcdir"/pythondata-misc-tapcfg-2020.04/pythondata_misc_tapcfg/data/drivers
|
||||
rm -rf "$srcdir"/pythondata-misc-tapcfg-2020.04/pythondata_misc_tapcfg/data/scons-tools
|
||||
|
||||
# setuptools.find_packages() doesn't work here and many instance of
|
||||
# Warning: Package '<data_pkg_name>' is absent from the packages configuration.
|
||||
# are triggered. Using setuptools.find_namespace_packages() instead does
|
||||
# the trick.
|
||||
find "$srcdir" -maxdepth 2 -name setup.py -exec \
|
||||
sed \
|
||||
-e 's/packages=setuptools\.find_packages/packages=setuptools\.find_namespace_packages/g' \
|
||||
-i {} \;
|
||||
|
||||
# manually supply pythondata-software-picolibc git submodule from downloaded source
|
||||
_name=pythondata-software-picolibc
|
||||
_ver="$(_version_by_name "$_name")"
|
||||
_supply_git_submodule \
|
||||
"$srcdir/$_name-$_ver/pythondata_software_picolibc/data" \
|
||||
"$srcdir/picolibc-$_picolibc_commit"
|
||||
|
||||
# manually supply pythondata-cpu-cv32e40p git submodule from downloaded source
|
||||
_name=pythondata-cpu-cv32e40p
|
||||
_ver="$(_version_by_name "$_name")"
|
||||
_supply_git_submodule \
|
||||
"$srcdir/$_name-$_ver/pythondata_cpu_cv32e40p/system_verilog/rtl/fpnew" \
|
||||
"$srcdir/fpnew-$_fpnew_commit"
|
||||
_supply_git_submodule \
|
||||
"$srcdir/$_name-$_ver/pythondata_cpu_cv32e40p/system_verilog/rtl/riscv-dbg" \
|
||||
"$srcdir/riscv-dbg-$_riscv_dbg_commit"
|
||||
_supply_git_submodule \
|
||||
"$srcdir/$_name-$_ver/pythondata_cpu_cv32e40p/system_verilog/rtl/trace_debugger" \
|
||||
"$srcdir/trace_debugger-$_trace_debugger_commit"
|
||||
|
||||
# manually supply git submodules for fpnew
|
||||
_supply_git_submodule \
|
||||
"$srcdir/fpnew-$_fpnew_commit/src/common_cells" \
|
||||
"$srcdir/common_cells-$_common_cells_commit"
|
||||
_supply_git_submodule \
|
||||
"$srcdir/fpnew-$_fpnew_commit/src/fpu_div_sqrt_mvp" \
|
||||
"$srcdir/fpu_div_sqrt_mvp-$_fpu_div_sqrt_mvp_commit"
|
||||
}
|
||||
|
||||
build() {
|
||||
local _name
|
||||
local _version
|
||||
for _name_ver_license in $_modules; do
|
||||
_name="$(_repo_name "$_name_ver_license")"
|
||||
_version="$(_pkgver "$_name_ver_license")"
|
||||
echo "--> Building LiteX Hub module $_name"
|
||||
|
||||
cd "$srcdir/$_name-$_version"
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
done
|
||||
}
|
||||
|
||||
package() {
|
||||
local _name
|
||||
local _version
|
||||
mkdir -p "$pkgdir"
|
||||
for _name_ver_license in $_modules; do
|
||||
_name="$(_repo_name "$_name_ver_license")"
|
||||
_version="$(_pkgver "$_name_ver_license")"
|
||||
depends="$depends py3-litex-hub-$_name"
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
"$srcdir/$_name-$_version"/dist/*.whl
|
||||
done
|
||||
}
|
||||
|
||||
_subpkg() {
|
||||
local _name
|
||||
local _pyname
|
||||
_name="${subpkgname#py3-litex-hub-}"
|
||||
_pyname="${_name//-/_}"
|
||||
amove usr/lib/python3*/site-packages/"$_pyname"
|
||||
amove usr/lib/python3*/site-packages/"$_pyname"-*.dist-info
|
||||
|
||||
for _name_ver_license in $_modules; do
|
||||
if [ "$_name" = "$(_repo_name "$_name_ver_license")" ]; then
|
||||
license="$(_license "$_name_ver_license")"
|
||||
pkgver="$(_pkgver "$_name_ver_license")"
|
||||
pkgdesc="Python module containing verilog/data files \"$_name\" for use with LiteX"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
795a9983d1bc0f851d8f1116e0c580a893aefa82d2034796d14868a1ec14f2ec6d2a4f5bf649b073b8e59f903bd65642766580c52573c7064ba3fb6b972e6e07 picolibc-f165dc22f1f67e3e8bdc8edf750ff7dc596de2ff.tar.gz
|
||||
66b088bda0a629af97ad109ba06a7d0f9da7f2fb515c6de9752862c9ff77db9c23e520c5bffbb98c3ecc6fb2f800ea266f8b8359d3ad3c3ea2c970490877d2e1 fpnew-855bb82b6e85772fc290fa8b9c14fdd8f1b16be7.tar.gz
|
||||
534a1c2358c85ed7464971b6cd2f06d949ec1db918ed531a75e0b5fe6da9a1b86f9cb675f1fb400cec9c5d607ef40bc0320a6e38b71650f1d0f4111d1c41dd02 riscv-dbg-6d38d957b036231db668666255e938c91b7ce424.tar.gz
|
||||
3979457f51be8d1b079feaa07e04b02b3db425e1e02a52ae46c1fd4d304c2b513cf49d180c6018fe01e85908523712ce069de2893f3d180019264de42f6c619d trace_debugger-0aafa398e208ad79826407e3805642987287cfae.tar.gz
|
||||
926856d4ba701a14c29bf4fe7d9cec774b95fe8778bb0029e1aa361e144a99f328cf4f0d5806a7dee21a2e152a662b9aa7e9bb45b84c816280e0b6ac943979fc common_cells-790f2385c01c83022474eede55809666209216e3.tar.gz
|
||||
d7bf78ddbb00239a37e6410994bfc75c07a295f44aa0ecf968949448433a05282c7279f5d46b77a12faa77bba2cac92251cb56f972a95b22443c6045feba49db fpu_div_sqrt_mvp-83a601f97934ed5e06d737b9c80d98b08867c5fa.tar.gz
|
||||
3e1f7e96fc144b1f819ffad5262d669e3abf214c89d547344f66b325a6c60b523f03b19a68ea2166fe98733cb310255a36ef7c843b30a3227517a46ac37d7c33 0001-fix-pythondata_software_compiler_rt-python3.patch
|
||||
1df7abd5c382d8b42292c1cb6ebb09213a2fc82e408ccdcff0207d32dc99257d553ffac95b918b028a79c08a7fa7fc7bfbc396f7aa9a0b2b770abc3a93f19ed5 0002-fix-pythondata-cpu-blackparrot-python3.patch
|
||||
19e48ff191e6755eca198486b516195128b26317146fbd2e854c0f513e49341c014a8d06284a2fda31e04e03946afe135059beb7d3fa358d123e397578336851 pythondata-cpu-blackparrot-2023.12.tar.gz
|
||||
a8bc38152811f62511389e77b131cb3aa2c6b9c518bfe40406e682682489d91964099dbc50bcff546d530bafed5c8f74130c70428d4db5d1b80ee7494d8b6863 pythondata-cpu-cv32e40p-2023.12.tar.gz
|
||||
7514804727aabb8a68a3dc9950e0893ccdadeed8d49a7f2b315b737ebcac74bee594b2c1eec06256f70db980f08de930ed0bd4c4c04e030dc64e3141e2399125 pythondata-cpu-cv32e41p-2023.12.tar.gz
|
||||
b594c60b6ff761f716878eb8652db35e54bee0b2c49424fd06fd0df029a2b3a51f544b4508252b2ac3f7f0e8b10e12f6d270e8d77529f3667d3988305bc94f51 pythondata-cpu-cva5-2023.12.tar.gz
|
||||
fdc11249059857edd72a321c274a167e8b70848916c8ba54d271a564eb8af507671cee1dd37aa25534c437cbf09c41c5667c82f9440cc74c3a193dea987fe7ed pythondata-cpu-cva6-2023.12.tar.gz
|
||||
90254ba5506663d37d18fb099cbd9de91703be7db4972346c39bd828ede109b745904d748a47717a022a2d5a86b71400b0741d9acd7d30dc569736b3976833c7 pythondata-cpu-ibex-2023.12.tar.gz
|
||||
e37da7c510485160f9686867a301ea182145ce1d6c3f53c4b69fa47ccf040c8bf6696012672d1237a469280010f1f11d73eb5dbe1d6a0adf6318d6c98fc93e69 pythondata-cpu-lm32-2020.04.tar.gz
|
||||
61b4576f0de33c2a86ff7ade4e10d7c2e2b65771148468710448206d2f022ea3a89a467e99dfd467843fb15d577b0e2e792c4557120d41a9a71e3f1e313b54f3 pythondata-cpu-marocchino-2023.12.tar.gz
|
||||
c576b9582d9f51de90f398a0ec9011e9423524f401ddad3c54a658adc0b1f19899187586ca6d77c17a62cfbb5cb632a3ff41b8f5ce89868e19b9f17740d6a368 pythondata-cpu-microwatt-2023.12.tar.gz
|
||||
b19fd16fc2d24579d08b854b9d4a9dbadf5fcee7725f5ba4cc705bbf1ddc8b2951ee6dc2b041cb4550a9ab1618198f2a6e29b932543d380a281aa9faf3c93477 pythondata-cpu-minerva-2023.12.tar.gz
|
||||
fc7e4fdba394831bd1dce9a47a33cf91f051b04108af9dca8dc57f1a9221d53c16692ef4117a7cca485fdc9684848e31ca9311be73088b8c1108e25fed6e9df4 pythondata-cpu-mor1kx-2020.04.tar.gz
|
||||
0595dcb4d66ba5f7b865643660cd128efc12b966d4cc336e879239ae73096542063c0886982fcd6afc3df7d0ac6cf9e9bf0b51dae848abe0544093a086ca5157 pythondata-cpu-naxriscv-2023.12.tar.gz
|
||||
2087236196f9797d4b5746a30634e5d4a535b065c780b85102d7d97b858e30d615d5c2868b61ac8fbb71e671bf2b414eabf2ad6b8a39b34f64f4bde0c907cfb1 pythondata-cpu-picorv32-2020.04.tar.gz
|
||||
7ae6d8b2cb42f0c5c0093dbb35e8f1eb863b1fd49a4cdaa6ed3ff1b1a2e3ae1ac14a8fe13ed6826f9ada72740b2151075a14eb40df4756c2dd6f02712de91e23 pythondata-cpu-rocket-2020.04.tar.gz
|
||||
187a78c150a63399131ac4815d2670773917ca8e1de6adec9c7fdbdbb2d78900cc72bd1a103349ed318b1fb7ee17a9e6580db31dc03acd31d68e0aa5e56f378b pythondata-cpu-serv-2020.04.tar.gz
|
||||
9f4a0ca2cabfe7cefd5b1be1e40b6f02f2fb5edb9d70099d6d95530f5e4476574a3901340dcac606f7a1a31a2ac29764227f01b93f3e912b299718751746078b pythondata-cpu-vexriscv-2020.04.tar.gz
|
||||
e01d0593e4d515f6b38a4373f57f03290bcbd70e8e9117b995055461869db03a277d0ad4faffef0f7775acff48e7ee40666968d6aabf2d926cdeff3a190b5a29 pythondata-cpu-vexriscv_smp-2023.12.tar.gz
|
||||
66ff1bd80665c6beaf2b8b069698461cf836317a3de1fd06f5959b660e9b2ffefe057c86813c9ca2749ff381ab50a6519f9717eece117b569fb29b84d07163ff pythondata-misc-tapcfg-2020.04.tar.gz
|
||||
3e70d5e5941654588a353b866224b4e8b14324d4e771c2d43918ed4749e9c14d1e9229d6fa2f62fb7b58b2964f5d3f5d2f0fee6b14fd3862cfa211a3b93b89bb pythondata-software-compiler_rt-2020.04.tar.gz
|
||||
953968a0ba0df4207c04bec43de3ad4b599b0d63182c8ae8da4f254768aacf4a8a8e0a935cdc2aebc23c99494e1d3736b78f1d7413c1f94da3b016036a7f4b0a pythondata-software-picolibc-2023.12.tar.gz
|
||||
b9cb43acd169e8e05560ee5d90326a95426e26f8f837c21d3965770f8ed5fdb4352729d4f8320d8070e57fe36e3276d3b04df90498e874d6a6c3fab61fa85829 valentyusb-2023.12.tar.gz
|
||||
"
|
||||
26604
testing/py3-litex-hub-modules/log.txt
Normal file
26604
testing/py3-litex-hub-modules/log.txt
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user