Skip to content

Commit

Permalink
freetype2: work around GCC 12 ARM NEON bug (#1994)
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit-pierre authored Nov 30, 2024
1 parent 84ffb30 commit e9b79c3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
6 changes: 5 additions & 1 deletion thirdparty/freetype2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
list(APPEND PATCH_FILES fix_meson_bzip2_option.patch)
list(APPEND PATCH_FILES
fix_meson_bzip2_option.patch
# Work around GCC 12 ARM NEON bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117811).
ftcalc_gcc12_arm_neon_fix.patch
)

list(APPEND CFG_CMD COMMAND
${MESON_SETUP} --default-library=$<IF:$<BOOL:${MONOLIBTIC}>,static,shared>
Expand Down
12 changes: 12 additions & 0 deletions thirdparty/freetype2/ftcalc_gcc12_arm_neon_fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- i/src/base/ftcalc.c
+++ w/src/base/ftcalc.c
@@ -750,7 +750,8 @@

shift = FT_MSB( val ) - 12;

- if ( shift > 0 )
+ if ( shift < 0 )
+ shift = 0;
{
xx >>= shift;
xy >>= shift;

0 comments on commit e9b79c3

Please sign in to comment.