Blame SOURCES/ksh-20120801-badgcc.patch

bd3d17
diff -up ksh-20120801/src/lib/libast/string/strdup.c.badgcc ksh-20120801/src/lib/libast/string/strdup.c
bd3d17
--- ksh-20120801/src/lib/libast/string/strdup.c.badgcc	2012-05-21 15:04:46.000000000 +0200
bd3d17
+++ ksh-20120801/src/lib/libast/string/strdup.c	2015-06-17 10:12:52.693922581 +0200
bd3d17
@@ -50,11 +50,18 @@ __STDPP__directive pragma pp:nohide strd
bd3d17
 #define extern	__EXPORT__
bd3d17
 #endif
bd3d17
 
bd3d17
+#pragma GCC push_options
bd3d17
+#pragma GCC optimize ("O0")
bd3d17
+
bd3d17
+
bd3d17
 extern char*
bd3d17
 strdup(register const char* s)
bd3d17
 {
bd3d17
 	register char*	t;
bd3d17
 	register int	n;
bd3d17
 
bd3d17
 	return (s && (t = oldof(0, char, n = strlen(s) + 1, 0))) ? (char*)memcpy(t, s, n) : (char*)0;
bd3d17
 }
bd3d17
+
bd3d17
+#pragma GCC pop_options
bd3d17
+