+numactl +libtool (#119)

This commit is contained in:
Jacob Heider 2022-09-07 10:33:57 -04:00 committed by GitHub
parent 0a87367017
commit 43037362d6
2 changed files with 53 additions and 0 deletions

View file

@ -0,0 +1,15 @@
#include <numa.h>
#include <numaif.h>
#include <stdio.h>
int main(void)
{
int nd;
char *man = numa_alloc(1000);
*man = 1;
if (get_mempolicy(&nd, NULL, 0, man, MPOL_F_NODE | MPOL_F_ADDR) < 0)
perror("get_mempolicy");
else
printf("my node %d\n", nd);
return 0;
}

View file

@ -0,0 +1,38 @@
distributable:
url: https://github.com/numactl/numactl/archive/refs/tags/v{{ version }}/numactl-{{ version }}.tar.gz
strip-components: 1
versions:
github: numactl/numactl
build:
dependencies:
tea.xyz/gx/cc: c99
tea.xyz/gx/make: '*'
gnu.org/autoconf: 2
gnu.org/automake: 1
gnu.org/libtool: 2
gnu.org/m4: 1
script: |
# numa is linux only
if test {{ hw.platform }} != "linux"
then
mkdir {{ prefix }}/bin
touch {{ prefix }}/not-used-on-darwin
exit
fi
./autogen.sh
./configure --prefix={{ prefix }}
make --jobs {{ hw.concurrency }} install
env:
ACLOCAL_PATH: /opt/gnu.org/libtool/v2/share/aclocal
test:
dependencies:
tea.xyz/gx/cc: c99
script: |
if test {{ hw.platform }} != "linux"; then exit; fi
cc -lnuma mynode.c
./a.out