From: Johannes Berg Date: Mon, 15 Apr 2013 09:16:47 +0000 (+0200) Subject: ckmake: optionally fail on linker failures X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=320f4dba26a7b09bf058b2d145737d913649daf4;p=openwrt%2Fstaging%2Fblogic.git ckmake: optionally fail on linker failures This will be enabled by default later, but right now it fails on media/regulator drivers. Signed-off-by: Johannes Berg --- diff --git a/devel/ckmake b/devel/ckmake index a0deb7d5e1a5..0b738e5a60ed 100755 --- a/devel/ckmake +++ b/devel/ckmake @@ -68,6 +68,8 @@ def get_status_name(status): return 'TERM' elif (status == 1234): return 'INIT' + elif (status == 1235): + return 'LINK' elif (status == -2): return 'TERM' else: @@ -80,6 +82,8 @@ def get_stat_pos(status): return 33 elif (status == 1234): return 33 + elif (status == 1235): + return 33 elif (status == -2): return 33 else: @@ -175,9 +179,17 @@ def process_kernel(num, kset, cmdline_args): p.wait() log_file.close() + status = p.returncode + if status == 0 and cmdline_args.check_exports: + warn = re.compile('^WARNING:.*undefined.*') + log_file = open(log_file_name, 'r') + for l in log_file: + if warn.match(l): + status = 1235 + break null_file.close() - kset.update_status(rel, p.returncode) + kset.update_status(rel, status) kset.queue.task_done() kset.completed(rel) @@ -401,6 +413,8 @@ if __name__ == "__main__": help='Build allyesconfig rather than only backport code.') parser.add_argument('--defconfig', metavar='', type=str, help='Build this defconfig rather than only backport code.') + parser.add_argument('--check-exports', const=True, default=False, action="store_const", + help='Check for linker warnings indicating exported symbols are missing.') args = parser.parse_args() if not os.path.exists(modules):