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
945efdb6
Commit
945efdb6
authored
May 16, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makefiles: Use -fshort-wchar when building with msvcrt.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
40a76a21
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
6 deletions
+41
-6
Makefile.in
Makefile.in
+1
-1
configure
configure
+31
-4
configure.ac
configure.ac
+3
-1
utils.c
tools/winebuild/utils.c
+4
-0
winegcc.c
tools/winegcc/winegcc.c
+2
-0
No files found.
Makefile.in
View file @
945efdb6
...
...
@@ -42,7 +42,7 @@ CPPFLAGS = @CPPFLAGS@
CROSSCFLAGS
=
@CROSSCFLAGS@
EXTRACFLAGS
=
@EXTRACFLAGS@
EXTRACROSSCFLAGS
=
@EXTRACROSSCFLAGS@
MSVCRTFLAGS
=
@
BUILTINFLAG
@
MSVCRTFLAGS
=
@
MSVCRTFLAGS
@
TARGETFLAGS
=
@TARGETFLAGS@
LDDLLFLAGS
=
@LDDLLFLAGS@
LDEXECFLAGS
=
@LDEXECFLAGS@
...
...
configure
View file @
945efdb6
...
...
@@ -631,7 +631,8 @@ RT_LIBS
POLL_LIBS
DL_LIBS
TOOLSEXT
BUILTINFLAG
UNWINDFLAGS
MSVCRTFLAGS
EXCESS_PRECISION_CFLAGS
EXTRACFLAGS
VKD3D_LIBS
...
...
@@ -17121,7 +17122,9 @@ fi ;;
esac
done
case
$host_os
in
MSVCRTFLAGS
=
""
case
$host_os
in
cygwin
*
|
mingw32
*
)
;;
*
)
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking whether the compiler supports -fno-builtin"
>
&5
$as_echo_n
"checking whether the compiler supports -fno-builtin... "
>
&6
;
}
...
...
@@ -17146,8 +17149,32 @@ fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ac_cv_cflags__fno_builtin
"
>
&5
$as_echo
"
$ac_cv_cflags__fno_builtin
"
>
&6
;
}
if
test
"x
$ac_cv_cflags__fno_builtin
"
=
xyes
;
then
:
BUILTINFLAG
=
"-fno-builtin"
MSVCRTFLAGS
=
"
$MSVCRTFLAGS
-fno-builtin"
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking whether the compiler supports -fshort-wchar"
>
&5
$as_echo_n
"checking whether the compiler supports -fshort-wchar... "
>
&6
;
}
if
${
ac_cv_cflags__fshort_wchar
+
:
}
false
;
then
:
$as_echo_n
"(cached) "
>
&6
else
ac_wine_try_cflags_saved
=
$CFLAGS
CFLAGS
=
"
$CFLAGS
-fshort-wchar"
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
int main(int argc, char **argv) { return 0; }
_ACEOF
if
ac_fn_c_try_link
"
$LINENO
"
;
then
:
ac_cv_cflags__fshort_wchar
=
yes
else
ac_cv_cflags__fshort_wchar
=
no
fi
rm
-f
core conftest.err conftest.
$ac_objext
\
conftest
$ac_exeext
conftest.
$ac_ext
CFLAGS
=
$ac_wine_try_cflags_saved
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ac_cv_cflags__fshort_wchar
"
>
&5
$as_echo
"
$ac_cv_cflags__fshort_wchar
"
>
&6
;
}
if
test
"x
$ac_cv_cflags__fshort_wchar
"
=
xyes
;
then
:
MSVCRTFLAGS
=
"
$MSVCRTFLAGS
-fshort-wchar"
fi
;;
esac
...
...
configure.ac
View file @
945efdb6
...
...
@@ -2011,9 +2011,11 @@ char*f(const char *h,char n) {return strchr(h,n);}]])],[ac_cv_c_logicalop_noisy=
done
dnl Disable gcc builtins except for Mingw
AC_SUBST(MSVCRTFLAGS,"")
case $host_os in
cygwin*|mingw32*) ;;
*) WINE_TRY_CFLAGS([-fno-builtin],[AC_SUBST(BUILTINFLAG,"-fno-builtin")]) ;;
*) WINE_TRY_CFLAGS([-fno-builtin],[MSVCRTFLAGS="$MSVCRTFLAGS -fno-builtin"])
WINE_TRY_CFLAGS([-fshort-wchar],[MSVCRTFLAGS="$MSVCRTFLAGS -fshort-wchar"]) ;;
esac
dnl gcc-4.6+ omits frame pointers by default, breaking some copy protections
...
...
tools/winebuild/utils.c
View file @
945efdb6
...
...
@@ -462,6 +462,10 @@ struct strarray get_ld_command(void)
break
;
}
}
if
(
target_cpu
==
CPU_ARM
&&
target_platform
!=
PLATFORM_WINDOWS
)
strarray_add
(
&
args
,
"--no-wchar-size-warning"
,
NULL
);
return
args
;
}
...
...
tools/winegcc/winegcc.c
View file @
945efdb6
...
...
@@ -477,6 +477,8 @@ static strarray *get_link_args( struct options *opts, const char *output_name )
strarray_add
(
flags
,
"-shared"
);
strarray_add
(
flags
,
"-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 "
...
...
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