Module Name: src
Committed By: mrg
Date: Thu Nov 21 07:34:39 UTC 2019
Modified Files:
src/sys/lib/libsa: ustarfs.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/lib/libsa/ustarfs.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/lib/libsa/ustarfs.c
diff -u src/sys/lib/libsa/ustarfs.c:1.35 src/sys/lib/libsa/ustarfs.c:1.36
--- src/sys/lib/libsa/ustarfs.c:1.35 Thu Mar 20 03:13:18 2014
+++ src/sys/lib/libsa/ustarfs.c Thu Nov 21 07:34:39 2019
@@ -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)
{