| 1 |
Description: Patches to make loong64 build work with GCC. |
| 2 |
Author: Filip Strömbäck <[email protected]> |
| 3 |
Forwarded: https://skia-review.googlesource.com/c/skia/+/1199836 |
| 4 |
--- a/gn/skia/BUILD.gn |
| 5 |
+++ b/gn/skia/BUILD.gn |
| 6 |
@@ -147,6 +147,9 @@ |
| 7 |
"-mlsx", |
| 8 |
"-Wno-switch-default", |
| 9 |
] |
| 10 |
+ if (!is_clang && !is_win) { |
| 11 |
+ cflags += [ "-flax-vector-conversions" ] |
| 12 |
+ } |
| 13 |
} |
| 14 |
|
| 15 |
if (malloc != "" && !is_win) { |
| 16 |
--- a/src/opts/SkOpts_SetTarget.h |
| 17 |
+++ b/src/opts/SkOpts_SetTarget.h |
| 18 |
@@ -139,6 +139,9 @@ |
| 19 |
|
| 20 |
#if defined(__clang__) |
| 21 |
#pragma clang attribute push(__attribute__((target("lasx"))), apply_to=function) |
| 22 |
+ #elif defined(__GNUC__) |
| 23 |
+ #pragma GCC push_options |
| 24 |
+ #pragma GCC target("lsx,lasx") |
| 25 |
#endif |
| 26 |
|
| 27 |
#else |