libunwind: add support for loongarch64
[openwrt/openwrt.git] / package / libs / libunwind / patches / 005-loongarch64-musl.pattch
diff --git a/package/libs/libunwind/patches/005-loongarch64-musl.pattch b/package/libs/libunwind/patches/005-loongarch64-musl.pattch
new file mode 100644 (file)
index 0000000..bb961bd
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/src/loongarch64/getcontext.S
++++ b/src/loongarch64/getcontext.S
+@@ -25,7 +25,9 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
+ #include "offsets.h"
++#ifdef __GLIBC__
+ #include <endian.h>
++#endif
+       .text
+ #define SREG(X) st.d $r##X, $r4, (LINUX_UC_MCONTEXT_GREGS + 8 * X)