From: unspecd <unspecd@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] memtest86+: fix cross build
Date: Thu, 08 Apr 2021 09:49:42 +0200 [thread overview]
Message-ID: <20210408074942.UX0w_lfSS8Scm1uMdb52ZYQJWu14E2lrCIDZ_IKTpoc@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-29562@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1546 bytes --]
There is an updated pull request by unspecd against master on the void-packages repository
https://github.com/unspecd/void-packages pkg/memtest86+
https://github.com/void-linux/void-packages/pull/29562
memtest86+: fix cross build
<!-- Mark items with [x] where applicable -->
#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR
<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
#### Does it build and run successfully?
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, x86_64-musl
- [x] I built this PR locally for these architectures:
- [x] i686
- [x] i686-musl
- [x] x86_64
A patch file from https://github.com/void-linux/void-packages/pull/29562.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pkg/memtest86+-29562.patch --]
[-- Type: text/x-diff, Size: 2741 bytes --]
From 569a1e4a188433967fcf1ff515d496c051109bc0 Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Mon, 15 Mar 2021 14:53:18 +1100
Subject: [PATCH] memtest86+: fix musl build
---
.../patches/06.memtest86+-5.01-port-io.patch | 50 +++++++++++++++++++
srcpkgs/memtest86+/template | 11 ++--
2 files changed, 54 insertions(+), 7 deletions(-)
create mode 100644 srcpkgs/memtest86+/patches/06.memtest86+-5.01-port-io.patch
diff --git a/srcpkgs/memtest86+/patches/06.memtest86+-5.01-port-io.patch b/srcpkgs/memtest86+/patches/06.memtest86+-5.01-port-io.patch
new file mode 100644
index 000000000000..f6cf989c6afa
--- /dev/null
+++ b/srcpkgs/memtest86+/patches/06.memtest86+-5.01-port-io.patch
@@ -0,0 +1,50 @@
+musl does not have the `_p` functions, so copy them from glibc.
+
+--- test.c.orig
++++ test.c
+@@ -14,7 +14,6 @@
+ #include "stdint.h"
+ #include "cpuid.h"
+ #include "smp.h"
+-#include <sys/io.h>
+
+ extern struct cpu_ident cpu_id;
+ extern volatile int mstr_cpu;
+@@ -29,6 +29,37 @@
+ ulong rand(int me);
+ void poll_errors();
+
++static __inline unsigned char
++inb (unsigned short int __port)
++{
++ unsigned char _v;
++
++ __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (__port));
++ return _v;
++}
++
++static __inline unsigned char
++inb_p (unsigned short int __port)
++{
++ unsigned char _v;
++
++ __asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
++ return _v;
++}
++
++static __inline void
++outb (unsigned char __value, unsigned short int __port)
++{
++ __asm__ __volatile__ ("outb %b0,%w1": :"a" (__value), "Nd" (__port));
++}
++
++static __inline void
++outb_p (unsigned char __value, unsigned short int __port)
++{
++ __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (__value),
++ "Nd" (__port));
++}
++
+ static inline ulong roundup(ulong value, ulong mask)
+ {
+ return (value + mask) & ~mask;
diff --git a/srcpkgs/memtest86+/template b/srcpkgs/memtest86+/template
index c4850769d62e..844f6e9114d7 100644
--- a/srcpkgs/memtest86+/template
+++ b/srcpkgs/memtest86+/template
@@ -1,8 +1,8 @@
# Template file for 'memtest86+'
pkgname=memtest86+
version=5.01
-revision=5
-archs="i686 x86_64"
+revision=6
+archs="i686* x86_64*"
short_desc="Advanced Memory Diagnostic Tool"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
@@ -13,13 +13,10 @@ checksum=142127b7953fbd829b1057fb64a78d3340c2b771484230a7347e94530a0d9039
nostrip=yes
noverifyrdeps=yes
-if [ "$XBPS_MACHINE" = "x86_64" ]; then
- makedepends="gcc-multilib"
-fi
-
do_build() {
- make
+ make CC="$CC" LD="$LD"
}
+
do_install() {
vinstall memtest.bin 755 boot memtest86+
vinstall ${FILESDIR}/20_memtest86+ 755 etc/grub.d
next prev parent reply other threads:[~2021-04-08 7:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-18 10:50 [PR PATCH] " unspecd
2021-03-19 18:24 ` [PR REVIEW] " ericonr
2021-03-19 18:24 ` ericonr
2021-03-19 18:46 ` unspecd
2021-03-19 18:49 ` unspecd
2021-04-04 23:39 ` ericonr
2021-04-08 7:49 ` unspecd [this message]
2021-04-08 7:52 ` unspecd
2021-04-09 2:21 ` memtest86+: fix musl build ericonr
2021-04-14 3:40 ` unspecd
2023-06-24 18:51 ` classabbyamp
2023-06-24 18:51 ` [PR PATCH] [Closed]: " classabbyamp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210408074942.UX0w_lfSS8Scm1uMdb52ZYQJWu14E2lrCIDZ_IKTpoc@z \
--to=unspecd@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).