diff options
author | Kyle Evans <kevans@FreeBSD.org> | 2021-02-17 09:36:14 +0800 |
---|---|---|
committer | Kyle Evans <kevans@FreeBSD.org> | 2021-02-17 09:36:14 +0800 |
commit | 06c5005b2719735883d718c57261b9c9cc9b1597 (patch) | |
tree | dc7eaa5af2f3734d99e2e105f443d8ae9319c821 /sysutils/memtest86+ | |
parent | e3ec5d263ef2b77268d71234a60666ddbfef8ab5 (diff) | |
download | freebsd-ports-gnome-06c5005b2719735883d718c57261b9c9cc9b1597.tar.gz freebsd-ports-gnome-06c5005b2719735883d718c57261b9c9cc9b1597.tar.zst freebsd-ports-gnome-06c5005b2719735883d718c57261b9c9cc9b1597.zip |
sysutils/memtest86+: remove dependency on gcc48
This is one of three ports still explicitly dependent on lang/gcc48. The
problems that were preventing the upgrade were as follows:
- The __OUT*/__IN* macros in io.h were declaring the produced functions as
extern, yielding multiple "definitions." They're inline asm, so just give
them static linkage.
- reboot was declared inline with non-static linkage, thus leaving it in a
weird state where it wasn't visible within the same CU or another CU.
Drop the inline for now; if it really needs to be inlined, it can be
moved into a header and declared `static inline`.
I made these changes, then discovered there's a 5.31b that's still in
testing. I checked the archive for that and was delighted to discover these
changes had already actually been made there, too, so let's consider this a
backport.
PR: 253303
Approved by: avg (maintainer)
MFH: 2021Q1
Diffstat (limited to 'sysutils/memtest86+')
-rw-r--r-- | sysutils/memtest86+/Makefile | 4 | ||||
-rw-r--r-- | sysutils/memtest86+/files/patch-io.h | 29 | ||||
-rw-r--r-- | sysutils/memtest86+/files/patch-lib.c | 18 |
3 files changed, 49 insertions, 2 deletions
diff --git a/sysutils/memtest86+/Makefile b/sysutils/memtest86+/Makefile index 403a5a1d1f41..658f37f4a425 100644 --- a/sysutils/memtest86+/Makefile +++ b/sysutils/memtest86+/Makefile @@ -2,7 +2,7 @@ PORTNAME= memtest86+ PORTVERSION= 5.01 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= sysutils MASTER_SITES= http://www.memtest.org/download/${PORTVERSION}/ @@ -17,7 +17,7 @@ USES= gmake ALL_TARGET= all PORTDOCS= * -USE_GCC= 4.8:build +USE_GCC= yes:build # Please provide absolute path below (cannot be root) BOOT_DIR?= /boot/opt diff --git a/sysutils/memtest86+/files/patch-io.h b/sysutils/memtest86+/files/patch-io.h new file mode 100644 index 000000000000..e93567f1867f --- /dev/null +++ b/sysutils/memtest86+/files/patch-io.h @@ -0,0 +1,29 @@ +--- io.h.orig 2013-08-10 02:01:58 UTC ++++ io.h +@@ -31,7 +31,7 @@ + */ + + #define __OUT1(s,x) \ +-extern inline void __out##s(unsigned x value, unsigned short port) { ++static inline void __out##s(unsigned x value, unsigned short port) { + + #define __OUT2(s,s1,s2) \ + __asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1" +@@ -43,7 +43,7 @@ __OUT1(s##_p,x) __OUT2(s,s1,"w") : : "a" (value), "d" + __OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; } + + #define __IN1(s) \ +-extern inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v; ++static inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v; + + #define __IN2(s,s1,s2) \ + __asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0" +@@ -55,7 +55,7 @@ __IN1(s##_p) __IN2(s,s1,"w") : "=a" (_v) : "d" (port) + __IN1(s##c_p) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); SLOW_DOWN_IO; return _v; } + + #define __OUTS(s) \ +-extern inline void outs##s(unsigned short port, const void * addr, unsigned long count) \ ++static inline void outs##s(unsigned short port, const void * addr, unsigned long count) \ + { __asm__ __volatile__ ("cld ; rep ; outs" #s \ + : "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } + diff --git a/sysutils/memtest86+/files/patch-lib.c b/sysutils/memtest86+/files/patch-lib.c new file mode 100644 index 000000000000..dde80182241a --- /dev/null +++ b/sysutils/memtest86+/files/patch-lib.c @@ -0,0 +1,18 @@ +--- lib.c.orig 2021-02-06 17:28:48 UTC ++++ lib.c +@@ -33,7 +33,7 @@ struct ascii_map_str { + int keycode; + }; + +-inline void reboot(void) ++void reboot(void) + { + + /* tell the BIOS to do a cold start */ +@@ -1196,4 +1196,4 @@ void get_list(int x, int y, int len, char *buf) + return; + } + } +-} +\ No newline at end of file ++} |