diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/builtins.c | 12 | ||||
-rw-r--r-- | gcc/symtab.c | 5 |
2 files changed, 11 insertions, 6 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 14cfa57..0db4090 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -14480,8 +14480,8 @@ target_char_cst_p (tree t, char *p) } /* Return true if the builtin DECL is implemented in a standard library. - Otherwise returns false which doesn't guarantee it is not (thus the list of - handled builtins below may be incomplete). */ + Otherwise return false which doesn't guarantee it is not (thus the list + of handled builtins below may be incomplete). */ bool builtin_with_linkage_p (tree decl) @@ -14560,6 +14560,14 @@ builtin_with_linkage_p (tree decl) CASE_FLT_FN (BUILT_IN_TRUNC): CASE_FLT_FN_FLOATN_NX (BUILT_IN_TRUNC): return true; + + case BUILT_IN_STPCPY: + case BUILT_IN_STPNCPY: + /* stpcpy is both referenced in libiberty's pex-win32.c and provided + by libiberty's stpcpy.c for MinGW targets so we need to return true + in order to be able to build libiberty in LTO mode for them. */ + return true; + default: break; } diff --git a/gcc/symtab.c b/gcc/symtab.c index 2135b34..8c4cb70 100644 --- a/gcc/symtab.c +++ b/gcc/symtab.c @@ -2526,10 +2526,7 @@ symtab_node::output_to_lto_symbol_table_p (void) in libraries so make sure to output references into the symbol table to make those libraries referenced. Note this is incomplete handling for now and only covers math functions. */ - if (builtin_with_linkage_p (decl)) - return true; - else - return false; + return builtin_with_linkage_p (decl); } /* We have real symbol that should be in symbol table. However try to trim |