forked from goplus/llgo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: fix
sigsetjmp
issues and ensure required libs on Linux
1. Handle `sigsetjmp` platform differences: - Separate `sigsetjmp` linkage to platform-specific files. - Use `__sigsetjmp` on Linux to handle `sigsetjmp` being a macro. - Maintain original implementation for Darwin. 2. Ensure linking of required libs: - Explicitly link against fundamental libs (e.g., libm, libatomic). - Address the fact that typical Linux linkers don't link these by default.
- Loading branch information
Showing
4 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//go:build linux | ||
|
||
package setjmp | ||
|
||
import ( | ||
_ "unsafe" | ||
|
||
"github.com/goplus/llgo/c" | ||
) | ||
|
||
//go:linkname Sigsetjmp C.__sigsetjmp | ||
func Sigsetjmp(env *SigjmpBuf, savemask c.Int) c.Int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//go:build !linux | ||
|
||
package setjmp | ||
|
||
import ( | ||
_ "unsafe" | ||
|
||
"github.com/goplus/llgo/c" | ||
) | ||
|
||
//go:linkname Sigsetjmp C.sigsetjmp | ||
func Sigsetjmp(env *SigjmpBuf, savemask c.Int) c.Int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters