diff --git a/meson.build b/meson.build index e863780..2b4bdbd 100644 --- a/meson.build +++ b/meson.build @@ -6,7 +6,11 @@ project( version : run_command('head', files('VERSION')).stdout() ) -cpu = host_machine.cpu_family() +cpu = get_option('cpu') +if cpu == '' + cpu = host_machine.cpu_family() +endif + if cpu == 'sh4' cpu = 'sh' endif diff --git a/meson_options.txt b/meson_options.txt index d4201d1..864d83c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,4 +1,6 @@ option('freestanding', type : 'boolean', value : false, description: 'Do not use system headers') option('export_unprefixed', type : 'boolean', value : true, - description: 'Export POSIX 2004 ucontext names as alises') \ No newline at end of file + description: 'Export POSIX 2004 ucontext names as alises') +option('cpu', type : 'string', value : '', + description: 'Target CPU architecture for cross compile')