diff options
author | Christopher Baines <mail@cbaines.net> | 2020-11-29 14:19:55 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-11-29 17:34:18 +0000 |
commit | ff01206345e2306cc633db48e0b29eab9077091a (patch) | |
tree | 25c7ee17005dadc9bf4fae3f0873e03a4704f782 /gnu/packages/patches | |
parent | ed2545f0fa0e2ad99d5a0c45f532c539b299b9fb (diff) | |
parent | 7c2e67400ffaef8eb6f30ef7126c976ee3d7e36c (diff) |
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'gnu/packages/patches')
65 files changed, 7234 insertions, 2392 deletions
diff --git a/gnu/packages/patches/audiofile-Check-the-number-of-coefficients.patch b/gnu/packages/patches/audiofile-check-number-of-coefficients.patch index f9427cbe61..f9427cbe61 100644 --- a/gnu/packages/patches/audiofile-Check-the-number-of-coefficients.patch +++ b/gnu/packages/patches/audiofile-check-number-of-coefficients.patch diff --git a/gnu/packages/patches/audiofile-division-by-zero-BlockCodec-runPull.patch b/gnu/packages/patches/audiofile-division-by-zero.patch index e001133916..e001133916 100644 --- a/gnu/packages/patches/audiofile-division-by-zero-BlockCodec-runPull.patch +++ b/gnu/packages/patches/audiofile-division-by-zero.patch diff --git a/gnu/packages/patches/audiofile-signature-of-multiplyCheckOverflow.patch b/gnu/packages/patches/audiofile-function-signature.patch index 35627d3869..35627d3869 100644 --- a/gnu/packages/patches/audiofile-signature-of-multiplyCheckOverflow.patch +++ b/gnu/packages/patches/audiofile-function-signature.patch diff --git a/gnu/packages/patches/audiofile-Fix-multiply-overflow-sfconvert.patch b/gnu/packages/patches/audiofile-multiply-overflow.patch index 0f17140d6b..0f17140d6b 100644 --- a/gnu/packages/patches/audiofile-Fix-multiply-overflow-sfconvert.patch +++ b/gnu/packages/patches/audiofile-multiply-overflow.patch diff --git a/gnu/packages/patches/audiofile-Fix-overflow-in-MSADPCM-decodeSam.patch b/gnu/packages/patches/audiofile-overflow-in-MSADPCM.patch index 2be930b924..2be930b924 100644 --- a/gnu/packages/patches/audiofile-Fix-overflow-in-MSADPCM-decodeSam.patch +++ b/gnu/packages/patches/audiofile-overflow-in-MSADPCM.patch diff --git a/gnu/packages/patches/benchmark-unbundle-googletest.patch b/gnu/packages/patches/benchmark-unbundle-googletest.patch deleted file mode 100644 index 4dce8f59f1..0000000000 --- a/gnu/packages/patches/benchmark-unbundle-googletest.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 5eb306618196ea78b8c9390e22ea2edce20760fe Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?G=C3=A1bor=20Boskovits?= <boskovits@gmail.com> -Date: Fri, 14 Jun 2019 22:15:49 +0200 -Subject: [PATCH] Remove googletest lookup from build system. - ---- - cmake/GoogleTest.cmake | 18 +++++++++--------- - cmake/GoogleTest.cmake.in | 12 ++++++------ - 2 files changed, 15 insertions(+), 15 deletions(-) - -diff --git a/cmake/GoogleTest.cmake b/cmake/GoogleTest.cmake -index fb7c6be..a6c473b 100644 ---- a/cmake/GoogleTest.cmake -+++ b/cmake/GoogleTest.cmake -@@ -27,15 +27,15 @@ endif() - # settings on Windows - set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) - --include(${GOOGLETEST_PREFIX}/googletest-paths.cmake) -+#include(${GOOGLETEST_PREFIX}/googletest-paths.cmake) - - # Add googletest directly to our build. This defines - # the gtest and gtest_main targets. --add_subdirectory(${GOOGLETEST_SOURCE_DIR} -- ${GOOGLETEST_BINARY_DIR} -- EXCLUDE_FROM_ALL) -- --set_target_properties(gtest PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES $<TARGET_PROPERTY:gtest,INTERFACE_INCLUDE_DIRECTORIES>) --set_target_properties(gtest_main PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES $<TARGET_PROPERTY:gtest_main,INTERFACE_INCLUDE_DIRECTORIES>) --set_target_properties(gmock PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES $<TARGET_PROPERTY:gmock,INTERFACE_INCLUDE_DIRECTORIES>) --set_target_properties(gmock_main PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES $<TARGET_PROPERTY:gmock_main,INTERFACE_INCLUDE_DIRECTORIES>) -+#add_subdirectory(${GOOGLETEST_SOURCE_DIR} -+# ${GOOGLETEST_BINARY_DIR} -+# EXCLUDE_FROM_ALL) -+ -+#set_target_properties(gtest PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES $<TARGET_PROPERTY:gtest,INTERFACE_INCLUDE_DIRECTORIES>) -+#set_target_properties(gtest_main PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES $<TARGET_PROPERTY:gtest_main,INTERFACE_INCLUDE_DIRECTORIES>) -+#set_target_properties(gmock PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES $<TARGET_PROPERTY:gmock,INTERFACE_INCLUDE_DIRECTORIES>) -+#set_target_properties(gmock_main PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES $<TARGET_PROPERTY:gmock_main,INTERFACE_INCLUDE_DIRECTORIES>) -diff --git a/cmake/GoogleTest.cmake.in b/cmake/GoogleTest.cmake.in -index 28818ee..13b0888 100644 ---- a/cmake/GoogleTest.cmake.in -+++ b/cmake/GoogleTest.cmake.in -@@ -31,7 +31,7 @@ if(EXISTS "${GOOGLETEST_PATH}" AND IS_DIRECTORY "${GOOGLETEST_PATH}" - ) - else() - if(NOT ALLOW_DOWNLOADING_GOOGLETEST) -- message(SEND_ERROR "Did not find Google Test sources! Either pass correct path in GOOGLETEST_PATH, or enable ALLOW_DOWNLOADING_GOOGLETEST, or disable BENCHMARK_ENABLE_GTEST_TESTS / BENCHMARK_ENABLE_TESTING.") -+ message(WARNING "Did not find Google Test sources! Either pass correct path in GOOGLETEST_PATH, or enable ALLOW_DOWNLOADING_GOOGLETEST, or disable BENCHMARK_ENABLE_GTEST_TESTS / BENCHMARK_ENABLE_TESTING.") - else() - message(WARNING "Did not find Google Test sources! Fetching from web...") - ExternalProject_Add( -@@ -51,8 +51,8 @@ else() - endif() - endif() - --ExternalProject_Get_Property(googletest SOURCE_DIR BINARY_DIR) --file(WRITE googletest-paths.cmake --"set(GOOGLETEST_SOURCE_DIR \"${SOURCE_DIR}\") --set(GOOGLETEST_BINARY_DIR \"${BINARY_DIR}\") --") -+#ExternalProject_Get_Property(googletest SOURCE_DIR BINARY_DIR) -+#file(WRITE googletest-paths.cmake -+#"set(GOOGLETEST_SOURCE_DIR \"${SOURCE_DIR}\") -+#set(GOOGLETEST_BINARY_DIR \"${BINARY_DIR}\") -+#") --- -2.22.0 - diff --git a/gnu/packages/patches/bitcoin-core-python-compat.patch b/gnu/packages/patches/bitcoin-core-python-compat.patch deleted file mode 100644 index 6bf744124d..0000000000 --- a/gnu/packages/patches/bitcoin-core-python-compat.patch +++ /dev/null @@ -1,28 +0,0 @@ -Get rid of deprecation warning emitted by Python 3.8, which causes a test failure(!). - -https://github.com/bitcoin/bitcoin/pull/17931 - -Taken from upstream: - -https://github.com/bitcoin/bitcoin/commit/f117fb00da747147cddfb071c1427a2754c278cd - -diff --git a/test/functional/p2p_invalid_messages.py b/test/functional/p2p_invalid_messages.py -index 20864881c165..07eacf410d88 100755 ---- a/test/functional/p2p_invalid_messages.py -+++ b/test/functional/p2p_invalid_messages.py -@@ -145,13 +145,13 @@ def run_test(self): - def test_magic_bytes(self): - conn = self.nodes[0].add_p2p_connection(P2PDataStore()) - -- def swap_magic_bytes(): -+ async def swap_magic_bytes(): - conn._on_data = lambda: None # Need to ignore all incoming messages from now, since they come with "invalid" magic bytes - conn.magic_bytes = b'\x00\x11\x22\x32' - - # Call .result() to block until the atomic swap is complete, otherwise - # we might run into races later on -- asyncio.run_coroutine_threadsafe(asyncio.coroutine(swap_magic_bytes)(), NetworkThread.network_event_loop).result() -+ asyncio.run_coroutine_threadsafe(swap_magic_bytes(), NetworkThread.network_event_loop).result() - - with self.nodes[0].assert_debug_log(['PROCESSMESSAGE: INVALID MESSAGESTART ping']): - conn.send_message(messages.msg_ping(nonce=0xff)) diff --git a/gnu/packages/patches/bsd-games-2.17-64bit.patch b/gnu/packages/patches/bsd-games-2.17-64bit.patch new file mode 100644 index 0000000000..e286c1c531 --- /dev/null +++ b/gnu/packages/patches/bsd-games-2.17-64bit.patch @@ -0,0 +1,43 @@ +David Leverton writes about adventure/crc.c: + +The 'adventure' game from the games-misc/bsd-games-2.13 package crashes +when saving the game on AMD64 (and probably other 64-bit systems, but I +haven't checked). Find attached to fix this. + +http://bugs.gentoo.org/show_bug.cgi?id=77032 + + +About utmpentry.c: + +the utmpx structure defines the ut_tv member a little differently on +64bit hosts so that a 32bit and 64bit structure can be shared. So the +ut_tv is a custom 32bit structure rather than the native 64bit timeval +structure. Work around is to assign the submembers instead. + +http://bugs.gentoo.org/show_bug.cgi?id=102667 + +--- bsd-games/adventure/crc.c ++++ bsd-games/adventure/crc.c +@@ -134,7 +134,8 @@ + if (step >= sizeof(crctab) / sizeof(crctab[0])) + step = 0; + } +- crcval = (crcval << 8) ^ crctab[i]; ++ /* Mask to 32 bits. */ ++ crcval = ((crcval << 8) ^ crctab[i]) & 0xffffffff; + } +- return crcval & 0xffffffff; /* Mask to 32 bits. */ ++ return crcval; + } +--- bsd-games/dm/utmpentry.c ++++ bsd-games/dm/utmpentry.c +@@ -291,7 +291,8 @@ + e->line[sizeof(e->line) - 1] = '\0'; + (void)strncpy(e->host, up->ut_host, sizeof(up->ut_host)); + e->name[sizeof(e->host) - 1] = '\0'; +- e->tv = up->ut_tv; ++ e->tv.tv_sec = up->ut_tv.tv_sec; ++ e->tv.tv_usec = up->ut_tv.tv_usec; + adjust_size(e); + } + #endif diff --git a/gnu/packages/patches/bsd-games-add-configure-config.patch b/gnu/packages/patches/bsd-games-add-configure-config.patch new file mode 100644 index 0000000000..d8636addb6 --- /dev/null +++ b/gnu/packages/patches/bsd-games-add-configure-config.patch @@ -0,0 +1,22 @@ +Remove a few 'setenv's from the definition. + +diff -Naur bsd-games-2.17/config.params bsd-games-patch/config.params +--- bsd-games-2.17/config.params 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/config.params 2020-04-22 20:49:40.809695248 +0700 +@@ -0,0 +1,16 @@ ++bsd_games_cfg_do_chown=n ++bsd_games_cfg_non_interactive=y ++ ++# Fix some man-pages: cfscores, morse, ppt, rot13, snscore, teachgammon. ++bsd_games_cfg_use_dot_so=syml ++ ++# Don't build some games: ++# Countmail require some BSD-package called `from`. ++# DM is a toy to restrict access to bsd-games. ++# Fortune seems to be already packaged (fortune-mod). ++# Wargames isn't convenient as a game launcher. ++bsd_games_cfg_no_build_dirs="countmail dm fortune wargames" ++ ++# Those are substitute*'d with GNU miscfiles. ++bsd_games_cfg_hangman_wordsfile=WORD_LIST ++bsd_games_cfg_dictionary_src=WORD_LIST diff --git a/gnu/packages/patches/bsd-games-add-wrapper.patch b/gnu/packages/patches/bsd-games-add-wrapper.patch new file mode 100644 index 0000000000..ad3b1a9860 --- /dev/null +++ b/gnu/packages/patches/bsd-games-add-wrapper.patch @@ -0,0 +1,251 @@ +As we cannot install outside the Store, and those games do not create the +needed writable files on their own, we need a wrapper script. + +diff -Naur bsd-games-2.17/atc/Makefrag bsd-games-patch/atc/Makefrag +--- bsd-games-2.17/atc/Makefrag 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/atc/Makefrag 2020-04-23 20:24:04.446176222 +0700 +@@ -47,7 +47,8 @@ + mv atc/lex.yy.c $@ + + atc_install: atc_all +- $(INSTALL_SCORE_GAME) atc/atc $(INSTALL_PREFIX)$(GAMESDIR)/atc ++ $(INSTALL_SCORE_GAME) wrapper $(INSTALL_PREFIX)$(GAMESDIR)/atc ++ $(INSTALL_SCORE_GAME) atc/atc $(INSTALL_PREFIX)$(GAMESDIR)/.atc-real + $(HIDE_GAME) atc + $(INSTALL_SCORE_FILE) $(ATC_SCOREFILE) + $(INSTALL_MANUAL) atc/atc.6 +diff -Naur bsd-games-2.17/battlestar/Makefrag bsd-games-patch/battlestar/Makefrag +--- bsd-games-2.17/battlestar/Makefrag 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/battlestar/Makefrag 2020-04-23 20:24:04.482175771 +0700 +@@ -32,7 +32,8 @@ + battlestar_all: battlestar/battlestar battlestar/battlestar.6 + + battlestar_install: battlestar_all +- $(INSTALL_SCORE_GAME) battlestar/battlestar $(INSTALL_PREFIX)$(GAMESDIR)/battlestar ++ $(INSTALL_SCORE_GAME) wrapper $(INSTALL_PREFIX)$(GAMESDIR)/battlestar ++ $(INSTALL_SCORE_GAME) battlestar/battlestar $(INSTALL_PREFIX)$(GAMESDIR)/.battlestar-real + $(HIDE_GAME) battlestar + $(INSTALL_MANUAL) battlestar/battlestar.6 + $(INSTALL_SCORE_FILE) $(BATTLESTAR_SCOREFILE) +diff -Naur bsd-games-2.17/canfield/canfield/Makefrag bsd-games-patch/canfield/canfield/Makefrag +--- bsd-games-2.17/canfield/canfield/Makefrag 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/canfield/canfield/Makefrag 2020-04-23 20:24:04.522175270 +0700 +@@ -31,7 +31,8 @@ + canfield_canfield_all: canfield/canfield/canfield canfield/canfield/canfield.6 + + canfield_canfield_install: canfield_canfield_all +- $(INSTALL_SCORE_GAME) canfield/canfield/canfield $(INSTALL_PREFIX)$(GAMESDIR)/canfield ++ $(INSTALL_SCORE_GAME) wrapper $(INSTALL_PREFIX)$(GAMESDIR)/canfield ++ $(INSTALL_SCORE_GAME) canfield/canfield/canfield $(INSTALL_PREFIX)$(GAMESDIR)/.canfield-real + $(HIDE_GAME) canfield + $(INSTALL_MANUAL) canfield/canfield/canfield.6 + $(INSTALL_SCORE_FILE) $(CANFIELD_SCOREFILE) +diff -ur bsd-games-2.17.orig/canfield/cfscores/Makefrag bsd-games-2.17/canfield/cfscores/Makefrag +--- bsd-games-2.17.orig/canfield/cfscores/Makefrag 1970-01-01 07:00:01.000000000 +0700 ++++ bsd-games-2.17/canfield/cfscores/Makefrag 2020-08-06 12:20:10.592076477 +0700 +@@ -32,6 +32,7 @@ + canfield_cfscores_all: canfield/cfscores/cfscores + + canfield_cfscores_install: canfield_cfscores_all +- $(INSTALL_BINARY) canfield/cfscores/cfscores $(INSTALL_PREFIX)$(GAMESDIR)/cfscores ++ $(INSTALL_BINARY) wrapper $(INSTALL_PREFIX)$(GAMESDIR)/cfscores ++ $(INSTALL_BINARY) canfield/cfscores/cfscores $(INSTALL_PREFIX)$(GAMESDIR)/.cfscores-real + $(HIDE_GAME) cfscores + $(INSTALL_MANUAL) canfield.6 cfscores.6 +diff -Naur bsd-games-2.17/cribbage/Makefrag bsd-games-patch/cribbage/Makefrag +--- bsd-games-2.17/cribbage/Makefrag 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/cribbage/Makefrag 2020-04-23 20:24:04.534175120 +0700 +@@ -31,7 +31,8 @@ + cribbage_all: cribbage/cribbage cribbage/cribbage.n cribbage/cribbage.6 + + cribbage_install: cribbage_all +- $(INSTALL_SCORE_GAME) cribbage/cribbage $(INSTALL_PREFIX)$(GAMESDIR)/cribbage ++ $(INSTALL_SCORE_GAME) wrapper $(INSTALL_PREFIX)$(GAMESDIR)/cribbage ++ $(INSTALL_SCORE_GAME) cribbage/cribbage $(INSTALL_PREFIX)$(GAMESDIR)/.cribbage-real + $(HIDE_GAME) cribbage + $(INSTALL_DATA) cribbage/cribbage.n $(INSTALL_PREFIX)$(CRIBBAGE_INSTRFILE) + $(INSTALL_SCORE_FILE) $(CRIBBAGE_SCOREFILE) +diff -Naur bsd-games-2.17/hack/Makefrag bsd-games-patch/hack/Makefrag +--- bsd-games-2.17/hack/Makefrag 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/hack/Makefrag 2020-04-23 20:24:04.590174419 +0700 +@@ -53,7 +53,8 @@ + hack/hack.zap.d hack/rnd.d: hack/hack.onames.h + + hack_install: hack_all +- $(INSTALL_SCORE_GAME) hack/hack $(INSTALL_PREFIX)$(GAMESDIR)/hack ++ $(INSTALL_SCORE_GAME) wrapper $(INSTALL_PREFIX)$(GAMESDIR)/hack ++ $(INSTALL_SCORE_GAME) hack/hack $(INSTALL_PREFIX)$(GAMESDIR)/.hack-real + $(HIDE_GAME) hack + $(INSTALL_HACK_DIR) $(INSTALL_PREFIX)$(HACK_DIR) + set -e; for f in data help hh rumors; do $(INSTALL_DATA) hack/$$f $(INSTALL_PREFIX)$(HACK_DIR)/$$f; done +diff -Naur bsd-games-2.17/phantasia/Makefrag bsd-games-patch/phantasia/Makefrag +--- bsd-games-2.17/phantasia/Makefrag 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/phantasia/Makefrag 2020-04-23 20:24:04.650173667 +0700 +@@ -38,7 +38,8 @@ + touch phantasia/scorefiles.stamp + + phantasia_install: phantasia_all +- $(INSTALL_SCORE_GAME) phantasia/phantasia $(INSTALL_PREFIX)$(GAMESDIR)/phantasia ++ $(INSTALL_SCORE_GAME) wrapper $(INSTALL_PREFIX)$(GAMESDIR)/phantasia ++ $(INSTALL_SCORE_GAME) phantasia/phantasia $(INSTALL_PREFIX)$(GAMESDIR)/.phantasia-real + $(HIDE_GAME) phantasia + (set -e; for f in $(phantasia_VFILES1); do \ + cp phantasia/$$f $(INSTALL_PREFIX)$(PHANTASIA_DIR)/$$f; \ +diff -Naur bsd-games-2.17/robots/Makefrag bsd-games-patch/robots/Makefrag +--- bsd-games-2.17/robots/Makefrag 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/robots/Makefrag 2020-04-23 20:24:04.702173016 +0700 +@@ -32,7 +32,8 @@ + robots_all: robots/robots robots/robots.6 + + robots_install: robots_all +- $(INSTALL_SCORE_GAME) robots/robots $(INSTALL_PREFIX)$(GAMESDIR)/robots ++ $(INSTALL_SCORE_GAME) wrapper $(INSTALL_PREFIX)$(GAMESDIR)/robots ++ $(INSTALL_SCORE_GAME) robots/robots $(INSTALL_PREFIX)$(GAMESDIR)/.robots-real + $(HIDE_GAME) robots + $(INSTALL_SCORE_FILE) $(ROBOTS_SCOREFILE) + $(INSTALL_MANUAL) robots/robots.6 +diff -Naur bsd-games-2.17/sail/Makefrag bsd-games-patch/sail/Makefrag +--- bsd-games-2.17/sail/Makefrag 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/sail/Makefrag 2020-04-23 20:24:04.710172917 +0700 +@@ -31,7 +31,8 @@ + sail_all: sail/sail sail/sail.6 + + sail_install: sail_all +- $(INSTALL_SCORE_GAME) sail/sail $(INSTALL_PREFIX)$(GAMESDIR)/sail ++ $(INSTALL_SCORE_GAME) wrapper $(INSTALL_PREFIX)$(GAMESDIR)/sail ++ $(INSTALL_SCORE_GAME) sail/sail $(INSTALL_PREFIX)$(GAMESDIR)/.sail-real + $(HIDE_GAME) sail + $(INSTALL_SCORE_FILE) $(SAIL_SCOREFILE) + $(INSTALL_SAIL_DIR) $(INSTALL_PREFIX)$(SAIL_DIR) +diff -Naur bsd-games-2.17/snake/snake/Makefrag bsd-games-patch/snake/snake/Makefrag +--- bsd-games-2.17/snake/snake/Makefrag 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/snake/snake/Makefrag 2020-04-23 20:24:04.722172766 +0700 +@@ -31,7 +31,8 @@ + snake_snake_all: snake/snake/snake snake/snake/snake.6 + + snake_snake_install: snake_snake_all +- $(INSTALL_SCORE_GAME) snake/snake/snake $(INSTALL_PREFIX)$(GAMESDIR)/snake ++ $(INSTALL_SCORE_GAME) wrapper $(INSTALL_PREFIX)$(GAMESDIR)/snake ++ $(INSTALL_SCORE_GAME) snake/snake/snake $(INSTALL_PREFIX)$(GAMESDIR)/.snake-real + $(HIDE_GAME) snake + $(INSTALL_SCORE_FILE) $(SNAKE_SCOREFILE) + $(INSTALL_SCORE_FILE) $(SNAKE_RAWSCOREFILE) +--- bsd-games-2.17.orig/snake/snscore/Makefrag 1970-01-01 07:00:01.000000000 +0700 ++++ bsd-games-2.17/snake/snscore/Makefrag 2020-08-06 12:33:09.636089394 +0700 +@@ -32,6 +32,7 @@ + snake_snscore_all: snake/snscore/snscore + + snake_snscore_install: snake_snscore_all +- $(INSTALL_BINARY) snake/snscore/snscore $(INSTALL_PREFIX)$(GAMESDIR)/snscore ++ $(INSTALL_BINARY) wrapper $(INSTALL_PREFIX)$(GAMESDIR)/snscore ++ $(INSTALL_BINARY) snake/snscore/snscore $(INSTALL_PREFIX)$(GAMESDIR)/.snscore-real + $(HIDE_GAME) snscore + $(INSTALL_MANUAL) snake.6 snscore.6 +diff -Naur bsd-games-2.17/tetris/Makefrag bsd-games-patch/tetris/Makefrag +--- bsd-games-2.17/tetris/Makefrag 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/tetris/Makefrag 2020-04-23 20:24:04.734172616 +0700 +@@ -32,7 +32,8 @@ + tetris_all: tetris/tetris tetris/tetris.6 + + tetris_install: tetris_all +- $(INSTALL_SCORE_GAME) tetris/tetris $(INSTALL_PREFIX)$(GAMESDIR)/tetris-bsd ++ $(INSTALL_SCORE_GAME) wrapper $(INSTALL_PREFIX)$(GAMESDIR)/tetris-bsd ++ $(INSTALL_SCORE_GAME) tetris/tetris $(INSTALL_PREFIX)$(GAMESDIR)/.tetris-bsd-real + $(HIDE_GAME) tetris-bsd + $(INSTALL_SCORE_FILE) $(TETRIS_SCOREFILE) + ln -f tetris/tetris.6 tetris/tetris-bsd.6 +diff -Naur bsd-games-2.17/wrapper bsd-games-patch/wrapper +--- bsd-games-2.17/wrapper 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/wrapper 2020-04-23 20:24:37.153766719 +0700 +@@ -0,0 +1,91 @@ ++#!/bin/sh ++# This file works around limitations of our read-only Store. ++ ++set -e ++ ++check_empty_files () { ++ # those start empty ++ for f in ${@} ++ do ++ if [[ ! -f ${f} ]] ++ then ++ touch ${f} ++ echo "$(pwd)/${f} RESTORED" ++ fi ++ done ++} ++check_data_files () { ++ # those start with some initial data ++ for f in ${@} ++ do ++ if [[ ! -f ${f} ]] ++ then ++ cp STATIC_DATA/${game}/${f} ${f} ++ chmod u+w ${f} ++ echo "$(pwd)/${f} RESTORED" ++ fi ++ done ++} ++visit_dir () { ++ mkdir -p ${1} ++ cd ${1} ++} ++exit_with_variable_error () { ++ variables="${1}${2:+ or ${2}}" ++ echo "Guix: Please set up the ${variables} variable." ++ echo "Examples:" ++ echo " export ${1}=/var/multiplayer" ++ echo " export ${2:-${1}}=~/.local/share/bsd-games" ++ echo "You can place this in ~/.bashrc or a similar file for Your shell." ++ echo "For multiplayer this directory should be writable for all players." ++ exit 1 ++} ++ ++game=$(basename $0) ++if [[ ${game} == "hack" ]] ++then ++ if [[ -n ${HACKDIR} ]]; then visit_dir "${HACKDIR}" ++ elif [[ -n ${BSD_GAMES_DIR} ]]; then visit_dir "${BSD_GAMES_DIR}/hack" ++ else exit_with_variable_error "HACKDIR" "BSD_GAMES_DIR" ++ fi ++else ++ if [[ -n ${BSD_GAMES_DIR} ]]; then visit_dir "${BSD_GAMES_DIR}" ++ else exit_with_variable_error "BSD_GAMES_DIR" ++ fi ++fi ++ ++case ${game} in ++ ### Games with score-files ++ atc) ++ check_empty_files "atc_score";; ++ battlestar) ++ check_empty_files "battlestar.log";; ++ canfield) ++ check_empty_files "cfscores";; ++ cribbage) ++ check_empty_files "criblog";; ++ robots) ++ check_empty_files "robots_roll";; ++ snake) ++ check_empty_files "snakerawscores" "snake.log";; ++ tetris) ++ check_empty_files "tetris-bsd.scores";; ++ ### Games with saved state ++ hack) ++ check_empty_files "record" "perm" ++ check_data_files "data" "help" "hh" "rumors" ++ visit_dir "save" ++ cd ../../;; ++ phantasia) ++ visit_dir "phantasia" ++ check_empty_files "characs" "gold" "lastdead"\ ++ "mess" "motd" "scoreboard" "void" ++ check_data_files "monsters" ++ cd ../;; ++ sail) ++ visit_dir "sail" ++ check_empty_files "log" "syncfile" ++ cd ../;; ++esac ++ ++exec .${game}-real ${@} diff --git a/gnu/packages/patches/bsd-games-bad-ntohl-cast.patch b/gnu/packages/patches/bsd-games-bad-ntohl-cast.patch new file mode 100644 index 0000000000..caadfa5054 --- /dev/null +++ b/gnu/packages/patches/bsd-games-bad-ntohl-cast.patch @@ -0,0 +1,22 @@ +diff --git a/hunt/hunt/playit.c b/hunt/hunt/playit.c +index 9acf86e..881a4e7 100644 +--- a/hunt/hunt/playit.c ++++ b/hunt/hunt/playit.c +@@ -114,7 +114,7 @@ playit() + bad_con(); + /* NOTREACHED */ + } +- if (ntohl(version) != (unsigned long)HUNT_VERSION) { ++ if (ntohl(version) != (uint32_t)HUNT_VERSION) { + bad_ver(); + /* NOTREACHED */ + } +@@ -649,7 +649,7 @@ do_message() + bad_con(); + /* NOTREACHED */ + } +- if (ntohl(version) != (unsigned long)HUNT_VERSION) { ++ if (ntohl(version) != (uint32_t)HUNT_VERSION) { + bad_ver(); + /* NOTREACHED */ + } diff --git a/gnu/packages/patches/bsd-games-dont-install-empty-files.patch b/gnu/packages/patches/bsd-games-dont-install-empty-files.patch new file mode 100644 index 0000000000..4ee0578177 --- /dev/null +++ b/gnu/packages/patches/bsd-games-dont-install-empty-files.patch @@ -0,0 +1,87 @@ +Those games rely on user to provide the files to write scores in. +Those score-files are initially empty. Anyway, the Store is read-only. +So we do not install those empty files. + +diff -Naur bsd-games-2.17/install-score.in bsd-games-patch/install-score.in +--- bsd-games-2.17/install-score.in 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/install-score.in 2020-04-22 21:41:47.810544804 +0700 +@@ -1,45 +0,0 @@ +-# install-score.in - install a score file +-# +-# Copyright (c) 1997, 1998, 1999 Joseph Samuel Myers. +-# All rights reserved. +-# +-# Redistribution and use in source and binary forms, with or without +-# modification, are permitted provided that the following conditions +-# are met: +-# 1. Redistributions of source code must retain the above copyright +-# notice, this list of conditions and the following disclaimer. +-# 2. Redistributions in binary form must reproduce the above copyright +-# notice, this list of conditions and the following disclaimer in the +-# documentation and/or other materials provided with the distribution. +-# 3. The name of the author may not be used to endorse or promote products +-# derived from this software without specific prior written permission. +-# +-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +-# SUCH DAMAGE. +- +-set -e +- +-if [ "$1" = "-p" ]; then +- scorefile="@install_prefix@$2" +- perms=@vardata_perms_priv@ +-else +- scorefile="@install_prefix@$1" +- perms=@vardata_perms@ +-fi +- +-mkdir -p "$(dirname "$scorefile")" +- +-test -e "$scorefile" || touch "$scorefile" +-if [ @do_chown@ = y ]; then +- chown @vardata_owner@:@vardata_group@ "$scorefile" +-fi +-chmod "$perms" "$scorefile" +diff -Naur bsd-games-2.17/phantasia/Makefrag bsd-games-patch/phantasia/Makefrag +--- bsd-games-2.17/phantasia/Makefrag 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/phantasia/Makefrag 2020-04-22 21:26:00.162409464 +0700 +@@ -27,9 +27,8 @@ + # SUCH DAMAGE. + + phantasia_DIRS := $(GAMESDIR) $(MAN6DIR) $(PHANTASIA_DIR) +-phantasia_VFILES1 := gold lastdead mess monsters motd void +-phantasia_VFILES2 := scoreboard characs +-phantasia_CLEANFILES := $(phantasia_VFILES1) $(phantasia_VFILES2) scorefiles.stamp ++phantasia_VFILES1 := monsters ++phantasia_CLEANFILES := $(phantasia_VFILES1) scorefiles.stamp + + phantasia_all: phantasia/phantasia phantasia/phantasia.6 phantasia/scorefiles.stamp + +@@ -43,9 +42,4 @@ + (set -e; for f in $(phantasia_VFILES1); do \ + cp phantasia/$$f $(INSTALL_PREFIX)$(PHANTASIA_DIR)/$$f; \ + $(INSTALL_SCORE_FILE) $(PHANTASIA_DIR)/$$f; done) +- (set -e; for f in $(phantasia_VFILES2); do \ +- if [ ! -e $(PHANTASIA_DIR)/$$f ]; then \ +- cp phantasia/$$f $(INSTALL_PREFIX)$(PHANTASIA_DIR)/$$f; fi; done; \ +- $(INSTALL_SCORE_FILE) $(PHANTASIA_DIR)/scoreboard; \ +- $(INSTALL_SCORE_FILE) -p $(PHANTASIA_DIR)/characs) + $(INSTALL_MANUAL) phantasia/phantasia.6 +diff -Naur bsd-games-2.17/sail/Makefrag bsd-games-patch/sail/Makefrag +--- bsd-games-2.17/sail/Makefrag 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/sail/Makefrag 2020-04-22 21:26:48.701801676 +0700 +@@ -34,5 +34,4 @@ + $(INSTALL_SCORE_GAME) sail/sail $(INSTALL_PREFIX)$(GAMESDIR)/sail + $(HIDE_GAME) sail + $(INSTALL_SCORE_FILE) $(SAIL_SCOREFILE) +- $(INSTALL_SAIL_DIR) $(INSTALL_PREFIX)$(SAIL_DIR) + $(INSTALL_MANUAL) sail/sail.6 diff --git a/gnu/packages/patches/bsd-games-gamescreen.h.patch b/gnu/packages/patches/bsd-games-gamescreen.h.patch new file mode 100644 index 0000000000..d3c6b4ae50 --- /dev/null +++ b/gnu/packages/patches/bsd-games-gamescreen.h.patch @@ -0,0 +1,14 @@ +--- a/dab/gamescreen.h 2004-01-02 23:34:51.000000000 +0530 ++++ b/dab/gamescreen.h 2008-07-31 23:45:19.000000000 +0530 +@@ -70,9 +70,9 @@ + virtual void redraw(void) = 0; // Refresh + virtual int getinput(void) = 0; // Get user input + virtual void bell(void) = 0; // Beep +- virtual void score(size_t p, const PLAYER& p) = 0; // Post current score +- virtual void games(size_t p, const PLAYER& p) = 0; // Post games won +- virtual void total(size_t p, const PLAYER& p) = 0; // Post total score ++ virtual void score(size_t, const PLAYER&) = 0; // Post current score ++ virtual void games(size_t, const PLAYER&) = 0; // Post games won ++ virtual void total(size_t, const PLAYER&) = 0; // Post total score + virtual void ties(const PLAYER& p) = 0; // Post tie games + }; diff --git a/gnu/packages/patches/bsd-games-getline.patch b/gnu/packages/patches/bsd-games-getline.patch new file mode 100644 index 0000000000..d7c0b4034d --- /dev/null +++ b/gnu/packages/patches/bsd-games-getline.patch @@ -0,0 +1,194 @@ +diff -Naur bsd-games-2.17/boggle/boggle/bog.c bsd-games-2.17.1/boggle/boggle/bog.c +--- bsd-games-2.17/boggle/boggle/bog.c 2004-12-07 07:34:21.000000000 -0600 ++++ bsd-games-2.17.1/boggle/boggle/bog.c 2010-05-22 10:51:23.000000000 -0500 +@@ -336,7 +336,7 @@ + } + + while (1) { +- if (getline(buf) == NULL) { ++ if (boggle_getline(buf) == NULL) { + if (feof(stdin)) + clearerr(stdin); + break; +diff -Naur bsd-games-2.17/boggle/boggle/extern.h bsd-games-2.17.1/boggle/boggle/extern.h +--- bsd-games-2.17/boggle/boggle/extern.h 2004-01-27 14:52:07.000000000 -0600 ++++ bsd-games-2.17.1/boggle/boggle/extern.h 2010-05-22 10:51:23.000000000 -0500 +@@ -43,7 +43,7 @@ + long dictseek(FILE *, long, int); + void findword(void); + void flushin(FILE *); +-char *getline(char *); ++char *boggle_getline(char *); + void getword(char *); + int help(void); + int inputch(void); +diff -Naur bsd-games-2.17/boggle/boggle/mach.c bsd-games-2.17.1/boggle/boggle/mach.c +--- bsd-games-2.17/boggle/boggle/mach.c 2004-12-07 07:34:21.000000000 -0600 ++++ bsd-games-2.17.1/boggle/boggle/mach.c 2010-05-22 10:51:23.000000000 -0500 +@@ -168,7 +168,7 @@ + * - doesn't accept words longer than MAXWORDLEN or containing caps + */ + char * +-getline(q) ++boggle_getline(q) + char *q; + { + int ch, done; +diff -Naur bsd-games-2.17/cribbage/cribbage.h bsd-games-2.17.1/cribbage/cribbage.h +--- bsd-games-2.17/cribbage/cribbage.h 2004-02-08 16:29:14.000000000 -0600 ++++ bsd-games-2.17.1/cribbage/cribbage.h 2010-05-22 10:51:23.000000000 -0500 +@@ -77,7 +77,7 @@ + int fifteens(const CARD [], int); + void game(void); + void gamescore(void); +-char *getline(void); ++char *cribbage_getline(void); + int getuchar(void); + int incard(CARD *); + int infrom(const CARD [], int, const char *); +diff -Naur bsd-games-2.17/cribbage/crib.c bsd-games-2.17.1/cribbage/crib.c +--- bsd-games-2.17/cribbage/crib.c 2004-01-27 14:52:07.000000000 -0600 ++++ bsd-games-2.17.1/cribbage/crib.c 2010-05-22 10:51:23.000000000 -0500 +@@ -221,7 +221,7 @@ + if (!rflag) { /* player cuts deck */ + msg(quiet ? "Cut for crib? " : + "Cut to see whose crib it is -- low card wins? "); +- getline(); ++ cribbage_getline(); + } + i = (rand() >> 4) % CARDS; /* random cut */ + do { /* comp cuts deck */ +@@ -397,7 +397,7 @@ + if (!rflag) { /* random cut */ + msg(quiet ? "Cut the deck? " : + "How many cards down do you wish to cut the deck? "); +- getline(); ++ cribbage_getline(); + } + i = (rand() >> 4) % (CARDS - pos); + turnover = deck[i + pos]; +diff -Naur bsd-games-2.17/cribbage/io.c bsd-games-2.17.1/cribbage/io.c +--- bsd-games-2.17/cribbage/io.c 2004-12-07 07:34:21.000000000 -0600 ++++ bsd-games-2.17.1/cribbage/io.c 2010-05-22 10:51:23.000000000 -0500 +@@ -245,7 +245,7 @@ + + retval = FALSE; + rnk = sut = EMPTY; +- if (!(line = getline())) ++ if (!(line = cribbage_getline())) + goto gotit; + p = p1 = line; + while (*p1 != ' ' && *p1 != '\0') +@@ -346,7 +346,7 @@ + + for (sum = 0;;) { + msg(prompt); +- if (!(p = getline()) || *p == '\0') { ++ if (!(p = cribbage_getline()) || *p == '\0') { + msg(quiet ? "Not a number" : + "That doesn't look like a number"); + continue; +@@ -528,12 +528,12 @@ + } + + /* +- * getline: ++ * cribbage_getline: + * Reads the next line up to '\n' or EOF. Multiple spaces are + * compressed to one space; a space is inserted before a ',' + */ + char * +-getline() ++cribbage_getline() + { + char *sp; + int c, oy, ox; +diff -Naur bsd-games-2.17/gomoku/bdisp.c bsd-games-2.17.1/gomoku/bdisp.c +--- bsd-games-2.17/gomoku/bdisp.c 2003-12-16 20:47:37.000000000 -0600 ++++ bsd-games-2.17.1/gomoku/bdisp.c 2010-05-22 10:51:23.000000000 -0500 +@@ -241,7 +241,7 @@ + } + + int +-getline(buf, size) ++gomoku_getline(buf, size) + char *buf; + int size; + { +diff -Naur bsd-games-2.17/gomoku/gomoku.h bsd-games-2.17.1/gomoku/gomoku.h +--- bsd-games-2.17/gomoku/gomoku.h 2004-01-27 14:52:07.000000000 -0600 ++++ bsd-games-2.17.1/gomoku/gomoku.h 2010-05-22 10:51:23.000000000 -0500 +@@ -263,7 +263,7 @@ + + void bdinit(struct spotstr *); + void init_overlap(void); +-int getline(char *, int); ++int gomoku_getline(char *, int); + void ask(const char *); + void dislog(const char *); + void bdump(FILE *); +diff -Naur bsd-games-2.17/gomoku/main.c bsd-games-2.17.1/gomoku/main.c +--- bsd-games-2.17/gomoku/main.c 2004-01-27 14:52:07.000000000 -0600 ++++ bsd-games-2.17.1/gomoku/main.c 2010-05-22 10:51:23.000000000 -0500 +@@ -155,7 +155,7 @@ + if (inputfp == NULL && test == 0) { + for (;;) { + ask("black or white? "); +- getline(buf, sizeof(buf)); ++ gomoku_getline(buf, sizeof(buf)); + if (buf[0] == 'b' || buf[0] == 'B') { + color = BLACK; + break; +@@ -172,7 +172,7 @@ + } + } else { + setbuf(stdout, 0); +- getline(buf, sizeof(buf)); ++ gomoku_getline(buf, sizeof(buf)); + if (strcmp(buf, "black") == 0) + color = BLACK; + else if (strcmp(buf, "white") == 0) +@@ -244,7 +244,7 @@ + getinput: + if (interactive) + ask("move? "); +- if (!getline(buf, sizeof(buf))) { ++ if (!gomoku_getline(buf, sizeof(buf))) { + curmove = RESIGN; + break; + } +@@ -256,7 +256,7 @@ + FILE *fp; + + ask("save file name? "); +- (void)getline(buf, sizeof(buf)); ++ (void)gomoku_getline(buf, sizeof(buf)); + if ((fp = fopen(buf, "w")) == NULL) { + glog("cannot create save file"); + goto getinput; +@@ -309,14 +309,14 @@ + if (i != RESIGN) { + replay: + ask("replay? "); +- if (getline(buf, sizeof(buf)) && ++ if (gomoku_getline(buf, sizeof(buf)) && + (buf[0] == 'y' || buf[0] == 'Y')) + goto again; + if (strcmp(buf, "save") == 0) { + FILE *fp; + + ask("save file name? "); +- (void)getline(buf, sizeof(buf)); ++ (void)gomoku_getline(buf, sizeof(buf)); + if ((fp = fopen(buf, "w")) == NULL) { + glog("cannot create save file"); + goto replay; +@@ -367,7 +367,7 @@ + quit(); + top: + ask("cmd? "); +- if (!getline(fmtbuf, sizeof(fmtbuf))) ++ if (!gomoku_getline(fmtbuf, sizeof(fmtbuf))) + quit(); + switch (*fmtbuf) { + case '\0': diff --git a/gnu/packages/patches/bsd-games-null-check.patch b/gnu/packages/patches/bsd-games-null-check.patch new file mode 100644 index 0000000000..ba977c95bf --- /dev/null +++ b/gnu/packages/patches/bsd-games-null-check.patch @@ -0,0 +1,24 @@ +diff --git a/hunt/hunt/hunt.c b/hunt/hunt/hunt.c +index 11f4c44..28321bc 100644 +--- a/hunt/hunt/hunt.c ++++ b/hunt/hunt/hunt.c +@@ -394,7 +394,8 @@ broadcast_vec(s, vector) + + vec_cnt = 0; + for (ip = ifp; ip; ip = ip->ifa_next) +- if ((ip->ifa_addr->sa_family == AF_INET) && ++ if (ip->ifa_addr && ++ (ip->ifa_addr->sa_family == AF_INET) && + (ip->ifa_flags & IFF_BROADCAST)) + vec_cnt++; + +@@ -405,7 +406,8 @@ broadcast_vec(s, vector) + + vec_cnt = 0; + for (ip = ifp; ip; ip = ip->ifa_next) +- if ((ip->ifa_addr->sa_family == AF_INET) && ++ if (ip->ifa_addr && ++ (ip->ifa_addr->sa_family == AF_INET) && + (ip->ifa_flags & IFF_BROADCAST)) + memcpy(&(*vector)[vec_cnt++], ip->ifa_broadaddr, + sizeof(struct sockaddr_in)); diff --git a/gnu/packages/patches/bsd-games-number.c-and-test.patch b/gnu/packages/patches/bsd-games-number.c-and-test.patch new file mode 100644 index 0000000000..1cf5ba2822 --- /dev/null +++ b/gnu/packages/patches/bsd-games-number.c-and-test.patch @@ -0,0 +1,183 @@ +Arch's patch, and a fix for the "number" game's test. +--- bsdgames-2.17.orig/number/number.c ++++ bsdgames-2.17/number/number.c +@@ -78,9 +78,9 @@ + + void convert(char *); + int main(int, char *[]); +-int number(const char *, int); +-void pfract(int); +-int unit(int, const char *); ++int number(const char *, int, int *); ++void pfract(int, int); ++int unit(int, const char *, int *); + void usage(void) __attribute__((__noreturn__)); + + int lflag; +@@ -131,7 +131,7 @@ + convert(line) + char *line; + { +- int flen, len, rval; ++ int flen, len, rval, singular; + char *p, *fraction; + + flen = 0; +@@ -174,7 +174,7 @@ + --len; + } + +- rval = len > 0 ? unit(len, line) : 0; ++ rval = len > 0 ? unit(len, line, &singular) : 0; + if (fraction != NULL && flen != 0) + for (p = fraction; *p != '\0'; ++p) + if (*p != '0') { +@@ -182,10 +182,10 @@ + (void)printf("%sand%s", + lflag ? " " : "", + lflag ? " " : "\n"); +- if (unit(flen, fraction)) { ++ if (unit(flen, fraction, &singular)) { + if (lflag) + (void)printf(" "); +- pfract(flen); ++ pfract(flen, singular); + rval = 1; + } + break; +@@ -197,9 +197,10 @@ + } + + int +-unit(len, p) ++unit(len, p, singular) + int len; + const char *p; ++ int *singular; + { + int off, rval; + +@@ -208,7 +209,7 @@ + if (len % 3) { + off = len % 3; + len -= off; +- if (number(p, off)) { ++ if (number(p, off, singular)) { + rval = 1; + (void)printf(" %s%s", + name3[len / 3], lflag ? " " : ".\n"); +@@ -217,14 +218,16 @@ + } + for (; len > 3; p += 3) { + len -= 3; +- if (number(p, 3)) { ++ if (number(p, 3, singular)) { + rval = 1; + (void)printf(" %s%s", + name3[len / 3], lflag ? " " : ".\n"); + } + } + } +- if (number(p, len)) { ++ if (number(p, len, singular)) { ++ if (rval) ++ *singular = 0; + if (!lflag) + (void)printf(".\n"); + rval = 1; +@@ -233,17 +236,20 @@ + } + + int +-number(p, len) ++number(p, len, singular) + const char *p; + int len; ++ int *singular; + { + int val, rval; + + rval = 0; ++ *singular = 1; + switch (len) { + case 3: + if (*p != '0') { + rval = 1; ++ *singular = 0; + (void)printf("%s hundred", name1[*p - '0']); + } + ++p; +@@ -262,33 +268,42 @@ + } + rval = 1; + } ++ if (val != 1) ++ *singular = 0; + break; + case 1: + if (*p != '0') { + rval = 1; + (void)printf("%s", name1[*p - '0']); + } ++ if (*p != '1') ++ *singular = 0; + } + return (rval); + } + + void +-pfract(len) ++pfract(len, singular) + int len; ++ int singular; + { + static const char *const pref[] = { "", "ten-", "hundred-" }; + + switch(len) { + case 1: +- (void)printf("tenths.\n"); ++ (void)printf("tenth"); + break; + case 2: +- (void)printf("hundredths.\n"); ++ (void)printf("hundredth"); + break; + default: +- (void)printf("%s%sths.\n", pref[len % 3], name3[len / 3]); ++ (void)printf("%s%sth", pref[len % 3], name3[len / 3]); + break; + } ++ if (!singular) { ++ printf("s"); ++ } ++ printf(".\n"); + } + + void +diff -Naur bsd-games-2.17/tests/number.-0.1 bsd-games-patch/tests/number.-0.1 +--- bsd-games-2.17/tests/number.-0.1 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/tests/number.-0.1 2020-04-17 15:14:27.831098084 +0700 +@@ -1,3 +1,3 @@ + minus + one. +-tenths. ++tenth. +diff -Naur bsd-games-2.17/tests/number.-0.2 bsd-games-patch/tests/number.-0.2 +--- bsd-games-2.17/tests/number.-0.2 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/tests/number.-0.2 2020-04-17 15:20:48.162336279 +0700 +@@ -0,0 +1,3 @@ ++minus ++two. ++tenths. +diff -Naur bsd-games-2.17/tests/number.test bsd-games-patch/tests/number.test +--- bsd-games-2.17/tests/number.test 1970-01-01 07:00:00.000000000 +0700 ++++ bsd-games-patch/tests/number.test 2020-04-17 15:20:22.774654155 +0700 +@@ -36,6 +36,8 @@ + testno 1 + number/number -- -0.1 >test.out 2>&1 || failtest + compare test.out tests/number.-0.1 ++number/number -- -0.2 >test.out 2>&1 || failtest ++compare test.out tests/number.-0.2 + rm -f test.out + + testno 2 diff --git a/gnu/packages/patches/bsd-games-prevent-name-collisions.patch b/gnu/packages/patches/bsd-games-prevent-name-collisions.patch new file mode 100644 index 0000000000..855ce59131 --- /dev/null +++ b/gnu/packages/patches/bsd-games-prevent-name-collisions.patch @@ -0,0 +1,13 @@ +There is already a "fish" shell. +diff -ur bsd-games-2.17.orig/fish/Makefrag bsd-games-2.17/fish/Makefrag +--- bsd-games-2.17.orig/fish/Makefrag 1970-01-01 07:00:01.000000000 +0700 ++++ bsd-games-2.17/fish/Makefrag 2020-08-06 19:18:43.204492847 +0700 +@@ -31,7 +31,7 @@ + fish_all: fish/fish fish/fish.instr fish/fish.6 + + fish_install: fish_all +- $(INSTALL_BINARY) fish/fish $(INSTALL_PREFIX)$(GAMESDIR)/fish ++ $(INSTALL_BINARY) fish/fish $(INSTALL_PREFIX)$(GAMESDIR)/fish-game + $(HIDE_GAME) fish + $(INSTALL_DATA) fish/fish.instr $(INSTALL_PREFIX)$(FISH_INSTRFILE) + $(INSTALL_MANUAL) fish/fish.6 diff --git a/gnu/packages/patches/bsd-games-stdio.h.patch b/gnu/packages/patches/bsd-games-stdio.h.patch new file mode 100644 index 0000000000..1c3a402042 --- /dev/null +++ b/gnu/packages/patches/bsd-games-stdio.h.patch @@ -0,0 +1,14 @@ +diff -ru a/include/stdio.h b/include/stdio.h +--- a/include/stdio.h 2000-08-04 10:24:39.000000000 +1000 ++++ b/include/stdio.h 2005-06-18 14:26:35.000000000 +1000 +@@ -34,6 +34,10 @@ + #include <bsd-games.h> + #include_next <stdio.h> + ++__BEGIN_DECLS ++ + #ifndef HAVE_fgetln + extern char *fgetln(FILE *stream, size_t *len); + #endif ++ ++__END_DECLS diff --git a/gnu/packages/patches/eigen-remove-openmp-error-counting.patch b/gnu/packages/patches/eigen-remove-openmp-error-counting.patch new file mode 100644 index 0000000000..556474e8b3 --- /dev/null +++ b/gnu/packages/patches/eigen-remove-openmp-error-counting.patch @@ -0,0 +1,64 @@ +From ef3cc72cb65e2d500459c178c63e349bacfa834f Mon Sep 17 00:00:00 2001 +From: Luke Peterson <hazelnusse@gmail.com> +Date: Thu, 8 Oct 2020 12:16:53 -0700 +Subject: [PATCH] Remove error counting in OpenMP parallelize_gemm + +This resolves a compilation error associated with +Eigen::eigen_assert_exception. It also eliminates the counting of +exceptions that may occur in the OpenMP parallel section. If an +unhandled exception occurs in this section, the behavior is non-conforming +according to the OpenMP specification. +--- + Eigen/src/Core/products/Parallelizer.h | 14 +++++--------- + test/CMakeLists.txt | 2 +- + 2 files changed, 6 insertions(+), 10 deletions(-) + +diff --git a/Eigen/src/Core/products/Parallelizer.h b/Eigen/src/Core/products/Parallelizer.h +index 67b2442b5..a3cc05b77 100644 +--- a/Eigen/src/Core/products/Parallelizer.h ++++ b/Eigen/src/Core/products/Parallelizer.h +@@ -132,8 +132,7 @@ void parallelize_gemm(const Functor& func, Index rows, Index cols, Index depth, + + ei_declare_aligned_stack_constructed_variable(GemmParallelInfo<Index>,info,threads,0); + +- int errorCount = 0; +- #pragma omp parallel num_threads(threads) reduction(+: errorCount) ++ #pragma omp parallel num_threads(threads) + { + Index i = omp_get_thread_num(); + // Note that the actual number of threads might be lower than the number of request ones. +@@ -152,14 +151,11 @@ void parallelize_gemm(const Functor& func, Index rows, Index cols, Index depth, + info[i].lhs_start = r0; + info[i].lhs_length = actualBlockRows; + +- EIGEN_TRY { +- if(transpose) func(c0, actualBlockCols, 0, rows, info); +- else func(0, rows, c0, actualBlockCols, info); +- } EIGEN_CATCH(...) { +- ++errorCount; +- } ++ if(transpose) ++ func(c0, actualBlockCols, 0, rows, info); ++ else ++ func(0, rows, c0, actualBlockCols, info); + } +- if (errorCount) EIGEN_THROW_X(Eigen::eigen_assert_exception()); + #endif + } + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 0747aa6cb..b02577780 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -163,7 +163,7 @@ ei_add_test(constructor) + ei_add_test(linearstructure) + ei_add_test(integer_types) + ei_add_test(unalignedcount) +-if(NOT EIGEN_TEST_NO_EXCEPTIONS) ++if(NOT EIGEN_TEST_NO_EXCEPTIONS AND NOT EIGEN_TEST_OPENMP) + ei_add_test(exceptions) + endif() + ei_add_test(redux) +-- +GitLab + diff --git a/gnu/packages/patches/farstream-make.patch b/gnu/packages/patches/farstream-make.patch new file mode 100644 index 0000000000..6c1e9e7119 --- /dev/null +++ b/gnu/packages/patches/farstream-make.patch @@ -0,0 +1,39 @@ +This patch comes from upstream: +https://gitlab.freedesktop.org/farstream/farstream/-/merge_requests/4 + +From 54987d445ea714b467d901b7daf8c09ed0644189 Mon Sep 17 00:00:00 2001 +From: Debarshi Ray <debarshir@freedesktop.org> +Date: Thu, 12 Mar 2020 14:07:23 +0100 +Subject: [PATCH] build: Adapt to backwards incompatible change in GNU Make 4.3 + +GNU Make 4.3 has a backwards incompatible change affecting the use of +number signs or hashes (ie., #) inside function invocations. See: +https://lists.gnu.org/archive/html/info-gnu/2020-01/msg00004.html + +In this case, it would expand the '\#' in the '\n\#include \"$(h)\"' +argument to the foreach call to '\#', not '#'. This would lead to +spurious backslashes in front of the '#include' directives in the +generated fs-enumtypes.c file. + +Spotted by Ernestas Kulik. +--- + common-modified/gst-glib-gen.mak | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/common-modified/gst-glib-gen.mak b/common-modified/gst-glib-gen.mak +index 14f1ba37..2247a41c 100644 +--- a/common-modified/gst-glib-gen.mak ++++ b/common-modified/gst-glib-gen.mak +@@ -6,7 +6,8 @@ + #glib_gen_prefix=gst_color_balance + #glib_gen_basename=colorbalance + +-enum_headers=$(foreach h,$(glib_enum_headers),\n\#include \"$(h)\") ++hash:=\# ++enum_headers=$(foreach h,$(glib_enum_headers),\n$(hash)include \"$(h)\") + + # these are all the rules generating the relevant files + $(glib_gen_basename)-enumtypes.h: $(glib_enum_headers) +-- +GitLab + diff --git a/gnu/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch b/gnu/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch new file mode 100644 index 0000000000..cb3313197c --- /dev/null +++ b/gnu/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch @@ -0,0 +1,11 @@ +--- a/gajim/common/configpaths.py 2020-11-19 12:12:02.004414323 +0100 ++++ a/gajim/common/configpaths.py 2020-11-19 15:34:52.211476895 +0100 +@@ -47,7 +47,7 @@ + return [Path(_paths['PLUGINS_BASE']), + Path('/app/plugins')] + return [Path(_paths['PLUGINS_BASE']), +- Path(_paths['PLUGINS_USER'])] ++ Path(_paths['PLUGINS_USER'])] + ([Path(os.getenv('GAJIM_PLUGIN_PATH'))] if os.getenv('GAJIM_PLUGIN_PATH') and Path(os.getenv('GAJIM_PLUGIN_PATH')).is_dir() else []) + + + def get_paths(type_: PathType) -> Generator[str, None, None]: diff --git a/gnu/packages/patches/gcc-6-fix-buffer-size.patch b/gnu/packages/patches/gcc-6-fix-buffer-size.patch new file mode 100644 index 0000000000..5fcd769d45 --- /dev/null +++ b/gnu/packages/patches/gcc-6-fix-buffer-size.patch @@ -0,0 +1,15 @@ +Fixes a possible buffer overflow. (There are others) +Author: Danny Milosavljevic <dannym@scratchpost.org> +Date: 2020-11-16 + +--- a/gcc/gimplify.c.orig 2020-10-29 08:45:11.532479774 +0100 ++++ b/gcc/gimplify.c 2020-10-29 08:45:49.584637018 +0100 +@@ -5229,7 +5229,7 @@ + flexibility, split it into separate input and output + operands. */ + tree input; +- char buf[10]; ++ char buf[12]; + + /* Turn the in/out constraint into an output constraint. */ + char *p = xstrdup (constraint); diff --git a/gnu/packages/patches/gcc-6-fix-isl-includes.patch b/gnu/packages/patches/gcc-6-fix-isl-includes.patch new file mode 100644 index 0000000000..ab3c5634ea --- /dev/null +++ b/gnu/packages/patches/gcc-6-fix-isl-includes.patch @@ -0,0 +1,16 @@ +See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86724 +Author: Rainer Jung +Date: 2018-07-29 + +isl 0.20 stopped including other unused header files in their header files. +Therefore,now it's necessary to include the stuff ourselves. +--- .../gcc/graphite.h 2018-01-03 11:03:58.000000000 +0000 ++++ .../gcc/graphite.h 2018-07-29 17:42:55.836121000 +0000 +@@ -37,6 +37,8 @@ + #include <isl/schedule.h> + #include <isl/ast_build.h> + #include <isl/schedule_node.h> ++#include <isl/id.h> ++#include <isl/space.h> + + typedef struct poly_dr *poly_dr_p; diff --git a/gnu/packages/patches/glib-appinfo-watch.patch b/gnu/packages/patches/glib-appinfo-watch.patch new file mode 100644 index 0000000000..638a5e0949 --- /dev/null +++ b/gnu/packages/patches/glib-appinfo-watch.patch @@ -0,0 +1,92 @@ +This patch lets GLib's GDesktopAppInfo API watch and notice changes +to the Guix user and system profiles. That way, the list of available +applications shown by the desktop environment is immediately updated +when the user runs "guix install", "guix remove", or "guix system +reconfigure" (see <https://issues.guix.gnu.org/35594>). + +It does so by monitoring /var/guix/profiles (for changes to the system +profile) and /var/guix/profiles/per-user/USER (for changes to the user +profile) and crawling their share/applications sub-directory when +changes happen. + +diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c +index f1e2fdd..095c110 100644 +--- a/gio/gdesktopappinfo.c ++++ b/gio/gdesktopappinfo.c +@@ -148,6 +148,7 @@ typedef struct + gchar *alternatively_watching; + gboolean is_config; + gboolean is_setup; ++ gchar *guix_profile_watch_dir; + GFileMonitor *monitor; + GHashTable *app_names; + GHashTable *mime_tweaks; +@@ -180,6 +181,7 @@ desktop_file_dir_unref (DesktopFileDir *dir) + { + desktop_file_dir_reset (dir); + g_free (dir->path); ++ g_free (dir->guix_profile_watch_dir); + g_free (dir); + } + } +@@ -204,6 +206,13 @@ desktop_file_dir_get_alternative_dir (DesktopFileDir *dir) + { + gchar *parent; + ++ /* If DIR is a profile, watch the specified directory--e.g., ++ * /var/guix/profiles/per-user/$USER/ for the user profile. Do not watch ++ * ~/.guix-profile or /run/current-system/profile because GFileMonitor does ++ * not pass IN_DONT_FOLLOW and thus cannot notice any change. */ ++ if (dir->guix_profile_watch_dir != NULL) ++ return g_strdup (dir->guix_profile_watch_dir); ++ + /* If the directory itself exists then we need no alternative. */ + if (g_access (dir->path, R_OK | X_OK) == 0) + return NULL; +@@ -249,11 +258,11 @@ desktop_file_dir_changed (GFileMonitor *monitor, + * + * If this is a notification for a parent directory (because the + * desktop directory didn't exist) then we shouldn't fire the signal +- * unless something actually changed. ++ * unless something actually changed or it's in /var/guix/profiles. + */ + g_mutex_lock (&desktop_file_dir_lock); + +- if (dir->alternatively_watching) ++ if (dir->alternatively_watching && dir->guix_profile_watch_dir == NULL) + { + gchar *alternative_dir; + +@@ -1555,6 +1564,32 @@ desktop_file_dirs_lock (void) + for (i = 0; dirs[i]; i++) + g_ptr_array_add (desktop_file_dirs, desktop_file_dir_new (dirs[i])); + ++ { ++ /* Monitor the system and user profile under /var/guix/profiles and ++ * treat modifications to them as if they were modifications to their ++ * /share sub-directory. */ ++ const gchar *user; ++ DesktopFileDir *system_profile_dir, *user_profile_dir; ++ ++ system_profile_dir = ++ desktop_file_dir_new ("/var/guix/profiles/system/profile/share"); ++ system_profile_dir->guix_profile_watch_dir = g_strdup ("/var/guix/profiles"); ++ g_ptr_array_add (desktop_file_dirs, desktop_file_dir_ref (system_profile_dir)); ++ ++ user = g_get_user_name (); ++ if (user != NULL) ++ { ++ gchar *profile_dir, *user_data_dir; ++ ++ profile_dir = g_build_filename ("/var/guix/profiles/per-user", user, NULL); ++ user_data_dir = g_build_filename (profile_dir, "guix-profile", "share", NULL); ++ user_profile_dir = desktop_file_dir_new (user_data_dir); ++ user_profile_dir->guix_profile_watch_dir = profile_dir; ++ g_ptr_array_add (desktop_file_dirs, desktop_file_dir_ref (user_profile_dir)); ++ g_free (user_data_dir); ++ } ++ } ++ + /* The list of directories will never change after this, unless + * g_get_user_config_dir() changes due to %G_TEST_OPTION_ISOLATE_DIRS. */ + desktop_file_dirs_config_dir = user_config_dir; diff --git a/gnu/packages/patches/gnash-fix-giflib-version.patch b/gnu/packages/patches/gnash-fix-giflib-version.patch new file mode 100644 index 0000000000..44816d2a14 --- /dev/null +++ b/gnu/packages/patches/gnash-fix-giflib-version.patch @@ -0,0 +1,17 @@ +Description: Change GIFLIB_MINOR to allow matching with v5.2+ +Source: https://savannah.gnu.org/patch/index.php?9873 +Author: marius851000 + +diff --git a/libbase/GnashImageGif.cpp b/libbase/GnashImageGif.cpp +index 2ae5ddb..b87b1e7 100644 +--- a/libbase/GnashImageGif.cpp ++++ b/libbase/GnashImageGif.cpp +@@ -120,7 +120,7 @@ GifInput::GifInput(std::shared_ptr<IOChannel> in) + GifInput::~GifInput() + { + // Clean up allocated data. +-#if GIFLIB_MAJOR==5 && GIFLIB_MINOR==1 ++#if GIFLIB_MAJOR==5 && GIFLIB_MINOR!=0 + DGifCloseFile(_gif, 0); + #else + DGifCloseFile(_gif); diff --git a/gnu/packages/patches/grim-revert-output-rotation.patch b/gnu/packages/patches/grim-revert-output-rotation.patch deleted file mode 100644 index cbf0a86502..0000000000 --- a/gnu/packages/patches/grim-revert-output-rotation.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 80b17ceaff90b81b28b44004d2aca4cc40f365be Mon Sep 17 00:00:00 2001 -From: Tobias Geerinckx-Rice <me@tobias.gr> -Date: Fri, 2 Oct 2020 00:07:30 +0200 -Subject: [PATCH] Revert "Correct interpretation of output rotation" - -This reverts commit 8f9d60885ce2f9bd66cd93d3378dcb6866d4588a. -It is incompatible with the current Sway version (1.4) in Guix. ---- - render.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/render.c b/render.c -index 8f31e7e..a6b0b12 100644 ---- a/render.c -+++ b/render.c -@@ -104,7 +104,7 @@ cairo_surface_t *render(struct grim_state *state, struct grim_box *geometry, - cairo_matrix_translate(&matrix, - (double)output->geometry.width / 2, - (double)output->geometry.height / 2); -- cairo_matrix_rotate(&matrix, get_output_rotation(output->transform)); -+ cairo_matrix_rotate(&matrix, -get_output_rotation(output->transform)); - cairo_matrix_scale(&matrix, - (double)raw_output_width / output_width * output_flipped_x, - (double)raw_output_height / output_height * output_flipped_y); --- -2.28.0 - diff --git a/gnu/packages/patches/icecat-makeicecat.patch b/gnu/packages/patches/icecat-makeicecat.patch index c90950d5ef..9a6e40df4b 100644 --- a/gnu/packages/patches/icecat-makeicecat.patch +++ b/gnu/packages/patches/icecat-makeicecat.patch @@ -25,7 +25,7 @@ index 8be2362..48716f2 100755 -wget -N https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FFVERSION}esr/source/firefox-${FFVERSION}esr.source.tar.xz.asc -gpg --recv-keys --keyserver keyserver.ubuntu.com 14F26682D0916CDD81E37B6D61B7B526D98F0353 -gpg --verify firefox-${FFVERSION}esr.source.tar.xz.asc --echo -n 5fd27d67689fe60803022035e556146d2dbce5e53d21c14d026fc31dd2e45be9 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - +-echo -n 51f54ff608aa09de07b304307581ae89112781597322b8999b3099cfabf48290 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - - -echo Extracting Firefox tarball -tar -xf firefox-${FFVERSION}esr.source.tar.xz @@ -37,7 +37,7 @@ index 8be2362..48716f2 100755 +# wget -N https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FFVERSION}esr/source/firefox-${FFVERSION}esr.source.tar.xz.asc +# gpg --recv-keys --keyserver keyserver.ubuntu.com 14F26682D0916CDD81E37B6D61B7B526D98F0353 +# gpg --verify firefox-${FFVERSION}esr.source.tar.xz.asc -+# echo -n 5fd27d67689fe60803022035e556146d2dbce5e53d21c14d026fc31dd2e45be9 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - ++# echo -n 51f54ff608aa09de07b304307581ae89112781597322b8999b3099cfabf48290 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - +# +# echo Extracting Firefox tarball +# tar -xf firefox-${FFVERSION}esr.source.tar.xz diff --git a/gnu/packages/patches/icedtea-6-extend-hotspot-aarch64-support.patch b/gnu/packages/patches/icedtea-6-extend-hotspot-aarch64-support.patch new file mode 100644 index 0000000000..9dc112a344 --- /dev/null +++ b/gnu/packages/patches/icedtea-6-extend-hotspot-aarch64-support.patch @@ -0,0 +1,1831 @@ +From d51cb8c0f7966ac0b870e90e421cc8a796d98abf Mon Sep 17 00:00:00 2001 +From: Simon South <simon@simonsouth.net> +Date: Tue, 9 Jun 2020 13:48:42 -0400 +Subject: [PATCH] Extend AArch64 support + +This adds to IcedTea 6 a patch that extends the support for AArch64 in +its version of HotSpot, allowing the portable Zero virtual machine to +be built for that platform. + +The patch added is a backport of the one prepared for JDK 9 by the +OpenJDK AArch64 Porting Project, available (as of 11 June 2020) for +download from https://openjdk.java.net/jeps/237. +--- + Makefile.am | 3 +- + Makefile.in | 12 +- + .../hs23/aarch64-extended-support.patch | 1766 +++++++++++++++++ + 3 files changed, 1775 insertions(+), 6 deletions(-) + create mode 100644 patches/hotspot/hs23/aarch64-extended-support.patch + +diff --git a/Makefile.am b/Makefile.am +index 97dac85..f5c917b 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -621,7 +621,8 @@ ICEDTEA_PATCHES = \ + patches/openjdk/6260348-pr3068.patch \ + patches/openjdk/6961123-pr2975.patch \ + patches/pr2800-missing_resources.patch \ +- patches/pr3213-conditional_arm32jit.patch ++ patches/pr3213-conditional_arm32jit.patch \ ++ patches/hotspot/hs23/aarch64-extended-support.patch + + if WITH_RHINO + ICEDTEA_PATCHES += \ +diff --git a/Makefile.in b/Makefile.in +index aced7c2..e3545ee 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -1049,11 +1049,13 @@ ICEDTEA_PATCHES = $(DROP_PATCHES) $(SECURITY_PATCHES) \ + patches/openjdk/6260348-pr3068.patch \ + patches/openjdk/6961123-pr2975.patch \ + patches/pr2800-missing_resources.patch \ +- patches/pr3213-conditional_arm32jit.patch $(am__append_21) \ +- $(am__append_22) $(am__append_23) $(am__append_24) \ +- $(am__append_25) $(am__append_26) $(am__append_27) \ +- $(am__append_28) $(am__append_29) $(am__append_30) \ +- $(am__append_31) $(am__append_32) $(DISTRIBUTION_PATCHES) ++ patches/pr3213-conditional_arm32jit.patch \ ++ patches/hotspot/hs23/aarch64-extended-support.patch \ ++ $(am__append_21) $(am__append_22) $(am__append_23) \ ++ $(am__append_24) $(am__append_25) $(am__append_26) \ ++ $(am__append_27) $(am__append_28) $(am__append_29) \ ++ $(am__append_30) $(am__append_31) $(am__append_32) \ ++ $(DISTRIBUTION_PATCHES) + @ENABLE_NSS_FALSE@NSS_PATCHES = patches/nss-not-enabled-config.patch + @ENABLE_NSS_TRUE@NSS_PATCHES = patches/nss-config.patch + +diff --git a/patches/hotspot/hs23/aarch64-extended-support.patch b/patches/hotspot/hs23/aarch64-extended-support.patch +new file mode 100644 +index 0000000..7817f4d +--- /dev/null ++++ b/patches/hotspot/hs23/aarch64-extended-support.patch +@@ -0,0 +1,1766 @@ ++diff --git openjdk.orig/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c ++index 5771fdd..b23cc17 100644 ++--- openjdk.orig/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c +++++ openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c ++@@ -304,6 +304,9 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo ++ #ifdef amd64 ++ #define NPRGREG sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_NPRGREG ++ #endif +++#ifdef aarch64 +++#define NPRGREG 32 +++#endif ++ #if defined(sparc) || defined(sparcv9) ++ #define NPRGREG sun_jvm_hotspot_debugger_sparc_SPARCThreadContext_NPRGREG ++ #endif ++@@ -406,6 +409,12 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo ++ regs[REG_INDEX(R_O7)] = gregs.u_regs[14]; ++ #endif /* sparc */ ++ +++#if defined(aarch64) +++ +++#define REG_INDEX(reg) sun_jvm_hotspot_debugger_aarch64_AARCH64ThreadContext_##reg +++ +++#endif /* aarch64 */ +++ ++ ++ (*env)->ReleaseLongArrayElements(env, array, regs, JNI_COMMIT); ++ return array; ++diff --git openjdk.orig/hotspot/agent/src/os/linux/libproc.h openjdk/hotspot/agent/src/os/linux/libproc.h ++index e4d77f7..c02b841 100644 ++--- openjdk.orig/hotspot/agent/src/os/linux/libproc.h +++++ openjdk/hotspot/agent/src/os/linux/libproc.h ++@@ -54,6 +54,10 @@ struct pt_regs { ++ ++ #endif //sparc or sparcv9 ++ +++#if defined(aarch64) +++#include "asm/ptrace.h" +++#endif +++ ++ /************************************************************************************ ++ ++ 0. This is very minimal subset of Solaris libproc just enough for current application. ++@@ -97,6 +101,9 @@ unsigned long regs[IA64_REG_COUNT]; /* integer and fp regs */ ++ #if defined(sparc) || defined(sparcv9) ++ #define user_regs_struct pt_regs ++ #endif +++#if defined(aarch64) +++#define user_regs_struct user_pt_regs +++#endif ++ ++ // This C bool type must be int for compatibility with Linux calls and ++ // it would be a mistake to equivalence it to C++ bool on many platforms ++diff --git openjdk.orig/hotspot/make/defs.make openjdk/hotspot/make/defs.make ++index 44f21f8..4e8d00b 100644 ++--- openjdk.orig/hotspot/make/defs.make +++++ openjdk/hotspot/make/defs.make ++@@ -232,7 +232,7 @@ ifneq ($(OSNAME),windows) ++ ++ # Use uname output for SRCARCH, but deal with platform differences. If ARCH ++ # is not explicitly listed below, it is treated as x86. ++- SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 arm ppc zero,$(ARCH))) +++ SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 arm ppc aarch64 zero,$(ARCH))) ++ ARCH/ = x86 ++ ARCH/sparc = sparc ++ ARCH/sparc64= sparc ++@@ -242,6 +242,7 @@ ifneq ($(OSNAME),windows) ++ ARCH/ppc64 = ppc ++ ARCH/ppc = ppc ++ ARCH/arm = arm +++ ARCH/aarch64= aarch64 ++ ARCH/zero = zero ++ ++ # BUILDARCH is usually the same as SRCARCH, except for sparcv9 ++@@ -267,11 +268,12 @@ ifneq ($(OSNAME),windows) ++ LIBARCH/sparcv9 = sparcv9 ++ LIBARCH/ia64 = ia64 ++ LIBARCH/ppc64 = ppc +++ LIBARCH/aarch64 = aarch64 ++ LIBARCH/ppc = ppc ++ LIBARCH/arm = arm ++ LIBARCH/zero = $(ZERO_LIBARCH) ++ ++- LP64_ARCH = sparcv9 amd64 ia64 zero +++ LP64_ARCH = sparcv9 amd64 ia64 aarch64 zero ++ endif ++ ++ # Required make macro settings for all platforms ++diff --git openjdk.orig/hotspot/make/linux/makefiles/buildtree.make openjdk/hotspot/make/linux/makefiles/buildtree.make ++index 7c3d4f9..3bc7e8a 100644 ++--- openjdk.orig/hotspot/make/linux/makefiles/buildtree.make +++++ openjdk/hotspot/make/linux/makefiles/buildtree.make ++@@ -385,6 +385,7 @@ DATA_MODE/sparc = 32 ++ DATA_MODE/sparcv9 = 64 ++ DATA_MODE/amd64 = 64 ++ DATA_MODE/ia64 = 64 +++DATA_MODE/aarch64 = 64 ++ DATA_MODE/zero = $(ARCH_DATA_MODEL) ++ ++ JAVA_FLAG/32 = -d32 ++diff --git openjdk.orig/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make ++index 7bb3149..39ffda4 100644 ++--- openjdk.orig/hotspot/make/linux/makefiles/defs.make +++++ openjdk/hotspot/make/linux/makefiles/defs.make ++@@ -118,6 +118,15 @@ ifeq ($(ARCH), ppc) ++ HS_ARCH = ppc ++ endif ++ +++# AARCH64 +++ifeq ($(ARCH), aarch64) +++ ARCH_DATA_MODEL = 64 +++ MAKE_ARGS += LP64=1 +++ PLATFORM = linux-aarch64 +++ VM_PLATFORM = linux_aarch64 +++ HS_ARCH = aarch64 +++endif +++ ++ # determine if HotSpot is being built in JDK6 or earlier version ++ JDK6_OR_EARLIER=0 ++ ifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1" ++diff --git openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make ++index 897e3a6..44f1673 100644 ++--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make +++++ openjdk/hotspot/make/linux/makefiles/gcc.make ++@@ -104,6 +104,7 @@ endif ++ ARCHFLAG = $(ARCHFLAG/$(BUILDARCH)) ++ ARCHFLAG/i486 = -m32 -march=i586 ++ ARCHFLAG/amd64 = -m64 +++ARCHFLAG/aarch64 = ++ ARCHFLAG/ia64 = ++ ARCHFLAG/sparc = -m32 -mcpu=v9 ++ ARCHFLAG/sparcv9 = -m64 -mcpu=v9 ++diff --git openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp ++index c1b0e5c..9f7cda0 100644 ++--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp +++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp ++@@ -296,6 +296,8 @@ static char cpu_arch[] = "sparcv9"; ++ # else ++ static char cpu_arch[] = "sparc"; ++ # endif +++#elif defined(AARCH64) +++static char cpu_arch[] = "aarch64"; ++ #else ++ #error Add appropriate cpu_arch setting ++ #endif ++@@ -1442,7 +1444,7 @@ void os::Linux::clock_init() { ++ #ifndef SYS_clock_getres ++ ++ #if defined(IA32) || defined(AMD64) ++-#define SYS_clock_getres IA32_ONLY(266) AMD64_ONLY(229) +++#define SYS_clock_getres IA32_ONLY(266) AMD64_ONLY(229) AARCH64_ONLY(114) ++ #define sys_clock_getres(x,y) ::syscall(SYS_clock_getres, x, y) ++ #else ++ #warning "SYS_clock_getres not defined for this platform, disabling fast_thread_cpu_time" ++@@ -1930,7 +1932,7 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen) ++ static Elf32_Half running_arch_code=EM_AARCH64; ++ #else ++ #error Method os::dll_load requires that one of following is defined:\ ++- IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K, SH +++ IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K, SH, AARCH64 ++ #endif ++ ++ // Identify compatability class for VM's architecture and library's architecture ++@@ -3056,7 +3058,7 @@ void os::large_page_init() { ++ ++ #ifndef ZERO ++ _large_page_size = IA32_ONLY(4 * M) AMD64_ONLY(2 * M) IA64_ONLY(256 * M) SPARC_ONLY(4 * M) ++- ARM_ONLY(2 * M) PPC_ONLY(4 * M); +++ ARM_ONLY(2 * M) PPC_ONLY(4 * M) AARCH64_ONLY(2 * M); ++ #endif // ZERO ++ ++ FILE *fp = fopen("/proc/meminfo", "r"); ++@@ -5378,11 +5380,11 @@ void Parker::unpark() { ++ extern char** environ; ++ ++ #ifndef __NR_fork ++-#define __NR_fork IA32_ONLY(2) IA64_ONLY(not defined) AMD64_ONLY(57) +++#define __NR_fork IA32_ONLY(2) IA64_ONLY(not defined) AMD64_ONLY(57) AARCH64_ONLY(1079) ++ #endif ++ ++ #ifndef __NR_execve ++-#define __NR_execve IA32_ONLY(11) IA64_ONLY(1033) AMD64_ONLY(59) +++#define __NR_execve IA32_ONLY(11) IA64_ONLY(1033) AMD64_ONLY(59) AARCH64_ONLY(221) ++ #endif ++ ++ // Run the specified command in a separate process. Return its exit value, ++diff --git openjdk.orig/hotspot/src/share/vm/adlc/main.cpp openjdk/hotspot/src/share/vm/adlc/main.cpp ++index 47e207a..b93504e 100644 ++--- openjdk.orig/hotspot/src/share/vm/adlc/main.cpp +++++ openjdk/hotspot/src/share/vm/adlc/main.cpp ++@@ -244,6 +244,11 @@ int main(int argc, char *argv[]) ++ AD.addInclude(AD._CPP_file, "assembler_arm.inline.hpp"); ++ AD.addInclude(AD._CPP_file, "nativeInst_arm.hpp"); ++ AD.addInclude(AD._CPP_file, "vmreg_arm.inline.hpp"); +++#endif +++#ifdef TARGET_ARCH_aarch64 +++ AD.addInclude(AD._CPP_file, "assembler_aarch64.inline.hpp"); +++ AD.addInclude(AD._CPP_file, "nativeInst_aarch64.hpp"); +++ AD.addInclude(AD._CPP_file, "vmreg_aarch64.inline.hpp"); ++ #endif ++ AD.addInclude(AD._HPP_file, "memory/allocation.hpp"); ++ AD.addInclude(AD._HPP_file, "opto/machnode.hpp"); ++diff --git openjdk.orig/hotspot/src/share/vm/asm/assembler.cpp openjdk/hotspot/src/share/vm/asm/assembler.cpp ++index 2bcdcbc..57787ac 100644 ++--- openjdk.orig/hotspot/src/share/vm/asm/assembler.cpp +++++ openjdk/hotspot/src/share/vm/asm/assembler.cpp ++@@ -43,6 +43,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "assembler_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "assembler_aarch64.inline.hpp" +++#endif ++ ++ ++ // Implementation of AbstractAssembler ++diff --git openjdk.orig/hotspot/src/share/vm/asm/assembler.hpp openjdk/hotspot/src/share/vm/asm/assembler.hpp ++index c25aa3f..4f77825 100644 ++--- openjdk.orig/hotspot/src/share/vm/asm/assembler.hpp +++++ openjdk/hotspot/src/share/vm/asm/assembler.hpp ++@@ -51,6 +51,10 @@ ++ # include "register_ppc.hpp" ++ # include "vm_version_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "register_aarch64.hpp" +++# include "vm_version_aarch64.hpp" +++#endif ++ ++ // This file contains platform-independent assembler declarations. ++ ++@@ -459,6 +463,9 @@ class AbstractAssembler : public ResourceObj { ++ #ifdef TARGET_ARCH_ppc ++ # include "assembler_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "assembler_aarch64.hpp" +++#endif ++ ++ ++ #endif // SHARE_VM_ASM_ASSEMBLER_HPP ++diff --git openjdk.orig/hotspot/src/share/vm/asm/codeBuffer.hpp openjdk/hotspot/src/share/vm/asm/codeBuffer.hpp ++index 685297a..002faef 100644 ++--- openjdk.orig/hotspot/src/share/vm/asm/codeBuffer.hpp +++++ openjdk/hotspot/src/share/vm/asm/codeBuffer.hpp ++@@ -573,6 +573,9 @@ class CodeBuffer: public StackObj { ++ #ifdef TARGET_ARCH_ppc ++ # include "codeBuffer_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "codeBuffer_aarch64.hpp" +++#endif ++ ++ }; ++ ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp openjdk/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp ++index c95a23c..2ec31e5 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp +++++ openjdk/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp ++@@ -877,6 +877,13 @@ static bool match(UnsafeRawOp* x, ++ return false; ++ } ++ +++// AARCH64 cannot handle shifts which are not either 0, or log2 of the type size +++#ifdef AARCH64 +++ if (*log2_scale != 0 && +++ (1 << *log2_scale) != type2aelembytes(x->basic_type(), true)) +++ return false; +++#endif +++ ++ // If the value is pinned then it will be always be computed so ++ // there's no profit to reshaping the expression. ++ return !root->is_pinned(); ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_Defs.hpp openjdk/hotspot/src/share/vm/c1/c1_Defs.hpp ++index bebb3b0..ddaceb7 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_Defs.hpp +++++ openjdk/hotspot/src/share/vm/c1/c1_Defs.hpp ++@@ -41,6 +41,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "register_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "register_aarch64.hpp" +++#endif ++ ++ // set frame size and return address offset to these values in blobs ++ // (if the compiled frame uses ebp as link pointer on IA; otherwise, ++@@ -62,6 +65,9 @@ enum { ++ #ifdef TARGET_ARCH_ppc ++ # include "c1_Defs_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "c1_Defs_aarch64.hpp" +++#endif ++ ++ ++ // native word offsets from memory address ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_FpuStackSim.hpp openjdk/hotspot/src/share/vm/c1/c1_FpuStackSim.hpp ++index a1e4c38..491b064 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_FpuStackSim.hpp +++++ openjdk/hotspot/src/share/vm/c1/c1_FpuStackSim.hpp ++@@ -44,6 +44,9 @@ class FpuStackSim; ++ #ifdef TARGET_ARCH_ppc ++ # include "c1_FpuStackSim_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "c1_FpuStackSim_aarch64.hpp" +++#endif ++ ++ ++ #endif // SHARE_VM_C1_C1_FPUSTACKSIM_HPP ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_FrameMap.cpp openjdk/hotspot/src/share/vm/c1/c1_FrameMap.cpp ++index ea50b27..6a3dc63 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_FrameMap.cpp +++++ openjdk/hotspot/src/share/vm/c1/c1_FrameMap.cpp ++@@ -41,6 +41,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "vmreg_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "vmreg_aarch64.inline.hpp" +++#endif ++ ++ ++ ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_FrameMap.hpp openjdk/hotspot/src/share/vm/c1/c1_FrameMap.hpp ++index 288fc5c..e9a0250 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_FrameMap.hpp +++++ openjdk/hotspot/src/share/vm/c1/c1_FrameMap.hpp ++@@ -93,6 +93,9 @@ class FrameMap : public CompilationResourceObj { ++ #endif ++ #ifdef TARGET_ARCH_ppc ++ # include "c1_FrameMap_ppc.hpp" +++#endif +++#ifdef TARGET_ARCH_aarch64 +++# include "c1_FrameMap_aarch64.hpp" ++ #endif ++ ++ ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_LIR.cpp openjdk/hotspot/src/share/vm/c1/c1_LIR.cpp ++index 776a6a3..6e1a362 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_LIR.cpp +++++ openjdk/hotspot/src/share/vm/c1/c1_LIR.cpp ++@@ -67,7 +67,7 @@ FloatRegister LIR_OprDesc::as_double_reg() const { ++ ++ #endif ++ ++-#ifdef ARM +++#if defined(ARM) || defined (TARGET_ARCH_aarch64) ++ ++ FloatRegister LIR_OprDesc::as_float_reg() const { ++ return as_FloatRegister(fpu_regnr()); ++@@ -147,7 +147,11 @@ void LIR_Address::verify() const { ++ #endif ++ #ifdef _LP64 ++ assert(base()->is_cpu_register(), "wrong base operand"); +++#ifndef TARGET_ARCH_aarch64 ++ assert(index()->is_illegal() || index()->is_double_cpu(), "wrong index operand"); +++#else +++ assert(index()->is_illegal() || index()->is_double_cpu() || index()->is_single_cpu(), "wrong index operand"); +++#endif ++ assert(base()->type() == T_OBJECT || base()->type() == T_LONG, ++ "wrong type for addresses"); ++ #else ++@@ -545,7 +549,7 @@ void LIR_OpVisitState::visit(LIR_Op* op) { ++ assert(opConvert->_info == NULL, "must be"); ++ if (opConvert->_opr->is_valid()) do_input(opConvert->_opr); ++ if (opConvert->_result->is_valid()) do_output(opConvert->_result); ++-#ifdef PPC +++#if defined(PPC) || defined(TARGET_ARCH_aarch64) ++ if (opConvert->_tmp1->is_valid()) do_temp(opConvert->_tmp1); ++ if (opConvert->_tmp2->is_valid()) do_temp(opConvert->_tmp2); ++ #endif ++@@ -1468,6 +1472,11 @@ void LIR_OprDesc::print(outputStream* out) const { ++ out->print("fpu%d", fpu_regnr()); ++ } else if (is_double_fpu()) { ++ out->print("fpu%d", fpu_regnrLo()); +++#elif defined(AARCH64) +++ } else if (is_single_fpu()) { +++ out->print("fpu%d", fpu_regnr()); +++ } else if (is_double_fpu()) { +++ out->print("fpu%d", fpu_regnrLo()); ++ #elif defined(ARM) ++ } else if (is_single_fpu()) { ++ out->print("s%d", fpu_regnr()); ++@@ -1836,7 +1845,7 @@ void LIR_OpConvert::print_instr(outputStream* out) const { ++ print_bytecode(out, bytecode()); ++ in_opr()->print(out); out->print(" "); ++ result_opr()->print(out); out->print(" "); ++-#ifdef PPC +++#if defined(PPC) || defined(TARGET_ARCH_aarch64) ++ if(tmp1()->is_valid()) { ++ tmp1()->print(out); out->print(" "); ++ tmp2()->print(out); out->print(" "); ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_LIR.hpp openjdk/hotspot/src/share/vm/c1/c1_LIR.hpp ++index f8589c3..eb3383f 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_LIR.hpp +++++ openjdk/hotspot/src/share/vm/c1/c1_LIR.hpp ++@@ -437,8 +437,8 @@ class LIR_OprDesc: public CompilationResourceObj { ++ XMMRegister as_xmm_double_reg() const; ++ // for compatibility with RInfo ++ int fpu () const { return lo_reg_half(); } ++-#endif // X86 ++-#if defined(SPARC) || defined(ARM) || defined(PPC) +++#endif +++#if defined(SPARC) || defined(ARM) || defined(PPC) || defined(AARCH64) ++ FloatRegister as_float_reg () const; ++ FloatRegister as_double_reg () const; ++ #endif ++@@ -526,7 +526,7 @@ class LIR_Address: public LIR_OprPtr { ++ , _type(type) ++ , _disp(0) { verify(); } ++ ++-#if defined(X86) || defined(ARM) +++#if defined(X86) || defined(ARM) || defined(AARCH64) ++ LIR_Address(LIR_Opr base, LIR_Opr index, Scale scale, intx disp, BasicType type): ++ _base(base) ++ , _index(index) ++@@ -601,7 +601,7 @@ class LIR_OprFact: public AllStatic { ++ LIR_OprDesc::fpu_register | ++ LIR_OprDesc::double_size); } ++ #endif ++-#ifdef X86 +++#if defined(X86) || defined(AARCH64) ++ static LIR_Opr double_fpu(int reg) { return (LIR_Opr)(intptr_t)((reg << LIR_OprDesc::reg1_shift) | ++ (reg << LIR_OprDesc::reg2_shift) | ++ LIR_OprDesc::double_type | ++@@ -1398,7 +1398,7 @@ class LIR_OpConvert: public LIR_Op1 { ++ private: ++ Bytecodes::Code _bytecode; ++ ConversionStub* _stub; ++-#ifdef PPC +++#if defined(PPC) || defined(TARGET_ARCH_aarch64) ++ LIR_Opr _tmp1; ++ LIR_Opr _tmp2; ++ #endif ++@@ -1413,7 +1413,7 @@ class LIR_OpConvert: public LIR_Op1 { ++ #endif ++ , _bytecode(code) {} ++ ++-#ifdef PPC +++#if defined(PPC) || defined(TARGET_ARCH_aarch64) ++ LIR_OpConvert(Bytecodes::Code code, LIR_Opr opr, LIR_Opr result, ConversionStub* stub ++ ,LIR_Opr tmp1, LIR_Opr tmp2) ++ : LIR_Op1(lir_convert, opr, result) ++@@ -1425,7 +1425,7 @@ class LIR_OpConvert: public LIR_Op1 { ++ ++ Bytecodes::Code bytecode() const { return _bytecode; } ++ ConversionStub* stub() const { return _stub; } ++-#ifdef PPC +++#if defined(PPC) || defined(TARGET_ARCH_aarch64) ++ LIR_Opr tmp1() const { return _tmp1; } ++ LIR_Opr tmp2() const { return _tmp2; } ++ #endif ++@@ -1973,7 +1973,14 @@ class LIR_List: public CompilationResourceObj { ++ #ifdef PPC ++ void convert(Bytecodes::Code code, LIR_Opr left, LIR_Opr dst, LIR_Opr tmp1, LIR_Opr tmp2) { append(new LIR_OpConvert(code, left, dst, NULL, tmp1, tmp2)); } ++ #endif +++#if defined (TARGET_ARCH_aarch64) +++ void convert(Bytecodes::Code code, LIR_Opr left, LIR_Opr dst, +++ ConversionStub* stub = NULL, LIR_Opr tmp1 = LIR_OprDesc::illegalOpr()) { +++ append(new LIR_OpConvert(code, left, dst, stub, tmp1, LIR_OprDesc::illegalOpr())); +++ } +++#else ++ void convert(Bytecodes::Code code, LIR_Opr left, LIR_Opr dst, ConversionStub* stub = NULL/*, bool is_32bit = false*/) { append(new LIR_OpConvert(code, left, dst, stub)); } +++#endif ++ ++ void logical_and (LIR_Opr left, LIR_Opr right, LIR_Opr dst) { append(new LIR_Op2(lir_logic_and, left, right, dst)); } ++ void logical_or (LIR_Opr left, LIR_Opr right, LIR_Opr dst) { append(new LIR_Op2(lir_logic_or, left, right, dst)); } ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp openjdk/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp ++index 528f21e..4d83fca 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp +++++ openjdk/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp ++@@ -50,6 +50,10 @@ ++ # include "nativeInst_ppc.hpp" ++ # include "vmreg_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "nativeInst_aarch64.hpp" +++# include "vmreg_aarch64.inline.hpp" +++#endif ++ ++ ++ void LIR_Assembler::patching_epilog(PatchingStub* patch, LIR_PatchCode patch_code, Register obj, CodeEmitInfo* info) { ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp openjdk/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp ++index 58adf59..f4a49b3 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp +++++ openjdk/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp ++@@ -261,6 +261,9 @@ class LIR_Assembler: public CompilationResourceObj { ++ #ifdef TARGET_ARCH_ppc ++ # include "c1_LIRAssembler_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "c1_LIRAssembler_aarch64.hpp" +++#endif ++ ++ }; ++ ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_LinearScan.cpp openjdk/hotspot/src/share/vm/c1/c1_LinearScan.cpp ++index aaae71d..93f9f5f 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_LinearScan.cpp +++++ openjdk/hotspot/src/share/vm/c1/c1_LinearScan.cpp ++@@ -47,6 +47,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "vmreg_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "vmreg_aarch64.inline.hpp" +++#endif ++ ++ ++ #ifndef PRODUCT ++@@ -2190,7 +2193,7 @@ LIR_Opr LinearScan::color_lir_opr(LIR_Opr opr, int op_id, LIR_OpVisitState::OprM ++ ++ LIR_Opr res = operand_for_interval(interval); ++ ++-#ifdef X86 +++#if defined(X86) || defined(AARCH64) ++ // new semantic for is_last_use: not only set on definite end of interval, ++ // but also before hole ++ // This may still miss some cases (e.g. for dead values), but it is not necessary that the ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_LinearScan.hpp openjdk/hotspot/src/share/vm/c1/c1_LinearScan.hpp ++index 0c06f1b..a152328 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_LinearScan.hpp +++++ openjdk/hotspot/src/share/vm/c1/c1_LinearScan.hpp ++@@ -985,6 +985,9 @@ class LinearScanTimers : public StackObj { ++ #ifdef TARGET_ARCH_ppc ++ # include "c1_LinearScan_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "c1_LinearScan_aarch64.hpp" +++#endif ++ ++ ++ #endif // SHARE_VM_C1_C1_LINEARSCAN_HPP ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp openjdk/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp ++index 55d9803..eda2174 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp +++++ openjdk/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp ++@@ -41,6 +41,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "assembler_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "assembler_aarch64.inline.hpp" +++#endif ++ ++ class CodeEmitInfo; ++ ++@@ -73,6 +76,9 @@ class C1_MacroAssembler: public MacroAssembler { ++ #ifdef TARGET_ARCH_ppc ++ # include "c1_MacroAssembler_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "c1_MacroAssembler_aarch64.hpp" +++#endif ++ ++ }; ++ ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_Runtime1.cpp openjdk/hotspot/src/share/vm/c1/c1_Runtime1.cpp ++index 765dec4..f0b3aae 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_Runtime1.cpp +++++ openjdk/hotspot/src/share/vm/c1/c1_Runtime1.cpp ++@@ -1103,6 +1103,7 @@ JRT_END ++ // completes we can check for deoptimization. This simplifies the ++ // assembly code in the cpu directories. ++ // +++#ifndef TARGET_ARCH_aarch64 ++ int Runtime1::move_klass_patching(JavaThread* thread) { ++ // ++ // NOTE: we are still in Java ++@@ -1150,6 +1151,7 @@ int Runtime1::access_field_patching(JavaThread* thread) { ++ ++ return caller_is_deopted(); ++ JRT_END +++#endif ++ ++ ++ JRT_LEAF(void, Runtime1::trace_block_entry(jint block_id)) ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_Runtime1.hpp openjdk/hotspot/src/share/vm/c1/c1_Runtime1.hpp ++index 2032564..19261be 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_Runtime1.hpp +++++ openjdk/hotspot/src/share/vm/c1/c1_Runtime1.hpp ++@@ -159,6 +159,9 @@ class Runtime1: public AllStatic { ++ static int move_klass_patching(JavaThread* thread); ++ ++ static void patch_code(JavaThread* thread, StubID stub_id); +++#ifdef TARGET_ARCH_aarch64 +++ static void patch_code_aarch64(JavaThread* thread, StubID stub_id); +++#endif ++ ++ public: ++ // initialization ++diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_globals.hpp openjdk/hotspot/src/share/vm/c1/c1_globals.hpp ++index 15f3cc1..4143a87 100644 ++--- openjdk.orig/hotspot/src/share/vm/c1/c1_globals.hpp +++++ openjdk/hotspot/src/share/vm/c1/c1_globals.hpp ++@@ -38,6 +38,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "c1_globals_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "c1_globals_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_FAMILY_linux ++ # include "c1_globals_linux.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/classfile/classFileStream.hpp openjdk/hotspot/src/share/vm/classfile/classFileStream.hpp ++index cf6f0e5..b128b3a 100644 ++--- openjdk.orig/hotspot/src/share/vm/classfile/classFileStream.hpp +++++ openjdk/hotspot/src/share/vm/classfile/classFileStream.hpp ++@@ -41,6 +41,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "bytes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytes_aarch64.hpp" +++#endif ++ ++ // Input stream for reading .class file ++ // ++diff --git openjdk.orig/hotspot/src/share/vm/classfile/stackMapTable.hpp openjdk/hotspot/src/share/vm/classfile/stackMapTable.hpp ++index f876029..ac415b6 100644 ++--- openjdk.orig/hotspot/src/share/vm/classfile/stackMapTable.hpp +++++ openjdk/hotspot/src/share/vm/classfile/stackMapTable.hpp ++@@ -46,6 +46,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "bytes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytes_aarch64.hpp" +++#endif ++ ++ class StackMapReader; ++ ++diff --git openjdk.orig/hotspot/src/share/vm/classfile/verifier.cpp openjdk/hotspot/src/share/vm/classfile/verifier.cpp ++index c5c5e11..9c22a21 100644 ++--- openjdk.orig/hotspot/src/share/vm/classfile/verifier.cpp +++++ openjdk/hotspot/src/share/vm/classfile/verifier.cpp ++@@ -60,6 +60,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "bytes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytes_aarch64.hpp" +++#endif ++ ++ #define NOFAILOVER_MAJOR_VERSION 51 ++ ++diff --git openjdk.orig/hotspot/src/share/vm/code/codeBlob.cpp openjdk/hotspot/src/share/vm/code/codeBlob.cpp ++index 244c320..429e0be 100644 ++--- openjdk.orig/hotspot/src/share/vm/code/codeBlob.cpp +++++ openjdk/hotspot/src/share/vm/code/codeBlob.cpp ++@@ -54,6 +54,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "nativeInst_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "nativeInst_aarch64.hpp" +++#endif ++ #ifdef COMPILER1 ++ #include "c1/c1_Runtime1.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/code/compiledIC.hpp openjdk/hotspot/src/share/vm/code/compiledIC.hpp ++index fe1cfb3..c9f6a2e 100644 ++--- openjdk.orig/hotspot/src/share/vm/code/compiledIC.hpp +++++ openjdk/hotspot/src/share/vm/code/compiledIC.hpp ++@@ -44,6 +44,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "nativeInst_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "nativeInst_aarch64.hpp" +++#endif ++ ++ //----------------------------------------------------------------------------- ++ // The CompiledIC represents a compiled inline cache. ++diff --git openjdk.orig/hotspot/src/share/vm/code/icBuffer.cpp openjdk/hotspot/src/share/vm/code/icBuffer.cpp ++index ed70457..d022482 100644 ++--- openjdk.orig/hotspot/src/share/vm/code/icBuffer.cpp +++++ openjdk/hotspot/src/share/vm/code/icBuffer.cpp ++@@ -52,6 +52,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "assembler_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "assembler_aarch64.inline.hpp" +++#endif ++ ++ ++ DEF_STUB_INTERFACE(ICStub); ++diff --git openjdk.orig/hotspot/src/share/vm/code/relocInfo.cpp openjdk/hotspot/src/share/vm/code/relocInfo.cpp ++index 4fd82df..78310e6 100644 ++--- openjdk.orig/hotspot/src/share/vm/code/relocInfo.cpp +++++ openjdk/hotspot/src/share/vm/code/relocInfo.cpp ++@@ -49,6 +49,10 @@ ++ # include "assembler_ppc.inline.hpp" ++ # include "nativeInst_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "assembler_aarch64.inline.hpp" +++# include "nativeInst_aarch64.hpp" +++#endif ++ ++ ++ const RelocationHolder RelocationHolder::none; // its type is relocInfo::none ++diff --git openjdk.orig/hotspot/src/share/vm/code/relocInfo.hpp openjdk/hotspot/src/share/vm/code/relocInfo.hpp ++index 1d14b44..3823889 100644 ++--- openjdk.orig/hotspot/src/share/vm/code/relocInfo.hpp +++++ openjdk/hotspot/src/share/vm/code/relocInfo.hpp ++@@ -435,6 +435,9 @@ class relocInfo VALUE_OBJ_CLASS_SPEC { ++ #endif ++ #ifdef TARGET_ARCH_ppc ++ # include "relocInfo_ppc.hpp" +++#endif +++#ifdef TARGET_ARCH_aarch64 +++# include "relocInfo_aarch64.hpp" ++ #endif ++ ++ ++diff --git openjdk.orig/hotspot/src/share/vm/code/vmreg.hpp openjdk/hotspot/src/share/vm/code/vmreg.hpp ++index d57e6f8..1c18e47 100644 ++--- openjdk.orig/hotspot/src/share/vm/code/vmreg.hpp +++++ openjdk/hotspot/src/share/vm/code/vmreg.hpp ++@@ -42,6 +42,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "register_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "register_aarch64.hpp" +++#endif ++ #ifdef COMPILER2 ++ #include "opto/adlcVMDeps.hpp" ++ #include "utilities/ostream.hpp" ++@@ -63,6 +66,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/adGlobals_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/adGlobals_aarch64.hpp" +++#endif ++ #endif ++ ++ //------------------------------VMReg------------------------------------------ ++@@ -182,6 +188,9 @@ public: ++ #ifdef TARGET_ARCH_ppc ++ # include "vmreg_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "vmreg_aarch64.hpp" +++#endif ++ ++ ++ }; ++diff --git openjdk.orig/hotspot/src/share/vm/compiler/disassembler.cpp openjdk/hotspot/src/share/vm/compiler/disassembler.cpp ++index 9603e86..3a67259 100644 ++--- openjdk.orig/hotspot/src/share/vm/compiler/disassembler.cpp +++++ openjdk/hotspot/src/share/vm/compiler/disassembler.cpp ++@@ -47,6 +47,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "depChecker_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "depChecker_aarch64.hpp" +++#endif ++ #ifdef SHARK ++ #include "shark/sharkEntry.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/compiler/disassembler.hpp openjdk/hotspot/src/share/vm/compiler/disassembler.hpp ++index a70b8cc..4c90c9a 100644 ++--- openjdk.orig/hotspot/src/share/vm/compiler/disassembler.hpp +++++ openjdk/hotspot/src/share/vm/compiler/disassembler.hpp ++@@ -78,6 +78,9 @@ class Disassembler { ++ #endif ++ #ifdef TARGET_ARCH_ppc ++ # include "disassembler_ppc.hpp" +++#endif +++#ifdef TARGET_ARCH_aarch64 +++# include "disassembler_aarch64.hpp" ++ #endif ++ ++ ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp openjdk/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp ++index d23f37a..24ca30e 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp ++@@ -44,6 +44,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "interp_masm_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "interp_masm_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_FAMILY_linux ++ # include "thread_linux.inline.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/bytecode.hpp openjdk/hotspot/src/share/vm/interpreter/bytecode.hpp ++index 107161a..205d0f7 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/bytecode.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/bytecode.hpp ++@@ -43,6 +43,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "bytes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytes_aarch64.hpp" +++#endif ++ ++ class ciBytecodeStream; ++ ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp ++index e637414..308ad3b 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp ++@@ -47,6 +47,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "bytes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytes_aarch64.hpp" +++#endif ++ ++ #ifdef CC_INTERP ++ ++@@ -618,6 +621,9 @@ void print(); ++ #ifdef TARGET_ARCH_ppc ++ # include "bytecodeInterpreter_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytecodeInterpreter_aarch64.hpp" +++#endif ++ ++ ++ }; // BytecodeInterpreter ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.inline.hpp openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.inline.hpp ++index 3715a52..0d6a8aa 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.inline.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.inline.hpp ++@@ -58,6 +58,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "bytecodeInterpreter_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytecodeInterpreter_aarch64.inline.hpp" +++#endif ++ ++ #endif // CC_INTERP ++ ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeStream.hpp openjdk/hotspot/src/share/vm/interpreter/bytecodeStream.hpp ++index 6106eac..f3dee0a 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeStream.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/bytecodeStream.hpp ++@@ -43,6 +43,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "bytes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytes_aarch64.hpp" +++#endif ++ ++ // A BytecodeStream is used for fast iteration over the bytecodes ++ // of a methodOop. ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/bytecodes.cpp openjdk/hotspot/src/share/vm/interpreter/bytecodes.cpp ++index 04f3f64..48ef30e 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/bytecodes.cpp +++++ openjdk/hotspot/src/share/vm/interpreter/bytecodes.cpp ++@@ -41,6 +41,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "bytes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytes_aarch64.hpp" +++#endif ++ ++ ++ #if defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER < 1600)) ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/cppInterpreter.hpp openjdk/hotspot/src/share/vm/interpreter/cppInterpreter.hpp ++index e3a9f2e..8347473 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/cppInterpreter.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/cppInterpreter.hpp ++@@ -101,6 +101,9 @@ class CppInterpreter: public AbstractInterpreter { ++ #ifdef TARGET_ARCH_ppc ++ # include "cppInterpreter_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "cppInterpreter_aarch64.hpp" +++#endif ++ ++ ++ }; ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp openjdk/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp ++index c27805e..272f6e8 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp ++@@ -59,6 +59,9 @@ class CppInterpreterGenerator: public AbstractInterpreterGenerator { ++ #ifdef TARGET_ARCH_ppc ++ # include "cppInterpreterGenerator_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "cppInterpreterGenerator_aarch64.hpp" +++#endif ++ ++ }; ++ ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/interpreter.hpp openjdk/hotspot/src/share/vm/interpreter/interpreter.hpp ++index 0ab0be7..6a6822f 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/interpreter.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/interpreter.hpp ++@@ -158,6 +158,9 @@ class Interpreter: public CC_INTERP_ONLY(CppInterpreter) NOT_CC_INTERP(TemplateI ++ #ifdef TARGET_ARCH_ppc ++ # include "interpreter_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "interpreter_aarch64.hpp" +++#endif ++ ++ }; ++ ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/interpreterGenerator.hpp openjdk/hotspot/src/share/vm/interpreter/interpreterGenerator.hpp ++index 7bc43ec..0434ca3 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/interpreterGenerator.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/interpreterGenerator.hpp ++@@ -56,6 +56,9 @@ InterpreterGenerator(StubQueue* _code); ++ #ifdef TARGET_ARCH_ppc ++ # include "interpreterGenerator_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "interpreterGenerator_aarch64.hpp" +++#endif ++ ++ ++ }; ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp openjdk/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp ++index e451c04..37700fb 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp +++++ openjdk/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp ++@@ -71,6 +71,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "vm_version_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "vm_version_aarch64.hpp" +++#endif ++ #ifdef COMPILER2 ++ #include "opto/runtime.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/interpreterRuntime.hpp openjdk/hotspot/src/share/vm/interpreter/interpreterRuntime.hpp ++index 93c1a9e..425400e 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/interpreterRuntime.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/interpreterRuntime.hpp ++@@ -164,6 +164,9 @@ class InterpreterRuntime: AllStatic { ++ #endif ++ #ifdef TARGET_ARCH_ppc ++ # include "interpreterRT_ppc.hpp" +++#endif +++#ifdef TARGET_ARCH_aarch64 +++# include "interpreterRT_aarch64.hpp" ++ #endif ++ ++ ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/templateInterpreter.hpp openjdk/hotspot/src/share/vm/interpreter/templateInterpreter.hpp ++index 25d74f7..f78a16e 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/templateInterpreter.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/templateInterpreter.hpp ++@@ -198,6 +198,9 @@ class TemplateInterpreter: public AbstractInterpreter { ++ #ifdef TARGET_ARCH_ppc ++ # include "templateInterpreter_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "templateInterpreter_aarch64.hpp" +++#endif ++ ++ ++ }; ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp openjdk/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp ++index fb7bdc5..6007630 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp ++@@ -101,6 +101,9 @@ class TemplateInterpreterGenerator: public AbstractInterpreterGenerator { ++ #ifdef TARGET_ARCH_ppc ++ # include "templateInterpreterGenerator_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "templateInterpreterGenerator_aarch64.hpp" +++#endif ++ ++ ++ }; ++diff --git openjdk.orig/hotspot/src/share/vm/interpreter/templateTable.hpp openjdk/hotspot/src/share/vm/interpreter/templateTable.hpp ++index 5d2a7e8..c5e0f0a 100644 ++--- openjdk.orig/hotspot/src/share/vm/interpreter/templateTable.hpp +++++ openjdk/hotspot/src/share/vm/interpreter/templateTable.hpp ++@@ -43,6 +43,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "interp_masm_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "interp_masm_aarch64.hpp" +++#endif ++ ++ #ifndef CC_INTERP ++ // All the necessary definitions used for (bytecode) template generation. Instead of ++@@ -373,6 +376,9 @@ class TemplateTable: AllStatic { ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "templateTable_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "templateTable_aarch64.hpp" +++#endif ++ ++ }; ++ #endif /* !CC_INTERP */ ++diff --git openjdk.orig/hotspot/src/share/vm/oops/constantPoolOop.hpp openjdk/hotspot/src/share/vm/oops/constantPoolOop.hpp ++index c2f985d..3d0d0fc 100644 ++--- openjdk.orig/hotspot/src/share/vm/oops/constantPoolOop.hpp +++++ openjdk/hotspot/src/share/vm/oops/constantPoolOop.hpp ++@@ -45,6 +45,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "bytes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytes_aarch64.hpp" +++#endif ++ ++ // A constantPool is an array containing class constants as described in the ++ // class file. ++diff --git openjdk.orig/hotspot/src/share/vm/oops/oop.inline.hpp openjdk/hotspot/src/share/vm/oops/oop.inline.hpp ++index db14b2e..c8b326f 100644 ++--- openjdk.orig/hotspot/src/share/vm/oops/oop.inline.hpp +++++ openjdk/hotspot/src/share/vm/oops/oop.inline.hpp ++@@ -58,6 +58,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "bytes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytes_aarch64.hpp" +++#endif ++ ++ // Implementation of all inlined member functions defined in oop.hpp ++ // We need a separate file to avoid circular references ++diff --git openjdk.orig/hotspot/src/share/vm/opto/buildOopMap.cpp openjdk/hotspot/src/share/vm/opto/buildOopMap.cpp ++index fc73160..2c5ec41 100644 ++--- openjdk.orig/hotspot/src/share/vm/opto/buildOopMap.cpp +++++ openjdk/hotspot/src/share/vm/opto/buildOopMap.cpp ++@@ -47,6 +47,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "vmreg_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "vmreg_aarch64.inline.hpp" +++#endif ++ ++ // The functions in this file builds OopMaps after all scheduling is done. ++ // ++diff --git openjdk.orig/hotspot/src/share/vm/opto/c2_globals.hpp openjdk/hotspot/src/share/vm/opto/c2_globals.hpp ++index f73dcbd..462c875 100644 ++--- openjdk.orig/hotspot/src/share/vm/opto/c2_globals.hpp +++++ openjdk/hotspot/src/share/vm/opto/c2_globals.hpp ++@@ -35,6 +35,9 @@ ++ #ifdef TARGET_ARCH_arm ++ # include "c2_globals_arm.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "c2_globals_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_FAMILY_linux ++ # include "c2_globals_linux.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/opto/c2compiler.cpp openjdk/hotspot/src/share/vm/opto/c2compiler.cpp ++index 713e3f1..948e447 100644 ++--- openjdk.orig/hotspot/src/share/vm/opto/c2compiler.cpp +++++ openjdk/hotspot/src/share/vm/opto/c2compiler.cpp ++@@ -43,6 +43,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/ad_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/ad_aarch64.hpp" +++#endif ++ ++ ++ volatile int C2Compiler::_runtimes = uninitialized; ++diff --git openjdk.orig/hotspot/src/share/vm/opto/compile.cpp openjdk/hotspot/src/share/vm/opto/compile.cpp ++index a7ee07a..91dc290 100644 ++--- openjdk.orig/hotspot/src/share/vm/opto/compile.cpp +++++ openjdk/hotspot/src/share/vm/opto/compile.cpp ++@@ -80,6 +80,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/ad_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/ad_aarch64.hpp" +++#endif ++ ++ ++ // -------------------- Compile::mach_constant_base_node ----------------------- ++diff --git openjdk.orig/hotspot/src/share/vm/opto/gcm.cpp openjdk/hotspot/src/share/vm/opto/gcm.cpp ++index 8b8f311..4deb0b4 100644 ++--- openjdk.orig/hotspot/src/share/vm/opto/gcm.cpp +++++ openjdk/hotspot/src/share/vm/opto/gcm.cpp ++@@ -53,6 +53,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/ad_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/ad_aarch64.hpp" +++#endif ++ ++ // Portions of code courtesy of Clifford Click ++ ++diff --git openjdk.orig/hotspot/src/share/vm/opto/lcm.cpp openjdk/hotspot/src/share/vm/opto/lcm.cpp ++index aee6123..4b9aaed 100644 ++--- openjdk.orig/hotspot/src/share/vm/opto/lcm.cpp +++++ openjdk/hotspot/src/share/vm/opto/lcm.cpp ++@@ -48,6 +48,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/ad_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/ad_aarch64.hpp" +++#endif ++ ++ // Optimization - Graph Style ++ ++diff --git openjdk.orig/hotspot/src/share/vm/opto/locknode.hpp openjdk/hotspot/src/share/vm/opto/locknode.hpp ++index 91b99bc..665594f 100644 ++--- openjdk.orig/hotspot/src/share/vm/opto/locknode.hpp +++++ openjdk/hotspot/src/share/vm/opto/locknode.hpp ++@@ -46,6 +46,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/ad_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/ad_aarch64.hpp" +++#endif ++ ++ //------------------------------BoxLockNode------------------------------------ ++ class BoxLockNode : public Node { ++diff --git openjdk.orig/hotspot/src/share/vm/opto/matcher.cpp openjdk/hotspot/src/share/vm/opto/matcher.cpp ++index ca2d4e3..d0f55c5 100644 ++--- openjdk.orig/hotspot/src/share/vm/opto/matcher.cpp +++++ openjdk/hotspot/src/share/vm/opto/matcher.cpp ++@@ -55,6 +55,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/ad_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/ad_aarch64.hpp" +++#endif ++ ++ OptoReg::Name OptoReg::c_frame_pointer; ++ ++diff --git openjdk.orig/hotspot/src/share/vm/opto/output.hpp openjdk/hotspot/src/share/vm/opto/output.hpp ++index 50b6e76..6a920b2 100644 ++--- openjdk.orig/hotspot/src/share/vm/opto/output.hpp +++++ openjdk/hotspot/src/share/vm/opto/output.hpp ++@@ -45,6 +45,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/ad_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/ad_aarch64.hpp" +++#endif ++ ++ class Arena; ++ class Bundle; ++diff --git openjdk.orig/hotspot/src/share/vm/opto/regmask.cpp openjdk/hotspot/src/share/vm/opto/regmask.cpp ++index ce220f0..20c6028 100644 ++--- openjdk.orig/hotspot/src/share/vm/opto/regmask.cpp +++++ openjdk/hotspot/src/share/vm/opto/regmask.cpp ++@@ -43,6 +43,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/ad_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/ad_aarch64.hpp" +++#endif ++ ++ #define RM_SIZE _RM_SIZE /* a constant private to the class RegMask */ ++ ++diff --git openjdk.orig/hotspot/src/share/vm/opto/regmask.hpp openjdk/hotspot/src/share/vm/opto/regmask.hpp ++index e50ff84..26c6854 100644 ++--- openjdk.orig/hotspot/src/share/vm/opto/regmask.hpp +++++ openjdk/hotspot/src/share/vm/opto/regmask.hpp ++@@ -46,6 +46,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/adGlobals_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/adGlobals_aarch64.hpp" +++#endif ++ ++ // Some fun naming (textual) substitutions: ++ // ++diff --git openjdk.orig/hotspot/src/share/vm/opto/runtime.cpp openjdk/hotspot/src/share/vm/opto/runtime.cpp ++index d315f10..11a58b1 100644 ++--- openjdk.orig/hotspot/src/share/vm/opto/runtime.cpp +++++ openjdk/hotspot/src/share/vm/opto/runtime.cpp ++@@ -86,6 +86,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/ad_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/ad_aarch64.hpp" +++#endif ++ ++ ++ // For debugging purposes: ++diff --git openjdk.orig/hotspot/src/share/vm/prims/jniCheck.cpp openjdk/hotspot/src/share/vm/prims/jniCheck.cpp ++index 3bf4ecd..2ad9014 100644 ++--- openjdk.orig/hotspot/src/share/vm/prims/jniCheck.cpp +++++ openjdk/hotspot/src/share/vm/prims/jniCheck.cpp ++@@ -51,6 +51,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "jniTypes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "jniTypes_aarch64.hpp" +++#endif ++ ++ ++ // Heap objects are allowed to be directly referenced only in VM code, ++diff --git openjdk.orig/hotspot/src/share/vm/prims/jni_md.h openjdk/hotspot/src/share/vm/prims/jni_md.h ++index 7fa5829..3bd4e31 100644 ++--- openjdk.orig/hotspot/src/share/vm/prims/jni_md.h +++++ openjdk/hotspot/src/share/vm/prims/jni_md.h ++@@ -39,6 +39,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "jni_ppc.h" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "jni_aarch64.h" +++#endif ++ ++ ++ /* ++diff --git openjdk.orig/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp openjdk/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp ++index 97dd154..fd1fa43 100644 ++--- openjdk.orig/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp +++++ openjdk/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp ++@@ -43,6 +43,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "bytes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytes_aarch64.hpp" +++#endif ++ // FIXME: add Deprecated, LVTT attributes ++ // FIXME: fix Synthetic attribute ++ // FIXME: per Serguei, add error return handling for constantPoolOopDesc::copy_cpool_bytes() ++diff --git openjdk.orig/hotspot/src/share/vm/prims/methodHandles.hpp openjdk/hotspot/src/share/vm/prims/methodHandles.hpp ++index 514ba6a..ea747d0 100644 ++--- openjdk.orig/hotspot/src/share/vm/prims/methodHandles.hpp +++++ openjdk/hotspot/src/share/vm/prims/methodHandles.hpp ++@@ -738,6 +738,9 @@ public: ++ #ifdef TARGET_ARCH_ppc ++ # include "methodHandles_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "methodHandles_aarch64.hpp" +++#endif ++ }; ++ ++ ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/atomic.cpp openjdk/hotspot/src/share/vm/runtime/atomic.cpp ++index 80780d7..5a34f15 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/atomic.cpp +++++ openjdk/hotspot/src/share/vm/runtime/atomic.cpp ++@@ -60,6 +60,9 @@ ++ #ifdef TARGET_OS_ARCH_linux_ppc ++ # include "atomic_linux_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_OS_ARCH_linux_aarch64 +++# include "atomic_linux_aarch64.inline.hpp" +++#endif ++ #ifdef TARGET_OS_ARCH_bsd_x86 ++ # include "atomic_bsd_x86.inline.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/deoptimization.cpp openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp ++index 4735588..4e7958a 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/deoptimization.cpp +++++ openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp ++@@ -65,6 +65,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "vmreg_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "vmreg_aarch64.inline.hpp" +++#endif ++ #ifdef COMPILER2 ++ #ifdef TARGET_ARCH_MODEL_x86_32 ++ # include "adfiles/ad_x86_32.hpp" ++@@ -84,6 +87,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/ad_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/ad_aarch64.hpp" +++#endif ++ #endif ++ ++ bool DeoptimizationMarker::_is_active = false; ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/dtraceJSDT.hpp openjdk/hotspot/src/share/vm/runtime/dtraceJSDT.hpp ++index bff4310..1129cd6 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/dtraceJSDT.hpp +++++ openjdk/hotspot/src/share/vm/runtime/dtraceJSDT.hpp ++@@ -41,6 +41,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "nativeInst_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "nativeInst_aarch64.hpp" +++#endif ++ ++ class RegisteredProbes; ++ typedef jlong OpaqueProbes; ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/frame.cpp openjdk/hotspot/src/share/vm/runtime/frame.cpp ++index 7ae9aa8..6654714 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/frame.cpp +++++ openjdk/hotspot/src/share/vm/runtime/frame.cpp ++@@ -59,6 +59,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "nativeInst_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "nativeInst_aarch64.hpp" +++#endif ++ ++ RegisterMap::RegisterMap(JavaThread *thread, bool update_map) { ++ _thread = thread; ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/frame.hpp openjdk/hotspot/src/share/vm/runtime/frame.hpp ++index c55380e..c13caae 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/frame.hpp +++++ openjdk/hotspot/src/share/vm/runtime/frame.hpp ++@@ -50,6 +50,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/adGlobals_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/adGlobals_aarch64.hpp" +++#endif ++ #endif ++ #ifdef ZERO ++ #ifdef TARGET_ARCH_zero ++@@ -491,6 +494,9 @@ class frame VALUE_OBJ_CLASS_SPEC { ++ #ifdef TARGET_ARCH_ppc ++ # include "frame_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "frame_aarch64.hpp" +++#endif ++ ++ }; ++ ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/frame.inline.hpp openjdk/hotspot/src/share/vm/runtime/frame.inline.hpp ++index b80b042..f6e1b0e 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/frame.inline.hpp +++++ openjdk/hotspot/src/share/vm/runtime/frame.inline.hpp ++@@ -46,6 +46,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "jniTypes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "jniTypes_aarch64.hpp" +++#endif ++ #ifdef ZERO ++ #ifdef TARGET_ARCH_zero ++ # include "entryFrame_zero.hpp" ++@@ -100,6 +103,9 @@ inline bool frame::is_first_frame() const { ++ #ifdef TARGET_ARCH_ppc ++ # include "frame_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "frame_aarch64.inline.hpp" +++#endif ++ ++ ++ #endif // SHARE_VM_RUNTIME_FRAME_INLINE_HPP ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp openjdk/hotspot/src/share/vm/runtime/globals.hpp ++index 10d74cd..4cc5dfb 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp +++++ openjdk/hotspot/src/share/vm/runtime/globals.hpp ++@@ -52,6 +52,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "globals_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "globals_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_FAMILY_linux ++ # include "globals_linux.hpp" ++ #endif ++@@ -88,6 +91,9 @@ ++ #ifdef TARGET_OS_ARCH_linux_ppc ++ # include "globals_linux_ppc.hpp" ++ #endif +++#ifdef TARGET_OS_ARCH_linux_aarch64 +++# include "globals_linux_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_ARCH_bsd_x86 ++ # include "globals_bsd_x86.hpp" ++ #endif ++@@ -107,6 +113,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "c1_globals_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "c1_globals_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_FAMILY_linux ++ # include "c1_globals_linux.hpp" ++ #endif ++@@ -130,6 +139,9 @@ ++ #ifdef TARGET_ARCH_arm ++ # include "c2_globals_arm.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "c2_globals_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_FAMILY_linux ++ # include "c2_globals_linux.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/icache.hpp openjdk/hotspot/src/share/vm/runtime/icache.hpp ++index d460a0f..9a3b9c8 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/icache.hpp +++++ openjdk/hotspot/src/share/vm/runtime/icache.hpp ++@@ -83,6 +83,9 @@ class AbstractICache : AllStatic { ++ #ifdef TARGET_ARCH_ppc ++ # include "icache_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "icache_aarch64.hpp" +++#endif ++ ++ ++ ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/java.cpp openjdk/hotspot/src/share/vm/runtime/java.cpp ++index fc3b67a..46794b0 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/java.cpp +++++ openjdk/hotspot/src/share/vm/runtime/java.cpp ++@@ -78,6 +78,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "vm_version_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "vm_version_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_FAMILY_linux ++ # include "thread_linux.inline.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/javaCalls.hpp openjdk/hotspot/src/share/vm/runtime/javaCalls.hpp ++index d4f8595..bc2ca9b 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/javaCalls.hpp +++++ openjdk/hotspot/src/share/vm/runtime/javaCalls.hpp ++@@ -45,6 +45,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "jniTypes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "jniTypes_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_FAMILY_linux ++ # include "thread_linux.inline.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp openjdk/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp ++index 8374aa2..6be5f79 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp +++++ openjdk/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp ++@@ -47,6 +47,9 @@ ++ #ifdef TARGET_OS_ARCH_linux_arm ++ # include "orderAccess_linux_arm.inline.hpp" ++ #endif +++#ifdef TARGET_OS_ARCH_linux_aarch64 +++# include "orderAccess_linux_aarch64.inline.hpp" +++#endif ++ #ifdef TARGET_OS_ARCH_linux_ppc ++ # include "orderAccess_linux_ppc.inline.hpp" ++ #endif ++@@ -121,6 +124,9 @@ friend class JavaCallWrapper; ++ #ifdef TARGET_ARCH_ppc ++ # include "javaFrameAnchor_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "javaFrameAnchor_aarch64.hpp" +++#endif ++ ++ ++ public: ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/os.hpp openjdk/hotspot/src/share/vm/runtime/os.hpp ++index 5867deb..0f1fbb4 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/os.hpp +++++ openjdk/hotspot/src/share/vm/runtime/os.hpp ++@@ -719,6 +719,9 @@ class os: AllStatic { ++ #ifdef TARGET_OS_ARCH_linux_ppc ++ # include "os_linux_ppc.hpp" ++ #endif +++#ifdef TARGET_OS_ARCH_linux_aarch64 +++# include "os_linux_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_ARCH_bsd_x86 ++ # include "os_bsd_x86.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/registerMap.hpp openjdk/hotspot/src/share/vm/runtime/registerMap.hpp ++index 5dd677a..7bd425f 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/registerMap.hpp +++++ openjdk/hotspot/src/share/vm/runtime/registerMap.hpp ++@@ -42,6 +42,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "register_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "register_aarch64.hpp" +++#endif ++ ++ class JavaThread; ++ ++@@ -150,6 +153,9 @@ class RegisterMap : public StackObj { ++ #ifdef TARGET_ARCH_ppc ++ # include "registerMap_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "registerMap_aarch64.hpp" +++#endif ++ ++ }; ++ ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/relocator.hpp openjdk/hotspot/src/share/vm/runtime/relocator.hpp ++index c34866f..790bd80 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/relocator.hpp +++++ openjdk/hotspot/src/share/vm/runtime/relocator.hpp ++@@ -42,6 +42,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "bytes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "bytes_aarch64.hpp" +++#endif ++ ++ // This code has been converted from the 1.1E java virtual machine ++ // Thanks to the JavaTopics group for using the code ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/safepoint.cpp openjdk/hotspot/src/share/vm/runtime/safepoint.cpp ++index c29d257..a842bb3 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/safepoint.cpp +++++ openjdk/hotspot/src/share/vm/runtime/safepoint.cpp ++@@ -70,6 +70,10 @@ ++ # include "nativeInst_ppc.hpp" ++ # include "vmreg_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "nativeInst_aarch64.hpp" +++# include "vmreg_aarch64.inline.hpp" +++#endif ++ #ifdef TARGET_OS_FAMILY_linux ++ # include "thread_linux.inline.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/sharedRuntime.cpp openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp ++index c25dcfe..aa7caff 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/sharedRuntime.cpp +++++ openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp ++@@ -76,6 +76,10 @@ ++ # include "nativeInst_ppc.hpp" ++ # include "vmreg_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "nativeInst_aarch64.hpp" +++# include "vmreg_aarch64.inline.hpp" +++#endif ++ #ifdef COMPILER1 ++ #include "c1/c1_Runtime1.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/stackValueCollection.cpp openjdk/hotspot/src/share/vm/runtime/stackValueCollection.cpp ++index 110f712..779f994 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/stackValueCollection.cpp +++++ openjdk/hotspot/src/share/vm/runtime/stackValueCollection.cpp ++@@ -39,6 +39,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "jniTypes_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "jniTypes_aarch64.hpp" +++#endif ++ ++ jint StackValueCollection::int_at(int slot) const { ++ intptr_t val = at(slot)->get_int(); ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/statSampler.cpp openjdk/hotspot/src/share/vm/runtime/statSampler.cpp ++index 0b24def..c82a214 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/statSampler.cpp +++++ openjdk/hotspot/src/share/vm/runtime/statSampler.cpp ++@@ -48,6 +48,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "vm_version_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "vm_version_aarch64.hpp" +++#endif ++ ++ // -------------------------------------------------------- ++ // StatSamplerTask ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp openjdk/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp ++index b6068a5..4ef7e38 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp +++++ openjdk/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp ++@@ -42,6 +42,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "assembler_ppc.inline.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "assembler_aarch64.inline.hpp" +++#endif ++ ++ ++ // Implementation of StubCodeDesc ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/stubRoutines.hpp openjdk/hotspot/src/share/vm/runtime/stubRoutines.hpp ++index 8481dce..f233b56 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/stubRoutines.hpp +++++ openjdk/hotspot/src/share/vm/runtime/stubRoutines.hpp ++@@ -46,6 +46,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "nativeInst_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "nativeInst_aarch64.hpp" +++#endif ++ ++ // StubRoutines provides entry points to assembly routines used by ++ // compiled code and the run-time system. Platform-specific entry ++@@ -116,6 +119,9 @@ class StubRoutines: AllStatic { ++ #endif ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "stubRoutines_ppc.hpp" +++#endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "stubRoutines_aarch64.hpp" ++ #endif ++ ++ ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/thread.hpp openjdk/hotspot/src/share/vm/runtime/thread.hpp ++index 7846cc0..6964c22 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/thread.hpp +++++ openjdk/hotspot/src/share/vm/runtime/thread.hpp ++@@ -1651,6 +1651,9 @@ public: ++ #ifdef TARGET_OS_ARCH_linux_ppc ++ # include "thread_linux_ppc.hpp" ++ #endif +++#ifdef TARGET_OS_ARCH_linux_aarch64 +++# include "thread_linux_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_ARCH_bsd_x86 ++ # include "thread_bsd_x86.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/threadLocalStorage.hpp openjdk/hotspot/src/share/vm/runtime/threadLocalStorage.hpp ++index c2f7a9e..26ef559 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/threadLocalStorage.hpp +++++ openjdk/hotspot/src/share/vm/runtime/threadLocalStorage.hpp ++@@ -68,6 +68,9 @@ class ThreadLocalStorage : AllStatic { ++ #ifdef TARGET_OS_ARCH_linux_ppc ++ # include "threadLS_linux_ppc.hpp" ++ #endif +++#ifdef TARGET_OS_ARCH_linux_aarch64 +++# include "threadLS_linux_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_ARCH_bsd_x86 ++ # include "threadLS_bsd_x86.hpp" ++ #endif ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/vmStructs.cpp openjdk/hotspot/src/share/vm/runtime/vmStructs.cpp ++index 8afd933..359f9fc 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/vmStructs.cpp +++++ openjdk/hotspot/src/share/vm/runtime/vmStructs.cpp ++@@ -125,6 +125,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "vmStructs_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "vmStructs_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_FAMILY_linux ++ # include "thread_linux.inline.hpp" ++ #endif ++@@ -161,6 +164,9 @@ ++ #ifdef TARGET_OS_ARCH_linux_ppc ++ # include "vmStructs_linux_ppc.hpp" ++ #endif +++#ifdef TARGET_OS_ARCH_linux_aarch64 +++# include "vmStructs_linux_aarch64.hpp" +++#endif ++ #ifdef TARGET_OS_ARCH_bsd_x86 ++ # include "vmStructs_bsd_x86.hpp" ++ #endif ++@@ -221,6 +227,9 @@ ++ #ifdef TARGET_ARCH_MODEL_ppc ++ # include "adfiles/adGlobals_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_MODEL_aarch64 +++# include "adfiles/adGlobals_aarch64.hpp" +++#endif ++ #endif ++ ++ // Note: the cross-product of (c1, c2, product, nonproduct, ...), ++diff --git openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp openjdk/hotspot/src/share/vm/runtime/vm_version.cpp ++index 2d51b67..bba9b01 100644 ++--- openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp +++++ openjdk/hotspot/src/share/vm/runtime/vm_version.cpp ++@@ -41,6 +41,9 @@ ++ #ifdef TARGET_ARCH_ppc ++ # include "vm_version_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "vm_version_aarch64.hpp" +++#endif ++ ++ const char* Abstract_VM_Version::_s_vm_release = Abstract_VM_Version::vm_release(); ++ const char* Abstract_VM_Version::_s_internal_vm_info_string = Abstract_VM_Version::internal_vm_info_string(); ++@@ -185,6 +188,7 @@ const char* Abstract_VM_Version::jre_release_version() { ++ AMD64_ONLY("amd64") \ ++ ARM_ONLY("arm") \ ++ PPC_ONLY("ppc") \ +++ AARCH64_ONLY("aarch64") \ ++ SPARC_ONLY("sparc") ++ #endif // ZERO ++ ++diff --git openjdk.orig/hotspot/src/share/vm/utilities/copy.hpp openjdk/hotspot/src/share/vm/utilities/copy.hpp ++index 3dcbfee..198590f 100644 ++--- openjdk.orig/hotspot/src/share/vm/utilities/copy.hpp +++++ openjdk/hotspot/src/share/vm/utilities/copy.hpp ++@@ -337,6 +337,9 @@ class Copy : AllStatic { ++ #ifdef TARGET_ARCH_ppc ++ # include "copy_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "copy_aarch64.hpp" +++#endif ++ ++ }; ++ ++diff --git openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions.hpp openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp ++index b55b0ac..5d11e26 100644 ++--- openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions.hpp +++++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp ++@@ -346,6 +346,9 @@ extern int LogMinObjAlignmentInBytes; ++ #ifdef TARGET_ARCH_ppc ++ # include "globalDefinitions_ppc.hpp" ++ #endif +++#ifdef TARGET_ARCH_aarch64 +++# include "globalDefinitions_aarch64.hpp" +++#endif ++ ++ ++ // The byte alignment to be used by Arena::Amalloc. See bugid 4169348. ++diff --git openjdk.orig/hotspot/src/share/vm/utilities/macros.hpp openjdk/hotspot/src/share/vm/utilities/macros.hpp ++index 003f2af..2aa7f87 100644 ++--- openjdk.orig/hotspot/src/share/vm/utilities/macros.hpp +++++ openjdk/hotspot/src/share/vm/utilities/macros.hpp ++@@ -261,6 +261,14 @@ ++ #define NOT_ARM(code) code ++ #endif ++ +++#ifdef AARCH64 +++#define AARCH64_ONLY(code) code +++#define NOT_AARCH64(code) +++#else +++#define AARCH64_ONLY(code) +++#define NOT_AARCH64(code) code +++#endif +++ ++ #ifdef JAVASE_EMBEDDED ++ #define EMBEDDED_ONLY(code) code ++ #define NOT_EMBEDDED(code) +-- +2.26.2 + diff --git a/gnu/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch b/gnu/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch deleted file mode 100644 index ef090e0ec9..0000000000 --- a/gnu/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch +++ /dev/null @@ -1,42 +0,0 @@ -# HG changeset patch -# User Gábor Boskovits <boskovits@gmail.com> -# Date 1530519413 -7200 -# Mon Jul 02 10:16:53 2018 +0200 -# Node ID 77e5bc9e238a28d17e097647badc04ed67a6a452 -# Parent 1ae05a34e052d1672b4a7894ddf5fc2f662eb861 -Fix gcc segfault. - -diff -r 1ae05a34e052 -r 77e5bc9e238a src/share/vm/opto/output.cpp ---- a/src/share/vm/opto/output.cpp Sun Dec 25 23:52:13 2016 +0000 -+++ b/src/share/vm/opto/output.cpp Mon Jul 02 10:16:53 2018 +0200 -@@ -1758,6 +1758,8 @@ - - // Initializer for class Scheduling - -+volatile const void *eePointer = Pipeline_Use::elaborated_elements; -+ - Scheduling::Scheduling(Arena *arena, Compile &compile) - : _arena(arena), - _cfg(compile.cfg()), -@@ -1802,8 +1804,8 @@ - - // Clear the bundling information - memcpy(_bundle_use_elements, -- Pipeline_Use::elaborated_elements, -- sizeof(Pipeline_Use::elaborated_elements)); -+ (void *)eePointer, -+ 11*sizeof(Pipeline_Use_Element)); - - // Get the last node - Block *bb = _cfg->_blocks[_cfg->_blocks.size()-1]; -@@ -1854,8 +1856,8 @@ - _bundle_use.reset(); - - memcpy(_bundle_use_elements, -- Pipeline_Use::elaborated_elements, -- sizeof(Pipeline_Use::elaborated_elements)); -+ (void *)eePointer, -+ 11*sizeof(Pipeline_Use_Element)); - } - - //------------------------------ScheduleAndBundle------------------------------ diff --git a/gnu/packages/patches/icedtea-7-hotspot-aarch64-use-c++98.patch b/gnu/packages/patches/icedtea-7-hotspot-aarch64-use-c++98.patch new file mode 100644 index 0000000000..7ad215f975 --- /dev/null +++ b/gnu/packages/patches/icedtea-7-hotspot-aarch64-use-c++98.patch @@ -0,0 +1,33 @@ +From 919dd016be1abd213b3a7d0e9a3b79e3286ef6ad Mon Sep 17 00:00:00 2001 +From: Simon South <simon@simonsouth.net> +Date: Wed, 10 Jun 2020 13:02:09 -0400 +Subject: [PATCH] aarch64: Use only C++98 + +This patch removes an unneeded C++ template that causes the build to +fail for aarch64 using gcc 7.5.0 and its default support for only the +C++98 standard. + +It is based on original work by Severin Gehwolf <sgehwolf@redhat.com>. +See: https://bugzilla.redhat.com/show_bug.cgi?id=1307224 +--- + src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp b/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp +index 0bc0a2b..6f73ca0 100644 +--- a/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp ++++ b/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp +@@ -194,10 +194,6 @@ static int reg2offset_out(VMReg r) { + return (r->reg2stack() + SharedRuntime::out_preserve_stack_slots()) * VMRegImpl::stack_slot_size; + } + +-template <class T> static const T& min (const T& a, const T& b) { +- return (a > b) ? b : a; +-} +- + // --------------------------------------------------------------------------- + // Read the array of BasicTypes from a signature, and compute where the + // arguments should go. Values in the VMRegPair regs array refer to 4-byte +-- +2.26.2 + diff --git a/gnu/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch b/gnu/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch deleted file mode 100644 index 35cfe38152..0000000000 --- a/gnu/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 2f0ef2c69e99e1096a2a72c7a29025a736b044b4 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?G=C3=A1bor=20Boskovits?= <boskovits@gmail.com> -Date: Mon, 2 Jul 2018 23:37:25 +0200 -Subject: [PATCH] Fix gcc segfault. - ---- - src/share/vm/opto/output.cpp | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/src/share/vm/opto/output.cpp b/src/share/vm/opto/output.cpp -index d46cb87..0eb9eda 100644 ---- a/src/share/vm/opto/output.cpp -+++ b/src/share/vm/opto/output.cpp -@@ -1787,6 +1787,8 @@ uint Scheduling::_total_instructions_per_bundle[Pipeline::_max_instrs_per_cycle+ - - // Initializer for class Scheduling - -+volatile const void *eePointer = Pipeline_Use::elaborated_elements; -+ - Scheduling::Scheduling(Arena *arena, Compile &compile) - : _arena(arena), - _cfg(compile.cfg()), -@@ -1829,7 +1831,7 @@ Scheduling::Scheduling(Arena *arena, Compile &compile) - memset(_current_latency, 0, node_max * sizeof(unsigned short)); - - // Clear the bundling information -- memcpy(_bundle_use_elements, Pipeline_Use::elaborated_elements, sizeof(Pipeline_Use::elaborated_elements)); -+ memcpy(_bundle_use_elements, (void *)eePointer, 11*sizeof(Pipeline_Use_Element)); - - // Get the last node - Block* block = _cfg->get_block(_cfg->number_of_blocks() - 1); -@@ -1880,8 +1882,8 @@ void Scheduling::step_and_clear() { - _bundle_use.reset(); - - memcpy(_bundle_use_elements, -- Pipeline_Use::elaborated_elements, -- sizeof(Pipeline_Use::elaborated_elements)); -+ (void *)eePointer, -+ 11*sizeof(Pipeline_Use_Element)); - } - - // Perform instruction scheduling and bundling over the sequence of --- -2.18.0 - diff --git a/gnu/packages/patches/kpackage-fix-KF5PackageMacros.cmake.patch b/gnu/packages/patches/kpackage-fix-KF5PackageMacros.cmake.patch new file mode 100644 index 0000000000..d677f19a70 --- /dev/null +++ b/gnu/packages/patches/kpackage-fix-KF5PackageMacros.cmake.patch @@ -0,0 +1,25 @@ +From 668010ebc9fd84d9dc60f90b9a4ebf3c7054977f Mon Sep 17 00:00:00 2001 +From: Hartmut Goebel <h.goebel@crazy-compilers.com> +Date: Sun, 25 Oct 2020 20:11:13 +0000 +Subject: [PATCH] Fix build errors if PREFIX is different from ECM's PREFIX. + +See <https://bugs.kde.org/424483> for details. +--- + KF5PackageMacros.cmake | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/KF5PackageMacros.cmake b/KF5PackageMacros.cmake +index f4c1d1d..acd3798 100644 +--- a/KF5PackageMacros.cmake ++++ b/KF5PackageMacros.cmake +@@ -1,6 +1,5 @@ + +-find_package(ECM 1.6.0 CONFIG REQUIRED) +-include(${ECM_KDE_MODULE_DIR}/KDEInstallDirs.cmake) ++include(KDEInstallDirs) + + set(KPACKAGE_RELATIVE_DATA_INSTALL_DIR "kpackage") + +-- +GitLab + diff --git a/gnu/packages/patches/llvm-9-fix-bitcast-miscompilation.patch b/gnu/packages/patches/llvm-9-fix-bitcast-miscompilation.patch index fe381acf1b..ec8e888618 100644 --- a/gnu/packages/patches/llvm-9-fix-bitcast-miscompilation.patch +++ b/gnu/packages/patches/llvm-9-fix-bitcast-miscompilation.patch @@ -36,8 +36,8 @@ Differential Revision: https://reviews.llvm.org/D70844 diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp index 2c9ba203fbf3..0af3de300e77 100644 ---- a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp -+++ b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp +--- llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp ++++ llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp @@ -18,6 +18,7 @@ #include "llvm/IR/DIBuilder.h" #include "llvm/IR/PatternMatch.h" @@ -158,8 +158,8 @@ index 2c9ba203fbf3..0af3de300e77 100644 diff --git a/llvm/test/Transforms/InstCombine/cast.ll b/llvm/test/Transforms/InstCombine/cast.ll index b6d1eda0601d..3ce8de033422 100644 ---- a/llvm/test/Transforms/InstCombine/cast.ll -+++ b/llvm/test/Transforms/InstCombine/cast.ll +--- llvm/test/Transforms/InstCombine/cast.ll ++++ llvm/test/Transforms/InstCombine/cast.ll @@ -824,7 +824,7 @@ define i64 @test59(i8 %A, i8 %B) { define <3 x i32> @test60(<4 x i32> %call4) { diff --git a/gnu/packages/patches/llvm-9-fix-lpad-miscompilation.patch b/gnu/packages/patches/llvm-9-fix-lpad-miscompilation.patch index 6cfe07e50a..9a97d82ddc 100644 --- a/gnu/packages/patches/llvm-9-fix-lpad-miscompilation.patch +++ b/gnu/packages/patches/llvm-9-fix-lpad-miscompilation.patch @@ -15,8 +15,8 @@ PR45261 diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index 5ac3606dc662..2638b1e8a05c 100644 ---- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp -+++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +--- llvm/lib/CodeGen/SelectionDAG/FastISel.cpp ++++ llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -225,6 +225,21 @@ static bool isRegUsedByPhiNodes(unsigned DefReg, return false; } @@ -50,8 +50,8 @@ index 5ac3606dc662..2638b1e8a05c 100644 } diff --git a/llvm/test/CodeGen/X86/sink-local-value.ll b/llvm/test/CodeGen/X86/sink-local-value.ll index b0e511ac1189..f7d861ac9b6c 100644 ---- a/llvm/test/CodeGen/X86/sink-local-value.ll -+++ b/llvm/test/CodeGen/X86/sink-local-value.ll +--- llvm/test/CodeGen/X86/sink-local-value.ll ++++ llvm/test/CodeGen/X86/sink-local-value.ll @@ -145,6 +145,42 @@ try.cont: ; preds = %entry, %lpad ; CHECK: retl diff --git a/gnu/packages/patches/llvm-9-fix-scev-miscompilation.patch b/gnu/packages/patches/llvm-9-fix-scev-miscompilation.patch index 3f16de5a2b..ec37dc16fd 100644 --- a/gnu/packages/patches/llvm-9-fix-scev-miscompilation.patch +++ b/gnu/packages/patches/llvm-9-fix-scev-miscompilation.patch @@ -21,8 +21,8 @@ llvm-svn: 373184 diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 354ae05bb841..c29fc5dbccfb 100644 ---- a/llvm/lib/Analysis/ScalarEvolution.cpp -+++ b/llvm/lib/Analysis/ScalarEvolution.cpp +--- llvm/lib/Analysis/ScalarEvolution.cpp ++++ llvm/lib/Analysis/ScalarEvolution.cpp @@ -4992,7 +4992,7 @@ const SCEV *ScalarEvolution::createSimpleAffineAddRec(PHINode *PN, // overflow. if (auto *BEInst = dyn_cast<Instruction>(BEValueV)) @@ -34,8 +34,8 @@ index 354ae05bb841..c29fc5dbccfb 100644 } diff --git a/llvm/test/Analysis/ScalarEvolution/limit-depth.ll b/llvm/test/Analysis/ScalarEvolution/limit-depth.ll index db68a4f84c91..6fdf8c5df974 100644 ---- a/llvm/test/Analysis/ScalarEvolution/limit-depth.ll -+++ b/llvm/test/Analysis/ScalarEvolution/limit-depth.ll +--- llvm/test/Analysis/ScalarEvolution/limit-depth.ll ++++ llvm/test/Analysis/ScalarEvolution/limit-depth.ll @@ -46,7 +46,7 @@ define void @test_mul(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f) { define void @test_sext(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f) { ; CHECK-LABEL: @test_sext @@ -47,8 +47,8 @@ index db68a4f84c91..6fdf8c5df974 100644 diff --git a/llvm/test/Analysis/ScalarEvolution/nsw.ll b/llvm/test/Analysis/ScalarEvolution/nsw.ll index 69427368625d..ca24f9d4a04b 100644 ---- a/llvm/test/Analysis/ScalarEvolution/nsw.ll -+++ b/llvm/test/Analysis/ScalarEvolution/nsw.ll +--- llvm/test/Analysis/ScalarEvolution/nsw.ll ++++ llvm/test/Analysis/ScalarEvolution/nsw.ll @@ -163,7 +163,7 @@ bb5: ; preds = %bb2 declare void @f(i32) @@ -60,8 +60,8 @@ index 69427368625d..ca24f9d4a04b 100644 %add = add nsw i32 %v, 1 diff --git a/llvm/test/Analysis/ScalarEvolution/trip-count12.ll b/llvm/test/Analysis/ScalarEvolution/trip-count12.ll index 5e7d72d5e4f3..d0086ee2e6ac 100644 ---- a/llvm/test/Analysis/ScalarEvolution/trip-count12.ll -+++ b/llvm/test/Analysis/ScalarEvolution/trip-count12.ll +--- llvm/test/Analysis/ScalarEvolution/trip-count12.ll ++++ llvm/test/Analysis/ScalarEvolution/trip-count12.ll @@ -1,7 +1,7 @@ ; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s @@ -73,8 +73,8 @@ index 5e7d72d5e4f3..d0086ee2e6ac 100644 define zeroext i16 @test(i16* nocapture %p, i32 %len) nounwind readonly { diff --git a/llvm/test/Analysis/ScalarEvolution/trip-count9.ll b/llvm/test/Analysis/ScalarEvolution/trip-count9.ll index c0a1d12fa00e..9a080b34743f 100644 ---- a/llvm/test/Analysis/ScalarEvolution/trip-count9.ll -+++ b/llvm/test/Analysis/ScalarEvolution/trip-count9.ll +--- llvm/test/Analysis/ScalarEvolution/trip-count9.ll ++++ llvm/test/Analysis/ScalarEvolution/trip-count9.ll @@ -179,7 +179,7 @@ exit: } diff --git a/gnu/packages/patches/lsof-fatal-test-failures.patch b/gnu/packages/patches/lsof-fatal-test-failures.patch new file mode 100644 index 0000000000..e874ba6ad4 --- /dev/null +++ b/gnu/packages/patches/lsof-fatal-test-failures.patch @@ -0,0 +1,58 @@ +From: Tobias Geerinckx-Rice <me@tobias.gr> +Date: Mon, 23 Nov 2020 05:36:53 +0100 +Subject: [PATCH] gnu: lsof: Make test failures fatal. + +Submitted upstream[0]. + +[0]: https://github.com/lsof-org/lsof/pull/144 + +diff --git a/tests/Makefile b/tests/Makefile +index 08574a0..2923bb8 100644 +--- a/tests/Makefile ++++ b/tests/Makefile +@@ -27,7 +27,7 @@ all: ${CKTSTDB} ${BASTST} ${STDTST} FRC + exit 1 ;\ + fi + @rm -f config.LT* +- -@err=0; \ ++ @err=0; \ + echo ""; \ + echo "Basic test:"; \ + ./${BASTST}; \ +@@ -54,8 +54,11 @@ all: ${CKTSTDB} ${BASTST} ${STDTST} FRC + echo "Suggestion: try the optional tests: \"make opt\""; \ + echo ""; \ + fi; \ +- fi; +- @rm -f config.LT* ++ fi; \ ++ rm -f config.LT*; \ ++ if [ $$err -ne 0 ]; then \ ++ exit 1; \ ++ fi + + auto: ckDB silent FRC + +@@ -112,7 +115,7 @@ LTunix: LTunix.c ${CONFIG} ${LIBOBJ} ${HDR} config.ldflags + + opt: ${CKTSTDB} ${OPTTST} FRC + @rm -f config.LT* +- -@err=0; \ ++ @err=0; \ + echo ""; \ + echo "Optional tests:"; \ + for i in ${OPTTST}; do \ +@@ -126,8 +129,11 @@ opt: ${CKTSTDB} ${OPTTST} FRC + else \ + echo "All optional tests succeeded."; \ + fi; \ +- echo ""; +- @rm -f config.LT* ++ echo ""; \ ++ rm -f config.LT*; \ ++ if [ $$err -ne 0 ]; then \ ++ exit 1; \ ++ fi + + optional: opt + diff --git a/gnu/packages/patches/multipath-tools-sans-systemd.patch b/gnu/packages/patches/multipath-tools-sans-systemd.patch deleted file mode 100644 index 8f3144718c..0000000000 --- a/gnu/packages/patches/multipath-tools-sans-systemd.patch +++ /dev/null @@ -1,83 +0,0 @@ -Fix various compiler warnings when built without systemd. - -Submitted upstream at <https://www.redhat.com/archives/dm-devel/2020-May/thread.html>. - -diff --git a/libmultipath/config.c b/libmultipath/config.c ---- a/libmultipath/config.c -+++ b/libmultipath/config.c -@@ -696,7 +696,7 @@ process_config_dir(struct config *conf, char *dir) - pthread_cleanup_pop(1); - } - --static void set_max_checkint_from_watchdog(struct config *conf) -+static void set_max_checkint_from_watchdog(__attribute__((unused)) struct config *conf) - { - #ifdef USE_SYSTEMD - char *envp = getenv("WATCHDOG_USEC"); -diff --git a/multipathd/main.c b/multipathd/main.c ---- a/multipathd/main.c -+++ b/multipathd/main.c -@@ -176,6 +176,7 @@ daemon_status(void) - /* - * I love you too, systemd ... - */ -+#ifdef USE_SYSTEMD - static const char * - sd_notify_status(enum daemon_status state) - { -@@ -195,7 +196,6 @@ sd_notify_status(enum daemon_status state) - return NULL; - } - --#ifdef USE_SYSTEMD - static void do_sd_notify(enum daemon_status old_state, - enum daemon_status new_state) - { -@@ -247,7 +247,9 @@ enum daemon_status wait_for_state_change_if(enum daemon_status oldstate, - static void __post_config_state(enum daemon_status state) - { - if (state != running_state && running_state != DAEMON_SHUTDOWN) { -- enum daemon_status old_state = running_state; -+ /* save state for sd_notify */ -+ enum daemon_status -+ __attribute__((unused)) old_state = running_state; - - running_state = state; - pthread_cond_broadcast(&config_cond); -@@ -272,7 +274,9 @@ int set_config_state(enum daemon_status state) - pthread_cleanup_push(config_cleanup, NULL); - pthread_mutex_lock(&config_lock); - if (running_state != state) { -- enum daemon_status old_state = running_state; -+ /* save state for sd_notify */ -+ enum daemon_status -+ __attribute__((unused)) old_state = running_state; - - if (running_state == DAEMON_SHUTDOWN) - rc = EINVAL; -@@ -2280,7 +2284,6 @@ checkerloop (void *ap) - struct timespec last_time; - struct config *conf; - int foreign_tick = 0; -- bool use_watchdog; - - pthread_cleanup_push(rcu_unregister, NULL); - rcu_register_thread(); -@@ -2292,11 +2295,15 @@ checkerloop (void *ap) - get_monotonic_time(&last_time); - last_time.tv_sec -= 1; - -- /* use_watchdog is set from process environment and never changes */ - conf = get_multipath_config(); -- use_watchdog = conf->use_watchdog; - put_multipath_config(conf); - -+#ifdef USE_SYSTEMD -+ /* use_watchdog is set from process environment and never changes */ -+ bool use_watchdog; -+ use_watchdog = conf->use_watchdog; -+#endif -+ - while (1) { - struct timespec diff_time, start_time, end_time; - int num_paths = 0, strict_timing, rc = 0; diff --git a/gnu/packages/patches/mupdf-fix-linkage.patch b/gnu/packages/patches/mupdf-fix-linkage.patch new file mode 100644 index 0000000000..4ffd1c6a77 --- /dev/null +++ b/gnu/packages/patches/mupdf-fix-linkage.patch @@ -0,0 +1,27 @@ +From: Tobias Geerinckx-Rice <me@tobias.gr> +Date: Tue, 24 Nov 2020 10:29:28 +0000 +Subject: [PATCH] gnu: mupdf: Fix linkage. + +Replace broken linkage to ‘build/shared-release/libmupdf.so’ with the +proper ‘-L$(libdir) -lmupdf’ incantation, and fix libmupdf.so's mode. + +--- mupdf-1.18.0-source.org/Makefile ++++ mupdf-1.18.0-source/Makefile +@@ -61,7 +61,7 @@ + ifdef RANLIB + RANLIB_CMD = $(QUIET_RANLIB) $(RANLIB) $@ + endif +-LINK_CMD = $(QUIET_LINK) $(MKTGTDIR) ; $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) ++LINK_CMD = $(QUIET_LINK) $(MKTGTDIR) ; $(CC) $(LDFLAGS) -o $@ $(subst $(MUPDF_LIB),-L$(libdir) -L$(OUT) -lmupdf,$^) $(LIBS) + TAGS_CMD = $(QUIET_TAGS) ctags -R --c-kinds=+p + WINDRES_CMD = $(QUIET_WINDRES) $(MKTGTDIR) ; $(WINDRES) $< $@ + OBJCOPY_CMD = $(QUIET_OBJCOPY) $(MKTGTDIR) ; $(LD) -r -b binary -z noexecstack -o $@ $< +@@ -364,7 +364,7 @@ install: libs apps + install -m 644 include/mupdf/pdf/*.h $(DESTDIR)$(incdir)/mupdf/pdf + + install -d $(DESTDIR)$(libdir) +- install -m 644 $(INSTALL_LIBS) $(DESTDIR)$(libdir) ++ install -m 755 $(INSTALL_LIBS) $(DESTDIR)$(libdir) + + install -d $(DESTDIR)$(bindir) + install -m 755 $(TOOL_APPS) $(VIEW_APPS) $(DESTDIR)$(bindir) diff --git a/gnu/packages/patches/mutt-store-references.patch b/gnu/packages/patches/mutt-store-references.patch index 3b69c7b0bd..77d1680d60 100644 --- a/gnu/packages/patches/mutt-store-references.patch +++ b/gnu/packages/patches/mutt-store-references.patch @@ -2,15 +2,16 @@ By default 'mutt' embeds configure flags and the output of 'gcc -v', which contains the store file name of Bash and GCC. This patch makes sure we don't embed a reference to these in 'mutt'. ---- mutt-1.5.23/txt2c.sh 2015-06-26 22:56:56.500731643 +0200 -+++ mutt-1.5.23/txt2c.sh 2015-06-26 22:57:26.664583900 +0200 +diff --git a/txt2c.sh b/txt2c.sh +index f634bb9..53845cf 100755 +--- a/txt2c.sh ++++ b/txt2c.sh @@ -21,6 +21,8 @@ txt2c_fallback () { echo ";" } +echo "unsigned char $1[] = \"value of '$1' not kept\";" +exit 0 - ./txt2c test </dev/null >/dev/null 2>&1 && - ./txt2c "$1" || - txt2c_fallback "$1" - + if ./txt2c test </dev/null >/dev/null 2>&1; then + ./txt2c "$1" + else diff --git a/gnu/packages/patches/netcdf-date-time.patch b/gnu/packages/patches/netcdf-date-time.patch index a4e7925aa1..0bdfc55299 100644 --- a/gnu/packages/patches/netcdf-date-time.patch +++ b/gnu/packages/patches/netcdf-date-time.patch @@ -3,9 +3,9 @@ @@ -13,7 +13,7 @@ #endif - /* Tell the user the version of netCDF. */ + /** @internal The version string for the library, used by + * nc_inq_libvers(). */ -static const char nc_libvers[] = PACKAGE_VERSION " of "__DATE__" "__TIME__" $"; -+static const char nc_libvers[] = PACKAGE_VERSION" $"; ++static const char nc_libvers[] = PACKAGE_VERSION " $"; /** - \defgroup lib_version Library Version diff --git a/gnu/packages/patches/netcdf-tst_h_par.patch b/gnu/packages/patches/netcdf-tst_h_par.patch deleted file mode 100644 index ac14a4c0a2..0000000000 --- a/gnu/packages/patches/netcdf-tst_h_par.patch +++ /dev/null @@ -1,21 +0,0 @@ -From a83702834938b23cc2e843589aa223e2024a7e6f Mon Sep 17 00:00:00 2001 -From: Orion Poplawski <orion@cora.nwra.com> -Date: Tue, 29 Nov 2016 11:48:01 -0700 -Subject: [PATCH] Add missing #include "err_macros.h" to tst_h_par.c - ---- - h5_test/tst_h_par.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/h5_test/tst_h_par.c b/h5_test/tst_h_par.c -index c3da7f4..a419d55 100644 ---- a/h5_test/tst_h_par.c -+++ b/h5_test/tst_h_par.c -@@ -11,6 +11,7 @@ - $Id: tst_h_par.c,v 1.15 2010/05/25 13:53:04 ed Exp $ - */ - #include <nc_tests.h> -+#include "err_macros.h" - #include <hdf5.h> - - /* Defining USE_MPE causes the MPE trace library to be used (and you diff --git a/gnu/packages/patches/oath-toolkit-glibc-compat.patch b/gnu/packages/patches/oath-toolkit-glibc-compat.patch deleted file mode 100644 index 22814599e5..0000000000 --- a/gnu/packages/patches/oath-toolkit-glibc-compat.patch +++ /dev/null @@ -1,90 +0,0 @@ -Adjust the bundled Gnulib to cope with removal of libio interface in Glibc 2.28. - -Based on this upstream gnulib patch: -https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=4af4a4a71827c0bc5e0ec67af23edef4f15cee8e - ---- a/liboath/gl/fflush.c -+++ b/liboath/gl/fflush.c -@@ -33,7 +33,7 @@ - #undef fflush - - --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - - /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */ - static void -@@ -72,7 +72,7 @@ - - #endif - --#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) -+#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) - - # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT - /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */ -@@ -148,7 +148,7 @@ - if (stream == NULL || ! freading (stream)) - return fflush (stream); - --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - - clear_ungetc_buffer_preserving_position (stream); - ---- a/liboath/gl/fpurge.c -+++ b/liboath/gl/fpurge.c -@@ -62,7 +62,7 @@ - /* Most systems provide FILE as a struct and the necessary bitmask in - <stdio.h>, because they need it for implementing getc() and putc() as - fast macros. */ --# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - fp->_IO_read_end = fp->_IO_read_ptr; - fp->_IO_write_ptr = fp->_IO_write_base; - /* Avoid memory leak when there is an active ungetc buffer. */ ---- a/libaoth/gl/freading.c -+++ b/liboath/gl/freading.c -@@ -31,7 +31,7 @@ - /* Most systems provide FILE as a struct and the necessary bitmask in - <stdio.h>, because they need it for implementing getc() and putc() as - fast macros. */ --# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - return ((fp->_flags & _IO_NO_WRITES) != 0 - || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0 - && fp->_IO_read_base != NULL)); ---- a/liboath/gl/fseeko.c -+++ b/liboath/gl/fseeko.c -@@ -47,7 +47,7 @@ - #endif - - /* These tests are based on fpurge.c. */ --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - if (fp->_IO_read_end == fp->_IO_read_ptr - && fp->_IO_write_ptr == fp->_IO_write_base - && fp->_IO_save_base == NULL) -@@ -123,7 +123,7 @@ - return -1; - } - --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - fp->_flags &= ~_IO_EOF_SEEN; - fp->_offset = pos; - #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ ---- a/liboath/gl/stdio-impl.h -+++ b/liboath/gl/stdio-impl.h -@@ -18,6 +18,11 @@ - the same implementation of stdio extension API, except that some fields - have different naming conventions, or their access requires some casts. */ - -+/* Glibc 2.28 made _IO_IN_BACKUP private, so define it here for now. */ -+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN -+# define _IO_IN_BACKUP 0x100 -+#endif -+ - /* BSD stdio derived implementations. */ - - #if defined __NetBSD__ /* NetBSD */ diff --git a/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch b/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch deleted file mode 100644 index fd9a4c9401..0000000000 --- a/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch +++ /dev/null @@ -1,283 +0,0 @@ -From bc3b353cb2f26cf10aa5c5caebddf6d3d5b1e318 Mon Sep 17 00:00:00 2001 -From: Julien Lepiller <julien@lepiller.eu> -Date: Fri, 21 Sep 2018 22:31:29 +0200 -Subject: [PATCH] fix camlp4 in another directory - ---- - Makefile | 11 ++++++----- - configure | 13 ++++++++++++- - tests/Makefile | 2 +- - tests/camlp4-comments/Makefile | 2 +- - tests/camlp4-exclude-file/Makefile | 2 +- - tests/camlp4-exclude/Makefile | 2 +- - tests/camlp4-instrument-fast/Makefile | 2 +- - tests/camlp4-instrument/Makefile | 2 +- - tests/combine-expr/Makefile | 2 +- - tests/ppx-comments/Makefile | 2 +- - tests/ppx-exclude-file/Makefile | 2 +- - tests/ppx-exclude/Makefile | 2 +- - tests/ppx-instrument-fast/Makefile | 2 +- - tests/ppx-instrument/Makefile | 2 +- - tests/report/Makefile | 2 +- - 15 files changed, 31 insertions(+), 19 deletions(-) - -diff --git a/Makefile b/Makefile -index b0980ee..6697922 100644 ---- a/Makefile -+++ b/Makefile -@@ -25,7 +25,7 @@ PATH_BUILD=$(PATH_BASE)/_build - PATH_OCAMLDOC=$(PATH_BASE)/ocamldoc - PATH_SRC=$(PATH_BASE)/src - PATH_TESTS=$(PATH_BASE)/tests --PATH_INSTALL=$(PATH_OCAML_PREFIX)/lib/ocaml/bisect -+PATH_INSTALL=$(PREFIX)/lib/ocaml/bisect - - - # DEFINITIONS -@@ -33,7 +33,8 @@ PATH_INSTALL=$(PATH_OCAML_PREFIX)/lib/ocaml/bisect - PROJECT_NAME=bisect - OCAMLBUILD=ocamlbuild - OCAMLBUILD_ENV=WARNINGS=$(WARNINGS) PATH_OCAML_PREFIX=$(PATH_OCAML_PREFIX) --OCAMLBUILD_FLAGS=-classic-display -no-links -+CAMLP4_INCLUDE=$(shell test -z $(CAMLP4_LIBDIR) || echo "-cflags -I,$(CAMLP4_LIBDIR)") -+OCAMLBUILD_FLAGS=-classic-display -no-links $(CAMLP4_INCLUDE) - MODULES_ODOCL=$(PROJECT_NAME).odocl - MODULES_MLPACK=$(PROJECT_NAME).mlpack - MODULES_MLPACK_PP=$(PROJECT_NAME)_pp.mlpack -@@ -80,11 +81,11 @@ veryclean: clean - rm -f $(PATH_OCAMLDOC)/*.html $(PATH_OCAMLDOC)/*.css - - install: FORCE -- cp $(PATH_BUILD)/src/report/report.byte $(PATH_OCAML_PREFIX)/bin/bisect-report; \ -+ cp $(PATH_BUILD)/src/report/report.byte $(PREFIX)/bin/bisect-report; \ - if [ "$(PPX)" = "TRUE" ]; then \ -- cp $(PATH_BUILD)/src/syntax/bisect_ppx.byte $(PATH_OCAML_PREFIX)/bin; \ -+ cp $(PATH_BUILD)/src/syntax/bisect_ppx.byte $(PREFIX)/bin; \ - fi; \ -- (which ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PATH_OCAML_PREFIX)/bin/bisect-report.opt || true); \ -+ (which ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PREFIX)/bin/bisect-report.opt || true); \ - if [ -x "$(PATH_OCAMLFIND)" ]; then \ - $(PATH_OCAMLFIND) query $(PROJECT_NAME) && $(PATH_OCAMLFIND) remove $(PROJECT_NAME) || true; \ - $(PATH_OCAMLFIND) install $(PROJECT_NAME) META -optional \ -diff --git a/configure b/configure -index bb7ebf4..43ef46b 100755 ---- a/configure -+++ b/configure -@@ -21,7 +21,9 @@ - # default values - ocamlbuild=`which ocamlbuild || echo '/usr/local/bin/ocamlbuild'` - bin_path=`dirname $ocamlbuild` -+prefix='' - ocaml_prefix=`dirname $bin_path` -+camlp4_prefix=`dirname $(dirname $(which camlp4of))` - ocamlfind=`which ocamlfind 2> /dev/null || echo ''` - native_dynlink='TRUE' - devel='FALSE' -@@ -32,8 +34,12 @@ ppx='FALSE' - while [ $# -gt 0 ] - do - case "$1" in -+ -prefix) -+ prefix="$2"; shift;; - -ocaml-prefix) - ocaml_prefix="$2"; shift;; -+ -camlp4-prefix) -+ camlp4_prefix="$2"; shift;; - -ocamlfind) - ocamlfind="$2"; shift;; - -no-native-dynlink) -@@ -45,7 +51,7 @@ do - -ppx) - ppx='TRUE';; - *) -- echo "usage: $0 [-ocaml-prefix <path>] [-ocamlfind <path>] [-no-native-dynlink] [-devel]"; -+ echo "usage: $0 [-prefix <path>] [-ocaml-prefix <path>] [-camlp4-prefix <path>] [-ocamlfind <path>] [-no-native-dynlink] [-devel]"; - exit 1;; - esac - shift -@@ -57,6 +63,9 @@ if [ "$no_camlp4" = "TRUE" -a "$ppx" = "FALSE" ]; then - exit 1 - fi - -+# prefix default value -+test -z $prefix && prefix=$ocaml_prefix -+ - # make options - make_quiet=`make -f - <<EOF - default: gnumake -@@ -66,7 +75,9 @@ EOF` - - # file creation - echo "# timestamp: `date`" > Makefile.config -+echo "PREFIX=$prefix" >> Makefile.config - echo "PATH_OCAML_PREFIX=$ocaml_prefix" >> Makefile.config -+echo "PATH_CAMLP4_PREFIX=$camlp4_prefix" >> Makefile.config - echo "PATH_OCAMLFIND=$ocamlfind" >> Makefile.config - echo "NATIVE_DYNLINK=$native_dynlink" >> Makefile.config - echo "WARNINGS=$devel" >> Makefile.config -diff --git a/tests/Makefile b/tests/Makefile -index 1aba27f..9642323 100644 ---- a/tests/Makefile -+++ b/tests/Makefile -@@ -41,7 +41,7 @@ one: FORCE - else \ - echo "Running tests for '$(NAME)'..." | tee -a _log; \ - (cd $(NAME) && \ -- $(MAKE) PATH_OCAML_BIN=$(PATH_OCAML_PREFIX)/bin \ -+ $(MAKE) PATH_OCAML_BIN=$(PATH_OCAML_PREFIX)/bin PATH_CAMLP4_PREFIX=$(PATH_CAMLP4_PREFIX) \ - COMPILER=ocamlc EXECUTABLE=bytecode RUN=./ LIB_EXT=cma EXE_SUFFIX='' \ - REPORT=../../_build/src/report/report.byte && \ - cd ..) || echo '*** error' >> _log; \ -diff --git a/tests/camlp4-comments/Makefile b/tests/camlp4-comments/Makefile -index 33fca72..a918118 100644 ---- a/tests/camlp4-comments/Makefile -+++ b/tests/camlp4-comments/Makefile -@@ -2,7 +2,7 @@ default: - @rm -fr *.result *.cmp - @for file in *.ml; do \ - echo " testing '$$file' ..."; \ -- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -o $$file.result; \ -+ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -o $$file.result; \ - diff -q $$file.reference $$file.result || exit 1; \ - done - @rm -fr *.result *.cmp -diff --git a/tests/camlp4-exclude-file/Makefile b/tests/camlp4-exclude-file/Makefile -index ab13983..e2520fa 100644 ---- a/tests/camlp4-exclude-file/Makefile -+++ b/tests/camlp4-exclude-file/Makefile -@@ -2,7 +2,7 @@ default: - @rm -fr *.result *.cmp - @for file in *.ml; do \ - echo " testing '$$file' ..."; \ -- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -exclude-file exclusions -o $$file.result; \ -+ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -exclude-file exclusions -o $$file.result; \ - diff -q $$file.reference $$file.result || exit 1; \ - done - @rm -fr *.result *.cmp -diff --git a/tests/camlp4-exclude/Makefile b/tests/camlp4-exclude/Makefile -index 18aada4..d71a7bc 100644 ---- a/tests/camlp4-exclude/Makefile -+++ b/tests/camlp4-exclude/Makefile -@@ -2,7 +2,7 @@ default: - @rm -fr *.result *.cmp - @for file in *.ml; do \ - echo " testing '$$file' ..."; \ -- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -exclude 'f.*' -o $$file.result; \ -+ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -exclude 'f.*' -o $$file.result; \ - diff -q $$file.reference $$file.result || exit 1; \ - done - @rm -fr *.result *.cmp -diff --git a/tests/camlp4-instrument-fast/Makefile b/tests/camlp4-instrument-fast/Makefile -index f60767f..8506e38 100644 ---- a/tests/camlp4-instrument-fast/Makefile -+++ b/tests/camlp4-instrument-fast/Makefile -@@ -2,7 +2,7 @@ default: - @rm -fr *.result *.cmp - @for file in *.ml; do \ - echo " testing '$$file' ..."; \ -- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo -mode fast $$file -o $$file.result; \ -+ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo -mode fast $$file -o $$file.result; \ - diff -q $$file.reference $$file.result || exit 1; \ - done - @rm -fr *.result *.cmp -diff --git a/tests/camlp4-instrument/Makefile b/tests/camlp4-instrument/Makefile -index 33fca72..a918118 100644 ---- a/tests/camlp4-instrument/Makefile -+++ b/tests/camlp4-instrument/Makefile -@@ -2,7 +2,7 @@ default: - @rm -fr *.result *.cmp - @for file in *.ml; do \ - echo " testing '$$file' ..."; \ -- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -o $$file.result; \ -+ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -o $$file.result; \ - diff -q $$file.reference $$file.result || exit 1; \ - done - @rm -fr *.result *.cmp -diff --git a/tests/combine-expr/Makefile b/tests/combine-expr/Makefile -index 46ae9eb..e8e2af2 100644 ---- a/tests/combine-expr/Makefile -+++ b/tests/combine-expr/Makefile -@@ -1,4 +1,4 @@ --COMPILE_FLAGS=-I ../../_build -pp '$(PATH_OCAML_BIN)/camlp4o str.cma -I ../../_build bisect_pp.cmo' bisect.$(LIB_EXT) $(FLAGS) -+COMPILE_FLAGS=-I ../../_build -pp '$(PATH_CAMLP4_PREFIX)/bin/camlp4o str.cma -I ../../_build bisect_pp.cmo' bisect.$(LIB_EXT) $(FLAGS) - - default: clean compile run report - -diff --git a/tests/ppx-comments/Makefile b/tests/ppx-comments/Makefile -index f8c645a..667526f 100644 ---- a/tests/ppx-comments/Makefile -+++ b/tests/ppx-comments/Makefile -@@ -2,7 +2,7 @@ default: - @rm -fr *.result *.cm* - @for file in *.ml; do \ - echo " testing '$$file' ..."; \ -- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte' -dsource $$file 2> $$file.result; \ -+ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte' -dsource $$file 2> $$file.result; \ - diff -q $$file.reference $$file.result || exit 1; \ - done - @rm -fr *.result *.cm* -diff --git a/tests/ppx-exclude-file/Makefile b/tests/ppx-exclude-file/Makefile -index a575a77..0dd1a20 100644 ---- a/tests/ppx-exclude-file/Makefile -+++ b/tests/ppx-exclude-file/Makefile -@@ -2,7 +2,7 @@ default: - @rm -fr *.result *.cm* - @for file in *.ml; do \ - echo " testing '$$file' ..."; \ -- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte -exclude-file exclusions' -dsource $$file 2> $$file.result; \ -+ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte -exclude-file exclusions' -dsource $$file 2> $$file.result; \ - diff -q $$file.reference $$file.result || exit 1; \ - done - @rm -fr *.result *.cm* -diff --git a/tests/ppx-exclude/Makefile b/tests/ppx-exclude/Makefile -index a517af4..f502a42 100644 ---- a/tests/ppx-exclude/Makefile -+++ b/tests/ppx-exclude/Makefile -@@ -2,7 +2,7 @@ default: - @rm -fr *.result *.cm* - @for file in *.ml; do \ - echo " testing '$$file' ..."; \ -- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx "../../_build/src/syntax/bisect_ppx.byte -exclude 'f.*'" -dsource $$file 2> $$file.result; \ -+ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx "../../_build/src/syntax/bisect_ppx.byte -exclude 'f.*'" -dsource $$file 2> $$file.result; \ - diff -q $$file.reference $$file.result || exit 1; \ - done - @rm -fr *.result *.cm* -diff --git a/tests/ppx-instrument-fast/Makefile b/tests/ppx-instrument-fast/Makefile -index da78bb6..1195988 100644 ---- a/tests/ppx-instrument-fast/Makefile -+++ b/tests/ppx-instrument-fast/Makefile -@@ -2,7 +2,7 @@ default: - @rm -fr *.result *.cm* - @for file in *.ml; do \ - echo " testing '$$file' ..."; \ -- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte -mode fast' -dsource $$file 2> $$file.result; \ -+ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte -mode fast' -dsource $$file 2> $$file.result; \ - diff -q $$file.reference $$file.result || exit 1; \ - done - @rm -fr *.result *.cm* -diff --git a/tests/ppx-instrument/Makefile b/tests/ppx-instrument/Makefile -index f8c645a..667526f 100644 ---- a/tests/ppx-instrument/Makefile -+++ b/tests/ppx-instrument/Makefile -@@ -2,7 +2,7 @@ default: - @rm -fr *.result *.cm* - @for file in *.ml; do \ - echo " testing '$$file' ..."; \ -- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte' -dsource $$file 2> $$file.result; \ -+ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte' -dsource $$file 2> $$file.result; \ - diff -q $$file.reference $$file.result || exit 1; \ - done - @rm -fr *.result *.cm* -diff --git a/tests/report/Makefile b/tests/report/Makefile -index a7ffe44..a968bf9 100644 ---- a/tests/report/Makefile -+++ b/tests/report/Makefile -@@ -1,4 +1,4 @@ --COMPILE_FLAGS=-I ../../_build -pp '$(PATH_OCAML_BIN)/camlp4o str.cma -I ../../_build bisect_pp.cmo' bisect.$(LIB_EXT) $(FLAGS) -+COMPILE_FLAGS=-I ../../_build -pp '$(PATH_CAMLP4_PREFIX)/bin/camlp4o str.cma -I ../../_build bisect_pp.cmo' bisect.$(LIB_EXT) $(FLAGS) - XMLLINT=$(shell which xmllint) - - default: clean compile run report --- -2.18.0 - diff --git a/gnu/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch b/gnu/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch new file mode 100644 index 0000000000..1ebde1997f --- /dev/null +++ b/gnu/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch @@ -0,0 +1,68 @@ +From 3c70f2ff18650c4794556049cd4ea22a58cc719e Mon Sep 17 00:00:00 2001 +From: Christophe Troestler <Christophe.Troestler@umons.ac.be> +Date: Sun, 27 Sep 2020 23:20:52 +0200 +Subject: [PATCH] Do not store the Caml_ba_array_val pointer during surface + creation + +Extracted from Cairo git-tree on November 22, 2020 by +Brett Gilio <brettg@gnu.org> +--- + src/cairo_stubs.c | 3 ++- + tests/image_create.ml | 5 +++-- + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/src/cairo_stubs.c b/src/cairo_stubs.c +index 641ee2c..200abf3 100644 +--- a/src/cairo_stubs.c ++++ b/src/cairo_stubs.c +@@ -1580,6 +1580,7 @@ static cairo_status_t caml_cairo_image_bigarray_attach_proxy + caml_cairo_image_bigarray_finalize); + } + ++#define b (Caml_ba_array_val(vb)) + #define SURFACE_CREATE_DATA(name) \ + CAMLexport value caml_cairo_image_surface_create_for_##name \ + (value vb, value vformat, value vwidth, value vheight, value vstride) \ +@@ -1588,7 +1589,6 @@ static cairo_status_t caml_cairo_image_bigarray_attach_proxy + CAMLlocal1(vsurf); \ + cairo_surface_t* surf; \ + const int width = Int_val(vwidth); \ +- struct caml_ba_array *b = Caml_ba_array_val(vb); \ + cairo_status_t status; \ + \ + if ((b->flags & CAML_BA_MANAGED_MASK) == CAML_BA_MAPPED_FILE) \ +@@ -1610,6 +1610,7 @@ static cairo_status_t caml_cairo_image_bigarray_attach_proxy + + SURFACE_CREATE_DATA(data8) + SURFACE_CREATE_DATA(data32) ++#undef b + + #define SURFACE_GET_DATA(type, num_dims, dims ...) \ + CAMLexport value caml_cairo_image_surface_get_##type(value vsurf) \ +diff --git a/tests/image_create.ml b/tests/image_create.ml +index eec98d6..b13c206 100644 +--- a/tests/image_create.ml ++++ b/tests/image_create.ml +@@ -10,6 +10,7 @@ let create() = + + let () = + let cr = create() in ++ printf "With Cairo handle:\n%!"; + set_source_rgb cr 1. 1. 1.; + rectangle cr 0. 0. ~w:300. ~h:300.; + fill cr; +@@ -21,9 +22,9 @@ let () = + show_text cr "Hello"; + Gc.compact(); Gc.compact(); + +- eprintf "Write image\n%!"; ++ eprintf "- Write image\n%!"; + PNG.write (get_target cr) "test_image.png"; +- eprintf "Finish surface\n%!"; ++ eprintf "- Finish surface\n%!"; + Surface.finish (get_target cr); + Gc.compact() + +-- +2.29.2 + diff --git a/gnu/packages/patches/openocd-nrf52.patch b/gnu/packages/patches/openocd-nrf52.patch deleted file mode 100644 index 0ec4348cb4..0000000000 --- a/gnu/packages/patches/openocd-nrf52.patch +++ /dev/null @@ -1,827 +0,0 @@ -This patch adds support for nRF52 series devices. It is patchset 7 from -<http://openocd.zylin.com/#/c/3511/>, which has been tested, but not -merged yet in master. - -From: Michael Dietz <mjdietzx@gmail.com> -Date: Mon, 30 May 2016 12:50:44 +0000 (-0700) -Subject: Added support for nRF52 Series Devices. -X-Git-Url: http://openocd.zylin.com/gitweb?p=openocd.git;a=commitdiff_plain;h=9ba15633e221d9d72e320372ba8f49d3f30d4bce - -Added support for nRF52 Series Devices. - -Both nrf52.c and nrf52.cfg are based off of previous nRF51 files. -- Some possible race conditions with NVMC have been fixed in nRF52.c -- Removed nrf51_get_probed_chip_if_halted() as the core does not have to be halted to perform operations where it is called. -- Only registers that are needed by openOCD are defined, some registers in nRF51 don't exist in nRF52 and are removed. -- Some all around cleanup has been done. -- The protection mechanism is completely different on nRF52 and this has not been implemented yet - just prints a warning and returns for now. - -Change-Id: I4dd42c86f33f450709bb981806c2655f04aa6201 -Signed-off-by: Michael Dietz <mjdietzx@gmail.com> ---- - -diff --git a/src/flash/nor/Makefile.am b/src/flash/nor/Makefile.am -index 727e4f2..839667c 100644 ---- a/src/flash/nor/Makefile.am -+++ b/src/flash/nor/Makefile.am -@@ -36,6 +36,7 @@ NOR_DRIVERS = \ - %D%/niietcm4.c \ - %D%/non_cfi.c \ - %D%/nrf51.c \ -+ %D%/nrf52.c \ - %D%/numicro.c \ - %D%/ocl.c \ - %D%/pic32mx.c \ -diff --git a/src/flash/nor/drivers.c b/src/flash/nor/drivers.c -index 56a5cb2..071273e 100644 ---- a/src/flash/nor/drivers.c -+++ b/src/flash/nor/drivers.c -@@ -48,6 +48,7 @@ extern struct flash_driver mdr_flash; - extern struct flash_driver mrvlqspi_flash; - extern struct flash_driver niietcm4_flash; - extern struct flash_driver nrf51_flash; -+extern struct flash_driver nrf52_flash; - extern struct flash_driver numicro_flash; - extern struct flash_driver ocl_flash; - extern struct flash_driver pic32mx_flash; -@@ -100,6 +101,7 @@ static struct flash_driver *flash_drivers[] = { - &mrvlqspi_flash, - &niietcm4_flash, - &nrf51_flash, -+ &nrf52_flash, - &numicro_flash, - &ocl_flash, - &pic32mx_flash, -diff --git a/src/flash/nor/nrf52.c b/src/flash/nor/nrf52.c -new file mode 100644 -index 0000000..7f2bd35 ---- /dev/null -+++ b/src/flash/nor/nrf52.c -@@ -0,0 +1,733 @@ -+/*************************************************************************** -+ * Copyright (C) 2013 Synapse Product Development * -+ * Andrey Smirnov <andrew.smironv@gmail.com> * -+ * Angus Gratton <gus@projectgus.com> * -+ * Erdem U. Altunyurt <spamjunkeater@gmail.com> * -+ * * -+ * This program is free software; you can redistribute it and/or modify * -+ * it under the terms of the GNU General Public License as published by * -+ * the Free Software Foundation; either version 2 of the License, or * -+ * (at your option) any later version. * -+ * * -+ * This program is distributed in the hope that it will be useful, * -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of * -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -+ * GNU General Public License for more details. * -+ * * -+ * You should have received a copy of the GNU General Public License * -+ * along with this program. If not, see <http://www.gnu.org/licenses/>. * -+ ***************************************************************************/ -+ -+#ifdef HAVE_CONFIG_H -+#include "config.h" -+#endif -+ -+#include <stdlib.h> -+ -+#include "imp.h" -+#include <target/algorithm.h> -+#include <target/armv7m.h> -+#include <helper/types.h> -+ -+/* nRF52 Register addresses used by openOCD. */ -+#define NRF52_FLASH_BASE_ADDR (0x0) -+ -+#define NRF52_FICR_BASE_ADDR (0x10000000) -+#define NRF52_FICR_CODEPAGESIZE_ADDR (NRF52_FICR_BASE_ADDR | 0x010) -+#define NRF52_FICR_CODESIZE_ADDR (NRF52_FICR_BASE_ADDR | 0x014) -+ -+#define NRF52_UICR_BASE_ADDR (0x10001000) -+ -+#define NRF52_NVMC_BASE_ADDR (0x4001E000) -+#define NRF52_NVMC_READY_ADDR (NRF52_NVMC_BASE_ADDR | 0x400) -+#define NRF52_NVMC_CONFIG_ADDR (NRF52_NVMC_BASE_ADDR | 0x504) -+#define NRF52_NVMC_ERASEPAGE_ADDR (NRF52_NVMC_BASE_ADDR | 0x508) -+#define NRF52_NVMC_ERASEALL_ADDR (NRF52_NVMC_BASE_ADDR | 0x50C) -+#define NRF52_NVMC_ERASEUICR_ADDR (NRF52_NVMC_BASE_ADDR | 0x514) -+ -+/* nRF52 bit fields. */ -+enum nrf52_nvmc_config_bits { -+ NRF52_NVMC_CONFIG_REN = 0x0, -+ NRF52_NVMC_CONFIG_WEN = 0x01, -+ NRF52_NVMC_CONFIG_EEN = 0x02 -+}; -+ -+enum nrf52_nvmc_ready_bits { -+ NRF52_NVMC_BUSY = 0x0, -+ NRF52_NVMC_READY = 0x01 -+}; -+ -+/* nRF52 state information. */ -+struct nrf52_info { -+ uint32_t code_page_size; /* Size of FLASH page in bytes. */ -+ uint32_t code_memory_size; /* Size of Code FLASH region in bytes. */ -+ -+ struct { -+ bool probed; -+ int (*write) (struct flash_bank *bank, -+ struct nrf52_info *chip, -+ const uint8_t *buffer, uint32_t offset, uint32_t count); -+ } bank[2]; /* There are two regions in nRF52 FLASH - Code and UICR. */ -+ struct target *target; -+}; -+ -+static int nrf52_protect_check(struct flash_bank *bank); -+ -+static int nrf52_probe(struct flash_bank *bank) -+{ -+ int res; -+ struct nrf52_info *chip = bank->driver_priv; -+ assert(chip != NULL); -+ -+ res = target_read_u32(chip->target, -+ NRF52_FICR_CODEPAGESIZE_ADDR, -+ &chip->code_page_size); -+ if (res != ERROR_OK) { -+ LOG_ERROR("Couldn't read code page size"); -+ return res; -+ } -+ -+ res = target_read_u32(chip->target, -+ NRF52_FICR_CODESIZE_ADDR, -+ &chip->code_memory_size); -+ if (res != ERROR_OK) { -+ LOG_ERROR("Couldn't read code memory size"); -+ return res; -+ } -+ -+ chip->code_memory_size = chip->code_memory_size * chip->code_page_size; -+ -+ if (bank->base == NRF52_FLASH_BASE_ADDR) { -+ bank->size = chip->code_memory_size; -+ bank->num_sectors = bank->size / chip->code_page_size; -+ bank->sectors = calloc(bank->num_sectors, -+ sizeof((bank->sectors)[0])); -+ if (!bank->sectors) -+ return ERROR_FLASH_BANK_NOT_PROBED; -+ -+ /* Fill out the sector information: All nRF51 sectors are the same size. */ -+ for (int i = 0; i < bank->num_sectors; i++) { -+ bank->sectors[i].size = chip->code_page_size; -+ bank->sectors[i].offset = i * chip->code_page_size; -+ -+ /* Mark as unknown. */ -+ bank->sectors[i].is_erased = -1; -+ bank->sectors[i].is_protected = -1; -+ } -+ -+ nrf52_protect_check(bank); -+ -+ chip->bank[0].probed = true; -+ } else { /* This is the UICR bank. */ -+ bank->size = chip->code_page_size; -+ bank->num_sectors = 1; -+ bank->sectors = calloc(bank->num_sectors, -+ sizeof((bank->sectors)[0])); -+ if (!bank->sectors) -+ return ERROR_FLASH_BANK_NOT_PROBED; -+ -+ bank->sectors[0].size = bank->size; -+ bank->sectors[0].offset = 0; -+ -+ bank->sectors[0].is_erased = -1; -+ bank->sectors[0].is_protected = -1; -+ -+ chip->bank[1].probed = true; -+ } -+ -+ return ERROR_OK; -+} -+ -+static int nrf52_bank_is_probed(struct flash_bank *bank) -+{ -+ struct nrf52_info *chip = bank->driver_priv; -+ assert(chip != NULL); -+ -+ return chip->bank[bank->bank_number].probed; -+} -+ -+static int nrf52_auto_probe(struct flash_bank *bank) -+{ -+ if (!nrf52_bank_is_probed(bank)) -+ return nrf52_probe(bank); -+ else -+ return ERROR_OK; -+} -+ -+static int nrf52_wait_for_nvmc(struct nrf52_info *chip) -+{ -+ int res; -+ uint32_t ready; -+ int timeout = 100; -+ -+ do { -+ res = target_read_u32(chip->target, NRF52_NVMC_READY_ADDR, &ready); -+ if (res != ERROR_OK) { -+ LOG_ERROR("Couldn't read NVMC_READY register"); -+ return res; -+ } -+ -+ if (ready == NRF52_NVMC_READY) -+ return ERROR_OK; -+ -+ alive_sleep(1); -+ } while (timeout--); -+ -+ LOG_DEBUG("Timed out waiting for the NVMC to be ready"); -+ return ERROR_FLASH_BUSY; -+} -+ -+static int nrf52_nvmc_erase_enable(struct nrf52_info *chip) -+{ -+ int res; -+ -+ res = nrf52_wait_for_nvmc(chip); -+ if (res != ERROR_OK) -+ return res; -+ -+ res = target_write_u32(chip->target, -+ NRF52_NVMC_CONFIG_ADDR, -+ NRF52_NVMC_CONFIG_EEN); -+ if (res != ERROR_OK) { -+ LOG_ERROR("Failed to configure the NVMC for erasing"); -+ return res; -+ } -+ -+ return res; -+} -+ -+static int nrf52_nvmc_write_enable(struct nrf52_info *chip) -+{ -+ int res; -+ -+ res = nrf52_wait_for_nvmc(chip); -+ if (res != ERROR_OK) -+ return res; -+ -+ res = target_write_u32(chip->target, -+ NRF52_NVMC_CONFIG_ADDR, -+ NRF52_NVMC_CONFIG_WEN); -+ if (res != ERROR_OK) { -+ LOG_ERROR("Failed to configure the NVMC for writing"); -+ return res; -+ } -+ -+ return res; -+} -+ -+static int nrf52_nvmc_read_only(struct nrf52_info *chip) -+{ -+ int res; -+ -+ res = nrf52_wait_for_nvmc(chip); -+ if (res != ERROR_OK) -+ return res; -+ -+ res = target_write_u32(chip->target, -+ NRF52_NVMC_CONFIG_ADDR, -+ NRF52_NVMC_CONFIG_REN); -+ if (res != ERROR_OK) { -+ LOG_ERROR("Failed to configure the NVMC for read-only"); -+ return res; -+ } -+ -+ return res; -+} -+ -+static int nrf52_nvmc_generic_erase(struct nrf52_info *chip, -+ uint32_t erase_register, -+ uint32_t erase_value) -+{ -+ int res; -+ -+ res = nrf52_nvmc_erase_enable(chip); -+ if (res != ERROR_OK) -+ return res; -+ -+ res = target_write_u32(chip->target, -+ erase_register, -+ erase_value); -+ if (res != ERROR_OK) -+ LOG_ERROR("Failed to write NVMC erase register"); -+ -+ return nrf52_nvmc_read_only(chip); -+} -+ -+static int nrf52_protect_check(struct flash_bank *bank) -+{ -+ LOG_WARNING("nrf52_protect_check() is not implemented for nRF52 series devices yet"); -+ return ERROR_OK; -+} -+ -+static int nrf52_protect(struct flash_bank *bank, int set, int first, int last) -+{ -+ LOG_WARNING("nrf52_protect() is not implemented for nRF52 series devices yet"); -+ return ERROR_OK; -+} -+ -+static struct flash_sector *nrf52_find_sector_by_address(struct flash_bank *bank, uint32_t address) -+{ -+ struct nrf52_info *chip = bank->driver_priv; -+ assert(chip != NULL); -+ -+ for (int i = 0; i < bank->num_sectors; i++) -+ if (bank->sectors[i].offset <= address && -+ address < (bank->sectors[i].offset + chip->code_page_size)) { -+ return &bank->sectors[i]; -+ } -+ -+ return NULL; -+} -+ -+static int nrf52_erase_all(struct nrf52_info *chip) -+{ -+ LOG_DEBUG("Erasing all non-volatile memory"); -+ return nrf52_nvmc_generic_erase(chip, -+ NRF52_NVMC_ERASEALL_ADDR, -+ 0x01); -+} -+ -+static int nrf52_erase_page(struct flash_bank *bank, -+ struct nrf52_info *chip, -+ struct flash_sector *sector) -+{ -+ int res; -+ -+ LOG_DEBUG("Erasing page at 0x%"PRIx32, sector->offset); -+ if (sector->is_protected == 1) { -+ LOG_ERROR("Cannot erase protected sector at 0x%" PRIx32, sector->offset); -+ return ERROR_FAIL; -+ } -+ -+ if (bank->base == NRF52_UICR_BASE_ADDR) { -+ res = nrf52_nvmc_generic_erase(chip, -+ NRF52_NVMC_ERASEUICR_ADDR, -+ 0x00000001); -+ } else { -+ res = nrf52_nvmc_generic_erase(chip, -+ NRF52_NVMC_ERASEPAGE_ADDR, -+ sector->offset); -+ } -+ -+ if (res == ERROR_OK) -+ sector->is_erased = 1; -+ return res; -+} -+ -+static const uint8_t nrf52_flash_write_code[] = { -+ /* See contrib/loaders/flash/cortex-m0.S */ -+ /* <wait_fifo>: */ -+ 0x0d, 0x68, /* ldr r5, [r1, #0] */ -+ 0x00, 0x2d, /* cmp r5, #0 */ -+ 0x0b, 0xd0, /* beq.n 1e <exit> */ -+ 0x4c, 0x68, /* ldr r4, [r1, #4] */ -+ 0xac, 0x42, /* cmp r4, r5 */ -+ 0xf9, 0xd0, /* beq.n 0 <wait_fifo> */ -+ 0x20, 0xcc, /* ldmia r4!, {r5} */ -+ 0x20, 0xc3, /* stmia r3!, {r5} */ -+ 0x94, 0x42, /* cmp r4, r2 */ -+ 0x01, 0xd3, /* bcc.n 18 <no_wrap> */ -+ 0x0c, 0x46, /* mov r4, r1 */ -+ 0x08, 0x34, /* adds r4, #8 */ -+ /* <no_wrap>: */ -+ 0x4c, 0x60, /* str r4, [r1, #4] */ -+ 0x04, 0x38, /* subs r0, #4 */ -+ 0xf0, 0xd1, /* bne.n 0 <wait_fifo> */ -+ /* <exit>: */ -+ 0x00, 0xbe /* bkpt 0x0000 */ -+}; -+ -+ -+/* Start a low level flash write for the specified region */ -+static int nrf52_ll_flash_write(struct nrf52_info *chip, uint32_t offset, const uint8_t *buffer, uint32_t bytes) -+{ -+ struct target *target = chip->target; -+ uint32_t buffer_size = 8192; -+ struct working_area *write_algorithm; -+ struct working_area *source; -+ uint32_t address = NRF52_FLASH_BASE_ADDR + offset; -+ struct reg_param reg_params[4]; -+ struct armv7m_algorithm armv7m_info; -+ int retval = ERROR_OK; -+ -+ LOG_DEBUG("Writing buffer to flash offset=0x%"PRIx32" bytes=0x%"PRIx32, offset, bytes); -+ assert(bytes % 4 == 0); -+ -+ /* allocate working area with flash programming code */ -+ if (target_alloc_working_area(target, sizeof(nrf52_flash_write_code), -+ &write_algorithm) != ERROR_OK) { -+ LOG_WARNING("no working area available, falling back to slow memory writes"); -+ -+ for (; bytes > 0; bytes -= 4) { -+ retval = target_write_memory(chip->target, -+ offset, 4, 1, buffer); -+ if (retval != ERROR_OK) -+ return retval; -+ -+ retval = nrf52_wait_for_nvmc(chip); -+ if (retval != ERROR_OK) -+ return retval; -+ -+ offset += 4; -+ buffer += 4; -+ } -+ -+ return ERROR_OK; -+ } -+ -+ LOG_WARNING("using fast async flash loader. This is currently supported"); -+ LOG_WARNING("only with ST-Link and CMSIS-DAP. If you have issues, add"); -+ LOG_WARNING("\"set WORKAREASIZE 0\" before sourcing nrf52.cfg to disable it"); -+ -+ retval = target_write_buffer(target, write_algorithm->address, -+ sizeof(nrf52_flash_write_code), -+ nrf52_flash_write_code); -+ if (retval != ERROR_OK) -+ return retval; -+ -+ /* memory buffer */ -+ while (target_alloc_working_area(target, buffer_size, &source) != ERROR_OK) { -+ buffer_size /= 2; -+ buffer_size &= ~3UL; /* Make sure it's 4 byte aligned */ -+ if (buffer_size <= 256) { -+ /* free working area, write algorithm already allocated */ -+ target_free_working_area(target, write_algorithm); -+ -+ LOG_WARNING("No large enough working area available, can't do block memory writes"); -+ return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; -+ } -+ } -+ -+ armv7m_info.common_magic = ARMV7M_COMMON_MAGIC; -+ armv7m_info.core_mode = ARM_MODE_THREAD; -+ -+ init_reg_param(®_params[0], "r0", 32, PARAM_IN_OUT); /* byte count */ -+ init_reg_param(®_params[1], "r1", 32, PARAM_OUT); /* buffer start */ -+ init_reg_param(®_params[2], "r2", 32, PARAM_OUT); /* buffer end */ -+ init_reg_param(®_params[3], "r3", 32, PARAM_IN_OUT); /* target address */ -+ -+ buf_set_u32(reg_params[0].value, 0, 32, bytes); -+ buf_set_u32(reg_params[1].value, 0, 32, source->address); -+ buf_set_u32(reg_params[2].value, 0, 32, source->address + source->size); -+ buf_set_u32(reg_params[3].value, 0, 32, address); -+ -+ retval = target_run_flash_async_algorithm(target, buffer, bytes/4, 4, -+ 0, NULL, -+ 4, reg_params, -+ source->address, source->size, -+ write_algorithm->address, 0, -+ &armv7m_info); -+ -+ target_free_working_area(target, source); -+ target_free_working_area(target, write_algorithm); -+ -+ destroy_reg_param(®_params[0]); -+ destroy_reg_param(®_params[1]); -+ destroy_reg_param(®_params[2]); -+ destroy_reg_param(®_params[3]); -+ -+ return retval; -+} -+ -+/* Check and erase flash sectors in specified range, then start a low level page write. -+ start/end must be sector aligned. -+*/ -+static int nrf52_write_pages(struct flash_bank *bank, uint32_t start, uint32_t end, const uint8_t *buffer) -+{ -+ int res; -+ uint32_t offset; -+ struct flash_sector *sector; -+ struct nrf52_info *chip = bank->driver_priv; -+ assert(chip != NULL); -+ -+ assert(start % chip->code_page_size == 0); -+ assert(end % chip->code_page_size == 0); -+ -+ /* Erase all sectors */ -+ for (offset = start; offset < end; offset += chip->code_page_size) { -+ sector = nrf52_find_sector_by_address(bank, offset); -+ -+ if (sector == NULL) { -+ LOG_ERROR("Invalid sector @ 0x%08"PRIx32, offset); -+ return ERROR_FLASH_SECTOR_INVALID; -+ } -+ -+ if (sector->is_protected == 1) { -+ LOG_ERROR("Can't erase protected sector @ 0x%08"PRIx32, offset); -+ return ERROR_FAIL; -+ } -+ -+ if (sector->is_erased != 1) { /* 1 = erased, 0= not erased, -1 = unknown */ -+ res = nrf52_erase_page(bank, chip, sector); -+ if (res != ERROR_OK) { -+ LOG_ERROR("Failed to erase sector @ 0x%08"PRIx32, sector->offset); -+ return res; -+ } -+ } -+ sector->is_erased = 1; -+ } -+ -+ res = nrf52_nvmc_write_enable(chip); -+ if (res != ERROR_OK) -+ return res; -+ -+ res = nrf52_ll_flash_write(chip, start, buffer, (end - start)); -+ if (res != ERROR_OK) { -+ LOG_ERROR("Failed to write FLASH"); -+ nrf52_nvmc_read_only(chip); -+ return res; -+ } -+ -+ return nrf52_nvmc_read_only(chip); -+} -+ -+static int nrf52_erase(struct flash_bank *bank, int first, int last) -+{ -+ int res = ERROR_OK; -+ struct nrf52_info *chip = bank->driver_priv; -+ assert(chip != NULL); -+ -+ /* For each sector to be erased */ -+ for (int s = first; s <= last && res == ERROR_OK; s++) -+ res = nrf52_erase_page(bank, chip, &bank->sectors[s]); -+ -+ return res; -+} -+ -+static int nrf52_code_flash_write(struct flash_bank *bank, -+ struct nrf52_info *chip, -+ const uint8_t *buffer, uint32_t offset, uint32_t count) -+{ -+ int res; -+ /* Need to perform reads to fill any gaps we need to preserve in the first page, -+ before the start of buffer, or in the last page, after the end of buffer */ -+ uint32_t first_page = offset / chip->code_page_size; -+ uint32_t last_page = DIV_ROUND_UP(offset+count, chip->code_page_size); -+ -+ uint32_t first_page_offset = first_page * chip->code_page_size; -+ uint32_t last_page_offset = last_page * chip->code_page_size; -+ -+ LOG_DEBUG("Padding write from 0x%08"PRIx32"-0x%08"PRIx32" as 0x%08"PRIx32"-0x%08"PRIx32, -+ offset, offset+count, first_page_offset, last_page_offset); -+ -+ uint32_t page_cnt = last_page - first_page; -+ uint8_t buffer_to_flash[page_cnt * chip->code_page_size]; -+ -+ /* Fill in any space between start of first page and start of buffer */ -+ uint32_t pre = offset - first_page_offset; -+ if (pre > 0) { -+ res = target_read_memory(bank->target, first_page_offset, 1, pre, buffer_to_flash); -+ if (res != ERROR_OK) -+ return res; -+ } -+ -+ /* Fill in main contents of buffer */ -+ memcpy(buffer_to_flash + pre, buffer, count); -+ -+ /* Fill in any space between end of buffer and end of last page */ -+ uint32_t post = last_page_offset - (offset + count); -+ if (post > 0) { -+ /* Retrieve the full row contents from Flash */ -+ res = target_read_memory(bank->target, offset + count, 1, post, buffer_to_flash + pre + count); -+ if (res != ERROR_OK) -+ return res; -+ } -+ -+ return nrf52_write_pages(bank, first_page_offset, last_page_offset, buffer_to_flash); -+} -+ -+static int nrf52_uicr_flash_write(struct flash_bank *bank, -+ struct nrf52_info *chip, -+ const uint8_t *buffer, uint32_t offset, uint32_t count) -+{ -+ int res; -+ uint32_t nrf52_uicr_size = chip->code_page_size; -+ uint8_t uicr[nrf52_uicr_size]; -+ struct flash_sector *sector = &bank->sectors[0]; -+ -+ if ((offset + count) > nrf52_uicr_size) -+ return ERROR_FAIL; -+ -+ res = target_read_memory(bank->target, NRF52_UICR_BASE_ADDR, 1, nrf52_uicr_size, uicr); -+ -+ if (res != ERROR_OK) -+ return res; -+ -+ if (sector->is_erased != 1) { -+ res = nrf52_erase_page(bank, chip, sector); -+ if (res != ERROR_OK) -+ return res; -+ } -+ -+ memcpy(&uicr[offset], buffer, count); -+ -+ res = nrf52_nvmc_write_enable(chip); -+ if (res != ERROR_OK) -+ return res; -+ -+ res = nrf52_ll_flash_write(chip, NRF52_UICR_BASE_ADDR, uicr, nrf52_uicr_size); -+ if (res != ERROR_OK) { -+ nrf52_nvmc_read_only(chip); -+ return res; -+ } -+ -+ return nrf52_nvmc_read_only(chip); -+} -+ -+ -+static int nrf52_write(struct flash_bank *bank, const uint8_t *buffer, -+ uint32_t offset, uint32_t count) -+{ -+ struct nrf52_info *chip = bank->driver_priv; -+ assert(chip != NULL); -+ -+ return chip->bank[bank->bank_number].write(bank, chip, buffer, offset, count); -+} -+ -+ -+FLASH_BANK_COMMAND_HANDLER(nrf52_flash_bank_command) -+{ -+ static struct nrf52_info *chip; -+ -+ assert(bank != NULL); -+ -+ switch (bank->base) { -+ case NRF52_FLASH_BASE_ADDR: -+ bank->bank_number = 0; -+ break; -+ case NRF52_UICR_BASE_ADDR: -+ bank->bank_number = 1; -+ break; -+ default: -+ LOG_ERROR("Invalid bank address 0x%08" PRIx32, bank->base); -+ return ERROR_FAIL; -+ } -+ -+ if (!chip) { -+ /* Create a new chip */ -+ chip = calloc(1, sizeof(*chip)); -+ assert(chip != NULL); -+ -+ chip->target = bank->target; -+ } -+ -+ switch (bank->base) { -+ case NRF52_FLASH_BASE_ADDR: -+ chip->bank[bank->bank_number].write = nrf52_code_flash_write; -+ break; -+ case NRF52_UICR_BASE_ADDR: -+ chip->bank[bank->bank_number].write = nrf52_uicr_flash_write; -+ break; -+ } -+ -+ chip->bank[bank->bank_number].probed = false; -+ bank->driver_priv = chip; -+ -+ return ERROR_OK; -+} -+ -+COMMAND_HANDLER(nrf52_handle_mass_erase_command) -+{ -+ int res; -+ struct flash_bank *bank = NULL; -+ struct target *target = get_current_target(CMD_CTX); -+ -+ res = get_flash_bank_by_addr(target, NRF52_FLASH_BASE_ADDR, true, &bank); -+ if (res != ERROR_OK) -+ return res; -+ -+ assert(bank != NULL); -+ -+ struct nrf52_info *chip = bank->driver_priv; -+ assert(chip != NULL); -+ -+ res = nrf52_erase_all(chip); -+ if (res != ERROR_OK) { -+ LOG_ERROR("Failed to erase the chip"); -+ nrf52_protect_check(bank); -+ return res; -+ } -+ -+ for (int i = 0; i < bank->num_sectors; i++) -+ bank->sectors[i].is_erased = 1; -+ -+ res = nrf52_protect_check(bank); -+ if (res != ERROR_OK) { -+ LOG_ERROR("Failed to check chip's write protection"); -+ return res; -+ } -+ -+ res = get_flash_bank_by_addr(target, NRF52_UICR_BASE_ADDR, true, &bank); -+ if (res != ERROR_OK) -+ return res; -+ -+ bank->sectors[0].is_erased = 1; -+ -+ return ERROR_OK; -+} -+ -+static int nrf52_info(struct flash_bank *bank, char *buf, int buf_size) -+{ -+ int res; -+ uint32_t ficr[2]; -+ struct nrf52_info *chip = bank->driver_priv; -+ assert(chip != NULL); -+ -+ res = target_read_u32(chip->target, NRF52_FICR_CODEPAGESIZE_ADDR, &ficr[0]); -+ if (res != ERROR_OK) { -+ LOG_ERROR("Couldn't read NVMC_READY register"); -+ return res; -+ } -+ -+ res = target_read_u32(chip->target, NRF52_FICR_CODESIZE_ADDR, &ficr[1]); -+ if (res != ERROR_OK) { -+ LOG_ERROR("Couldn't read NVMC_READY register"); -+ return res; -+ } -+ -+ snprintf(buf, buf_size, -+ "\n--------nRF52 Series Device--------\n\n" -+ "\n[factory information control block]\n" -+ "code page size: %"PRIu32"B\n" -+ "code memory size: %"PRIu32"kB\n", -+ ficr[0], -+ (ficr[1] * ficr[0]) / 1024); -+ -+ return ERROR_OK; -+} -+ -+static const struct command_registration nrf52_exec_command_handlers[] = { -+ { -+ .name = "mass_erase", -+ .handler = nrf52_handle_mass_erase_command, -+ .mode = COMMAND_EXEC, -+ .help = "Erase all flash contents of the chip.", -+ }, -+ COMMAND_REGISTRATION_DONE -+}; -+ -+static const struct command_registration nrf52_command_handlers[] = { -+ { -+ .name = "nrf52", -+ .mode = COMMAND_ANY, -+ .help = "nrf52 flash command group", -+ .usage = "", -+ .chain = nrf52_exec_command_handlers, -+ }, -+ COMMAND_REGISTRATION_DONE -+}; -+ -+struct flash_driver nrf52_flash = { -+ .name = "nrf52", -+ .commands = nrf52_command_handlers, -+ .flash_bank_command = nrf52_flash_bank_command, -+ .info = nrf52_info, -+ .erase = nrf52_erase, -+ .protect = nrf52_protect, -+ .write = nrf52_write, -+ .read = default_flash_read, -+ .probe = nrf52_probe, -+ .auto_probe = nrf52_auto_probe, -+ .erase_check = default_flash_blank_check, -+ .protect_check = nrf52_protect_check, -+}; -diff --git a/tcl/target/nrf52.cfg b/tcl/target/nrf52.cfg -index c1cbf1a..41a22ff 100644 ---- a/tcl/target/nrf52.cfg -+++ b/tcl/target/nrf52.cfg -@@ -10,6 +10,13 @@ if { [info exists CHIPNAME] } { - set _CHIPNAME nrf52 - } - -+# Work-area is a space in RAM used for flash programming, by default use 16kB. -+if { [info exists WORKAREASIZE] } { -+ set _WORKAREASIZE $WORKAREASIZE -+} else { -+ set _WORKAREASIZE 0x4000 -+} -+ - if { [info exists CPUTAPID] } { - set _CPUTAPID $CPUTAPID - } else { -@@ -22,7 +29,15 @@ set _TARGETNAME $_CHIPNAME.cpu - target create $_TARGETNAME cortex_m -chain-position $_TARGETNAME - - adapter_khz 10000 -+$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0 - - if { ![using_hla] } { - cortex_m reset_config sysresetreq - } -+ -+flash bank $_CHIPNAME.flash nrf52 0x00000000 0 1 1 $_TARGETNAME -+flash bank $_CHIPNAME.uicr nrf52 0x10001000 0 1 1 $_TARGETNAME -+ -+adapter_khz 1000 -+ -+$_TARGETNAME configure -event reset-end {} diff --git a/gnu/packages/patches/openssh-fix-ssh-copy-id.patch b/gnu/packages/patches/openssh-fix-ssh-copy-id.patch new file mode 100644 index 0000000000..6adba639a3 --- /dev/null +++ b/gnu/packages/patches/openssh-fix-ssh-copy-id.patch @@ -0,0 +1,38 @@ +Fix a bug where ssh-copy-id would fail with "EOF: command not found": + +https://github.com/openssh/openssh-portable/pull/206 + +Patch copied from upstream source repository: + +https://github.com/openssh/openssh-portable/commit/d9e727dcc04a52caaac87543ea1d230e9e6b5604 + +From d9e727dcc04a52caaac87543ea1d230e9e6b5604 Mon Sep 17 00:00:00 2001 +From: Oleg <Fallmay@users.noreply.github.com> +Date: Thu, 1 Oct 2020 12:09:08 +0300 +Subject: [PATCH] Fix `EOF: command not found` error in ssh-copy-id + +--- + contrib/ssh-copy-id | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id +index 392f64f94..a76907717 100644 +--- a/contrib/ssh-copy-id ++++ b/contrib/ssh-copy-id +@@ -247,7 +247,7 @@ installkeys_sh() { + # the -z `tail ...` checks for a trailing newline. The echo adds one if was missing + # the cat adds the keys we're getting via STDIN + # and if available restorecon is used to restore the SELinux context +- INSTALLKEYS_SH=$(tr '\t\n' ' ' <<-EOF) ++ INSTALLKEYS_SH=$(tr '\t\n' ' ' <<-EOF + cd; + umask 077; + mkdir -p $(dirname "${AUTH_KEY_FILE}") && +@@ -258,6 +258,7 @@ installkeys_sh() { + restorecon -F .ssh ${AUTH_KEY_FILE}; + fi + EOF ++ ) + + # to defend against quirky remote shells: use 'exec sh -c' to get POSIX; + printf "exec sh -c '%s'" "${INSTALLKEYS_SH}" diff --git a/gnu/packages/patches/perl-www-curl-fix-struct-void.patch b/gnu/packages/patches/perl-www-curl-fix-struct-void.patch new file mode 100644 index 0000000000..b150950668 --- /dev/null +++ b/gnu/packages/patches/perl-www-curl-fix-struct-void.patch @@ -0,0 +1,24 @@ +From: Tobias Geerinckx-Rice <me@tobias.gr> +Date: Sat, 14 Nov 2020 15:40:56 +0100 +Subject: [PATCH] gnu: perl-www-curl: Fix struct void* usage. + +Copied verbatim from Gentoo[0]. Fixes: + + Curl.xs:76:12: error: expected ‘{’ before ‘void’ + struct void *curlm; + ^~~~ + Curl.xs:76:12: error: two or more data types in declaration specifiers + +[0]: https://694466.bugs.gentoo.org/attachment.cgi?id=595098 + +--- WWW-Curl-4.17/Curl.xs 2014-02-21 18:08:30.000000000 +0200 ++++ WWW-Curl-4.17.new/Curl.xs 2019-11-05 21:44:55.434395739 +0200 +@@ -73,7 +73,7 @@ typedef struct { + #ifdef __CURL_MULTI_H + struct CURLM *curlm; + #else +- struct void *curlm; ++ void *curlm; + #endif + } perl_curl_multi; + diff --git a/gnu/packages/patches/perl-www-curl-remove-symbol.patch b/gnu/packages/patches/perl-www-curl-remove-symbol.patch Binary files differindex ae3486708b..c32a34897b 100644 --- a/gnu/packages/patches/perl-www-curl-remove-symbol.patch +++ b/gnu/packages/patches/perl-www-curl-remove-symbol.patch diff --git a/gnu/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch b/gnu/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch new file mode 100644 index 0000000000..bd55d512cf --- /dev/null +++ b/gnu/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch @@ -0,0 +1,25 @@ +From ff5ed26f21d304e867ab57781878069567deb23d Mon Sep 17 00:00:00 2001 +From: Hartmut Goebel <h.goebel@crazy-compilers.com> +Date: Mon, 3 Aug 2020 19:49:58 +0000 +Subject: [PATCH] Fix build errors if PREFIX is different from ECM's PREFIX. + +See <https://bugs.kde.org/424483> for details +--- + KF5PlasmaMacros.cmake | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/KF5PlasmaMacros.cmake b/KF5PlasmaMacros.cmake +index 494b42d56..80b3fd8dd 100644 +--- a/KF5PlasmaMacros.cmake ++++ b/KF5PlasmaMacros.cmake +@@ -1,6 +1,5 @@ + +-find_package(ECM 1.6.0 CONFIG REQUIRED) +-include(${ECM_KDE_MODULE_DIR}/KDEInstallDirs.cmake) ++include(KDEInstallDirs) + + set(PLASMA_RELATIVE_DATA_INSTALL_DIR "plasma") + set(PLASMA_DATA_INSTALL_DIR "${KDE_INSTALL_DATADIR}/${PLASMA_RELATIVE_DATA_INSTALL_DIR}") +-- +GitLab + diff --git a/gnu/packages/patches/python-aiohttp-3.6.2-no-warning-fail.patch b/gnu/packages/patches/python-aiohttp-3.6.2-no-warning-fail.patch deleted file mode 100644 index 6cdddefd50..0000000000 --- a/gnu/packages/patches/python-aiohttp-3.6.2-no-warning-fail.patch +++ /dev/null @@ -1,34 +0,0 @@ -Do not fail test on runtime warning like: RuntimeWarning: coroutine 'noop2' was -never awaited. This could be related to -https://github.com/aio-libs/aiohttp/commit/60f01cca36b9f9d8d35dd351384eaae2f8fd0d4b, -which does not fix this issue though. - ---- a/aiohttp/pytest_plugin.py 2019-10-09 18:52:31.000000000 +0200 -+++ b/aiohttp/pytest_plugin.py 2020-03-05 08:35:48.230396025 +0100 -@@ -120,15 +120,6 @@ - """ - with warnings.catch_warnings(record=True) as _warnings: - yield -- rw = ['{w.filename}:{w.lineno}:{w.message}'.format(w=w) -- for w in _warnings # type: ignore -- if w.category == RuntimeWarning] -- if rw: -- raise RuntimeError('{} Runtime Warning{},\n{}'.format( -- len(rw), -- '' if len(rw) == 1 else 's', -- '\n'.join(rw) -- )) - - - @contextlib.contextmanager ---- a/tests/test_pytest_plugin.py 2020-03-05 09:26:58.502284893 +0100 -+++ a/tests/test_pytest_plugin.py 2020-03-05 09:27:06.074284619 +0100 -@@ -170,7 +170,7 @@ - expected_outcomes = ( - {'failed': 0, 'passed': 2} - if IS_PYPY and bool(os.environ.get('PYTHONASYNCIODEBUG')) -- else {'failed': 1, 'passed': 1} -+ else {'failed': 0, 'passed': 2} - ) - """Under PyPy "coroutine 'foobar' was never awaited" does not happen.""" - result.assert_outcomes(**expected_outcomes) diff --git a/gnu/packages/patches/python-pydot-regression-test.patch b/gnu/packages/patches/python-pydot-regression-test.patch new file mode 100644 index 0000000000..d2f0f5996e --- /dev/null +++ b/gnu/packages/patches/python-pydot-regression-test.patch @@ -0,0 +1,79 @@ +This patch is taken from the upstream repository +https://github.com/pydot/pydot/commit/a10ced4d132361027a545a471af4541dea8c5cf5.patch +It should be included in the 1.4.2 release. + + +From a10ced4d132361027a545a471af4541dea8c5cf5 Mon Sep 17 00:00:00 2001 +From: Peter Nowee <peter@peternowee.com> +Date: Wed, 26 Jun 2019 15:43:38 +0800 +Subject: [PATCH] Fix multi.dot Graphviz regression test + +Commit d6602ad of 2018-12-01 fixed the regression test broken by commit +2d55978 of 2016-07-01. This revealed that `test/graphs/multi.dot` was +failing. + +`multi.dot` was introduced in commit 2b3f088 of 2010-11-07 together +with many of the other tests still here today. It has not been touched +since. It is a DOT-file containing two digraphs. The regression test +compares the JPEG images rendered from the DOT-file by pydot with those +rendered by Graphviz's dot directly. + +Commit 66734d2 of 2016-07-01 is the actual cause of the failure. It +changed one of the render methods of the regression test, +`_render_with_pydot`, from calculating a single hash for all the JPEG +images to calculating separate hashes for each JPEG image and then +concatenating those hashes in one long string. The other render method, +`_render_with_graphviz`, still calculates a single hash over all data. +For DOT-files that generate only one image the end result is the same, +but because `multi.dot` has two graphs, it produces two images and this +leads to comparing a string of two hashes with one single hash. + +I do not think the change in generating the hash was intentional, for +the following reasons: +- Commit 66734d2 states that its purpose was to adapt the test to an + API change in pydot. It does not mention a deliberate choice to + change the testing method. +- There was no effort to change `_render_with_graphviz` to also produce + multiple hashes. +- Except for easier debugging in case of a failing test with multiple + images (AFAICT, only `multi.dot`), I do not see much added benefit in + checking a concatenation of the hashes of all images vs. checking one + hash of all images together: In both cases the test will fail if one + or more images is rendered differently. +- Given that there were many commits authored that same hour, including + commit 2d55978 which broke the regression tests, I suspect the author + did not run the tests for each individual commit, but only at the end + of that batch, and was therefore also not alerted of this change by + the test suite. + +Assuming that the change was not intended, this commit will now revert +`_render_with_pydot` to the old behavior of calculating a single hash +from all JPEG image data. + +Tested with Debian 9.9, Graphviz 2.38.0-17, Python 2.7.13-2 and 3.5.3-1. + +Fixes https://github.com/pydot/pydot/issues/204. +--- + test/pydot_unittest.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/test/pydot_unittest.py b/test/pydot_unittest.py +index 881ee16..64aa856 100644 +--- a/test/pydot_unittest.py ++++ b/test/pydot_unittest.py +@@ -194,11 +194,11 @@ def _render_with_graphviz(self, filename, encoding): + + def _render_with_pydot(self, filename, encoding): + c = pydot.graph_from_dot_file(filename, encoding=encoding) +- sha = '' ++ jpe_data = bytearray() + for g in c: +- jpe_data = g.create(prog=TEST_PROGRAM, format='jpe', encoding=encoding) +- sha += sha256(jpe_data).hexdigest() +- return sha ++ jpe_data.extend(g.create(prog=TEST_PROGRAM, format='jpe', ++ encoding=encoding)) ++ return sha256(jpe_data).hexdigest() + + def test_my_regression_tests(self): + path = os.path.join(test_dir, TESTS_DIR_1) diff --git a/gnu/packages/patches/python-robotframework-honor-source-date-epoch.patch b/gnu/packages/patches/python-robotframework-source-date-epoch.patch index ccd87911d8..ccd87911d8 100644 --- a/gnu/packages/patches/python-robotframework-honor-source-date-epoch.patch +++ b/gnu/packages/patches/python-robotframework-source-date-epoch.patch diff --git a/gnu/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch b/gnu/packages/patches/python2-pygobject-2-deprecation.patch index 6a08e56351..6a08e56351 100644 --- a/gnu/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch +++ b/gnu/packages/patches/python2-pygobject-2-deprecation.patch diff --git a/gnu/packages/patches/rcs-5.10.0-no-stdin.patch b/gnu/packages/patches/rcs-5.10.0-no-stdin.patch new file mode 100644 index 0000000000..56edfe7b65 --- /dev/null +++ b/gnu/packages/patches/rcs-5.10.0-no-stdin.patch @@ -0,0 +1,57 @@ +http://git.savannah.gnu.org/cgit/rcs.git/patch/?id=8883c4f5a29be18e9ea09bd27a7b660830de45bb + + +From 8883c4f5a29be18e9ea09bd27a7b660830de45bb Mon Sep 17 00:00:00 2001 +From: Thien-Thi Nguyen <ttn@gnu.org> +Date: Fri, 23 Oct 2020 09:23:49 -0400 +Subject: [v] Don't test signal handling if stdin not ok. + +<https://mail.gnu.org/archive/html/bug-rcs/2020-10/msg00014.html> + +* tests/t632: If stdin is not open and connected to +a tty, skip the signal handling portion of the test. +--- + tests/ChangeLog | 9 +++++++++ + tests/t632 | 9 +++++++++ + 2 files changed, 18 insertions(+) + +diff --git a/tests/ChangeLog b/tests/ChangeLog +index c3715c0..0565058 100644 +--- a/tests/ChangeLog ++++ b/tests/ChangeLog +@@ -1,3 +1,12 @@ ++2020-10-23 Thien-Thi Nguyen <ttn@gnu.org> ++ ++ [v] Don't test signal handling if stdin not ok. ++ ++ <https://mail.gnu.org/archive/html/bug-rcs/2020-10/msg00014.html> ++ ++ * t632: If stdin is not open and connected to ++ a tty, skip the signal handling portion of the test. ++ + 2020-10-20 Thien-Thi Nguyen <ttn@gnu.org> + + Release: 5.10.0 +diff --git a/tests/t632 b/tests/t632 +index df6acc9..677ec8c 100644 +--- a/tests/t632 ++++ b/tests/t632 +@@ -40,6 +40,15 @@ echo | co -l -I $w \ + # (This is skipped if GNU coreutils timeout(1) is not available.) + ## + ++# <https://mail.gnu.org/archive/html/bug-rcs/2020-10/msg00014.html> ++# The timeout test needs co(1) to block on input. ++# If stdin is not open and connected to a tty, skip out. ++if test -t 0 ; then ++ echo STDIN OK ++else ++ exit 0 ++fi ++ + # TODO: Don't be lame! Pick one: + # (a) Mimic timeout(1) w/ sh commands. + # (b) Incorporate heart of timeout(1) into ./btdt and use that. +-- +cgit v1.2.1 + diff --git a/gnu/packages/patches/rcs-5.9.4-noreturn.patch b/gnu/packages/patches/rcs-5.9.4-noreturn.patch deleted file mode 100644 index 0c0c044ed5..0000000000 --- a/gnu/packages/patches/rcs-5.9.4-noreturn.patch +++ /dev/null @@ -1,94 +0,0 @@ -Builds with GCC-5 failed due to misplaced `_Noreturn (__attribute__((noreturn)))` -statement. - -Patch copied from upstream source repository: - -http://git.savannah.gnu.org/cgit/rcs.git/commit/?h=p&id=260704a9164dd34cf7128d6b1e88075ffa3be054 - -Upstream bug URL: - -https://savannah.gnu.org/bugs/?49568 - -commit 260704a9164dd34cf7128d6b1e88075ffa3be054 -Author: Thien-Thi Nguyen <ttn@gnu.org> -Date: Thu Jun 18 21:25:53 2015 +0200 - - [C slog] Move ‘exiting’ to beginning of func decl. - - Apparently, ‘gcc --std=c11’ does not abide the ‘exiting’ - attribute appearing at the end of the func decl. - Reported by Romain Francoise. - See also <https://bugs.debian.org/778100>. - - * src/b-complain.h (generic_fatal, fatal_syntax, fatal_sys) - * src/b-fb.h (Ierror, Oerror) - * src/base.h (unexpected_EOF, thank_you_and_goodnight): - Move ‘exiting’ attribute to beginning of func decl. - -diff --git a/src/b-complain.h b/src/b-complain.h -index 0ffd157..ea0ffc5 100644 ---- a/src/b-complain.h -+++ b/src/b-complain.h -@@ -32,12 +32,14 @@ extern void generic_warn (char const *who, char const *fmt, ...) - printf_string (2, 3); - extern void generic_error (char const *who, char const *fmt, ...) - printf_string (2, 3); -+exiting - extern void generic_fatal (char const *who, char const *fmt, ...) -- printf_string (2, 3) exiting; -+ printf_string (2, 3); -+exiting - extern void fatal_syntax (size_t lno, char const *fmt, ...) -- printf_string (2, 3) exiting; --extern void fatal_sys (char const *who) -- exiting; -+ printf_string (2, 3); -+exiting -+extern void fatal_sys (char const *who); - - /* Idioms. Here, prefix P stands for "program" (general operation); - M for "manifestation"; R for "repository". */ -diff --git a/src/b-fb.h b/src/b-fb.h -index c9850e7..bf5eaf8 100644 ---- a/src/b-fb.h -+++ b/src/b-fb.h -@@ -21,9 +21,11 @@ - */ - - extern int change_mode (int fd, mode_t mode); --extern void Ierror (void) exiting; -+exiting -+extern void Ierror (void); - extern void testIerror (FILE *f); --extern void Oerror (void) exiting; -+exiting -+extern void Oerror (void); - extern void testOerror (FILE *o); - extern FILE *fopen_safer (char const *filename, char const *type); - extern void Ozclose (FILE **p); -diff --git a/src/base.h b/src/base.h -index 163ee09..5e7a9f8 100644 ---- a/src/base.h -+++ b/src/base.h -@@ -755,8 +755,8 @@ int dorewrite (bool lockflag, int changed); - int donerewrite (int changed, time_t newRCStime); - void ORCSclose (void); - void ORCSerror (void); --void unexpected_EOF (void) -- exiting; -+exiting -+void unexpected_EOF (void); - void initdiffcmd (struct diffcmd *dc); - int getdiffcmd (struct fro *finfile, bool delimiter, - FILE *foutfile, struct diffcmd *dc); -@@ -831,8 +831,8 @@ char const *date2str (char const date[datesize], - char datebuf[datesize + zonelenmax]); - - /* rcsutil */ --void thank_you_and_goodnight (int const how) -- exiting; -+exiting -+void thank_you_and_goodnight (int const how); - /* These are for ‘thank_you_and_goodnight’. */ - #define TYAG_ORCSERROR (1 << 3) - #define TYAG_DIRTMPUNLINK (1 << 2) diff --git a/gnu/packages/patches/sbcl-geco-fix-organism-class.patch b/gnu/packages/patches/sbcl-geco-fix-organism-class.patch new file mode 100644 index 0000000000..817596241e --- /dev/null +++ b/gnu/packages/patches/sbcl-geco-fix-organism-class.patch @@ -0,0 +1,13 @@ +Fix the ORGANISM class so that SBCL >= 2.0.9 can compile it without error. + +--- a/classes.lisp 2020-10-28 12:11:10.725659464 +0100 ++++ b/classes.lisp 2020-10-31 17:34:36.822752447 +0100 +@@ -148,7 +148,7 @@ + :accessor score + :initarg :score + :initform 'nil +- :type number) ++ :type (or number null)) + (NORMALIZED-SCORE + :accessor normalized-score + :initarg :normalized-score diff --git a/gnu/packages/patches/scribus-1.5.5-poppler-0.86-build-fix.patch b/gnu/packages/patches/scribus-1.5.5-poppler-0.86-build-fix.patch deleted file mode 100644 index 39008cba5c..0000000000 --- a/gnu/packages/patches/scribus-1.5.5-poppler-0.86-build-fix.patch +++ /dev/null @@ -1,642 +0,0 @@ -Fix build with Poppler 0.86. - -The original series of patches authored by Craig Bradney <mrb@scribus.info> -and Jean Ghali <jghali@libertysurf.fr>, taken from -https://gitweb.gentoo.org/repo/gentoo.git/tree/app-office/scribus/files - -diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/import/pdf/importpdf.cpp ---- a/scribus/plugins/import/pdf/importpdf.cpp -+++ b/scribus/plugins/import/pdf/importpdf.cpp -@@ -75,7 +75,11 @@ PdfPlug::PdfPlug(ScribusDoc* doc, int flags) - QImage PdfPlug::readThumbnail(const QString& fName)
- {
- QString pdfFile = QDir::toNativeSeparators(fName);
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 83, 0)
-+ globalParams.reset(new GlobalParams());
-+#else
- globalParams = new GlobalParams();
-+#endif
- if (globalParams)
- {
- #if defined(Q_OS_WIN32) && POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 62, 0)
-@@ -90,7 +94,9 @@ QImage PdfPlug::readThumbnail(const QString& fName) - if (pdfDoc->getErrorCode() == errEncrypted)
- {
- delete pdfDoc;
-+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0)
- delete globalParams;
-+#endif
- return QImage();
- }
- if (pdfDoc->isOk())
-@@ -134,11 +140,15 @@ QImage PdfPlug::readThumbnail(const QString& fName) - image.setText("YSize", QString("%1").arg(h));
- delete dev;
- delete pdfDoc;
-+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0)
- delete globalParams;
-+#endif
- return image;
- }
- delete pdfDoc;
-+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0)
- delete globalParams;
-+#endif
- }
- }
- return QImage();
-@@ -387,7 +397,11 @@ bool PdfPlug::convert(const QString& fn) - qApp->processEvents();
- }
-
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 83, 0)
-+ globalParams.reset(new GlobalParams());
-+#else
- globalParams = new GlobalParams();
-+#endif
- GooString *userPW = nullptr;
- if (globalParams)
- {
-@@ -429,7 +443,9 @@ bool PdfPlug::convert(const QString& fn) - if (progressDialog)
- progressDialog->close();
- delete pdfDoc;
-+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0)
- delete globalParams;
-+#endif
- return false;
- }
- if (progressDialog)
-@@ -474,7 +490,9 @@ bool PdfPlug::convert(const QString& fn) - progressDialog->close();
- delete optImp;
- delete pdfDoc;
-+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0)
- delete globalParams;
-+#endif
- return false;
- }
- pageString = optImp->getPagesString();
-@@ -838,11 +856,20 @@ bool PdfPlug::convert(const QString& fn) - names = catDict.dictLookup("OpenAction");
- if (names.isDict())
- {
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ std::unique_ptr<LinkAction> linkAction;
-+ linkAction = LinkAction::parseAction(&names, pdfDoc->getCatalog()->getBaseURI());
-+#else
- LinkAction *linkAction = nullptr;
- linkAction = LinkAction::parseAction(&names, pdfDoc->getCatalog()->getBaseURI());
-+#endif
- if (linkAction)
- {
-- LinkJavaScript *jsa = (LinkJavaScript*)linkAction;
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ LinkJavaScript *jsa = (LinkJavaScript*) linkAction.get();
-+#else
-+ LinkJavaScript *jsa = (LinkJavaScript*) linkAction;
-+#endif
- if (jsa->isOk())
- {
- QString script = UnicodeParsedString(jsa->getScript());
-@@ -908,8 +935,12 @@ bool PdfPlug::convert(const QString& fn) - }
- delete pdfDoc;
- }
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 83, 0)
-+ globalParams.release();
-+#else
- delete globalParams;
- globalParams = nullptr;
-+#endif
-
- // qDebug() << "converting finished";
- // qDebug() << "Imported" << Elements.count() << "Elements";
-@@ -1046,3 +1077,43 @@ QString PdfPlug::UnicodeParsedString(POPPLER_CONST GooString *s1) - }
- return result;
- }
-+
-+QString PdfPlug::UnicodeParsedString(const std::string& s1)
-+{
-+ if (s1.length() == 0)
-+ return QString();
-+ GBool isUnicode;
-+ int i;
-+ Unicode u;
-+ QString result;
-+ if ((s1.at(0) & 0xff) == 0xfe && (s1.length() > 1 && (s1.at(1) & 0xff) == 0xff))
-+ {
-+ isUnicode = gTrue;
-+ i = 2;
-+ result.reserve((s1.length() - 2) / 2);
-+ }
-+ else
-+ {
-+ isUnicode = gFalse;
-+ i = 0;
-+ result.reserve(s1.length());
-+ }
-+ while (i < s1.length())
-+ {
-+ if (isUnicode)
-+ {
-+ u = ((s1.at(i) & 0xff) << 8) | (s1.at(i+1) & 0xff);
-+ i += 2;
-+ }
-+ else
-+ {
-+ u = s1.at(i) & 0xff;
-+ ++i;
-+ }
-+ // #15616: imagemagick may write unicode strings incorrectly in PDF
-+ if (u == 0)
-+ continue;
-+ result += QChar( u );
-+ }
-+ return result;
-+}
-diff --git a/scribus/plugins/import/pdf/importpdf.h b/scribus/plugins/import/pdf/importpdf.h ---- a/scribus/plugins/import/pdf/importpdf.h -+++ b/scribus/plugins/import/pdf/importpdf.h -@@ -82,6 +82,7 @@ private: - bool convert(const QString& fn); - QRectF getCBox(int box, int pgNum); - QString UnicodeParsedString(POPPLER_CONST GooString *s1); -+ QString UnicodeParsedString(const std::string& s1); - - QList<PageItem*> Elements; - double baseX, baseY; -diff --git a/scribus/plugins/import/pdf/importpdfconfig.h b/scribus/plugins/import/pdf/importpdfconfig.h ---- a/scribus/plugins/import/pdf/importpdfconfig.h -+++ b/scribus/plugins/import/pdf/importpdfconfig.h -@@ -52,4 +52,16 @@ for which a new license (GPL+exception) is in place. - #define POPPLER_REF
- #endif
-
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 82, 0)
-+#define POPPLER_CONST_082 const
-+#else
-+#define POPPLER_CONST_082
-+#endif
-+
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 83, 0)
-+#define POPPLER_CONST_083 const
-+#else
-+#define POPPLER_CONST_083
-+#endif
-+
- #endif
-diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp ---- a/scribus/plugins/import/pdf/slaoutput.cpp -+++ b/scribus/plugins/import/pdf/slaoutput.cpp -@@ -308,9 +308,15 @@ LinkAction* SlaOutputDev::SC_getAction(AnnotWidget *ano) - }
-
- /* Replacement for the crippled Poppler function LinkAction* AnnotWidget::getAdditionalAction(AdditionalActionsType type) */
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+std::unique_ptr<LinkAction> SlaOutputDev::SC_getAdditionalAction(const char *key, AnnotWidget *ano)
-+{
-+ std::unique_ptr<LinkAction> linkAction;
-+#else
- LinkAction* SlaOutputDev::SC_getAdditionalAction(const char *key, AnnotWidget *ano)
- {
- LinkAction *linkAction = nullptr;
-+#endif
- Object obj;
- Ref refa = ano->getRef();
-
-@@ -455,7 +461,11 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, double xCoor, double yCoor, do - POPPLER_CONST GooString *ndst = gto->getNamedDest();
- if (ndst)
- {
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ std::unique_ptr<LinkDest> dstn = pdfDoc->findDest(ndst);
-+#else
- LinkDest *dstn = pdfDoc->findDest(ndst);
-+#endif
- if (dstn)
- {
- if (dstn->getKind() == destXYZ)
-@@ -499,7 +509,11 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, double xCoor, double yCoor, do - POPPLER_CONST GooString *ndst = gto->getNamedDest();
- if (ndst)
- {
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ std::unique_ptr<LinkDest> dstn = pdfDoc->findDest(ndst);
-+#else
- LinkDest *dstn = pdfDoc->findDest(ndst);
-+#endif
- if (dstn)
- {
- if (dstn->getKind() == destXYZ)
-@@ -967,7 +981,11 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano) - POPPLER_CONST GooString *ndst = gto->getNamedDest();
- if (ndst)
- {
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ std::unique_ptr<LinkDest> dstn = pdfDoc->findDest(ndst);
-+#else
- LinkDest *dstn = pdfDoc->findDest(ndst);
-+#endif
- if (dstn)
- {
- if (dstn->getKind() == destXYZ)
-@@ -1019,7 +1037,11 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano) - POPPLER_CONST GooString *ndst = gto->getNamedDest();
- if (ndst)
- {
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ std::unique_ptr<LinkDest> dstn = pdfDoc->findDest(ndst);
-+#else
- LinkDest *dstn = pdfDoc->findDest(ndst);
-+#endif
- if (dstn)
- {
- if (dstn->getKind() == destXYZ)
-@@ -1088,96 +1110,148 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano) - else
- qDebug() << "Found unsupported Action of type" << Lact->getKind();
- }
-- LinkAction *Aact = SC_getAdditionalAction("D", ano);
-+ auto Aact = SC_getAdditionalAction("D", ano);
- if (Aact)
- {
- if (Aact->getKind() == actionJavaScript)
- {
-- LinkJavaScript *jsa = (LinkJavaScript*)Aact;
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
-+#else
-+ LinkJavaScript *jsa = (LinkJavaScript*) Aact;
-+#endif
- if (jsa->isOk())
- {
- ite->annotation().setD_act(UnicodeParsedString(jsa->getScript()));
- ite->annotation().setAAact(true);
- }
- }
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ Aact.reset();
-+#else
- Aact = nullptr;
-+#endif
- }
- Aact = SC_getAdditionalAction("E", ano);
- if (Aact)
- {
- if (Aact->getKind() == actionJavaScript)
- {
-- LinkJavaScript *jsa = (LinkJavaScript*)Aact;
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
-+#else
-+ LinkJavaScript *jsa = (LinkJavaScript*) Aact;
-+#endif
- if (jsa->isOk())
- {
- ite->annotation().setE_act(UnicodeParsedString(jsa->getScript()));
- ite->annotation().setAAact(true);
- }
- }
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ Aact.reset();
-+#else
- Aact = nullptr;
-+#endif
- }
- Aact = SC_getAdditionalAction("X", ano);
- if (Aact)
- {
- if (Aact->getKind() == actionJavaScript)
- {
-- LinkJavaScript *jsa = (LinkJavaScript*)Aact;
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
-+#else
-+ LinkJavaScript *jsa = (LinkJavaScript*) Aact;
-+#endif
- if (jsa->isOk())
- {
- ite->annotation().setX_act(UnicodeParsedString(jsa->getScript()));
- ite->annotation().setAAact(true);
- }
- }
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ Aact.reset();
-+#else
- Aact = nullptr;
-+#endif
- }
- Aact = SC_getAdditionalAction("Fo", ano);
- if (Aact)
- {
- if (Aact->getKind() == actionJavaScript)
- {
-- LinkJavaScript *jsa = (LinkJavaScript*)Aact;
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
-+#else
-+ LinkJavaScript *jsa = (LinkJavaScript*) Aact;
-+#endif
- if (jsa->isOk())
- {
- ite->annotation().setFo_act(UnicodeParsedString(jsa->getScript()));
- ite->annotation().setAAact(true);
- }
- }
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ Aact.reset();
-+#else
- Aact = nullptr;
-+#endif
- }
- Aact = SC_getAdditionalAction("Bl", ano);
- if (Aact)
- {
- if (Aact->getKind() == actionJavaScript)
- {
-- LinkJavaScript *jsa = (LinkJavaScript*)Aact;
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
-+#else
-+ LinkJavaScript *jsa = (LinkJavaScript*) Aact;
-+#endif
- if (jsa->isOk())
- {
- ite->annotation().setBl_act(UnicodeParsedString(jsa->getScript()));
- ite->annotation().setAAact(true);
- }
- }
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ Aact.reset();
-+#else
- Aact = nullptr;
-+#endif
- }
- Aact = SC_getAdditionalAction("C", ano);
- if (Aact)
- {
- if (Aact->getKind() == actionJavaScript)
- {
-- LinkJavaScript *jsa = (LinkJavaScript*)Aact;
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
-+#else
-+ LinkJavaScript *jsa = (LinkJavaScript*) Aact;
-+#endif
- if (jsa->isOk())
- {
- ite->annotation().setC_act(UnicodeParsedString(jsa->getScript()));
- ite->annotation().setAAact(true);
- }
- }
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ Aact.reset();
-+#else
- Aact = nullptr;
-+#endif
- }
- Aact = SC_getAdditionalAction("F", ano);
- if (Aact)
- {
- if (Aact->getKind() == actionJavaScript)
- {
-- LinkJavaScript *jsa = (LinkJavaScript*)Aact;
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
-+#else
-+ LinkJavaScript *jsa = (LinkJavaScript*) Aact;
-+#endif
- if (jsa->isOk())
- {
- ite->annotation().setF_act(UnicodeParsedString(jsa->getScript()));
-@@ -1185,14 +1259,22 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano) - ite->annotation().setFormat(5);
- }
- }
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ Aact.reset();
-+#else
- Aact = nullptr;
-+#endif
- }
- Aact = SC_getAdditionalAction("K", ano);
- if (Aact)
- {
- if (Aact->getKind() == actionJavaScript)
- {
-- LinkJavaScript *jsa = (LinkJavaScript*)Aact;
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
-+#else
-+ LinkJavaScript *jsa = (LinkJavaScript*) Aact;
-+#endif
- if (jsa->isOk())
- {
- ite->annotation().setK_act(UnicodeParsedString(jsa->getScript()));
-@@ -1200,21 +1282,33 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano) - ite->annotation().setFormat(5);
- }
- }
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ Aact.reset();
-+#else
- Aact = nullptr;
-+#endif
- }
- Aact = SC_getAdditionalAction("V", ano);
- if (Aact)
- {
- if (Aact->getKind() == actionJavaScript)
- {
-- LinkJavaScript *jsa = (LinkJavaScript*)Aact;
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
-+#else
-+ LinkJavaScript *jsa = (LinkJavaScript*) Aact;
-+#endif
- if (jsa->isOk())
- {
- ite->annotation().setV_act(UnicodeParsedString(jsa->getScript()));
- ite->annotation().setAAact(true);
- }
- }
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ Aact.reset();
-+#else
- Aact = nullptr;
-+#endif
- }
- }
-
-@@ -1224,6 +1318,11 @@ void SlaOutputDev::startDoc(PDFDoc *doc, XRef *xrefA, Catalog *catA) - catalog = catA;
- pdfDoc = doc;
- updateGUICounter = 0;
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 84, 0)
-+ m_fontEngine = new SplashFontEngine(true, true, true, true);
-+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 61, 0)
-+ m_fontEngine = new SplashFontEngine(globalParams->getEnableFreeType(), true, true, true);
-+#else
- m_fontEngine = new SplashFontEngine(
- #if HAVE_T1LIB_H
- globalParams->getEnableT1lib(),
-@@ -1234,6 +1333,7 @@ void SlaOutputDev::startDoc(PDFDoc *doc, XRef *xrefA, Catalog *catA) - true,
- #endif
- true);
-+#endif
- }
-
- void SlaOutputDev::startPage(int pageNum, GfxState *, XRef *)
-@@ -2784,7 +2884,7 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str, i - delete[] mbuffer;
- }
-
--void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, GBool inlineImg)
-+void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, POPPLER_CONST_082 int* maskColors, GBool inlineImg)
- {
- ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits());
- // qDebug() << "Image Components" << colorMap->getNumPixelComps() << "Mask" << maskColors;
-@@ -3365,7 +3465,7 @@ err1: - fontsrc->unref();
- }
-
--void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, double dy, double originX, double originY, CharCode code, int nBytes, Unicode *u, int uLen)
-+void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, double dy, double originX, double originY, CharCode code, int nBytes, POPPLER_CONST_082 Unicode *u, int uLen)
- {
- double x1, y1, x2, y2;
- int render;
-@@ -3452,7 +3552,7 @@ void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, doub - }
- }
-
--GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, Unicode *u, int uLen)
-+GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, POPPLER_CONST_082 Unicode *u, int uLen)
- {
- // qDebug() << "beginType3Char";
- GfxFont *gfxFont;
-@@ -3705,7 +3805,7 @@ QString SlaOutputDev::getAnnotationColor(const AnnotColor *color) - return fNam;
- }
-
--QString SlaOutputDev::convertPath(GfxPath *path)
-+QString SlaOutputDev::convertPath(POPPLER_CONST_083 GfxPath *path)
- {
- if (! path)
- return QString();
-@@ -3715,7 +3815,7 @@ QString SlaOutputDev::convertPath(GfxPath *path) -
- for (int i = 0; i < path->getNumSubpaths(); ++i)
- {
-- GfxSubpath * subpath = path->getSubpath(i);
-+ POPPLER_CONST_083 GfxSubpath * subpath = path->getSubpath(i);
- if (subpath->getNumPoints() > 0)
- {
- output += QString("M %1 %2").arg(subpath->getX(0)).arg(subpath->getY(0));
-@@ -3922,6 +4022,46 @@ QString SlaOutputDev::UnicodeParsedString(POPPLER_CONST GooString *s1) - return result;
- }
-
-+QString SlaOutputDev::UnicodeParsedString(const std::string& s1)
-+{
-+ if (s1.length() == 0)
-+ return QString();
-+ GBool isUnicode;
-+ int i;
-+ Unicode u;
-+ QString result;
-+ if ((s1.at(0) & 0xff) == 0xfe && (s1.length() > 1 && (s1.at(1) & 0xff) == 0xff))
-+ {
-+ isUnicode = gTrue;
-+ i = 2;
-+ result.reserve((s1.length() - 2) / 2);
-+ }
-+ else
-+ {
-+ isUnicode = gFalse;
-+ i = 0;
-+ result.reserve(s1.length());
-+ }
-+ while (i < s1.length())
-+ {
-+ if (isUnicode)
-+ {
-+ u = ((s1.at(i) & 0xff) << 8) | (s1.at(i+1) & 0xff);
-+ i += 2;
-+ }
-+ else
-+ {
-+ u = s1.at(i) & 0xff;
-+ ++i;
-+ }
-+ // #15616: imagemagick may write unicode strings incorrectly in PDF
-+ if (u == 0)
-+ continue;
-+ result += QChar( u );
-+ }
-+ return result;
-+}
-+
- bool SlaOutputDev::checkClip()
- {
- bool ret = false;
-diff --git a/scribus/plugins/import/pdf/slaoutput.h b/scribus/plugins/import/pdf/slaoutput.h ---- a/scribus/plugins/import/pdf/slaoutput.h -+++ b/scribus/plugins/import/pdf/slaoutput.h -@@ -20,6 +20,8 @@ for which a new license (GPL+exception) is in place. - #include <QTextStream>
- #include <QTransform>
-
-+#include <memory>
-+
- #include "fpointarray.h"
- #include "importpdfconfig.h"
- #include "pageitem.h"
-@@ -159,7 +161,11 @@ public: - virtual ~SlaOutputDev();
-
- LinkAction* SC_getAction(AnnotWidget *ano);
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-+ std::unique_ptr<LinkAction> SC_getAdditionalAction(const char *key, AnnotWidget *ano);
-+#else
- LinkAction* SC_getAdditionalAction(const char *key, AnnotWidget *ano);
-+#endif
- static GBool annotations_callback(Annot *annota, void *user_data);
- bool handleTextAnnot(Annot* annota, double xCoor, double yCoor, double width, double height);
- bool handleLinkAnnot(Annot* annota, double xCoor, double yCoor, double width, double height);
-@@ -229,7 +235,7 @@ public: -
- //----- image drawing
- void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, GBool invert, GBool interpolate, GBool inlineImg) override;
-- void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, GBool inlineImg) override;
-+ void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, POPPLER_CONST_082 int *maskColors, GBool inlineImg) override;
- void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
- int width, int height,
- GfxImageColorMap *colorMap,
-@@ -261,8 +267,8 @@ public: - //----- text drawing
- void beginTextObject(GfxState *state) override;
- void endTextObject(GfxState *state) override;
-- void drawChar(GfxState *state, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, double /*originX*/, double /*originY*/, CharCode /*code*/, int /*nBytes*/, Unicode * /*u*/, int /*uLen*/) override;
-- GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, CharCode /*code*/, Unicode * /*u*/, int /*uLen*/) override;
-+ void drawChar(GfxState *state, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, double /*originX*/, double /*originY*/, CharCode /*code*/, int /*nBytes*/, POPPLER_CONST_082 Unicode * /*u*/, int /*uLen*/) override;
-+ GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, CharCode /*code*/, POPPLER_CONST_082 Unicode * /*u*/, int /*uLen*/) override;
- void endType3Char(GfxState * /*state*/) override;
- void type3D0(GfxState * /*state*/, double /*wx*/, double /*wy*/) override;
- void type3D1(GfxState * /*state*/, double /*wx*/, double /*wy*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) override;
-@@ -282,11 +288,12 @@ private: - void getPenState(GfxState *state);
- QString getColor(GfxColorSpace *color_space, POPPLER_CONST_070 GfxColor *color, int *shade);
- QString getAnnotationColor(const AnnotColor *color);
-- QString convertPath(GfxPath *path);
-+ QString convertPath(POPPLER_CONST_083 GfxPath *path);
- int getBlendMode(GfxState *state);
- void applyMask(PageItem *ite);
- void pushGroup(const QString& maskName = "", GBool forSoftMask = gFalse, GBool alpha = gFalse, bool inverted = false);
- QString UnicodeParsedString(POPPLER_CONST GooString *s1);
-+ QString UnicodeParsedString(const std::string& s1);
- bool checkClip();
- bool pathIsClosed;
- QString CurrColorFill;
diff --git a/gnu/packages/patches/sdcc-disable-non-free-code.patch b/gnu/packages/patches/sdcc-disable-non-free-code.patch new file mode 100644 index 0000000000..545f0cbd69 --- /dev/null +++ b/gnu/packages/patches/sdcc-disable-non-free-code.patch @@ -0,0 +1,3643 @@ +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 4c75cfa..9fa306d 100644 +--- a/Makefile.common.in ++++ b/Makefile.common.in +@@ -65,7 +65,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 aac442e..dd73e40 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -82,9 +82,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) +@@ -105,9 +102,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_LIBRARIAN) $(SDCC_SCRIPTS) + + PORTS = $(shell cat ports.build) +@@ -156,21 +150,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 42b1c7d..00ecb51 100755 +--- a/configure ++++ b/configure +@@ -632,7 +632,6 @@ LATEX + LATEX2HTML + LYX + OPT_ENABLE_DOC +-OPT_DISABLE_NON_FREE + OPT_DISABLE_SDBINUTILS + OPT_DISABLE_SDCDB + OPT_DISABLE_SDCPP +@@ -654,10 +653,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 +@@ -771,7 +767,6 @@ enable_packihx + enable_sdcpp + enable_sdcdb + enable_sdbinutils +-enable_non_free + enable_doc + enable_libgc + ' +@@ -792,10 +787,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 +@@ -803,9 +795,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= +@@ -1452,7 +1442,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. +@@ -1481,16 +1470,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 +@@ -7236,19 +7217,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" + +@@ -7256,13 +7224,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" + +@@ -7429,24 +7390,6 @@ cat >>confdefs.h <<_ACEOF + #define INCLUDE_DIR_SUFFIX DIR_SEPARATOR_STRING "${norm_inc_dir_suffix}" + _ACEOF + +-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 +- +-cat >>confdefs.h <<_ACEOF +-#define NON_FREE_INCLUDE_DIR_SUFFIX DIR_SEPARATOR_STRING "${norm_non_free_inc_dir_suffix}" +-_ACEOF +- + + norm_lib_dir_suffix=${lib_dir_suffix} + case ":$norm_lib_dir_suffix:" in +@@ -7466,24 +7409,6 @@ cat >>confdefs.h <<_ACEOF + #define LIB_DIR_SUFFIX DIR_SEPARATOR_STRING "${norm_lib_dir_suffix}" + _ACEOF + +-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 +- +-cat >>confdefs.h <<_ACEOF +-#define NON_FREE_LIB_DIR_SUFFIX DIR_SEPARATOR_STRING "${norm_non_free_lib_dir_suffix}" +-_ACEOF +- + + # relative paths + for _lcl_i in expanded_bindir:expanded_datadir:bin2data_dir; do +@@ -8411,28 +8336,6 @@ _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 +-#define OPT_DISABLE_NON_FREE $OPT_DISABLE_NON_FREE +-_ACEOF +- +- +- +- + + # Check whether --enable-doc was given. + if test "${enable_doc+set}" = set; then : +@@ -8827,20 +8730,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_R3KA = 0 || test $OPT_DISABLE_GBZ80 = 0 || test $OPT_DISABLE_TLCS90 = 0; then +@@ -8885,15 +8780,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/librarian/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 +@@ -9621,7 +9510,6 @@ do + "sdas/asstm8/Makefile") CONFIG_FILES="$CONFIG_FILES sdas/asstm8/Makefile" ;; + "device/lib/stm8/Makefile") CONFIG_FILES="$CONFIG_FILES device/lib/stm8/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" ;; +@@ -9634,7 +9522,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 +@@ -10443,54 +10330,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 +@@ -10540,54 +10379,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'` +- +- + { $as_echo "$as_me:${as_lineno-$LINENO}: result: + sdcc ${VERSION} is now configured for + +@@ -10618,7 +10409,6 @@ sdcc ${VERSION} is now configured for + tlcs90 ${enable_tlcs90_port} + stm8 ${enable_stm8_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} +@@ -10633,9 +10423,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} +@@ -10647,15 +10434,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 + $as_echo " + sdcc ${VERSION} is now configured for +@@ -10687,7 +10468,6 @@ sdcc ${VERSION} is now configured for + tlcs90 ${enable_tlcs90_port} + stm8 ${enable_stm8_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} +@@ -10702,9 +10482,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} +@@ -10716,14 +10493,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> + " >&6; } + # End of configure/configure.in +diff --git a/configure.ac b/configure.ac +index 3a16e42..bfba129 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -588,19 +588,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]) +@@ -608,13 +595,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]) +@@ -655,19 +635,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]) +@@ -836,7 +808,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], [:]) +@@ -907,16 +878,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_R3KA = 0 || test $OPT_DISABLE_GBZ80 = 0 || test $OPT_DISABLE_TLCS90 = 0; then + AC_CONFIG_FILES([src/z80/Makefile]) +@@ -951,7 +916,6 @@ if test $OPT_DISABLE_STM8 = 0; then + 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 +@@ -966,9 +930,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 +@@ -986,16 +947,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 +@@ -1027,7 +982,6 @@ sdcc ${VERSION} is now configured for + tlcs90 ${enable_tlcs90_port} + stm8 ${enable_stm8_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} +@@ -1042,9 +996,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} +@@ -1056,14 +1007,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 e456838..8179255 100644 +--- a/device/lib/pic14/Makefile.common ++++ b/device/lib/pic14/Makefile.common +@@ -3,11 +3,10 @@ EARCH ?= @EARCH@ + + AM_CPPFLAGS = + AM_CPPFLAGS += -I. +-AM_CPPFLAGS += -I$(top_srcdir)/../../include/pic14 -I$(top_srcdir)/../../non-free/include/pic14 ++AM_CPPFLAGS += -I$(top_srcdir)/../../include/pic14 + + AM_CFLAGS = + AM_CFLAGS += -mpic14 -p$(ARCH) +-AM_CFLAGS += --no-warn-non-free + AM_CFLAGS += --std-c99 + #AM_CFLAGS += --asm="$(CCAS)" + ##AM_CFLAGS += -Wa,-q +@@ -29,7 +28,7 @@ AM_CFLAGS += --i-code-in-asm + + AM_CCASFLAGS = + AM_CCASFLAGS += -p$(ARCH) +-AM_CCASFLAGS += -I$(top_srcdir)/../../include/pic14 -I$(top_srcdir)/../../non-free/include/pic14 ++AM_CCASFLAGS += -I$(top_srcdir)/../../include/pic14 + AM_CCASFLAGS += -I$(srcdir) + + clean-local: +diff --git a/device/lib/pic14/Makefile.in b/device/lib/pic14/Makefile.in +index f1c9940..de47dbe 100644 +--- a/device/lib/pic14/Makefile.in ++++ b/device/lib/pic14/Makefile.in +@@ -297,15 +297,13 @@ top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + SUBDIRS = libm libsdcc/regular $(am__append_1) $(am__append_2) +-AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic14 \ +- -I$(top_srcdir)/../../non-free/include/pic14 ++AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic14 + #AM_CFLAGS += --asm="$(CCAS)" + + #AM_CFLAGS += --debug-ralloc + #AM_CFLAGS += --debug-xtra + #AM_CFLAGS += --pcode-verbose +-AM_CFLAGS = -mpic14 -p$(ARCH) --no-warn-non-free --std-c99 \ +- --i-code-in-asm ++AM_CFLAGS = -mpic14 -p$(ARCH) --std-c99 --i-code-in-asm + + #AM_CFLAGS += --no-pcode-opt + +@@ -316,8 +314,7 @@ AM_CFLAGS = -mpic14 -p$(ARCH) --no-warn-non-free --std-c99 \ + #AM_CFLAGS += --noinduction + #AM_CFLAGS += --nojtbound + #AM_CFLAGS += --noloopreverse +-AM_CCASFLAGS = -p$(ARCH) -I$(top_srcdir)/../../include/pic14 \ +- -I$(top_srcdir)/../../non-free/include/pic14 -I$(srcdir) ++AM_CCASFLAGS = -p$(ARCH) -I$(top_srcdir)/../../include/pic14 -I$(srcdir) + DISTCLEANFILES = a.cod a.hex ./.checkdevices/* + all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive +diff --git a/device/lib/pic14/libm/Makefile.in b/device/lib/pic14/libm/Makefile.in +index fd9fd2e..4a7d250 100644 +--- a/device/lib/pic14/libm/Makefile.in ++++ b/device/lib/pic14/libm/Makefile.in +@@ -299,15 +299,13 @@ libm_a_SOURCES = acosf.c asincosf.c asinf.c atan2f.c atanf.c ceilf.c \ + libm_a_CFLAGS = -p$(ARCH) $(AM_CFLAGS) + libme_a_SOURCES = $(libm_a_SOURCES) + libme_a_CFLAGS = -p$(EARCH) $(AM_CFLAGS) $(am__append_2) +-AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic14 \ +- -I$(top_srcdir)/../../non-free/include/pic14 ++AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic14 + #AM_CFLAGS += --asm="$(CCAS)" + + #AM_CFLAGS += --debug-ralloc + #AM_CFLAGS += --debug-xtra + #AM_CFLAGS += --pcode-verbose +-AM_CFLAGS = -mpic14 -p$(ARCH) --no-warn-non-free --std-c99 \ +- --i-code-in-asm ++AM_CFLAGS = -mpic14 -p$(ARCH) --std-c99 --i-code-in-asm + + #AM_CFLAGS += --no-pcode-opt + +@@ -318,8 +316,7 @@ AM_CFLAGS = -mpic14 -p$(ARCH) --no-warn-non-free --std-c99 \ + #AM_CFLAGS += --noinduction + #AM_CFLAGS += --nojtbound + #AM_CFLAGS += --noloopreverse +-AM_CCASFLAGS = -p$(ARCH) -I$(top_srcdir)/../../include/pic14 \ +- -I$(top_srcdir)/../../non-free/include/pic14 -I$(srcdir) ++AM_CCASFLAGS = -p$(ARCH) -I$(top_srcdir)/../../include/pic14 -I$(srcdir) + all: all-am + + .SUFFIXES: +diff --git a/device/lib/pic14/libsdcc/enhanced-no-xinst/Makefile.in b/device/lib/pic14/libsdcc/enhanced-no-xinst/Makefile.in +index e946da7..bced941 100644 +--- a/device/lib/pic14/libsdcc/enhanced-no-xinst/Makefile.in ++++ b/device/lib/pic14/libsdcc/enhanced-no-xinst/Makefile.in +@@ -311,15 +311,13 @@ libsdcce_a_SOURCES = ../_divschar.c ../_divsint.c ../_divslong.c \ + _gptrput3.S _gptrput4.S macros.inc + libsdcce_a_CFLAGS = -p$(EARCH) $(AM_CFLAGS) + CLEANFILES = ../*.asm ../*.lst +-AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic14 \ +- -I$(top_srcdir)/../../non-free/include/pic14 ++AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic14 + #AM_CFLAGS += --asm="$(CCAS)" + + #AM_CFLAGS += --debug-ralloc + #AM_CFLAGS += --debug-xtra + #AM_CFLAGS += --pcode-verbose +-AM_CFLAGS = -mpic14 -p$(ARCH) --no-warn-non-free --std-c99 \ +- --i-code-in-asm ++AM_CFLAGS = -mpic14 -p$(ARCH) --std-c99 --i-code-in-asm + + #AM_CFLAGS += --no-pcode-opt + +@@ -330,8 +328,7 @@ AM_CFLAGS = -mpic14 -p$(ARCH) --no-warn-non-free --std-c99 \ + #AM_CFLAGS += --noinduction + #AM_CFLAGS += --nojtbound + #AM_CFLAGS += --noloopreverse +-AM_CCASFLAGS = -p$(ARCH) -I$(top_srcdir)/../../include/pic14 \ +- -I$(top_srcdir)/../../non-free/include/pic14 -I$(srcdir) ++AM_CCASFLAGS = -p$(ARCH) -I$(top_srcdir)/../../include/pic14 -I$(srcdir) + all: all-am + + .SUFFIXES: +diff --git a/device/lib/pic14/libsdcc/enhanced/Makefile.in b/device/lib/pic14/libsdcc/enhanced/Makefile.in +index 7fe1e25..854f87f 100644 +--- a/device/lib/pic14/libsdcc/enhanced/Makefile.in ++++ b/device/lib/pic14/libsdcc/enhanced/Makefile.in +@@ -311,15 +311,13 @@ libsdcce_a_SOURCES = ../_divschar.c ../_divsint.c ../_divslong.c \ + _gptrput3.S _gptrput4.S macros.inc + libsdcce_a_CFLAGS = -p$(EARCH) $(AM_CFLAGS) + CLEANFILES = ../*.asm ../*.lst +-AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic14 \ +- -I$(top_srcdir)/../../non-free/include/pic14 ++AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic14 + #AM_CFLAGS += --asm="$(CCAS)" + + #AM_CFLAGS += --debug-ralloc + #AM_CFLAGS += --debug-xtra + #AM_CFLAGS += --pcode-verbose +-AM_CFLAGS = -mpic14 -p$(ARCH) --no-warn-non-free --std-c99 \ +- --i-code-in-asm ++AM_CFLAGS = -mpic14 -p$(ARCH) --std-c99 --i-code-in-asm + + #AM_CFLAGS += --no-pcode-opt + +@@ -330,8 +328,7 @@ AM_CFLAGS = -mpic14 -p$(ARCH) --no-warn-non-free --std-c99 \ + #AM_CFLAGS += --noinduction + #AM_CFLAGS += --nojtbound + #AM_CFLAGS += --noloopreverse +-AM_CCASFLAGS = -p$(ARCH) -I$(top_srcdir)/../../include/pic14 \ +- -I$(top_srcdir)/../../non-free/include/pic14 -I$(srcdir) ++AM_CCASFLAGS = -p$(ARCH) -I$(top_srcdir)/../../include/pic14 -I$(srcdir) + all: all-am + + .SUFFIXES: +diff --git a/device/lib/pic14/libsdcc/regular/Makefile.in b/device/lib/pic14/libsdcc/regular/Makefile.in +index 29a5924..8c60a49 100644 +--- a/device/lib/pic14/libsdcc/regular/Makefile.in ++++ b/device/lib/pic14/libsdcc/regular/Makefile.in +@@ -304,15 +304,13 @@ libsdcc_a_SOURCES = ../_divschar.c ../_divsint.c ../_divslong.c \ + _gptrput3.S _gptrput4.S macros.inc shadowregs.c + libsdcc_a_CFLAGS = -p$(ARCH) $(AM_CFLAGS) + CLEANFILES = ../*.asm ../*.lst +-AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic14 \ +- -I$(top_srcdir)/../../non-free/include/pic14 ++AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic14 + #AM_CFLAGS += --asm="$(CCAS)" + + #AM_CFLAGS += --debug-ralloc + #AM_CFLAGS += --debug-xtra + #AM_CFLAGS += --pcode-verbose +-AM_CFLAGS = -mpic14 -p$(ARCH) --no-warn-non-free --std-c99 \ +- --i-code-in-asm ++AM_CFLAGS = -mpic14 -p$(ARCH) --std-c99 --i-code-in-asm + + #AM_CFLAGS += --no-pcode-opt + +@@ -323,8 +321,7 @@ AM_CFLAGS = -mpic14 -p$(ARCH) --no-warn-non-free --std-c99 \ + #AM_CFLAGS += --noinduction + #AM_CFLAGS += --nojtbound + #AM_CFLAGS += --noloopreverse +-AM_CCASFLAGS = -p$(ARCH) -I$(top_srcdir)/../../include/pic14 \ +- -I$(top_srcdir)/../../non-free/include/pic14 -I$(srcdir) ++AM_CCASFLAGS = -p$(ARCH) -I$(top_srcdir)/../../include/pic14 -I$(srcdir) + all: all-am + + .SUFFIXES: +diff --git a/device/lib/pic16/Makefile.common b/device/lib/pic16/Makefile.common +index 73200d7..e298bf5 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-c99 + 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 b17f151..31ecfa4 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 \ +@@ -295,8 +292,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 +@@ -310,11 +306,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ + #AM_CFLAGS += --noinduction + #AM_CFLAGS += --nojtbound + #AM_CFLAGS += --noloopreverse +-AM_CFLAGS = --std-c99 --asm="$(CCAS)" --no-warn-non-free \ ++AM_CFLAGS = --std-c99 --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 d8760a0..eaea231 100755 +--- a/device/lib/pic16/configure ++++ b/device/lib/pic16/configure +@@ -3657,7 +3657,6 @@ fi + + + +-LIBDEV="${srcdir}/../../non-free/lib/pic16/libdev" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking devices supported by gputils" >&5 + $as_echo_n "checking devices supported by gputils... " >&6; } + GOOD_PICS=""; +diff --git a/device/lib/pic16/configure.ac b/device/lib/pic16/configure.ac +index 3966c11..cdbffc7 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 bc77b98..724a443 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) +@@ -290,8 +287,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 +@@ -305,11 +301,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ + #AM_CFLAGS += --noinduction + #AM_CFLAGS += --nojtbound + #AM_CFLAGS += --noloopreverse +-AM_CFLAGS = --std-c99 --asm="$(CCAS)" --no-warn-non-free \ ++AM_CFLAGS = --std-c99 --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 6d2699f..5546319 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) +@@ -344,8 +341,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 +@@ -359,11 +355,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ + #AM_CFLAGS += --noinduction + #AM_CFLAGS += --nojtbound + #AM_CFLAGS += --noloopreverse +-AM_CFLAGS = --std-c99 --asm="$(CCAS)" --no-warn-non-free \ ++AM_CFLAGS = --std-c99 --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 0d7c731..64b56c8 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) +@@ -9826,8 +9823,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 +@@ -9841,11 +9837,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ + #AM_CFLAGS += --noinduction + #AM_CFLAGS += --nojtbound + #AM_CFLAGS += --noloopreverse +-AM_CFLAGS = --std-c99 --asm="$(CCAS)" --no-warn-non-free \ ++AM_CFLAGS = --std-c99 --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 7f90e89..94cd985 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) +@@ -299,8 +296,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 +@@ -314,11 +310,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ + #AM_CFLAGS += --noinduction + #AM_CFLAGS += --nojtbound + #AM_CFLAGS += --noloopreverse +-AM_CFLAGS = --std-c99 --asm="$(CCAS)" --no-warn-non-free \ ++AM_CFLAGS = --std-c99 --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 e58bad0..b318b70 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) +@@ -364,8 +361,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 +@@ -379,11 +375,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ + #AM_CFLAGS += --noinduction + #AM_CFLAGS += --nojtbound + #AM_CFLAGS += --noloopreverse +-AM_CFLAGS = --std-c99 --asm="$(CCAS)" --no-warn-non-free \ ++AM_CFLAGS = --std-c99 --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 3c44c6f..274acde 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) +@@ -306,8 +303,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 +@@ -321,11 +317,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ + #AM_CFLAGS += --noinduction + #AM_CFLAGS += --nojtbound + #AM_CFLAGS += --noloopreverse +-AM_CFLAGS = --std-c99 --asm="$(CCAS)" --no-warn-non-free \ ++AM_CFLAGS = --std-c99 --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 7d83ef7..5bd71d3 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 86ed809..69e16e2 100644 +--- a/doc/README.txt ++++ b/doc/README.txt +@@ -35,10 +35,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. + + See: + +diff --git a/doc/sdccman.lyx b/doc/sdccman.lyx +index 41e8db0..9a971fa 100644 +--- a/doc/sdccman.lyx ++++ b/doc/sdccman.lyx +@@ -1083,54 +1083,9 @@ Exception are pic device libraries and header files which are derived from + 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 +-\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 +@@ -2890,18 +2845,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 + +@@ -2914,22 +2857,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 + +@@ -3410,7 +3337,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"> +@@ -3694,68 +3621,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> +@@ -3766,7 +3631,7 @@ lib + \begin_layout Plain Layout + + \emph on +-NON_FREE_LIB_DIR_SUFFIX ++LIB_DIR_SUFFIX + \end_layout + + \end_inset +@@ -3775,7 +3640,7 @@ NON_FREE_LIB_DIR_SUFFIX + \begin_inset Text + + \begin_layout Plain Layout +-sdcc/non-free/lib ++sdcc/lib + \end_layout + + \end_inset +@@ -3784,7 +3649,7 @@ sdcc/non-free/lib + \begin_inset Text + + \begin_layout Plain Layout +-non-free/lib ++lib + \end_layout + + \end_inset +@@ -4183,20 +4048,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 +@@ -4211,20 +4062,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 +@@ -4405,20 +4242,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 +@@ -4433,20 +4256,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 +@@ -4543,7 +4352,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"> +@@ -4699,64 +4508,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 +@@ -4806,64 +4557,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> +@@ -5186,7 +4879,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"> +@@ -5464,203 +5157,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"> +@@ -5676,21 +5179,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 +@@ -5698,7 +5193,7 @@ $INCLUDE_DIR_SUFFIX + \begin_inset Newline newline + \end_inset + +-sdcc/non-free/include ++sdcc/include + \end_layout + + \end_inset +@@ -5796,7 +5291,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"> +@@ -6076,7 +5571,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 +@@ -6085,7 +5580,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 +@@ -6116,7 +5611,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 +@@ -6131,7 +5626,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 +@@ -6154,308 +5649,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> +@@ -8723,14 +7916,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 +@@ -8739,14 +7924,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 +@@ -15589,66 +14766,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 +@@ -44653,66 +43770,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 + +@@ -44766,7 +43826,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 + +@@ -44860,7 +43920,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 + +@@ -45142,47 +44202,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 +@@ -46055,47 +45074,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 +@@ -47372,188 +46350,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 +@@ -48249,66 +47045,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 +@@ -48554,195 +47293,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 +@@ -73525,6 +72075,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 9f1eeff..3686228 100644 +--- a/sdcc.spec ++++ b/sdcc.spec +@@ -83,15 +83,15 @@ 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) + %doc %{_defaultdocdir} + + %changelog ++* Sat Oct 31 2020 - simon AT simonsouth.net ++- removed non-free include and lib directories + * Wed Feb 07 2018 - pkk AT spth.de + - version updated to 3.7.0 + * Sun May 29 2016 - sourceforge.brock AT dse.nl +diff --git a/sdcc_vc.h.in b/sdcc_vc.h.in +index 06d8cca..736c325 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 29619bd..dadf310 100644 +--- a/sdccconf_in.h ++++ b/sdccconf_in.h +@@ -106,12 +106,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_MCS51 + +-/* XXX */ +-#undef OPT_DISABLE_NON_FREE +- + /* XXX */ + #undef OPT_DISABLE_PACKIHX + +diff --git a/src/SDCCglobl.h b/src/SDCCglobl.h +index 2ce040b..d72d3b8 100644 +--- a/src/SDCCglobl.h ++++ b/src/SDCCglobl.h +@@ -315,7 +315,6 @@ struct options + int no_pack_iram; /* MCS51/DS390 - Deprecated: Tells the linker not to pack variables in internal ram */ + 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 a523164..a279d3d 100644 +--- a/src/SDCCmain.c ++++ b/src/SDCCmain.c +@@ -144,7 +144,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" +@@ -192,7 +191,6 @@ static const OPTION optionsTable[] = { + {0, OPTION_STD_SDCC11, NULL, "Use ISO C11 standard with SDCC extensions (default)"}, + {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."}, +@@ -2045,10 +2043,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) + { +@@ -2262,12 +2256,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) +@@ -2280,17 +2268,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; +@@ -2315,9 +2292,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) +@@ -2334,13 +2308,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 3d868cc..e8ecaaf 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 } + }; + +@@ -153,16 +152,6 @@ _pic14_finaliseOptions (void) + addSet (&preArgvSet, 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 6f194c1..7f7b2f0 100644 +--- a/src/pic16/main.c ++++ b/src/pic16/main.c +@@ -655,7 +655,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} + }; + +@@ -940,16 +939,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); + } + +@@ -979,7 +968,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 26a7ff3..4547295 100644 +--- a/src/regression/Makefile ++++ b/src/regression/Makefile +@@ -65,10 +65,10 @@ TARGETPIC = 18f452 + CFLAGS = -mpic16 -p$(TARGETPIC) + DIR = pic16 + endif +-CFLAGS += -Wl,-q --no-warn-non-free ++CFLAGS += -Wl,-q + CFLAGS += -Wl,--map +-CFLAGS += -I $(SDCC_SRC)/device/include/$(DIR) -I $(SDCC_SRC)/device/non-free/include/$(DIR) +-CFLAGS += -L $(SDCC_BIN)/device/lib/build/$(DIR) -L $(SDCC_BIN)/device/non-free/lib/build/$(DIR) ++CFLAGS += -I $(SDCC_SRC)/device/include/$(DIR) ++CFLAGS += -L $(SDCC_BIN)/device/lib/build/$(DIR) + #CFLAGS += --no-pcode-opt + #CFLAGS += -V + +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 5086181..9527244 100644 +--- a/support/scripts/sdcc.nsi ++++ b/support/scripts/sdcc.nsi +@@ -477,11 +477,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 +@@ -579,18 +574,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 library" SEC23 +@@ -691,10 +680,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" + +@@ -746,10 +731,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" +@@ -1003,13 +984,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" +@@ -1059,9 +1036,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" +@@ -1119,9 +1094,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" +@@ -1138,12 +1111,9 @@ ${Section} Uninstall SECUNINSTALL + RMDir "$INSTDIR\lib\src\s08" + RMDir "$INSTDIR\lib\src\stm8" + 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" +@@ -1160,16 +1130,13 @@ ${Section} Uninstall SECUNINSTALL + RMDir "$INSTDIR\lib\s08" + RMDir "$INSTDIR\lib\stm8" + RMDir "$INSTDIR\lib" +- RMDir "$INSTDIR\non-free\lib" + + RMDir "$INSTDIR\include\asm\z80" + RMDir "$INSTDIR\include\asm\z180" + 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\gbz80" + RMDir "$INSTDIR\include\asm\ds390" +@@ -1178,17 +1145,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/support/scripts/sdcc_cygwin_mingw32 b/support/scripts/sdcc_cygwin_mingw32 +index 5575663..2588d4f 100755 +--- a/support/scripts/sdcc_cygwin_mingw32 ++++ b/support/scripts/sdcc_cygwin_mingw32 +@@ -6,9 +6,7 @@ + --datarootdir="/sdcc" \ + docdir="\${datarootdir}/doc" \ + include_dir_suffix="include" \ +-non_free_include_dir_suffix="non-free/include" \ + lib_dir_suffix="lib" \ +-non_free_lib_dir_suffix="non-free/lib" \ + sdccconf_h_dir_separator="\\\\" \ + CC="gcc -mno-cygwin" \ + CXX="g++ -mno-cygwin" +diff --git a/support/scripts/sdcc_mingw32 b/support/scripts/sdcc_mingw32 +index 96e3280..050761e 100755 +--- a/support/scripts/sdcc_mingw32 ++++ b/support/scripts/sdcc_mingw32 +@@ -19,9 +19,7 @@ export SDCCCONFIGUREFLAGS=" \ + --datarootdir=/sdcc \ + docdir=\${datarootdir}/doc \ + include_dir_suffix=include \ +-non_free_include_dir_suffix=non-free/include \ + lib_dir_suffix=lib \ +-non_free_lib_dir_suffix=non-free/lib \ + sdccconf_h_dir_separator=\\\\ \ + --disable-device-lib \ + --host=i586-mingw32msvc --build=unknown-unknown-linux-gnu" diff --git a/gnu/packages/patches/tomb-fix-errors-on-open.patch b/gnu/packages/patches/tomb-fix-errors-on-open.patch deleted file mode 100644 index 5f41c9ee8f..0000000000 --- a/gnu/packages/patches/tomb-fix-errors-on-open.patch +++ /dev/null @@ -1,25 +0,0 @@ -Description: Avoid error messages when opening a new tomb - Make sure control file exists and has user ownership before user writes to it. -Author: Sven Geuer <debmaint@g-e-u-e-r.de> -Bug: https://github.com/dyne/Tomb/issues/369 -Last-Update: 2019-11-04 ---- a/tomb -+++ b/tomb -@@ -2197,14 +2197,15 @@ - # {{{ Open - - _update_control_file() { -- # replaces a control file with new contents and gives it user ownership -+ # make sure a control file exists, gives it user ownership -+ # and replaces it with new contents - # stdin = contents - # $1 = path to control file - # $2 = contents - [[ "$2" = "" ]] && return 1 - _sudo touch "$1" -- print "$2" > "$1" - _sudo chown ${_UID}:${_GID} "$1" -+ print "$2" > "$1" - _verbose "updated control file $1 = $2" - } - diff --git a/gnu/packages/patches/transmission-honor-localedir.patch b/gnu/packages/patches/transmission-honor-localedir.patch new file mode 100644 index 0000000000..70c66bfb2b --- /dev/null +++ b/gnu/packages/patches/transmission-honor-localedir.patch @@ -0,0 +1,34 @@ +This patch modifies Transmission so it honors the "localedir" option +passed to its configure script, allowing GTK-specific localization +data to be placed in the package's "gui" output. + +Without this patch, localization of transmission-gtk can break as the +application will expect to find this data in the package's default +output (as a result of the call to bindtextdomain in gtk/main.c). + +diff --git a/configure b/configure +index a29e24f..3ae8ef4 100755 +--- a/configure ++++ b/configure +@@ -21305,7 +21305,7 @@ $as_echo "$LINGUAS" >&6; } + sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ + < $srcdir/po/POTFILES.in > po/POTFILES + +- transmissionlocaledir='${prefix}/${DATADIRNAME}/locale' ++ transmissionlocaledir='${localedir}' + + fi + +diff --git a/configure.ac b/configure.ac +index 57d3cae..ab62093 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -563,7 +563,7 @@ if test "x$enable_nls" = "xyes" ; then + AC_SUBST(GETTEXT_PACKAGE) + AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package]) + AM_GLIB_GNU_GETTEXT +- transmissionlocaledir='${prefix}/${DATADIRNAME}/locale' ++ transmissionlocaledir='${localedir}' + AC_SUBST(transmissionlocaledir) + fi + AC_SUBST(INTLLIBS) diff --git a/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch b/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch index 29dec4f5e9..d6c1987718 100644 --- a/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch +++ b/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch @@ -32,9 +32,9 @@ Index: u-boot/configs/sifive_fu540_defconfig =================================================================== --- u-boot.orig/configs/sifive_fu540_defconfig +++ u-boot/configs/sifive_fu540_defconfig -@@ -12,3 +12,5 @@ CONFIG_DISPLAY_BOARDINFO=y - CONFIG_DEFAULT_DEVICE_TREE="hifive-unleashed-a00" - CONFIG_SYS_RELOC_GD_ENV_ADDR=y +@@ -27,3 +27,5 @@ CONFIG_SPL_DM_SEQ_ALIAS=y + CONFIG_SPL_CLK=y CONFIG_DM_MTD=y + CONFIG_DM_RESET=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr};" diff --git a/gnu/packages/patches/ungoogled-chromium-extension-search-path.patch b/gnu/packages/patches/ungoogled-chromium-extension-search-path.patch new file mode 100644 index 0000000000..5ce219ccc7 --- /dev/null +++ b/gnu/packages/patches/ungoogled-chromium-extension-search-path.patch @@ -0,0 +1,28 @@ +Look for extensions in $CHROMIUM_EXTENSION_DIRECTORY instead of +/usr/share/chromium/extensions. + +--- a/chrome/common/chrome_paths.cc ++++ b/chrome/common/chrome_paths.cc +@@ -4,6 +4,7 @@ + + #include "chrome/common/chrome_paths.h" + ++#include "base/environment.h" + #include "base/files/file_util.h" + #include "base/logging.h" + #include "base/native_library.h" +@@ -511,7 +512,13 @@ + #endif + #if defined(OS_LINUX) || defined(OS_CHROMEOS) + case chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS: { +- cur = base::FilePath(kFilepathSinglePrefExtensions); ++ std::unique_ptr<base::Environment> environment(base::Environment::Create()); ++ std::string extension_dir; ++ if (environment->GetVar("CHROMIUM_EXTENSION_DIRECTORY", &extension_dir)) { ++ cur = base::FilePath(extension_dir); ++ } else { ++ cur = base::FilePath(kFilepathSinglePrefExtensions); ++ } + break; + } + #endif diff --git a/gnu/packages/patches/ungoogled-chromium-system-nspr.patch b/gnu/packages/patches/ungoogled-chromium-system-nspr.patch index 6fbc0a56a7..988296b143 100644 --- a/gnu/packages/patches/ungoogled-chromium-system-nspr.patch +++ b/gnu/packages/patches/ungoogled-chromium-system-nspr.patch @@ -17,8 +17,8 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys --- a/base/time/time.cc +++ b/base/time/time.cc @@ -14,7 +14,7 @@ - #include "base/macros.h" - #include "base/no_destructor.h" + #include "base/optional.h" + #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" -#include "base/third_party/nspr/prtime.h" +#include <nspr/prtime.h> @@ -27,7 +27,7 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys --- a/base/BUILD.gn +++ b/base/BUILD.gn -@@ -107,6 +107,9 @@ config("base_flags") { +@@ -102,6 +102,9 @@ "-Wglobal-constructors", ] } @@ -37,7 +37,7 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys } config("base_implementation") { -@@ -712,8 +715,6 @@ jumbo_component("base") { +@@ -720,8 +723,6 @@ "third_party/cityhash_v103/src/city_v103.h", "third_party/icu/icu_utf.cc", "third_party/icu/icu_utf.h", @@ -48,19 +48,19 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys "threading/hang_watcher.cc", --- a/tools/gn/build/gen.py +++ b/tools/gn/build/gen.py -@@ -339,6 +339,9 @@ def WriteGNNinja(path, platform, host, o +@@ -380,6 +380,9 @@ if not options.no_static_libstdcpp: ldflags.append('-static-libstdc++') + # Additional system libraries that are used. + libs.append('-lnspr4') + - # This is needed by libc++. - if not platform.is_mingw(): - libs.append('-ldl') + if platform.is_mingw() or platform.is_msys(): + cflags.remove('-std=c++17') + cflags.extend([ --- a/third_party/blink/renderer/platform/BUILD.gn +++ b/third_party/blink/renderer/platform/BUILD.gn -@@ -103,6 +103,9 @@ +@@ -110,6 +110,9 @@ "//build/win:default_exe_manifest", "//third_party/icu", ] @@ -72,7 +72,7 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys # This isn't strictly necessary since we can just add the deps to "platform", --- a/third_party/crashpad/crashpad/handler/BUILD.gn +++ b/third_party/crashpad/crashpad/handler/BUILD.gn -@@ -140,6 +140,9 @@ +@@ -144,6 +144,9 @@ "../third_party/mini_chromium:base", "../tools:tool_support", ] @@ -104,7 +104,7 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys + "-lnspr4", + ] if (is_ios) { - libs = [ "UIKit.framework" ] + frameworks = [ "UIKit.framework" ] } --- a/components/schema_org/BUILD.gn +++ b/components/schema_org/BUILD.gn diff --git a/gnu/packages/patches/xpra-4.0.4-norequests.patch b/gnu/packages/patches/xpra-4.0.4-norequests.patch deleted file mode 100644 index e545be7f1d..0000000000 --- a/gnu/packages/patches/xpra-4.0.4-norequests.patch +++ /dev/null @@ -1,39 +0,0 @@ -Remove python-requests dependency, r27626 upstream. - ---- a/xpra/net/websockets/common.py (revision 27625) -+++ b/xpra/net/websockets/common.py (revision 27626) -@@ -7,7 +7,6 @@ - import uuid - from hashlib import sha1 - from base64 import b64encode --from requests.structures import CaseInsensitiveDict - - from xpra.os_util import strtobytes, bytestostr, monotonic_time - from xpra.log import Logger -@@ -77,7 +76,7 @@ - for line in lines: - parts = line.split(b": ", 1) - if len(parts)==2: -- headers[parts[0]] = parts[1] -+ headers[parts[0].lower()] = parts[1] - return headers - - def verify_response_headers(headers, key): -@@ -84,14 +83,13 @@ - log("verify_response_headers(%s)", headers) - if not headers: - raise Exception("no http headers found in response") -- headers = CaseInsensitiveDict(headers) -- upgrade = headers.get(b"Upgrade", b"") -+ upgrade = headers.get(b"upgrade", b"") - if upgrade!=b"websocket": - raise Exception("invalid http upgrade: '%s'" % upgrade) -- protocol = headers.get(b"Sec-WebSocket-Protocol", b"") -+ protocol = headers.get(b"sec-websocket-protocol", b"") - if protocol!=b"binary": - raise Exception("invalid websocket protocol: '%s'" % protocol) -- accept_key = headers.get(b"Sec-WebSocket-Accept", b"") -+ accept_key = headers.get(b"sec-websocket-accept", b"") - if not accept_key: - raise Exception("websocket accept key is missing") - expected_key = make_websocket_accept_hash(key) diff --git a/gnu/packages/patches/yggdrasil-extra-config.patch b/gnu/packages/patches/yggdrasil-extra-config.patch new file mode 100644 index 0000000000..c21ca29a84 --- /dev/null +++ b/gnu/packages/patches/yggdrasil-extra-config.patch @@ -0,0 +1,86 @@ +diff --git a/cmd/yggdrasil/main.go b/cmd/yggdrasil/main.go +index 813e950..08d35cc 100644 +--- a/cmd/yggdrasil/main.go ++++ b/cmd/yggdrasil/main.go +@@ -40,11 +40,12 @@ type node struct { + admin module.Module // admin.AdminSocket + } + +-func readConfig(useconf *bool, useconffile *string, normaliseconf *bool) *config.NodeConfig { ++func readConfig(useconf *bool, useconffile *string, extraconffile *string, normaliseconf *bool) *config.NodeConfig { + // Use a configuration file. If -useconf, the configuration will be read + // from stdin. If -useconffile, the configuration will be read from the + // filesystem. + var conf []byte ++ var extraconf []byte + var err error + if *useconffile != "" { + // Read the file from the filesystem +@@ -56,6 +57,21 @@ func readConfig(useconf *bool, useconffile *string, normaliseconf *bool) *config + if err != nil { + panic(err) + } ++ if *extraconffile != "" { ++ extraconf, err = ioutil.ReadFile(*extraconffile); ++ } ++ if err != nil { ++ panic(err) ++ } ++ // Generate a new configuration - this gives us a set of sane defaults - ++ // then parse the configuration we loaded above on top of it. The effect ++ // of this is that any configuration item that is missing from the provided ++ // configuration will use a sane default. ++ cfg := config.GenerateConfig() ++ var confs [2][]byte ++ confs[0]=conf ++ confs[1]=extraconf ++ for _, conf := range confs { if len(conf)>0 { + // If there's a byte order mark - which Windows 10 is now incredibly fond of + // throwing everywhere when it's converting things into UTF-16 for the hell + // of it - remove it and decode back down into UTF-8. This is necessary +@@ -69,11 +85,6 @@ func readConfig(useconf *bool, useconffile *string, normaliseconf *bool) *config + panic(err) + } + } +- // Generate a new configuration - this gives us a set of sane defaults - +- // then parse the configuration we loaded above on top of it. The effect +- // of this is that any configuration item that is missing from the provided +- // configuration will use a sane default. +- cfg := config.GenerateConfig() + var dat map[string]interface{} + if err := hjson.Unmarshal(conf, &dat); err != nil { + panic(err) +@@ -112,6 +123,7 @@ func readConfig(useconf *bool, useconffile *string, normaliseconf *bool) *config + if err = mapstructure.Decode(dat, &cfg); err != nil { + panic(err) + } ++ }} + return cfg + } + +@@ -164,6 +176,7 @@ func main() { + genconf := flag.Bool("genconf", false, "print a new config to stdout") + useconf := flag.Bool("useconf", false, "read HJSON/JSON config from stdin") + useconffile := flag.String("useconffile", "", "read HJSON/JSON config from specified file path") ++ extraconffile := flag.String("extraconffile", "", "extra (usually private) HJSON/JSON config from specified file path") + normaliseconf := flag.Bool("normaliseconf", false, "use in combination with either -useconf or -useconffile, outputs your configuration normalised") + confjson := flag.Bool("json", false, "print configuration from -genconf or -normaliseconf as JSON instead of HJSON") + autoconf := flag.Bool("autoconf", false, "automatic mode (dynamic IP, peer with IPv6 neighbors)") +@@ -187,7 +200,7 @@ func main() { + cfg = config.GenerateConfig() + case *useconffile != "" || *useconf: + // Read the configuration from either stdin or from the filesystem +- cfg = readConfig(useconf, useconffile, normaliseconf) ++ cfg = readConfig(useconf, useconffile, extraconffile, normaliseconf) + // If the -normaliseconf option was specified then remarshal the above + // configuration and print it back to stdout. This lets the user update + // their configuration file with newly mapped names (like above) or to +@@ -332,7 +345,7 @@ func main() { + goto exit + case _ = <-r: + if *useconffile != "" { +- cfg = readConfig(useconf, useconffile, normaliseconf) ++ cfg = readConfig(useconf, useconffile, extraconffile, normaliseconf) + logger.Infoln("Reloading configuration from", *useconffile) + n.core.UpdateConfig(cfg) + n.tuntap.UpdateConfig(cfg) |