Am 13.12.2015 um 19:17 schrieb Stephen Kitt:
Since -mcpu is already supported, it seems to make sense to also support -march. Having -march simplifies building for ARM platforms...
Signed-off-by: Stephen Kitt steve@sk2.org
tools/winebuild/build.h | 1 + tools/winebuild/main.c | 2 ++ tools/winebuild/utils.c | 1 + tools/winegcc/winegcc.c | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h index 4a71eed..e32e7a9 100644 --- a/tools/winebuild/build.h +++ b/tools/winebuild/build.h @@ -362,6 +362,7 @@ extern struct strarray *cc_command; extern struct strarray *ld_command; extern struct strarray *nm_command; extern char *cpu_option; +extern char *arch_option; extern int thumb_mode;
#endif /* __WINE_BUILD_H */ diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c index d1717c0..08c8c2c 100644 --- a/tools/winebuild/main.c +++ b/tools/winebuild/main.c @@ -89,6 +89,7 @@ struct strarray *cc_command = NULL; struct strarray *ld_command = NULL; struct strarray *nm_command = NULL; char *cpu_option = NULL; +char *arch_option = NULL;
#ifdef __thumb__ int thumb_mode = 1; @@ -408,6 +409,7 @@ static char **parse_options( int argc, char **argv, DLLSPEC *spec ) else if (!strcmp( optarg, "arm" )) thumb_mode = 0; else if (!strcmp( optarg, "thumb" )) thumb_mode = 1; else if (!strncmp( optarg, "cpu=", 4 )) cpu_option = xstrdup( optarg + 4 );
else if (!strncmp( optarg, "arch=", 5 )) arch_option = xstrdup( optarg + 5 ); else fatal_error( "Unknown -m option '%s'\n", optarg ); break; case 'M':
diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c index 83eb803..4860a19 100644 --- a/tools/winebuild/utils.c +++ b/tools/winebuild/utils.c @@ -388,6 +388,7 @@ struct strarray *get_as_command(void) if (force_pointer_size) strarray_add_one( args, (force_pointer_size == 8) ? "-m64" : "-m32" ); if (cpu_option) strarray_add_one( args, strmake("-mcpu=%s", cpu_option) );
}if (arch_option) strarray_add_one( args, strmake("-march=%s", arch_option) ); return args;
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index c07243b..1326afe 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -1525,7 +1525,7 @@ int main(int argc, char **argv) strarray_add(opts.winebuild_args, argv[i]); raw_linker_arg = 1; }
else if (strncmp("-mcpu=", argv[i], 6) == 0)
else if (strncmp("-mcpu=", argv[i], 6) == 0 || strncmp("-march=", argv[i], 7) == 0) strarray_add(opts.winebuild_args, argv[i]); break; case 'n':
Hi,
please first change winebuild to support it, make the subject something like "[1/2] winebuild: Add support for -march" and please update tools/winebuild/winebuild.man.in In the second patch make use of that new feature in winegcc Otherwise it looks good, maybe mention why this is needed for Debian/armel
On Sun, 13 Dec 2015 19:48:54 +0100, André Hentschel nerv@dawncrow.de wrote:
please first change winebuild to support it, make the subject something like "[1/2] winebuild: Add support for -march" and please update tools/winebuild/winebuild.man.in In the second patch make use of that new feature in winegcc Otherwise it looks good, maybe mention why this is needed for Debian/armel
Thanks, I've just reposted the patches (after subscribing to wine-patches; I was already on wine-devel).
Regards,
Stephen