Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
ba9ec152
Commit
ba9ec152
authored
Jun 14, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegcc: Add explicit support for the Cygwin platform.
On Cygwin we want to use Wine's msvcrt, unlike on Mingw.
parent
6002cb06
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
utils.c
tools/winegcc/utils.c
+1
-1
utils.h
tools/winegcc/utils.h
+1
-1
winegcc.c
tools/winegcc/winegcc.c
+13
-5
No files found.
tools/winegcc/utils.c
View file @
ba9ec152
...
...
@@ -261,7 +261,7 @@ static char* try_lib_path(const char* dir, const char* pre,
static
file_type
guess_lib_type
(
enum
target_platform
platform
,
const
char
*
dir
,
const
char
*
library
,
const
char
*
suffix
,
char
**
file
)
{
if
(
platform
!=
PLATFORM_WINDOWS
)
if
(
platform
!=
PLATFORM_WINDOWS
&&
platform
!=
PLATFORM_CYGWIN
)
{
/* Unix shared object */
if
((
*
file
=
try_lib_path
(
dir
,
"lib"
,
library
,
".so"
,
file_so
)))
...
...
tools/winegcc/utils.h
View file @
ba9ec152
...
...
@@ -38,7 +38,7 @@ enum target_cpu
enum
target_platform
{
PLATFORM_UNSPECIFIED
,
PLATFORM_APPLE
,
PLATFORM_SOLARIS
,
PLATFORM_WINDOWS
PLATFORM_UNSPECIFIED
,
PLATFORM_APPLE
,
PLATFORM_SOLARIS
,
PLATFORM_WINDOWS
,
PLATFORM_CYGWIN
};
void
error
(
const
char
*
s
,
...)
DECLSPEC_NORETURN
;
...
...
tools/winegcc/winegcc.c
View file @
ba9ec152
...
...
@@ -173,6 +173,7 @@ static const struct
{
"macos"
,
PLATFORM_APPLE
},
{
"darwin"
,
PLATFORM_APPLE
},
{
"solaris"
,
PLATFORM_SOLARIS
},
{
"cygwin"
,
PLATFORM_CYGWIN
},
{
"mingw32"
,
PLATFORM_WINDOWS
},
{
"windows"
,
PLATFORM_WINDOWS
},
{
"winnt"
,
PLATFORM_WINDOWS
}
...
...
@@ -230,6 +231,8 @@ static const enum target_cpu build_cpu = CPU_ARM;
static
enum
target_platform
build_platform
=
PLATFORM_APPLE
;
#elif defined(__sun)
static
enum
target_platform
build_platform
=
PLATFORM_SOLARIS
;
#elif defined(__CYGWIN__)
static
enum
target_platform
build_platform
=
PLATFORM_CYGWIN
;
#elif defined(_WIN32)
static
enum
target_platform
build_platform
=
PLATFORM_WINDOWS
;
#else
...
...
@@ -332,7 +335,8 @@ static void compile(struct options* opts, const char* lang)
break
;
}
if
(
opts
->
target_platform
==
PLATFORM_WINDOWS
)
goto
no_compat_defines
;
if
(
opts
->
target_platform
==
PLATFORM_WINDOWS
||
opts
->
target_platform
==
PLATFORM_CYGWIN
)
goto
no_compat_defines
;
if
(
opts
->
processor
!=
proc_cpp
)
{
...
...
@@ -678,7 +682,7 @@ static void build(struct options* opts)
/* building for Windows is completely different */
if
(
opts
->
target_platform
==
PLATFORM_WINDOWS
)
if
(
opts
->
target_platform
==
PLATFORM_WINDOWS
||
opts
->
target_platform
==
PLATFORM_CYGWIN
)
{
strarray
*
resources
=
strarray_alloc
();
char
*
res_o_name
=
NULL
;
...
...
@@ -732,6 +736,7 @@ static void build(struct options* opts)
if
(
!
opts
->
nostartfiles
)
add_library
(
opts
,
lib_dirs
,
files
,
"winecrt0"
);
if
(
opts
->
shared
&&
!
opts
->
nostdlib
)
add_library
(
opts
,
lib_dirs
,
files
,
"wine"
);
if
(
!
opts
->
shared
&&
opts
->
use_msvcrt
)
add_library
(
opts
,
lib_dirs
,
files
,
"msvcrt"
);
for
(
j
=
0
;
j
<
files
->
size
;
j
++
)
{
...
...
@@ -763,8 +768,12 @@ static void build(struct options* opts)
if
(
ext
)
*
ext
=
0
;
p
+=
3
;
strarray_add
(
link_args
,
strmake
(
"-L%s"
,
lib
));
strarray_add
(
link_args
,
strmake
(
"-l%s"
,
p
));
/* don't use Wine's msvcrt on mingw */
if
(
strcmp
(
p
,
"msvcrt"
)
||
opts
->
target_platform
==
PLATFORM_CYGWIN
)
{
strarray_add
(
link_args
,
strmake
(
"-L%s"
,
lib
));
strarray_add
(
link_args
,
strmake
(
"-l%s"
,
p
));
}
free
(
lib
);
break
;
}
...
...
@@ -782,7 +791,6 @@ static void build(struct options* opts)
break
;
}
}
if
(
!
opts
->
shared
&&
(
opts
->
use_msvcrt
||
opts
->
unicode_app
))
strarray_add
(
link_args
,
"-lmsvcrt"
);
if
(
res_o_name
)
compile_resources_to_object
(
opts
,
resources
,
res_o_name
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment