Joxean Koret (@matalaz) on Nostr: Does anybody know how to prevent #clang from issuing calls to libc functions like ...
Does anybody know how to prevent #clang from issuing calls to libc functions like `memset` in this case when compiling C programs? I have tried I don't know how many command line arguments to try to disable it but none worked at all.
Here you have an example program in #godbolt:
https://godbolt.org/z/jheYoPWzjThese are the command line arguments I've tried to disable it:
-ffreestanding -disable-simplify-libcalls -fno-builtin -nostdinc -nostdlib -fno-builtin-memset -nostdlib++ -nostdinc++
Any idea?
Published at
2025-01-13 11:42:00 UTCEvent JSON
{
"id": "666cf37e846aa4e3be7eb803692068b460028cb004a251b44fc1ae0c4c937669",
"pubkey": "0cc2b0c5cd8701d31062a2eb6f8aa71def61360c75deb8994e668cc1841abe56",
"created_at": 1736768520,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.social/@joxean/113820861791242555",
"web"
],
[
"t",
"clang"
],
[
"t",
"godbolt"
],
[
"proxy",
"https://mastodon.social/users/joxean/statuses/113820861791242555",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://mastodon.social/users/joxean/statuses/113820861791242555",
"pink.momostr"
],
[
"-"
]
],
"content": "Does anybody know how to prevent #clang from issuing calls to libc functions like `memset` in this case when compiling C programs? I have tried I don't know how many command line arguments to try to disable it but none worked at all. \n\nHere you have an example program in #godbolt: https://godbolt.org/z/jheYoPWzj\n\nThese are the command line arguments I've tried to disable it:\n\n-ffreestanding -disable-simplify-libcalls -fno-builtin -nostdinc -nostdlib -fno-builtin-memset -nostdlib++ -nostdinc++\n\nAny idea?",
"sig": "9f9252d83d5d93c3ed0a1d029589e68358e8e813fba55cc5d6602195caa29f31aabef16573910d8d74979dfa92b987deb0555bb28a0517e0712f6d07b019c7f3"
}