forked from Mirrors/wine-wine
makefiles: Support building with non-default LD.
parent
8e9e4a657f
commit
189ffc2e73
|
@ -40,6 +40,7 @@ RANLIB = @RANLIB@
|
||||||
STRIP = @STRIP@
|
STRIP = @STRIP@
|
||||||
LN_S = @LN_S@
|
LN_S = @LN_S@
|
||||||
TOOLSDIR = @TOOLSDIR@
|
TOOLSDIR = @TOOLSDIR@
|
||||||
|
LD = @LD@
|
||||||
LDFLAGS = @LDFLAGS@
|
LDFLAGS = @LDFLAGS@
|
||||||
DLLFLAGS = @DLLFLAGS@
|
DLLFLAGS = @DLLFLAGS@
|
||||||
PRELINK = @PRELINK@
|
PRELINK = @PRELINK@
|
||||||
|
|
|
@ -732,6 +732,7 @@ BISON
|
||||||
FLEX
|
FLEX
|
||||||
TOOLSDIR
|
TOOLSDIR
|
||||||
TARGETFLAGS
|
TARGETFLAGS
|
||||||
|
LD
|
||||||
CPPBIN
|
CPPBIN
|
||||||
ac_ct_CXX
|
ac_ct_CXX
|
||||||
CXXFLAGS
|
CXXFLAGS
|
||||||
|
@ -4737,6 +4738,98 @@ cat >>confdefs.h <<_ACEOF
|
||||||
#define EXEEXT "$ac_exeext"
|
#define EXEEXT "$ac_exeext"
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
|
if test -n "$ac_tool_prefix"; then
|
||||||
|
# Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
|
||||||
|
set dummy ${ac_tool_prefix}ld; ac_word=$2
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||||
|
$as_echo_n "checking for $ac_word... " >&6; }
|
||||||
|
if ${ac_cv_prog_LD+:} false; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
if test -n "$LD"; then
|
||||||
|
ac_cv_prog_LD="$LD" # Let the user override the test.
|
||||||
|
else
|
||||||
|
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||||
|
for as_dir in $PATH
|
||||||
|
do
|
||||||
|
IFS=$as_save_IFS
|
||||||
|
test -z "$as_dir" && as_dir=.
|
||||||
|
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||||
|
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||||
|
ac_cv_prog_LD="${ac_tool_prefix}ld"
|
||||||
|
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||||
|
break 2
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
IFS=$as_save_IFS
|
||||||
|
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
LD=$ac_cv_prog_LD
|
||||||
|
if test -n "$LD"; then
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
|
||||||
|
$as_echo "$LD" >&6; }
|
||||||
|
else
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
$as_echo "no" >&6; }
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
fi
|
||||||
|
if test -z "$ac_cv_prog_LD"; then
|
||||||
|
ac_ct_LD=$LD
|
||||||
|
# Extract the first word of "ld", so it can be a program name with args.
|
||||||
|
set dummy ld; ac_word=$2
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||||
|
$as_echo_n "checking for $ac_word... " >&6; }
|
||||||
|
if ${ac_cv_prog_ac_ct_LD+:} false; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
if test -n "$ac_ct_LD"; then
|
||||||
|
ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
|
||||||
|
else
|
||||||
|
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||||
|
for as_dir in $PATH
|
||||||
|
do
|
||||||
|
IFS=$as_save_IFS
|
||||||
|
test -z "$as_dir" && as_dir=.
|
||||||
|
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||||
|
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||||
|
ac_cv_prog_ac_ct_LD="ld"
|
||||||
|
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||||
|
break 2
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
IFS=$as_save_IFS
|
||||||
|
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
ac_ct_LD=$ac_cv_prog_ac_ct_LD
|
||||||
|
if test -n "$ac_ct_LD"; then
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LD" >&5
|
||||||
|
$as_echo "$ac_ct_LD" >&6; }
|
||||||
|
else
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
$as_echo "no" >&6; }
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$ac_ct_LD" = x; then
|
||||||
|
LD=""
|
||||||
|
else
|
||||||
|
case $cross_compiling:$ac_tool_warned in
|
||||||
|
yes:)
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
|
||||||
|
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
|
||||||
|
ac_tool_warned=yes ;;
|
||||||
|
esac
|
||||||
|
LD=$ac_ct_LD
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
LD="$ac_cv_prog_LD"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
case $host in
|
case $host in
|
||||||
*-darwin*)
|
*-darwin*)
|
||||||
|
|
|
@ -122,6 +122,7 @@ AC_PROG_CXX
|
||||||
dnl We can't use AC_PROG_CPP for winegcc, it uses by default $(CC) -E
|
dnl We can't use AC_PROG_CPP for winegcc, it uses by default $(CC) -E
|
||||||
AC_CHECK_TOOL(CPPBIN,cpp,cpp)
|
AC_CHECK_TOOL(CPPBIN,cpp,cpp)
|
||||||
AC_DEFINE_UNQUOTED(EXEEXT,["$ac_exeext"],[Define to the file extension for executables.])
|
AC_DEFINE_UNQUOTED(EXEEXT,["$ac_exeext"],[Define to the file extension for executables.])
|
||||||
|
AC_CHECK_TOOL(LD,ld)
|
||||||
|
|
||||||
case $host in
|
case $host in
|
||||||
*-darwin*)
|
*-darwin*)
|
||||||
|
|
|
@ -16,6 +16,7 @@ winegcc_EXTRADEFS = \
|
||||||
-DCC="\"$(CC)\"" \
|
-DCC="\"$(CC)\"" \
|
||||||
-DCPP="\"$(CPPBIN)\"" \
|
-DCPP="\"$(CPPBIN)\"" \
|
||||||
-DCXX="\"$(CXX)\"" \
|
-DCXX="\"$(CXX)\"" \
|
||||||
|
-DLD="\"$(LD)\"" \
|
||||||
-DPRELINK="\"$(PRELINK)\""
|
-DPRELINK="\"$(PRELINK)\""
|
||||||
|
|
||||||
winegcc$(EXEEXT): winegcc.o utils.o
|
winegcc$(EXEEXT): winegcc.o utils.o
|
||||||
|
|
|
@ -1034,6 +1034,8 @@ static void build(struct options* opts)
|
||||||
/* run winebuild to generate the .spec.o file */
|
/* run winebuild to generate the .spec.o file */
|
||||||
spec_args = get_winebuild_args( opts );
|
spec_args = get_winebuild_args( opts );
|
||||||
strarray_add( spec_args, strmake( "--cc-cmd=%s", build_tool_name( opts, "gcc", CC )));
|
strarray_add( spec_args, strmake( "--cc-cmd=%s", build_tool_name( opts, "gcc", CC )));
|
||||||
|
strarray_add( spec_args, strmake( "--ld-cmd=%s", build_tool_name( opts, "ld", LD )));
|
||||||
|
|
||||||
spec_o_name = get_temp_file(output_name, ".spec.o");
|
spec_o_name = get_temp_file(output_name, ".spec.o");
|
||||||
if (opts->force_pointer_size)
|
if (opts->force_pointer_size)
|
||||||
strarray_add(spec_args, strmake("-m%u", 8 * opts->force_pointer_size ));
|
strarray_add(spec_args, strmake("-m%u", 8 * opts->force_pointer_size ));
|
||||||
|
|
Loading…
Reference in New Issue