mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Suppress codegen of panic printing with when panic messages are set to "off".
Implicit linking of libc math when libc math functions are used.
This commit is contained in:
@@ -268,7 +268,6 @@ static void linker_setup_macos(const char ***args_ref, Linker linker_type)
|
||||
error_exit("Cannot crosslink MacOS without providing --macossdk.");
|
||||
}
|
||||
linking_add_link(&compiler.linking, "System");
|
||||
linking_add_link(&compiler.linking, "m");
|
||||
add_plain_arg("-syslibroot");
|
||||
add_quote_arg(compiler.build.macos.sysroot);
|
||||
if (is_no_pie(compiler.platform.reloc_model)) add_plain_arg("-no_pie");
|
||||
@@ -407,7 +406,6 @@ static void linker_setup_linux(const char ***args_ref, Linker linker_type, bool
|
||||
add_plain_arg("-nostdlib");
|
||||
return;
|
||||
}
|
||||
linking_add_link(&compiler.linking, "m");
|
||||
if (compiler.build.debug_info == DEBUG_INFO_FULL)
|
||||
{
|
||||
add_plain_arg("-rdynamic");
|
||||
@@ -452,7 +450,6 @@ static void linker_setup_linux(const char ***args_ref, Linker linker_type, bool
|
||||
add_concat_file_arg(crt_dir, "crtn.o");
|
||||
add_concat_quote_arg("-L", crt_dir);
|
||||
add_plain_arg("--dynamic-linker=/lib64/ld-linux-x86-64.so.2");
|
||||
linking_add_link(&compiler.linking, "m");
|
||||
linking_add_link(&compiler.linking, "pthread");
|
||||
linking_add_link(&compiler.linking, "c");
|
||||
add_plain_arg("-L/usr/lib/");
|
||||
@@ -528,14 +525,12 @@ static void linker_setup_android(const char ***args_ref, Linker linker_type, boo
|
||||
add_plain_arg(scratch_buffer_copy());
|
||||
|
||||
add_plain_arg("-ldl");
|
||||
add_plain_arg("-lm");
|
||||
add_plain_arg("-lc");
|
||||
}
|
||||
|
||||
static void linker_setup_freebsd(const char ***args_ref, Linker linker_type, bool is_dylib)
|
||||
{
|
||||
if (linker_type == LINKER_CC) {
|
||||
linking_add_link(&compiler.linking, "m");
|
||||
linking_add_link(&compiler.linking, "pthread");
|
||||
return;
|
||||
}
|
||||
@@ -573,7 +568,6 @@ static void linker_setup_freebsd(const char ***args_ref, Linker linker_type, boo
|
||||
add_concat_quote_arg("-L", crt_dir);
|
||||
add_plain_arg("--dynamic-linker=/libexec/ld-elf.so.1");
|
||||
linking_add_link(&compiler.linking, "c");
|
||||
linking_add_link(&compiler.linking, "m");
|
||||
linking_add_link(&compiler.linking, "gcc");
|
||||
linking_add_link(&compiler.linking, "gcc_s");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user