summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbeck <beck@openbsd.org>2003-05-08 09:37:43 +0000
committerbeck <beck@openbsd.org>2003-05-08 09:37:43 +0000
commit2dd6b5ca140d50f61e9d816977e382e23697d85f (patch)
treed6cd42f823ebbd1e7f10b557ac5a8b70dc6b38b3
parentAUTHOR -> AUTHORS in .Sh, as per mdoc template. (diff)
downloadwireguard-openbsd-2dd6b5ca140d50f61e9d816977e382e23697d85f.tar.xz
wireguard-openbsd-2dd6b5ca140d50f61e9d816977e382e23697d85f.zip
Don't inline strcpy. since it's evil anyway. This makes it
easier to find in object files without worrying about whether or not -fno-builtin was used in building. ok itojun@, tedu@, anil@, henning@, etc...
-rw-r--r--gnu/egcs/gcc/c-decl.c2
-rw-r--r--gnu/egcs/gcc/config/openbsd.h4
2 files changed, 6 insertions, 0 deletions
diff --git a/gnu/egcs/gcc/c-decl.c b/gnu/egcs/gcc/c-decl.c
index 6f8a9006811..f6e4f8df320 100644
--- a/gnu/egcs/gcc/c-decl.c
+++ b/gnu/egcs/gcc/c-decl.c
@@ -3545,8 +3545,10 @@ init_decl_processing ()
builtin_function ("memset", memset_ftype, BUILT_IN_MEMSET, NULL_PTR);
builtin_function ("strcmp", int_ftype_string_string, BUILT_IN_STRCMP,
NULL_PTR);
+#ifndef NO_UNSAFE_BUILTINS
builtin_function ("strcpy", string_ftype_ptr_ptr, BUILT_IN_STRCPY,
NULL_PTR);
+#endif
builtin_function ("strlen", strlen_ftype, BUILT_IN_STRLEN, NULL_PTR);
builtin_function ("sqrtf", float_ftype_float, BUILT_IN_FSQRT, NULL_PTR);
builtin_function ("sqrt", double_ftype_double, BUILT_IN_FSQRT, NULL_PTR);
diff --git a/gnu/egcs/gcc/config/openbsd.h b/gnu/egcs/gcc/config/openbsd.h
index 81157d41821..3b9b3169ad2 100644
--- a/gnu/egcs/gcc/config/openbsd.h
+++ b/gnu/egcs/gcc/config/openbsd.h
@@ -308,3 +308,7 @@ do { \
as this depends on a few other details as well... */
#define HANDLE_SYSV_PRAGMA
+/* Disable the use of unsafe builtin functions, (strcpy), making
+ * them easier to spot in the object files.
+ */
+#define NO_UNSAFE_BUILTINS