From 157af4332a7b78672ff8ad76a00120455547e2fd Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 6 May 2017 23:13:12 -0400 Subject: builtin functions for division and remainder division * add `@divTrunc` and `@divFloor` functions * add `@rem` and `@mod` functions * add compile error for `/` and `%` with signed integers * add `.bit_count` for float primitive types closes #217 --- src/link.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/link.cpp') diff --git a/src/link.cpp b/src/link.cpp index 09bea8a999..f67b05724a 100644 --- a/src/link.cpp +++ b/src/link.cpp @@ -297,6 +297,7 @@ static void construct_linker_job_elf(LinkJob *lj) { lj->args.append("-lgcc"); lj->args.append("-lgcc_eh"); lj->args.append("-lc"); + lj->args.append("-lm"); lj->args.append("--end-group"); } else { lj->args.append("-lgcc"); @@ -304,6 +305,7 @@ static void construct_linker_job_elf(LinkJob *lj) { lj->args.append("-lgcc_s"); lj->args.append("--no-as-needed"); lj->args.append("-lc"); + lj->args.append("-lm"); lj->args.append("-lgcc"); lj->args.append("--as-needed"); lj->args.append("-lgcc_s"); -- cgit v1.2.3