diff --git a/.gitignore b/.gitignore
index 5375c50..2f3dd58 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,4 @@
/sdcc-src-3.7.0.tar.bz2
/sdcc-src-3.8.0.tar.bz2
/sdcc-src-4.0.0.tar.bz2
+/sdcc-src-4.1.0.tar.bz2
diff --git a/sdcc-4.0.0-bufover.patch b/sdcc-4.0.0-bufover.patch
deleted file mode 100644
index 73319bf..0000000
--- a/sdcc-4.0.0-bufover.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/src/SDCCast.c b/src/SDCCast.c
-index edf6906..1197c45 100644
---- a/src/SDCCast.c
-+++ b/src/SDCCast.c
-@@ -6960,9 +6960,9 @@ fixupInlineLabel (symbol * sym)
- {
- struct dbuf_s dbuf;
-
-- dbuf_init (&dbuf, 128);
-+ dbuf_init (&dbuf, SDCC_SYMNAME_MAX+1);
- dbuf_printf (&dbuf, "%s_%d", sym->name, inlineState.count);
-- strncpyz (sym->name, dbuf_c_str (&dbuf), SDCC_NAME_MAX);
-+ strncpyz (sym->name, dbuf_c_str (&dbuf), SDCC_SYMNAME_MAX);
- dbuf_destroy (&dbuf);
- }
-
diff --git a/sdcc-4.0.0-doc.patch b/sdcc-4.0.0-doc.patch
deleted file mode 100644
index 76c30ae..0000000
--- a/sdcc-4.0.0-doc.patch
+++ /dev/null
@@ -1,152 +0,0 @@
-diff --git a/Makefile.common.in b/Makefile.common.in
-index 412fd5a..04544fa 100644
---- a/Makefile.common.in
-+++ b/Makefile.common.in
-@@ -10,7 +10,7 @@ VERSIONLO = @VERSIONLO@
- VERSIONP = @VERSIONP@
-
- # Programs
--SHELL = /bin/sh
-+SHELL = /usr/bin/sh
- CC = @CCACHE@ @CC@
- CPP = @CCACHE@ @CPP@
- CXX = @CCACHE@ @CXX@
-diff --git a/doc/MCS51_named.svg b/doc/MCS51_named.svg
-index f4d3a96..8de83a5 100644
---- a/doc/MCS51_named.svg
-+++ b/doc/MCS51_named.svg
-@@ -114,7 +114,7 @@
- y="126.62963" />
-
- __data
- __xdata
- __pdata
-
- 128B
- 256B
- 256B
- 64KB
- $(dir $@)$(notdir $<)
-- cp $(MANUAL).aux $(dir $@)
-+ cp $(MANUAL).aux sdcc_version.tex MCS51_named.eps $(dir $@)
- -cd $(dir $@); $(LATEX2HTML) -split 5 -show_section_numbers -local_icons -info "" -nosubdir $(MANUAL) $(QUIET)
-- rm -f $(dir $@)WARNINGS $(dir $@)labels.pl $(dir $@)$(notdir $<) $(dir $@)$*.aux
--
--%.html/index.html: %.tex %.aux
-- mkdir -p $(dir $@)
-- @# fixes $(LATEX2HTML) problems with two consecutive dashes for long-options: --stack-auto
-- @# fixes $(LATEX2HTML) problems with \tabularnewline
-- sed -e 's,-\\/-,-\\/-\\/-,g' \
-- -e 's,\\tabularnewline$$,\\\\,g' < $< > $(dir $@)$(notdir $<)
-- cp $*.aux $(dir $@)
-- -cd $(dir $@); $(LATEX2HTML) -split 0 -local_icons -info "" -nosubdir $* $(QUIET)
-- rm -f $(dir $@)WARNINGS $(dir $@)labels.pl $(dir $@)$(notdir $<) $(dir $@)$*.aux
-+ rm -f $(dir $@)WARNINGS $(dir $@)labels.pl $(dir $@)$(notdir $<) $(dir $@)$*.aux $(dir $@)sdcc_version.* $(dir $@)MCS51_named.*
-
- %.txt: %.lyx
- @# $(LYX) will export the file in the directory of the $(LYX) file
-diff --git a/doc/sdccman.lyx b/doc/sdccman.lyx
-index d18a509..f724004 100644
---- a/doc/sdccman.lyx
-+++ b/doc/sdccman.lyx
-@@ -19143,6 +19143,7 @@ SDCC supports the following MCS51-specific intrinsic address spaces:
- \begin_layout Standard
- \begin_inset Graphics
- filename MCS51_named.svg
-+ BoundingBox 0bp 0bp 337bp 120bp
-
- \end_inset
-
diff --git a/sdcc-4.0.0-lyx-preferences b/sdcc-4.0.0-lyx-preferences
deleted file mode 100644
index 6858c6e..0000000
--- a/sdcc-4.0.0-lyx-preferences
+++ /dev/null
@@ -1,81 +0,0 @@
-# LyX 2.3.4.2 generated this file. If you want to make your own
-# modifications you should do them from inside LyX and save.
-
-Format 24
-
-
-#
-# MISC SECTION ######################################
-#
-
-
-#
-# SCREEN & FONTS SECTION ############################
-#
-
-
-#
-# COLOR SECTION ###################################
-#
-
-
-#
-# PRINTER SECTION ###################################
-#
-
-
-#
-# TEX SECTION #######################################
-#
-
-
-#
-# FILE SECTION ######################################
-#
-
-
-#
-# PLAIN TEXT EXPORT SECTION ##############################
-#
-
-
-#
-# SPELLCHECKER SECTION ##############################
-#
-
-
-#
-# LANGUAGE SUPPORT SECTION ##########################
-#
-
-
-#
-# 2nd MISC SUPPORT SECTION ##########################
-#
-
-
-#
-# FORMATS SECTION ##########################
-#
-
-
-#
-# CONVERTERS SECTION ##########################
-#
-
-\converter svg pstex "inkscape $$i --export-area-drawing -export-latex -o $$o" ""
-\converter svg pdftex "inkscape $$i --export-area-drawing -export-latex -o $$o" ""
-\converter emf eps "inkscape $$i --export-area-drawing -o $$o" ""
-\converter wmf pdf6 "inkscape $$i --export-area-drawing -o $$o" ""
-\converter emf pdf6 "inkscape $$i --export-area-drawing -o $$o" ""
-\converter svg pdf6 "inkscape $$i --export-area-drawing -o $$o" ""
-\converter svgz pdf6 "inkscape $$i --export-area-drawing -o $$o" ""
-\converter svg eps "inkscape $$i --export-area-drawing -o $$o" ""
-\converter svgz eps "inkscape $$i --export-area-drawing -o $$o" ""
-\converter svg png "inkscape $$i -o $$o" ""
-\converter svgz png "inkscape $$i -o $$o" ""
-
-#
-# COPIERS SECTION ##########################
-#
-
diff --git a/sdcc-4.0.0-pic16.patch b/sdcc-4.0.0-pic16.patch
deleted file mode 100644
index b1f9411..0000000
--- a/sdcc-4.0.0-pic16.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-diff --git a/device/lib/pic16/libc/stdlib/g_ftoa.S b/device/lib/pic16/libc/stdlib/g_ftoa.S
-index 1a11c45..9c8cc1c 100644
---- a/device/lib/pic16/libc/stdlib/g_ftoa.S
-+++ b/device/lib/pic16/libc/stdlib/g_ftoa.S
-@@ -52,9 +52,11 @@
- include
- list
-
-+ extern cvt_dec_word
-+ global _g_ftoa
-+
- udata
-
-- extern digits
-
- exp: res 1
- man: res 4
-@@ -66,8 +68,6 @@ ctr: res 1
-
- code
-
-- extern cvt_dec_word
-- global _g_ftoa
-
- _g_ftoa: movff FSR2H,POSTDEC1
- movff FSR2L,POSTDEC1
-diff --git a/device/lib/pic16/libc/utils/cvtdec.S b/device/lib/pic16/libc/utils/cvtdec.S
-index 0e6fa42..30b9ab7 100644
---- a/device/lib/pic16/libc/utils/cvtdec.S
-+++ b/device/lib/pic16/libc/utils/cvtdec.S
-@@ -66,6 +66,9 @@
- include
- list
-
-+
-+ global cvt_dec_word
-+
- udata
-
- global digits
-@@ -74,7 +77,6 @@ digits: res 6
-
- code
-
-- global cvt_dec_word
-
- ;--
- ;
diff --git a/sdcc-4.0.0-python3.patch b/sdcc-4.0.0-python3.patch
deleted file mode 100644
index 9d7a3db..0000000
--- a/sdcc-4.0.0-python3.patch
+++ /dev/null
@@ -1,10 +0,0 @@
-diff --git a/support/scripts/as2gbmap.py b/support/scripts/as2gbmap.py
-index 2ab5cde..193c878 100644
---- a/support/scripts/as2gbmap.py
-+++ b/support/scripts/as2gbmap.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-
- # as2gbmap - asxxxx to gb map file converter
- #
diff --git a/sdcc-4.1.0-lyx-preferences b/sdcc-4.1.0-lyx-preferences
new file mode 100644
index 0000000..6858c6e
--- /dev/null
+++ b/sdcc-4.1.0-lyx-preferences
@@ -0,0 +1,81 @@
+# LyX 2.3.4.2 generated this file. If you want to make your own
+# modifications you should do them from inside LyX and save.
+
+Format 24
+
+
+#
+# MISC SECTION ######################################
+#
+
+
+#
+# SCREEN & FONTS SECTION ############################
+#
+
+
+#
+# COLOR SECTION ###################################
+#
+
+
+#
+# PRINTER SECTION ###################################
+#
+
+
+#
+# TEX SECTION #######################################
+#
+
+
+#
+# FILE SECTION ######################################
+#
+
+
+#
+# PLAIN TEXT EXPORT SECTION ##############################
+#
+
+
+#
+# SPELLCHECKER SECTION ##############################
+#
+
+
+#
+# LANGUAGE SUPPORT SECTION ##########################
+#
+
+
+#
+# 2nd MISC SUPPORT SECTION ##########################
+#
+
+
+#
+# FORMATS SECTION ##########################
+#
+
+
+#
+# CONVERTERS SECTION ##########################
+#
+
+\converter svg pstex "inkscape $$i --export-area-drawing -export-latex -o $$o" ""
+\converter svg pdftex "inkscape $$i --export-area-drawing -export-latex -o $$o" ""
+\converter emf eps "inkscape $$i --export-area-drawing -o $$o" ""
+\converter wmf pdf6 "inkscape $$i --export-area-drawing -o $$o" ""
+\converter emf pdf6 "inkscape $$i --export-area-drawing -o $$o" ""
+\converter svg pdf6 "inkscape $$i --export-area-drawing -o $$o" ""
+\converter svgz pdf6 "inkscape $$i --export-area-drawing -o $$o" ""
+\converter svg eps "inkscape $$i --export-area-drawing -o $$o" ""
+\converter svgz eps "inkscape $$i --export-area-drawing -o $$o" ""
+\converter svg png "inkscape $$i -o $$o" ""
+\converter svgz png "inkscape $$i -o $$o" ""
+
+#
+# COPIERS SECTION ##########################
+#
+
diff --git a/sdcc-4.1.0-python3.patch b/sdcc-4.1.0-python3.patch
new file mode 100644
index 0000000..9d7a3db
--- /dev/null
+++ b/sdcc-4.1.0-python3.patch
@@ -0,0 +1,10 @@
+diff --git a/support/scripts/as2gbmap.py b/support/scripts/as2gbmap.py
+index 2ab5cde..193c878 100644
+--- a/support/scripts/as2gbmap.py
++++ b/support/scripts/as2gbmap.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ # as2gbmap - asxxxx to gb map file converter
+ #
diff --git a/sdcc.spec b/sdcc.spec
index 248d195..3797a16 100644
--- a/sdcc.spec
+++ b/sdcc.spec
@@ -1,16 +1,13 @@
Name: sdcc
-Version: 4.0.0
-Release: 5%{?dist}
+Version: 4.1.0
+Release: 1%{?dist}
Summary: Small Device C Compiler
License: GPLv2+
URL: http://sdcc.sourceforge.net/
Source0: http://downloads.sourceforge.net/sdcc/sdcc-src-%{version}.tar.bz2
Source1: README.fedora
Source2: sdcc-%{version}-lyx-preferences
-Patch1: sdcc-%{version}-doc.patch
-Patch2: sdcc-%{version}-python3.patch
-Patch3: sdcc-%{version}-pic16.patch
-Patch4: sdcc-%{version}-bufover.patch
+Patch1: sdcc-%{version}-python3.patch
BuildRequires: make
BuildRequires: bison, gcc-c++, automake, libtool
@@ -46,13 +43,10 @@ This package includes the sources for the C library, and is only necessary
if you want to modify the C library or as reference of how it works.
%prep
-%setup -q -n sdcc-%{version}
-#%setup -q -n sdcc
+#%setup -q -n sdcc-%{version}
+%setup -q -n sdcc
find -name '*.{c,h,cc}' -a -perm -a=x -exec chmod -a=x '{}' \;
%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
# Disable brp-strip-static-archive for now because it errors trying to
# strip foreign binaries.
echo '%{__os_install_post}'
@@ -116,6 +110,9 @@ popd
%changelog
+* Wed Jun 30 2021 Roy Rankin - 4.1.0-1
+- Upstream release
+
* Wed Jan 27 2021 Fedora Release Engineering - 4.0.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
diff --git a/sources b/sources
index 0bc13d4..1818670 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (sdcc-src-4.0.0.tar.bz2) = 41a92711a9278261879caec1a01425104b7c75346b3c6ad9617cab025309c9b38f79eea2d04122f5ae6ce273fcd61fbde8a0d23756313a4593394230b51a1d4c
+SHA512 (sdcc-src-4.1.0.tar.bz2) = a9c3fee427cbc66b56a286c8d66b2922f79c9dfb42d2ed2843b2e192a6b314a04de4c82f1083d8625b49756b5f1d99f8fb706402b5f1284110760ec346303779