Commit b2c9c615 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Use "LD" instead of "ld" in winebuild to be able to use a different ld

or ld options.
parent bba76fca
...@@ -512,7 +512,7 @@ static int check_unused( const struct import* imp, const DLLSPEC *spec ) ...@@ -512,7 +512,7 @@ static int check_unused( const struct import* imp, const DLLSPEC *spec )
static const char *ldcombine_files( char **argv ) static const char *ldcombine_files( char **argv )
{ {
int i, len = 0; int i, len = 0;
char *cmd; char *cmd, *ldcmd;
int fd, err; int fd, err;
if (output_file_name && output_file_name[0]) if (output_file_name && output_file_name[0])
...@@ -527,9 +527,11 @@ static const char *ldcombine_files( char **argv ) ...@@ -527,9 +527,11 @@ static const char *ldcombine_files( char **argv )
close( fd ); close( fd );
atexit( remove_ld_tmp_file ); atexit( remove_ld_tmp_file );
ldcmd = getenv("LD");
if (!ldcmd) ldcmd = "ld";
for (i = 0; argv[i]; i++) len += strlen(argv[i]) + 1; for (i = 0; argv[i]; i++) len += strlen(argv[i]) + 1;
cmd = xmalloc( len + strlen(ld_tmp_file) + 10 ); cmd = xmalloc( len + strlen(ld_tmp_file) + 8 + strlen(ldcmd) );
sprintf( cmd, "ld -r -o %s", ld_tmp_file ); sprintf( cmd, "%s -r -o %s", ldcmd, ld_tmp_file );
for (i = 0; argv[i]; i++) sprintf( cmd + strlen(cmd), " %s", argv[i] ); for (i = 0; argv[i]; i++) sprintf( cmd + strlen(cmd), " %s", argv[i] );
err = system( cmd ); err = system( cmd );
if (err) fatal_error( "ld -r failed with status %d\n", err ); if (err) fatal_error( "ld -r failed with status %d\n", err );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment