Alexandre Julliard : wrc: Ignore the target option.
Alexandre Julliard
julliard at winehq.org
Thu Nov 11 16:01:28 CST 2021
Module: wine
Branch: master
Commit: 7c5761ed40f0b8cead7fa837b745b687d5df67d8
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7c5761ed40f0b8cead7fa837b745b687d5df67d8
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Nov 11 16:21:00 2021 +0100
wrc: Ignore the target option.
Nothing in resource files depends on the pointer size.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
tools/makedep.c | 1 -
tools/wrc/wrc.c | 33 ++++-----------------------------
tools/wrc/wrc.man.in | 5 -----
3 files changed, 4 insertions(+), 35 deletions(-)
diff --git a/tools/makedep.c b/tools/makedep.c
index 8d682e763fb..2a52ecd09c0 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -2697,7 +2697,6 @@ static void output_source_rc( struct makefile *make, struct incl_file *source, c
output( "\n" );
output( "\t%s%s -u -o $@", cmd_prefix( "WRC" ), tools_path( make, "wrc" ) );
if (make->is_win16) output_filename( "-m16" );
- else output_filenames( target_flags );
output_filename( "--nostdinc" );
if (po_dir) output_filename( strmake( "--po-dir=%s", po_dir ));
output_filenames( defines );
diff --git a/tools/wrc/wrc.c b/tools/wrc/wrc.c
index b44ae6fd0e5..e3dc2d3f2b1 100644
--- a/tools/wrc/wrc.c
+++ b/tools/wrc/wrc.c
@@ -50,20 +50,19 @@
static const char usage[] =
"Usage: wrc [options...] [infile[.rc|.res]]\n"
- " -b, --target=TARGET Specify target CPU and platform when cross-compiling\n"
" -D, --define id[=val] Define preprocessor identifier id=val\n"
" --debug=nn Set debug level to 'nn'\n"
" -E Preprocess only\n"
" --endianness=e Set output byte-order e={n[ative], l[ittle], b[ig]}\n"
" (win32 only; default is " ENDIAN "-endian)\n"
- " -F TARGET Synonym for -b for compatibility with windres\n"
+ " -F TARGET Ignored, for compatibility with windres\n"
" -fo FILE Synonym for -o for compatibility with windres\n"
" -h, --help Prints this summary\n"
" -i, --input=FILE The name of the input file\n"
" -I, --include-dir=PATH Set include search dir to path (multiple -I allowed)\n"
" -J, --input-format=FORMAT The input format (either `rc' or `rc16')\n"
" -l, --language=LANG Set default language to LANG (default is neutral {0, 0})\n"
- " -m16, -m32, -m64 Build for 16-bit, 32-bit resp. 64-bit platforms\n"
+ " -m16 Build a 16-bit resource file\n"
" --nls-dir=DIR Directory containing the NLS codepage mappings\n"
" --no-use-temp-file Ignored for compatibility with windres\n"
" --nostdinc Disables searching the standard include path\n"
@@ -147,8 +146,6 @@ int utf8_input = 0;
int check_utf8 = 1; /* whether to check for valid utf8 */
-static int pointer_size = sizeof(void *);
-
static int verify_translations_mode;
static char *output_name; /* The name given by the -o option */
@@ -317,22 +314,6 @@ static int load_file( const char *input_name, const char *output_name )
return ret;
}
-static void set_target( const char *target )
-{
- char *p, *cpu = xstrdup( target );
-
- /* target specification is in the form CPU-MANUFACTURER-OS or CPU-MANUFACTURER-KERNEL-OS */
- if (!(p = strchr( cpu, '-' ))) error( "Invalid target specification '%s'\n", target );
- *p = 0;
- if (!strcmp( cpu, "amd64" ) || !strcmp( cpu, "x86_64" ) ||
- !strcmp( cpu, "ia64" ) || !strcmp( cpu, "aarch64" ) ||
- !strcmp( cpu, "powerpc64" ) || !strcmp( cpu, "powerpc64le" ))
- pointer_size = 8;
- else
- pointer_size = 4;
- free( cpu );
-}
-
static void init_argv0_dir( const char *argv0 )
{
#ifndef _WIN32
@@ -424,7 +405,6 @@ static void option_callback( int optc, char *optarg )
break;
case 'b':
case 'F':
- set_target( optarg );
break;
case 'h':
printf(usage);
@@ -450,8 +430,7 @@ static void option_callback( int optc, char *optarg )
break;
case 'm':
if (!strcmp( optarg, "16" )) win32 = 0;
- else if (!strcmp( optarg, "32" )) { win32 = 1; pointer_size = 4; }
- else if (!strcmp( optarg, "64" )) { win32 = 1; pointer_size = 8; }
+ else win32 = 1;
break;
case 'f':
if (*optarg != 'o') error("Unknown option: -f%s\n", optarg);
@@ -506,11 +485,7 @@ int main(int argc,char *argv[])
strarray_addall( &input_files,
parse_options( argc, argv, short_options, long_options, 0, option_callback ));
- if (win32)
- {
- wpp_add_cmdline_define("_WIN32=1");
- if (pointer_size == 8) wpp_add_cmdline_define("_WIN64=1");
- }
+ if (win32) wpp_add_cmdline_define("_WIN32=1");
/* If we do need to search standard includes, add them to the path */
if (stdinc)
diff --git a/tools/wrc/wrc.man.in b/tools/wrc/wrc.man.in
index e3ad8fca4d9..275a6b609f4 100644
--- a/tools/wrc/wrc.man.in
+++ b/tools/wrc/wrc.man.in
@@ -21,11 +21,6 @@ specified with \fB-o\fR, then \fBwrc\fR will write the output to
no inputfile was given.
.SH OPTIONS
.TP
-.BI \-b,\ --target= cpu-manufacturer\fR[\fI\fB-\fIkernel\fR]\fB-\fIos
-Specify the target CPU and platform on which the generated code will
-be built. The target specification is in the standard autoconf format
-as returned by \fBconfig.sub\fR.
-.TP
.I \fB\-D\fR, \fB\-\-define\fR=\fIid\fR[\fB=\fIval\fR]
Define preprocessor identifier \fIid\fR to (optionally) value \fIval\fR.
See also
More information about the wine-cvs
mailing list