Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
4a138da7
Commit
4a138da7
authored
Dec 04, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configure: Require SEH support for PE builds.
parent
d37f0892
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
14 deletions
+67
-14
configure
configure
+49
-0
configure.ac
configure.ac
+13
-0
signal_x86_64.c
dlls/ntdll/signal_x86_64.c
+3
-3
asm.h
include/wine/asm.h
+2
-11
No files found.
configure
View file @
4a138da7
...
...
@@ -10819,6 +10819,55 @@ printf "%s\n" "$res" >&6; }
as_fn_append
${
wine_arch
}
_CC
"
$res
"
;;
esac
if
test
"x
$wine_arch
"
=
xi386
then
:
else
$as_nop
as_wine_cv_seh_support
=
`
printf
"%s
\n
"
"ac_cv_
${
wine_arch
}
_seh_support"
|
$as_tr_sh
`
{
printf
"%s
\n
"
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking whether
$CC
supports SEH directives"
>
&5
printf
%s
"checking whether
$CC
supports SEH directives... "
>
&6
;
}
if
eval test
\$
{
$as_wine_cv_seh_support
+y
}
then
:
printf
%s
"(cached) "
>
&6
else
$as_nop
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
asm(".text\nac_test:\t.seh_proc ac_test\n\tnop\n\t.seh_stackalloc 16\n\t.seh_endprologue\n\t.seh_endproc");
int
main (void)
{
;
return 0;
}
_ACEOF
if
ac_fn_c_try_compile
"
$LINENO
"
then
:
eval
"
$as_wine_cv_seh_support
=yes"
else
$as_nop
eval
"
$as_wine_cv_seh_support
=no"
fi
rm
-f
core conftest.err conftest.
$ac_objext
conftest.beam conftest.
$ac_ext
fi
eval
ac_res
=
\$
$as_wine_cv_seh_support
{
printf
"%s
\n
"
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ac_res
"
>
&5
printf
"%s
\n
"
"
$ac_res
"
>
&6
;
}
eval
res
=
\$
$as_wine_cv_seh_support
if
test
"x
$res
"
=
xyes
then
:
else
$as_nop
if
test
${
enable_archs
+y
}
then
:
as_fn_error
$?
"The
$wine_arch
cross-compiler doesn't support SEH directives.
This is an error since --enable-archs=
$wine_arch
was requested."
"
$LINENO
"
5
fi
continue
fi
fi
as_fn_append PE_ARCHS
"
$wine_arch
"
{
as_ac_var
=
`
printf
"%s
\n
"
"ac_cv_
${
wine_arch
}
_cflags_-fno-strict-aliasing"
|
$as_tr_sh
`
{
printf
"%s
\n
"
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking whether
$CC
supports -fno-strict-aliasing"
>
&5
...
...
configure.ac
View file @
4a138da7
...
...
@@ -954,6 +954,19 @@ This is an error since --enable-archs=$wine_arch was requested.])])
AS_VAR_APPEND([${wine_arch}_CC],[" $res"]) ;;
esac
AS_VAR_IF([wine_arch],[i386],[],
[AS_VAR_PUSHDEF([wine_cv_seh_support],[ac_cv_${wine_arch}_seh_support])
AC_CACHE_CHECK([whether $CC supports SEH directives], wine_cv_seh_support,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[asm(".text\nac_test:\t.seh_proc ac_test\n\tnop\n\t.seh_stackalloc 16\n\t.seh_endprologue\n\t.seh_endproc");]])],
[AS_VAR_SET([wine_cv_seh_support],[yes])],[AS_VAR_SET([wine_cv_seh_support],[no])]))
AS_VAR_COPY([res],[wine_cv_seh_support])
AS_VAR_POPDEF([wine_cv_seh_support])
AS_VAR_IF([res],[yes],[],
[AS_VAR_SET_IF([enable_archs],
[AC_MSG_ERROR([The $wine_arch cross-compiler doesn't support SEH directives.
This is an error since --enable-archs=$wine_arch was requested.])])
continue])])
AS_VAR_APPEND([PE_ARCHS],[" $wine_arch"])
WINE_TRY_PE_CFLAGS([-fno-strict-aliasing])
dnl clang needs to be told to fail on unknown options
...
...
dlls/ntdll/signal_x86_64.c
View file @
4a138da7
...
...
@@ -369,7 +369,7 @@ DWORD __cdecl nested_exception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTR
/***********************************************************************
* exception_handler_call_wrapper
*/
#ifdef __
ASM_SEH_SUPPORTE
D
#ifdef __
WINE_PE_BUIL
D
DWORD
WINAPI
exception_handler_call_wrapper
(
EXCEPTION_RECORD
*
rec
,
void
*
frame
,
CONTEXT
*
context
,
DISPATCHER_CONTEXT
*
dispatch
);
...
...
@@ -1077,7 +1077,7 @@ DWORD __cdecl unwind_exception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTR
/***********************************************************************
* unwind_handler_call_wrapper
*/
#ifdef __
ASM_SEH_SUPPORTE
D
#ifdef __
WINE_PE_BUIL
D
DWORD
WINAPI
unwind_handler_call_wrapper
(
EXCEPTION_RECORD
*
rec
,
void
*
frame
,
CONTEXT
*
context
,
DISPATCHER_CONTEXT
*
dispatch
);
...
...
@@ -1666,7 +1666,7 @@ USHORT WINAPI RtlCaptureStackBackTrace( ULONG skip, ULONG count, PVOID *buffer,
/***********************************************************************
* RtlUserThreadStart (NTDLL.@)
*/
#ifdef __
ASM_SEH_SUPPORTE
D
#ifdef __
WINE_PE_BUIL
D
__ASM_GLOBAL_FUNC
(
RtlUserThreadStart
,
"subq $0x28,%rsp
\n\t
"
".seh_stackalloc 0x28
\n\t
"
...
...
include/wine/asm.h
View file @
4a138da7
...
...
@@ -45,17 +45,8 @@
# define __ASM_EHABI(str)
#endif
#if defined(__SEH__) || (defined(_MSC_VER) && defined(__clang__) && (defined(__x86_64__) || defined(__aarch64__)))
# if defined(__aarch64__) && defined(__clang_major__) && (__clang_major__ < 12 || defined(__apple_build_version__))
/* Clang got support for aarch64 SEH assembly directives in Clang 12,
* before that, only .seh_startproc/.seh_endproc but nothing else was
* supported. Support for it doesn't exist in any Apple branded version
* of Clang yet. */
# define __ASM_SEH(str)
# else
# define __ASM_SEH(str) str
# define __ASM_SEH_SUPPORTED
# endif
#if defined(__WINE_PE_BUILD) && !defined(__i386__)
# define __ASM_SEH(str) str
#else
# define __ASM_SEH(str)
#endif
...
...
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