summaryrefslogtreecommitdiffstats
path: root/tools/ddcprobe
diff options
context:
space:
mode:
Diffstat (limited to 'tools/ddcprobe')
-rw-r--r--tools/ddcprobe/Makefile10
-rw-r--r--tools/ddcprobe/lrmi.c2
2 files changed, 11 insertions, 1 deletions
diff --git a/tools/ddcprobe/Makefile b/tools/ddcprobe/Makefile
index e2bf84011..07ba43786 100644
--- a/tools/ddcprobe/Makefile
+++ b/tools/ddcprobe/Makefile
@@ -1,6 +1,11 @@
CFLAGS=-Wall -O # -g -DDEBUG
TARGETS=ddcxinfos
+ARCH := $(patsubst i%86,i386,$(shell uname -m))
+ARCH := $(patsubst sparc%,sparc,$(ARCH))
+
+ifeq (i386,$(ARCH))
+
ddcxinfos: lrmi.o vesamode.o vbe.o ddcxinfos.o
libvbe.a: lrmi.o vesamode.o vbe.o
@@ -14,5 +19,10 @@ $(DESTDIR)/usr/include/vbe.h:
$(DESTDIR)/usr/lib/libvbe.a:
install -m 644 libvbe.a $(DESTDIR)/usr/lib/libvbe.a
+else
+ddcxinfos: not_handled.c
+ gcc -o $@ $<
+endif
+
clean:
$(RM) $(TARGETS) *.o core
diff --git a/tools/ddcprobe/lrmi.c b/tools/ddcprobe/lrmi.c
index ca8af0a1e..e7e25ce2e 100644
--- a/tools/ddcprobe/lrmi.c
+++ b/tools/ddcprobe/lrmi.c
@@ -727,7 +727,7 @@ static int
lrmi_vm86(struct vm86_struct *vm)
{
int r;
-#ifdef __PIC__
+#if 1
asm volatile (
"pushl %%ebx\n\t"
"movl %2, %%ebx\n\t"