opkg

statically linked package installer
git clone anongit@rnpnr.xyz:opkg.git
Log | Files | Refs | Feed | Submodules | README | LICENSE

Commit: f2e99943f6b6ae4cbf80f492773329d882c1df95
Parent: a56c9b65a80fbadb3a8e9e6676581da4c9a3e9d9
Author: Randy Palamar
Date:   Fri, 10 Nov 2023 05:53:16 -0700

add cproc from oasis bumped to latest

Diffstat:
M.gitmodules | 3+++
Apkg/devel/cproc/config.h | 26++++++++++++++++++++++++++
Apkg/devel/cproc/gen.lua | 33+++++++++++++++++++++++++++++++++
Apkg/devel/cproc/src | 1+
Apkg/devel/cproc/ver | 1+
Mpkg/devel/gen.lua | 1+
Msets.lua | 1+
7 files changed, 66 insertions(+), 0 deletions(-)

diff --git a/.gitmodules b/.gitmodules @@ -13,6 +13,9 @@ [submodule "pkg/crypt/fspec-sync/src"] path = pkg/devel/fspec-sync/src url = https://github.com/oasislinux/fspec-sync.git +[submodule "pkg/devel/cproc/src"] + path = pkg/devel/cproc/src + url = https://git.sr.ht/~mcf/cproc [submodule "pkg/devel/git/src"] path = pkg/devel/git/src url = https://github.com/git/git.git diff --git a/pkg/devel/cproc/config.h b/pkg/devel/cproc/config.h @@ -0,0 +1,26 @@ +static const char target[] = "x86_64-linux-musl"; +static const char *const startfiles[] = {"-l", ":crt1.o", "-l", ":crti.o"}; +static const char *const endfiles[] = {"-l", "c", "-l", ":crtn.o"}; +static const char *const preprocesscmd[] = { + "cpp", + + /* clear preprocessor GNU C version */ + "-U", "__GNUC__", + "-U", "__GNUC_MINOR__", + + /* we don't yet support these optional features */ + "-D", "__STDC_NO_ATOMICS__", + "-D", "__STDC_NO_COMPLEX__", + "-D", "__STDC_NO_VLA__", + "-U", "__SIZEOF_INT128__", + + /* we don't generate position-independent code */ + "-U", "__PIC__", + + /* ignore attributes and extension markers */ + "-D", "__attribute__(x)=", + "-D", "__extension__=", +}; +static const char *const codegencmd[] = {"qbe"}; +static const char *const assemblecmd[] = {"as"}; +static const char *const linkcmd[] = {"ld", "--dynamic-linker", "/lib/ld-musl-x86_64.so.1"}; diff --git a/pkg/devel/cproc/gen.lua b/pkg/devel/cproc/gen.lua @@ -0,0 +1,33 @@ +cflags({ + '-std=c11', '-Wall', '-Wpedantic', '-Wno-switch', '-Wno-parentheses', '-Wno-maybe-uninitialized', + '-I $dir', +}) + +cc('util.c') + +exe('cproc', {'driver.c', 'util.c.o'}) +exe('cproc-qbe', { + 'decl.c', + 'eval.c', + 'expr.c', + 'init.c', + 'main.c', + 'map.c', + 'pp.c', + 'qbe.c', + 'scan.c', + 'scope.c', + 'siphash.c', + 'stmt.c', + 'targ.c', + 'token.c', + 'tree.c', + 'type.c', + 'util.c.o', + 'utf.c', +}) +file('bin/cproc', '755', '$outdir/cproc') +file('bin/cproc-qbe', '755', '$outdir/cproc-qbe') +man({'cproc.1'}) + +fetch('git') diff --git a/pkg/devel/cproc/src b/pkg/devel/cproc/src @@ -0,0 +1 @@ +Subproject commit 0985a7893a4b5de63a67ebab445892d9fffe275b diff --git a/pkg/devel/cproc/ver b/pkg/devel/cproc/ver @@ -0,0 +1 @@ +0985a78 r0 diff --git a/pkg/devel/gen.lua b/pkg/devel/gen.lua @@ -1,3 +1,4 @@ +subgen('cproc') subgen('fspec-sync') subgen('git') subgen('linux-headers') diff --git a/sets.lua b/sets.lua @@ -2,6 +2,7 @@ local S = {} S.bin = { 'awk', + 'cproc', 'curl', 'git', 'hyx',