mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
configure: Change check for uint128_t
Check for ability to divide uint128_t values, since that what we actually use it for (in gstutils.c). The existence of a uint128_t type doesn't mean the compiler can actually generate code for it. Also make sure that we can actually link the result successfully. Fixes bug #614767.
This commit is contained in:
parent
2e35581939
commit
b090081f4f
1 changed files with 7 additions and 5 deletions
12
configure.ac
12
configure.ac
|
@ -320,12 +320,14 @@ dnl *** checks for structures ***
|
|||
dnl *** checks for compiler characteristics ***
|
||||
|
||||
dnl check if the compiler supports __uint128_t (gcc)
|
||||
dnl Actually check for 128-bit division, since that's what we use
|
||||
dnl uint128_t for.
|
||||
AC_CACHE_CHECK(for __uint128_t, gst_cv_uint128_t,
|
||||
AC_TRY_COMPILE([ ], [
|
||||
unsigned long long v1 = 1024ULL;
|
||||
unsigned long long v2 = 0x8000000000000000ULL;
|
||||
__uint128_t u = ((__uint128_t)v1)*((__uint128_t)v2);
|
||||
|
||||
AC_TRY_LINK([ ], [
|
||||
static __uint128_t v1 = 100;
|
||||
static __uint128_t v2 = 10;
|
||||
static __uint128_t u;
|
||||
u = v1 / v2;
|
||||
return 0;
|
||||
], [
|
||||
gst_cv_uint128_t=yes
|
||||
|
|
Loading…
Reference in a new issue