winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
September 2019
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
629 discussions
Start a n
N
ew thread
Zhiyi Zhang : winex11.drv: Initialize display devices before getting primary desktop rectangle.
by Alexandre Julliard
23 Sep '19
23 Sep '19
Module: wine Branch: master Commit: efbbe66669a060dd01b3ae399f5a9e7328312f03 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=efbbe66669a060dd01b3ae39…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Fri Sep 20 16:54:31 2019 +0800 winex11.drv: Initialize display devices before getting primary desktop rectangle. Otherwise, the retrieved primary desktop might be from the last explorer instance if we launch new explorer instances before wine server fully shuts down. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winex11.drv/desktop.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c index ecbcd6b381..fed8dd32e9 100644 --- a/dlls/winex11.drv/desktop.c +++ b/dlls/winex11.drv/desktop.c @@ -147,15 +147,18 @@ static LONG X11DRV_desktop_SetCurrentMode(int mode) */ void X11DRV_init_desktop( Window win, unsigned int width, unsigned int height ) { - RECT primary_rect = get_primary_monitor_rect(); + RECT primary_rect; root_window = win; managed_mode = FALSE; /* no managed windows in desktop mode */ - max_width = primary_rect.right - primary_rect.left; - max_height = primary_rect.bottom - primary_rect.top; + xinerama_init( width, height ); X11DRV_DisplayDevices_Init( TRUE ); + primary_rect = get_primary_monitor_rect(); + max_width = primary_rect.right - primary_rect.left; + max_height = primary_rect.bottom - primary_rect.top; + /* initialize the available resolutions */ dd_modes = X11DRV_Settings_SetHandlers("desktop", X11DRV_desktop_GetCurrentMode,
1
0
0
0
Jacek Caban : winegcc: Use -print-libgcc-file-name to find libgcc.
by Alexandre Julliard
23 Sep '19
23 Sep '19
Module: wine Branch: master Commit: 6cba24ef1f000ab2cc456a5d6f1d99ddd41d10bd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6cba24ef1f000ab2cc456a5d…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Sep 23 13:57:57 2019 +0200 winegcc: Use -print-libgcc-file-name to find libgcc. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winegcc/winegcc.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index b3a16ac001..bdcbe45c4b 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -96,6 +96,7 @@ #include <stdarg.h> #include <string.h> #include <errno.h> +#include <ctype.h> #include "utils.h" @@ -891,6 +892,49 @@ static char *find_static_lib( const char *dll ) return NULL; } +static const char *find_libgcc(const strarray *prefix, const strarray *link_tool) +{ + const char *out = get_temp_file( "find_libgcc", ".out" ); + const char *err = get_temp_file( "find_libgcc", ".err" ); + strarray *link = strarray_dup( link_tool ); + int sout = -1, serr = -1; + char *libgcc, *p; + struct stat st; + size_t cnt; + int ret; + + strarray_add( link, "-print-libgcc-file-name" ); + + sout = dup( fileno(stdout) ); + freopen( out, "w", stdout ); + serr = dup( fileno(stderr) ); + freopen( err, "w", stderr ); + ret = spawn( prefix, link, 1 ); + if (sout >= 0) + { + dup2( sout, fileno(stdout) ); + close( sout ); + } + if (serr >= 0) + { + dup2( serr, fileno(stderr) ); + close( serr ); + } + strarray_free( link ); + + if (ret || stat(out, &st) || !st.st_size) return NULL; + + libgcc = xmalloc(st.st_size + 1); + sout = open(out, O_RDONLY); + if (sout == -1) return NULL; + cnt = read(sout, libgcc, st.st_size); + close(sout); + libgcc[cnt] = 0; + if ((p = strchr(libgcc, '\n'))) *p = 0; + return libgcc; +} + + /* add specified library to the list of files */ static void add_library( struct options *opts, strarray *lib_dirs, strarray *files, const char *library ) { @@ -923,7 +967,7 @@ static void build(struct options* opts) strarray *lib_dirs, *files; strarray *spec_args, *link_args; char *output_file, *output_path; - const char *spec_o_name; + const char *spec_o_name, *libgcc = NULL; const char *output_name, *spec_file, *lang; int generate_app_loader = 1; const char* crt_lib = NULL; @@ -1147,6 +1191,12 @@ static void build(struct options* opts) /* link everything together now */ link_args = get_link_args( opts, output_name ); + if ((opts->nodefaultlibs || opts->shared) && is_pe) + { + libgcc = find_libgcc(opts->prefix, link_args); + if (!libgcc) libgcc = "-lgcc"; + } + strarray_add(link_args, "-o"); strarray_add(link_args, output_path); @@ -1201,7 +1251,7 @@ static void build(struct options* opts) strarray_add(link_args, "-lc"); } - if ((opts->nodefaultlibs || opts->shared) && is_pe) strarray_add( link_args, "-lgcc" ); + if (libgcc) strarray_add(link_args, libgcc); spawn(opts->prefix, link_args, 0); strarray_free (link_args);
1
0
0
0
Alexandre Julliard : winegcc: Pass all linker arguments also when testing link options.
by Alexandre Julliard
23 Sep '19
23 Sep '19
Module: wine Branch: master Commit: d63c51fd30ff9f782258da922c5965bc411ae6db URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d63c51fd30ff9f782258da92…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Sep 23 19:27:09 2019 +0200 winegcc: Pass all linker arguments also when testing link options. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winegcc/winegcc.c | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 33dcad1e4c..b3a16ac001 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -322,10 +322,9 @@ static const char* build_tool_name(struct options *opts, const char* base, const return find_binary( opts->prefix, str ); } -static const strarray* get_translator(struct options *opts) +static strarray* get_translator(struct options *opts) { const char *str = NULL; - strarray *ret; switch(opts->processor) { @@ -342,10 +341,7 @@ static const strarray* get_translator(struct options *opts) default: assert(0); } - ret = strarray_fromstring( str, " " ); - if (opts->force_pointer_size) - strarray_add( ret, strmake("-m%u", 8 * opts->force_pointer_size )); - return ret; + return strarray_fromstring( str, " " ); } static int try_link( const strarray *prefix, const strarray *link_tool, const char *cflags ) @@ -386,12 +382,10 @@ static int try_link( const strarray *prefix, const strarray *link_tool, const ch static strarray *get_link_args( struct options *opts, const char *output_name ) { int use_wine_crt = opts->wine_builtin && opts->shared; - const strarray *link_tool = get_translator( opts ); + strarray *link_args = get_translator( opts ); strarray *flags = strarray_alloc(); - unsigned int i; - strarray_addall( flags, link_tool ); - for (i = 0; i < opts->linker_args->size; i++) strarray_add( flags, opts->linker_args->base[i] ); + strarray_addall( link_args, opts->linker_args ); if (verbose > 1) strarray_add( flags, "-v" ); @@ -412,7 +406,8 @@ static strarray *get_link_args( struct options *opts, const char *output_name ) strarray_add( flags, opts->image_base ); } if (opts->strip) strarray_add( flags, "-Wl,-x" ); - return flags; + strarray_addall( link_args, flags ); + return link_args; case PLATFORM_SOLARIS: { @@ -463,45 +458,45 @@ static strarray *get_link_args( struct options *opts, const char *output_name ) /* make sure we don't need a libgcc_s dll on Windows */ strarray_add( flags, "-static-libgcc" ); - return flags; + strarray_addall( link_args, flags ); + return link_args; default: if (opts->image_base) { - if (!try_link( opts->prefix, link_tool, strmake("-Wl,-Ttext-segment=%s", opts->image_base)) ) + 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_tool, "-Wl,-z,max-page-size=0x1000")) + if (!try_link( opts->prefix, link_args, "-Wl,-z,max-page-size=0x1000")) strarray_add( flags, "-Wl,-z,max-page-size=0x1000"); break; } /* generic Unix shared library flags */ - strarray_add( flags, "-shared" ); - strarray_add( flags, "-Wl,-Bsymbolic" ); + strarray_add( link_args, "-shared" ); + strarray_add( link_args, "-Wl,-Bsymbolic" ); if (!opts->noshortwchar && opts->target_cpu == CPU_ARM) strarray_add( flags, "-Wl,--no-wchar-size-warning" ); /* Try all options first - this is likely to succeed on modern compilers */ - if (!try_link( opts->prefix, link_tool, "-fPIC -shared -Wl,-Bsymbolic " - "-Wl,-z,defs -Wl,-init,__wine_spec_init,-fini,_wine_spec_fini" )) + if (!try_link( opts->prefix, link_args, "-Wl,-z,defs -Wl,-init,__wine_spec_init,-fini,_wine_spec_fini" )) { strarray_add( flags, "-Wl,-z,defs" ); strarray_add( flags, "-Wl,-init,__wine_spec_init,-fini,__wine_spec_fini" ); } else /* otherwise figure out which ones are allowed */ { - if (!try_link( opts->prefix, link_tool, "-fPIC -shared -Wl,-Bsymbolic -Wl,-z,defs" )) + if (!try_link( opts->prefix, link_args, "-Wl,-z,defs" )) strarray_add( flags, "-Wl,-z,defs" ); - if (!try_link( opts->prefix, link_tool, "-fPIC -shared -Wl,-Bsymbolic " - "-Wl,-init,__wine_spec_init,-fini,_wine_spec_fini" )) + if (!try_link( opts->prefix, link_args, "-Wl,-init,__wine_spec_init,-fini,_wine_spec_fini" )) strarray_add( flags, "-Wl,-init,__wine_spec_init,-fini,__wine_spec_fini" ); } - return flags; + strarray_addall( link_args, flags ); + return link_args; } /* check that file is a library for the correct platform */ @@ -664,6 +659,8 @@ static void compile(struct options* opts, const char* lang) strarray* gpp; strarray_addall(comp_args, get_translator(opts)); + if (opts->force_pointer_size) + strarray_add( comp_args, strmake("-m%u", 8 * opts->force_pointer_size ) ); switch(opts->processor) { case proc_cpp: gcc_defs = 1; break;
1
0
0
0
Alexandre Julliard : winegcc: Always search the standard include dirs.
by Alexandre Julliard
23 Sep '19
23 Sep '19
Module: wine Branch: master Commit: 683e45549768145aeed80dca54b24b4e2484f543 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=683e45549768145aeed80dca…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Sep 23 15:53:28 2019 +0200 winegcc: Always search the standard include dirs. By analogy with the library dir search. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winegcc/winegcc.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 1af94ca63b..33dcad1e4c 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -804,16 +804,26 @@ no_compat_defines: /* standard includes come last in the include search path */ if (!opts->wine_objdir && !opts->nostdinc) { + const char *incl_dirs[] = { INCLUDEDIR, "/usr/include", "/usr/local/include" }; const char *root = opts->isysroot ? opts->isysroot : opts->sysroot ? opts->sysroot : ""; + if (opts->use_msvcrt) { - strarray_add(comp_args, strmake( "%s%s%s/wine/msvcrt", - gcc_defs ? "-isystem" : "-I", root, INCLUDEDIR )); + for (j = 0; j < ARRAY_SIZE(incl_dirs); j++) + { + if (j && !strcmp( incl_dirs[0], incl_dirs[j] )) continue; + strarray_add(comp_args, strmake( "%s%s%s/wine/msvcrt", + gcc_defs ? "-isystem" : "-I", root, incl_dirs[j] )); + } strarray_add(comp_args, "-D__MSVCRT__"); } - strarray_add(comp_args, strmake( "-I%s%s", root, INCLUDEDIR )); - strarray_add(comp_args, strmake( "%s%s%s/wine/windows", - gcc_defs ? "-isystem" : "-I", root, INCLUDEDIR )); + for (j = 0; j < ARRAY_SIZE(incl_dirs); j++) + { + if (j && !strcmp( incl_dirs[0], incl_dirs[j] )) continue; + strarray_add(comp_args, strmake( "-I%s%s", root, incl_dirs[j] )); + strarray_add(comp_args, strmake( "%s%s%s/wine/windows", + gcc_defs ? "-isystem" : "-I", root, incl_dirs[j] )); + } } else if (opts->wine_objdir) strarray_add(comp_args, strmake("-I%s/include", opts->wine_objdir) );
1
0
0
0
Alexandre Julliard : winegcc: Add --wine-objdir and --winebuild options for the Wine build.
by Alexandre Julliard
23 Sep '19
23 Sep '19
Module: wine Branch: master Commit: 08956bc9bb0ac54c04f300c9b9a2911665fe6227 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=08956bc9bb0ac54c04f300c9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Sep 23 13:43:18 2019 +0200 winegcc: Add --wine-objdir and --winebuild options for the Wine build. This avoids overloading the meaning of the -B and --sysroot options. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/makedep.c | 9 ++++-- tools/winegcc/winegcc.c | 70 ++++++++++++++++++++++++++------------------ tools/winegcc/winegcc.man.in | 22 +++++++------- 3 files changed, 58 insertions(+), 43 deletions(-) diff --git a/tools/makedep.c b/tools/makedep.c index e37bd8d63a..67dfea43bb 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -2321,8 +2321,13 @@ static struct strarray get_source_defines( struct makefile *make, struct incl_fi static void output_winegcc_command( struct makefile *make ) { output( "\t%s -o $@", tools_path( make, "winegcc" )); - output_filename( strmake( "-B%s", tools_dir_path( make, "winebuild" ))); - if (tools_dir) output_filename( strmake( "--sysroot=%s", top_obj_dir_path( make, "" ))); + output_filename( "--wine-objdir" ); + output_filename( top_obj_dir_path( make, "" )); + if (tools_dir) + { + output_filename( "--winebuild" ); + output_filename( tools_path( make, "winebuild" )); + } if (make->is_cross) { output_filename( "-b" ); diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 506096795e..1af94ca63b 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -210,6 +210,7 @@ struct options int strip; int pic; const char* wine_objdir; + const char* winebuild; const char* output_name; const char* image_base; const char* section_align; @@ -845,11 +846,17 @@ static const char* compile_to_object(struct options* opts, const char* file, con static strarray *get_winebuild_args(struct options *opts) { const char* winebuild = getenv("WINEBUILD"); + const char *binary = NULL; strarray *spec_args = strarray_alloc(); unsigned int i; - if (!winebuild) winebuild = "winebuild"; - strarray_add( spec_args, find_binary( opts->prefix, winebuild )); + if (opts->winebuild) + binary = opts->winebuild; + else if (opts->wine_objdir) + binary = strmake( "%s/tools/winebuild/winebuild%s", opts->wine_objdir, EXEEXT ); + else + binary = find_binary( opts->prefix, winebuild ? winebuild : "winebuild" ); + strarray_add( spec_args, binary ); if (verbose) strarray_add( spec_args, "-v" ); if (keep_generated) strarray_add( spec_args, "--save-temps" ); if (opts->target) @@ -860,10 +867,7 @@ static strarray *get_winebuild_args(struct options *opts) if (opts->prefix) { for (i = 0; i < opts->prefix->size; i++) - { - if (strendswith( opts->prefix->base[i], "/tools/winebuild" )) continue; strarray_add( spec_args, strmake( "-B%s", opts->prefix->base[i] )); - } } if (!opts->use_msvcrt) strarray_add( spec_args, "-munix" ); if (opts->unwind_tables) strarray_add( spec_args, "-fasynchronous-unwind-tables" ); @@ -1352,6 +1356,22 @@ static void parse_target_option( struct options *opts, const char *target ) opts->target = xstrdup( target ); } +static int is_option( char **argv, int i, const char *option, const char **option_arg ) +{ + if (!strcmp( argv[i], option )) + { + if (!argv[i + 1]) error( "option %s requires an argument\n", argv[i] ); + *option_arg = argv[i + 1]; + return 1; + } + if (!strncmp( argv[i], option, strlen(option) ) && argv[i][strlen(option)] == '=') + { + *option_arg = argv[i] + strlen(option) + 1; + return 1; + } + return 0; +} + int main(int argc, char **argv) { int i, c, next_is_arg = 0, linking = 1; @@ -1438,6 +1458,8 @@ int main(int argc, char **argv) next_is_arg = (strcmp("--param", argv[i]) == 0 || strcmp("--sysroot", argv[i]) == 0 || strcmp("--target", argv[i]) == 0 || + strcmp("--wine-objdir", argv[i]) == 0 || + strcmp("--winebuild", argv[i]) == 0 || strcmp("--lib-suffix", argv[i]) == 0); break; } @@ -1474,19 +1496,6 @@ int main(int argc, char **argv) case 'B': str = strdup(option_arg); if (strendswith(str, "/")) str[strlen(str) - 1] = 0; - if (strendswith(str, "/tools/winebuild")) - { - char *objdir = strdup(str); - objdir[strlen(objdir) - sizeof("/tools/winebuild") + 1] = 0; - opts.wine_objdir = objdir; - /* don't pass it to the compiler, this generates warnings */ - raw_compiler_arg = raw_linker_arg = 0; - } - else if (!strcmp(str, "tools/winebuild")) - { - opts.wine_objdir = "."; - raw_compiler_arg = raw_linker_arg = 0; - } if (!opts.prefix) opts.prefix = strarray_alloc(); strarray_add(opts.prefix, str); break; @@ -1659,22 +1668,26 @@ int main(int argc, char **argv) case '-': if (strcmp("-static", argv[i]+1) == 0) linking = -1; - else if (!strncmp("--sysroot", argv[i], 9)) + else if (is_option( argv, i, "--sysroot", &option_arg )) + opts.sysroot = option_arg; + else if (is_option( argv, i, "--target", &option_arg )) { - if (argv[i][9] == '=') opts.sysroot = argv[i] + 10; - else opts.sysroot = argv[i + 1]; - if (opts.wine_objdir) raw_compiler_arg = raw_linker_arg = 0; + parse_target_option( &opts, option_arg ); + raw_compiler_arg = raw_linker_arg = 0; + } + else if (is_option( argv, i, "--wine-objdir", &option_arg )) + { + opts.wine_objdir = option_arg; + raw_compiler_arg = raw_linker_arg = 0; } - else if (!strncmp("--target", argv[i], 8)) + else if (is_option( argv, i, "--winebuild", &option_arg )) { - if (argv[i][8] == '=') parse_target_option( &opts, argv[i] + 9 ); - else parse_target_option( &opts, argv[i + 1] ); + opts.winebuild = option_arg; raw_compiler_arg = raw_linker_arg = 0; } - else if (!strncmp("--lib-suffix", argv[i], 12) && opts.wine_objdir) + else if (is_option( argv, i, "--lib-suffix", &option_arg )) { - if (argv[i][12] == '=') opts.lib_suffix = argv[i] + 13; - else opts.lib_suffix = argv[i + 1]; + opts.lib_suffix = option_arg; raw_compiler_arg = raw_linker_arg = 0; } break; @@ -1703,7 +1716,6 @@ int main(int argc, char **argv) } } - if (opts.wine_objdir && opts.sysroot) opts.wine_objdir = opts.sysroot; if (opts.processor == proc_cpp) linking = 0; if (linking == -1) error("Static linking is not supported\n"); diff --git a/tools/winegcc/winegcc.man.in b/tools/winegcc/winegcc.man.in index 3fcd6f95f3..5550767299 100644 --- a/tools/winegcc/winegcc.man.in +++ b/tools/winegcc/winegcc.man.in @@ -26,18 +26,17 @@ the gcc manual for more information on those options. .B gcc options: All gcc options are supported, and are passed along to the backend compiler. -.IP "\fB-B\fIprefix\fR" -This option specifies where to find the executables, libraries, -include files, and data files of the compiler itself. This is a -standard gcc option that has been extended to recognize a -\fIprefix\fR ending with '/tools/winebuild', in which case winegcc -enters a special mode for building Wine itself. Developers should -avoid prefixes ending with the magic suffix, or if that is not -possible, simply express it differently, such as '/tools/winebuild/', -to avoid the special behaviour. .IP "\fB-b,--target \fItarget\fR" Specify the target architecture triplet for cross-compiling. winegcc will then invoke \fItarget\fR-gcc instead of gcc. +.IP "\fB--wine-objdir \fIdir\fR" +Specify the Wine object directory. This is used when building Wine +itself, to use the includes and libraries from inside the build tree. +.IP "\fB--winebuild \fIname\fR" +Specifies the path and name of the \fBwinebuild\fR binary that will be +launched automatically by \fBwinegcc\fR. If not set, \fBwinegcc\fR +will look for a file named \fIwinebuild\fR in the path. This takes +precedence over the \fBWINEBUILD\fR environment variable. .IP \fB-fno-short-wchar\fR Override the underlying type for wchar_t to be the default for the target, instead of using short unsigned int, which is the default @@ -74,9 +73,8 @@ commas, it is split into multiple options at the commas. .TP .B WINEBUILD Specifies the path and name of the \fBwinebuild\fR binary that will be -launched automatically by \fBwinegcc\fR. -If not set, \fBwinegcc\fR will look for a file named \fIwinebuild\fR -in the path. +launched automatically by \fBwinegcc\fR. If not set, \fBwinegcc\fR +will look for a file named \fIwinebuild\fR in the path. .SH DEFINES winegcc defines __WINE__, for code that needs to know when it is being compiled under Wine. It also defines WIN32, _WIN32, __WIN32,
1
0
0
0
Alexandre Julliard : winegcc: Add ARRAY_SIZE macro.
by Alexandre Julliard
23 Sep '19
23 Sep '19
Module: wine Branch: master Commit: cb010cd6ec17d5310753bc1a02e5d6a407beff3c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cb010cd6ec17d5310753bc1a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Sep 23 18:53:19 2019 +0200 winegcc: Add ARRAY_SIZE macro. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winegcc/utils.h | 2 ++ tools/winegcc/winegcc.c | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/winegcc/utils.h b/tools/winegcc/utils.h index 6056ee7258..3d6b8f3665 100644 --- a/tools/winegcc/utils.h +++ b/tools/winegcc/utils.h @@ -35,6 +35,8 @@ # endif #endif +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) + enum target_cpu { CPU_x86, CPU_x86_64, CPU_POWERPC, CPU_ARM, CPU_ARM64 diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 06771262eb..506096795e 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -579,7 +579,7 @@ static char *get_lib_dir( struct options *opts ) build_len = strlen( build_multiarch ); target_len = strlen( target_multiarch ); - for (i = 0; i < sizeof(stdlibpath)/sizeof(stdlibpath[0]); i++) + for (i = 0; i < ARRAY_SIZE(stdlibpath); i++) { char *p, *buffer = xmalloc( strlen(root) + strlen(stdlibpath[i]) + strlen("/arm-linux-gnueabi") + strlen(libwine) + 1 ); @@ -1260,7 +1260,7 @@ static int is_linker_arg(const char* arg) break; } - for (j = 0; j < sizeof(link_switches)/sizeof(link_switches[0]); j++) + for (j = 0; j < ARRAY_SIZE(link_switches); j++) if (strcmp(link_switches[j], arg) == 0) return 1; return 0; @@ -1297,7 +1297,7 @@ static int is_mingw_arg(const char* arg) }; unsigned int j; - for (j = 0; j < sizeof(mingw_switches)/sizeof(mingw_switches[0]); j++) + for (j = 0; j < ARRAY_SIZE(mingw_switches); j++) if (strcmp(mingw_switches[j], arg) == 0) return 1; return 0; @@ -1315,7 +1315,7 @@ static void parse_target_option( struct options *opts, const char *target ) if ((p = strchr( spec, '-' ))) { *p++ = 0; - for (i = 0; i < sizeof(cpu_names)/sizeof(cpu_names[0]); i++) + for (i = 0; i < ARRAY_SIZE(cpu_names); i++) { if (!strcmp( cpu_names[i].name, spec )) { @@ -1323,7 +1323,7 @@ static void parse_target_option( struct options *opts, const char *target ) break; } } - if (i == sizeof(cpu_names)/sizeof(cpu_names[0])) + if (i == ARRAY_SIZE(cpu_names)) error( "Unrecognized CPU '%s'\n", spec ); platform = p; if ((p = strrchr( p, '-' ))) platform = p + 1; @@ -1339,7 +1339,7 @@ static void parse_target_option( struct options *opts, const char *target ) /* get the OS part */ opts->target_platform = PLATFORM_UNSPECIFIED; /* default value */ - for (i = 0; i < sizeof(platform_names)/sizeof(platform_names[0]); i++) + for (i = 0; i < ARRAY_SIZE(platform_names); i++) { if (!strncmp( platform_names[i].name, platform, strlen(platform_names[i].name) )) {
1
0
0
0
Henri Verbeet : wined3d: Use wined3d_context_map_bo_address() in wined3d_buffer_gl_map().
by Alexandre Julliard
23 Sep '19
23 Sep '19
Module: wine Branch: master Commit: 47701b7231c14c9434f2c9f3f8e7bb466deed97a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=47701b7231c14c9434f2c9f3…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Sep 23 15:12:18 2019 +0330 wined3d: Use wined3d_context_map_bo_address() in wined3d_buffer_gl_map(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/buffer.c | 64 ++++++++++++++++++++------------------------------- 1 file changed, 25 insertions(+), 39 deletions(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index f483c52340..b8c5117f89 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -772,8 +772,9 @@ void * CDECL wined3d_buffer_get_parent(const struct wined3d_buffer *buffer) /* The caller provides a context and binds the buffer */ static void wined3d_buffer_gl_sync_apple(struct wined3d_buffer_gl *buffer_gl, - DWORD flags, const struct wined3d_gl_info *gl_info) + uint32_t flags, struct wined3d_context_gl *context_gl) { + const struct wined3d_gl_info *gl_info = context_gl->gl_info; enum wined3d_fence_result ret; HRESULT hr; @@ -784,6 +785,8 @@ static void wined3d_buffer_gl_sync_apple(struct wined3d_buffer_gl *buffer_gl, if (flags & WINED3D_MAP_DISCARD) { + wined3d_buffer_gl_bind(buffer_gl, context_gl); + GL_EXTCALL(glBufferData(buffer_gl->buffer_type_hint, buffer_gl->b.resource.size, NULL, buffer_gl->buffer_object_usage)); checkGLcall("glBufferData"); @@ -834,6 +837,7 @@ drop_fence: } gl_info->gl_ops.gl.p_glFinish(); + wined3d_buffer_gl_bind(buffer_gl, context_gl); GL_EXTCALL(glBufferParameteriAPPLE(buffer_gl->buffer_type_hint, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_TRUE)); checkGLcall("glBufferParameteriAPPLE(buffer_gl->buffer_type_hint, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_TRUE)"); buffer_gl->b.flags &= ~WINED3D_BUFFER_APPLESYNC; @@ -964,7 +968,6 @@ static HRESULT wined3d_buffer_gl_map(struct wined3d_buffer_gl *buffer_gl, unsigned int offset, unsigned int size, BYTE **data, DWORD flags) { struct wined3d_device *device = buffer_gl->b.resource.device; - struct wined3d_context_gl *context_gl; struct wined3d_context *context; LONG count; BYTE *base; @@ -976,6 +979,7 @@ static HRESULT wined3d_buffer_gl_map(struct wined3d_buffer_gl *buffer_gl, if (buffer_gl->b.buffer_object) { unsigned int dirty_offset = offset, dirty_size = size; + struct wined3d_bo_address addr; /* DISCARD invalidates the entire buffer, regardless of the specified * offset and size. Some applications also depend on the entire buffer @@ -1003,11 +1007,7 @@ static HRESULT wined3d_buffer_gl_map(struct wined3d_buffer_gl *buffer_gl, } else { - const struct wined3d_gl_info *gl_info; - context = context_acquire(device, NULL, 0); - context_gl = wined3d_context_gl(context); - gl_info = context_gl->gl_info; if (flags & WINED3D_MAP_DISCARD) wined3d_buffer_validate_location(&buffer_gl->b, WINED3D_LOCATION_BUFFER); @@ -1025,8 +1025,6 @@ static HRESULT wined3d_buffer_gl_map(struct wined3d_buffer_gl *buffer_gl, if (count == 1) { - wined3d_buffer_gl_bind(buffer_gl, context_gl); - /* Filter redundant WINED3D_MAP_DISCARD maps. The 3DMark2001 * multitexture fill rate test seems to depend on this. When * we map a buffer with GL_MAP_INVALIDATE_BUFFER_BIT, the @@ -1037,28 +1035,19 @@ static HRESULT wined3d_buffer_gl_map(struct wined3d_buffer_gl *buffer_gl, if (buffer_gl->b.flags & WINED3D_BUFFER_DISCARD) flags &= ~WINED3D_MAP_DISCARD; - if (gl_info->supported[ARB_MAP_BUFFER_RANGE]) - { - GLbitfield mapflags = wined3d_resource_gl_map_flags(flags); - buffer_gl->b.map_ptr = GL_EXTCALL(glMapBufferRange(buffer_gl->buffer_type_hint, - 0, buffer_gl->b.resource.size, mapflags)); - checkGLcall("glMapBufferRange"); - } - else - { - if (buffer_gl->b.flags & WINED3D_BUFFER_APPLESYNC) - wined3d_buffer_gl_sync_apple(buffer_gl, flags, gl_info); - buffer_gl->b.map_ptr = GL_EXTCALL(glMapBuffer(buffer_gl->buffer_type_hint, - wined3d_resource_gl_legacy_map_flags(flags))); - checkGLcall("glMapBuffer"); - } + if (buffer_gl->b.flags & WINED3D_BUFFER_APPLESYNC) + wined3d_buffer_gl_sync_apple(buffer_gl, flags, wined3d_context_gl(context)); + + addr.buffer_object = buffer_gl->b.buffer_object; + addr.addr = 0; + buffer_gl->b.map_ptr = wined3d_context_map_bo_address(context, &addr, + buffer_gl->b.resource.size, buffer_gl->b.resource.bind_flags, flags); if (((DWORD_PTR)buffer_gl->b.map_ptr) & (RESOURCE_ALIGNMENT - 1)) { WARN("Pointer %p is not %u byte aligned.\n", buffer_gl->b.map_ptr, RESOURCE_ALIGNMENT); - GL_EXTCALL(glUnmapBuffer(buffer_gl->buffer_type_hint)); - checkGLcall("glUnmapBuffer"); + wined3d_context_unmap_bo_address(context, &addr, buffer_gl->b.resource.bind_flags, 0, NULL); buffer_gl->b.map_ptr = NULL; if (buffer_gl->b.resource.usage & WINED3DUSAGE_DYNAMIC) @@ -1122,36 +1111,33 @@ static void wined3d_buffer_gl_unmap(struct wined3d_buffer_gl *buffer_gl) if (buffer_gl->b.map_ptr) { struct wined3d_device *device = buffer_gl->b.resource.device; + unsigned int range_count = buffer_gl->b.modified_areas; const struct wined3d_gl_info *gl_info; struct wined3d_context_gl *context_gl; struct wined3d_context *context; + struct wined3d_bo_address addr; context = context_acquire(device, NULL, 0); context_gl = wined3d_context_gl(context); gl_info = context_gl->gl_info; - wined3d_buffer_gl_bind(buffer_gl, context_gl); - - if (gl_info->supported[ARB_MAP_BUFFER_RANGE]) + if (buffer_gl->b.flags & WINED3D_BUFFER_APPLESYNC) { - for (i = 0; i < buffer_gl->b.modified_areas; ++i) - { - GL_EXTCALL(glFlushMappedBufferRange(buffer_gl->buffer_type_hint, - buffer_gl->b.maps[i].offset, buffer_gl->b.maps[i].size)); - checkGLcall("glFlushMappedBufferRange"); - } - } - else if (buffer_gl->b.flags & WINED3D_BUFFER_APPLESYNC) - { - for (i = 0; i < buffer_gl->b.modified_areas; ++i) + wined3d_buffer_gl_bind(buffer_gl, context_gl); + for (i = 0; i < range_count; ++i) { GL_EXTCALL(glFlushMappedBufferRangeAPPLE(buffer_gl->buffer_type_hint, buffer_gl->b.maps[i].offset, buffer_gl->b.maps[i].size)); checkGLcall("glFlushMappedBufferRangeAPPLE"); } + range_count = 0; } - GL_EXTCALL(glUnmapBuffer(buffer_gl->buffer_type_hint)); + addr.buffer_object = buffer_gl->b.buffer_object; + addr.addr = 0; + wined3d_context_unmap_bo_address(context, &addr, + buffer_gl->b.resource.bind_flags, range_count, buffer_gl->b.maps); + context_release(context); buffer_clear_dirty_areas(&buffer_gl->b);
1
0
0
0
Henri Verbeet : wined3d: Move the "buffer_object" field from struct wined3d_buffer_gl to struct wined3d_buffer.
by Alexandre Julliard
23 Sep '19
23 Sep '19
Module: wine Branch: master Commit: 179c8cc86faab506bc7589a74f92e033869ddc40 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=179c8cc86faab506bc7589a7…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Sep 23 15:12:17 2019 +0330 wined3d: Move the "buffer_object" field from struct wined3d_buffer_gl to struct wined3d_buffer. We'll want to use this for Vulkan buffers as well. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/adapter_gl.c | 2 +- dlls/wined3d/buffer.c | 24 ++++++++++++++---------- dlls/wined3d/context.c | 6 +++--- dlls/wined3d/state.c | 14 ++++---------- dlls/wined3d/view.c | 7 +++---- dlls/wined3d/wined3d_private.h | 2 +- 6 files changed, 26 insertions(+), 29 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=179c8cc86faab506bc75…
1
0
0
0
Henri Verbeet : wined3d: Use explicit flushing in wined3d_context_gl_unmap_bo_address().
by Alexandre Julliard
23 Sep '19
23 Sep '19
Module: wine Branch: master Commit: c2f0ae50b4dd70aa9d364ec6a7dd728e65370d8b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c2f0ae50b4dd70aa9d364ec6…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Sep 23 15:12:16 2019 +0330 wined3d: Use explicit flushing in wined3d_context_gl_unmap_bo_address(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/adapter_gl.c | 6 +++--- dlls/wined3d/adapter_vk.c | 4 ++-- dlls/wined3d/context.c | 25 +++++++++++++++++++------ dlls/wined3d/directx.c | 4 ++-- dlls/wined3d/surface.c | 19 ++++++++++++++----- dlls/wined3d/texture.c | 15 +++++++++++---- dlls/wined3d/wined3d_private.h | 26 ++++++++++++++------------ 7 files changed, 65 insertions(+), 34 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=c2f0ae50b4dd70aa9d36…
1
0
0
0
Henri Verbeet : wined3d: Derive the GL bind point for buffer object maps from the bind flags.
by Alexandre Julliard
23 Sep '19
23 Sep '19
Module: wine Branch: master Commit: 2bc6941ab06bc5243eb77a5bcf26d482a58c40ba URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2bc6941ab06bc5243eb77a5b…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Sep 23 15:12:15 2019 +0330 wined3d: Derive the GL bind point for buffer object maps from the bind flags. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/adapter_gl.c | 20 ++++++++++++++++---- dlls/wined3d/adapter_vk.c | 4 ++-- dlls/wined3d/buffer.c | 8 +++++--- dlls/wined3d/directx.c | 4 ++-- dlls/wined3d/surface.c | 23 +++++++++++------------ dlls/wined3d/texture.c | 10 ++++------ dlls/wined3d/wined3d_private.h | 14 ++++++++------ 7 files changed, 48 insertions(+), 35 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=2bc6941ab06bc5243eb7…
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
63
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
Results per page:
10
25
50
100
200