wrc: Ignore the target option.

Nothing in resource files depends on the pointer size.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2021-11-11 16:21:00 +01:00
parent 6ebcc54a5c
commit 7c5761ed40
3 changed files with 4 additions and 35 deletions

View File

@ -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 );

View File

@ -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)

View File

@ -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