diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-05-06 23:13:12 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-05-06 23:13:12 -0400 |
| commit | 157af4332a7b78672ff8ad76a00120455547e2fd (patch) | |
| tree | 0e75d0d9bb111f8e778587a2fb547b74a17c5aa1 /src/link.cpp | |
| parent | 866c841dd8770bcc12af0aaf946c80819f5e0092 (diff) | |
| download | zig-157af4332a7b78672ff8ad76a00120455547e2fd.tar.gz zig-157af4332a7b78672ff8ad76a00120455547e2fd.zip | |
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
Diffstat (limited to 'src/link.cpp')
| -rw-r--r-- | src/link.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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"); |
