Commit 045454a
committed
Check for OS instead of the architecture in Makefile
The linking issue that prompted the addition of the conditional check
was due to the different compiler toolchain used on Linux (gcc) vs macos (clang).
Linux can run on arm architecture too, but passing the `-undefined dynamic_lookup` flag
to `gcc` would cause it to fail:
```
$ make
cc -O3 -Wall -I/home/alco/.asdf/installs/erlang/25.3.2.2/erts-13.2.2.1/include \
-Ic_src/libpg_query -fPIC -lpthread -shared -undefined dynamic_lookup \
-o priv/libpg_query_ex.so c_src/libpg_query_ex.c c_src/libpg_query/libpg_query.a
/usr/bin/ld: cannot find dynamic_lookup: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:21: priv/libpg_query_ex.so] Error 1
```1 parent 32d9134 commit 045454a
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
0 commit comments