diff options
author | Boris Nagaev <bnagaev@gmail.com> | 2015-09-18 20:07:31 (GMT) |
---|---|---|
committer | Boris Nagaev <bnagaev@gmail.com> | 2015-09-20 23:57:45 (GMT) |
commit | b5311afb506543565ed9db7f316382199599011a (patch) | |
tree | abb4e373b6323e436696f993e9ebd4530e4912c6 | |
parent | a4d62eb91b4045849031a379d7399a89df9fb853 (diff) | |
download | mxe-b5311afb506543565ed9db7f316382199599011a.zip mxe-b5311afb506543565ed9db7f316382199599011a.tar.gz mxe-b5311afb506543565ed9db7f316382199599011a.tar.bz2 |
build-pkg: check *.a files with nm
close #858
see #854
-rwxr-xr-x | tools/build-pkg.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/build-pkg.lua b/tools/build-pkg.lua index fdfa577..0039846 100755 --- a/tools/build-pkg.lua +++ b/tools/build-pkg.lua @@ -288,6 +288,11 @@ local function gitCommit(message) os.execute(cmd:format(message)) end +local function isValidBinary(file) + local cmd = './usr/bin/%s-objdump -t %s > /dev/null 2>&1' + return testCommand(cmd:format(target, file)) +end + local function checkFile(file, pkg) -- if it is PE32 file, it must have '.exe' in name local ext = file:sub(-4):lower() @@ -320,6 +325,14 @@ local function checkFile(file, pkg) if file:match('/lib/.*%.dll$') then log('File %s (%s): DLL in /lib/', file, pkg) end + if file:match('%.dll$') or file:match('%.a$') then + if file:find(target, 1, true) then -- not common + if not isValidBinary(file) then + log('File %s (%s): not recognized library', + file, pkg) + end + end + end end -- builds package, returns list of new files |