From faad7fc97d06be3197733648c6b5a4871c923cba Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 28 Mar 2025 14:22:42 -0400 Subject: [PATCH] Remove dl lib requirement --- Makefile | 6 +++--- src/repl.c | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 9fc3000..182cab8 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ G=-ggdb O=-Og CFLAGS=$(CCONFIG) $(EXTRA) $(CWARN) $(G) $(O) $(OSFLAGS) $(LTO) CFLAGS_PLACEHOLDER="$$(echo -e '\033[2m\033[m')" -LDLIBS=-lgc -lcord -lm -lunistring -lgmp -ldl +LDLIBS=-lgc -lcord -lm -lunistring -lgmp COMPILER_OBJS=$(patsubst %.c,%.o,$(wildcard src/*.c)) STDLIB_OBJS=$(patsubst %.c,%.o,$(wildcard src/stdlib/*.c)) TESTS=$(patsubst test/%.tm,test/results/%.tm.testresult,$(wildcard test/*.tm)) @@ -44,8 +44,8 @@ build/tomo: $(STDLIB_OBJS) $(COMPILER_OBJS) build/libtomo.so: $(STDLIB_OBJS) @mkdir -p build - @echo $(CC) $^ $(CFLAGS_PLACEHOLDER) $(OSFLAGS) -lgc -lcord -lm -lunistring -lgmp -ldl -Wl,-soname,libtomo.so -shared -o $@ - @$(CC) $^ $(CFLAGS) $(OSFLAGS) -lgc -lcord -lm -lunistring -lgmp -ldl -Wl,-soname,libtomo.so -shared -o $@ + @echo $(CC) $^ $(CFLAGS_PLACEHOLDER) $(OSFLAGS) -lgc -lcord -lm -lunistring -lgmp -Wl,-soname,libtomo.so -shared -o $@ + @$(CC) $^ $(CFLAGS) $(OSFLAGS) -lgc -lcord -lm -lunistring -lgmp -Wl,-soname,libtomo.so -shared -o $@ tags: ctags src/*.[ch] src/stdlib/*.[ch] diff --git a/src/repl.c b/src/repl.c index 78dfc11..f5ec0ab 100644 --- a/src/repl.c +++ b/src/repl.c @@ -43,9 +43,6 @@ static PUREFUNC repl_binding_t *get_repl_binding(env_t *env, const char *name) void repl(void) { env_t *env = global_env(); - void *dl = dlopen("libtomo.so", RTLD_LAZY); - if (!dl) print_err("I couldn't find libtomo.so in your library paths"); - size_t buf_size = 0; char *line = NULL; ssize_t len = 0;