Github messages for voidlinux
 help / color / mirror / Atom feed
From: unspecd <unspecd@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] memtest86+: fix cross build
Date: Thu, 18 Mar 2021 11:50:17 +0100	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-29562@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1541 bytes --]

There is a new 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: 2573 bytes --]

From 169386e4c1545cbe28d5c0344a58e047c017b805 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 cross build

---
 .../patches/06.memtest86+-5.01-port-io.patch  | 41 +++++++++++++++++++
 srcpkgs/memtest86+/template                   | 11 ++---
 2 files changed, 45 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..116919ee5f2c
--- /dev/null
+++ b/srcpkgs/memtest86+/patches/06.memtest86+-5.01-port-io.patch
@@ -0,0 +1,41 @@
+--- 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,30 @@
+ ulong rand(int me);
+ void poll_errors();
+ 
++static inline unsigned char inb(unsigned short port)
++{
++	unsigned char val;
++	asm volatile ("inb %1,%0" : "=a" (val) : "dN" (port));
++	return val;
++}
++
++static inline unsigned char inb_p(unsigned short int port)
++{
++	unsigned char val;
++	asm volatile ("inb %w1,%0\noutb %%al,$0x80":"=a" (val):"Nd" (port));
++	return val;
++}
++
++static inline void outb(unsigned char val, unsigned short port)
++{
++	asm volatile ("outb %0,%1" : : "a" (val), "dN" (port));
++}
++
++static inline void outb_p(unsigned char val, unsigned short int port)
++{
++	asm volatile ("outb %b0,%w1\noutb %%al,$0x80": :"a" (val),"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

             reply	other threads:[~2021-03-18 10:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18 10:50 unspecd [this message]
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 ` [PR PATCH] [Updated] " unspecd
2021-04-08  7:52 ` [PR REVIEW] " unspecd
2021-04-09  2:21 ` memtest86+: fix musl build ericonr
2021-04-14  3:40 ` unspecd
2023-06-24 18:51 ` [PR PATCH] [Closed]: " classabbyamp
2023-06-24 18:51 ` 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=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-29562@inbox.vuxu.org \
    --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).