Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port changes: - the version 1.5.0 now recognizes clang for amd64 so the patch files/patch-EnginePl_machine.h reduced but it is still needed for i386 build; - this version correctly defines NO_MACHINE_REG_FOR_REG_BANK and adds -fcommon for clang, so CFLAGS reduced too; - the patch files/patch-Ma2Asm_x86__64__any.c rebuilt for new code, it is still needed as build fails with an error without the patch: Fatal Error: Segmentation Violation (bad address: 0x100ec814853)
- Loading branch information
Eugene Grosbein
authored and
Eugene Grosbein
committed
Jul 10, 2021
1 parent
697a4b6
commit 941d1da
Showing
5 changed files
with
38 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
TIMESTAMP = 1606049432 | ||
SHA256 (gprolog-1.4.5.tar.gz) = ce5335d1607f0b01d5567252211ae2b19e6a5e52b62978717880524748afb9a2 | ||
SIZE (gprolog-1.4.5.tar.gz) = 3585704 | ||
TIMESTAMP = 1625944809 | ||
SHA256 (gprolog-1.5.0.tar.gz) = 670642b43c0faa27ebd68961efb17ebe707688f91b6809566ddd606139512c01 | ||
SIZE (gprolog-1.5.0.tar.gz) = 3813899 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,37 @@ | ||
--- Ma2Asm/x86_64_any.c.orig 2018-10-23 15:17:17 UTC | ||
+++ Ma2Asm/x86_64_any.c | ||
@@ -112,6 +112,9 @@ | ||
* Global Variables * | ||
*---------------------------------*/ | ||
|
||
+int can_produce_pic_code = 1; /* overwritte var of ma2asm.c */ | ||
+extern int pic_code; | ||
+ | ||
static double dbl_tbl[MAX_DOUBLES_IN_PRED]; | ||
static int nb_dbl = 0; | ||
static int dbl_lc_no = 0; | ||
@@ -149,7 +152,6 @@ static const char *fpr_arg[MAX_FPR_ARGS] | ||
#endif | ||
/* variables for ma_parser.c / ma2asm.c */ | ||
|
||
-int can_produce_pic_code = 1; | ||
char *comment_prefix = "#"; | ||
#ifdef M_x86_64_darwin | ||
char *local_symb_prefix = "L"; | ||
@@ -210,10 +212,8 @@ Asm_Start(void) | ||
--- Ma2Asm/x86_64_any.c.orig 2021-07-07 17:13:02.000000000 +0700 | ||
+++ Ma2Asm/x86_64_any.c 2021-07-11 03:18:18.347365000 +0700 | ||
@@ -232,8 +232,8 @@ Asm_Start(void) | ||
strcpy(asm_reg_cp, Off_Reg_Bank(MAP_OFFSET_CP)); | ||
#endif | ||
|
||
-#if defined(M_x86_64_darwin) || defined(M_x86_64_bsd) | ||
- pic_code = 1; /* NB: on darwin and BSD everything is PIC code */ | ||
-#elif defined(M_x86_64_linux) && __GNUC__ >= 6 /* gcc >= 6 needs PIC for linux */ | ||
- pic_code = 1; | ||
+#ifdef M_x86_64_darwin | ||
+ pic_code = 1; /* NB: on darwin everything is PIC code */ | ||
-#if defined(M_darwin) || defined(M_bsd) | ||
- pic_code = TRUE; /* NB: on darwin and BSD everything is PIC code */ | ||
+#if defined(M_darwin) | ||
+ pic_code = TRUE; /* NB: on darwin everything is PIC code */ | ||
#elif defined(M_linux) && __GNUC__ >= 6 /* gcc >= 6 needs PIC for linux */ | ||
pic_code = FALSE; | ||
#elif defined(_WIN32) | ||
pic_code = 0; /* NB: on MinGW nothing is needed for PIC code */ | ||
#endif | ||
@@ -1199,9 +1199,9 @@ Dico_Long(char *name, int global, VType | ||
size_bytes = value * 8; | ||
#ifdef M_x86_64_darwin | ||
if (!global) | ||
- Label_Printf(".zerofill __DATA,__bss," UN "%s,%" PL_FMT_d ",4", name, size_bytes); | ||
+ Label_Printf(".zerofill __DATA,__bss," UN "%s,%" PL_FMT_d ",3", name, size_bytes); | ||
@@ -1242,9 +1242,9 @@ Dico_Long(LongInf *l) | ||
size_bytes = l->value * 8; | ||
#ifdef M_darwin | ||
if (!l->global) | ||
- Label_Printf(".zerofill __DATA,__bss," UN "%s,%" PL_FMT_d ",4", l->name, size_bytes); | ||
+ Label_Printf(".zerofill __DATA,__bss," UN "%s,%" PL_FMT_d ",3", l->name, size_bytes); | ||
else | ||
- Inst_Printf(".comm", UN "%s,%" PL_FMT_d ",4", name, size_bytes); | ||
+ Inst_Printf(".comm", UN "%s,%" PL_FMT_d ",3", name, size_bytes); | ||
- Inst_Printf(".comm", UN "%s,%" PL_FMT_d ",4", l->name, size_bytes); | ||
+ Inst_Printf(".comm", UN "%s,%" PL_FMT_d ",3", l->name, size_bytes); | ||
#else | ||
#if defined(M_x86_64_linux) || defined(M_x86_64_sco) || \ | ||
defined(M_x86_64_solaris) || defined(M_x86_64_bsd) | ||
@@ -1226,11 +1226,6 @@ Dico_Long(char *name, int global, VType | ||
#if defined(M_linux) || defined(M_sco) || defined(M_solaris) || defined(M_bsd) | ||
if (!l->global) | ||
@@ -1268,11 +1268,6 @@ Dico_Long(LongInf *l) | ||
case INITIAL_VALUE: | ||
if (global) | ||
Inst_Printf(".globl", UN "%s", name); | ||
-#ifdef M_x86_64_darwin | ||
if (l->global) | ||
Inst_Printf(".globl", UN "%s", l->name); | ||
-#ifdef M_darwin | ||
- Inst_Printf(".align", "3"); | ||
-#else | ||
- Inst_Printf(".align", "8"); | ||
-#endif | ||
#if !(defined(M_x86_64_darwin) || defined(_WIN32)) | ||
Inst_Printf(".size", UN "%s,8", name); | ||
#if !(defined(M_darwin) || defined(_WIN32)) | ||
Inst_Printf(".size", UN "%s,8", l->name); | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters