Overview
Comment: | add libk-config |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
cfbfa7fccac75575af1e5c82b6cc8c0b |
User & Date: | lexi on 2020-05-20 14:27:24 |
Other Links: | manifest | tags |
Context
2020-05-20
| ||
17:40 | fix markdown syntax check-in: ed18118c3c user: lexi tags: trunk | |
14:27 | add libk-config check-in: cfbfa7fcca user: lexi tags: trunk | |
2020-03-04
| ||
12:47 | tweak build infrastructure: global install script now respects prefix in all cases; update PKGBUILD to use install script correctly check-in: b6c435e95a user: lexi tags: trunk | |
Changes
Modified arch/posix.h from [1bb8ef8aa2] to [a61775181a].
55 55 posix_signal_float = 8, 56 56 posix_signal_kill = 9, 57 57 posix_signal_segfault = 11, 58 58 posix_signal_pipe = 13, 59 59 posix_signal_alarm = 14, 60 60 posix_signal_terminate = 15, 61 61 62 -#if KVarch == KA_arch_mips && KVos == KA_os_lin 62 +# if KVarch == KA_arch_mips && KVos == KA_os_lin 63 63 /* for some ungodly reason, some signal 64 64 * numbers on MIPS differ from most other 65 65 * architectures still in contemporary use */ 66 - posix_signal_bus = 10, 67 - posix_signal_user_a = 16, 68 - posix_signal_user_b = 17, 69 - posix_signal_child = 18, 70 - posix_signal_continue = 25, 71 - posix_signal_stop = 23, 72 - posix_signal_terminal_stop = 24, 73 - posix_signal_tty_input = 26, 74 - posix_signal_tty_output = 27, 75 - posix_signal_io_urgent = 21, 76 - posix_signal_limit_cpu = 30, 77 - posix_signal_limit_space = 31, 78 - posix_signal_vt_alarm = 28, 79 - posix_signal_profile = 29, 80 - posix_signal_winch = 20, 81 - posix_signal_poll = 22, 82 - posix_signal_power = 19, 83 -#elif KVos == KA_os_lin 66 + posix_signal_bus = 10, 67 + posix_signal_user_a = 16, 68 + posix_signal_user_b = 17, 69 + posix_signal_child = 18, 70 + posix_signal_continue = 25, 71 + posix_signal_stop = 23, 72 + posix_signal_terminal_stop = 24, 73 + posix_signal_tty_input = 26, 74 + posix_signal_tty_output = 27, 75 + posix_signal_io_urgent = 21, 76 + posix_signal_limit_cpu = 30, 77 + posix_signal_limit_space = 31, 78 + posix_signal_vt_alarm = 28, 79 + posix_signal_profile = 29, 80 + posix_signal_winch = 20, 81 + posix_signal_poll = 22, 82 + posix_signal_power = 19, 83 +# elif KVos == KA_os_lin 84 84 /* x86, ARM, and most others use these 85 85 * signal numbers */ 86 - posix_signal_bus = 7, 87 - posix_signal_user_a = 10, 88 - posix_signal_user_b = 12, 89 - posix_signal_child = 17, 90 - posix_signal_continue = 18, 91 - posix_signal_stack_fault = 16, 92 - posix_signal_stop = 19, 93 - posix_signal_terminal_stop = 20, 94 - posix_signal_tty_input = 21, 95 - posix_signal_tty_output = 22, 96 - posix_signal_io_urgent = 23, 97 - posix_signal_limit_cpu = 24, 98 - posix_signal_limit_space = 25, 99 - posix_signal_vt_alarm = 26, 100 - posix_signal_profile = 27, 101 - posix_signal_winch = 28, 102 - posix_signal_poll = 29, 103 - posix_signal_power = 30, 104 -#elif KVos == KA_os_fbsd 105 - posix_signal_bus = 10, 106 - posix_signal_user_a = 30, 107 - posix_signal_user_b = 31, 108 - posix_signal_child = 17, 109 - posix_signal_continue = 19, 110 - posix_signal_stack_fault = 16, 111 - posix_signal_stop = 17, 112 - posix_signal_terminal_stop = 18, 113 - posix_signal_tty_input = 21, 114 - posix_signal_tty_output = 22, 115 - posix_signal_io_urgent = 16, 116 - posix_signal_limit_cpu = 24, 117 - posix_signal_limit_space = 25, 118 - posix_signal_vt_alarm = 26, 119 - posix_signal_profile = 27, 120 - posix_signal_winch = 28, 121 - posix_signal_info = 29, 122 - posix_signal_poll = 23, 123 - posix_signal_power = 30, 124 -#endif 86 + posix_signal_bus = 7, 87 + posix_signal_user_a = 10, 88 + posix_signal_user_b = 12, 89 + posix_signal_child = 17, 90 + posix_signal_continue = 18, 91 + posix_signal_stack_fault = 16, 92 + posix_signal_stop = 19, 93 + posix_signal_terminal_stop = 20, 94 + posix_signal_tty_input = 21, 95 + posix_signal_tty_output = 22, 96 + posix_signal_io_urgent = 23, 97 + posix_signal_limit_cpu = 24, 98 + posix_signal_limit_space = 25, 99 + posix_signal_vt_alarm = 26, 100 + posix_signal_profile = 27, 101 + posix_signal_winch = 28, 102 + posix_signal_poll = 29, 103 + posix_signal_power = 30, 104 +# elif KVos == KA_os_fbsd 105 + posix_signal_bus = 10, 106 + posix_signal_user_a = 30, 107 + posix_signal_user_b = 31, 108 + posix_signal_child = 17, 109 + posix_signal_continue = 19, 110 + posix_signal_stack_fault = 16, 111 + posix_signal_stop = 17, 112 + posix_signal_terminal_stop = 18, 113 + posix_signal_tty_input = 21, 114 + posix_signal_tty_output = 22, 115 + posix_signal_io_urgent = 16, 116 + posix_signal_limit_cpu = 24, 117 + posix_signal_limit_space = 25, 118 + posix_signal_vt_alarm = 26, 119 + posix_signal_profile = 27, 120 + posix_signal_winch = 28, 121 + posix_signal_info = 29, 122 + posix_signal_poll = 23, 123 + posix_signal_power = 30, 124 +# endif 125 125 }; 126 126 127 127 #endif 128 128 #ifdef KFplatform_define_types 129 129 130 130 /* platform types */ 131 131
Modified dist/PKGBUILD from [fbbd050911] to [db0797b3e0].
5 5 url='https://c.comint.su/libk' 6 6 license=(AGPL) 7 7 source=('https://c.comint.su/libk/tarball/trunk/libk.tar.gz') 8 8 md5sums=(SKIP) 9 9 arch=(i686 x86_64 aarch64 armv7l) 10 10 depends=() 11 11 makedepends=(binutils bash yasm) 12 + 13 +# the following fields should be uncommented in release tarballs and in 14 +# libk build scripts submitted to the AUR or maybe eventually the Arch 15 +# community repositories. 16 + 17 +validpgpkeys=( 18 + BA8B6CB87AAF25B4F771C34CD8B3128C48456885 19 + 1AA9AC700870CC08C8561BF9C24B9CD04DC6AE7F 20 +) 21 + 12 22 13 23 build() { 14 24 export os=lin library=both 15 25 case $(uname -m) in 16 26 # i have no idea why, but the "arch" environment variable name 17 27 # appears tainted somehow, and gets blanked between here and 18 28 # the call to the build script. ugly hack but it works
Added global/cc-invoke.m4 version [02c091706a].
1 +_libk_shebang_ 2 +define(quot,"'"'$1'"'")dnl 3 +# generated from /global/cc-invoke.m4 by install.sh 4 + 5 +if test "$(echo -n)" = "-n"; then 6 + say() { echo $@' \c'; } 7 +else 8 + say() { echo -n $@' '; } 9 +fi 10 + 11 +libk_libs() { 12 + if test "$static" != 1; then 13 + say quot(_libk_libdir_/kboot.o) quot(-L`'_libk_libdir_) -lk 14 + else 15 + say quot(_libk_libdir_/libk.a) 16 + fi 17 +} 18 + 19 +libk_cflags() { 20 + say quot(-I`'_libk_incdir_) 21 +} 22 + 23 +libk_static() { 24 + say _libk_libdir_/libk.a 25 +} 26 + 27 +libk_gcc() { 28 + say -ffreestanding -nostdlib 29 +} 30 + 31 +libk_clang() { 32 + say -ffreestanding -nostdlibinc 33 +} 34 + 35 +usage() { 36 + echo "usage: $0 [flags]" 37 + echo " $0 prints compiler flags necessary to compile libk programs." 38 + echo " in general, you will need three kinds of flag sets:" 39 + echo " linkage flags tell the compiler where to find libk binary libraries" 40 + echo " for the final linking stage." 41 + echo " --libs -l : emit linkage flags" 42 + echo " --static -s: modify emitted flags for static linking" 43 + echo " compilation flags tell the compiler where to find headers." 44 + echo " --cflags -c: emit compilation flags" 45 + echo " compatibility flags set various compiler-specific options needed to" 46 + echo " compile programs without the traditional C standard library." 47 + echo " --gcc -g : emit gcc-style compat flags" 48 + echo " --clang -C: emit clang-style compat flags" 49 + echo " $0 handles quoting automatically." 50 + exit 64 51 +} 52 + 53 +for a in $@; do 54 + case $a in 55 + *help|-h) usage ;; 56 + *newlines|-n) 57 + say() { 58 + for l in $@; do 59 + echo $l 60 + done 61 + };; 62 + *libs|-l) fns="$fns libk_libs" ;; 63 + *cflags|-c) fns="$fns libk_cflags" ;; 64 + *gcc|-g) fns="$fns libk_gcc" ;; 65 + *clang|-C) fns="$fns libk_clang" ;; 66 + *static|-s) static=1 ;; 67 + esac 68 +done 69 + 70 +for f in $fns; do 71 + $f 72 +done
Modified install.sh from [bca498cfb3] to [973646497d].
5 5 # linux directory hierarchy on systems where this doesn't make sense. 6 6 7 7 check prefix 'a directory to install to' 8 8 build="${build:-out}" 9 9 10 10 bindir="${bindir:-$prefix/bin}" 11 11 libdir="${libdir:-$prefix/lib}" 12 -incdir="${incdir:-$prefix/include}" 12 +incdir="${incdir:-$prefix/include/k}" 13 13 sharedir="${sharedir:-$prefix/share}" 14 +shebang="${shebang:-#!/usr/bin/env bash}" 14 15 15 16 say "commencing install" 16 17 say " - prefix: $prefix" 17 18 say " - destinations:" 18 19 say " - binaries → $bindir" 19 20 say " - libraries → $libdir" 20 21 say " - headers → $incdir" ................................................................................ 33 34 say "installing binaries" 34 35 # *.testbin files should not be installed 35 36 install -Dm755 -t "$bindir" "$build/kgraft.attach" 36 37 37 38 # Includes 38 39 say "installing headers" 39 40 for inc in "$build"/k/*; do 40 - install -Dm644 -t "$incdir/k" "$inc" 41 + install -Dm644 -t "$incdir" "$inc" 41 42 done 42 43 43 44 # Documentation 44 45 say "installing documentation" 45 46 for man in "$build"/doc/man/*; do 46 47 install -Dm644 -t "$sharedir/man" "$man" 47 48 done 48 49 for html in "$build"/doc/html/*; do 49 50 install -Dm644 -t "$sharedir/doc/libk/html" "$html" 50 51 done 51 52 for pdf in "$build"/doc/pdf/*; do 52 53 install -Dm644 -t "$sharedir/doc/libk/pdf" "$pdf" 53 54 done 55 + 56 +say "building libk-config utility" 57 +m4 >"$bindir/libk-config" \ 58 + -D"_libk_bindir_=$bindir" -D"_libk_libdir_=$libdir" \ 59 + -D"_libk_incdir_=$incdir" -D"_libk_sharedir_=$sharedir" \ 60 + -D"_libk_shebang_=$shebang" \ 61 + global/cc-invoke.m4 62 + 63 +chmod +x "$bindir/libk-config" 64 + 54 65 say "install complete"