Blame SOURCES/ksh-20120801-badgcc.patch

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