summaryrefslogtreecommitdiffstats
path: root/vcvrack/build/patches/vcvrack-1.1.6_32bit.patch
blob: ad24f5afd566f5edfaa3346acb49eae8176efc96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--- Rack-1.1.6/arch.mk.orig	2020-12-25 10:54:23.000000000 +0100
+++ Rack-1.1.6/arch.mk	2020-12-26 13:38:28.433545407 +0100
@@ -15,6 +15,13 @@
 else ifneq (, $(findstring linux, $(MACHINE)))
 	ARCH_LIN := 1
 	ARCH := lin
+	ifneq ( ,$(findstring x86_64, $(MACHINE)))
+		ARCH_LIN_64 := 1
+		BITS := 64
+	else ifneq (, $(findstring i586, $(MACHINE)))
+		ARCH_LIN_32 := 1
+		BITS := 32
+	endif
 else
 $(error Could not determine architecture of $(MACHINE). Try hacking around in arch.mk)
 endif
--- Rack-1.1.6/compile.mk.orig	2020-12-26 12:44:01.640091814 +0100
+++ Rack-1.1.6/compile.mk	2020-12-26 13:42:28.359755696 +0100
@@ -83,7 +83,11 @@
 build/%.bin.o: %
 	@mkdir -p $(@D)
 ifdef ARCH_LIN
-	$(OBJCOPY) -I binary -O elf64-x86-64 -B i386:x86-64 --rename-section .data=.rodata,alloc,load,readonly,data,contents $< $@
+ifdef ARCH_LIN_32
+	$(OBJCOPY) -I binary -O elf32-i386 -B i386 --rename-section .data=.rodata,alloc,load,readonly,data,contents $< $@
+else
+	$(OBJCOPY) -I binary -O elf64-x86-64 -B i386:x86-64 --rename-section .data=.rodata,alloc,load,readonly,data,contents $< $@
+endif
 endif
 ifdef ARCH_WIN
 	$(OBJCOPY) -I binary -O pe-x86-64 -B i386:x86-64 --rename-section .data=.rodata,alloc,load,readonly,data,contents $< $@