rpmlint/suse-binary-info-compile-opts.diff

26 lines
809 B
Diff

--- BinariesCheck.py
+++ BinariesCheck.py
@@ -56,10 +56,11 @@
self.debuginfo=0
self.symtab=0
self.tail = ''
+ self.compileOpts = set()
is_debug=BinaryInfo.debug_file_regex.search(path)
- cmd = ['env', 'LC_ALL=C', 'readelf', '-W', '-S', '-l', '-d', '-s']
+ cmd = ['env', 'LC_ALL=C', 'readelf', '-W', '-S', '-l', '-d', '-s', '-p', '.comment.SUSE.OPTs']
cmd.append(path)
res = Pkg.getstatusoutput(cmd)
if not res[0]:
@@ -115,6 +116,9 @@
self.symtab=1
continue
+ if l.lower().find(" ospwg") != -1:
+ self.compileOpts.add(l.rpartition(' ')[2])
+
if self.non_pic:
self.non_pic=BinaryInfo.non_pic_regex.search(res[1])