[simulavr] Backport upstream fixes, semiauto patch integration
Hans Ulrich Niedermann
ndim at fedoraproject.org
Tue Aug 7 08:12:05 UTC 2012
commit 8d6a2e6b302bb94104ec34ef83981a5abe5fbbd2
Author: Hans Ulrich Niedermann <hun at n-dimensional.de>
Date: Tue Jul 24 23:07:03 2012 +0200
Backport upstream fixes, semiauto patch integration
get-patches.sh | 95 ++++++++++++
simulavr-0001-emergency-build-fixes.patch | 53 +++++++
...eck-script-add-config-value-for-msys-and-.patch | 52 ++++++
...G-2.0.x-but-SWIG-1.3.x-as-fallback-update.patch | 163 ++++++++++++++++++++
...-error-__builtin_avr_delay_cycles-expects.patch | 34 ++++
simulavr-0005-Removed-debugging-message.patch | 27 ++++
simulavr.spec | 49 +++++-
7 files changed, 467 insertions(+), 6 deletions(-)
---
diff --git a/get-patches.sh b/get-patches.sh
new file mode 100755
index 0000000..0ee3337
--- /dev/null
+++ b/get-patches.sh
@@ -0,0 +1,95 @@
+#!/bin/bash
+# Usage:
+# ./get-patches.sh /path/to/${name} ${NAME}_R14B02 fedora-R14B02
+#
+# get-patches.sh - update ${name}.spec and ${name}-00*.patch files
+#
+# get-patches.sh updates the %{name}.spec and ${name}-00*.patch files
+# in the git index. After a get-patches.sh run, you will need to
+# review the stage git changes, possibly adapt the Release: and
+# %changelog parts of ${name}.spec, and can then "git commit"
+# everything.
+#
+# Caution: Leave the four special comment lines untouched in the
+# spec file, as get-patches.sh requires them and will only
+# touch ${name}.spec between the respective start/end pair:
+#
+# # start of autogenerated patch tag list
+# # end of autogenerated patch tag list
+# # start of autogenerated prep patch list
+# # end of autogenerated prep patch list
+#
+# The following special comment lines in the git commit messages
+# will be interpreted:
+#
+# Fedora-Spec-Comment: This patch only applies to EL6 builds
+# Fedora-Spec-Before: %if 0%?el6}
+# Fedora-Spec-After: %endif
+#
+# If there is no "Fedora-Spec-Comment:" line, we will use a default
+# comment.
+
+# Global constants
+name="simulavr"
+
+# Command line parsing
+source_dir="${1:?'Fatal: ${name} git repo dir required'}"
+source_upstream="${2:?'Fatal: git ref to upstream release required'}"
+source_fedora="${3:?'Fatal: git ref to branch with fedora patches required'}"
+
+# Setup
+set -e
+# set -x
+tmpdir="$(mktemp -d --tmpdir="$PWD")"
+
+# Generate patch files
+pushd "$source_dir"
+git format-patch -N -o "$tmpdir" "${source_upstream}..${source_fedora}" > "$tmpdir/patch-list.txt"
+popd
+
+test -s "$tmpdir/patch-list.txt"
+
+# Process patch files
+echo "# start of autogenerated patch tag list" > "$tmpdir/patch-list-tags.txt"
+echo "# start of autogenerated prep patch list" > "$tmpdir/patch-list-prep.txt"
+n=1
+while read patch
+do
+ srcpatch="$(dirname "$patch")/${name}-$(basename "$patch")"
+ ${SED-sed} -e '1d' -e '/^-- $/,$d' "$patch" > "$srcpatch"
+ rm -f "$patch"
+ comment="$(sed -n 's/^Fedora-Spec-Comment:\s*//p' "$srcpatch")"
+ if test "x$comment" = "x"; then comment="Unspecified patch, possibly upstream fixes or Fedora specific"; fi
+ echo "# ${comment}" >> "$tmpdir/patch-list-tags.txt"
+ echo "# $(sed -n 's/^Subject: \[PATCH\] //p' "$srcpatch")" >> "$tmpdir/patch-list-tags.txt"
+ echo "Patch$n: $(basename "$srcpatch")" >> "$tmpdir/patch-list-tags.txt"
+ base="$(basename "$patch" ".patch" | sed 's/^00[0-9][0-9]-//')"
+ backupext=".$(echo -n "$base" | tr -c -s '[:alnum:]' '_')"
+ sed -n 's/^Fedora-Spec-Before:\s*//p' "$srcpatch" >> "$tmpdir/patch-list-prep.txt"
+ echo "%patch$n -p1 -b ${backupext}" >> "$tmpdir/patch-list-prep.txt"
+ sed -n 's/^Fedora-Spec-After:\s*//p' "$srcpatch" >> "$tmpdir/patch-list-prep.txt"
+ n=$(($n + 1))
+done < "$tmpdir/patch-list.txt"
+echo "# end of autogenerated patch tag list" >> "$tmpdir/patch-list-tags.txt"
+echo "# end of autogenerated prep patch list" >> "$tmpdir/patch-list-prep.txt"
+
+# Create updated spec file
+specfile="${name}.spec"
+newspec1="${tmpdir}/${specfile}.new1"
+newspec2="${tmpdir}/${specfile}.new2"
+sed '/^# start of autogenerated patch tag list$/,$d' "$specfile" > "$newspec1"
+cat "$tmpdir/patch-list-tags.txt" >> "$newspec1"
+sed '1,/^# end of autogenerated patch tag list/d' "$specfile" >> "$newspec1"
+sed '/^# start of autogenerated prep patch list$/,$d' "$newspec1" > "$newspec2"
+cat "$tmpdir/patch-list-prep.txt" >> "$newspec2"
+sed '1,/^# end of autogenerated prep patch list/d' "$newspec1" >> "$newspec2"
+
+# Actually put all changes into git index
+git rm -f ${name}-00*.patch
+mv "$tmpdir/${name}-00"*.patch .
+git add ${name}-00*.patch
+mv -f "$newspec2" "$specfile"
+git add "$specfile"
+
+rm -rf "$tmpdir"
+# End of file.
diff --git a/simulavr-0001-emergency-build-fixes.patch b/simulavr-0001-emergency-build-fixes.patch
new file mode 100644
index 0000000..fe680e0
--- /dev/null
+++ b/simulavr-0001-emergency-build-fixes.patch
@@ -0,0 +1,53 @@
+From: Hans Ulrich Niedermann <hun at n-dimensional.de>
+Date: Tue, 24 Jul 2012 22:04:45 +0200
+Subject: [PATCH] emergency build fixes
+
+---
+ doc/version.texi | 8 ++++----
+ src/Makefile.am | 12 ++++++------
+ 2 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/doc/version.texi b/doc/version.texi
+index 7763625..75f5a6f 100644
+--- a/doc/version.texi
++++ b/doc/version.texi
+@@ -1,4 +1,4 @@
+- at set UPDATED 23 March 2009
+- at set UPDATED-MONTH March 2009
+- at set EDITION 0.9cvs
+- at set VERSION 0.9cvs
++ at set UPDATED 23 July 2012
++ at set UPDATED-MONTH July 2012
++ at set EDITION 1.0.0
++ at set VERSION 1.0.0
+diff --git a/src/Makefile.am b/src/Makefile.am
+index cffc2cd..794a2e1 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -13,7 +13,7 @@ AM_CXXFLAGS=-I$(AVR_LIBBFD_INC)
+ CXXFLAGS=-g -O2 -Icmd -Iui -Ihwtimer
+
+ bin_PROGRAMS = simulavr
+- at MAINT@ noinst_PROGRAMS = kbdgentables
++noinst_PROGRAMS = kbdgentables
+
+ lib_LTLIBRARIES =
+ noinst_LTLIBRARIES =
+@@ -139,12 +139,12 @@ simulavr_wrap.lo: simulavr_wrap.cxx
+
+ $(srcdir)/ui/keyboard.cpp: $(srcdir)/ui/keytrans.h
+
+- at MAINT@ kbdgentables_SOURCES = ui/kbdgentables.cpp
++kbdgentables_SOURCES = ui/kbdgentables.cpp
+
+- at MAINT@ $(srcdir)/ui/keytrans.h: $(builddir)/kbdgentables \
+- at MAINT@ $(srcdir)/ui/keynumber_to_scancode.dat \
+- at MAINT@ $(srcdir)/ui/xcode_to_keynumber.dat
+- at MAINT@ $(builddir)/kbdgentables $(srcdir)/ui
++$(srcdir)/ui/keytrans.h: $(builddir)/kbdgentables \
++ $(srcdir)/ui/keynumber_to_scancode.dat \
++ $(srcdir)/ui/xcode_to_keynumber.dat
++ $(builddir)/kbdgentables $(srcdir)/ui
+
+ EXTRA_DIST = simulavr.i python/pysimulavr.i python/README
+
diff --git a/simulavr-0002-delivery-check-script-add-config-value-for-msys-and-.patch b/simulavr-0002-delivery-check-script-add-config-value-for-msys-and-.patch
new file mode 100644
index 0000000..b2ef9b0
--- /dev/null
+++ b/simulavr-0002-delivery-check-script-add-config-value-for-msys-and-.patch
@@ -0,0 +1,52 @@
+From: Thomas K <tomk at sce-gbr.de>
+Date: Sun, 26 Feb 2012 20:58:14 +0100
+Subject: [PATCH] delivery-check script: add config value for msys and
+ possibility to change max count for option "-s"
+
+---
+ delivery-check | 9 ++++++++-
+ delivery-check.conf.sample | 6 ++++++
+ 2 files changed, 14 insertions(+), 1 deletions(-)
+
+diff --git a/delivery-check b/delivery-check
+index 33d1f35..d984748 100755
+--- a/delivery-check
++++ b/delivery-check
+@@ -14,6 +14,9 @@ if [ ! -f "delivery-check.conf" ]; then
+ fi
+ source delivery-check.conf
+ SHOW_COMMIT_MAX=20
++if [ ! -z "$CONF_SHOW_COMMIT_MAX" ]; then
++ SHOW_COMMIT_MAX=$CONF_SHOW_COMMIT_MAX
++fi
+
+ function printHelp() {
+ cat <<EOD
+@@ -106,7 +109,11 @@ function runConfCmd() {
+ if [ "$OPT_VERILOG" = "y" -a "$CONF_WITH_VERILOG" = "y" ]; then
+ C="$C --enable-verilog"
+ fi
+- $C
++ if [ ! -z "$CONF_PYTHON_LDFLAGS" ]; then
++ $C PYTHON_LDFLAGS='$CONF_PYTHON_LDFLAGS'
++ else
++ $C
++ fi
+ if [ ! $? = 0 ]; then
+ error "run 'configure' failed" 4
+ fi
+diff --git a/delivery-check.conf.sample b/delivery-check.conf.sample
+index db4e6c5..15abc63 100644
+--- a/delivery-check.conf.sample
++++ b/delivery-check.conf.sample
+@@ -23,4 +23,10 @@ CONF_TCL_CONFIG=/usr/lib/tcl8.5
+ # CONF_WITH_VERILOG: configure simulavr build with verilog to create verilog lib too, set to "y" to enable
+ CONF_WITH_VERILOG=n
+
++# CONF_SHOW_COMMIT_MAX: max count for option "-s", default is 20, but values to 999 are allowed
++CONF_SHOW_COMMIT_MAX=20
++
++# CONF_PYTHON_LDFLAGS: flags for linking python interface, especially necessary for building on msys
++#CONF_PYTHON_LDFLAGS='-Lc:/data/mybin/python2.6/libs -lpython26'
++
+ # EOF
diff --git a/simulavr-0003-support-SWIG-2.0.x-but-SWIG-1.3.x-as-fallback-update.patch b/simulavr-0003-support-SWIG-2.0.x-but-SWIG-1.3.x-as-fallback-update.patch
new file mode 100644
index 0000000..e560b3a
--- /dev/null
+++ b/simulavr-0003-support-SWIG-2.0.x-but-SWIG-1.3.x-as-fallback-update.patch
@@ -0,0 +1,163 @@
+From: Thomas K <tomk at sce-gbr.de>
+Date: Tue, 28 Feb 2012 06:52:55 +0100
+Subject: [PATCH] support SWIG 2.0.x (but SWIG 1.3.x as fallback), update
+ documentation
+
+---
+ configure.ac | 9 ++++++++-
+ delivery-check | 8 +++++---
+ delivery-check.conf.sample | 3 +++
+ doc/build.rst | 20 ++++++++++++++++++--
+ src/Makefile.am | 11 ++++++-----
+ 5 files changed, 40 insertions(+), 11 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0a490fc..c4d668e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -27,7 +27,12 @@ fi
+ LT_INIT
+ LT_PREREQ([2.2])
+ AC_PROG_CXX
+-AC_PROG_SWIG(1.3.18)
++AC_PROG_SWIG(2.0.0)
++if test "x$SWIG_LIB" = "x"; then
++ # fall back to SWIG version 1.3.x in case of SWIG 2.0.x not found!
++ AC_MSG_NOTICE([Don't worry, we can try to find SWIG 1.3.x!])
++ AC_PROG_SWIG(1.3.18)
++fi
+ SWIG_ENABLE_CXX
+ SWIG_MULTI_MODULE_SUPPORT
+ AM_CONDITIONAL([USE_SWIG],[test "x$SWIG" != 'x'])
+@@ -64,6 +69,8 @@ if test "$ac_sys_check_uname_o" = "Msys"; then
+ AVR_CHECK_WINSOCK
+ # libtool links to libz by default, but on MSYS/MingW this is on other place
+ AVR_CHECK_ZLIB_MSYS
++ # add extra libs setting, if set on commandline, but only on msys
++ AC_SUBST([EXTRA_LIBS])
+ fi
+
+ ## Check for the XML files in src/fab/atmel-xml. This just checks for the
+diff --git a/delivery-check b/delivery-check
+index d984748..4370104 100755
+--- a/delivery-check
++++ b/delivery-check
+@@ -110,10 +110,12 @@ function runConfCmd() {
+ C="$C --enable-verilog"
+ fi
+ if [ ! -z "$CONF_PYTHON_LDFLAGS" ]; then
+- $C PYTHON_LDFLAGS='$CONF_PYTHON_LDFLAGS'
+- else
+- $C
++ PARAM_PYTHON_LDFLAGS="PYTHON_LDFLAGS=\"$CONF_PYTHON_LDFLAGS\""
++ fi
++ if [ ! -z "$CONF_EXTRA_LIBS" ]; then
++ PARAM_EXTRA_LIBS="EXTRA_LIBS=\"$CONF_EXTRA_LIBS\""
+ fi
++ $C $PARAM_PYTHON_LDFLAGS $PARAM_EXTRA_LIBS
+ if [ ! $? = 0 ]; then
+ error "run 'configure' failed" 4
+ fi
+diff --git a/delivery-check.conf.sample b/delivery-check.conf.sample
+index 15abc63..d76fd9e 100644
+--- a/delivery-check.conf.sample
++++ b/delivery-check.conf.sample
+@@ -29,4 +29,7 @@ CONF_SHOW_COMMIT_MAX=20
+ # CONF_PYTHON_LDFLAGS: flags for linking python interface, especially necessary for building on msys
+ #CONF_PYTHON_LDFLAGS='-Lc:/data/mybin/python2.6/libs -lpython26'
+
++# CONF_EXTRA_LIBS: only used for building on msys, if libintl or such is needed for linking
++#CONF_EXTRA_LIBS='-L/mingw/lib -lintl'
++
+ # EOF
+diff --git a/doc/build.rst b/doc/build.rst
+index 00afba4..3c43ce9 100644
+--- a/doc/build.rst
++++ b/doc/build.rst
+@@ -77,13 +77,24 @@ configure and run make:
+ - automake (version >= 1.10, known to work with 1.11.1, ubuntu 10.04)
+ - libtool (version >= 2.2, known to work with 2.2.6b, ubuntu 10.04)
+ - SWIG (version >= 1.3.18, known to work with 1.3.40, ubuntu 10.04), needed if you want to
+- create tcl or python extensions or to run examples
++ create tcl or python extensions or to run examples, **attention:** SWIG 1.3.x, not SWIG 2.0.x,
++ see below!
+ - gcc (version known to work with 4.4.3, ubuntu 10.04)
+ - avr-gcc, avr-binutils, avr-libc (works with 4.3.4, 2.20, 1.6.7, ubuntu 10.04) for creating
+ avr programs for examples
+ - tcl and tk, needed, if you want to create tcl interface
+ - python (version >= 2.4.0, known to work with 2.6.5, ubuntu 10.04), needed if you want to
+- create python interface, run examples and/or ``make check``
++ create python interface, run examples and/or ``make check``, **attention:** not python 3.x,
++ see below!
++
++**Attention:**
++
++- On simulavr 1.0 build does run only with SWIG 1.3.x (last version is 1.3.40), SWIG 2.0.x
++ is supported with upcoming version 1.1. If you want to use SWIG 2.0.x with simulavr 1.0, then
++ you have to replace the line 30 "AC_PROG_SWIG(1.3.18)" in file configure.ac with
++ "AC_PROG_SWIG(2.0.0)". Then run ``./bootstrap``, ``./configure ...`` and ``make`` again.
++- Python 3 isn't supported yet. Use python 2.x, last 2.x version is 2.7.2. Will be changed
++ in next versions!
+
+ Configure options
+ -----------------
+@@ -216,4 +227,9 @@ How to build simulavr on MingW/Windows
+ to the right name from **your** installation, for python 2.6.x it is for example
+ ``python26`` Don't use configure option ``--enable-python=X:/PYPATH/python``,
+ because there is a bug in m4 scripts.
++* If you get a linker error, which reports, that symbols like ``libintl_...`` are not
++ found, then you have to install at first libintl-...-dev package. (part of gettext
++ packages!) Then run configure again with ``EXTRA_LIBS='-L/mingw/lib -lintl'``, where the
++ path ``/mingw/lib`` is the path to ``libintl.a``. This is only necessary, if this linker
++ error's are shown. (depending on what version of gettext you've used)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 794a2e1..614d89b 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -36,7 +36,7 @@ nodist_lib_pysimulavr_la_SOURCES=pysimulavr_wrap.cpp
+ lib_pysimulavr_la_CPPFLAGS=$(PYTHON_CPPFLAGS) $(PYTHON_XTRA_INC)
+ lib_pysimulavr_la_LDFLAGS = -version-info 0:0:0 -rpath ${prefix}/lib
+ lib_pysimulavr_la_LIBADD= libsim.la \
+- -L$(AVR_LIBBFD_LIBPATH) -lbfd -L$(AVR_LIBIBERTY_LIBPATH) -liberty
++ -L$(AVR_LIBBFD_LIBPATH) -lbfd -L$(AVR_LIBIBERTY_LIBPATH) -liberty $(EXTRA_LIBS)
+
+ pysimulavr_wrap.cpp: $(PYTHON_MODUL_INTERFACE)
+ $(SWIG) $(SWIG_PYTHON_OPT) $(PYTHON_XTRA_INC) -o $@ $?
+@@ -45,7 +45,8 @@ $(PYTHON_MODUL_LIB): lib_pysimulavr.la
+ if SYS_MINGW
+ $(CXX) -shared -o $(PYTHON_MODUL_LIB) \
+ $(addprefix .libs/,$(lib_pysimulavr_la_OBJECTS:.lo=.o)) .libs/libsim.a \
+- -lstdc++ -L$(AVR_LIBBFD_LIBPATH) -lbfd -L$(AVR_LIBIBERTY_LIBPATH) -liberty $(PYTHON_LDFLAGS)
++ -lstdc++ -L$(AVR_LIBBFD_LIBPATH) -lbfd -L$(AVR_LIBIBERTY_LIBPATH) -liberty \
++ $(EXTRA_LIBS) $(PYTHON_LDFLAGS)
+ else
+ cp .libs/lib_pysimulavr.so $(PYTHON_MODUL_LIB)
+ endif
+@@ -87,7 +88,7 @@ libsim_la_LDFLAGS = -version-info 0:0:0 -rpath ${prefix}/lib
+ nodist_libsimulavr_la_SOURCES = $(TCL_WRAP_SRC)
+ libsimulavr_la_LDFLAGS = -version-info 0:0:0 -rpath ${prefix}/lib
+ libsimulavr_la_LIBADD = $(libsim_la_OBJECTS) -lz \
+- -L$(AVR_LIBBFD_LIBPATH) -lbfd -L$(AVR_LIBIBERTY_LIBPATH) -liberty
++ -L$(AVR_LIBBFD_LIBPATH) -lbfd -L$(AVR_LIBIBERTY_LIBPATH) -liberty $(EXTRA_LIBS)
+
+ pkginclude_HEADERS = \
+ adcpin.h application.h at4433.h at8515.h atmega128.h atmega16_32.h attiny2313.h \
+@@ -106,7 +107,7 @@ nodist_pkginclude_HEADERS = $(FAB_HEADER)
+ simulavr_SOURCES = cmd/main.cpp cmd/dumpargs.cpp
+ simulavr_LDADD = $(libsim_la_OBJECTS) $(LIBZ_FLAGS) \
+ -L$(AVR_LIBBFD_LIBPATH) -lbfd -L$(AVR_LIBIBERTY_LIBPATH) -liberty \
+- $(LIBWSOCK_FLAGS)
++ $(EXTRA_LIBS) $(LIBWSOCK_FLAGS)
+
+ if USE_VERILOG
+ VPI_LIB=avr.vpi
+@@ -114,7 +115,7 @@ libavrvpi_la_SOURCES = vpi.cpp cmd/dumpargs.cpp
+ libavrvpi_la_DEPENDENCIES = $(libsim_la_OBJECTS)
+ libavrvpi_la_LDFLAGS = -version-info 0:0:0 -rpath ${prefix}/lib
+ libavrvpi_la_LIBADD= $(libsim_la_OBJECTS) $(LIBZ_FLAGS) \
+- -L$(AVR_LIBBFD_LIBPATH) -lbfd -L$(AVR_LIBIBERTY_LIBPATH) -liberty
++ -L$(AVR_LIBBFD_LIBPATH) -lbfd -L$(AVR_LIBIBERTY_LIBPATH) -liberty $(EXTRA_LIBS)
+ libavrvpi_la_CXXFLAGS = $(AM_CXXFLAGS)
+
+ $(VPI_LIB): libavrvpi.la
diff --git a/simulavr-0004-Fix-compile-error-__builtin_avr_delay_cycles-expects.patch b/simulavr-0004-Fix-compile-error-__builtin_avr_delay_cycles-expects.patch
new file mode 100644
index 0000000..7103931
--- /dev/null
+++ b/simulavr-0004-Fix-compile-error-__builtin_avr_delay_cycles-expects.patch
@@ -0,0 +1,34 @@
+From: Petr Hluzin <petr.hluzin at gmail.com>
+Date: Thu, 22 Mar 2012 22:46:18 +0100
+Subject: [PATCH] Fix compile error "__builtin_avr_delay_cycles expects an
+ integer constant."
+
+Reported by Foka, patch by Michael Hennebry.
+http://lists.nongnu.org/archive/html/simulavr-devel/2012-03/msg00010.html
+---
+ examples/atmel_key/StdDefs.c | 12 +++++-------
+ 1 files changed, 5 insertions(+), 7 deletions(-)
+
+diff --git a/examples/atmel_key/StdDefs.c b/examples/atmel_key/StdDefs.c
+index 8735b52..738f84c 100644
+--- a/examples/atmel_key/StdDefs.c
++++ b/examples/atmel_key/StdDefs.c
+@@ -55,13 +55,11 @@ void test_pin(void)
+ }
+
+ // Delay in 1/10's of a millisecond
+-void msleep(INT16U ms)
+- { /* This loop does not work with optimization != 0. Therefore we use
+- avr-libc _delay routines K. Schwichtenberg
+- INT16S i,j;
+- for (i = 1; i < ms; i++)
+- for (j = 1; j < ONETENTH_MS; j++); / * to give 1/10 ms*/
+- _delay_ms(ms); // Changed K. Schwichtenberg
++// Does not work with -O0, use -O1, even for debugging.
++void msleep(INT16U ms10)
++ {
++ for( ; ms10; --ms10)
++ _delay_ms(0.1);
+ }
+
+ //------------------------------------------------------------
diff --git a/simulavr-0005-Removed-debugging-message.patch b/simulavr-0005-Removed-debugging-message.patch
new file mode 100644
index 0000000..cfe0720
--- /dev/null
+++ b/simulavr-0005-Removed-debugging-message.patch
@@ -0,0 +1,27 @@
+From: Petr Hluzin <petr.hluzin at gmail.com>
+Date: Thu, 22 Mar 2012 22:59:43 +0100
+Subject: [PATCH] Removed debugging message
+
+Reported by Mathias Kussinger. I used it for debugging simulavr's
+thread switching code, forgot to remove it when committing.
+http://lists.nongnu.org/archive/html/simulavr-devel/2012-03/msg00000.html
+---
+ src/hwstack.cpp | 5 -----
+ 1 files changed, 0 insertions(+), 5 deletions(-)
+
+diff --git a/src/hwstack.cpp b/src/hwstack.cpp
+index 03fe1f1..c28bf17 100644
+--- a/src/hwstack.cpp
++++ b/src/hwstack.cpp
+@@ -269,11 +269,6 @@ void ThreadList::OnCall()
+ for(unsigned int i = 0; i < 32; i++) {
+ old->registers[i] = m_core.GetCoreReg(i);
+ }
+-
+- if(0xc9c <= m_on_call_ip && m_on_call_ip <= 0xca4)
+- fprintf(stderr, "Pripravit se ke startu: proc_switch()\n");
+- if(0x80a <= m_on_call_ip && m_on_call_ip <= 0x810)
+- fprintf(stderr, "Pripravit se ke startu: asm_switch_context()\n");
+ }
+
+ void ThreadList::OnSPRead(int SP_value)
diff --git a/simulavr.spec b/simulavr.spec
index ef9d3a9..1695105 100644
--- a/simulavr.spec
+++ b/simulavr.spec
@@ -15,9 +15,41 @@ Group: Development/Tools
License: GPLv2+
URL: http://savannah.nongnu.org/projects/simulavr/
Source0: http://download.savannah.nongnu.org/releases/simulavr/%{name}-%{version}.tar.gz
-# Allow overriding ENABLE_WARNINGS definition
-#Patch100: 0001-Allow-overriding-ENABLE_WARNINGS.patch
-#Patch200: %{name}-%{version}-reset-LDFLAGS.patch
+
+
+# For the source of the Fedora specific patches, see the respective
+# branch at https://github.com/ndim/simulavr
+#
+# Run something like
+# $ git clone git://git.sv.gnu.org/simulavr.git
+# $ cd simulavr
+# $ git remote add ndim git://github.com/ndim/simulavr.git
+# $ git fetch -v --all
+# to get yourself a copy of the simulavr source code with the
+# Fedora specific patches by Hans Ulrich Niedermann.
+# Then run something like
+# $ ./get-patches.sh /path/to/simulavr.git release-1.0.0 ndim/fedora-1.0.0
+# for some semi-automatic patch update assistance.
+#
+# start of autogenerated patch tag list
+# Unspecified patch, possibly upstream fixes or Fedora specific
+# emergency build fixes
+Patch1: simulavr-0001-emergency-build-fixes.patch
+# Unspecified patch, possibly upstream fixes or Fedora specific
+# delivery-check script: add config value for msys and
+Patch2: simulavr-0002-delivery-check-script-add-config-value-for-msys-and-.patch
+# Unspecified patch, possibly upstream fixes or Fedora specific
+# support SWIG 2.0.x (but SWIG 1.3.x as fallback), update
+Patch3: simulavr-0003-support-SWIG-2.0.x-but-SWIG-1.3.x-as-fallback-update.patch
+# Unspecified patch, possibly upstream fixes or Fedora specific
+# Fix compile error "__builtin_avr_delay_cycles expects an
+Patch4: simulavr-0004-Fix-compile-error-__builtin_avr_delay_cycles-expects.patch
+# Unspecified patch, possibly upstream fixes or Fedora specific
+# Removed debugging message
+Patch5: simulavr-0005-Removed-debugging-message.patch
+# end of autogenerated patch tag list
+
+
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: automake >= 1.11
@@ -56,9 +88,14 @@ This subpackage contains the documentation in HTML and PDF format.
%prep
%setup -q
-#patch100 -p1 -b .override-enable-warnings
-#patch200 -p1 -b .reset-LDFLAGS
-#autoreconf -vis .
+# start of autogenerated prep patch list
+%patch1 -p1 -b .emergency_build_fixes
+%patch2 -p1 -b .delivery_check_script_add_config_value_for_msys_and_
+%patch3 -p1 -b .support_SWIG_2_0_x_but_SWIG_1_3_x_as_fallback_update
+%patch4 -p1 -b .Fix_compile_error_builtin_avr_delay_cycles_expects
+%patch5 -p1 -b .Removed_debugging_message
+# end of autogenerated prep patch list
+autoreconf -vis .
%build
More information about the scm-commits
mailing list