From 1553422abb08b64909d9e74310398b45db0062bc Mon Sep 17 00:00:00 2001 From: konradm Date: Oct 06 2009 16:34:13 +0000 Subject: - Fix a bug with single-bit types, logical NOT, and casting to char (I'm fuzzy on the details) that was reported by a Fedora user with the r5508 patch from upstream. --- diff --git a/sdcc-2.9.0-r5508-fix-bug2805333.diff b/sdcc-2.9.0-r5508-fix-bug2805333.diff new file mode 100644 index 0000000..1e73db9 --- /dev/null +++ b/sdcc-2.9.0-r5508-fix-bug2805333.diff @@ -0,0 +1,39 @@ +Index: sdcc/src/mcs51/gen.c +=================================================================== +--- sdcc/src/mcs51/gen.c (revision 5507) ++++ sdcc/src/mcs51/gen.c (working copy) +@@ -1413,7 +1413,8 @@ + return aop->aopu.aop_reg[offset]->name; + + case AOP_CRY: +- emitcode ("mov", "c,%s", aop->aopu.aop_dir); ++ if (!IS_OP_RUONLY (oper)) ++ emitcode ("mov", "c,%s", aop->aopu.aop_dir); + emitcode ("clr", "a"); + emitcode ("rlc", "a"); + return (dname ? "acc" : "a"); +@@ -10052,7 +10053,7 @@ + ifxCond = genUnpackBits (result, rname, POINTER, ifx); + else + { +- /* we have can just get the values */ ++ /* we can just get the values */ + int size = AOP_SIZE (result); + int offset = 0; + +@@ -10060,7 +10061,6 @@ + { + if (ifx || IS_AOP_PREG (result) || AOP_TYPE (result) == AOP_STK) + { +- + emitcode ("mov", "a,@%s", rname); + if (!ifx) + aopPut (result, "a", offset); +@@ -10483,7 +10483,6 @@ + the pointer values */ + switch (p_type) + { +- + case POINTER: + case IPOINTER: + genNearPointerGet (left, result, ic, pi, ifx); diff --git a/sdcc.spec b/sdcc.spec index 5cb8c61..2156b35 100644 --- a/sdcc.spec +++ b/sdcc.spec @@ -1,6 +1,6 @@ Name: sdcc Version: 2.9.0 -Release: 3%{?dist} +Release: 5%{?dist} Summary: Small Device C Compiler Group: Applications/Engineering License: GPLv2+ @@ -10,6 +10,7 @@ Source1: README.fedora Patch0: sdcc-2.9.0-patch-out-getline.diff Patch1: sdcc-2.9.0-configure.diff Patch2: sdcc-2.9.0-r5476-fix-doublefree.diff +Patch3: sdcc-2.9.0-r5508-fix-bug2805333.diff BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: autoconf @@ -56,6 +57,7 @@ Emacs extensions for SDCC. %patch0 -p1 %patch1 -p1 %patch2 -p2 +%patch3 -p1 find -name '*.[ch]' -exec chmod -x '{}' \; # Extract %%__os_install_post into os_install_post~ @@ -110,6 +112,10 @@ chmod 755 %{name}-$(basename $x) done popd +pushd $RPM_BUILD_ROOT%{_datadir}/%{name}/lib/src/pic16 +find . -type f -name '*.a' -exec chmod 664 '{}' \; +popd + %clean rm -rf $RPM_BUILD_ROOT @@ -135,6 +141,14 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Sep 11 2009 Conrad Meyer - 2.9.0-5 +- Fix a bug with single-bit types, logical NOT, and casting to char + (I'm fuzzy on the details) that was reported by a Fedora user with the + r5508 patch from upstream. + +* Sun Jul 26 2009 Fedora Release Engineering - 2.9.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + * Mon Jul 20 2009 Conrad Meyer - 2.9.0-3 - Fix double-free (rhbz# 509278) with patch from upstream.