diff options
| author | mrg <mrg@NetBSD.org> | 2019-11-21 07:34:39 +0000 |
|---|---|---|
| committer | mrg <mrg@NetBSD.org> | 2019-11-21 07:34:39 +0000 |
| commit | ad585fcb14bdce6cb7634ec1df2371dd05cb0167 (patch) | |
| tree | 1e4c76bf12fbf9fcbd25f78831fa8f85fb34b3a0 /sys/lib/libsa | |
| parent | 74710484d9a04a0041aaa9c7fc74c3a4433a491f (diff) | |
from the new comment:
* XXX Hack alert. GCC 8.3 mis-compiles this function and calls
* strncmp() with the wrong second pointer, as seen in PR#54703.
*
* Until the real cause is located, work around it by using -O1
* for this function.
this hack is restricted to i386.
Diffstat (limited to 'sys/lib/libsa')
| -rw-r--r-- | sys/lib/libsa/ustarfs.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/lib/libsa/ustarfs.c b/sys/lib/libsa/ustarfs.c index 449582244ab..eab8d133459 100644 --- a/sys/lib/libsa/ustarfs.c +++ b/sys/lib/libsa/ustarfs.c @@ -1,4 +1,4 @@ -/* $NetBSD: ustarfs.c,v 1.35 2014/03/20 03:13:18 christos Exp $ */ +/* $NetBSD: ustarfs.c,v 1.36 2019/11/21 07:34:39 mrg Exp $ */ /* [Notice revision 2.2] * Copyright (c) 1997, 1998 Avalon Computer Systems, Inc. @@ -381,6 +381,16 @@ init_volzero_sig(struct open_file *f) return 0; } +/* + * XXX Hack alert. GCC 8.3 mis-compiles this function and calls + * strncmp() with the wrong second pointer, as seen in PR#54703. + * + * Until the real cause is located, work around it by using -O1 + * for this function. + */ +#ifdef __i386__ +__attribute__((__optimize__("O1"))) +#endif __compactcall int ustarfs_open(const char *path, struct open_file *f) { |
