From 702093e043043fa6b735e76988fc3e9db3f8fe8b Mon Sep 17 00:00:00 2001 From: Will Anderson Date: Wed, 6 May 2026 17:41:55 -0500 Subject: [PATCH] fix: add -lssl -lcrypto -lm to all test runner gcc commands Same OpenSSL/math linker flags needed everywhere el_runtime.c is linked. --- lang/tests/calendar/run.sh | 2 +- lang/tests/html_sanitizer/run.sh | 2 +- lang/tests/text/run.sh | 2 +- lang/tests/time/run.sh | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lang/tests/calendar/run.sh b/lang/tests/calendar/run.sh index fd3e49d..f3e8869 100755 --- a/lang/tests/calendar/run.sh +++ b/lang/tests/calendar/run.sh @@ -44,7 +44,7 @@ run_runtime_case() { fi if ! cc -O2 -I "${RUNTIME_DIR}" "${out_c}" "${RUNTIME_DIR}/el_runtime.c" \ - -lcurl -lpthread -o "${out_bin}" 2>/tmp/cal_test.cc.err; then + -lcurl -lssl -lcrypto -lpthread -lm -o "${out_bin}" 2>/tmp/cal_test.cc.err; then echo "FAIL ${name} — cc failed:" cat /tmp/cal_test.cc.err | sed 's/^/ /' FAIL=$((FAIL+1)) diff --git a/lang/tests/html_sanitizer/run.sh b/lang/tests/html_sanitizer/run.sh index 658d5fa..c22db92 100755 --- a/lang/tests/html_sanitizer/run.sh +++ b/lang/tests/html_sanitizer/run.sh @@ -26,7 +26,7 @@ echo "==> Compiling runner.el via ${ELC}" echo "==> Linking against ${RUNTIME_DIR}/el_runtime.c" cc -O2 -I "${RUNTIME_DIR}" "${OUT_C}" "${RUNTIME_DIR}/el_runtime.c" \ - -lcurl -lpthread -o "${OUT_BIN}" + -lcurl -lssl -lcrypto -lpthread -lm -o "${OUT_BIN}" echo "==> Running" "${OUT_BIN}" diff --git a/lang/tests/text/run.sh b/lang/tests/text/run.sh index 7a70df1..488cc50 100755 --- a/lang/tests/text/run.sh +++ b/lang/tests/text/run.sh @@ -42,7 +42,7 @@ run_runtime_case() { fi if ! cc -O2 -I "${RUNTIME_DIR}" "${out_c}" "${RUNTIME_DIR}/el_runtime.c" \ - -lcurl -lpthread -o "${out_bin}" 2>/tmp/text_test.cc.err; then + -lcurl -lssl -lcrypto -lpthread -lm -o "${out_bin}" 2>/tmp/text_test.cc.err; then echo "FAIL ${name} — cc failed:" cat /tmp/text_test.cc.err | sed 's/^/ /' FAIL=$((FAIL+1)) diff --git a/lang/tests/time/run.sh b/lang/tests/time/run.sh index 7308dbb..1d445e7 100755 --- a/lang/tests/time/run.sh +++ b/lang/tests/time/run.sh @@ -55,7 +55,7 @@ run_runtime_case() { fi if ! cc -O2 -I "${RUNTIME_DIR}" "${out_c}" "${RUNTIME_DIR}/el_runtime.c" \ - -lcurl -lpthread -o "${out_bin}" 2>/tmp/time_test.cc.err; then + -lcurl -lssl -lcrypto -lpthread -lm -o "${out_bin}" 2>/tmp/time_test.cc.err; then echo "FAIL ${name} — cc failed:" cat /tmp/time_test.cc.err | sed 's/^/ /' FAIL=$((FAIL+1)) @@ -116,7 +116,7 @@ run_typeerror_case() { fi if cc -O2 -I "${RUNTIME_DIR}" "${out_c}" "${RUNTIME_DIR}/el_runtime.c" \ - -lcurl -lpthread -o /tmp/time_test_should_not_link 2>/tmp/time_test.cc.err; then + -lcurl -lssl -lcrypto -lpthread -lm -o /tmp/time_test_should_not_link 2>/tmp/time_test.cc.err; then echo "FAIL ${name} — cc unexpectedly succeeded; type rule did not fire" FAIL=$((FAIL+1)) FAILED_NAMES+=("${name}")