Browse code

Add patch for tcsh gcc 5 optimization issue

Change-Id: Iec4f617456b6632faa728f9dddd3e3f7e7944b46
Reviewed-on: http://photon-jenkins.eng.vmware.com/1011
Reviewed-by: Sharath George
Tested-by: Sharath George

suezzelur authored on 2016/05/26 09:35:10
Showing 2 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,17 @@
0
+diff -rauN tcsh-6.19.00/tc.alloc.c tcsh-6.19.00-patch-calloc-gcc-5/tc.alloc.c
1
+--- tcsh-6.19.00/tc.alloc.c	2015-02-22 17:31:54.000000000 +0100
2
+@@ -348,10 +348,12 @@
3
+ {
4
+ #ifndef lint
5
+     char *cp;
6
++    volatile size_t k;
7
+ 
8
+     i *= j;
9
+     cp = xmalloc(i);
10
+-    memset(cp, 0, i);
11
++    k = i;
12
++    memset(cp, 0, k);
13
+ 
14
+     return ((memalign_t) cp);
15
+ #else
... ...
@@ -2,11 +2,12 @@
2 2
 Summary:	An enhanced version of csh, the C shell
3 3
 Name:		tcsh
4 4
 Version:	6.19.00
5
-Release:	3%{?dist}
5
+Release:	4%{?dist}
6 6
 License:	BSD
7 7
 Group:		System Environment/Shells
8 8
 Source:		http://www.sfr-fresh.com/unix/misc/%{name}-%{version}.tar.gz
9 9
 %define sha1 tcsh=cdb1abe319fab5d3caff101c393293e5b3607f0c
10
+Patch0:         tcsh-6.19.00-calloc-gcc-5.patch
10 11
 URL:		http://www.tcsh.org/
11 12
 Vendor:		VMware, Inc.
12 13
 Distribution: 	Photon
... ...
@@ -27,6 +28,7 @@ like syntax.
27 27
 
28 28
 %prep
29 29
 %setup -q
30
+%patch0 -p1
30 31
 
31 32
 %build
32 33
 sed -i -e 's|\$\*|#&|' -e 's|fR/g|&m|' tcsh.man2html &&
... ...
@@ -99,6 +101,8 @@ fi
99 99
 %{_mandir}/man1/*.1*
100 100
 
101 101
 %changelog
102
+*	Wed May 25 2016 Anish Swaminathan <anishs@vmware.com> 6.19.00-4
103
+-	Fix calloc for gcc 5 optimization
102 104
 *	Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 6.19.00-3
103 105
 -	GA - Bump release of all rpms
104 106
 *   	Wed May 4 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 6.19.00-2