Module: wine Branch: master Commit: 4a0f3fbcb5876eb6e91165d3333f2dfaaaaa1cdf URL: https://gitlab.winehq.org/wine/wine/-/commit/4a0f3fbcb5876eb6e91165d3333f2df...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Feb 27 11:01:47 2023 +0100
winegcc: Stop using the deprecated prelink tool.
---
configure | 52 ----------------------------------------------- configure.ac | 7 +------ tools/winegcc/Makefile.in | 3 +-- tools/winegcc/winegcc.c | 17 ---------------- 4 files changed, 2 insertions(+), 77 deletions(-)
diff --git a/configure b/configure index 01df4fa9773..f939d560c26 100755 --- a/configure +++ b/configure @@ -737,7 +737,6 @@ FAUDIO_PE_LIBS FAUDIO_PE_CFLAGS MINGW_PKG_CONFIG PE_ARCHS -PRELINK WINELOADER_DEPENDS ac_ct_OBJC OBJCFLAGS @@ -10266,56 +10265,6 @@ then : *) WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -Wl,--section-start,.interp=0x7d000400" ;; esac fi - # Extract the first word of "prelink", so it can be a program name with args. -set dummy prelink; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_PRELINK+y} -then : - printf %s "(cached) " >&6 -else $as_nop - case $PRELINK in - [\/]* | ?:[\/]*) - ac_cv_path_PRELINK="$PRELINK" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /sbin /usr/sbin $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_PRELINK="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PRELINK" && ac_cv_path_PRELINK="false" - ;; -esac -fi -PRELINK=$ac_cv_path_PRELINK -if test -n "$PRELINK"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PRELINK" >&5 -printf "%s\n" "$PRELINK" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - if test "x$PRELINK" = xfalse - then - as_fn_append wine_warnings "|prelink not found and linker does not support relocation, base address of core dlls won't be set correctly." - fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wl,-z,max-page-size=0x1000" >&5 printf %s "checking whether the compiler supports -Wl,-z,max-page-size=0x1000... " >&6; } @@ -23065,7 +23014,6 @@ OBJC = $OBJC OBJCFLAGS = $OBJCFLAGS ac_ct_OBJC = $ac_ct_OBJC WINELOADER_DEPENDS = $WINELOADER_DEPENDS -PRELINK = $PRELINK PE_ARCHS = $PE_ARCHS MINGW_PKG_CONFIG = $MINGW_PKG_CONFIG FAUDIO_PE_CFLAGS = $FAUDIO_PE_CFLAGS diff --git a/configure.ac b/configure.ac index 228002fd922..c5732f8ada4 100644 --- a/configure.ac +++ b/configure.ac @@ -779,12 +779,7 @@ case $host_os in [case $host_os in freebsd* | kfreebsd*-gnu) WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -Wl,--section-start,.interp=0x60000400" ;; *) WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -Wl,--section-start,.interp=0x7d000400" ;; - esac]) - AC_PATH_PROG(PRELINK, prelink, false, [/sbin /usr/sbin $PATH]) - if test "x$PRELINK" = xfalse - then - WINE_WARNING([prelink not found and linker does not support relocation, base address of core dlls won't be set correctly.]) - fi]) + esac])]) WINE_TRY_CFLAGS([-Wl,-z,max-page-size=0x1000], [WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -Wl,-z,max-page-size=0x1000"]) ;; diff --git a/tools/winegcc/Makefile.in b/tools/winegcc/Makefile.in index 8328d6f34a2..c4ef77da33c 100644 --- a/tools/winegcc/Makefile.in +++ b/tools/winegcc/Makefile.in @@ -16,7 +16,6 @@ winegcc_EXTRADEFS = \ -DCC=""$(CC)"" \ -DCPP=""$(CPPBIN)"" \ -DCXX=""$(CXX)"" \ - -DLD=""$(LD)"" \ - -DPRELINK=""$(PRELINK)"" + -DLD=""$(LD)""
INSTALL_DEV = $(PROGRAMS) $(winegcc_SYMLINKS) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 0770ccfbe2a..c0f881df0a2 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -188,7 +188,6 @@ struct options const char* lib_suffix; const char* subsystem; const char* entry_point; - const char* prelink; const char* debug_file; const char* out_implib; struct strarray prefix; @@ -480,8 +479,6 @@ static struct strarray get_link_args( struct options *opts, const char *output_n { if (!try_link( opts->prefix, link_args, strmake("-Wl,-Ttext-segment=%s", opts->image_base)) ) strarray_add( &flags, strmake("-Wl,-Ttext-segment=%s", opts->image_base) ); - else - opts->prelink = PRELINK; } if (!try_link( opts->prefix, link_args, "-Wl,-z,max-page-size=0x1000")) strarray_add( &flags, "-Wl,-z,max-page-size=0x1000"); @@ -1385,20 +1382,6 @@ static void build(struct options* opts) spawn(opts->prefix, implib_args, 0); }
- /* set the base address with prelink if linker support is not present */ - if (opts->prelink && !opts->target_alias) - { - if (opts->prelink[0] && strcmp(opts->prelink,"false")) - { - struct strarray prelink_args = empty_strarray; - strarray_add(&prelink_args, opts->prelink); - strarray_add(&prelink_args, "--reloc-only"); - strarray_add(&prelink_args, opts->image_base); - strarray_add(&prelink_args, output_path); - spawn(opts->prefix, prelink_args, 1); - } - } - if (!is_pe) fixup_constructors( opts, output_path ); else if (opts->wine_builtin) make_wine_builtin( opts, output_path );