summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEkaitz Zarraga <ekaitz@elenq.tech>2022-08-11 22:52:30 +0200
committerEkaitz Zarraga <ekaitz@elenq.tech>2022-08-12 00:33:23 +0200
commit80a5ffad6e6a2e0bb8faab202e101feee9061a06 (patch)
treec1a371862afde2b46a3bce712984204d088a6fdc
parent9b81852097e4a8bfde2c09a28783c6d2c7e1e543 (diff)
WIP: Add some gameboy tooling
-rw-r--r--gb.scm172
-rw-r--r--gba.scm73
-rw-r--r--sdcc-disable-non-free-code.patch3652
-rw-r--r--sdcc-makebin-nogogo-v2-bool.patch163
-rw-r--r--sdcc-non-free.patch147
-rw-r--r--sdcc-sdas_macro_80_char_overflow.patch50
-rw-r--r--sdcc-sdcc_z80_boN_baN.patch50
-rw-r--r--sdcc-sdcc_z80_enable_incbin.patch26
-rw-r--r--sdcc-sdldz80-sms-virtual-address.patch438
9 files changed, 4698 insertions, 73 deletions
diff --git a/gb.scm b/gb.scm
new file mode 100644
index 0000000..2d4ac2b
--- /dev/null
+++ b/gb.scm
@@ -0,0 +1,172 @@
+(define-module (gb)
+ #:use-module (electronics)
+ #:use-module (guix packages)
+ #:use-module (guix gexp)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
+ #:use-module (gnu packages bison)
+ #:use-module (gnu packages boost)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages embedded)
+ #:use-module (gnu packages flex)
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages texinfo)
+ #:use-module (guix git-download)
+ #:use-module (guix svn-download)
+ #:use-module (guix build-system gnu)
+ #:use-module (guix build-system trivial)
+ #:use-module ((guix licenses) #:prefix license:))
+
+
+
+(define-public sdcc-patched-for-gbdk
+ (let ((revision 12539))
+ (package
+ (name "sdcc-patched-for-gbdk")
+ ; It's not that base version, probably 2.96, but IDK how to check that in
+ ; subversion
+ (version (string-append "0.0.1" "-" (number->string revision)))
+ (source (origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url "https://svn.code.sf.net/p/sdcc/code/trunk/sdcc")
+ (revision revision)))
+ (file-name (string-append name "-" version))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Remove non-free source files
+ (delete-file-recursively "device/non-free")
+ ;; Remove bundled μCsim source
+ (delete-file-recursively "sim")
+ #t))
+ (patches
+ (search-patches
+ "sdcc-non-free.patch"
+ "sdcc-makebin-nogogo-v2-bool.patch"
+ "sdcc-sdas_macro_80_char_overflow.patch"
+ "sdcc-sdcc_z80_boN_baN.patch"
+ "sdcc-sdcc_z80_enable_incbin.patch"
+ "sdcc-sdldz80-sms-virtual-address.patch"))
+ (sha256
+ (base32
+ "148zpyxwac8qlbg1pakjmar8h802g6lwjp4qhw6cy77ixlhwgyrg"))))
+ (build-system gnu-build-system)
+ (native-inputs (list bison boost flex zlib python-2 texinfo))
+ (arguments
+ `(#:configure-flags
+ (list "--disable-nonfree" "--disable-pic14-port"
+ "--disable-pic16-port" "--disable-ucsim")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-makefile
+ (lambda _
+ (substitute* (find-files "." "(\\.mk$|\\.in$)")
+ (("/bin/sh") (which "sh")))
+ #t)))))
+ (home-page "http://sdcc.sourceforge.net")
+ (synopsis "Small devices C compiler")
+ (description "Patched SDCC for GameBoy development")
+ (license license:gpl2+))))
+
+;; MAYBE USE THIS INSTEAD?
+;; https://github.com/flozz/gbdk-n/
+;; It needs a really old sdcc, the patched one works.
+;; Maybe we can give it a revival
+;;
+(define-public gbdk-2020
+ ;; This does not build, it fails to generate files...
+ ;; Also the sdcc it uses (see above) is very old. The docs specifically
+ ;; mention this one but it's pretty old. They might be using other one
+ ;; instead.
+ (package
+ (name "gbdk-2020")
+ (version "4.0.5")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/gbdk-2020/gbdk-2020")
+ (commit version)))
+ (sha256
+ (base32 "009361b9b7215s1095q58gdwqc3wwymcr6vknjq218fs0l3nlnjf"))))
+ (native-inputs (list sdcc-patched-for-gbdk))
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'build 'setenv
+ (lambda _ (setenv "SDCCDIR" #$sdcc-patched-for-gbdk))))))
+ (build-system gnu-build-system)
+ (home-page "https://github.com/gbdk-2020/gbdk-2020")
+ (synopsis "blahblah")
+ (description "blablah")
+ (license license:gpl2)))
+
+
+(define-public gba-tools
+ (package
+ (name "gba-tools")
+ (version "1.2.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/devkitPro/gba-tools")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "1rlhyc9dsdxcmaih3x9qjb3ihr2xxz1rw42ijbz2ylymn9p133gh"))))
+ (build-system gnu-build-system)
+ (inputs (list automake autoconf))
+ (synopsis "Collection of tools for Game Boy Advance development")
+ (description "Collection of tools for Game Boy Advance development:
+- gbafix: Pads and patches GBA ROMs.
+- gbalzss: Compresses and uncompresses ROMs.
+- gbfs: Creates a GBFS archive.
+- insgbfs: Inserts a GBFS file (or any other file) into a GBFS_SPACE
+ (identified by symbol name) in a ROM.
+- lsgbfs: Lists objects in a GBFS file.
+- ungbfs: Dumps the objects in a GBFS file to separate files.")
+ (home-page "https://github.com/devkitPro/gba-tools")
+ (license license:gpl3+)))
+
+#;(define-public gba-minrt
+ (package
+ (name "gba-minrt")
+ (version "0.0.0") ; Obtain from commit-id
+ ))
+
+(define-public libseven
+ (package
+ (name "libseven")
+ (version "0.3.5")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/LunarLambda/libseven")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "1jbkghqjjyjjq4rs8ifzlq7zhrcifnis1b8fwiajv8ga2x0s9qr9"))))
+ (arguments
+ (list
+ #:phases
+ `(modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'build 'setenv
+ (lambda* _
+ (setenv "DESTDIR" "output")))
+ (add-after 'install 'correct-output-dir
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (copy-recursively "output/libseven" (assoc-ref outputs "out")))))
+ #:tests? #f))
+ (build-system gnu-build-system)
+ (inputs (list arm-none-eabi-nano-toolchain-7-2018-q2-update))
+ (synopsis "A fully from-scratch library for GBA development, meant to
+replace existing libraries like libgba or libtonc.")
+ (description "Goals:
+ - Intuitive, consistent, and well organized API
+ - Optimized code with minimal RAM and ROM size
+ - Correctness without compromises
+ - High-quality, understandable documentation")
+ (home-page "https://github.com/LunarLambda/libseven")
+ (license license:mpl2.0)))
diff --git a/gba.scm b/gba.scm
deleted file mode 100644
index ee1b222..0000000
--- a/gba.scm
+++ /dev/null
@@ -1,73 +0,0 @@
-(define-module (gba)
- #:use-module (guix packages)
- #:use-module (gnu packages autotools)
- #:use-module (gnu packages embedded)
- #:use-module (guix git-download)
- #:use-module (guix build-system gnu)
- #:use-module (guix build-system trivial)
- #:use-module ((guix licenses) #:prefix license:))
-
-(define-public gba-tools
- (package
- (name "gba-tools")
- (version "1.2.0")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/devkitPro/gba-tools")
- (commit (string-append "v" version))))
- (sha256
- (base32
- "1rlhyc9dsdxcmaih3x9qjb3ihr2xxz1rw42ijbz2ylymn9p133gh"))))
- (build-system gnu-build-system)
- (inputs (list automake autoconf))
- (synopsis "Collection of tools for Game Boy Advance development")
- (description "Collection of tools for Game Boy Advance development:
-- gbafix: Pads and patches GBA ROMs.
-- gbalzss: Compresses and uncompresses ROMs.
-- gbfs: Creates a GBFS archive.
-- insgbfs: Inserts a GBFS file (or any other file) into a GBFS_SPACE
- (identified by symbol name) in a ROM.
-- lsgbfs: Lists objects in a GBFS file.
-- ungbfs: Dumps the objects in a GBFS file to separate files.")
- (home-page "https://github.com/devkitPro/gba-tools")
- (license license:gpl3+)))
-
-(define-public libseven
-; this one fits the best in our process
-; https://github.com/LunarLambda/libseven
- (package
- (name "libseven")
- (version "0.3.5")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/LunarLambda/libseven")
- (commit (string-append "v" version))
- (recursive? #t)))
- (sha256
- (base32
- "13zrjhxcz8d1y46b6c14x50kidsrglfc1lfgikbbc8dmy1z1z0lc"))))
- (arguments
- (list
- #:phases
- `(modify-phases %standard-phases
- (delete 'configure)
- (add-before 'build 'setenv
- (lambda* _
- (setenv "DESTDIR" "output")))
- (add-after 'install 'correct-output-dir
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (copy-recursively "output/libseven" (assoc-ref outputs "out")))))
- #:tests? #f))
- (build-system gnu-build-system)
- (inputs (list arm-none-eabi-nano-toolchain-7-2018-q2-update))
- (synopsis "A fully from-scratch library for GBA development, meant to
-replace existing libraries like libgba or libtonc.")
- (description "Goals:
- - Intuitive, consistent, and well organized API
- - Optimized code with minimal RAM and ROM size
- - Correctness without compromises
- - High-quality, understandable documentation")
- (home-page "https://github.com/LunarLambda/libseven")
- (license license:mpl2.0)))
diff --git a/sdcc-disable-non-free-code.patch b/sdcc-disable-non-free-code.patch
new file mode 100644
index 0000000..1727bdd
--- /dev/null
+++ b/sdcc-disable-non-free-code.patch
@@ -0,0 +1,3652 @@
+This patch disables the use of non-free code distributed with SDCC by
+removing
+
+ - The "--disable-non-free" option to "configure" and the build logic
+ it controls;
+
+ - All references to the "device/non-free" source directory and the
+ corresponding "non-free" installation directory; and
+
+ - The "--use-non-free" and "--no-warn-non-free" compiler options and
+ references to them in build scripts and compiler output.
+
+It also updates SDCC's documentation to reflect these changes and to
+remove instructions that encourage the use of SDCC with non-free
+software.
+
+diff --git a/Makefile.common.in b/Makefile.common.in
+index 1a11f67..69d5efe 100644
+--- a/Makefile.common.in
++++ b/Makefile.common.in
+@@ -73,7 +73,6 @@ OPT_DISABLE_PACKIHX = @OPT_DISABLE_PACKIHX@
+ OPT_DISABLE_SDBINUTILS = @OPT_DISABLE_SDBINUTILS@
+ OPT_DISABLE_SDCPP = @OPT_DISABLE_SDCPP@
+ OPT_DISABLE_UCSIM = @OPT_DISABLE_UCSIM@
+-OPT_DISABLE_NON_FREE = @OPT_DISABLE_NON_FREE@
+
+ SLIB = $(top_builddir)/support/util
+
+diff --git a/Makefile.in b/Makefile.in
+index d899b62..554a1c3 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -105,9 +105,6 @@ endif
+ ifeq ($(OPT_DISABLE_DEVICE_LIB), 0)
+ TARGETS += sdcc-device-lib
+ PKGS += device/lib
+-ifeq ($(OPT_DISABLE_NON_FREE), 0)
+-PKGS += device/non-free/lib
+-endif
+ endif
+
+ ifeq ($(OPT_DISABLE_PACKIHX), 0)
+@@ -128,9 +125,6 @@ endif
+ TARGETS += sdcc-libs sdcc-cc sdcc-device-inc sdcc-as sdcc-ld sdcc-scripts
+
+ PKGS += $(SDCC_LIBS) src device/include
+-ifeq ($(OPT_DISABLE_NON_FREE), 0)
+-PKGS += device/non-free/include
+-endif
+ PKGS += $(SDCC_AS) sdas/linksrc $(SDCC_SCRIPTS)
+
+ PORTS = $(shell cat ports.build)
+@@ -176,21 +170,12 @@ sdcc-sdbinutils:
+
+ sdcc-device-inc:
+ $(MAKE) -C device/include
+-ifeq ($(OPT_DISABLE_NON_FREE), 0)
+- $(MAKE) -C device/non-free/include
+-endif
+
+ sdcc-device-lib: sdcc-cc sdcc-as sdcc-ld $(SDCC_BINUTILS)
+ $(MAKE) -C device/lib
+-ifeq ($(OPT_DISABLE_NON_FREE), 0)
+- $(MAKE) -C device/non-free/lib
+-endif
+
+ sdcc-device-tini:
+ $(MAKE) -C device/include
+-ifeq ($(OPT_DISABLE_NON_FREE), 0)
+- $(MAKE) -C device/non-free/include
+-endif
+ $(MAKE) -C device/lib model-ds390 model-ds400
+
+ # doc depends on latex and latex2html
+diff --git a/configure b/configure
+index 232d98e..3eeb17c 100755
+--- a/configure
++++ b/configure
+@@ -659,7 +659,6 @@ LATEX
+ LATEX2HTML
+ LYX
+ OPT_ENABLE_DOC
+-OPT_DISABLE_NON_FREE
+ OPT_DISABLE_SDBINUTILS
+ OPT_DISABLE_SDCDB
+ OPT_DISABLE_SDCPP
+@@ -690,10 +689,7 @@ OPT_DISABLE_R2K
+ OPT_DISABLE_Z180
+ OPT_DISABLE_Z80
+ OPT_DISABLE_MCS51
+-non_free_lib_dir_suffix
+ lib_dir_suffix
+-non_free_include_dir_suffix
+-non_free_inclib_dir_suffix
+ include_dir_suffix
+ inclib_dir_suffix
+ LIB_TYPE
+@@ -821,7 +817,6 @@ enable_packihx
+ enable_sdcpp
+ enable_sdcdb
+ enable_sdbinutils
+-enable_non_free
+ enable_doc
+ enable_libgc
+ '
+@@ -842,10 +837,7 @@ sdccconf_h_dir_separator
+ LIB_TYPE
+ inclib_dir_suffix
+ include_dir_suffix
+-non_free_inclib_dir_suffix
+-non_free_include_dir_suffix
+ lib_dir_suffix
+-non_free_lib_dir_suffix
+ docdir'
+ ac_subdirs_all='support/cpp
+ support/packihx
+@@ -853,9 +845,7 @@ sim/ucsim
+ debugger/mcs51
+ support/sdbinutils
+ device/lib/pic14
+-device/non-free/lib/pic14
+-device/lib/pic16
+-device/non-free/lib/pic16'
++device/lib/pic16'
+
+ # Initialize some variables set by options.
+ ac_init_help=
+@@ -1509,7 +1499,6 @@ Optional Features:
+ --disable-sdcpp Disables building sdcpp
+ --disable-sdcdb Disables building sdcdb
+ --disable-sdbinutils Disables configuring and building of sdbinutils
+- --disable-non-free Disables non-free runtime library parts
+ --enable-doc Enables building the documentation
+ --enable-libgc Use the Bohem memory allocator. Lower runtime
+ footprint.
+@@ -1538,16 +1527,8 @@ Some influential environment variables:
+ appended to datadir to define SDCC's include/lib directory
+ include_dir_suffix
+ appended to datadir to define SDCC's include directory
+- non_free_inclib_dir_suffix
+- appended to datadir to define SDCC's non-free include/lib
+- directory
+- non_free_include_dir_suffix
+- appended to datadir to define SDCC's non-free include directory
+ lib_dir_suffix
+ appended to datadir to define SDCC's library root directory
+- non_free_lib_dir_suffix
+- appended to datadir to define SDCC's non-free library root
+- directory
+ docdir documentation installation directory
+
+ Use these variables to override the choices made by `configure' or to help
+@@ -7421,19 +7402,6 @@ if test "${include_dir_suffix}" = ""; then
+ include_dir_suffix="${inclib_dir_suffix}/include"
+ fi
+
+-
+-if test "${non_free_inclib_dir_suffix}" = ""; then
+- non_free_inclib_dir_suffix="sdcc/non-free"
+-fi
+-
+-# non_free_include_dir_suffix:
+-# *nix default: "sdcc/non-free/include"
+-
+-
+-if test "${non_free_include_dir_suffix}" = ""; then
+- non_free_include_dir_suffix="${non_free_inclib_dir_suffix}/include"
+-fi
+-
+ # lib_dir_suffix:
+ # *nix default: "sdcc/lib"
+
+@@ -7441,13 +7409,6 @@ if test "${lib_dir_suffix}" = ""; then
+ lib_dir_suffix="${inclib_dir_suffix}/lib"
+ fi
+
+-# non_free_lib_dir_suffix:
+-# *nix default: "sdcc/non-free/lib"
+-
+-if test "${non_free_lib_dir_suffix}" = ""; then
+- non_free_lib_dir_suffix="${non_free_inclib_dir_suffix}/lib"
+-fi
+-
+ # docdir:
+ # *nix default: "${datadir}/sdcc/doc"
+
+@@ -7600,22 +7561,6 @@ esac
+
+ printf "%s\n" "#define INCLUDE_DIR_SUFFIX DIR_SEPARATOR_STRING \"${norm_inc_dir_suffix}\"" >>confdefs.h
+
+-norm_non_free_inc_dir_suffix=${non_free_include_dir_suffix}
+-case ":$norm_non_free_inc_dir_suffix:" in
+- ::) norm_non_free_inc_dir_suffix='.' ;;
+- :*[\\/]:) norm_non_free_inc_dir_suffix=`echo "$norm_non_free_inc_dir_suffix" | sed 's,[\\/]*$,,'` ;;
+- :*:) ;;
+-esac
+-case $sdccconf_h_dir_separator in
+-
+- *\\*) norm_non_free_inc_dir_suffix=`echo "$norm_non_free_inc_dir_suffix" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+- s,^[\\/],\\\\\\\\,'` ;;
+-
+- *) norm_non_free_inc_dir_suffix=`echo "$norm_non_free_inc_dir_suffix" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+-esac
+-
+-printf "%s\n" "#define NON_FREE_INCLUDE_DIR_SUFFIX DIR_SEPARATOR_STRING \"${norm_non_free_inc_dir_suffix}\"" >>confdefs.h
+-
+
+ norm_lib_dir_suffix=${lib_dir_suffix}
+ case ":$norm_lib_dir_suffix:" in
+@@ -7633,22 +7578,6 @@ esac
+
+ printf "%s\n" "#define LIB_DIR_SUFFIX DIR_SEPARATOR_STRING \"${norm_lib_dir_suffix}\"" >>confdefs.h
+
+-norm_non_free_lib_dir_suffix=${non_free_lib_dir_suffix}
+-case ":$norm_non_free_lib_dir_suffix:" in
+- ::) norm_non_free_lib_dir_suffix='.' ;;
+- :*[\\/]:) norm_non_free_lib_dir_suffix=`echo "$norm_non_free_lib_dir_suffix" | sed 's,[\\/]*$,,'` ;;
+- :*:) ;;
+-esac
+-case $sdccconf_h_dir_separator in
+-
+- *\\*) norm_non_free_lib_dir_suffix=`echo "$norm_non_free_lib_dir_suffix" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+- s,^[\\/],\\\\\\\\,'` ;;
+-
+- *) norm_non_free_lib_dir_suffix=`echo "$norm_non_free_lib_dir_suffix" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+-esac
+-
+-printf "%s\n" "#define NON_FREE_LIB_DIR_SUFFIX DIR_SEPARATOR_STRING \"${norm_non_free_lib_dir_suffix}\"" >>confdefs.h
+-
+
+ # relative paths
+ for _lcl_i in expanded_bindir:expanded_datadir:bin2data_dir; do
+@@ -8751,27 +8680,6 @@ printf "%s\n" "#define OPT_DISABLE_SDBINUTILS $OPT_DISABLE_SDBINUTILS" >>confdef
+
+
+
+- # Check whether --enable-non-free was given.
+-if test ${enable_non_free+y}
+-then :
+- enableval=$enable_non_free;
+-fi
+-
+-
+- arg1=`echo non-free | sed s/-/_/`
+-
+- if test "`eval echo \\$enable_$arg1`" = "no"; then
+- OPT_DISABLE_NON_FREE=1
+- else
+- OPT_DISABLE_NON_FREE=0
+- fi
+-
+-
+-printf "%s\n" "#define OPT_DISABLE_NON_FREE $OPT_DISABLE_NON_FREE" >>confdefs.h
+-
+-
+-
+-
+
+ # Check whether --enable-doc was given.
+ if test ${enable_doc+y}
+@@ -9199,20 +9107,12 @@ if test $OPT_DISABLE_PIC14 = 0; then
+
+ test $OPT_DISABLE_DEVICE_LIB = 0 && subdirs="$subdirs device/lib/pic14"
+
+-fi
+-if test $OPT_DISABLE_PIC14 = 0 && test $OPT_DISABLE_NON_FREE = 0; then
+- test $OPT_DISABLE_DEVICE_LIB = 0 && subdirs="$subdirs device/non-free/lib/pic14"
+-
+ fi
+ if test $OPT_DISABLE_PIC16 = 0; then
+ ac_config_files="$ac_config_files src/pic16/Makefile"
+
+ test $OPT_DISABLE_DEVICE_LIB = 0 && subdirs="$subdirs device/lib/pic16"
+
+-fi
+-if test $OPT_DISABLE_PIC16 = 0 && test $OPT_DISABLE_NON_FREE = 0; then
+- test $OPT_DISABLE_DEVICE_LIB = 0 && subdirs="$subdirs device/non-free/lib/pic16"
+-
+ fi
+
+ if test $OPT_DISABLE_Z80 = 0 || test $OPT_DISABLE_Z180 = 0 || test $OPT_DISABLE_R2K = 0 || test $OPT_DISABLE_R2KA = 0 || test $OPT_DISABLE_R3KA = 0 || test $OPT_DISABLE_SM83 = 0 || test $OPT_DISABLE_TLCS90 = 0 || test $OPT_DISABLE_EZ80_Z80 = 0 || test $OPT_DISABLE_Z80N = 0; then
+@@ -9289,15 +9189,9 @@ fi
+
+ test $OPT_DISABLE_DEVICE_LIB = 0 && ac_config_files="$ac_config_files device/lib/Makefile"
+
+-test $OPT_DISABLE_DEVICE_LIB = 0 && test $OPT_DISABLE_NON_FREE = 0 && ac_config_files="$ac_config_files device/non-free/lib/Makefile"
+-
+
+ ac_config_files="$ac_config_files main.mk:main_in.mk src/Makefile device/include/Makefile sdas/linksrc/Makefile support/makebin/Makefile support/regression/Makefile support/valdiag/Makefile support/scripts/Makefile support/regression/ports/host/spec.mk:support/regression/ports/host/spec.mk.in Makefile Makefile.common:Makefile.common.in"
+
+-if test $OPT_DISABLE_NON_FREE = 0; then
+- ac_config_files="$ac_config_files device/non-free/include/Makefile"
+-
+-fi
+ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
+ # tests run on this system so they can be shared between configure
+@@ -10037,7 +9931,6 @@ do
+ "device/lib/pdk15-stack-auto/Makefile") CONFIG_FILES="$CONFIG_FILES device/lib/pdk15-stack-auto/Makefile" ;;
+ "sdas/aspdk16/Makefile") CONFIG_FILES="$CONFIG_FILES sdas/aspdk16/Makefile" ;;
+ "device/lib/Makefile") CONFIG_FILES="$CONFIG_FILES device/lib/Makefile" ;;
+- "device/non-free/lib/Makefile") CONFIG_FILES="$CONFIG_FILES device/non-free/lib/Makefile" ;;
+ "main.mk") CONFIG_FILES="$CONFIG_FILES main.mk:main_in.mk" ;;
+ "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+ "device/include/Makefile") CONFIG_FILES="$CONFIG_FILES device/include/Makefile" ;;
+@@ -10049,7 +9942,6 @@ do
+ "support/regression/ports/host/spec.mk") CONFIG_FILES="$CONFIG_FILES support/regression/ports/host/spec.mk:support/regression/ports/host/spec.mk.in" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "Makefile.common") CONFIG_FILES="$CONFIG_FILES Makefile.common:Makefile.common.in" ;;
+- "device/non-free/include/Makefile") CONFIG_FILES="$CONFIG_FILES device/non-free/include/Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+@@ -10856,54 +10748,6 @@ esac
+ incPath3=`echo "$incPath3" | sed 's,\\\\\\\\,\\\\,g'`
+
+
+-nonFreeIncPath1=`echo "/${prefix2data_dir}/${norm_non_free_inc_dir_suffix}" | sed 's,/\./,/,g'`
+-case ":$nonFreeIncPath1:" in
+- ::) nonFreeIncPath1='.' ;;
+- :*[\\/]:) nonFreeIncPath1=`echo "$nonFreeIncPath1" | sed 's,[\\/]*$,,'` ;;
+- :*:) ;;
+-esac
+-case $dirch in
+-
+- *\\*) nonFreeIncPath1=`echo "$nonFreeIncPath1" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+- s,^[\\/],\\\\\\\\,'` ;;
+-
+- *) nonFreeIncPath1=`echo "$nonFreeIncPath1" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+-esac
+-nonFreeIncPath1=`echo "$nonFreeIncPath1" | sed 's,\\\\\\\\,\\\\,g'`
+-
+-
+-nonFreeIncPath2=`echo "/${bin2data_dir}/${norm_non_free_inc_dir_suffix}" | sed 's,/\./,/,g'`
+-case ":$nonFreeIncPath2:" in
+- ::) nonFreeIncPath2='.' ;;
+- :*[\\/]:) nonFreeIncPath2=`echo "$nonFreeIncPath2" | sed 's,[\\/]*$,,'` ;;
+- :*:) ;;
+-esac
+-case $dirch in
+-
+- *\\*) nonFreeIncPath2=`echo "$nonFreeIncPath2" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+- s,^[\\/],\\\\\\\\,'` ;;
+-
+- *) nonFreeIncPath2=`echo "$nonFreeIncPath2" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+-esac
+-nonFreeIncPath2=`echo "$nonFreeIncPath2" | sed 's,\\\\\\\\,\\\\,g'`
+-
+-
+-nonFreeIncPath3=`echo "${expanded_datadir}/${norm_non_free_inc_dir_suffix}" | sed 's,/\./,/,g'`
+-case ":$nonFreeIncPath3:" in
+- ::) nonFreeIncPath3='.' ;;
+- :*[\\/]:) nonFreeIncPath3=`echo "$nonFreeIncPath3" | sed 's,[\\/]*$,,'` ;;
+- :*:) ;;
+-esac
+-case $dirch in
+-
+- *\\*) nonFreeIncPath3=`echo "$nonFreeIncPath3" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+- s,^[\\/],\\\\\\\\,'` ;;
+-
+- *) nonFreeIncPath3=`echo "$nonFreeIncPath3" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+-esac
+-nonFreeIncPath3=`echo "$nonFreeIncPath3" | sed 's,\\\\\\\\,\\\\,g'`
+-
+-
+
+ libPath1=`echo "/${prefix2data_dir}/${norm_lib_dir_suffix}" | sed 's,/\./,/,g'`
+ case ":$libPath1:" in
+@@ -10953,54 +10797,6 @@ esac
+ libPath3=`echo "$libPath3" | sed 's,\\\\\\\\,\\\\,g'`
+
+
+-nonFreeLibPath1=`echo "/${prefix2data_dir}/${norm_non_free_lib_dir_suffix}" | sed 's,/\./,/,g'`
+-case ":$nonFreeLibPath1:" in
+- ::) nonFreeLibPath1='.' ;;
+- :*[\\/]:) nonFreeLibPath1=`echo "$nonFreeLibPath1" | sed 's,[\\/]*$,,'` ;;
+- :*:) ;;
+-esac
+-case $dirch in
+-
+- *\\*) nonFreeLibPath1=`echo "$nonFreeLibPath1" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+- s,^[\\/],\\\\\\\\,'` ;;
+-
+- *) nonFreeLibPath1=`echo "$nonFreeLibPath1" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+-esac
+-nonFreeLibPath1=`echo "$nonFreeLibPath1" | sed 's,\\\\\\\\,\\\\,g'`
+-
+-
+-nonFreeLibPath2=`echo "/${bin2data_dir}/${norm_non_free_lib_dir_suffix}" | sed 's,/\./,/,g'`
+-case ":$nonFreeLibPath2:" in
+- ::) nonFreeLibPath2='.' ;;
+- :*[\\/]:) nonFreeLibPath2=`echo "$nonFreeLibPath2" | sed 's,[\\/]*$,,'` ;;
+- :*:) ;;
+-esac
+-case $dirch in
+-
+- *\\*) nonFreeLibPath2=`echo "$nonFreeLibPath2" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+- s,^[\\/],\\\\\\\\,'` ;;
+-
+- *) nonFreeLibPath2=`echo "$nonFreeLibPath2" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+-esac
+-nonFreeLibPath2=`echo "$nonFreeLibPath2" | sed 's,\\\\\\\\,\\\\,g'`
+-
+-
+-nonFreeLibPath3=`echo "${expanded_datadir}/${norm_non_free_lib_dir_suffix}" | sed 's,/\./,/,g'`
+-case ":$nonFreeLibPath3:" in
+- ::) nonFreeLibPath3='.' ;;
+- :*[\\/]:) nonFreeLibPath3=`echo "$nonFreeLibPath3" | sed 's,[\\/]*$,,'` ;;
+- :*:) ;;
+-esac
+-case $dirch in
+-
+- *\\*) nonFreeLibPath3=`echo "$nonFreeLibPath3" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+- s,^[\\/],\\\\\\\\,'` ;;
+-
+- *) nonFreeLibPath3=`echo "$nonFreeLibPath3" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+-esac
+-nonFreeLibPath3=`echo "$nonFreeLibPath3" | sed 's,\\\\\\\\,\\\\,g'`
+-
+-
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result:
+ sdcc ${VERSION} is now configured for
+
+@@ -11041,7 +10837,6 @@ sdcc ${VERSION} is now configured for
+ mos6502 ${enable_mos6502_port}
+ mos65c02 ${enable_mos65c02_port}
+
+- Disable non-free lib: ${OPT_DISABLE_NON_FREE}
+ Disable packihx: ${OPT_DISABLE_PACKIHX}
+ Disable ucsim: ${OPT_DISABLE_UCSIM}
+ Disable device lib: ${OPT_DISABLE_DEVICE_LIB}
+@@ -11056,9 +10851,6 @@ sdcc ${VERSION} is now configured for
+ include/library files: ${datadir}/${inclib_dir_suffix}
+ include files: ${datadir}/${include_dir_suffix}
+ library files: ${datadir}/${lib_dir_suffix}
+- non-free files: ${datadir}/${non_free_inclib_dir_suffix}
+- non-free include files: ${datadir}/${non_free_include_dir_suffix}
+- non-free library files: ${datadir}/${non_free_lib_dir_suffix}
+ documentation: ${docdir}
+
+ prefix: ${prefix}
+@@ -11070,15 +10862,9 @@ sdcc ${VERSION} is now configured for
+ include files: ${incPath1}
+ path(argv[0])${incPath2}
+ ${incPath3}
+- ${nonFreeIncPath1}
+- path(argv[0])${nonFreeIncPath2}
+- ${nonFreeIncPath3}
+ library files: \$SDCC_HOME${libPath1}${dirch}<model>
+ path(argv[0])${libPath2}${dirch}<model>
+ ${libPath3}${dirch}<model>
+- \$SDCC_HOME${nonFreeLibPath1}${dirch}<model>
+- path(argv[0])${nonFreeLibPath2}${dirch}<model>
+- ${nonFreeLibPath3}${dirch}<model>
+ " >&5
+ printf "%s\n" "
+ sdcc ${VERSION} is now configured for
+@@ -11120,7 +10906,6 @@ sdcc ${VERSION} is now configured for
+ mos6502 ${enable_mos6502_port}
+ mos65c02 ${enable_mos65c02_port}
+
+- Disable non-free lib: ${OPT_DISABLE_NON_FREE}
+ Disable packihx: ${OPT_DISABLE_PACKIHX}
+ Disable ucsim: ${OPT_DISABLE_UCSIM}
+ Disable device lib: ${OPT_DISABLE_DEVICE_LIB}
+@@ -11135,9 +10920,6 @@ sdcc ${VERSION} is now configured for
+ include/library files: ${datadir}/${inclib_dir_suffix}
+ include files: ${datadir}/${include_dir_suffix}
+ library files: ${datadir}/${lib_dir_suffix}
+- non-free files: ${datadir}/${non_free_inclib_dir_suffix}
+- non-free include files: ${datadir}/${non_free_include_dir_suffix}
+- non-free library files: ${datadir}/${non_free_lib_dir_suffix}
+ documentation: ${docdir}
+
+ prefix: ${prefix}
+@@ -11149,15 +10931,9 @@ sdcc ${VERSION} is now configured for
+ include files: ${incPath1}
+ path(argv[0])${incPath2}
+ ${incPath3}
+- ${nonFreeIncPath1}
+- path(argv[0])${nonFreeIncPath2}
+- ${nonFreeIncPath3}
+ library files: \$SDCC_HOME${libPath1}${dirch}<model>
+ path(argv[0])${libPath2}${dirch}<model>
+ ${libPath3}${dirch}<model>
+- \$SDCC_HOME${nonFreeLibPath1}${dirch}<model>
+- path(argv[0])${nonFreeLibPath2}${dirch}<model>
+- ${nonFreeLibPath3}${dirch}<model>
+ " >&6; }
+ # End of configure/configure.in
+
+diff --git a/configure.ac b/configure.ac
+index cc5309e..5eb4326 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -562,19 +562,6 @@ if test "${include_dir_suffix}" = ""; then
+ include_dir_suffix="${inclib_dir_suffix}/include"
+ fi
+
+-AC_ARG_VAR([non_free_inclib_dir_suffix], [appended to datadir to define SDCC's non-free include/lib directory])
+-if test "${non_free_inclib_dir_suffix}" = ""; then
+- non_free_inclib_dir_suffix="sdcc/non-free"
+-fi
+-
+-# non_free_include_dir_suffix:
+-# *nix default: "sdcc/non-free/include"
+-
+-AC_ARG_VAR([non_free_include_dir_suffix], [appended to datadir to define SDCC's non-free include directory])
+-if test "${non_free_include_dir_suffix}" = ""; then
+- non_free_include_dir_suffix="${non_free_inclib_dir_suffix}/include"
+-fi
+-
+ # lib_dir_suffix:
+ # *nix default: "sdcc/lib"
+ AC_ARG_VAR([lib_dir_suffix], [appended to datadir to define SDCC's library root directory])
+@@ -582,13 +569,6 @@ if test "${lib_dir_suffix}" = ""; then
+ lib_dir_suffix="${inclib_dir_suffix}/lib"
+ fi
+
+-# non_free_lib_dir_suffix:
+-# *nix default: "sdcc/non-free/lib"
+-AC_ARG_VAR([non_free_lib_dir_suffix], [appended to datadir to define SDCC's non-free library root directory])
+-if test "${non_free_lib_dir_suffix}" = ""; then
+- non_free_lib_dir_suffix="${non_free_inclib_dir_suffix}/lib"
+-fi
+-
+ # docdir:
+ # *nix default: "${datadir}/sdcc/doc"
+ AC_ARG_VAR([docdir], [documentation installation directory])
+@@ -629,19 +609,11 @@ norm_inc_dir_suffix=${include_dir_suffix}
+ adl_NORMALIZE_PATH([norm_inc_dir_suffix], [$sdccconf_h_dir_separator])
+ AC_DEFINE_UNQUOTED(INCLUDE_DIR_SUFFIX,
+ DIR_SEPARATOR_STRING "${norm_inc_dir_suffix}", [XXX])
+-norm_non_free_inc_dir_suffix=${non_free_include_dir_suffix}
+-adl_NORMALIZE_PATH([norm_non_free_inc_dir_suffix], [$sdccconf_h_dir_separator])
+-AC_DEFINE_UNQUOTED(NON_FREE_INCLUDE_DIR_SUFFIX,
+- DIR_SEPARATOR_STRING "${norm_non_free_inc_dir_suffix}", [XXX])
+
+ norm_lib_dir_suffix=${lib_dir_suffix}
+ adl_NORMALIZE_PATH([norm_lib_dir_suffix], [$sdccconf_h_dir_separator])
+ AC_DEFINE_UNQUOTED(LIB_DIR_SUFFIX,
+ DIR_SEPARATOR_STRING "${norm_lib_dir_suffix}", [XXX])
+-norm_non_free_lib_dir_suffix=${non_free_lib_dir_suffix}
+-adl_NORMALIZE_PATH([norm_non_free_lib_dir_suffix], [$sdccconf_h_dir_separator])
+-AC_DEFINE_UNQUOTED(NON_FREE_LIB_DIR_SUFFIX,
+- DIR_SEPARATOR_STRING "${norm_non_free_lib_dir_suffix}", [XXX])
+
+ # relative paths
+ adl_COMPUTE_RELATIVE_PATHS([expanded_bindir:expanded_datadir:bin2data_dir])
+@@ -819,7 +791,6 @@ AC_DO_DISABLER(packihx, PACKIHX, [Disables building packihx])
+ AC_DO_DISABLER(sdcpp, SDCPP, [Disables building sdcpp])
+ AC_DO_DISABLER(sdcdb, SDCDB, [Disables building sdcdb])
+ AC_DO_DISABLER(sdbinutils, SDBINUTILS, [Disables configuring and building of sdbinutils])
+-AC_DO_DISABLER(non-free, NON_FREE, [Disables non-free runtime library parts])
+
+ AC_DO_ENABLER(doc, DOC, [Enables building the documentation])
+ AC_CHECK_PROG([LYX], [lyx], [lyx], [:])
+@@ -897,16 +868,10 @@ if test $OPT_DISABLE_PIC14 = 0; then
+ AC_CONFIG_FILES(src/pic14/Makefile)
+ test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_SUBDIRS(device/lib/pic14)
+ fi
+-if test $OPT_DISABLE_PIC14 = 0 && test $OPT_DISABLE_NON_FREE = 0; then
+- test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_SUBDIRS(device/non-free/lib/pic14)
+-fi
+ if test $OPT_DISABLE_PIC16 = 0; then
+ AC_CONFIG_FILES(src/pic16/Makefile)
+ test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_SUBDIRS(device/lib/pic16)
+ fi
+-if test $OPT_DISABLE_PIC16 = 0 && test $OPT_DISABLE_NON_FREE = 0; then
+- test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_SUBDIRS(device/non-free/lib/pic16)
+-fi
+
+ if test $OPT_DISABLE_Z80 = 0 || test $OPT_DISABLE_Z180 = 0 || test $OPT_DISABLE_R2K = 0 || test $OPT_DISABLE_R2KA = 0 || test $OPT_DISABLE_R3KA = 0 || test $OPT_DISABLE_SM83 = 0 || test $OPT_DISABLE_TLCS90 = 0 || test $OPT_DISABLE_EZ80_Z80 = 0 || test $OPT_DISABLE_Z80N = 0; then
+ AC_CONFIG_FILES([src/z80/Makefile])
+@@ -970,7 +935,6 @@ fi
+
+
+ test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_FILES([device/lib/Makefile])
+-test $OPT_DISABLE_DEVICE_LIB = 0 && test $OPT_DISABLE_NON_FREE = 0 && AC_CONFIG_FILES([device/non-free/lib/Makefile])
+
+ AC_CONFIG_FILES([main.mk:main_in.mk
+ src/Makefile
+@@ -984,9 +948,6 @@ support/regression/ports/host/spec.mk:support/regression/ports/host/spec.mk.in
+ Makefile
+ Makefile.common:Makefile.common.in
+ ])
+-if test $OPT_DISABLE_NON_FREE = 0; then
+- AC_CONFIG_FILES([device/non-free/include/Makefile])
+-fi
+ AC_OUTPUT
+
+ # I found no better place
+@@ -1004,16 +965,10 @@ adl_NORMALIZE_PATH_MSG(/${prefix2bin_dir}, [binPath], [
+ adl_NORMALIZE_PATH_MSG(/${prefix2data_dir}/${norm_inc_dir_suffix}, [incPath1], [$dirch])
+ adl_NORMALIZE_PATH_MSG(/${bin2data_dir}/${norm_inc_dir_suffix}, [incPath2], [$dirch])
+ adl_NORMALIZE_PATH_MSG(${expanded_datadir}/${norm_inc_dir_suffix}, [incPath3], [$dirch])
+-adl_NORMALIZE_PATH_MSG(/${prefix2data_dir}/${norm_non_free_inc_dir_suffix}, [nonFreeIncPath1], [$dirch])
+-adl_NORMALIZE_PATH_MSG(/${bin2data_dir}/${norm_non_free_inc_dir_suffix}, [nonFreeIncPath2], [$dirch])
+-adl_NORMALIZE_PATH_MSG(${expanded_datadir}/${norm_non_free_inc_dir_suffix}, [nonFreeIncPath3], [$dirch])
+
+ adl_NORMALIZE_PATH_MSG(/${prefix2data_dir}/${norm_lib_dir_suffix}, [libPath1], [$dirch])
+ adl_NORMALIZE_PATH_MSG(/${bin2data_dir}/${norm_lib_dir_suffix}, [libPath2], [$dirch])
+ adl_NORMALIZE_PATH_MSG(${expanded_datadir}/${norm_lib_dir_suffix}, [libPath3], [$dirch])
+-adl_NORMALIZE_PATH_MSG(/${prefix2data_dir}/${norm_non_free_lib_dir_suffix}, [nonFreeLibPath1], [$dirch])
+-adl_NORMALIZE_PATH_MSG(/${bin2data_dir}/${norm_non_free_lib_dir_suffix}, [nonFreeLibPath2], [$dirch])
+-adl_NORMALIZE_PATH_MSG(${expanded_datadir}/${norm_non_free_lib_dir_suffix}, [nonFreeLibPath3], [$dirch])
+
+ AC_MSG_RESULT([
+ sdcc ${VERSION} is now configured for
+@@ -1055,7 +1010,6 @@ sdcc ${VERSION} is now configured for
+ mos6502 ${enable_mos6502_port}
+ mos65c02 ${enable_mos65c02_port}
+
+- Disable non-free lib: ${OPT_DISABLE_NON_FREE}
+ Disable packihx: ${OPT_DISABLE_PACKIHX}
+ Disable ucsim: ${OPT_DISABLE_UCSIM}
+ Disable device lib: ${OPT_DISABLE_DEVICE_LIB}
+@@ -1070,9 +1024,6 @@ sdcc ${VERSION} is now configured for
+ include/library files: ${datadir}/${inclib_dir_suffix}
+ include files: ${datadir}/${include_dir_suffix}
+ library files: ${datadir}/${lib_dir_suffix}
+- non-free files: ${datadir}/${non_free_inclib_dir_suffix}
+- non-free include files: ${datadir}/${non_free_include_dir_suffix}
+- non-free library files: ${datadir}/${non_free_lib_dir_suffix}
+ documentation: ${docdir}
+
+ prefix: ${prefix}
+@@ -1084,14 +1035,8 @@ sdcc ${VERSION} is now configured for
+ include files: ${incPath1}
+ path(argv[[0]])${incPath2}
+ ${incPath3}
+- ${nonFreeIncPath1}
+- path(argv[[0]])${nonFreeIncPath2}
+- ${nonFreeIncPath3}
+ library files: \$SDCC_HOME${libPath1}${dirch}<model>
+ path(argv[[0]])${libPath2}${dirch}<model>
+ ${libPath3}${dirch}<model>
+- \$SDCC_HOME${nonFreeLibPath1}${dirch}<model>
+- path(argv[[0]])${nonFreeLibPath2}${dirch}<model>
+- ${nonFreeLibPath3}${dirch}<model>
+ ])
+ # End of configure/configure.in
+diff --git a/device/lib/pic14/Makefile.common b/device/lib/pic14/Makefile.common
+index 019fe0f..da3389d 100644
+--- a/device/lib/pic14/Makefile.common
++++ b/device/lib/pic14/Makefile.common
+@@ -68,14 +68,14 @@ GENERIC_SRC_DIR_ABS = $(abspath $(GENERIC_SRC_DIR))
+ AM_CPPFLAGS =
+ AM_CPPFLAGS += -I.
+ AM_CPPFLAGS += -I$(top_srcdir)
+-AM_CPPFLAGS += -I$(DEVICE_TOP_DIR)/include/pic14 -I$(DEVICE_TOP_DIR)/non-free/include/pic14 -I$(DEVICE_TOP_DIR)/include
++AM_CPPFLAGS += -I$(DEVICE_TOP_DIR)/include/pic14 -I$(DEVICE_TOP_DIR)/include
+
+ ############################################################
+ # C compiler flags
+ ############################################################
+
+ SDCC_FLAGS =
+-SDCC_FLAGS += -mpic14 --less-pedantic --no-warn-non-free --i-code-in-asm --fverbose-asm
++SDCC_FLAGS += -mpic14 --less-pedantic --i-code-in-asm --fverbose-asm
+ SDCC_FLAGS += --std-c11
+
+ # extra flags for enhanced cores
+@@ -113,7 +113,7 @@ AM_CFLAGS_EOX = -p$(EARCH) $(SDCC_FLAGS) $(SDCC_FLAGS_ENHANCED) $(SDCC_FLAGS_NOO
+ AM_CCASFLAGS =
+ AM_CCASFLAGS += -p$(ARCH)
+ AM_CCASFLAGS += -I$(srcdir)
+-AM_CCASFLAGS += -I$(DEVICE_TOP_DIR)/include/pic14 -I$(DEVICE_TOP_DIR)/non-free/include/pic14
++AM_CCASFLAGS += -I$(DEVICE_TOP_DIR)/include/pic14
+
+ ############################################################
+ # Common actions
+diff --git a/device/lib/pic14/Makefile.in b/device/lib/pic14/Makefile.in
+index 039c0cb..90510fd 100644
+--- a/device/lib/pic14/Makefile.in
++++ b/device/lib/pic14/Makefile.in
+@@ -335,13 +335,12 @@ GENERIC_SRC_DIR_ABS = $(abspath $(GENERIC_SRC_DIR))
+ # C preprocessor flags
+ ############################################################
+ AM_CPPFLAGS = -I. -I$(top_srcdir) -I$(DEVICE_TOP_DIR)/include/pic14 \
+- -I$(DEVICE_TOP_DIR)/non-free/include/pic14 \
+ -I$(DEVICE_TOP_DIR)/include
+
+ ############################################################
+ # C compiler flags
+ ############################################################
+-SDCC_FLAGS = -mpic14 --less-pedantic --no-warn-non-free \
++SDCC_FLAGS = -mpic14 --less-pedantic \
+ --i-code-in-asm --fverbose-asm --std-c11 $(am__append_4)
+
+ # extra flags for enhanced cores
+@@ -366,8 +365,7 @@ AM_CFLAGS_EOX = -p$(EARCH) $(SDCC_FLAGS) $(SDCC_FLAGS_ENHANCED) $(SDCC_FLAGS_NOO
+ ############################################################
+ # Assembler flags
+ ############################################################
+-AM_CCASFLAGS = -p$(ARCH) -I$(srcdir) -I$(DEVICE_TOP_DIR)/include/pic14 \
+- -I$(DEVICE_TOP_DIR)/non-free/include/pic14
++AM_CCASFLAGS = -p$(ARCH) -I$(srcdir) -I$(DEVICE_TOP_DIR)/include/pic14
+
+ # extensions generated by the build process
+ CLEAN_EXTENSIONS = .asm .lst .sym .d .p .g .v .adb
+diff --git a/device/lib/pic14/libc/Makefile.in b/device/lib/pic14/libc/Makefile.in
+index 1283cbb..70e82d0 100644
+--- a/device/lib/pic14/libc/Makefile.in
++++ b/device/lib/pic14/libc/Makefile.in
+@@ -878,13 +878,12 @@ GENERIC_SRC_DIR_ABS = $(abspath $(GENERIC_SRC_DIR))
+ # C preprocessor flags
+ ############################################################
+ AM_CPPFLAGS = -I. -I$(top_srcdir) -I$(DEVICE_TOP_DIR)/include/pic14 \
+- -I$(DEVICE_TOP_DIR)/non-free/include/pic14 \
+ -I$(DEVICE_TOP_DIR)/include
+
+ ############################################################
+ # C compiler flags
+ ############################################################
+-SDCC_FLAGS = -mpic14 --less-pedantic --no-warn-non-free \
++SDCC_FLAGS = -mpic14 --less-pedantic \
+ --i-code-in-asm --fverbose-asm --std-c11 $(am__append_9)
+
+ # extra flags for enhanced cores
+@@ -909,8 +908,7 @@ AM_CFLAGS_EOX = -p$(EARCH) $(SDCC_FLAGS) $(SDCC_FLAGS_ENHANCED) $(SDCC_FLAGS_NOO
+ ############################################################
+ # Assembler flags
+ ############################################################
+-AM_CCASFLAGS = -p$(ARCH) -I$(srcdir) -I$(DEVICE_TOP_DIR)/include/pic14 \
+- -I$(DEVICE_TOP_DIR)/non-free/include/pic14
++AM_CCASFLAGS = -p$(ARCH) -I$(srcdir) -I$(DEVICE_TOP_DIR)/include/pic14
+
+ # extensions generated by the build process
+ CLEAN_EXTENSIONS = .asm .lst .sym .d .p .g .v .adb
+diff --git a/device/lib/pic14/libm/Makefile.in b/device/lib/pic14/libm/Makefile.in
+index 409835d..e9fdef8 100644
+--- a/device/lib/pic14/libm/Makefile.in
++++ b/device/lib/pic14/libm/Makefile.in
+@@ -511,13 +511,12 @@ GENERIC_SRC_DIR_ABS = $(abspath $(GENERIC_SRC_DIR))
+ # C preprocessor flags
+ ############################################################
+ AM_CPPFLAGS = -I. -I$(top_srcdir) -I$(DEVICE_TOP_DIR)/include/pic14 \
+- -I$(DEVICE_TOP_DIR)/non-free/include/pic14 \
+ -I$(DEVICE_TOP_DIR)/include
+
+ ############################################################
+ # C compiler flags
+ ############################################################
+-SDCC_FLAGS = -mpic14 --less-pedantic --no-warn-non-free \
++SDCC_FLAGS = -mpic14 --less-pedantic \
+ --i-code-in-asm --fverbose-asm --std-c11 $(am__append_9)
+
+ # extra flags for enhanced cores
+@@ -542,8 +541,7 @@ AM_CFLAGS_EOX = -p$(EARCH) $(SDCC_FLAGS) $(SDCC_FLAGS_ENHANCED) $(SDCC_FLAGS_NOO
+ ############################################################
+ # Assembler flags
+ ############################################################
+-AM_CCASFLAGS = -p$(ARCH) -I$(srcdir) -I$(DEVICE_TOP_DIR)/include/pic14 \
+- -I$(DEVICE_TOP_DIR)/non-free/include/pic14
++AM_CCASFLAGS = -p$(ARCH) -I$(srcdir) -I$(DEVICE_TOP_DIR)/include/pic14
+
+ # extensions generated by the build process
+ CLEAN_EXTENSIONS = .asm .lst .sym .d .p .g .v .adb
+diff --git a/device/lib/pic14/libsdcc/enhanced-no-xinst/Makefile.in b/device/lib/pic14/libsdcc/enhanced-no-xinst/Makefile.in
+index c82f7ba..780fa77 100644
+--- a/device/lib/pic14/libsdcc/enhanced-no-xinst/Makefile.in
++++ b/device/lib/pic14/libsdcc/enhanced-no-xinst/Makefile.in
+@@ -518,13 +518,12 @@ GENERIC_SRC_DIR_ABS = $(abspath $(GENERIC_SRC_DIR))
+ # C preprocessor flags
+ ############################################################
+ AM_CPPFLAGS = -I. -I$(top_srcdir) -I$(DEVICE_TOP_DIR)/include/pic14 \
+- -I$(DEVICE_TOP_DIR)/non-free/include/pic14 \
+ -I$(DEVICE_TOP_DIR)/include
+
+ ############################################################
+ # C compiler flags
+ ############################################################
+-SDCC_FLAGS = -mpic14 --less-pedantic --no-warn-non-free \
++SDCC_FLAGS = -mpic14 --less-pedantic \
+ --i-code-in-asm --fverbose-asm --std-c11 $(am__append_5)
+
+ # extra flags for enhanced cores
+@@ -549,8 +548,7 @@ AM_CFLAGS_EOX = -p$(EARCH) $(SDCC_FLAGS) $(SDCC_FLAGS_ENHANCED) $(SDCC_FLAGS_NOO
+ ############################################################
+ # Assembler flags
+ ############################################################
+-AM_CCASFLAGS = -p$(ARCH) -I$(srcdir) -I$(DEVICE_TOP_DIR)/include/pic14 \
+- -I$(DEVICE_TOP_DIR)/non-free/include/pic14
++AM_CCASFLAGS = -p$(ARCH) -I$(srcdir) -I$(DEVICE_TOP_DIR)/include/pic14
+
+ # extensions generated by the build process
+ CLEAN_EXTENSIONS = .asm .lst .sym .d .p .g .v .adb
+diff --git a/device/lib/pic14/libsdcc/enhanced/Makefile.in b/device/lib/pic14/libsdcc/enhanced/Makefile.in
+index 33b8299..f4e0398 100644
+--- a/device/lib/pic14/libsdcc/enhanced/Makefile.in
++++ b/device/lib/pic14/libsdcc/enhanced/Makefile.in
+@@ -518,13 +518,12 @@ GENERIC_SRC_DIR_ABS = $(abspath $(GENERIC_SRC_DIR))
+ # C preprocessor flags
+ ############################################################
+ AM_CPPFLAGS = -I. -I$(top_srcdir) -I$(DEVICE_TOP_DIR)/include/pic14 \
+- -I$(DEVICE_TOP_DIR)/non-free/include/pic14 \
+ -I$(DEVICE_TOP_DIR)/include
+
+ ############################################################
+ # C compiler flags
+ ############################################################
+-SDCC_FLAGS = -mpic14 --less-pedantic --no-warn-non-free \
++SDCC_FLAGS = -mpic14 --less-pedantic \
+ --i-code-in-asm --fverbose-asm --std-c11 $(am__append_5)
+
+ # extra flags for enhanced cores
+@@ -549,8 +548,7 @@ AM_CFLAGS_EOX = -p$(EARCH) $(SDCC_FLAGS) $(SDCC_FLAGS_ENHANCED) $(SDCC_FLAGS_NOO
+ ############################################################
+ # Assembler flags
+ ############################################################
+-AM_CCASFLAGS = -p$(ARCH) -I$(srcdir) -I$(DEVICE_TOP_DIR)/include/pic14 \
+- -I$(DEVICE_TOP_DIR)/non-free/include/pic14
++AM_CCASFLAGS = -p$(ARCH) -I$(srcdir) -I$(DEVICE_TOP_DIR)/include/pic14
+
+ # extensions generated by the build process
+ CLEAN_EXTENSIONS = .asm .lst .sym .d .p .g .v .adb
+diff --git a/device/lib/pic14/libsdcc/regular/Makefile.in b/device/lib/pic14/libsdcc/regular/Makefile.in
+index 6586b7d..7010287 100644
+--- a/device/lib/pic14/libsdcc/regular/Makefile.in
++++ b/device/lib/pic14/libsdcc/regular/Makefile.in
+@@ -511,13 +511,12 @@ GENERIC_SRC_DIR_ABS = $(abspath $(GENERIC_SRC_DIR))
+ # C preprocessor flags
+ ############################################################
+ AM_CPPFLAGS = -I. -I$(top_srcdir) -I$(DEVICE_TOP_DIR)/include/pic14 \
+- -I$(DEVICE_TOP_DIR)/non-free/include/pic14 \
+ -I$(DEVICE_TOP_DIR)/include
+
+ ############################################################
+ # C compiler flags
+ ############################################################
+-SDCC_FLAGS = -mpic14 --less-pedantic --no-warn-non-free \
++SDCC_FLAGS = -mpic14 --less-pedantic \
+ --i-code-in-asm --fverbose-asm --std-c11 $(am__append_5)
+
+ # extra flags for enhanced cores
+@@ -542,8 +541,7 @@ AM_CFLAGS_EOX = -p$(EARCH) $(SDCC_FLAGS) $(SDCC_FLAGS_ENHANCED) $(SDCC_FLAGS_NOO
+ ############################################################
+ # Assembler flags
+ ############################################################
+-AM_CCASFLAGS = -p$(ARCH) -I$(srcdir) -I$(DEVICE_TOP_DIR)/include/pic14 \
+- -I$(DEVICE_TOP_DIR)/non-free/include/pic14
++AM_CCASFLAGS = -p$(ARCH) -I$(srcdir) -I$(DEVICE_TOP_DIR)/include/pic14
+
+ # extensions generated by the build process
+ CLEAN_EXTENSIONS = .asm .lst .sym .d .p .g .v .adb
+diff --git a/device/lib/pic16/Makefile.common b/device/lib/pic16/Makefile.common
+index 01ad950..62839b9 100644
+--- a/device/lib/pic16/Makefile.common
++++ b/device/lib/pic16/Makefile.common
+@@ -1,11 +1,10 @@
+ AM_CPPFLAGS =
+ AM_CPPFLAGS += -I.
+-AM_CPPFLAGS += -I$(top_srcdir)/../../include/pic16 -I$(top_srcdir)/../../non-free/include/pic16
++AM_CPPFLAGS += -I$(top_srcdir)/../../include/pic16
+
+ AM_CFLAGS =
+ AM_CFLAGS += --std-c11
+ AM_CFLAGS += --asm="$(CCAS)"
+-AM_CFLAGS += --no-warn-non-free
+ ##AM_CFLAGS += -Wa,-q
+
+ AM_CFLAGS += --fomit-frame-pointer
+@@ -31,7 +30,7 @@ AM_CFLAGS += --i-code-in-asm
+ AM_CFLAGS += @USE_FLOATS@
+
+ AM_CCASFLAGS =
+-AM_CCASFLAGS += -I$(top_srcdir)/../../include/pic16 -I$(top_srcdir)/../../non-free/include/pic16
++AM_CCASFLAGS += -I$(top_srcdir)/../../include/pic16
+ AM_CCASFLAGS += -I$(srcdir)
+
+ clean-local:
+diff --git a/device/lib/pic16/Makefile.in b/device/lib/pic16/Makefile.in
+index 6a4c9cf..4b07384 100644
+--- a/device/lib/pic16/Makefile.in
++++ b/device/lib/pic16/Makefile.in
+@@ -87,10 +87,7 @@ PRE_UNINSTALL = :
+ POST_UNINSTALL = :
+ subdir = .
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+-am__aclocal_m4_deps = \
+- $(top_srcdir)/../../non-free/lib/pic16/supported-devices.ac \
+- $(top_srcdir)/../../non-free/lib/pic16/processors.ac \
+- $(top_srcdir)/configure.ac
++am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+ DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+@@ -297,8 +294,7 @@ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ SUBDIRS = debug libc libio libm libsdcc startup
+-AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
+- -I$(top_srcdir)/../../non-free/include/pic16
++AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16
+ #AM_CFLAGS += --no-optimize-goto
+
+ #AM_CFLAGS += --debug-ralloc
+@@ -312,11 +308,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
+ #AM_CFLAGS += --noinduction
+ #AM_CFLAGS += --nojtbound
+ #AM_CFLAGS += --noloopreverse
+-AM_CFLAGS = --std-c11 --asm="$(CCAS)" --no-warn-non-free \
++AM_CFLAGS = --std-c11 --asm="$(CCAS)" \
+ --fomit-frame-pointer --obanksel=9 --denable-peeps \
+ --optimize-cmp --optimize-df --i-code-in-asm @USE_FLOATS@
+-AM_CCASFLAGS = -I$(top_srcdir)/../../include/pic16 \
+- -I$(top_srcdir)/../../non-free/include/pic16 -I$(srcdir)
++AM_CCASFLAGS = -I$(top_srcdir)/../../include/pic16 -I$(srcdir)
+ DISTCLEANFILES = a.cod a.hex ./.checkdevices/* pics.supported
+ all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+diff --git a/device/lib/pic16/configure b/device/lib/pic16/configure
+index add51b9..c451a74 100755
+--- a/device/lib/pic16/configure
++++ b/device/lib/pic16/configure
+@@ -3828,7 +3828,6 @@ fi
+
+
+
+-LIBDEV="${srcdir}/../../non-free/lib/pic16/libdev"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking devices supported by gputils" >&5
+ printf %s "checking devices supported by gputils... " >&6; }
+ GOOD_PICS="";
+@@ -3839,20 +3838,6 @@ N_GOOD=0
+ N_BAD=0
+ mkdir -p ".checkdevices";
+ rm -f "$RESULT";
+-for i in "${LIBDEV}/pic1"*.c; do
+- p="${i##*pic}";
+- p="${p%.c}";
+- P=$(echo "$p" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ);
+- printf " include \"p%s.inc\"\n END" "$p" > "${CHECK}.asm";
+- if "$mCCAS" -p "$p" -o "${CHECK}.o" -c "${CHECK}.asm" >/dev/null 2>&1 && "$mLD" "${CHECK}.o" >/dev/null 2>&1; then
+- GOOD_PICS="$GOOD_PICS $p";
+- N_GOOD=`expr $N_GOOD + 1`;
+- echo "$P" >> "$RESULT";
+- else
+- BAD_PICS="$BAD_PICS $p";
+- N_BAD=`expr $N_BAD + 1`;
+- fi;
+-done;
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $N_GOOD devices ($GOOD_PICS)" >&5
+ printf "%s\n" "$N_GOOD devices ($GOOD_PICS)" >&6; }
+
+diff --git a/device/lib/pic16/configure.ac b/device/lib/pic16/configure.ac
+index 75bea9d..65e98be 100644
+--- a/device/lib/pic16/configure.ac
++++ b/device/lib/pic16/configure.ac
+@@ -68,10 +68,6 @@ AC_SUBST(OBJEXT, [o])
+ _AM_DEPENDENCIES(CC)
+ _AM_DEPENDENCIES(CCAS)
+
+-LIBDEV="${srcdir}/../../non-free/lib/pic16/libdev"
+-m4_include([../../non-free/lib/pic16/supported-devices.ac])
+-m4_include([../../non-free/lib/pic16/processors.ac])
+-
+ # Checks for libraries.
+
+ # Checks for header files.
+diff --git a/device/lib/pic16/debug/Makefile.in b/device/lib/pic16/debug/Makefile.in
+index 05108a8..a6a94bb 100644
+--- a/device/lib/pic16/debug/Makefile.in
++++ b/device/lib/pic16/debug/Makefile.in
+@@ -88,10 +88,7 @@ PRE_UNINSTALL = :
+ POST_UNINSTALL = :
+ subdir = debug
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+-am__aclocal_m4_deps = \
+- $(top_srcdir)/../../non-free/lib/pic16/supported-devices.ac \
+- $(top_srcdir)/../../non-free/lib/pic16/processors.ac \
+- $(top_srcdir)/configure.ac
++am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+ DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+@@ -292,8 +289,7 @@ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ lib_LIBRARIES = libdebug.a
+ libdebug_a_SOURCES = gstack/gstack.c
+-AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
+- -I$(top_srcdir)/../../non-free/include/pic16
++AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16
+ #AM_CFLAGS += --no-optimize-goto
+
+ #AM_CFLAGS += --debug-ralloc
+@@ -307,11 +303,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
+ #AM_CFLAGS += --noinduction
+ #AM_CFLAGS += --nojtbound
+ #AM_CFLAGS += --noloopreverse
+-AM_CFLAGS = --std-c11 --asm="$(CCAS)" --no-warn-non-free \
++AM_CFLAGS = --std-c11 --asm="$(CCAS)" \
+ --fomit-frame-pointer --obanksel=9 --denable-peeps \
+ --optimize-cmp --optimize-df --i-code-in-asm @USE_FLOATS@
+-AM_CCASFLAGS = -I$(top_srcdir)/../../include/pic16 \
+- -I$(top_srcdir)/../../non-free/include/pic16 -I$(srcdir)
++AM_CCASFLAGS = -I$(top_srcdir)/../../include/pic16 -I$(srcdir)
+ all: all-am
+
+ .SUFFIXES:
+diff --git a/device/lib/pic16/libc/Makefile.in b/device/lib/pic16/libc/Makefile.in
+index 49a437d..5579b71 100644
+--- a/device/lib/pic16/libc/Makefile.in
++++ b/device/lib/pic16/libc/Makefile.in
+@@ -88,10 +88,7 @@ PRE_UNINSTALL = :
+ POST_UNINSTALL = :
+ subdir = libc
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+-am__aclocal_m4_deps = \
+- $(top_srcdir)/../../non-free/lib/pic16/supported-devices.ac \
+- $(top_srcdir)/../../non-free/lib/pic16/processors.ac \
+- $(top_srcdir)/configure.ac
++am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+ DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+@@ -382,8 +379,7 @@ libc18f_a_SOURCES = ctype/iscntrl.c ctype/isdigit.c ctype/isgraph.c \
+ string/strpbrk.c string/strrchr.c string/strspn.c \
+ string/strstr.c string/strtok.c string/strupr.c \
+ utils/cnvfrac.S utils/cnvint.S utils/cvtdec.S
+-AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
+- -I$(top_srcdir)/../../non-free/include/pic16
++AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16
+ #AM_CFLAGS += --no-optimize-goto
+
+ #AM_CFLAGS += --debug-ralloc
+@@ -397,11 +393,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
+ #AM_CFLAGS += --noinduction
+ #AM_CFLAGS += --nojtbound
+ #AM_CFLAGS += --noloopreverse
+-AM_CFLAGS = --std-c11 --asm="$(CCAS)" --no-warn-non-free \
++AM_CFLAGS = --std-c11 --asm="$(CCAS)" \
+ --fomit-frame-pointer --obanksel=9 --denable-peeps \
+ --optimize-cmp --optimize-df --i-code-in-asm @USE_FLOATS@
+-AM_CCASFLAGS = -I$(top_srcdir)/../../include/pic16 \
+- -I$(top_srcdir)/../../non-free/include/pic16 -I$(srcdir)
++AM_CCASFLAGS = -I$(top_srcdir)/../../include/pic16 -I$(srcdir)
+ all: all-am
+
+ .SUFFIXES:
+diff --git a/device/lib/pic16/libio/Makefile.in b/device/lib/pic16/libio/Makefile.in
+index 5b1a9b0..664958f 100644
+--- a/device/lib/pic16/libio/Makefile.in
++++ b/device/lib/pic16/libio/Makefile.in
+@@ -481,10 +481,7 @@ POST_UNINSTALL = :
+ @ENABLE_18LF8723_TRUE@am__append_393 = libio18lf8723.a
+ subdir = libio
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+-am__aclocal_m4_deps = \
+- $(top_srcdir)/../../non-free/lib/pic16/supported-devices.ac \
+- $(top_srcdir)/../../non-free/lib/pic16/processors.ac \
+- $(top_srcdir)/configure.ac
++am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+ DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+@@ -15601,8 +15598,7 @@ libio18lf8722_a_SOURCES = dummy.c i2c/i2cack.c i2c/i2cclose.c \
+ libio18lf8722_a_CFLAGS = -p18lf8722 $(AM_CFLAGS)
+ libio18lf8723_a_SOURCES = dummy.c
+ libio18lf8723_a_CFLAGS = -p18lf8723 $(AM_CFLAGS)
+-AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
+- -I$(top_srcdir)/../../non-free/include/pic16
++AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16
+ #AM_CFLAGS += --no-optimize-goto
+
+ #AM_CFLAGS += --debug-ralloc
+@@ -15616,11 +15612,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
+ #AM_CFLAGS += --noinduction
+ #AM_CFLAGS += --nojtbound
+ #AM_CFLAGS += --noloopreverse
+-AM_CFLAGS = --std-c11 --asm="$(CCAS)" --no-warn-non-free \
++AM_CFLAGS = --std-c11 --asm="$(CCAS)" \
+ --fomit-frame-pointer --obanksel=9 --denable-peeps \
+ --optimize-cmp --optimize-df --i-code-in-asm @USE_FLOATS@
+-AM_CCASFLAGS = -I$(top_srcdir)/../../include/pic16 \
+- -I$(top_srcdir)/../../non-free/include/pic16 -I$(srcdir)
++AM_CCASFLAGS = -I$(top_srcdir)/../../include/pic16 -I$(srcdir)
+ all: all-am
+
+ .SUFFIXES:
+diff --git a/device/lib/pic16/libio/mkmk.sh b/device/lib/pic16/libio/mkmk.sh
+index 211604e..e8896bf 100755
+--- a/device/lib/pic16/libio/mkmk.sh
++++ b/device/lib/pic16/libio/mkmk.sh
+@@ -17,40 +17,6 @@ lib_LIBRARIES =
+
+ HEREDOC
+
+-for f in "../../../non-free/lib/pic16/libdev/pic1"*.c; do
+- p="${f##*/pic}";
+- p="${p%.c}";
+- P=$(echo "$p" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ);
+- echo "Generating for device >>${p}<<" >&2;
+- cat <<HERE
+-if ENABLE_$P
+-lib_LIBRARIES += libio${p}.a
+-endif ENABLE_$P
+-libio${p}_a_SOURCES = dummy.c
+-HERE
+- sed -e 's/\s*\(#.*\)\{0,1\}$//' adc.ignore | grep -x "$p" > /dev/null 2>&1 && { echo "No adc." >&2 ; } || cat <<HERE
+-libio${p}_a_SOURCES += adc/adcbusy.c adc/adcclose.c adc/adcconv.c
+-libio${p}_a_SOURCES += adc/adcopen.c adc/adcread.c adc/adcsetch.c
+-HERE
+- sed -e 's/\s*\(#.*\)\{0,1\}$//' i2c.ignore | grep -x "$p" > /dev/null 2>&1 && { echo "No i2c." >&2 ; } || cat <<HERE
+-libio${p}_a_SOURCES += i2c/i2cack.c i2c/i2cclose.c i2c/i2cdrdy.c
+-libio${p}_a_SOURCES += i2c/i2cidle.c i2c/i2cnack.c i2c/i2copen.c
+-libio${p}_a_SOURCES += i2c/i2creadc.c i2c/i2creads.c i2c/i2crestart.c
+-libio${p}_a_SOURCES += i2c/i2cstart.c i2c/i2cstop.c i2c/i2cwritec.c
+-libio${p}_a_SOURCES += i2c/i2cwrites.c
+-HERE
+- sed -e 's/\s*\(#.*\)\{0,1\}$//' usart.ignore | grep -x "$p" > /dev/null 2>&1 && { echo "No usart." >&2 ; } || cat <<HERE
+-libio${p}_a_SOURCES += usart/ubaud.c usart/ubusy.c usart/uclose.c
+-libio${p}_a_SOURCES += usart/udrdy.c usart/ugetc.c usart/ugets.c
+-libio${p}_a_SOURCES += usart/uopen.c usart/uputc.c usart/uputs.c
+-libio${p}_a_SOURCES += usart/usartd.c
+-HERE
+- cat <<HERE
+-libio${p}_a_CFLAGS = -p${p} \$(AM_CFLAGS)
+-
+-HERE
+-done
+-
+ cat <<HEREDOC
+ include \$(top_srcdir)/Makefile.common
+
+diff --git a/device/lib/pic16/libm/Makefile.in b/device/lib/pic16/libm/Makefile.in
+index 285c5b8..ad6c293 100644
+--- a/device/lib/pic16/libm/Makefile.in
++++ b/device/lib/pic16/libm/Makefile.in
+@@ -88,10 +88,7 @@ PRE_UNINSTALL = :
+ POST_UNINSTALL = :
+ subdir = libm
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+-am__aclocal_m4_deps = \
+- $(top_srcdir)/../../non-free/lib/pic16/supported-devices.ac \
+- $(top_srcdir)/../../non-free/lib/pic16/processors.ac \
+- $(top_srcdir)/configure.ac
++am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+ DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+@@ -313,8 +310,7 @@ libm18f_a_SOURCES = acosf.c asincosf.c asinf.c atan2f.c atanf.c \
+ frexpf.c isinf.c isnan.c ldexpf.c log10f.c logf.c modff.c \
+ powf.c sincosf.c sincoshf.c sinf.c sinhf.c sqrtf.c tancotf.c \
+ tanf.c tanhf.c
+-AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
+- -I$(top_srcdir)/../../non-free/include/pic16
++AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16
+ #AM_CFLAGS += --no-optimize-goto
+
+ #AM_CFLAGS += --debug-ralloc
+@@ -328,11 +324,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
+ #AM_CFLAGS += --noinduction
+ #AM_CFLAGS += --nojtbound
+ #AM_CFLAGS += --noloopreverse
+-AM_CFLAGS = --std-c11 --asm="$(CCAS)" --no-warn-non-free \
++AM_CFLAGS = --std-c11 --asm="$(CCAS)" \
+ --fomit-frame-pointer --obanksel=9 --denable-peeps \
+ --optimize-cmp --optimize-df --i-code-in-asm @USE_FLOATS@
+-AM_CCASFLAGS = -I$(top_srcdir)/../../include/pic16 \
+- -I$(top_srcdir)/../../non-free/include/pic16 -I$(srcdir)
++AM_CCASFLAGS = -I$(top_srcdir)/../../include/pic16 -I$(srcdir)
+ all: all-am
+
+ .SUFFIXES:
+diff --git a/device/lib/pic16/libsdcc/Makefile.in b/device/lib/pic16/libsdcc/Makefile.in
+index 808b8a5..412dc80 100644
+--- a/device/lib/pic16/libsdcc/Makefile.in
++++ b/device/lib/pic16/libsdcc/Makefile.in
+@@ -88,10 +88,7 @@ PRE_UNINSTALL = :
+ POST_UNINSTALL = :
+ subdir = libsdcc
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+-am__aclocal_m4_deps = \
+- $(top_srcdir)/../../non-free/lib/pic16/supported-devices.ac \
+- $(top_srcdir)/../../non-free/lib/pic16/processors.ac \
+- $(top_srcdir)/configure.ac
++am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+ DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+@@ -414,8 +411,7 @@ libsdcc_a_SOURCES = char/divschar.c char/divuchar.c char/modschar.c \
+ int/modsint.c int/moduint.c int/mulint.c long/divslong.c \
+ long/divulong.c long/modslong.c long/modulong.c long/mullong.c \
+ lregs/lrrest.c lregs/lrst.c stack/stack.S
+-AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
+- -I$(top_srcdir)/../../non-free/include/pic16
++AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16
+ #AM_CFLAGS += --no-optimize-goto
+
+ #AM_CFLAGS += --debug-ralloc
+@@ -429,11 +425,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
+ #AM_CFLAGS += --noinduction
+ #AM_CFLAGS += --nojtbound
+ #AM_CFLAGS += --noloopreverse
+-AM_CFLAGS = --std-c11 --asm="$(CCAS)" --no-warn-non-free \
++AM_CFLAGS = --std-c11 --asm="$(CCAS)" \
+ --fomit-frame-pointer --obanksel=9 --denable-peeps \
+ --optimize-cmp --optimize-df --i-code-in-asm @USE_FLOATS@
+-AM_CCASFLAGS = -I$(top_srcdir)/../../include/pic16 \
+- -I$(top_srcdir)/../../non-free/include/pic16 -I$(srcdir)
++AM_CCASFLAGS = -I$(top_srcdir)/../../include/pic16 -I$(srcdir)
+ all: all-am
+
+ .SUFFIXES:
+diff --git a/device/lib/pic16/startup/Makefile.in b/device/lib/pic16/startup/Makefile.in
+index d57c254..7394a4c 100644
+--- a/device/lib/pic16/startup/Makefile.in
++++ b/device/lib/pic16/startup/Makefile.in
+@@ -89,10 +89,7 @@ PRE_UNINSTALL = :
+ POST_UNINSTALL = :
+ subdir = startup
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+-am__aclocal_m4_deps = \
+- $(top_srcdir)/../../non-free/lib/pic16/supported-devices.ac \
+- $(top_srcdir)/../../non-free/lib/pic16/processors.ac \
+- $(top_srcdir)/configure.ac
++am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+ DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+@@ -309,8 +306,7 @@ libcrt0iz_a_SOURCES = crt0iz.c
+ # Force installation of .o files into $libdir
+ crtdir = $(libdir)
+ crt_DATA = crt0.o crt0i.o crt0iz.o
+-AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
+- -I$(top_srcdir)/../../non-free/include/pic16
++AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16
+ #AM_CFLAGS += --no-optimize-goto
+
+ #AM_CFLAGS += --debug-ralloc
+@@ -324,11 +320,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \
+ #AM_CFLAGS += --noinduction
+ #AM_CFLAGS += --nojtbound
+ #AM_CFLAGS += --noloopreverse
+-AM_CFLAGS = --std-c11 --asm="$(CCAS)" --no-warn-non-free \
++AM_CFLAGS = --std-c11 --asm="$(CCAS)" \
+ --fomit-frame-pointer --obanksel=9 --denable-peeps \
+ --optimize-cmp --optimize-df --i-code-in-asm @USE_FLOATS@
+-AM_CCASFLAGS = -I$(top_srcdir)/../../include/pic16 \
+- -I$(top_srcdir)/../../non-free/include/pic16 -I$(srcdir)
++AM_CCASFLAGS = -I$(top_srcdir)/../../include/pic16 -I$(srcdir)
+ all: all-am
+
+ .SUFFIXES:
+diff --git a/doc/INSTALL.txt b/doc/INSTALL.txt
+index 3c4bc1f..0a6fdd5 100644
+--- a/doc/INSTALL.txt
++++ b/doc/INSTALL.txt
+@@ -18,9 +18,7 @@ To install:
+
+ This will install sdcc binaries into: /usr/local/bin/
+ header files into: /usr/local/share/sdcc/include/
+-non-free header files into: /usr/local/share/sdcc/non-free/include/
+ library files into: /usr/local/share/sdcc/lib/
+-non-free library files into: /usr/local/share/sdcc/non-free/lib/
+ and documentation into: /usr/local/share/sdcc/doc/
+
+ You can test the install by entering:
+@@ -44,9 +42,7 @@ To install:
+
+ By default this will install sdcc binaries into: C:\Program Files\SDCC\bin\
+ header files into: C:\Program Files\SDCC\include\
+-non-free header files into: C:\Program Files\SDCC\non-free\include\
+ library files into: C:\Program Files\SDCC\lib\
+-non-free library files into: C:\Program Files\SDCC\non-free\lib\
+ and documentation into: C:\Program Files\SDCC\doc\
+
+ You can test the install by opening a DOS box and entering:
+@@ -75,9 +71,7 @@ To install:
+
+ This will install sdcc binaries into: /Developer/sdcc/bin/
+ header files into: /Developer/sdcc/share/sdcc/include/
+-non-free header files into: /Developer/sdcc/share/sdcc/non-free/include/
+ library files into: /Developer/sdcc/share/sdcc/lib/
+-non-free library files into: /Developer/sdcc/share/sdcc/non-free/lib/
+ and documentation into: /Developer/sdcc/share/sdcc/doc/
+
+ You can test the install by entering:
+diff --git a/doc/README.txt b/doc/README.txt
+index 3720fd6..5a0d0a8 100644
+--- a/doc/README.txt
++++ b/doc/README.txt
+@@ -37,10 +37,9 @@ Exception are pic device libraries and header files which are derived
+ from Microchip header (.inc) and linker script (.lkr) files. Microchip
+ requires that "The header files should state that they are only to be
+ used with authentic Microchip devices" which makes them incompatible
+-with the GPL. Pic device libraries and header files are located at
+-non-free/lib and non-free/include directories respectively. Sdcc should
+-be run with the --use-non-free command line option in order to include
+-non-free header files and libraries.
++with the GPL. These non-free libraries and header files (and the build
++and run-time options that enable their use) are omitted in the SDCC
++package distributed with GNU Guix.
+
+ However: Many think that the Microchip requirement is not legally enforceable,
+ arguing that the header files only contain noncopyrightable facts.
+diff --git a/doc/sdccman.lyx b/doc/sdccman.lyx
+index 9ba31eb..3d69b5a 100644
+--- a/doc/sdccman.lyx
++++ b/doc/sdccman.lyx
+@@ -1093,54 +1093,9 @@ A possible exception are pic device libraries and header files which are
+ to be used with authentic Microchip devices" which makes them incompatible
+ with the GPL, if Microchip has any copyright in them (which might depend
+ on local copyright laws).
+- Pic device libraries and header files are located at non-free/lib and non-free/
+-include directories respectively.
+- SDCC should be run with the
+-\series bold
+--
+-\begin_inset ERT
+-status collapsed
+-
+-\begin_layout Plain Layout
+-
+-
+-\backslash
+-/
+-\end_layout
+-
+-\end_inset
+-
+--
+-\series default
+-use-non-free
+-\series bold
+-
+-\begin_inset Index idx
+-status collapsed
+-
+-\begin_layout Plain Layout
+--
+-\begin_inset ERT
+-status collapsed
+-
+-\begin_layout Plain Layout
+-
+-
+-\backslash
+-/
+-\end_layout
+-
+-\end_inset
+-
+--use-non-free
+-\end_layout
+-
+-\end_inset
+-
+-
+-\series default
+- command line option in order to include non-free header files and libraries.
+-
++ These non-free libraries and header files (and the build and run-time options
++ that enable their use) are omitted in the SDCC package distributed with
++ GNU Guix.
+ \end_layout
+
+ \begin_layout Itemize
+@@ -2943,18 +2898,6 @@ include_dir_suffix environment variable, see table below
+ \end_inset
+
+
+-\begin_inset space ~
+-\end_inset
+-
+-non_free_include_dir_suffix environment variable, see table below
+-\end_layout
+-
+-\begin_layout Labeling
+-\labelwidthstring 00.00.0000
+-\begin_inset space ~
+-\end_inset
+-
+-
+ \begin_inset space ~
+ \end_inset
+
+@@ -2967,22 +2910,6 @@ lib_dir_suffix environment variable, see table below
+ \end_inset
+
+
+-\begin_inset space ~
+-\end_inset
+-
+-
+-\begin_inset space ~
+-\end_inset
+-
+-non_free_lib_dir_suffix environment variable, see table below
+-\end_layout
+-
+-\begin_layout Labeling
+-\labelwidthstring 00.00.0000
+-\begin_inset space ~
+-\end_inset
+-
+-
+ \begin_inset space ~
+ \end_inset
+
+@@ -3481,7 +3408,7 @@ These defaults are:
+ \begin_layout Standard
+ \align center
+ \begin_inset Tabular
+-<lyxtabular version="3" rows="11" columns="3">
++<lyxtabular version="3" rows="9" columns="3">
+ <features tabularvalignment="middle">
+ <column alignment="block" valignment="top" width="0in">
+ <column alignment="block" valignment="top" width="0in">
+@@ -3765,68 +3692,6 @@ sdcc/include
+ include
+ \end_layout
+
+-\end_inset
+-</cell>
+-</row>
+-<row>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-
+-\emph on
+-NON_FREE_INCLUDE_DIR_SUFFIX
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-sdcc/non-free/include
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-non-free/include
+-\end_layout
+-
+-\end_inset
+-</cell>
+-</row>
+-<row>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-
+-\emph on
+-LIB_DIR_SUFFIX
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-sdcc/lib
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-lib
+-\end_layout
+-
+ \end_inset
+ </cell>
+ </row>
+@@ -3837,7 +3702,7 @@ lib
+ \begin_layout Plain Layout
+
+ \emph on
+-NON_FREE_LIB_DIR_SUFFIX
++LIB_DIR_SUFFIX
+ \end_layout
+
+ \end_inset
+@@ -3846,7 +3711,7 @@ NON_FREE_LIB_DIR_SUFFIX
+ \begin_inset Text
+
+ \begin_layout Plain Layout
+-sdcc/non-free/lib
++sdcc/lib
+ \end_layout
+
+ \end_inset
+@@ -3855,7 +3720,7 @@ sdcc/non-free/lib
+ \begin_inset Text
+
+ \begin_layout Plain Layout
+-non-free/lib
++lib
+ \end_layout
+
+ \end_inset
+@@ -4254,20 +4119,6 @@ include
+ \end_inset
+
+
+-\backslash
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-non_free_include_dir_suffix=
+-\begin_inset Quotes srd
+-\end_inset
+-
+-non-free/include
+-\begin_inset Quotes srd
+-\end_inset
+-
+-
+ \backslash
+
+ \begin_inset Newline newline
+@@ -4282,20 +4133,6 @@ lib
+ \end_inset
+
+
+-\backslash
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-non_free_lib_dir_suffix=
+-\begin_inset Quotes srd
+-\end_inset
+-
+-non-free/lib
+-\begin_inset Quotes srd
+-\end_inset
+-
+-
+ \backslash
+
+ \begin_inset Newline newline
+@@ -4476,20 +4313,6 @@ include
+ \end_inset
+
+
+-\backslash
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-non_free_include_dir_suffix=
+-\begin_inset Quotes srd
+-\end_inset
+-
+-non-free/include
+-\begin_inset Quotes srd
+-\end_inset
+-
+-
+ \backslash
+
+ \begin_inset Newline newline
+@@ -4504,20 +4327,6 @@ lib
+ \end_inset
+
+
+-\backslash
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-non_free_lib_dir_suffix=
+-\begin_inset Quotes srd
+-\end_inset
+-
+-non-free/lib
+-\begin_inset Quotes srd
+-\end_inset
+-
+-
+ \backslash
+
+ \begin_inset Newline newline
+@@ -4614,7 +4423,7 @@ Install paths
+ \begin_layout Standard
+ \align center
+ \begin_inset Tabular
+-<lyxtabular version="3" rows="7" columns="4">
++<lyxtabular version="3" rows="5" columns="4">
+ <features tabularvalignment="middle">
+ <column alignment="left" valignment="top">
+ <column alignment="left" valignment="top" width="4.5cm">
+@@ -4770,64 +4579,6 @@ include
+ <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+ \begin_inset Text
+
+-\begin_layout Plain Layout
+-Non-free include files
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-
+-\emph on
+-$DATADIR/non-free/
+-\emph default
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\emph on
+-$INCLUDE_DIR_SUFFIX
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-/usr/local/share/
+-\begin_inset Newline newline
+-\end_inset
+-
+-sdcc/non-free/include
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-
+-\backslash
+-sdcc
+-\backslash
+-non-free
+-\backslash
+-include
+-\end_layout
+-
+-\end_inset
+-</cell>
+-</row>
+-<row>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+ \begin_layout Plain Layout
+ Library file**
+ \end_layout
+@@ -4877,64 +4628,6 @@ sdcc
+ lib
+ \end_layout
+
+-\end_inset
+-</cell>
+-</row>
+-<row>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-Library file**
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-
+-\emph on
+-$DATADIR/non-free/
+-\emph default
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\emph on
+-$LIB_DIR_SUFFIX
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-/usr/local/share/
+-\begin_inset Newline newline
+-\end_inset
+-
+-sdcc/non-free/lib
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-
+-\backslash
+-sdcc
+-\backslash
+-non-free
+-\backslash
+-lib
+-\end_layout
+-
+ \end_inset
+ </cell>
+ </row>
+@@ -5257,7 +4950,7 @@ $PATH
+ \begin_layout Standard
+ \align center
+ \begin_inset Tabular
+-<lyxtabular version="3" rows="9" columns="4">
++<lyxtabular version="3" rows="6" columns="4">
+ <features tabularvalignment="middle">
+ <column alignment="block" valignment="top" width="0.5cm">
+ <column alignment="block" valignment="top" width="4.8cm">
+@@ -5535,203 +5228,13 @@ include
+ </cell>
+ </row>
+ <row>
+-<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
++<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+ \begin_inset Text
+
+ \begin_layout Plain Layout
+ 5
+ \end_layout
+
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-
+-\emph on
+-$DATADIR/
+-\emph default
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\emph on
+-$INCLUDE_DIR_SUFFIX
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-/usr/local/share/
+-\begin_inset Newline newline
+-\end_inset
+-
+-sdcc/include
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-(not on Win32)
+-\end_layout
+-
+-\end_inset
+-</cell>
+-</row>
+-<row>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-6
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-$SDCC_HOME/
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\emph on
+-$PREFIX2DATA_DIR/
+-\emph default
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\emph on
+-non-free/
+-\emph default
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\emph on
+-$INCLUDE_DIR_SUFFIX
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-$SDCC_HOME/share/
+-\begin_inset Newline newline
+-\end_inset
+-
+-sdcc/non-free/include
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-$SDCC_HOME
+-\backslash
+-non-free
+-\backslash
+-include
+-\end_layout
+-
+-\end_inset
+-</cell>
+-</row>
+-<row>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-7
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-path(argv[0])/
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\emph on
+-$BIN2DATADIR/
+-\emph default
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\emph on
+-non-free/
+-\emph default
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\emph on
+-$INCLUDE_DIR_SUFFIX
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-path(argv[0])/../
+-\begin_inset Newline newline
+-\end_inset
+-
+-sdcc/non-free/include
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-path(argv[0])
+-\backslash
+-..
+-\backslash
+-non-free
+-\backslash
+-include
+-\end_layout
+-
+-\end_inset
+-</cell>
+-</row>
+-<row>
+-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-8
+-\end_layout
+-
+ \end_inset
+ </cell>
+ <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+@@ -5747,21 +5250,13 @@ $DATADIR/
+ \end_inset
+
+
+-\emph on
+-non-free/
+-\emph default
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+ \emph on
+ $INCLUDE_DIR_SUFFIX
+ \end_layout
+
+ \end_inset
+ </cell>
+-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
++<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+ \begin_inset Text
+
+ \begin_layout Plain Layout
+@@ -5769,7 +5264,7 @@ $INCLUDE_DIR_SUFFIX
+ \begin_inset Newline newline
+ \end_inset
+
+-sdcc/non-free/include
++sdcc/include
+ \end_layout
+
+ \end_inset
+@@ -5867,7 +5362,7 @@ model
+ \begin_layout Standard
+ \align center
+ \begin_inset Tabular
+-<lyxtabular version="3" rows="10" columns="4">
++<lyxtabular version="3" rows="6" columns="4">
+ <features tabularvalignment="middle">
+ <column alignment="block" valignment="top" width="0.5cm">
+ <column alignment="block" valignment="top" width="4.5cm">
+@@ -6147,7 +5642,7 @@ lib
+ </cell>
+ </row>
+ <row>
+-<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
++<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+ \begin_inset Text
+
+ \begin_layout Plain Layout
+@@ -6156,7 +5651,7 @@ lib
+
+ \end_inset
+ </cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
++<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+ \begin_inset Text
+
+ \begin_layout Plain Layout
+@@ -6187,7 +5682,7 @@ $LIB_DIR_SUFFIX/
+
+ \end_inset
+ </cell>
+-<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
++<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+ \begin_inset Text
+
+ \begin_layout Plain Layout
+@@ -6202,7 +5697,7 @@ lib/
+
+ \end_inset
+ </cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
++<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+ \begin_inset Text
+
+ \begin_layout Plain Layout
+@@ -6225,308 +5720,6 @@ lib
+ <model>
+ \end_layout
+
+-\end_inset
+-</cell>
+-</row>
+-<row>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-6
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-
+-\emph on
+-$DATADIR/non-free/
+-\emph default
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\emph on
+-$LIB_DIR_SUFFIX/
+-\emph default
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\emph on
+-<model>
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-/usr/local/share/sdcc/
+-\begin_inset Newline newline
+-\end_inset
+-
+-lib/
+-\emph on
+-<model>
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-(not on Win32)
+-\end_layout
+-
+-\end_inset
+-</cell>
+-</row>
+-<row>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-7
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-$SDCC_HOME/
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\emph on
+-$PREFIX2DATA_DIR/
+-\emph default
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\emph on
+-non-free/
+-\emph default
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\emph on
+-$LIB_DIR_SUFFIX/
+-\emph default
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\emph on
+-<model>
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-$SDCC_HOME/share/sdcc/
+-\begin_inset Newline newline
+-\end_inset
+-
+-non-free/lib/
+-\emph on
+-<model>
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-$SDCC_HOME
+-\backslash
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-lib
+-\backslash
+-non-free
+-\emph on
+-
+-\backslash
+-<model>
+-\end_layout
+-
+-\end_inset
+-</cell>
+-</row>
+-<row>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-8
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-path(argv[0])/
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\emph on
+-$BIN2DATADIR/
+-\emph default
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\emph on
+-non-free/
+-\emph default
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\emph on
+-$LIB_DIR_SUFFIX/
+-\emph default
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\emph on
+-<model>
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-path(argv[0])/../sdcc/
+-\begin_inset Newline newline
+-\end_inset
+-
+-non-free/lib/
+-\emph on
+-<model>
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-path(argv[0])
+-\backslash
+-..
+-\backslash
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-lib
+-\backslash
+-non-free
+-\emph on
+-
+-\backslash
+-<model>
+-\end_layout
+-
+-\end_inset
+-</cell>
+-</row>
+-<row>
+-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-9
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-
+-\emph on
+-$DATADIR/non-free/
+-\emph default
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\emph on
+-$LIB_DIR_SUFFIX/
+-\emph default
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\emph on
+-<model>
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-/usr/local/share/sdcc/
+-\begin_inset Newline newline
+-\end_inset
+-
+-non-free/lib/
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\emph on
+-<model>
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-(not on Win32)
+-\end_layout
+-
+ \end_inset
+ </cell>
+ </row>
+@@ -8801,14 +7994,6 @@ In <installdir>/share/sdcc/include
+ the include files
+ \end_layout
+
+-\begin_layout Standard
+-In <installdir>/share/sdcc/non-free/include
+-\end_layout
+-
+-\begin_layout Itemize
+-the non-free include files
+-\end_layout
+-
+ \begin_layout Standard
+ In <installdir>/share/sdcc/lib
+ \end_layout
+@@ -8817,14 +8002,6 @@ In <installdir>/share/sdcc/lib
+ the src and target subdirectories with the precompiled relocatables.
+ \end_layout
+
+-\begin_layout Standard
+-In <installdir>/share/sdcc/non-free/lib
+-\end_layout
+-
+-\begin_layout Itemize
+-the src and target subdirectories with the non-free precompiled relocatables.
+-\end_layout
+-
+ \begin_layout Standard
+ In <installdir>/share/sdcc/doc
+ \end_layout
+@@ -15590,66 +14767,6 @@ splint
+ myprogram.c
+ \end_layout
+
+-\begin_layout Labeling
+-\labelwidthstring 00.00.0000
+-
+-\series bold
+--
+-\begin_inset ERT
+-status collapsed
+-
+-\begin_layout Plain Layout
+-
+-
+-\backslash
+-/
+-\end_layout
+-
+-\end_inset
+-
+--use-non-free
+-\series default
+-
+-\begin_inset Index idx
+-status collapsed
+-
+-\begin_layout Plain Layout
+--
+-\begin_inset ERT
+-status collapsed
+-
+-\begin_layout Plain Layout
+-
+-
+-\backslash
+-/
+-\end_layout
+-
+-\end_inset
+-
+--use-non-free
+-\end_layout
+-
+-\end_inset
+-
+-
+-\begin_inset CommandInset label
+-LatexCommand label
+-name "lyx:--use-non-free"
+-
+-\end_inset
+-
+- Search / include non-free licensed libraries and header files, located
+- under the non-free directory - see section
+-\begin_inset CommandInset ref
+-LatexCommand ref
+-reference "subsec:Search-Paths"
+-
+-\end_inset
+-
+-
+-\end_layout
+-
+ \begin_layout Subsection
+ Linker Options
+ \begin_inset Index idx
+@@ -45248,66 +44365,9 @@ http://sourceforge.net/projects/gputils
+ Pic device specific header and c source files are automatically generated
+ from MPLAB include files, which are published by Microchip with a special
+ requirement that they are only to be used with authentic Microchip devices.
+- This reqirement prevents to publish generated header and c source files
+- under the GPL compatible license, so they are located in non-free directory
+- (see section
+-\begin_inset CommandInset ref
+-LatexCommand ref
+-reference "subsec:Search-Paths"
+-
+-\end_inset
+-
+-).
+- In order to include them in include and library search paths, the
+-\series bold
+--
+-\begin_inset ERT
+-status collapsed
+-
+-\begin_layout Plain Layout
+-
+-
+-\backslash
+-/
+-\end_layout
+-
+-\end_inset
+-
+--use-non-free
+-\begin_inset Index idx
+-status collapsed
+-
+-\begin_layout Plain Layout
+--
+-\begin_inset ERT
+-status collapsed
+-
+-\begin_layout Plain Layout
+-
+-
+-\backslash
+-/
+-\end_layout
+-
+-\end_inset
+-
+--use-non-free
+-\end_layout
+-
+-\end_inset
+-
+-
+-\series default
+- command line option should be defined.
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-NOTE: the compiled code, which use non-free pic device specific libraries,
+- is not GPL compatible!
++ As this restriction is incompatible with the goal of software freedom,
++ header files and libraries generated from these files are not included
++ in the SDCC package distributed with Guix.
+ \begin_inset Newline newline
+ \end_inset
+
+@@ -45361,7 +44421,7 @@ Makefile
+ \begin_inset space ~
+ \end_inset
+
+-sdcc -V --use-non-free -mpic14 -p16f877 -c $<
++sdcc -V -mpic14 -p16f877 -c $<
+ \begin_inset Newline newline
+ \end_inset
+
+@@ -45455,7 +44515,7 @@ Makefile
+ \begin_inset space ~
+ \end_inset
+
+-sdcc -S -V --use-non-free -mpic14 -p16f877 $<
++sdcc -S -V -mpic14 -p16f877 $<
+ \begin_inset Newline newline
+ \end_inset
+
+@@ -45737,47 +44797,6 @@ status collapsed
+ \begin_layout Plain Layout
+
+
+-\backslash
+-/
+-\end_layout
+-
+-\end_inset
+-
+--use-non-free
+-\begin_inset Index idx
+-status collapsed
+-
+-\begin_layout Plain Layout
+-PIC14!Options!-
+-\begin_inset ERT
+-status collapsed
+-
+-\begin_layout Plain Layout
+-
+-
+-\backslash
+-/
+-\end_layout
+-
+-\end_inset
+-
+--use-non-free
+-\end_layout
+-
+-\end_inset
+-
+- make non-free device headers and libraries available in the compiler's
+- search paths (implicit -I and -L options)
+-\end_layout
+-
+-\begin_layout Description
+--
+-\begin_inset ERT
+-status collapsed
+-
+-\begin_layout Plain Layout
+-
+-
+ \backslash
+ /
+ \end_layout
+@@ -46650,47 +45669,6 @@ status collapsed
+ -all-callee-saves
+ \end_layout
+
+-\begin_layout Description
+--
+-\begin_inset ERT
+-status collapsed
+-
+-\begin_layout Plain Layout
+-
+-
+-\backslash
+-/
+-\end_layout
+-
+-\end_inset
+-
+--use-non-free
+-\begin_inset Index idx
+-status collapsed
+-
+-\begin_layout Plain Layout
+-PIC16!Options!-
+-\begin_inset ERT
+-status collapsed
+-
+-\begin_layout Plain Layout
+-
+-
+-\backslash
+-/
+-\end_layout
+-
+-\end_inset
+-
+--use-non-free
+-\end_layout
+-
+-\end_inset
+-
+- Make non-free device headers and libraries available in the compiler's
+- search paths (implicit -I and -L options).
+-\end_layout
+-
+ \begin_layout Subsection
+ Port Specific Options
+ \begin_inset Index idx
+@@ -47967,188 +46945,6 @@ Linker
+ \end_inset
+
+
+-\end_layout
+-
+-\begin_layout Standard
+-If the
+-\series bold
+--
+-\begin_inset ERT
+-status collapsed
+-
+-\begin_layout Plain Layout
+-
+-
+-\backslash
+-/
+-\end_layout
+-
+-\end_inset
+-
+--use-non-free
+-\begin_inset Index idx
+-status collapsed
+-
+-\begin_layout Plain Layout
+--
+-\begin_inset ERT
+-status collapsed
+-
+-\begin_layout Plain Layout
+-
+-
+-\backslash
+-/
+-\end_layout
+-
+-\end_inset
+-
+--use-non-free
+-\end_layout
+-
+-\end_inset
+-
+-
+-\series default
+- command line option is specified, non-free directories are searched:
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\begin_inset Separator latexpar
+-\end_inset
+-
+-
+-\end_layout
+-
+-\begin_layout Standard
+-\align center
+-\begin_inset Tabular
+-<lyxtabular version="3" rows="3" columns="4">
+-<features tabularvalignment="middle">
+-<column alignment="center" valignment="top">
+-<column alignment="center" valignment="top">
+-<column alignment="center" valignment="top">
+-<column alignment="center" valignment="top">
+-<row>
+-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-Directory
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-Description
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-Target
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-Command prefix
+-\end_layout
+-
+-\end_inset
+-</cell>
+-</row>
+-<row>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-PREFIX/sdcc/non-free/include/pic16
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-PIC16 specific non-free headers
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-Compiler
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+--I
+-\end_layout
+-
+-\end_inset
+-</cell>
+-</row>
+-<row>
+-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-PREFIX/sdcc/non-free/lib/pic16
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-PIC16 specific non-free libraries
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+-Linker
+-\end_layout
+-
+-\end_inset
+-</cell>
+-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+-\begin_inset Text
+-
+-\begin_layout Plain Layout
+--L
+-\end_layout
+-
+-\end_inset
+-</cell>
+-</row>
+-</lyxtabular>
+-
+-\end_inset
+-
+-
+ \end_layout
+
+ \begin_layout Subsection
+@@ -48844,66 +47640,9 @@ name "subsec:PIC16_Header-Files-and-Libraries"
+ Pic device specific header and c source files are automatically generated
+ from MPLAB include files, which are published by Microchip with a special
+ requirement that they are only to be used with authentic Microchip devices.
+- This requirement prevents to publish generated header and c source files
+- under the GPL compatible license, so they are located in the non-free directory
+- (see section
+-\begin_inset CommandInset ref
+-LatexCommand ref
+-reference "subsec:Search-Paths"
+-
+-\end_inset
+-
+-).
+- In order to include them in include and library search paths, the
+-\series bold
+--
+-\begin_inset ERT
+-status collapsed
+-
+-\begin_layout Plain Layout
+-
+-
+-\backslash
+-/
+-\end_layout
+-
+-\end_inset
+-
+--use-non-free
+-\begin_inset Index idx
+-status collapsed
+-
+-\begin_layout Plain Layout
+--
+-\begin_inset ERT
+-status collapsed
+-
+-\begin_layout Plain Layout
+-
+-
+-\backslash
+-/
+-\end_layout
+-
+-\end_inset
+-
+--use-non-free
+-\end_layout
+-
+-\end_inset
+-
+-
+-\series default
+- command line option should be defined.
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-NOTE: the compiled code, which use non-free pic device specific libraries,
+- is not GPL compatible!
++ As this restriction is incompatible with the goal of software freedom,
++ header files and libraries generated from these files are not included
++ in the SDCC package distributed with Guix.
+ \end_layout
+
+ \begin_layout Subsection
+@@ -49149,195 +47888,6 @@ vfprintf.c
+ should also work, but is untested.
+ \end_layout
+
+-\begin_layout Subsection
+-Adding New Devices to the Port
+-\end_layout
+-
+-\begin_layout Standard
+-Adding support for a new 16
+-\begin_inset ERT
+-status collapsed
+-
+-\begin_layout Plain Layout
+-
+-
+-\backslash
+-,
+-\end_layout
+-
+-\end_inset
+-
+-bit PIC MCU requires the following steps:
+-\end_layout
+-
+-\begin_layout Enumerate
+-Create picDEVICE.c and picDEVICE.h from pDEVICE.inc using
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\family typewriter
+-perl /path/to/sdcc/support/scripts/inc2h-pic16.pl
+-\backslash
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-/path/to/gputils/header/pDEVICE.inc
+-\end_layout
+-
+-\begin_layout Enumerate
+-
+-\family typewriter
+-mv picDEVICE.h /path/to/sdcc/device/non-free/include/pic16
+-\end_layout
+-
+-\begin_layout Enumerate
+-
+-\family typewriter
+-mv picDEVICE.c /path/to/sdcc/device/non-free/lib/pic16/libdev
+-\end_layout
+-
+-\begin_layout Enumerate
+-Either
+-\begin_inset Separator latexpar
+-\end_inset
+-
+-
+-\end_layout
+-
+-\begin_deeper
+-\begin_layout Enumerate
+-add the new device to
+-\family typewriter
+-/path/to/sdcc/device/lib/pic16/libio/*.ignore
+-\family default
+- to suppress building any of the I/O libraries for the new device
+-\begin_inset Foot
+-status collapsed
+-
+-\begin_layout Plain Layout
+-In fact, the
+-\family typewriter
+-.ignore
+-\family default
+- files are only used when auto-generating
+-\family typewriter
+-Makefile.am
+-\family default
+- using the
+-\family typewriter
+-.../libio/mkmk.sh
+-\family default
+- script.
+-\end_layout
+-
+-\end_inset
+-
+-, or
+-\end_layout
+-
+-\begin_layout Enumerate
+-add the device (family) to
+-\family typewriter
+-/path/to/sdcc/support/scripts/pic18fam-h-gen.pl
+-\family default
+- to assign I/O styles, run the
+-\family typewriter
+-pic18fam-h-gen.pl
+-\family default
+- script to generate
+-\family typewriter
+-pic18fam.h.gen
+-\family default
+-, replace your existing
+-\family typewriter
+-pic18fam.h
+-\family default
+- with the generated file, and (if required) implement new I/O styles in
+-
+-\family typewriter
+-/path/to/sdcc/device/include/pic16/{adc,i2c,usart}.h
+-\family default
+- and
+-\family typewriter
+-/path/to/sdcc/device/lib/pic16/libio/*/*.
+-\end_layout
+-
+-\end_deeper
+-\begin_layout Enumerate
+-Edit
+-\family typewriter
+-/path/to/sdcc/device/include/pic16/pic18fregs.h
+-\family default
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-The file format is self-explanatory, just add
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\family typewriter
+-#elif defined(picDEVICE)
+-\begin_inset Newline newline
+-\end_inset
+-
+-#
+-\begin_inset ERT
+-status collapsed
+-
+-\begin_layout Plain Layout
+-
+-
+-\backslash
+-
+-\backslash
+-
+-\end_layout
+-
+-\end_inset
+-
+-include <picDEVICE.h>
+-\family default
+-
+-\begin_inset Newline newline
+-\end_inset
+-
+-at the right place (keep the file sorted, please).
+-\end_layout
+-
+-\begin_layout Enumerate
+-Edit
+-\family typewriter
+-/path/to/sdcc/device/include/pic16devices.txt
+-\begin_inset Newline newline
+-\end_inset
+-
+-
+-\family default
+-Copy and modify an existing entry or create a new one and insert it at the
+- correct place (keep the file sorted, please).
+-\end_layout
+-
+-\begin_layout Enumerate
+-
+-\family typewriter
+-( cd /path/to/sdcc/device/non-free/lib/pic16 && sh update.sh )
+-\end_layout
+-
+-\begin_layout Enumerate
+-Recompile the pic16 libraries as described in
+-\begin_inset CommandInset ref
+-LatexCommand ref
+-reference "subsec:pic16Libraries"
+-
+-\end_inset
+-
+- or just configure and build sdcc again from scratch (recommended).
+-\end_layout
+-
+ \begin_layout Subsection
+ Memory Models
+ \end_layout
+@@ -74082,6 +72632,12 @@ This document was initially written by Sandeep Dutta and updated by SDCC
+ developers.
+ \end_layout
+
++\begin_layout Standard
++It has been modified from the original to reflect the removal of non-free
++ components and related functionality in the SDCC package distributed with
++ GNU Guix.
++\end_layout
++
+ \begin_layout Standard
+ All product names mentioned herein may be trademarks
+ \begin_inset Index idx
+diff --git a/sdcc.spec b/sdcc.spec
+index 85ae200..8e0ef4b 100644
+--- a/sdcc.spec
++++ b/sdcc.spec
+@@ -89,9 +89,7 @@ rm -rf $RPM_BUILD_ROOT
+ %files common
+ %defattr(-,root,root)
+ /usr/share/sdcc/include
+-/usr/share/sdcc/non-free/include
+ /usr/share/sdcc/lib
+-/usr/share/sdcc/non-free/lib
+
+ %files doc
+ %defattr(-,root,root)
+@@ -102,6 +100,8 @@ rm -rf $RPM_BUILD_ROOT
+ - version updated to 4.2.0
+ * Sat Feb 20 2021 - pkk AT spth.de
+ - version updated to 4.0.0
++* Tue Dec 08 2020 - simon AT simonsouth.net
++- removed non-free include and lib directories
+ * Sat Jan 18 2020 - pkk AT spth.de
+ - version updated to 4.0.0
+ * Fri Apr 05 2019 - krauseph AT informatik.uni-freiburg.de
+diff --git a/sdcc_vc.h.in b/sdcc_vc.h.in
+index 8cf401b..19f5113 100644
+--- a/sdcc_vc.h.in
++++ b/sdcc_vc.h.in
+@@ -23,8 +23,6 @@
+
+ #define INCLUDE_DIR_SUFFIX "\\include"
+ #define LIB_DIR_SUFFIX "\\lib"
+-#define NON_FREE_INCLUDE_DIR_SUFFIX "\\non-free\\include"
+-#define NON_FREE_LIB_DIR_SUFFIX "\\non-free\\lib"
+
+ #define BIN2DATA_DIR "\\.."
+ #define PREFIX2BIN_DIR "\\bin"
+diff --git a/sdccconf_in.h b/sdccconf_in.h
+index ca8d69f..980af8d 100644
+--- a/sdccconf_in.h
++++ b/sdccconf_in.h
+@@ -100,12 +100,6 @@
+ /* XXX */
+ #undef LIB_DIR_SUFFIX
+
+-/* XXX */
+-#undef NON_FREE_INCLUDE_DIR_SUFFIX
+-
+-/* XXX */
+-#undef NON_FREE_LIB_DIR_SUFFIX
+-
+ /* Define to 1 to disable the AVR port */
+ #undef OPT_DISABLE_AVR
+
+@@ -133,9 +127,6 @@
+ /* XXX */
+ #undef OPT_DISABLE_MOS65C02
+
+-/* XXX */
+-#undef OPT_DISABLE_NON_FREE
+-
+ /* XXX */
+ #undef OPT_DISABLE_PACKIHX
+
+diff --git a/src/SDCCglobl.h b/src/SDCCglobl.h
+index b49fa1b..d357169 100644
+--- a/src/SDCCglobl.h
++++ b/src/SDCCglobl.h
+@@ -287,7 +287,6 @@ struct options
+ int stack_size; /* MCS51/DS390 - Tells the linker to allocate this space for stack */
+ int acall_ajmp; /* MCS51 - Use acall/ajmp instead of lcall/ljmp */
+ int no_ret_without_call; /* MCS51 - Do not use ret independent of acall/lcall */
+- int use_non_free; /* Search / include non-free licensed libraries and header files */
+ /* starting address of the segments */
+ int xstack_loc; /* initial location of external stack */
+ int stack_loc; /* initial value of internal stack pointer */
+diff --git a/src/SDCCmain.c b/src/SDCCmain.c
+index bc1493d..e775988 100644
+--- a/src/SDCCmain.c
++++ b/src/SDCCmain.c
+@@ -151,7 +151,6 @@ char buffer[PATH_MAX * 2];
+ #define OPTION_DATA_SEG "--dataseg"
+ #define OPTION_DOLLARS_IN_IDENT "--fdollars-in-identifiers"
+ #define OPTION_SIGNED_CHAR "--fsigned-char"
+-#define OPTION_USE_NON_FREE "--use-non-free"
+ #define OPTION_PEEP_RETURN "--peep-return"
+ #define OPTION_NO_PEEP_RETURN "--no-peep-return"
+ #define OPTION_NO_OPTSDCC_IN_ASM "--no-optsdcc-in-asm"
+@@ -209,7 +208,6 @@ static const OPTION optionsTable[] = {
+ {0, OPTION_STD_SDCC2X, NULL, "Use ISO C2X standard with SDCC extensions"},
+ {0, OPTION_DOLLARS_IN_IDENT, &options.dollars_in_ident, "Permit '$' as an identifier character"},
+ {0, OPTION_SIGNED_CHAR, &options.signed_char, "Make \"char\" signed by default"},
+- {0, OPTION_USE_NON_FREE, &options.use_non_free, "Search / include non-free licensed libraries and header files"},
+
+ {0, NULL, NULL, "Code generation options"},
+ {'m', NULL, NULL, "Set the port to use e.g. -mz80."},
+@@ -2132,10 +2130,6 @@ preProcess (char **envp)
+ else
+ addSet (&preArgvSet, Safe_strdup ("-D__SDCC_CHAR_UNSIGNED"));
+
+- /* set the macro for non-free */
+- if (options.use_non_free)
+- addSet (&preArgvSet, Safe_strdup ("-D__SDCC_USE_NON_FREE"));
+-
+ /* set the macro for large model */
+ switch (options.model)
+ {
+@@ -2365,12 +2359,6 @@ setIncludePath (void)
+ * 6. - $SDCC_HOME/PREFIX2DATA_DIR/INCLUDE_DIR_SUFFIX
+ * 7. - path(argv[0])/BIN2DATA_DIR/INCLUDE_DIR_SUFFIX
+ * 8. - DATADIR/INCLUDE_DIR_SUFFIX (only on *nix)
+- * 9. - $SDCC_HOME/PREFIX2DATA_DIR/NON_FREE_INCLUDE_DIR_SUFFIX/target
+- * 10. - path(argv[0])/BIN2DATA_DIR/NON_FREE_INCLUDE_DIR_SUFFIX/target
+- * 11. - DATADIR/NON_FREE_INCLUDE_DIR_SUFFIX/target (only on *nix)
+- * 12. - $SDCC_HOME/PREFIX2DATA_DIR/NON_FREE_INCLUDE_DIR_SUFFIX
+- * 13. - path(argv[0])/BIN2DATA_DIR/NON_FREE_INCLUDE_DIR_SUFFIX
+- * 14. - DATADIR/NON_FREE_INCLUDE_DIR_SUFFIX (only on *nix)
+ */
+
+ if (!options.nostdinc)
+@@ -2386,17 +2374,6 @@ setIncludePath (void)
+ includeDirsSet = processStrSet (includeDirsSet, NULL, port->target, NULL);
+ mergeSets (&includeDirsSet, tempSet);
+
+- if (options.use_non_free)
+- {
+- set *tempSet1;
+-
+- tempSet = processStrSet (dataDirsSet, NULL, NON_FREE_INCLUDE_DIR_SUFFIX, NULL);
+- tempSet1 = processStrSet (tempSet, NULL, DIR_SEPARATOR_STRING, NULL);
+- tempSet1 = processStrSet (tempSet1, NULL, port->target, NULL);
+- mergeSets (&tempSet1, tempSet);
+- mergeSets (&includeDirsSet, tempSet1);
+- }
+-
+ if ((p = getenv (SDCC_INCLUDE_NAME)) != NULL)
+ {
+ struct dbuf_s dbuf;
+@@ -2421,9 +2398,6 @@ setLibPath (void)
+ * 3. - $SDCC_HOME/PREFIX2DATA_DIR/LIB_DIR_SUFFIX/<model>
+ * 4. - path(argv[0])/BIN2DATA_DIR/LIB_DIR_SUFFIX/<model>
+ * 5. - DATADIR/LIB_DIR_SUFFIX/<model> (only on *nix)
+- * 6. - $SDCC_HOME/PREFIX2DATA_DIR/NON_FREE_LIB_DIR_SUFFIX/<model>
+- * 7. - path(argv[0])/BIN2DATA_DIR/NON_FREE_LIB_DIR_SUFFIX/<model>
+- * 8. - DATADIR/NON_FREE_LIB_DIR_SUFFIX/<model> (only on *nix)
+ */
+
+ if (!options.nostdlib)
+@@ -2440,13 +2414,6 @@ setLibPath (void)
+ dbuf_makePath (&dbuf, LIB_DIR_SUFFIX, port->general.get_model ? port->general.get_model () : targetname);
+ libDirsSet = processStrSet (dataDirsSet, NULL, dbuf_c_str (&dbuf), NULL);
+
+- if (options.use_non_free)
+- {
+- dbuf_set_length (&dbuf, 0);
+- dbuf_makePath (&dbuf, NON_FREE_LIB_DIR_SUFFIX, port->general.get_model ? port->general.get_model () : targetname);
+- mergeSets (&libDirsSet, processStrSet (dataDirsSet, NULL, dbuf_c_str (&dbuf), NULL));
+- }
+-
+ if ((p = getenv (SDCC_LIB_NAME)) != NULL)
+ {
+ addSetHead (&libDirsSet, Safe_strdup (p));
+diff --git a/src/pic14/main.c b/src/pic14/main.c
+index 38d8730..a0eecdb 100644
+--- a/src/pic14/main.c
++++ b/src/pic14/main.c
+@@ -42,7 +42,6 @@ static OPTION _pic14_poptions[] =
+ { 0, "--no-pcode-opt", &pic14_options.disable_df, "disable (slightly faulty) optimization on pCode" },
+ { 0, OPTION_STACK_SIZE, &options.stack_size, "sets the size if the argument passing stack (default: 16, minimum: 4)", CLAT_INTEGER },
+ { 0, "--no-extended-instructions", &pic14_options.no_ext_instr, "forbid use of the extended instruction set (e.g., ADDFSR)" },
+- { 0, "--no-warn-non-free", &pic14_options.no_warn_non_free, "suppress warning on absent --use-non-free option" },
+ { 0, NULL, NULL, NULL }
+ };
+
+@@ -180,16 +179,6 @@ _pic14_finaliseOptions (void)
+ addSet (&preArgvSet, Safe_strdup (dbuf_detach_c_str (&dbuf)));
+ }
+
+- if (!pic14_options.no_warn_non_free && !options.use_non_free)
+- {
+- fprintf(stderr,
+- "WARNING: Command line option --use-non-free not present.\n"
+- " When compiling for PIC14/PIC16, please provide --use-non-free\n"
+- " to get access to device headers and libraries.\n"
+- " If you do not use these, you may provide --no-warn-non-free\n"
+- " to suppress this warning (not recommended).\n");
+- } // if
+-
+ }
+
+ static void
+diff --git a/src/pic14/main.h b/src/pic14/main.h
+index 4275b65..0dc8c86 100644
+--- a/src/pic14/main.h
++++ b/src/pic14/main.h
+@@ -5,7 +5,6 @@ typedef struct {
+ unsigned int isLibrarySource:1;
+ int disable_df;
+ int no_ext_instr;
+- int no_warn_non_free;
+ } pic14_options_t;
+
+ extern pic14_options_t pic14_options;
+diff --git a/src/pic16/device.h b/src/pic16/device.h
+index cdfbba0..5877f09 100644
+--- a/src/pic16/device.h
++++ b/src/pic16/device.h
+@@ -99,7 +99,6 @@ typedef struct {
+ int gstack;
+ unsigned int debgen;
+ int xinst;
+- int no_warn_non_free;
+ } pic16_options_t;
+
+ extern pic16_options_t pic16_options;
+diff --git a/src/pic16/main.c b/src/pic16/main.c
+index b0e717a..d7616f5 100644
+--- a/src/pic16/main.c
++++ b/src/pic16/main.c
+@@ -660,7 +660,6 @@ OPTION pic16_optionsTable[]= {
+ { 0, "--pcode-verbose", &pic16_pcode_verbose, "dump pcode related info"},
+ { 0, "--calltree", &pic16_options.dumpcalltree, "dump call tree in .calltree file"},
+ { 0, "--gstack", &pic16_options.gstack, "trace stack pointer push/pop to overflow"},
+- { 0, "--no-warn-non-free", &pic16_options.no_warn_non_free, "suppress warning on absent --use-non-free option" },
+ { 0, NULL, NULL, NULL}
+ };
+
+@@ -945,16 +944,6 @@ _pic16_finaliseOptions (void)
+ addSet (&asmOptionsSet, Safe_strdup ("-D__STACK_MODEL_SMALL"));
+ }
+
+- if (!pic16_options.no_warn_non_free && !options.use_non_free)
+- {
+- fprintf(stderr,
+- "WARNING: Command line option --use-non-free not present.\n"
+- " When compiling for PIC14/PIC16, please provide --use-non-free\n"
+- " to get access to device headers and libraries.\n"
+- " If you do not use these, you may provide --no-warn-non-free\n"
+- " to suppress this warning (not recommended).\n");
+- } // if
+-
+ dbuf_destroy (&dbuf);
+ }
+
+@@ -984,7 +973,6 @@ _pic16_setDefaultOptions (void)
+ pic16_options.ip_stack = 1; /* set to 1 to enable ipop/ipush for stack */
+ pic16_options.gstack = 0;
+ pic16_options.debgen = 0;
+- pic16_options.no_warn_non_free = 0;
+ }
+
+ static const char *
+diff --git a/src/regression/Makefile b/src/regression/Makefile
+index d8dae7c..1a32355 100644
+--- a/src/regression/Makefile
++++ b/src/regression/Makefile
+@@ -107,12 +107,12 @@ endif
+ CC = $(top_builddir)/bin/sdcc
+
+ # compiler options
+-CFLAGS = --no-warn-non-free -m$(ARCH) -p$(DEV) --fsigned-char --i-code-in-asm --fverbose-asm --std-c99
+-CFLAGS += --nostdinc -I$(top_srcdir)/device/include/$(ARCH) -I$(top_srcdir)/device/non-free/include/$(ARCH) -I$(top_srcdir)/device/include
++CFLAGS = -m$(ARCH) -p$(DEV) --fsigned-char --i-code-in-asm --fverbose-asm --std-c99
++CFLAGS += --nostdinc -I$(top_srcdir)/device/include/$(ARCH) -I$(top_srcdir)/device/include
+
+ # linker options (for sdcc)
+ CFLAGS += -Wl,-l,-O2
+-CFLAGS += --nostdlib -L$(top_builddir)/device/lib/build/$(ARCH) -L$(top_builddir)/device/non-free/lib/build/$(ARCH)
++CFLAGS += --nostdlib -L$(top_builddir)/device/lib/build/$(ARCH)
+
+ # linker libraries
+ LIB_SUFFIX = $(LIB_E)$(LIB_O)$(LIB_X)
+diff --git a/support/regression/ports/pic14/spec.mk b/support/regression/ports/pic14/spec.mk
+index a3dcc05..bef1c45 100644
+--- a/support/regression/ports/pic14/spec.mk
++++ b/support/regression/ports/pic14/spec.mk
+@@ -12,13 +12,9 @@ endif
+
+ ifndef SDCC_BIN_PATH
+ ifndef CROSSCOMPILING
+- SDCCFLAGS += --nostdinc -I$(top_srcdir)/device/include/pic14 -I$(top_srcdir)/device/non-free/include/pic14 -I$(top_srcdir)
+- LINKFLAGS += --nostdlib -L$(top_builddir)/device/lib/build/pic14 -L$(top_builddir)/device/non-free/lib/build/pic14
+- else
+- SDCCFLAGS += --use-non-free
++ SDCCFLAGS += --nostdinc -I$(top_srcdir)/device/include/pic14 -I$(top_srcdir)
++ LINKFLAGS += --nostdlib -L$(top_builddir)/device/lib/build/pic14
+ endif
+-else
+- SDCCFLAGS += --use-non-free
+ endif
+
+ ifdef CROSSCOMPILING
+@@ -26,7 +22,6 @@ ifdef CROSSCOMPILING
+ endif
+
+ SDCCFLAGS += -mpic14 -pp16f877 --less-pedantic -Wl,-q
+-SDCCFLAGS += --no-warn-non-free
+ LINKFLAGS += libsdcc.lib libm.lib
+
+ OBJEXT = .o
+diff --git a/support/regression/ports/pic16/spec.mk b/support/regression/ports/pic16/spec.mk
+index 1f94cde..f1ac726 100644
+--- a/support/regression/ports/pic16/spec.mk
++++ b/support/regression/ports/pic16/spec.mk
+@@ -12,13 +12,9 @@ endif
+
+ ifndef SDCC_BIN_PATH
+ ifndef CROSSCOMPILING
+- SDCCFLAGS += --nostdinc -I$(top_srcdir)/device/include/pic16 -I$(top_srcdir)/device/non-free/include/pic16 -I$(top_srcdir)
+- LINKFLAGS += --nostdlib -L$(top_builddir)/device/lib/build/pic16 -L$(top_builddir)/device/non-free/lib/build/pic16
+- else
+- SDCCFLAGS += --use-non-free
++ SDCCFLAGS += --nostdinc -I$(top_srcdir)/device/include/pic16 -I$(top_srcdir)
++ LINKFLAGS += --nostdlib -L$(top_builddir)/device/lib/build/pic16
+ endif
+-else
+- SDCCFLAGS += --use-non-free
+ endif
+
+ ifdef CROSSCOMPILING
+@@ -27,7 +23,6 @@ endif
+
+ SDCCFLAGS += -mpic16 -pp18f452 --less-pedantic -Wl,-q
+ SDCCFLAGS += --no-peep
+-SDCCFLAGS += --no-warn-non-free
+ LINKFLAGS += libsdcc.lib libc18f.lib libm18f.lib
+
+ OBJEXT = .o
+diff --git a/support/scripts/cinc2h.pl b/support/scripts/cinc2h.pl
+index 8558135..30d72b7 100755
+--- a/support/scripts/cinc2h.pl
++++ b/support/scripts/cinc2h.pl
+@@ -39,58 +39,10 @@
+
+ -------------------------------------------------
+
+- Steps to add a new target device to SDCC/PIC16:
+- (Following Raphael Neider <rneider AT web.de>)
+-
+- 1. Create the picDEVICE.c and picDEVICE.h from pDEVICE.inc using
+- ./cinc2h.pl -p 18f4520 -cb -cp -gp "path/to/gputils_source" -o "path/to/output"
+-
+- 2. mv picDEVICE.h $SDCC/device/non-free/include/pic16
+- 3. mv picDEVICE.c $SDCC/device/non-free/lib/pic16/libdev
+- 4. either
+-
+- (a) adjust $SDCC/device/lib/pic16/libio/*.ignore
+- if the device does not support ADC, I2C, or USART
+- --- OR ---
+- (b) adjust
+- * SDCC/scripts/pic18fam-h-gen.pl
+- * SDCC/device/include/pic16/adc.h (if required)
+- * SDCC/device/include/pic16/usart.h (if required)
+- * SDCC/device/lib/pic16/libio/*/* (if required)
+- to add the new device to the appropriate I/O style
+- and implement new styles (if required).
+-
+- Having modified pic18fam-h-gen.pl, you need to run the
+- script to generate pic18fam.h.gen, which in turn must
+- then replace your .../include/pic16/pic18fam.h to take
+- effect; see pic18fam-h-gen.pl for usage information.
+- 6. edit $SDCC/device/include/pic16/pic18fregs.h
+- 7. edit $SDCC/device/include/pic16/pic16devices.txt
+- 8. run cd $SDCC/device/non-free/lib/pic16 && sh update.sh
+- to regenerate .../libdev/Makefile.am and processors.ac
+-
+- The file format of steps 6 and 7 is self explanatory, in most
+- if not all cases you can copy and paste another device's records
+- and adjust them to the newly added device.
+-
+- -------------------------------------------------
+-
+- Steps to add a new target device to SDCC/PIC14:
+-
+- 1. Create the picDEVICE.c and picDEVICE.h from pDEVICE.inc using
+- ./cinc2h.pl -p 16f1503 -cb -cp -gp "path/to/gputils_source" -o "path/to/output"
+-
+- 2. mv picDEVICE.h $SDCC/device/non-free/include/pic14
+- 3. mv picDEVICE.c $SDCC/device/non-free/lib/pic14/libdev
+- 4. add DEVICE to $SDCC/device/non-free/lib/pic14/libdev/devices.txt
+- (The names of the enhanced devices the "# enhanced cores" line
+- after follow.)
+-
+- 5. edit $SDCC/device/include/pic14/pic14devices.txt
+-
+- The file format of step 5 is self explanatory, in most if not all
+- cases you can copy and paste another device's records and adjust
+- them to the newly added device.
++ For its inclusion in the SDCC package distributed with GNU Guix
++ (https://guix.gnu.org/) this file has been modified from the
++ original to remove instructions on its use with non-free software
++ and to update the output of the print_license subroutine below.
+
+ $Id: cinc2h.pl 9450 2016-01-09 16:47:43Z molnarkaroly $
+ =cut
+@@ -1345,10 +1297,9 @@ sub print_license($)
+ * Microchip header (.inc) and linker script (.lkr) files Microchip
+ * requires that "The header files should state that they are only to be
+ * used with authentic Microchip devices" which makes them incompatible
+- * with the GPL. Pic device libraries and header files are located at
+- * non-free/lib and non-free/include directories respectively.
+- * Sdcc should be run with the --use-non-free command line option in
+- * order to include non-free header files and libraries.
++ * with the GPL. These non-free libraries and header files (and the
++ * build and run-time options that enable their use) are omitted in the
++ * SDCC package distributed with GNU Guix.
+ *
+ * See http://sdcc.sourceforge.net/ for the latest information on sdcc.
+ */
+diff --git a/support/scripts/pic14-header-parser.pl b/support/scripts/pic14-header-parser.pl
+index 4413c25..57c6076 100755
+--- a/support/scripts/pic14-header-parser.pl
++++ b/support/scripts/pic14-header-parser.pl
+@@ -63,9 +63,7 @@ use constant P_SHOW_ONLY_NAME => 3;
+
+ my @default_paths =
+ (
+- '/usr/share/sdcc/non-free/include',
+ '/usr/share/sdcc/include',
+- '/usr/local/share/sdcc/non-free/include',
+ '/usr/local/share/sdcc/include'
+ );
+
+diff --git a/support/scripts/pic16-header-parser.pl b/support/scripts/pic16-header-parser.pl
+index 6db417a..4b35225 100755
+--- a/support/scripts/pic16-header-parser.pl
++++ b/support/scripts/pic16-header-parser.pl
+@@ -62,9 +62,7 @@ use constant P_SHOW_ONLY_NAME => 3;
+
+ my @default_paths =
+ (
+- '/usr/share/sdcc/non-free/include',
+ '/usr/share/sdcc/include',
+- '/usr/local/share/sdcc/non-free/include',
+ '/usr/local/share/sdcc/include'
+ );
+
+diff --git a/support/scripts/sdcc.nsi b/support/scripts/sdcc.nsi
+index cebb8a6..778472a 100644
+--- a/support/scripts/sdcc.nsi
++++ b/support/scripts/sdcc.nsi
+@@ -480,11 +480,6 @@ ${Section} "SDCC include files" SEC05
+
+ SetOutPath "$INSTDIR\include"
+ File "${DEV_ROOT}\include\*.h"
+-
+- SetOutPath "$INSTDIR\non-free\include\pic14"
+- File "${DEV_ROOT}\non-free\include\pic14\*.h"
+- SetOutPath "$INSTDIR\non-free\include\pic16"
+- File "${DEV_ROOT}\non-free\include\pic16\*.h"
+ ${SectionEnd}
+
+ ${Section} "SDCC DS390 library" SEC06
+@@ -582,18 +577,12 @@ ${Section} "SDCC PIC16 library" SEC21
+ SetOutPath "$INSTDIR\lib\pic16"
+ File "${DEV_ROOT}\lib\pic16\*.o"
+ File "${DEV_ROOT}\lib\pic16\*.lib"
+-
+- SetOutPath "$INSTDIR\non-free\lib\pic16"
+- File "${DEV_ROOT}\non-free\lib\pic16\*.lib"
+ ${SectionEnd}
+
+ ${Section} "SDCC PIC14 library" SEC22
+ SectionIn 1 2
+ SetOutPath "$INSTDIR\lib\pic14"
+ File "${DEV_ROOT}\lib\pic14\*.lib"
+-
+- SetOutPath "$INSTDIR\non-free\lib\pic14"
+- File "${DEV_ROOT}\non-free\lib\pic14\*.lib"
+ ${SectionEnd}
+
+ ${Section} "SDCC STM8 small model library" SEC23
+@@ -702,10 +691,6 @@ ${Section} "SDCC library sources" SEC25
+ File "${DEV_ROOT}\lib\src\pic14\libsdcc\enhanced\*.inc"
+ # File "${DEV_ROOT}\lib\src\pic14\libsdcc\Makefile"
+
+- SetOutPath "$INSTDIR\non-free\lib\src\pic14\libdev"
+- File "${DEV_ROOT}\non-free\lib\src\pic14\libdev\*.c"
+-# File "${DEV_ROOT}\non-free\lib\src\pic14\libdev\Makefile"
+-
+ SetOutPath "$INSTDIR\lib\src\pic14\libm"
+ # File "${DEV_ROOT}\lib\src\pic14\libm\*.c"
+
+@@ -757,10 +742,6 @@ ${Section} "SDCC library sources" SEC25
+ File "${DEV_ROOT}\lib\src\pic16\libc\utils\*.S"
+ # File "${DEV_ROOT}\lib\src\pic16\libc\utils\Makefile"
+
+- SetOutPath "$INSTDIR\non-free\lib\src\pic16\libdev"
+- File "${DEV_ROOT}\non-free\lib\src\pic16\libdev\*.c"
+-# File "${DEV_ROOT}\non-free\lib\src\pic16\libdev\Makefile"
+-
+ SetOutPath "$INSTDIR\lib\src\pic16\libio"
+ File "${DEV_ROOT}\lib\src\pic16\libio\*.ignore"
+ # File "${DEV_ROOT}\lib\src\pic16\libio\Makefile"
+@@ -1126,13 +1107,9 @@ ${Section} Uninstall SECUNINSTALL
+
+ Delete "$INSTDIR\lib\pic14\*.lib"
+
+- Delete "$INSTDIR\non-free\lib\pic14\*.lib"
+-
+ Delete "$INSTDIR\lib\pic16\*.o"
+ Delete "$INSTDIR\lib\pic16\*.lib"
+
+- Delete "$INSTDIR\non-free\lib\pic16\*.lib"
+-
+ Delete "$INSTDIR\lib\hc08\*.lib"
+
+ Delete "$INSTDIR\lib\s08\*.lib"
+@@ -1208,9 +1185,7 @@ ${Section} Uninstall SECUNINSTALL
+ Delete "$INSTDIR\include\pic14\*.h"
+ Delete "$INSTDIR\include\pic14\*.txt"
+ Delete "$INSTDIR\include\pic14\*.inc"
+- Delete "$INSTDIR\non-free\include\pic14\*.h"
+ Delete "$INSTDIR\include\pic16\*.h"
+- Delete "$INSTDIR\non-free\include\pic16\*.h"
+ Delete "$INSTDIR\include\pic16\*.txt"
+ Delete "$INSTDIR\include\mcs51\*.h"
+ Delete "$INSTDIR\include\hc08\*.h"
+@@ -1273,9 +1248,7 @@ ${Section} Uninstall SECUNINSTALL
+ Delete "$INSTDIR\uninstall.exe"
+
+ RMDir /r "$INSTDIR\lib\src\pic14"
+- RMDir /r "$INSTDIR\non-free\lib\src\pic14"
+ RMDir /r "$INSTDIR\lib\src\pic16"
+- RMDir /r "$INSTDIR\non-free\lib\src\pic16"
+ RMDir "$INSTDIR\lib\src\small"
+ RMDir "$INSTDIR\lib\src\medium"
+ RMDir "$INSTDIR\lib\src\large"
+@@ -1303,12 +1276,9 @@ ${Section} Uninstall SECUNINSTALL
+ RMDir "$INSTDIR\lib\src\mos6502"
+ RMDir "$INSTDIR\lib\src\z80n"
+ RMDir "$INSTDIR\lib\src"
+- RMDir "$INSTDIR\non-free\lib\src"
+
+ RMDir "$INSTDIR\lib\pic14"
+- RMDir "$INSTDIR\non-free\lib\pic14"
+ RMDir "$INSTDIR\lib\pic16"
+- RMDir "$INSTDIR\non-free\lib\pic16"
+ RMDir "$INSTDIR\lib\z80"
+ RMDir "$INSTDIR\lib\z180"
+ RMDir "$INSTDIR\lib\r2k"
+@@ -1336,15 +1306,12 @@ ${Section} Uninstall SECUNINSTALL
+ RMDir "$INSTDIR\lib\mos6502"
+ RMDir "$INSTDIR\lib\z80n"
+ RMDir "$INSTDIR\lib"
+- RMDir "$INSTDIR\non-free\lib"
+
+ RMDir "$INSTDIR\include\asm\z80"
+ RMDir "$INSTDIR\include\asm\r2k"
+ RMDir "$INSTDIR\include\asm\r3ka"
+ RMDir "$INSTDIR\include\asm\pic16"
+- RMDir "$INSTDIR\non-free\include\asm\pic16"
+ RMDir "$INSTDIR\include\asm\pic14"
+- RMDir "$INSTDIR\non-free\include\asm\pic14"
+ RMDir "$INSTDIR\include\asm\mcs51"
+ RMDir "$INSTDIR\include\asm\sm83"
+ RMDir "$INSTDIR\include\asm\ds390"
+@@ -1353,17 +1320,12 @@ ${Section} Uninstall SECUNINSTALL
+ RMDir "$INSTDIR\include\asm"
+ RMDir "$INSTDIR\include\z180"
+ RMDir "$INSTDIR\include\pic14"
+- RMDir "$INSTDIR\non-free\include\pic14"
+ RMDir "$INSTDIR\include\pic16"
+- RMDir "$INSTDIR\non-free\include\pic16"
+ RMDir "$INSTDIR\include\mcs51"
+ RMDir "$INSTDIR\include\hc08"
+ RMDir "$INSTDIR\include\ds400"
+ RMDir "$INSTDIR\include\ds390"
+ RMDir "$INSTDIR\include"
+- RMDir "$INSTDIR\non-free\include"
+-
+- RMDir "$INSTDIR\non-free"
+
+ !ifdef FULL_DOC
+ RMDir /r "$INSTDIR\doc"
diff --git a/sdcc-makebin-nogogo-v2-bool.patch b/sdcc-makebin-nogogo-v2-bool.patch
new file mode 100644
index 0000000..816a8b1
--- /dev/null
+++ b/sdcc-makebin-nogogo-v2-bool.patch
@@ -0,0 +1,163 @@
+diff --git a/support/makebin/makebin.c b/support/makebin/makebin.c
+index ed41d3d..ed17286 100644
+--- a/support/makebin/makebin.c
++++ b/support/makebin/makebin.c
+@@ -20,20 +20,21 @@
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+ */
+
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <stdbool.h>
+ #include <string.h>
+ #include <ctype.h>
+
+ #if defined(_WIN32)
+ #include <fcntl.h>
+ #include <io.h>
+ #else
+ #include <unistd.h>
+ #endif
+
+@@ -109,20 +110,21 @@ usage (void)
+ " -ya n number of ram banks (default: 0)\n"
+ " -yt n MBC type (default: no MBC)\n"
+ " -yl n old licensee code (default: 0x33)\n"
+ " -yk cc new licensee string (default: 00)\n"
+ " -yn name cartridge name (default: none)\n"
+ " -yc GameBoy Color compatible\n"
+ " -yC GameBoy Color only\n"
+ " -ys Super GameBoy\n"
+ " -yS Convert .noi file named like input file to .sym\n"
+ " -yj set non-Japanese region flag\n"
++ " -yN do not copy big N validation logo into ROM header\n"
+ " -yp addr=value Set address in ROM to given value (address 0x100-0x1FE)\n"
+ "Arguments:\n"
+ " <in_file> optional IHX input file, '-' means stdin. (default: stdin)\n"
+ " <out_file> optional output file, '-' means stdout. (default: stdout)\n");
+ }
+
+ #define CART_NAME_LEN 16
+
+ struct gb_opt_s
+ {
+@@ -130,20 +132,21 @@ struct gb_opt_s
+ char licensee_str[2]; /* new licensee string */
+ BYTE mbc_type; /* MBC type (default: no MBC) */
+ short nb_rom_banks; /* Number of rom banks (default: 2) */
+ BYTE nb_ram_banks; /* Number of ram banks (default: 0) */
+ BYTE licensee_id; /* old licensee code */
+ BYTE is_gbc; /* 1 if GBC compatible, 2 if GBC only, false for all other*/
+ BYTE is_sgb; /* True if SGB, false for all other*/
+ BYTE sym_conversion; /* True if .noi file should be converted to .sym (default false)*/
+ BYTE non_jp; /* True if non-Japanese region, false for all other*/
+ BYTE rom_banks_autosize; /* True if rom banks should be auto-sized (default false)*/
++ bool do_logo_copy; /* True if the nintendo logo should be copied into the ROM (default true) */
+ BYTE address_overwrite[16]; /* For limited compatibility with very old versions */
+ };
+
+ struct sms_opt_s
+ {
+ BYTE rom_size; /* Doesn't have to be the real size, needed for checksum */
+ BYTE region_code; /* Region code Japan/Export/International and SMS/GG */
+ BYTE version; /* Game version */
+ };
+
+@@ -158,21 +161,24 @@ gb_postproc (BYTE * rom, int size, int *real_size, struct gb_opt_s *o)
+ 0x00, 0x08, 0x11, 0x1f, 0x88, 0x89, 0x00, 0x0e,
+ 0xdc, 0xcc, 0x6e, 0xe6, 0xdd, 0xdd, 0xd9, 0x99,
+ 0xbb, 0xbb, 0x67, 0x63, 0x6e, 0x0e, 0xec, 0xcc,
+ 0xdd, 0xdc, 0x99, 0x9f, 0xbb, 0xb9, 0x33, 0x3e
+ };
+
+ /* $0104-$0133: Nintendo logo
+ * If missing, an actual Game Boy won't run the ROM.
+ */
+
+- memcpy (&rom[0x104], gb_logo, sizeof (gb_logo));
++ if (o->do_logo_copy)
++ {
++ memcpy (&rom[0x104], gb_logo, sizeof (gb_logo));
++ }
+
+ rom[0x144] = o->licensee_str[0];
+ rom[0x145] = o->licensee_str[1];
+
+ /*
+ * 0134-0142: Title of the game in UPPER CASE ASCII. If it
+ * is less than 16 characters then the
+ * remaining bytes are filled with 00's.
+ */
+
+@@ -682,22 +688,38 @@ int
+ main (int argc, char **argv)
+ {
+ int size = 32768, pack = 0, real_size = 0, i = 0;
+ char *token;
+ BYTE *rom;
+ FILE *fin, *fout;
+ char *filename = NULL;
+ int ret;
+ int gb = 0;
+ int sms = 0;
+- struct gb_opt_s gb_opt = { "", {'0', '0'}, 0, 2, 0, 0x33, 0, 0, 0, 0, 0, {0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0}};
+- struct sms_opt_s sms_opt = { 0xa, 7, 0 };
++
++ struct gb_opt_s gb_opt = {.cart_name="",
++ .licensee_str={'0', '0'},
++ .mbc_type=0,
++ .nb_rom_banks=2,
++ .nb_ram_banks=0,
++ .licensee_id=0x33,
++ .is_gbc=0,
++ .is_sgb=0,
++ .sym_conversion=0,
++ .non_jp=0,
++ .rom_banks_autosize=0,
++ .do_logo_copy=true,
++ .address_overwrite={0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0} };
++
++ struct sms_opt_s sms_opt = {.rom_size=0xa,
++ .region_code=7,
++ .version=0 };
+
+ #if defined(_WIN32)
+ setmode (fileno (stdout), O_BINARY);
+ #endif
+
+ while (*++argv && '-' == argv[0][0] && '\0' != argv[0][1])
+ {
+ switch (argv[0][1])
+ {
+ case 's':
+@@ -794,20 +816,24 @@ main (int argc, char **argv)
+ break;
+
+ case 'c':
+ gb_opt.is_gbc = 1;
+ break;
+
+ case 'C':
+ gb_opt.is_gbc = 2;
+ break;
+
++ case 'N':
++ gb_opt.do_logo_copy = false; // when switch is present, turn off logo copy
++ break;
++
+ case 's':
+ gb_opt.is_sgb = 1;
+ break;
+
+ case 'S':
+ gb_opt.sym_conversion = 1;
+ break;
+
+ case 'j':
+ gb_opt.non_jp = 1;
+
diff --git a/sdcc-non-free.patch b/sdcc-non-free.patch
new file mode 100644
index 0000000..0c311f6
--- /dev/null
+++ b/sdcc-non-free.patch
@@ -0,0 +1,147 @@
+diff --git a/Makefile.common.in b/Makefile.common.in
+index 926b761..0362fd5 100644
+--- a/Makefile.common.in
++++ b/Makefile.common.in
+@@ -71,7 +71,6 @@ OPT_DISABLE_PACKIHX = @OPT_DISABLE_PACKIHX@
+ OPT_DISABLE_SDBINUTILS = @OPT_DISABLE_SDBINUTILS@
+ OPT_DISABLE_SDCPP = @OPT_DISABLE_SDCPP@
+ OPT_DISABLE_UCSIM = @OPT_DISABLE_UCSIM@
+-OPT_DISABLE_NON_FREE = @OPT_DISABLE_NON_FREE@
+
+ SLIB = $(top_builddir)/support/util
+
+diff --git a/Makefile.in b/Makefile.in
+index 5485074..3071472 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -100,9 +100,6 @@ endif
+ ifeq ($(OPT_DISABLE_DEVICE_LIB), 0)
+ TARGETS += sdcc-device-lib
+ PKGS += device/lib
+-ifeq ($(OPT_DISABLE_NON_FREE), 0)
+-PKGS += device/non-free/lib
+-endif
+ endif
+
+ ifeq ($(OPT_DISABLE_PACKIHX), 0)
+@@ -123,9 +120,6 @@ endif
+ TARGETS += sdcc-libs sdcc-cc sdcc-device-inc sdcc-as sdcc-ld sdcc-scripts
+
+ PKGS += $(SDCC_LIBS) src device/include
+-ifeq ($(OPT_DISABLE_NON_FREE), 0)
+-PKGS += device/non-free/include
+-endif
+ PKGS += $(SDCC_AS) sdas/linksrc $(SDCC_SCRIPTS)
+
+ PORTS = $(shell cat ports.build)
+@@ -171,21 +165,12 @@ sdcc-sdbinutils:
+
+ sdcc-device-inc:
+ $(MAKE) -C device/include
+-ifeq ($(OPT_DISABLE_NON_FREE), 0)
+- $(MAKE) -C device/non-free/include
+-endif
+
+ sdcc-device-lib: sdcc-cc sdcc-as sdcc-ld $(SDCC_BINUTILS)
+ $(MAKE) -C device/lib
+-ifeq ($(OPT_DISABLE_NON_FREE), 0)
+- $(MAKE) -C device/non-free/lib
+-endif
+
+ sdcc-device-tini:
+ $(MAKE) -C device/include
+-ifeq ($(OPT_DISABLE_NON_FREE), 0)
+- $(MAKE) -C device/non-free/include
+-endif
+ $(MAKE) -C device/lib model-ds390 model-ds400
+
+ # doc depends on latex and latex2html
+diff --git a/configure b/configure
+index e1805c8..6ad4efd 100755
+--- a/configure
++++ b/configure
+@@ -7079,17 +7079,11 @@ if test "${include_dir_suffix}" = ""; then
+ fi
+
+
+-if test "${non_free_inclib_dir_suffix}" = ""; then
+- non_free_inclib_dir_suffix="sdcc/non-free"
+-fi
+
+ # non_free_include_dir_suffix:
+ # *nix default: "sdcc/non-free/include"
+
+
+-if test "${non_free_include_dir_suffix}" = ""; then
+- non_free_include_dir_suffix="${non_free_inclib_dir_suffix}/include"
+-fi
+
+ # lib_dir_suffix:
+ # *nix default: "sdcc/lib"
+@@ -7101,9 +7095,6 @@ fi
+ # non_free_lib_dir_suffix:
+ # *nix default: "sdcc/non-free/lib"
+
+-if test "${non_free_lib_dir_suffix}" = ""; then
+- non_free_lib_dir_suffix="${non_free_inclib_dir_suffix}/lib"
+-fi
+
+ # docdir:
+ # *nix default: "${datadir}/sdcc/doc"
+@@ -8435,19 +8426,9 @@ _ACEOF
+
+
+
+- # Check whether --enable-non-free was given.
+-if test "${enable_non_free+set}" = set; then :
+- enableval=$enable_non_free;
+-fi
+
+
+- arg1=`echo non-free | sed s/-/_/`
+-
+- if test "`eval echo \\$enable_$arg1`" = "no"; then
+ OPT_DISABLE_NON_FREE=1
+- else
+- OPT_DISABLE_NON_FREE=0
+- fi
+
+
+ cat >>confdefs.h <<_ACEOF
+@@ -8851,20 +8832,12 @@ if test $OPT_DISABLE_PIC14 = 0; then
+
+ test $OPT_DISABLE_DEVICE_LIB = 0 && subdirs="$subdirs device/lib/pic14"
+
+-fi
+-if test $OPT_DISABLE_PIC14 = 0 && test $OPT_DISABLE_NON_FREE = 0; then
+- test $OPT_DISABLE_DEVICE_LIB = 0 && subdirs="$subdirs device/non-free/lib/pic14"
+-
+ fi
+ if test $OPT_DISABLE_PIC16 = 0; then
+ ac_config_files="$ac_config_files src/pic16/Makefile"
+
+ test $OPT_DISABLE_DEVICE_LIB = 0 && subdirs="$subdirs device/lib/pic16"
+
+-fi
+-if test $OPT_DISABLE_PIC16 = 0 && test $OPT_DISABLE_NON_FREE = 0; then
+- test $OPT_DISABLE_DEVICE_LIB = 0 && subdirs="$subdirs device/non-free/lib/pic16"
+-
+ fi
+
+ if test $OPT_DISABLE_Z80 = 0 || test $OPT_DISABLE_Z180 = 0 || test $OPT_DISABLE_R2K = 0 || test $OPT_DISABLE_R2KA = 0 || test $OPT_DISABLE_R3KA = 0 || test $OPT_DISABLE_GBZ80 = 0 || test $OPT_DISABLE_TLCS90 = 0 || test $OPT_DISABLE_EZ80_Z80 = 0 || test $OPT_DISABLE_Z80N = 0; then
+@@ -8941,15 +8914,10 @@ fi
+
+ test $OPT_DISABLE_DEVICE_LIB = 0 && ac_config_files="$ac_config_files device/lib/Makefile"
+
+-test $OPT_DISABLE_DEVICE_LIB = 0 && test $OPT_DISABLE_NON_FREE = 0 && ac_config_files="$ac_config_files device/non-free/lib/Makefile"
+
+
+ ac_config_files="$ac_config_files main.mk:main_in.mk src/Makefile device/include/Makefile sdas/linksrc/Makefile support/makebin/Makefile support/regression/Makefile support/valdiag/Makefile support/scripts/Makefile support/regression/ports/host/spec.mk:support/regression/ports/host/spec.mk.in Makefile Makefile.common:Makefile.common.in"
+
+-if test $OPT_DISABLE_NON_FREE = 0; then
+- ac_config_files="$ac_config_files device/non-free/include/Makefile"
+-
+-fi
+ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
+ # tests run on this system so they can be shared between configure
diff --git a/sdcc-sdas_macro_80_char_overflow.patch b/sdcc-sdas_macro_80_char_overflow.patch
new file mode 100644
index 0000000..1500a8d
--- /dev/null
+++ b/sdcc-sdas_macro_80_char_overflow.patch
@@ -0,0 +1,50 @@
+diff --git a/sdas/asxxsrc/asxxxx.h b/sdas/asxxsrc/asxxxx.h
+index 3c101b0..6c87180 100644
+--- a/sdas/asxxsrc/asxxxx.h
++++ b/sdas/asxxsrc/asxxxx.h
+@@ -49,20 +49,22 @@
+ * 2-Nov-97 JLH:
+ * - add jflag for debug control
+ * - prototypes for DefineNoICE_Line
+ * 30-Jan-98 JLH:
+ * - add memory space flags to a_flag for 8051
+ *
+ * 3-Feb-00 KV:
+ * - add DS80C390 flat mode support.
+ * 10-Nov-07 borutr:
+ * - change a_id from [NCPS] to pointer
++ * 00-Sep-21:
++ * - change NCPS to 255
+ */
+
+ /*
+ * System Include Files
+ */
+
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <setjmp.h>
+ #include <string.h>
+@@ -191,21 +193,21 @@
+ #define ER_WARNING 1 /* Warning */
+ #define ER_ERROR 2 /* Assembly error */
+ #define ER_FATAL 3 /* Fatal error */
+
+ /*
+ * Assembler definitions.
+ */
+ #define LFTERM '(' /* Left expression delimeter */
+ #define RTTERM ')' /* Right expression delimeter */
+
+-#define NCPS 80 /* Characters per symbol */
++#define NCPS 255 /* Characters per symbol */
+ #define ASXHUGE 1000 /* A huge number */
+ #define NERR 3 /* Errors per line */
+ #define NINPUT 1024 /* Input buffer size */
+ #define NCODE 128 /* Listing code buffer size */
+ #define NTITL 80 /* Title buffer size */
+ #define NSBTL 80 /* SubTitle buffer size */
+ #define NHASH (1 << 6) /* Buckets in hash table */
+ #define HMASK (NHASH - 1) /* Hash mask */
+ #define NLPP 60 /* Lines per page */
+ #define MAXMCR 20 /* Maximum nesting of macro expansions */
diff --git a/sdcc-sdcc_z80_boN_baN.patch b/sdcc-sdcc_z80_boN_baN.patch
new file mode 100644
index 0000000..0f8db9e
--- /dev/null
+++ b/sdcc-sdcc_z80_boN_baN.patch
@@ -0,0 +1,50 @@
+diff --git a/src/z80/main.c b/src/z80/main.c
+index c0b2450..ef20082 100644
+--- a/src/z80/main.c
++++ b/src/z80/main.c
+@@ -76,20 +76,22 @@ static char _z80n_defaultRules[] = {
+ #include "peeph-z80.rul"
+ #include "peeph-z80n.rul"
+ };
+
+
+ Z80_OPTS z80_opts;
+
+ static OPTION _z80_options[] = {
+ {0, OPTION_CALLEE_SAVES_BC, &z80_opts.calleeSavesBC, "Force a called function to always save BC"},
+ {0, OPTION_PORTMODE, NULL, "Determine PORT I/O mode (z80/z180)"},
++ {0, OPTION_BO, NULL, "<num> use code bank <num>"},
++ {0, OPTION_BA, NULL, "<num> use data bank <num>"},
+ {0, OPTION_ASM, NULL, "Define assembler name (rgbds/asxxxx/isas/z80asm/gas)"},
+ {0, OPTION_CODE_SEG, &options.code_seg, "<name> use this name for the code segment", CLAT_STRING},
+ {0, OPTION_CONST_SEG, &options.const_seg, "<name> use this name for the const segment", CLAT_STRING},
+ {0, OPTION_DATA_SEG, &options.data_seg, "<name> use this name for the data segment", CLAT_STRING},
+ {0, OPTION_NO_STD_CRT0, &options.no_std_crt0, "For the z80/gbz80 do not link default crt0.rel"},
+ {0, OPTION_RESERVE_IY, &z80_opts.reserveIY, "Do not use IY (incompatible with --fomit-frame-pointer)"},
+ {0, OPTION_OLDRALLOC, &options.oldralloc, "Use old register allocator (deprecated)"},
+ {0, OPTION_FRAMEPOINTER, &z80_opts.noOmitFramePtr, "Do not omit frame pointer"},
+ {0, OPTION_EMIT_EXTERNS, NULL, "Emit externs list in generated asm"},
+ {0, OPTION_LEGACY_BANKING, &z80_opts.legacyBanking, "Use legacy method to call banked functions"},
+@@ -570,21 +572,21 @@ _gbz80_rgblink (void)
+ exit (1);
+ }
+ Safe_free (buffer);
+ }
+
+ static bool
+ _parseOptions (int *pargc, char **argv, int *i)
+ {
+ if (argv[*i][0] == '-')
+ {
+- if (IS_GB)
++ if (IS_GB || IS_Z80)
+ {
+ if (!strncmp (argv[*i], OPTION_BO, sizeof (OPTION_BO) - 1))
+ {
+ /* ROM bank */
+ int bank = getIntArg (OPTION_BO, argv, i, *pargc);
+ struct dbuf_s buffer;
+
+ dbuf_init (&buffer, 16);
+ if (_G.asmType == ASM_TYPE_RGBDS)
+ {
diff --git a/sdcc-sdcc_z80_enable_incbin.patch b/sdcc-sdcc_z80_enable_incbin.patch
new file mode 100644
index 0000000..d2918f1
--- /dev/null
+++ b/sdcc-sdcc_z80_enable_incbin.patch
@@ -0,0 +1,26 @@
+diff --git a/sdas/asz80/z80pst.c b/sdas/asz80/z80pst.c
+index 66f481b..0e91b43 100644
+--- a/sdas/asz80/z80pst.c
++++ b/sdas/asz80/z80pst.c
+@@ -44,20 +44,21 @@ struct mne mne[] = {
+ { NULL, "ABS", S_ATYP, 0, A_ABS },
+ { NULL, "NOPAG", S_ATYP, 0, A_NOPAG },
+ { NULL, "PAG", S_ATYP, 0, A_PAG },
+
+
+ { NULL, ".page", S_PAGE, 0, 0 },
+ { NULL, ".title", S_HEADER, 0, O_TITLE },
+ { NULL, ".sbttl", S_HEADER, 0, O_SBTTL },
+ { NULL, ".module", S_MODUL, 0, 0 },
+ { NULL, ".include", S_INCL, 0, 0 },
++ { NULL, ".incbin", S_INCL, 0, I_BNRY },
+ { NULL, ".area", S_AREA, 0, 0 },
+
+ { NULL, ".org", S_ORG, 0, 0 },
+ { NULL, ".radix", S_RADIX, 0, 0 },
+ { NULL, ".globl", S_GLOBL, 0, 0 },
+ { NULL, ".local", S_LOCAL, 0, 0 },
+ { NULL, ".if", S_CONDITIONAL, 0, O_IF },
+ { NULL, ".iff", S_CONDITIONAL, 0, O_IFF },
+ { NULL, ".ift", S_CONDITIONAL, 0, O_IFT },
+ { NULL, ".iftf", S_CONDITIONAL, 0, O_IFTF },
diff --git a/sdcc-sdldz80-sms-virtual-address.patch b/sdcc-sdldz80-sms-virtual-address.patch
new file mode 100644
index 0000000..5bef155
--- /dev/null
+++ b/sdcc-sdldz80-sms-virtual-address.patch
@@ -0,0 +1,438 @@
+diff --git a/sdas/linksrc/aslink.h b/sdas/linksrc/aslink.h
+index 94c2b7b..c2426c0 100644
+--- a/sdas/linksrc/aslink.h
++++ b/sdas/linksrc/aslink.h
+@@ -367,20 +367,30 @@ extern int ASxxxx_VERSION;
+ #define R_BIT 0x400 /* Linker will convert from byte-addressable
+ * space to bit-addressable space.
+ */
+
+ #define R_ESCAPE_MASK 0xf0 /* Used to escape relocation modes
+ * greater than 0xff in the .rel
+ * file.
+ */
+ /* end sdld specific */
+
++/* Options for platform specific virtual address translation
++*
++*
++*/
++#define PLATFORM_NONE 0 /* Default address handling */
++#define PLATFORM_SMS 1 /* SMS/GG specific virtual address handling */
++
++#define PLATFORM_SMS_STR "sms"
++/* end sdld specific */
++
+
+ /*
+ * ASLINK - Version 4 Definitions
+ */
+
+ /*
+ * The "A4_" area constants define values used in
+ * generating the assembler area output data.
+ *
+ * Area flags
+@@ -1030,20 +1040,22 @@ extern int xflag; /* Map file radix type flag
+
+ #if SDCDB
+ extern int yflag; /* -y, enable SDCC Debug output
+ */
+ #endif
+
+ extern int pflag; /* print linker command file flag
+ */
+ extern int uflag; /* Listing relocation flag
+ */
++extern int platform; /* Select platform specific virtual address translation
++ */
+ extern int wflag; /* Enable wide format listing
+ */
+ extern int zflag; /* Disable symbol case sensitivity
+ */
+ extern int radix; /* current number conversion radix:
+ * 2 (binary), 8 (octal), 10 (decimal),
+ * 16 (hexadecimal)
+ */
+ extern int line; /* current line number
+ */
+@@ -1151,20 +1163,21 @@ extern char * strrchr();
+
+ /* Program function definitions */
+
+ #ifdef OTHERSYSTEM
+
+ /* lkmain.c */
+ extern FILE * afile(char *fn, char *ft, int wf);
+ extern VOID bassav(void);
+ extern int fndidx(char *str);
+ extern int fndext(char *str);
++extern VOID platset(void);
+ extern VOID gblsav(void);
+ extern int intsiz(void);
+ extern VOID iramsav(void);
+ extern VOID xramsav(void);
+ extern VOID codesav(void);
+ extern VOID iramcheck(void);
+ extern VOID link_main(void);
+ extern VOID lkexit(int i);
+ extern int main(int argc, char *argv[]);
+ extern VOID map(void);
+diff --git a/sdas/linksrc/lkarea.c b/sdas/linksrc/lkarea.c
+index 77e6f84..612b7e7 100644
+--- a/sdas/linksrc/lkarea.c
++++ b/sdas/linksrc/lkarea.c
+@@ -314,20 +314,22 @@ lkparea(char *id)
+ * local variables:
+ * a_uint rloc ;current relocation address
+ * char temp[] ;temporary string
+ * struct symbol *sp ;symbol structure
+ *
+ * global variables:
+ * area *ap Pointer to the current
+ * area structure
+ * area *areap The pointer to the first
+ * area structure of a linked list
++ * int platform selects platform specific
++ * virtual address translation
+ *
+ * functions called:
+ * int fprintf() c_library
+ * VOID lnksect() lkarea.c
+ * symbol *lkpsym() lksysm.c
+ * char * strncpy() c_library
+ * int symeq() lksysm.c
+ *
+ * side effects:
+ * All area and areax addresses and sizes are
+@@ -417,20 +419,34 @@ lnkarea(void)
+ if(!strncmp(ap->a_id, "_CODE_", 6) && atoi(ap->a_id+6)!=0) {
+ // set sane default values for rom banking
+ // 0x4000 is correct for MBC1,2,3,5,7
+ ap->a_addr = (atoi(ap->a_id+6) << 16) + 0x4000;
+ }
+ if(!strncmp(ap->a_id, "_DATA_", 6)) {
+ // set sane default values for ram banking
+ ap->a_addr = (atoi(ap->a_id+6) << 16) + 0xA000;
+ }
+ }
++ // Z80 sms/gg virtual address / mapper handling
++ if (TARGET_IS_Z80 && (platform == PLATFORM_SMS) && ap->a_addr == 0) {
++ // Standard sega sms/gg mapper used by most
++ if (!strncmp(ap->a_id, "_CODE_", 6) && atoi(ap->a_id+6)!=0) {
++ ap->a_addr = (atoi(ap->a_id+6) << 16) + 0x4000;
++ }
++ if (!strncmp(ap->a_id, "_LIT_", 5) && atoi(ap->a_id+5)!=0) {
++ ap->a_addr = (atoi(ap->a_id+5) << 16) + 0x8000;
++ }
++ if (!strncmp(ap->a_id, "_DATA_", 6)) {
++ // set sane default values for ram banking
++ ap->a_addr = (atoi(ap->a_id+6) << 16) + 0x8000;
++ }
++ }
+ if (ap->a_flag & A3_ABS) {
+ /*
+ * Absolute sections
+ */
+ lnksect(ap);
+ } else {
+ /* sdld specific */
+ /* Determine memory space */
+ locIndex = 0;
+ if ((TARGET_IS_8051)) {
+diff --git a/sdas/linksrc/lkdata.c b/sdas/linksrc/lkdata.c
+index 169e8c1..8edc81c 100644
+--- a/sdas/linksrc/lkdata.c
++++ b/sdas/linksrc/lkdata.c
+@@ -77,20 +77,22 @@ int yflag; /* SDCDB output flag
+ #endif
+
+ int mflag; /* Map output flag
+ */
+ int xflag; /* Map file radix type flag
+ */
+ int pflag; /* print linker command file flag
+ */
+ int uflag; /* Listing relocation flag
+ */
++int platform; /* Select platform specific virtual address translation
++ */
+ int wflag; /* Enable wide format listing
+ */
+ int zflag; /* Disable symbol case sensitivity
+ */
+ int radix; /* current number conversion radix:
+ * 2 (binary), 8 (octal), 10 (decimal),
+ * 16 (hexadecimal)
+ */
+ int line; /* current line number
+ */
+@@ -141,20 +143,22 @@ a_uint v_mask; /* Value Mask
+ */
+ int gline; /* LST file relocation active
+ * for current line
+ */
+ int gcntr; /* LST file relocation active
+ * counter
+ */
+ /* sdld specific */
+ char *optsdcc;
+ char *optsdcc_module;
++int platform = PLATFORM_NONE; /* Select platform specific virtual address translation
++ */
+ int sflag; /* JCF: Memory usage output flag
+ */
+ int stacksize=0; /* JCF: Stack size
+ */
+ int aflag; /* Overlapping area warning flag
+ */
+ int rflag; /* Extended linear address record flag.
+ */
+ a_uint iram_size; /* internal ram size
+ */
+diff --git a/sdas/linksrc/lkmain.c b/sdas/linksrc/lkmain.c
+index daf5515..7998409 100644
+--- a/sdas/linksrc/lkmain.c
++++ b/sdas/linksrc/lkmain.c
+@@ -219,20 +219,24 @@ main(int argc, char *argv[])
+ j = i;
+ k = 1;
+ while((c = argv[j][k]) != '\0') {
+ ip = ib;
+ sprintf(ip, "-%c", c);
+ switch(c) {
+
+ /*
+ * Options with arguments
+ */
++ case 'a':
++ case 'A':
++ pflag = 0;
++
+ case 'b':
+ case 'B':
+
+ case 'g':
+ case 'G':
+
+ case 'k':
+ case 'K':
+
+ case 'l':
+@@ -241,21 +245,21 @@ main(int argc, char *argv[])
+ case 'f':
+ case 'F':
+
+ case 'I':
+ case 'X':
+ case 'C':
+ case 'S':
+ strcat(ip, " ");
+ if (i < argc - 1)
+ strcat(ip, argv[++i]);
+- else
++ else
+ strcpy(ip, "");
+ break;
+ /*
+ * Preprocess these commands
+ */
+ case 'n':
+ case 'N':
+ pflag = 0;
+ break;
+
+@@ -897,29 +901,31 @@ map(void)
+ * ASCII character
+ * lfile *lfp pointer to current lfile structure
+ * being processed by parse()
+ * lfile *linkp pointer to first lfile structure
+ * containing an input REL file
+ * specification
+ * int mflag Map output flag
+ * int oflag Output file type flag
+ * int objflg Linked file/library output object flag
+ * int pflag print linker command file flag
++ * int platform Selects platform specific virtual address translation
+ * FILE * stderr c_library
+ * int uflag Relocated listing flag
+ * int xflag Map file radix type flag
+ * int wflag Wide listing format
+ * int zflag Disable symbol case sensitivity
+ *
+ * Functions called:
+ * VOID addlib() lklibr.c
+ * VOID addpath() lklibr.c
++ * VOID platset() lkmain.c
+ * VOID bassav() lkmain.c
+ * VOID doparse() lkmain.c
+ * int fprintf() c_library
+ * VOID gblsav() lkmain.c
+ * VOID getfid() lklex.c
+ * int get() lklex.c
+ * int getnb() lklex.c
+ * VOID lkexit() lkmain.c
+ * char * strsto() lksym.c
+ * int strlen() c_library
+@@ -939,20 +945,27 @@ parse()
+
+ while ((c = getnb()) != 0) {
+ /* sdld specific */
+ if ( c == ';')
+ return(0);
+ /* end sdld specific */
+ if ( c == '-') {
+ while (ctype[c=get()] & LETTER) {
+ switch(c) {
+
++ case 'a':
++ case 'A':
++ if (is_sdld() && (TARGET_IS_Z80)) {
++ platset();
++ }
++ return(0);
++
+ case 'C':
+ if (is_sdld() && !(TARGET_IS_Z80 || TARGET_IS_GB)) {
+ codesav();
+ return(0);
+ }
+ // else fall through
+ case 'c':
+ if (startp->f_type != 0)
+ break;
+ startp->f_type = F_STD;
+@@ -1220,20 +1233,57 @@ doparse()
+ }
+ if((sfp != NULL) && (sfp != stdin)) {
+ fclose(sfp);
+ }
+ sfp = NULL;
+ startp->f_idp = "";
+ startp->f_idx = 0;
+ startp->f_type = 0;
+ }
+
++/*)Function VOID platset()
++ *
++ * The function platset() sets variable which stores platform
++ * specific virtual address translation.
++ *
++ * local variables:
++ * none
++ *
++ * global variables:
++ * int platform selects platform specific
++ * virtual address translation
++ * char *ip pointer into the REL file
++ * text line in ib[]
++ *
++ * functions called:
++ * int fprintf() c_library
++ * int getnb() lklex.c
++ * int strcmp() c_library
++ * VOID unget() lklex.c
++ *
++ * side effects:
++ * The basep structure is created.
++ */
++
++VOID
++platset()
++{
++ unget(getnb());
++ if (strcmp(ip, PLATFORM_SMS_STR) == 0) {
++ platform = PLATFORM_SMS;
++ return;
++ }
++ fprintf(stderr,
++ "No matching platform found for: %s\n", ip);
++}
++
++
+ /*)Function VOID bassav()
+ *
+ * The function bassav() creates a linked structure containing
+ * the base address strings input to the linker.
+ *
+ * local variables:
+ * none
+ *
+ * global variables:
+ * base *basep The pointer to the first
+@@ -1824,20 +1874,21 @@ char *usetxt_z80_gb[] = {
+ " -n No echo of commands to stdout",
+ "Alternates to Command Line Input:",
+ " -c ASlink >> prompt input",
+ " -f file[.lk] Command File input",
+ "Libraries:",
+ " -k Library path specification, one per -k",
+ " -l Library file specification, one per -l",
+ "Relocation:",
+ " -b area base address = expression",
+ " -g global symbol = expression",
++ " -a (platform) Select platform specific virtual address translation",
+ "Map format:",
+ " -m Map output generated as (out)file[.map]",
+ " -w Wide listing format for map file",
+ " -x Hexadecimal (default)",
+ " -d Decimal",
+ " -q Octal",
+ "Output:",
+ " -i Intel Hex as (out)file[.ihx]",
+ " -s Motorola S Record as (out)file[.s19]",
+ #if NOICE
+diff --git a/sdas/linksrc/lkout.c b/sdas/linksrc/lkout.c
+index 766cc48..22cb18a 100644
+--- a/sdas/linksrc/lkout.c
++++ b/sdas/linksrc/lkout.c
+@@ -356,20 +356,22 @@ ixx(int i)
+ * a_uint chksum byte checksum
+ * a_uint lo_addr address within segment
+ * a_uint hi_addr segment number
+ * int i loop counter
+ * int max number of data bytes
+ * int reclen record length
+ *
+ * global variables:
+ * int a_bytes T Line Address Bytes
+ * FILE * ofp output file handle
++ * int platform selects platform specific
++ * virtual address translation
+ * int rtaflg first output flag
+ * char rtbuf[] output buffer
+ * a_uint rtadr0 address temporary
+ * a_uint rtadr1 address temporary
+ *
+ * functions called:
+ * int fprintf() c_library
+ *
+ * side effects:
+ * The data is output to the file defined by ofp.
+@@ -393,20 +395,26 @@ iflush()
+ int i, max, reclen;
+ a_uint chksum, lo_addr, hi_addr;
+ // rom addresses, calculated based on the virtual ones
+ a_uint rrtadr0 = rtadr0;
+ // translate virtual addresses for gameboy
+ if(TARGET_IS_GB){
+ if(rrtadr0 > 0x10000)
+ rrtadr0 = (rrtadr0>>16) * 0x4000 + (rrtadr0&0xffff) - 0x4000;
+ }
+
++ // translate virtual addresses for sms/gg
++ if(TARGET_IS_Z80 && (platform == PLATFORM_SMS)){
++ if(rrtadr0 >= 0x10000)
++ rrtadr0 = ((rrtadr0 >> 16) * 0x4000) + (rrtadr0 & 0x3FFF);
++ }
++
+ max = (int) (rtadr1 - rtadr0);
+ if (max) {
+ if (a_bytes > 2) {
+ static a_uint prev_hi_addr = 0;
+
+ hi_addr = (rrtadr0 >> 16) & 0xffff;
+ if ((hi_addr != prev_hi_addr) || rtaflg) {
+ chksum = 0x02;
+ chksum += 0x04;
+ chksum += hi_addr;