From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Camm Maguire <camm@debian.org>
Date: Sep, 29 2026 15:39:56 +0000
Subject: [PATCH] <short summary of the patch>

TODO: Put a short summary on the line above and replace this paragraph
with a longer explanation of this change. Complete the meta-information
with other relevant fields (see below for details). To make it easier, the
information below has been extracted from the changelog. Adjust it or drop
it.

---
The information above should follow the Patch Tagging Guidelines,
see https://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: (upstream|backport|vendor|other), (<patch-url>|commit:<commit-id>)
Bug: <upstream-bugtracker-url>
Bug-<Vendor>: <vendor-bugtracker-url>
Forwarded: (no|not-needed|<patch-forwarded-url>)
Applied-Upstream: <version>, (<commit-url>|commit:<commid-id>)
Reviewed-By: <name and email of someone who approved/reviewed the patch>

--- gcl27-2.7.1.orig/git.tag
+++ gcl27-2.7.1/git.tag
@@ -1 +1 @@
-"Version_2_7_2pre36"
+"Version_2_7_2pre37"
--- gcl27-2.7.1.orig/h/elf64_loongarch64_reloc.h
+++ gcl27-2.7.1/h/elf64_loongarch64_reloc.h
@@ -75,6 +75,11 @@
 	store_val((ul*)((ul)got+4),MASK(16)<<10,(((s+a)>>2)&0x3ff)<<10);
       }
       break;
+    case R_LARCH_CALL36:
+      massert((s+a-p+(1ULL<<35))<(1ULL<<36));
+      store_val(where,MASK(20)<<5,((bdest+0x8000)>>16)<<5);
+      store_val((ul *)((ul)where+4),MASK(16)<<10,bdest<<10);
+      break;
     case R_LARCH_PCALA_HI20:
       store_val(where,MASK(20)<<5,get_page_delta(s+a,p)>>12<<5);
       break;
--- gcl27-2.7.1.orig/h/include.h
+++ gcl27-2.7.1/h/include.h
@@ -93,6 +93,7 @@ Foundation, 675 Mass Ave, Cambridge, MA
 #endif
 
 #include <setjmp.h>
+#include <sys/stat.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <math.h>
