diff options
| author | Khem Raj <raj.khem@gmail.com> | 2021-03-19 01:14:03 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2021-03-19 01:19:14 -0700 |
| commit | 57f7692e8ef707535ffa1683aa711de442736ec1 (patch) | |
| tree | cdb5f27a83817712bbecbcdfe931ae0da8e7e758 | |
| parent | 90ed7a41c2d26839ee69373971420ae21c659773 (diff) | |
| download | meta-openembedded-57f7692e8ef707535ffa1683aa711de442736ec1.tar.gz | |
vboxguestdrivers: Add __divmoddi4 builtin support
gcc 11 needs it on i686
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/add__divmoddi4.patch | 36 | ||||
| -rw-r--r-- | meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.18.bb | 1 |
2 files changed, 37 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/add__divmoddi4.patch b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/add__divmoddi4.patch new file mode 100644 index 0000000000..8dd30a20ef --- /dev/null +++ b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/add__divmoddi4.patch | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | add __divmoddi4 builtin | ||
| 2 | |||
| 3 | GCC 11 will generate it in code | ||
| 4 | |||
| 5 | void foo(unsigned char *u8Second, unsigned int *u32Nanosecond, long long timeSpec) | ||
| 6 | { | ||
| 7 | long long i64Div; | ||
| 8 | int i32Div; | ||
| 9 | int i32Rem; | ||
| 10 | i64Div = timeSpec; | ||
| 11 | i32Rem = (int)(i64Div % 1000000000); | ||
| 12 | i64Div /= 1000000000; | ||
| 13 | *u32Nanosecond = i32Rem; | ||
| 14 | i32Rem = (int)(i64Div % 60); | ||
| 15 | *u8Second = i32Rem; | ||
| 16 | } | ||
| 17 | |||
| 18 | |||
| 19 | Upstream-Status: Pending | ||
| 20 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 21 | |||
| 22 | --- a/src/VBox/Runtime/common/math/gcc/divdi3.c | ||
| 23 | +++ b/src/VBox/Runtime/common/math/gcc/divdi3.c | ||
| 24 | @@ -68,3 +68,12 @@ __divdi3(a, b) | ||
| 25 | uq = - uq; | ||
| 26 | return uq; | ||
| 27 | } | ||
| 28 | + | ||
| 29 | +quad_t | ||
| 30 | +__divmoddi4(quad_t a, quad_t b, quad_t* rem) | ||
| 31 | +{ | ||
| 32 | + quad_t d = __divdi3(a,b); | ||
| 33 | + *rem = a - (d*b); | ||
| 34 | + return d; | ||
| 35 | +} | ||
| 36 | + | ||
diff --git a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.18.bb b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.18.bb index d620e9893f..1def1a3115 100644 --- a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.18.bb +++ b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.18.bb | |||
| @@ -14,6 +14,7 @@ VBOX_NAME = "VirtualBox-${PV}" | |||
| 14 | SRC_URI = "http://download.virtualbox.org/virtualbox/${PV}/${VBOX_NAME}.tar.bz2 \ | 14 | SRC_URI = "http://download.virtualbox.org/virtualbox/${PV}/${VBOX_NAME}.tar.bz2 \ |
| 15 | file://Makefile.utils \ | 15 | file://Makefile.utils \ |
| 16 | file://kernel-5.10.patch \ | 16 | file://kernel-5.10.patch \ |
| 17 | file://add__divmoddi4.patch \ | ||
| 17 | " | 18 | " |
| 18 | SRC_URI[md5sum] = "c61001386eb3822ab8f06d688a82e84b" | 19 | SRC_URI[md5sum] = "c61001386eb3822ab8f06d688a82e84b" |
| 19 | SRC_URI[sha256sum] = "108d42b9b391b7a332a33df1662cf7b0e9d9a80f3079d16288d8b9487f427d40" | 20 | SRC_URI[sha256sum] = "108d42b9b391b7a332a33df1662cf7b0e9d9a80f3079d16288d8b9487f427d40" |
