svn commit: r376677 - head/emulators/wine-devel/files

Gerald Pfeifer gerald at FreeBSD.org
Sat Jan 10 09:03:28 UTC 2015


Author: gerald
Date: Sat Jan 10 09:03:27 2015
New Revision: 376677
URL: https://svnweb.freebsd.org/changeset/ports/376677
QAT: https://qat.redports.org/buildarchive/r376677/

Log:
  Support building with alternate toolchains that require LD to be
  honored.  This is a bit invasive in that it touches several parts
  of Wine, and has not been accepted upstream yet, so I am adding it
  locally for now.
  
  PR:		188424
  Suggested by:	tijl
  Reviewed by:	tijl
  Tested by:	Lena at lena.kiev.ua

Added:
  head/emulators/wine-devel/files/patch-alternate-toolchain   (contents, props changed)

Added: head/emulators/wine-devel/files/patch-alternate-toolchain
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/wine-devel/files/patch-alternate-toolchain	Sat Jan 10 09:03:27 2015	(r376677)
@@ -0,0 +1,152 @@
+--- Make.vars.in	
++++ Make.vars.in	
+@@ -40,6 +40,7 @@ RANLIB          = @RANLIB@
+ STRIP           = @STRIP@
+ LN_S            = @LN_S@
+ TOOLSDIR        = @TOOLSDIR@
++LD              = @LD@
+ LDFLAGS         = @LDFLAGS@
+ DLLFLAGS        = @DLLFLAGS@
+ PRELINK         = @PRELINK@
+--- configure	
++++ configure	
+@@ -732,6 +732,7 @@ BISON
+ FLEX
+ TOOLSDIR
+ TARGETFLAGS
++LD
+ CPPBIN
+ ac_ct_CXX
+ CXXFLAGS
+@@ -4736,6 +4737,98 @@ cat >>confdefs.h <<_ACEOF
+ #define EXEEXT "$ac_exeext"
+ _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
+   *-darwin*)
+--- configure.ac	
++++ configure.ac	
+@@ -122,6 +122,7 @@ AC_PROG_CXX
+ dnl We can't use AC_PROG_CPP for winegcc, it uses by default $(CC) -E
+ AC_CHECK_TOOL(CPPBIN,cpp,cpp)
+ AC_DEFINE_UNQUOTED(EXEEXT,["$ac_exeext"],[Define to the file extension for executables.])
++AC_CHECK_TOOL(LD,ld)
+ 
+ case $host in
+   *-darwin*)
+--- tools/winegcc/Makefile.in	
++++ tools/winegcc/Makefile.in	
+@@ -16,6 +16,7 @@ winegcc_EXTRADEFS = \
+ 	-DCC="\"$(CC)\"" \
+ 	-DCPP="\"$(CPPBIN)\"" \
+ 	-DCXX="\"$(CXX)\"" \
++	-DLD="\"$(LD)\"" \
+ 	-DPRELINK="\"$(PRELINK)\""
+ 
+ winegcc$(EXEEXT): winegcc.o utils.o
+--- tools/winegcc/winegcc.c	
++++ tools/winegcc/winegcc.c	
+@@ -1034,6 +1034,10 @@ static void build(struct options* opts)
+     /* run winebuild to generate the .spec.o file */
+     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( "--ld-cmd=%s", build_tool_name( opts, "ld", LD )));
++
++printf("<<<%s>>>\n",strmake( "--ld-cmd=%s", build_tool_name( opts, "ld" , LD )));
++
+     spec_o_name = get_temp_file(output_name, ".spec.o");
+     if (opts->force_pointer_size)
+         strarray_add(spec_args, strmake("-m%u", 8 * opts->force_pointer_size ));


More information about the svn-ports-all mailing list