diff options
author | Érico Rolim <erico.erc@gmail.com> | 2020-12-07 12:34:00 -0300 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2020-12-07 12:44:08 -0800 |
commit | bb16d92f82ca3d4b3969c4833631dce2b3bce534 (patch) | |
tree | d77d53c0323564c8fed7b1e5ec6b0472d1304a5a /driver.c | |
parent | 50956c829a0121162bdf3ed7e54335f529c44582 (diff) |
Support -pthread compiler flag.
POSIX requires -lpthread, but most Linux manual pages recommend using
-pthread, and a lot of projects use it.
Diffstat (limited to 'driver.c')
-rw-r--r-- | driver.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -440,6 +440,9 @@ main(int argc, char *argv[]) arrayaddptr(&stages[PREPROCESS].cmd, arg); } else if (strcmp(arg, "-pedantic") == 0) { /* ignore */ + } else if (strcmp(arg, "-pthread") == 0) { + arrayaddptr(&stages[LINK].cmd, "-l"); + arrayaddptr(&stages[LINK].cmd, "pthread"); } else { if (arg[2] != '\0' && strchr("cESsv", arg[1])) usage(NULL); |