pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/sysutils/memtestplus
Module Name: pkgsrc
Committed By: maya
Date: Wed Feb 7 00:59:19 UTC 2018
Modified Files:
pkgsrc/sysutils/memtestplus: Makefile
Added Files:
pkgsrc/sysutils/memtestplus/files: io.h
Log Message:
memtestplus: replace macro insanity with expanded definitions
...from current linux.
PR pkg/52983: sysutils/memtestplus w/-O0 build fails on netbsd-7
PKGREVISION++
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 pkgsrc/sysutils/memtestplus/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/memtestplus/files/io.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/sysutils/memtestplus/Makefile
diff -u pkgsrc/sysutils/memtestplus/Makefile:1.25 pkgsrc/sysutils/memtestplus/Makefile:1.26
--- pkgsrc/sysutils/memtestplus/Makefile:1.25 Mon Jan 29 14:23:26 2018
+++ pkgsrc/sysutils/memtestplus/Makefile Wed Feb 7 00:59:18 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.25 2018/01/29 14:23:26 maya Exp $
+# $NetBSD: Makefile,v 1.26 2018/02/07 00:59:18 maya Exp $
#
# Note -- version number also in the do-install rule
@@ -7,7 +7,7 @@ MINVER=01
DISTNAME= memtest86+-${MAJVER}.${MINVER}
PKGNAME= memtestplus-${MAJVER}.${MINVER}
-PKGREVISION= 4
+PKGREVISION= 5
CATEGORIES= sysutils
MASTER_SITES= http://www.memtest.org/download/${MAJVER}.${MINVER}/
@@ -47,6 +47,9 @@ BUILDLINK_TRANSFORM+= rm:-fno-stack-prot
BROKEN+= ${PKGNAME} does not produce a working binary with clang
.endif
+pre-configure:
+ ${CP} ${FILESDIR}/io.h ${WRKSRC}
+
do-install:
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/mdec
${INSTALL_DATA} ${WRKSRC}/memtest.bin \
Added files:
Index: pkgsrc/sysutils/memtestplus/files/io.h
diff -u /dev/null pkgsrc/sysutils/memtestplus/files/io.h:1.1
--- /dev/null Wed Feb 7 00:59:19 2018
+++ pkgsrc/sysutils/memtestplus/files/io.h Wed Feb 7 00:59:18 2018
@@ -0,0 +1,68 @@
+#ifndef _ASM_X86_IO_H
+#define _ASM_X86_IO_H
+
+#ifdef SLOW_IO_BY_JUMPING
+#define native_io_delay() __asm__ __volatile__("jmp 1f\n1:\tjmp 1f\n1:")
+#else
+#define native_io_delay() __asm__ __volatile__("outb %al,$0x80")
+#endif
+
+static inline void slow_down_io(void)
+{
+ native_io_delay();
+#ifdef REALLY_SLOW_IO
+ native_io_delay();
+ native_io_delay();
+ native_io_delay();
+#endif
+}
+
+
+void __outb(char value, int port) {
+ asm volatile("outb" " %b" "0, %w1"
+ : : "a"(value), "Nd"(port));
+}
+
+unsigned char __inb(int port)
+{
+ unsigned char value;
+ asm volatile("inb" " %w1, %b" "0"
+ : "=a"(value) : "Nd"(port));
+ return value;
+}
+
+void __outw(short value, int port) {
+ asm volatile("outw" " %w" "0, %w1"
+ : : "a"(value), "Nd"(port));
+}
+
+unsigned short __inw(int port)
+{
+ unsigned short value;
+ asm volatile("inw" " %w1, %w" "0"
+ : "=a"(value) : "Nd"(port));
+ return value;
+}
+
+void __outl(int value, int port) {
+ asm volatile("outl" " %" "0, %w1"
+ : : "a"(value), "Nd"(port));
+}
+
+unsigned int __inl(int port)
+{
+ unsigned int value;
+ asm volatile("inl" " %w1, %" "0"
+ : "=a"(value) : "Nd"(port));
+ return value;
+}
+
+#define outb __outb
+#define outw __outw
+#define outl __outl
+
+#define inb __inb
+#define inw __inw
+#define inl __inl
+
+#endif /* _ASM_X86_IO_H */
Home |
Main Index |
Thread Index |
Old Index