-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit_hash:e97d8794f04c155eaca0fa4161658142d04e4788
- Loading branch information
pg
committed
Feb 12, 2025
1 parent
11b5b34
commit 21b0ebc
Showing
4 changed files
with
20 additions
and
16 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
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,18 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import os | ||
import sys | ||
import json | ||
|
||
|
||
MUSL_LIBS = '-lc', '-lcrypt', '-ldl', '-lm', '-lpthread', '-lrt', '-lutil' | ||
|
||
|
||
def fix_cmd_for_musl(cmd): | ||
for flag in cmd: | ||
if flag not in MUSL_LIBS: | ||
yield flag | ||
|
||
|
||
if __name__ == '__main__': | ||
sys.stdout.write(json.dumps(list(fix_cmd_for_musl(sys.argv[1:])))) |
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 |
---|---|---|
|
@@ -60,6 +60,8 @@ CFLAGS( | |
-D__libc_free=free | ||
) | ||
|
||
LD_PLUGIN(musl) | ||
|
||
EXTRALIBS( | ||
-nostdlib | ||
-fno-pie | ||
|