diff --git a/.gitea/workflows/ci-dev.yaml b/.gitea/workflows/ci-dev.yaml index b33bad8..1aab05b 100644 --- a/.gitea/workflows/ci-dev.yaml +++ b/.gitea/workflows/ci-dev.yaml @@ -23,13 +23,17 @@ jobs: apt-get install -y gcc libcurl4-openssl-dev # Gen2: compile the bootstrap C source into a working elc binary + # -Wl,--allow-multiple-definition: is_digit/is_whitespace exist in both + # elc-bootstrap.c (pre-dates runtime text primitives) and el_runtime.c. + # Both definitions are equivalent; allow the linker to pick one. - name: Build elc from bootstrap (gen2) run: | gcc -O2 \ -I el-compiler/runtime \ dist/elc-bootstrap.c \ el-compiler/runtime/el_runtime.c \ - -lcurl -lpthread \ + -lcurl -lpthread -lm \ + -Wl,--allow-multiple-definition \ -o dist/elc-gen2 chmod +x dist/elc-gen2 echo "gen2 elc built" @@ -44,7 +48,7 @@ jobs: -I el-compiler/runtime \ dist/elc-gen3.c \ el-compiler/runtime/el_runtime.c \ - -lcurl -lpthread \ + -lcurl -lpthread -lm \ -o dist/platform/elc chmod +x dist/platform/elc echo "gen3 (self-hosted) elc built" @@ -83,7 +87,7 @@ jobs: RUNTIME="$(pwd)/el-compiler/runtime" "$ELC" --test tests/native/test_text.el > /tmp/el_native_text.c gcc -O2 -I "$RUNTIME" /tmp/el_native_text.c "$RUNTIME/el_runtime.c" \ - -lcurl -lpthread -o /tmp/el_native_text + -lcurl -lpthread -lm -o /tmp/el_native_text /tmp/el_native_text # Publish artifact to GCP Artifact Registry (dev)