1 #XXX not yet in a toolchain
3 git_commit
=${pkg_name##*-}
5 git_url0
=https
://git.sr.ht
/~mcf
/cproc
7 pkg_dir
=/run
/pkgs
/$src_name
8 src_dir
=$src_dir_root/$src_name
11 cp -r $src_dir $pkg_dir
15 /nyan/toolchains/binutils-tinycc/bin:\
16 /nyan/make/current/bin:\
17 /nyan/git/current/bin:\
20 target_gnu_triple
=$
(basename "$(ls -d /nyan/toolchains/binutils-tinycc/bin/*-tcc)")
21 target_gnu_triple
=${target_gnu_triple%-tcc}
25 if test x
$git_commit != x
; then
26 git checkout
--force $git_commit
30 # XXX we don't run the configure script and genereate config.h and config.mk ourself
31 # XXX we are trying to make it work with tcc
34 static const char target[] = "$target_gnu_triple";
35 static const char *const startfiles[] = {"",""}; /* XXX: EMPTY FOR NOW */
36 static const char *const endfiles[] = {"",""}; /* XXX: EMPTY FOR NOW */
37 static const char *const preprocesscmd[] = {
38 "/nyan/cproc/$slot/bin/cpp",
40 /* clear preprocessor GNU C version */
44 /* we don't yet support these optional features */
45 "-D", "__STDC_NO_ATOMICS__",
46 "-D", "__STDC_NO_COMPLEX__",
47 "-D", "__STDC_NO_VLA__",
48 "-U", "__SIZEOF_INT128__",
50 /* we don't generate position-independent code */
53 /* ignore attributes and extension markers */
54 "-D", "__attribute__(x)=",
55 "-D", "__extension__=",
57 static const char *const codegencmd[] = {"/nyan/qbe/current/bin/qbe"};
58 static const char *const assemblecmd[] = {"/nyan/toolchains/binutils-tinycc/bin/$target_gnu_triple-as"};
59 static const char *const linkcmd[] = {"/nyan/toolchains/binutils-tinycc/bin/$target_gnu_triple-ld", "-B/nyan/glibc/current/lib --dynamic-linker '/lib64/ld-linux-x86-64.so.2'"};
62 # makefile syntax (hence variable syntax)
64 PREFIX=/nyan/cproc/$slot
66 CC=$target_gnu_triple-tcc
74 cat >/nyan
/cproc
/$slot/bin
/cpp
<<EOF
76 exec /nyan/toolchains/binutils-tinycc/bin/$target_gnu_triple-tcc -E "\$@"
78 chmod +x
/nyan
/cproc
/$slot/bin
/cpp
80 export PATH
=$PATH_SAVED
82 unset target_gnu_triple