From d12605c679cf4f2c5057c548de1210e7fa03a2f1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 12 Apr 2010 22:06:51 +1000 Subject: build: added cross-compilation configure options this enables use of a cross-compilation emulator, so configure tests run on an emulator of the target platform --- buildtools/wafsamba/wscript | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'buildtools/wafsamba/wscript') diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index 2e42139bb9..87e70702dc 100644 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -68,6 +68,17 @@ def set_options(opt): help=("Enable even more compiler warnings"), action='store_true', dest='pedantic', default=False) + opt.add_option('--cross-compile', + help=("configure for cross-compilation"), + action='store_true', dest='CROSS_COMPILE', default=False) + opt.add_option('--cross-execute', + help=("command prefix to use for cross-execution in configure"), + action='store', dest='CROSS_EXECUTE', default='') + opt.add_option('--hostcc', + help=("set host compiler when cross compiling"), + action='store', dest='HOSTCC', default=False) + + @wafsamba.runonce def configure(conf): conf.env.hlist = [] @@ -105,6 +116,10 @@ def configure(conf): conf.env.BUNDLED_EXTENSION = Options.options.BUNDLED_EXTENSION conf.env.BUNDLED_EXTENSION_EXCEPTION = Options.options.BUNDLED_EXTENSION_EXCEPTION.split(',') + conf.env.CROSS_COMPILE = Options.options.CROSS_COMPILE + conf.env.CROSS_EXECUTE = Options.options.CROSS_EXECUTE + conf.env.HOSTCC = Options.options.HOSTCC + # see if we can compile and run a simple C program conf.CHECK_CODE('printf("hello world\\n")', define='HAVE_SIMPLE_C_PROG', -- cgit