Fold LIBC_RAND into LIBC_STDIO/TINYMATH/INTRIN

This commit is contained in:
Justine Tunney 2022-08-11 12:26:30 -07:00
parent 05b8f82371
commit 8a0a2c0c36
183 changed files with 149 additions and 322 deletions

View file

@ -23,7 +23,7 @@
#include "libc/mem/mem.h"
#include "libc/nexgen32e/nexgen32e.h"
#include "libc/nexgen32e/x86feature.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"

View file

@ -28,7 +28,6 @@ TEST_LIBC_ALG_DIRECTDEPS = \
LIBC_LOG \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RAND \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \

View file

@ -18,7 +18,7 @@
*/
#include "libc/calls/struct/timespec.h"
#include "libc/intrin/kprintf.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/testlib/testlib.h"
TEST(_timespec_gte, test) {

View file

@ -28,7 +28,7 @@
#include "libc/intrin/wait0.internal.h"
#include "libc/macros.internal.h"
#include "libc/nexgen32e/threaded.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/internal.h"
#include "libc/runtime/stack.h"
#include "libc/str/str.h"

View file

@ -27,7 +27,7 @@
#include "libc/log/check.h"
#include "libc/math.h"
#include "libc/mem/mem.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/directmap.internal.h"
#include "libc/runtime/runtime.h"
#include "libc/str/str.h"

View file

@ -21,7 +21,7 @@
#include "libc/errno.h"
#include "libc/fmt/fmt.h"
#include "libc/fmt/itoa.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/runtime.h"
#include "libc/sysv/consts/at.h"
#include "libc/sysv/consts/s.h"

View file

@ -37,7 +37,6 @@ TEST_LIBC_CALLS_DIRECTDEPS = \
LIBC_LOG \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RAND \
LIBC_STDIO \
LIBC_SYSV_CALLS \
LIBC_RUNTIME \

View file

@ -19,7 +19,7 @@
#include "libc/dns/dns.h"
#include "libc/dns/dnsheader.h"
#include "libc/mem/mem.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"

View file

@ -33,7 +33,6 @@ TEST_LIBC_DNS_DIRECTDEPS = \
LIBC_RUNTIME \
LIBC_SOCK \
LIBC_STDIO \
LIBC_RAND \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV \

View file

@ -18,7 +18,7 @@
*/
#include "libc/fmt/fmt.h"
#include "libc/fmt/nf32.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/testlib/testlib.h"
TEST(EncodeNf32, test) {

View file

@ -24,7 +24,6 @@ TEST_LIBC_FMT_DIRECTDEPS = \
LIBC_LOG \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RAND \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \

View file

@ -102,8 +102,8 @@
#include "libc/limits.h"
#include "libc/log/check.h"
#include "libc/nexgen32e/kcpuids.h"
#include "libc/rand/lcg.internal.h"
#include "libc/rand/rand.h"
#include "libc/stdio/lcg.internal.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"

View file

@ -25,7 +25,7 @@
#include "libc/limits.h"
#include "libc/log/libfatal.internal.h"
#include "libc/macros.internal.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/memtrack.internal.h"
#include "libc/runtime/runtime.h"
#include "libc/runtime/symbols.internal.h"

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/mem/mem.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"

View file

@ -19,7 +19,7 @@
#include "libc/macros.internal.h"
#include "libc/mem/mem.h"
#include "libc/nexgen32e/nexgen32e.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"

View file

@ -19,7 +19,7 @@
#include "libc/dce.h"
#include "libc/intrin/asan.internal.h"
#include "libc/mem/mem.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/str/str.h"
#include "libc/testlib/ezbench.h"

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/intrin/palignr.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/testlib/ezbench.h"
#include "libc/testlib/testlib.h"

View file

@ -19,7 +19,7 @@
#include "libc/intrin/pshufd.h"
#include "libc/intrin/pshufhw.h"
#include "libc/intrin/pshuflw.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/str/str.h"
#include "libc/testlib/testlib.h"

View file

@ -28,7 +28,7 @@
#include "libc/macros.internal.h"
#include "libc/mem/mem.h"
#include "libc/nexgen32e/threaded.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/internal.h"
#include "libc/runtime/stack.h"
#include "libc/str/str.h"

View file

@ -20,7 +20,7 @@
#include "libc/macros.internal.h"
#include "libc/mem/mem.h"
#include "libc/nexgen32e/bsr.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"
#include "libc/testlib/ezbench.h"

View file

@ -29,7 +29,6 @@ TEST_LIBC_INTRIN_DIRECTDEPS = \
LIBC_LOG \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RAND \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \

View file

@ -25,7 +25,7 @@
#include "libc/intrin/kprintf.h"
#include "libc/macros.internal.h"
#include "libc/mem/mem.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/runtime/memtrack.internal.h"
#include "libc/runtime/runtime.h"

View file

@ -35,7 +35,6 @@ TEST_LIBC_MEM_DIRECTDEPS = \
LIBC_LOG \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RAND \
LIBC_RUNTIME \
LIBC_SOCK \
LIBC_STDIO \

View file

@ -19,7 +19,7 @@
#include "libc/intrin/bits.h"
#include "libc/macros.internal.h"
#include "libc/mem/mem.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/str/str.h"
#include "libc/testlib/testlib.h"

View file

@ -18,7 +18,7 @@
*/
#include "libc/mem/mem.h"
#include "libc/nexgen32e/nexgen32e.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/str/str.h"
#include "libc/testlib/ezbench.h"

View file

@ -32,7 +32,6 @@ TEST_LIBC_NEXGEN32E_DIRECTDEPS = \
LIBC_LOG \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RAND \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \

View file

@ -1,67 +0,0 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#───vi: set et ft=make ts=8 tw=8 fenc=utf-8 :vi───────────────────────┘
PKGS += TEST_LIBC_RAND
TEST_LIBC_RAND_SRCS := $(wildcard test/libc/rand/*.c)
TEST_LIBC_RAND_SRCS_TEST = $(filter %_test.c,$(TEST_LIBC_RAND_SRCS))
TEST_LIBC_RAND_BINS = $(TEST_LIBC_RAND_COMS) $(TEST_LIBC_RAND_COMS:%=%.dbg)
TEST_LIBC_RAND_OBJS = \
$(TEST_LIBC_RAND_SRCS:%.c=o/$(MODE)/%.o)
TEST_LIBC_RAND_COMS = \
$(TEST_LIBC_RAND_SRCS:%.c=o/$(MODE)/%.com)
TEST_LIBC_RAND_TESTS = $(TEST_LIBC_RAND_SRCS_TEST:%.c=o/$(MODE)/%.com.ok)
TEST_LIBC_RAND_CHECKS = \
$(TEST_LIBC_RAND_SRCS_TEST:%.c=o/$(MODE)/%.com.runs)
TEST_LIBC_RAND_DIRECTDEPS = \
LIBC_FMT \
LIBC_INTRIN \
LIBC_TINYMATH \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RAND \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
LIBC_CALLS \
LIBC_THREAD \
LIBC_LOG \
LIBC_SYSV \
LIBC_TESTLIB \
LIBC_UNICODE \
LIBC_X \
THIRD_PARTY_GDTOA \
THIRD_PARTY_MBEDTLS
TEST_LIBC_RAND_DEPS := \
$(call uniq,$(foreach x,$(TEST_LIBC_RAND_DIRECTDEPS),$($(x))))
o/$(MODE)/test/libc/rand/rand.pkg: \
$(TEST_LIBC_RAND_OBJS) \
$(foreach x,$(TEST_LIBC_RAND_DIRECTDEPS),$($(x)_A).pkg)
o/$(MODE)/test/libc/rand/%.com.dbg: \
$(TEST_LIBC_RAND_DEPS) \
o/$(MODE)/test/libc/rand/%.o \
o/$(MODE)/test/libc/rand/rand.pkg \
$(LIBC_TESTMAIN) \
$(CRT) \
$(APE_NO_MODIFY_SELF)
@$(APELINK)
$(TEST_LIBC_RAND_OBJS): test/libc/rand/test.mk
$(TEST_LIBC_RAND_OBJS): private \
DEFAULT_CCFLAGS += \
-fno-builtin
.PHONY: o/$(MODE)/test/libc/rand
o/$(MODE)/test/libc/rand: \
$(TEST_LIBC_RAND_BINS) \
$(TEST_LIBC_RAND_CHECKS)

View file

@ -29,7 +29,7 @@
#include "libc/linux/munmap.h"
#include "libc/log/log.h"
#include "libc/mem/mem.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/runtime/memtrack.internal.h"
#include "libc/runtime/runtime.h"

View file

@ -30,7 +30,6 @@ TEST_LIBC_RUNTIME_DIRECTDEPS = \
LIBC_LOG \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RAND \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \

View file

@ -18,7 +18,7 @@
*/
#include "libc/dce.h"
#include "libc/mem/mem.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/str/str.h"
#include "libc/testlib/testlib.h"

View file

@ -20,7 +20,7 @@
#include "libc/calls/struct/dirent.h"
#include "libc/dce.h"
#include "libc/errno.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/runtime/runtime.h"
#include "libc/str/str.h"

View file

@ -21,7 +21,7 @@
#include "libc/dce.h"
#include "libc/errno.h"
#include "libc/mem/mem.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/runtime/runtime.h"
#include "libc/stdio/stdio.h"

View file

@ -20,8 +20,8 @@
#include "libc/log/check.h"
#include "libc/math.h"
#include "libc/nexgen32e/x86feature.h"
#include "libc/rand/lcg.internal.h"
#include "libc/rand/rand.h"
#include "libc/stdio/lcg.internal.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/runtime.h"
#include "libc/stdio/stdio.h"
#include "libc/sysv/consts/grnd.h"

View file

@ -21,7 +21,7 @@
#include "libc/log/check.h"
#include "libc/macros.internal.h"
#include "libc/mem/mem.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/runtime/runtime.h"
#include "libc/stdio/stdio.h"

View file

@ -18,7 +18,7 @@
*/
#include "libc/intrin/bits.h"
#include "libc/mem/mem.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/str/str.h"
#include "libc/testlib/hyperion.h"
#include "libc/testlib/testlib.h"

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/intrin/bits.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/testlib/testlib.h"
uint64_t counter(void) {

View file

@ -28,7 +28,6 @@ TEST_LIBC_STDIO_DIRECTDEPS = \
LIBC_INTRIN \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RAND \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \
@ -43,6 +42,7 @@ TEST_LIBC_STDIO_DIRECTDEPS = \
LIBC_X \
LIBC_ZIPOS \
THIRD_PARTY_GDTOA \
THIRD_PARTY_MBEDTLS \
THIRD_PARTY_MUSL \
THIRD_PARTY_ZLIB \
THIRD_PARTY_ZLIB_GZ

View file

@ -18,7 +18,7 @@
*/
#include "libc/assert.h"
#include "libc/mem/mem.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/str/blake2.h"
#include "libc/str/str.h"
#include "libc/testlib/ezbench.h"

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/mem/mem.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"

View file

@ -17,7 +17,7 @@
*/
#include "libc/inttypes.h"
#include "libc/nexgen32e/crc32.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/stdio/stdio.h"
#include "libc/str/highwayhash64.h"
#include "libc/str/str.h"

View file

@ -18,7 +18,7 @@
*/
#include "libc/alg/alg.h"
#include "libc/mem/mem.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/runtime/runtime.h"
#include "libc/str/str.h"

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/mem/mem.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"
#include "libc/testlib/ezbench.h"

View file

@ -19,7 +19,7 @@
#include "libc/intrin/bits.h"
#include "libc/mem/mem.h"
#include "libc/nexgen32e/nexgen32e.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"
#include "libc/testlib/ezbench.h"

View file

@ -20,7 +20,7 @@
#include "libc/intrin/bits.h"
#include "libc/intrin/likely.h"
#include "libc/mem/mem.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/str/internal.h"
#include "libc/str/str.h"
#include "libc/testlib/ezbench.h"

View file

@ -16,7 +16,7 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/str/str.h"
#include "libc/testlib/ezbench.h"
#include "libc/testlib/hyperion.h"

View file

@ -21,7 +21,7 @@
#include "libc/macros.internal.h"
#include "libc/mem/mem.h"
#include "libc/nexgen32e/bsr.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/str/str.h"
#include "libc/testlib/ezbench.h"

View file

@ -18,7 +18,7 @@
*/
#include "libc/intrin/bits.h"
#include "libc/mem/mem.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/str/str.h"
#include "libc/testlib/ezbench.h"
#include "libc/testlib/hyperion.h"

View file

@ -23,7 +23,7 @@
#include "libc/mem/mem.h"
#include "libc/nexgen32e/cachesize.h"
#include "libc/nexgen32e/x86feature.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"

View file

@ -39,7 +39,6 @@ TEST_LIBC_STR_DIRECTDEPS = \
LIBC_TINYMATH \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RAND \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/limits.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"
#include "libc/str/tpenc.h"

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/math.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/testlib/ezbench.h"
#include "libc/testlib/testlib.h"

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/math.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/testlib/ezbench.h"
#include "libc/testlib/testlib.h"

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/math.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/testlib/ezbench.h"
#include "libc/testlib/testlib.h"

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/math.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/stdio/stdio.h"
#include "libc/testlib/ezbench.h"

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/math.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/testlib/ezbench.h"
#include "libc/testlib/hyperion.h"

View file

@ -23,7 +23,7 @@
#include "libc/fmt/fmt.h"
#include "libc/macros.internal.h"
#include "libc/math.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/runtime/pc.internal.h"
#include "libc/stdio/stdio.h"

View file

@ -28,7 +28,6 @@ TEST_LIBC_TINYMATH_DIRECTDEPS = \
LIBC_INTRIN \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RAND \
LIBC_STDIO \
LIBC_RUNTIME \
LIBC_STR \

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/mem/mem.h"
#include "libc/rand/rand.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/stdio/stdio.h"
#include "libc/sysv/consts/madv.h"

View file

@ -31,7 +31,6 @@ TEST_LIBC_X_DIRECTDEPS = \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \
LIBC_RAND \
LIBC_SOCK \
LIBC_STUBS \
LIBC_SYSV \