diff options
author | David Seifert <soap@gentoo.org> | 2020-08-08 18:53:33 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2020-08-08 18:53:33 +0200 |
commit | 52aa359238d71ff37942157fd9abedc8ba2bb6d6 (patch) | |
tree | 39a95aaa0c39b762d43f1db62799dd2b77792c88 /media-sound/sexypsf/files | |
parent | media-sound/toolame: Fix building under -fno-common (diff) | |
download | gentoo-52aa359238d71ff37942157fd9abedc8ba2bb6d6.tar.gz gentoo-52aa359238d71ff37942157fd9abedc8ba2bb6d6.tar.bz2 gentoo-52aa359238d71ff37942157fd9abedc8ba2bb6d6.zip |
media-sound/sexypsf: Fix building under -fno-common
Closes: https://bugs.gentoo.org/706820
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'media-sound/sexypsf/files')
-rw-r--r-- | media-sound/sexypsf/files/sexypsf-0.4.8-Makefile.patch | 12 | ||||
-rw-r--r-- | media-sound/sexypsf/files/sexypsf-0.4.8-fno-common.patch | 102 |
2 files changed, 114 insertions, 0 deletions
diff --git a/media-sound/sexypsf/files/sexypsf-0.4.8-Makefile.patch b/media-sound/sexypsf/files/sexypsf-0.4.8-Makefile.patch new file mode 100644 index 000000000000..348c392f3574 --- /dev/null +++ b/media-sound/sexypsf/files/sexypsf-0.4.8-Makefile.patch @@ -0,0 +1,12 @@ +--- a/Linux/Makefile ++++ b/Linux/Makefile +@@ -28,9 +28,3 @@ + + clean: + ${RM} *.o ../*.o ../spu/*.o sexypsf +- +-../%.o: ../%.c +- ${CC} ${CFLAGS} -c -o $@ $< +- +-%.o: %.c +- ${CC} ${CFLAGS} -c -o $@ $< diff --git a/media-sound/sexypsf/files/sexypsf-0.4.8-fno-common.patch b/media-sound/sexypsf/files/sexypsf-0.4.8-fno-common.patch new file mode 100644 index 000000000000..fd0d96525b33 --- /dev/null +++ b/media-sound/sexypsf/files/sexypsf-0.4.8-fno-common.patch @@ -0,0 +1,102 @@ +--- a/PsxCounters.c ++++ b/PsxCounters.c +@@ -20,6 +20,9 @@ + + #include "PsxCommon.h" + ++psxCounter psxCounters[5]; ++u32 psxNextCounter, psxNextsCounter; ++ + static int cnts = 4; + static u32 last=0; + +--- a/PsxCounters.h ++++ b/PsxCounters.h +@@ -24,9 +24,9 @@ + u32 sCycle, Cycle, rate, interrupt; + } psxCounter; + +-psxCounter psxCounters[5]; ++extern psxCounter psxCounters[5]; + +-u32 psxNextCounter, psxNextsCounter; ++extern u32 psxNextCounter, psxNextsCounter; + + void psxRcntInit(); + void psxRcntUpdate(); +--- a/PsxMem.c ++++ b/PsxMem.c +@@ -21,6 +21,12 @@ + + #include "PsxCommon.h" + ++s8 *psxM; ++s8 *psxP; ++s8 *psxR; ++s8 *psxH; ++char **psxMemLUT; ++ + void LoadPSXMem(u32 address, s32 length, char *data) + { + //printf("%08x %08x\n",address,length); +--- a/PsxMem.h ++++ b/PsxMem.h +@@ -41,21 +41,21 @@ + } + #endif + +-s8 *psxM; ++extern s8 *psxM; + #define psxMu32(mem) (*(u32*)&psxM[(mem) & 0x1fffff]) + +-s8 *psxP; +-s8 *psxR; ++extern s8 *psxP; ++extern s8 *psxR; + #define psxRu32(mem) (*(u32*)&psxR[(mem) & 0x7ffff]) + +-s8 *psxH; ++extern s8 *psxH; + + #define psxHu8(mem) (*(u8*) &psxH[(mem) & 0xffff]) + + #define psxHu16(mem) (*(u16*)&psxH[(mem) & 0xffff]) + #define psxHu32(mem) (*(u32*)&psxH[(mem) & 0xffff]) + +-char **psxMemLUT; ++extern char **psxMemLUT; + + #define PSXM(mem) (psxMemLUT[(mem) >> 16] == 0 ? NULL : (void*)(psxMemLUT[(mem) >> 16] + ((mem) & 0xffff))) + +--- a/R3000A.c ++++ b/R3000A.c +@@ -22,6 +22,9 @@ + + #include "PsxCommon.h" + ++R3000Acpu *psxCpu; ++psxRegisters psxRegs; ++ + int psxInit() { + + psxCpu = &psxInt; +--- a/R3000A.h ++++ b/R3000A.h +@@ -32,7 +32,7 @@ + void (*Shutdown)(); + } R3000Acpu; + +-R3000Acpu *psxCpu; ++extern R3000Acpu *psxCpu; + extern R3000Acpu psxInt; + + typedef union { +@@ -68,7 +68,7 @@ + u32 interrupt; + } psxRegisters; + +-psxRegisters psxRegs; ++extern psxRegisters psxRegs; + + #define _i32(x) (s32)x + #define _u32(x) (u32)x |