diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-11 08:21:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-11 08:21:30 +0000 |
commit | 5fbf8d8592ffd00fcd6f237ab31886936755c882 (patch) | |
tree | c02b1d7cb63f2794cb6e24b6ba611badb624d8ac /debian/patches | |
parent | Adding upstream version 1:0.1.9998svn3589+dfsg. (diff) | |
download | kbuild-5fbf8d8592ffd00fcd6f237ab31886936755c882.tar.xz kbuild-5fbf8d8592ffd00fcd6f237ab31886936755c882.zip |
Adding debian version 1:0.1.9998svn3589+dfsg-1.debian/1%0.1.9998svn3589+dfsg-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/07_special-chars-build-path.diff | 356 | ||||
-rw-r--r-- | debian/patches/assert.patch | 18 | ||||
-rw-r--r-- | debian/patches/build-fix | 22 | ||||
-rw-r--r-- | debian/patches/do-not-build-docs.patch | 18 | ||||
-rw-r--r-- | debian/patches/series | 4 |
5 files changed, 418 insertions, 0 deletions
diff --git a/debian/patches/07_special-chars-build-path.diff b/debian/patches/07_special-chars-build-path.diff new file mode 100644 index 0000000..6838aa0 --- /dev/null +++ b/debian/patches/07_special-chars-build-path.diff @@ -0,0 +1,356 @@ +Description: kBuild and any package using it FTBFS if the build path contains special + characters (mostly anything except [a-zA-Z0-9\-]). This is fixed by using the static + linking method from GCC3PLAIN.kmk on all other profiles. +Author: Felix Geyer <debfx-pkg@fobos.de> +Bug: http://svn.netlabs.org/kbuild/ticket/94 + +Index: kbuild/kBuild/tools/GCC32.kmk +=================================================================== +--- kbuild.orig/kBuild/tools/GCC32.kmk ++++ kbuild/kBuild/tools/GCC32.kmk +@@ -54,6 +54,7 @@ + TOOL_GCC32_CXX ?= $(TOOL_GCC32_PREFIX)g++$(TOOL_GCC32_SUFFIX) -m32 + TOOL_GCC32_AS ?= $(TOOL_GCC32_PREFIX)gcc$(TOOL_GCC32_SUFFIX) -m32 + TOOL_GCC32_AR ?= $(TOOL_GCC32_PREFIX2)ar$(TOOL_GCC32_SUFFIX2) ++TOOL_GCC32_RANLIB ?= $(TOOL_GCC32_PREFIX)ranlib$(HOSTSUFF_EXE) + TOOL_GCC32_LD ?= $(TOOL_GCC32_PREFIX)gcc$(TOOL_GCC32_SUFFIX) -m32 + if1of ($(KBUILD_HOST), solaris) + TOOL_GCC32_LD_SYSMOD ?= $(TOOL_GCC32_PREFIX3)ld$(TOOL_GCC32_SUFFIX3) +@@ -235,20 +236,21 @@ + # @param $(deps) Other dependencies. + # @param $(othersrc) Unhandled sources. + # @param $(outbase) Output basename (full). Use this for list files and such. +-TOOL_GCC32_LINK_LIBRARY_OUTPUT = $(out).ar-script ++TOOL_GCC32_LINK_LIBRARY_OUTPUT = + TOOL_GCC32_LINK_LIBRARY_DEPEND = $(othersrc) + TOOL_GCC32_LINK_LIBRARY_DEPORD = + define TOOL_GCC32_LINK_LIBRARY_CMDS +- $(QUIET)$(APPEND) $(out).ar-script 'CREATE $(out)' +- $(QUIET)$(APPEND) -n $(out).ar-script \ +- $(foreach o,$(objs), 'ADDMOD $(o)') \ +- $(foreach o,$(filter-out %.def %.imp %.dll,$(othersrc)), 'ADDLIB $(o)') +- $(if $(filter %.def %.imp %.dll,$(othersrc))\ +- ,$(TOOL_GCC32_AR_IMP) -o $(outbase).imp.a $(filter %.def %.imp %.dll,$(othersrc))\ +- $(NL)$(TAB)$(QUIET)$(APPEND) $(out).ar-script 'ADDLIB $(outbase).imp.a') +- $(QUIET)$(APPEND) $(out).ar-script 'SAVE' +- $(QUIET)$(APPEND) $(out).ar-script 'END' +- $(QUIET)$(REDIRECT) -rti $(out).ar-script -- $(TOOL_GCC32_AR) -M ++ $(QUIET)$(TOOL_GCC32_AR) $(flags) $(out) $(objs) ++ $(foreach lib,$(othersrc)\ ++ ,$(NL)$(TAB)$(call MSG_AR_MERGE,$(target),$(out),$(lib)) \ ++ $(NL)$(TAB)$(QUIET)$(RM_EXT) -f $(dir $(outbase))ar.tmp.dir/* \ ++ $(NL)$(TAB)$(QUIET)$(MKDIR) -p $(dir $(outbase))/ar.tmp.dir/ \ ++ $(NL)$(TAB)$(QUIET)(cd $(dir $(outbase))ar.tmp.dir/ \ ++ && $(TOOL_GCC32_AR) x $(abspath $(lib)) \ ++ && $(TOOL_GCC32_AR) $(flags) $(out) *) \ ++ $(NL)$(TAB)$(QUIET)$(RM_EXT) -f $(dir $(outbase))/ar.tmp.dir/* \ ++ $(NL)$(TAB)$(QUIET)$(RMDIR) $(dir $(outbase))ar.tmp.dir/) ++ $(QUIET)$(TOOL_GCC32_RANLIB) $(out) + endef + + +Index: kbuild/kBuild/tools/GCC3.kmk +=================================================================== +--- kbuild.orig/kBuild/tools/GCC3.kmk ++++ kbuild/kBuild/tools/GCC3.kmk +@@ -52,6 +52,7 @@ + TOOL_GCC3_CXX ?= $(TOOL_GCC3_PREFIX)g++$(TOOL_GCC3_SUFFIX) + TOOL_GCC3_AS ?= $(TOOL_GCC3_PREFIX)gcc$(TOOL_GCC3_SUFFIX) + TOOL_GCC3_AR ?= $(TOOL_GCC3_PREFIX2)ar$(TOOL_GCC3_SUFFIX2) ++TOOL_GCC3_RANLIB ?= ranlib$(HOSTSUFF_EXE) + ifeq ($(KBUILD_TARGET),os2) + TOOL_GCC3_AR_IMP ?= $(TOOL_GCC3_PREFIX3)emximp$(TOOL_GCC3_SUFFIX3) + else +@@ -234,21 +235,21 @@ + # @param $(deps) Other dependencies. + # @param $(othersrc) Unhandled sources. + # @param $(outbase) Output basename (full). Use this for list files and such. +-TOOL_GCC3_LINK_LIBRARY_OUTPUT = $(out).ar-script +-TOOL_GCC3_LINK_LIBRARY_OUTPUT_MAYBE = $(outbase).imp.a ++TOOL_GCC3_LINK_LIBRARY_OUTPUT = + TOOL_GCC3_LINK_LIBRARY_DEPEND = $(othersrc) + TOOL_GCC3_LINK_LIBRARY_DEPORD = + define TOOL_GCC3_LINK_LIBRARY_CMDS +- $(QUIET)$(APPEND) $(out).ar-script 'CREATE $(out)' +- $(QUIET)$(APPEND) -n $(out).ar-script \ +- $(foreach o,$(objs), 'ADDMOD $(o)') \ +- $(foreach o,$(filter-out %.def %.imp %.dll,$(othersrc)), 'ADDLIB $(o)') +- $(if $(filter %.def %.imp %.dll,$(othersrc))\ +- ,$(TOOL_GCC3_AR_IMP) -o $(outbase).imp.a $(filter %.def %.imp %.dll,$(othersrc))\ +- $(NL)$(TAB)$(QUIET)$(APPEND) $(out).ar-script 'ADDLIB $(outbase).imp.a') +- $(QUIET)$(APPEND) $(out).ar-script 'SAVE' +- $(QUIET)$(APPEND) $(out).ar-script 'END' +- $(QUIET)$(REDIRECT) -rti $(out).ar-script -- $(TOOL_GCC3_AR) -M ++ $(QUIET)$(TOOL_GCC3_AR) $(flags) $(out) $(objs) ++ $(foreach lib,$(othersrc)\ ++ ,$(NL)$(TAB)$(call MSG_AR_MERGE,$(target),$(out),$(lib)) \ ++ $(NL)$(TAB)$(QUIET)$(RM_EXT) -f $(dir $(outbase))ar.tmp.dir/* \ ++ $(NL)$(TAB)$(QUIET)$(MKDIR) -p $(dir $(outbase))/ar.tmp.dir/ \ ++ $(NL)$(TAB)$(QUIET)(cd $(dir $(outbase))ar.tmp.dir/ \ ++ && $(TOOL_GCC3_AR) x $(abspath $(lib)) \ ++ && $(TOOL_GCC3_AR) $(flags) $(out) *) \ ++ $(NL)$(TAB)$(QUIET)$(RM_EXT) -f $(dir $(outbase))/ar.tmp.dir/* \ ++ $(NL)$(TAB)$(QUIET)$(RMDIR) $(dir $(outbase))ar.tmp.dir/) ++ $(QUIET)$(TOOL_GCC3_RANLIB) $(out) + endef + + +Index: kbuild/kBuild/tools/GCC64.kmk +=================================================================== +--- kbuild.orig/kBuild/tools/GCC64.kmk ++++ kbuild/kBuild/tools/GCC64.kmk +@@ -53,6 +53,7 @@ + TOOL_GCC64_CXX ?= $(TOOL_GCC64_PREFIX)g++$(TOOL_GCC64_SUFFIX) -m64 + TOOL_GCC64_AS ?= $(TOOL_GCC64_PREFIX)gcc$(TOOL_GCC64_SUFFIX) -m64 + TOOL_GCC64_AR ?= $(TOOL_GCC64_PREFIX2)ar$(TOOL_GCC64_SUFFIX2) ++TOOL_GCC64_RANLIB ?= $(TOOL_GCC64_PREFIX)ranlib$(TOOL_GCC64_SUFFIX) + TOOL_GCC64_LD ?= $(TOOL_GCC64_PREFIX)gcc$(TOOL_GCC64_SUFFIX) -m64 + if1of ($(KBUILD_HOST), solaris) + TOOL_GCC64_LD_SYSMOD ?= $(TOOL_GCC64_PREFIX3)ld$(TOOL_GCC64_SUFFIX3) +@@ -233,17 +234,21 @@ + # @param $(deps) Other dependencies. + # @param $(othersrc) Unhandled sources. + # @param $(outbase) Output basename (full). Use this for list files and such. +-TOOL_GCC64_LINK_LIBRARY_OUTPUT = $(out).ar-script ++TOOL_GCC64_LINK_LIBRARY_OUTPUT = + TOOL_GCC64_LINK_LIBRARY_DEPEND = $(othersrc) + TOOL_GCC64_LINK_LIBRARY_DEPORD = + define TOOL_GCC64_LINK_LIBRARY_CMDS +- $(QUIET)$(APPEND) $(out).ar-script 'CREATE $(out)' +- $(QUIET)$(APPEND) -n $(out).ar-script \ +- $(foreach o,$(objs), 'ADDMOD $(o)') \ +- $(foreach o,$(othersrc), 'ADDLIB $(o)') +- $(QUIET)$(APPEND) $(out).ar-script 'SAVE' +- $(QUIET)$(APPEND) $(out).ar-script 'END' +- $(QUIET)$(REDIRECT) -rti $(out).ar-script -- $(TOOL_GCC64_AR) -M ++ $(QUIET)$(TOOL_GCC64_AR) $(flags) $(out) $(objs) ++ $(foreach lib,$(othersrc)\ ++ ,$(NL)$(TAB)$(call MSG_AR_MERGE,$(target),$(out),$(lib)) \ ++ $(NL)$(TAB)$(QUIET)$(RM_EXT) -f $(dir $(outbase))ar.tmp.dir/* \ ++ $(NL)$(TAB)$(QUIET)$(MKDIR) -p $(dir $(outbase))/ar.tmp.dir/ \ ++ $(NL)$(TAB)$(QUIET)(cd $(dir $(outbase))ar.tmp.dir/ \ ++ && $(TOOL_GCC64_AR) x $(abspath $(lib)) \ ++ && $(TOOL_GCC64_AR) $(flags) $(out) *) \ ++ $(NL)$(TAB)$(QUIET)$(RM_EXT) -f $(dir $(outbase))/ar.tmp.dir/* \ ++ $(NL)$(TAB)$(QUIET)$(RMDIR) $(dir $(outbase))ar.tmp.dir/) ++ $(QUIET)$(TOOL_GCC64_RANLIB) $(out) + endef + + +Index: kbuild/kBuild/tools/GXX32.kmk +=================================================================== +--- kbuild.orig/kBuild/tools/GXX32.kmk ++++ kbuild/kBuild/tools/GXX32.kmk +@@ -54,6 +54,7 @@ + TOOL_GXX32_PCH ?= $(TOOL_GXX32_CXX) + TOOL_GXX32_AS ?= $(TOOL_GXX32_PREFIX)gcc$(TOOL_GXX32_SUFFIX) -m32 + TOOL_GXX32_AR ?= $(TOOL_GXX32_PREFIX2)ar$(TOOL_GXX32_SUFFIX2) ++TOOL_GXX32_RANLIB ?= $(TOOL_GXX32_PREFIX)ranlib$(TOOL_GXX32_SUFFIX) + TOOL_GXX32_LD ?= $(TOOL_GXX32_PREFIX)g++$(TOOL_GXX32_SUFFIX) -m32 + if1of ($(KBUILD_HOST), solaris) + TOOL_GXX32_LD_SYSMOD ?= $(TOOL_GXX32_PREFIX3)ld$(TOOL_GXX32_SUFFIX3) +@@ -261,20 +262,21 @@ + # @param $(deps) Other dependencies. + # @param $(othersrc) Unhandled sources. + # @param $(outbase) Output basename (full). Use this for list files and such. +-TOOL_GXX32_LINK_LIBRARY_OUTPUT = $(out).ar-script ++TOOL_GXX32_LINK_LIBRARY_OUTPUT = + TOOL_GXX32_LINK_LIBRARY_DEPEND = $(othersrc) + TOOL_GXX32_LINK_LIBRARY_DEPORD = + define TOOL_GXX32_LINK_LIBRARY_CMDS +- $(QUIET)$(APPEND) $(out).ar-script 'CREATE $(out)' +- $(QUIET)$(APPEND) -n $(out).ar-script \ +- $(foreach o,$(filter-out %.h.gch,$(objs)), 'ADDMOD $(o)') \ +- $(foreach o,$(filter-out %.def %.imp %.dll,$(othersrc)), 'ADDLIB $(o)') +- $(if $(filter %.def %.imp %.dll,$(othersrc))\ +- ,$(TOOL_GXX32_AR_IMP) -o $(outbase).imp.a $(filter %.def %.imp %.dll,$(othersrc))\ +- $(NL)$(TAB)$(QUIET)$(APPEND) $(out).ar-script 'ADDLIB $(outbase).imp.a') +- $(QUIET)$(APPEND) $(out).ar-script 'SAVE' +- $(QUIET)$(APPEND) $(out).ar-script 'END' +- $(QUIET)$(REDIRECT) -rti $(out).ar-script -- $(TOOL_GXX32_AR) -M ++ $(QUIET)$(TOOL_GXX32_AR) $(flags) $(out) $(objs) ++ $(foreach lib,$(othersrc)\ ++ ,$(NL)$(TAB)$(call MSG_AR_MERGE,$(target),$(out),$(lib)) \ ++ $(NL)$(TAB)$(QUIET)$(RM_EXT) -f $(dir $(outbase))ar.tmp.dir/* \ ++ $(NL)$(TAB)$(QUIET)$(MKDIR) -p $(dir $(outbase))/ar.tmp.dir/ \ ++ $(NL)$(TAB)$(QUIET)(cd $(dir $(outbase))ar.tmp.dir/ \ ++ && $(TOOL_GXX32_AR) x $(abspath $(lib)) \ ++ && $(TOOL_GXX32_AR) $(flags) $(out) *) \ ++ $(NL)$(TAB)$(QUIET)$(RM_EXT) -f $(dir $(outbase))/ar.tmp.dir/* \ ++ $(NL)$(TAB)$(QUIET)$(RMDIR) $(dir $(outbase))ar.tmp.dir/) ++ $(QUIET)$(TOOL_GXX32_RANLIB) $(out) + endef + + +Index: kbuild/kBuild/tools/GXX3.kmk +=================================================================== +--- kbuild.orig/kBuild/tools/GXX3.kmk ++++ kbuild/kBuild/tools/GXX3.kmk +@@ -54,6 +54,7 @@ + TOOL_GXX3_PCH ?= $(TOOL_GXX3_CXX) + TOOL_GXX3_AS ?= $(TOOL_GXX3_PREFIX)gcc$(TOOL_GXX3_SUFFIX) + TOOL_GXX3_AR ?= $(TOOL_GXX3_PREFIX2)ar$(TOOL_GXX3_SUFFIX2) ++TOOL_GXX3_RANLIB ?= $(TOOL_GXX3_PREFIX)ranlib$(TOOL_GXX3_SUFFIX) + ifeq ($(KBUILD_TARGET),os2) + TOOL_GXX3_AR_IMP ?= $(TOOL_GXX3_PREFIX3)emximp$(TOOL_GXX3_SUFFIX3) + else +@@ -263,21 +264,21 @@ + # @param $(deps) Other dependencies. + # @param $(othersrc) Unhandled sources. + # @param $(outbase) Output basename (full). Use this for list files and such. +-TOOL_GXX3_LINK_LIBRARY_OUTPUT = $(out).ar-script +-TOOL_GXX3_LINK_LIBRARY_OUTPUT_MAYBE = $(outbase).imp.a ++TOOL_GXX3_LINK_LIBRARY_OUTPUT = + TOOL_GXX3_LINK_LIBRARY_DEPEND = $(othersrc) + TOOL_GXX3_LINK_LIBRARY_DEPORD = + define TOOL_GXX3_LINK_LIBRARY_CMDS +- $(QUIET)$(APPEND) $(out).ar-script 'CREATE $(out)' +- $(QUIET)$(APPEND) -n $(out).ar-script \ +- $(foreach o,$(filter-out %.h.gch,$(objs)), 'ADDMOD $(o)') \ +- $(foreach o,$(filter-out %.def %.imp %.dll,$(othersrc)), 'ADDLIB $(o)') +- $(if $(filter %.def %.imp %.dll,$(othersrc))\ +- ,$(TOOL_GXX3_AR_IMP) -o $(outbase).imp.a $(filter %.def %.imp %.dll,$(othersrc))\ +- $(NL)$(TAB)$(QUIET)$(APPEND) $(out).ar-script 'ADDLIB $(outbase).imp.a') +- $(QUIET)$(APPEND) $(out).ar-script 'SAVE' +- $(QUIET)$(APPEND) $(out).ar-script 'END' +- $(QUIET)$(REDIRECT) -rti $(out).ar-script -- $(TOOL_GXX3_AR) -M ++ $(QUIET)$(TOOL_GXX3_AR) $(flags) $(out) $(objs) ++ $(foreach lib,$(othersrc)\ ++ ,$(NL)$(TAB)$(call MSG_AR_MERGE,$(target),$(out),$(lib)) \ ++ $(NL)$(TAB)$(QUIET)$(RM_EXT) -f $(dir $(outbase))ar.tmp.dir/* \ ++ $(NL)$(TAB)$(QUIET)$(MKDIR) -p $(dir $(outbase))/ar.tmp.dir/ \ ++ $(NL)$(TAB)$(QUIET)(cd $(dir $(outbase))ar.tmp.dir/ \ ++ && $(TOOL_GXX3_AR) x $(abspath $(lib)) \ ++ && $(TOOL_GXX3_AR) $(flags) $(out) *) \ ++ $(NL)$(TAB)$(QUIET)$(RM_EXT) -f $(dir $(outbase))/ar.tmp.dir/* \ ++ $(NL)$(TAB)$(QUIET)$(RMDIR) $(dir $(outbase))ar.tmp.dir/) ++ $(QUIET)$(TOOL_GXX3_RANLIB) $(out) + endef + + +Index: kbuild/kBuild/tools/GXX64.kmk +=================================================================== +--- kbuild.orig/kBuild/tools/GXX64.kmk ++++ kbuild/kBuild/tools/GXX64.kmk +@@ -54,6 +54,7 @@ + TOOL_GXX64_PCH ?= $(TOOL_GXX64_CXX) + TOOL_GXX64_AS ?= $(TOOL_GXX64_PREFIX)gcc$(TOOL_GXX64_SUFFIX) -m64 + TOOL_GXX64_AR ?= $(TOOL_GXX64_PREFIX2)ar$(TOOL_GXX64_SUFFIX2) ++TOOL_GXX64_RANLIB ?= $(TOOL_GXX64_PREFIX)ranlib$(TOOL_GXX64_SUFFIX) + TOOL_GXX64_LD ?= $(TOOL_GXX64_PREFIX)g++$(TOOL_GXX64_SUFFIX) -m64 + if1of ($(KBUILD_HOST), solaris) + TOOL_GXX64_LD_SYSMOD ?= $(TOOL_GXX64_PREFIX3)ld$(TOOL_GXX64_SUFFIX3) +@@ -261,17 +262,21 @@ + # @param $(deps) Other dependencies. + # @param $(othersrc) Unhandled sources. + # @param $(outbase) Output basename (full). Use this for list files and such. +-TOOL_GXX64_LINK_LIBRARY_OUTPUT = $(out).ar-script ++TOOL_GXX64_LINK_LIBRARY_OUTPUT = + TOOL_GXX64_LINK_LIBRARY_DEPEND = $(othersrc) + TOOL_GXX64_LINK_LIBRARY_DEPORD = + define TOOL_GXX64_LINK_LIBRARY_CMDS +- $(QUIET)$(APPEND) $(out).ar-script 'CREATE $(out)' +- $(QUIET)$(APPEND) -n $(out).ar-script \ +- $(foreach o,$(filter-out %.h.gch,$(objs)), 'ADDMOD $(o)') \ +- $(foreach o,$(othersrc), 'ADDLIB $(o)') +- $(QUIET)$(APPEND) $(out).ar-script 'SAVE' +- $(QUIET)$(APPEND) $(out).ar-script 'END' +- $(QUIET)$(REDIRECT) -rti $(out).ar-script -- $(TOOL_GXX64_AR) -M ++ $(QUIET)$(TOOL_GXX64_AR) $(flags) $(out) $(objs) ++ $(foreach lib,$(othersrc)\ ++ ,$(NL)$(TAB)$(call MSG_AR_MERGE,$(target),$(out),$(lib)) \ ++ $(NL)$(TAB)$(QUIET)$(RM_EXT) -f $(dir $(outbase))ar.tmp.dir/* \ ++ $(NL)$(TAB)$(QUIET)$(MKDIR) -p $(dir $(outbase))/ar.tmp.dir/ \ ++ $(NL)$(TAB)$(QUIET)(cd $(dir $(outbase))ar.tmp.dir/ \ ++ && $(TOOL_GXX64_AR) x $(abspath $(lib)) \ ++ && $(TOOL_GXX64_AR) $(flags) $(out) *) \ ++ $(NL)$(TAB)$(QUIET)$(RM_EXT) -f $(dir $(outbase))/ar.tmp.dir/* \ ++ $(NL)$(TAB)$(QUIET)$(RMDIR) $(dir $(outbase))ar.tmp.dir/) ++ $(QUIET)$(TOOL_GXX64_RANLIB) $(out) + endef + + +Index: kbuild/kBuild/tools/MINGW32.kmk +=================================================================== +--- kbuild.orig/kBuild/tools/MINGW32.kmk ++++ kbuild/kBuild/tools/MINGW32.kmk +@@ -81,6 +81,7 @@ + TOOL_MINGW32_CXX ?= $(TOOL_MINGW32_PREFIX)g++$(TOOL_MINGW32_HOSTSUFF_EXE) + TOOL_MINGW32_AS ?= $(TOOL_MINGW32_PREFIX)gcc$(TOOL_MINGW32_HOSTSUFF_EXE) + TOOL_MINGW32_AR ?= $(TOOL_MINGW32_PREFIX)ar$(TOOL_MINGW32_HOSTSUFF_EXE) ++TOOL_MINGW32_RANLIB ?= $(TOOL_MINGW32_PREFIX)ranlib$(TOOL_MINGW32_HOSTSUFF_EXE) + ifndef TOOL_MINGW32_XCOMPILE# The gentoo package doesn't have g++. + TOOL_MINGW32_LD ?= $(TOOL_MINGW32_PREFIX)g++$(TOOL_MINGW32_HOSTSUFF_EXE) + else +@@ -200,17 +201,21 @@ + # @param $(deps) Other dependencies. + # + # @param $(outbase) Output basename (full). Use this for list files and such. +-TOOL_MINGW32_LINK_LIBRARY_OUTPUT = $(out).ar-script ++TOOL_MINGW32_LINK_LIBRARY_OUTPUT = + TOOL_MINGW32_LINK_LIBRARY_DEPEND = $(othersrc) + TOOL_MINGW32_LINK_LIBRARY_DEPORD = + define TOOL_MINGW32_LINK_LIBRARY_CMDS +- $(QUIET)$(APPEND) $(out).ar-script 'CREATE $(out)' +- $(QUIET)$(APPEND) -n $(out).ar-script \ +- $(foreach o,$(objs), 'ADDMOD $(o)') \ +- $(foreach o,$(othersrc), 'ADDLIB $(o)') +- $(QUIET)$(APPEND) $(out).ar-script 'SAVE' +- $(QUIET)$(APPEND) $(out).ar-script 'END' +- $(QUIET)$(TOOL_MINGW32_AR) -M < $(out).ar-script ++ $(QUIET)$(TOOL_MINGW32_AR) $(flags) $(out) $(objs) ++ $(foreach lib,$(othersrc)\ ++ ,$(NL)$(TAB)$(call MSG_AR_MERGE,$(target),$(out),$(lib)) \ ++ $(NL)$(TAB)$(QUIET)$(RM_EXT) -f $(dir $(outbase))ar.tmp.dir/* \ ++ $(NL)$(TAB)$(QUIET)$(MKDIR) -p $(dir $(outbase))/ar.tmp.dir/ \ ++ $(NL)$(TAB)$(QUIET)(cd $(dir $(outbase))ar.tmp.dir/ \ ++ && $(TOOL_MINGW32_AR) x $(abspath $(lib)) \ ++ && $(TOOL_MINGW32_AR) $(flags) $(out) *) \ ++ $(NL)$(TAB)$(QUIET)$(RM_EXT) -f $(dir $(outbase))/ar.tmp.dir/* \ ++ $(NL)$(TAB)$(QUIET)$(RMDIR) $(dir $(outbase))ar.tmp.dir/) ++ $(QUIET)$(TOOL_MINGW32_RANLIB) $(out) + endef + + +Index: kbuild/kBuild/tools/XGCCAMD64LINUX.kmk +=================================================================== +--- kbuild.orig/kBuild/tools/XGCCAMD64LINUX.kmk ++++ kbuild/kBuild/tools/XGCCAMD64LINUX.kmk +@@ -73,6 +73,7 @@ + TOOL_XGCCAMD64LINUX_CXX ?= $(TOOL_XGCCAMD64LINUX_PREFIX)g++$(TOOL_XGCCAMD64LINUX_SUFFIX) + TOOL_XGCCAMD64LINUX_AS ?= $(TOOL_XGCCAMD64LINUX_PREFIX)gcc$(TOOL_XGCCAMD64LINUX_SUFFIX) + TOOL_XGCCAMD64LINUX_AR ?= $(TOOL_XGCCAMD64LINUX_PREFIX2)ar$(TOOL_XGCCAMD64LINUX_SUFFIX2) ++TOOL_XGCCAMD64LINUX_RANLIB ?= $(TOOL_XGCCAMD64LINUX_PREFIX)ranlib$(TOOL_XGCCAMD64LINUX_SUFFIX) + TOOL_XGCCAMD64LINUX_LD ?= $(TOOL_XGCCAMD64LINUX_PREFIX)g++$(TOOL_XGCCAMD64LINUX_SUFFIX) + TOOL_XGCCAMD64LINUX_LD_SYSMOD ?= $(TOOL_XGCCAMD64LINUX_PREFIX2)ld$(TOOL_XGCCAMD64LINUX_SUFFIX2) + +@@ -194,17 +195,21 @@ + # @param $(deps) Other dependencies. + # @param $(othersrc) Unhandled sources. + # @param $(outbase) Output basename (full). Use this for list files and such. +-TOOL_XGCCAMD64LINUX_LINK_LIBRARY_OUTPUT = $(out).ar-script ++TOOL_XGCCAMD64LINUX_LINK_LIBRARY_OUTPUT = + TOOL_XGCCAMD64LINUX_LINK_LIBRARY_DEPEND = $(othersrc) + TOOL_XGCCAMD64LINUX_LINK_LIBRARY_DEPORD = + define TOOL_XGCCAMD64LINUX_LINK_LIBRARY_CMDS +- $(QUIET)$(APPEND) $(out).ar-script 'CREATE $(out)' +- $(QUIET)$(APPEND) -n $(out).ar-script \ +- $(foreach o,$(objs), 'ADDMOD $(o)') \ +- $(foreach o,$(othersrc), 'ADDLIB $(o)') +- $(QUIET)$(APPEND) $(out).ar-script 'SAVE' +- $(QUIET)$(APPEND) $(out).ar-script 'END' +- $(QUIET)$(REDIRECT) -rti $(out).ar-script -- $(TOOL_XGCCAMD64LINUX_AR) -M ++ $(QUIET)$(TOOL_XGCCAMD64LINUX_AR) $(flags) $(out) $(objs) ++ $(foreach lib,$(othersrc)\ ++ ,$(NL)$(TAB)$(call MSG_AR_MERGE,$(target),$(out),$(lib)) \ ++ $(NL)$(TAB)$(QUIET)$(RM_EXT) -f $(dir $(outbase))ar.tmp.dir/* \ ++ $(NL)$(TAB)$(QUIET)$(MKDIR) -p $(dir $(outbase))/ar.tmp.dir/ \ ++ $(NL)$(TAB)$(QUIET)(cd $(dir $(outbase))ar.tmp.dir/ \ ++ && $(TOOL_XGCCAMD64LINUX_AR) x $(abspath $(lib)) \ ++ && $(TOOL_XGCCAMD64LINUX_AR) $(flags) $(out) *) \ ++ $(NL)$(TAB)$(QUIET)$(RM_EXT) -f $(dir $(outbase))/ar.tmp.dir/* \ ++ $(NL)$(TAB)$(QUIET)$(RMDIR) $(dir $(outbase))ar.tmp.dir/) ++ $(QUIET)$(TOOL_XGCCAMD64LINUX_RANLIB) $(out) + endef + + diff --git a/debian/patches/assert.patch b/debian/patches/assert.patch new file mode 100644 index 0000000..9376b6d --- /dev/null +++ b/debian/patches/assert.patch @@ -0,0 +1,18 @@ +Description: Use assert ehen kHlpAssertBreakpoint is not available +Author: Gianfranco Costamagna <locutusofborg@debian.org> +Last-Update: 2020-11-10 + +Index: kbuild/src/lib/kStuff/include/k/kHlpAssert.h +=================================================================== +--- kbuild.orig/src/lib/kStuff/include/k/kHlpAssert.h ++++ kbuild/src/lib/kStuff/include/k/kHlpAssert.h +@@ -60,7 +60,8 @@ + #elif defined(__GNUC__) && (K_ARCH == K_ARCH_SPARC_64) + # define kHlpAssertBreakpoint() do { __asm__ __volatile__ ("illtrap 0"); } while (0) /*??*/ + #else +-# error "Port Me" ++#include <assert.h> ++# define kHlpAssertBreakpoint(cond) assert(cond) + #endif + + /** @def K_FUNCTION diff --git a/debian/patches/build-fix b/debian/patches/build-fix new file mode 100644 index 0000000..5a28bea --- /dev/null +++ b/debian/patches/build-fix @@ -0,0 +1,22 @@ +Description: fix build by using the correct echo binary, not the builtin one. + Builtin echo does not escape regexes by default, so when mknodes generates nodes.c, a line such as: + TRACE2((psh, "copyfunc: %p - %u refs\n", n->pblock, refs)); K_NOREF(refs); + + gets translated into + TRACE2((psh, "copyfunc: %p - %u refs + ", n->pblock, refs)); K_NOREF(refs); + + making the program FTBFS. + This patch fixes the build failure. +Author: Gianfranco Costamagna <locutusofborg@debian.org> +--- kbuild-0.1.9998svn3489+dfsg.orig/src/kash/mknodes.sh ++++ kbuild-0.1.9998svn3489+dfsg/src/kash/mknodes.sh +@@ -224,7 +224,7 @@ while IFS=; read -r line; do + echo " };" + echo " new->type = n->type;" + ;; +- * ) echo "$line";; ++ * ) /bin/echo "$line";; + esac + done + diff --git a/debian/patches/do-not-build-docs.patch b/debian/patches/do-not-build-docs.patch new file mode 100644 index 0000000..bd3345a --- /dev/null +++ b/debian/patches/do-not-build-docs.patch @@ -0,0 +1,18 @@ +Description: Docs are non-DFSG +Author: Gianfranco Costamagna <locutusofborg@debian.org> + +Last-Update: 2019-01-07 + +diff --git a/src/kmk/configure.ac b/src/kmk/configure.ac +index 76a38a2..69b09c8 100644 +--- a/src/kmk/configure.ac ++++ b/src/kmk/configure.ac +@@ -513,7 +513,7 @@ AS_IF([test "x$make_cv_load" = xno && test "x$user_load" = xyes], + #AC_CONFIG_FILES([Makefile glob/Makefile po/Makefile.in config/Makefile \ + # doc/Makefile w32/Makefile tests/config-flags.pm]) + AC_CONFIG_FILES([Makefile glob/Makefile config/Makefile \ +- doc/Makefile w32/Makefile tests/config-flags.pm]) ++ w32/Makefile tests/config-flags.pm]) + + # OK, do it! + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..6ff8c8e --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,4 @@ +07_special-chars-build-path.diff +do-not-build-docs.patch +build-fix +assert.patch |