1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-21 16:45:15 +00:00

Merge pull request #48 from fitzsim/ppc64-debian-fixes-1

PPC64 Debian fixes
This commit is contained in:
Cory Smith 2023-10-13 14:15:02 -05:00 committed by GitHub
commit c7fd3bb5d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 8 deletions

View file

@ -1 +0,0 @@
objcopy -Ibinary -Oelf32-i386 -Bi386

View file

@ -1,3 +0,0 @@
objcopy -Ibinary -Oelf64-x86-64 -Bi386:x86-64

View file

@ -34,7 +34,7 @@
#error "Unknown system; refusing to build. Edit os.h if needed"
#endif
#if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__) || defined(QB64_MACOSX) || defined(__aarch64__)
#if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__) || defined(__PPC64__) || defined(QB64_MACOSX) || defined(__aarch64__)
#define QB64_64
#else
#define QB64_32

View file

@ -13123,9 +13123,30 @@ IF os$ = "LNX" THEN
IF inline_DATA = 0 THEN
IF DataOffset THEN
IF INSTR(_OS$, "[32BIT]") THEN b$ = "32" ELSE b$ = "64"
OPEN ".\internal\c\makedat_lnx" + b$ + ".txt" FOR BINARY AS #150: LINE INPUT #150, a$: CLOSE #150
a$ = a$ + " " + tmpdir2$ + "data.bin " + tmpdir2$ + "data.o"
SHELL _HIDE "ld --verbose >internal/temp/ld-output.txt"
OPEN "internal/temp/ld-output.txt" FOR BINARY AS #150
DO UNTIL EOF(150)
LINE INPUT #150, a$
IF LEN(a$) THEN
s$ = "OUTPUT_FORMAT(" + CHR$(34)
x1 = INSTR(a$, s$)
IF x1 THEN
x1 = x1 + LEN(s$)
x2 = INSTR(x1, a$, CHR$(34))
format$ = MID$(a$, x1, x2 - x1)
ELSE
s$ = "OUTPUT_ARCH("
x1 = INSTR(a$, s$)
IF x1 THEN
x1 = x1 + LEN(s$)
x2 = INSTR(x1, a$, ")")
architecture$ = MID$(a$, x1, x2 - x1)
END IF
END IF
END IF
LOOP
CLOSE #150
a$ = "objcopy -Ibinary -O" + format$ + " -B" + architecture$ + " " + tmpdir2$ + "data.bin " + tmpdir2$ + "data.o"
CHDIR ".\internal\c"
SHELL _HIDE a$ + " 2>> ../../" + compilelog$
CHDIR "..\.."