Commit 03f2b2f
Fix Linux linking by moving -lm to LDLIBS
Move the -lm flag from CFLAGS to a new LDLIBS variable and place it
at the end of the linker command. This ensures libm is properly linked
on Linux systems.
The linker processes arguments left-to-right, so library flags must
come after source files that reference their symbols. Previously,
-lm appeared before the source file, causing "undefined symbol: sqrtf"
errors on some Linux distributions.
Cherry-picked from upstream PR asg017#252
Co-Authored-By: wardviaene <[email protected]>1 parent 042d093 commit 03f2b2f
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| |||
0 commit comments