summaryrefslogtreecommitdiff
path: root/dev-build/kbuild/files
diff options
context:
space:
mode:
Diffstat (limited to 'dev-build/kbuild/files')
-rw-r--r--dev-build/kbuild/files/kbuild-0.1.5-gentoo-docdir.patch11
-rw-r--r--dev-build/kbuild/files/kbuild-0.1.9998.3407-gold.patch11
-rw-r--r--dev-build/kbuild/files/kbuild-0.1.9998.3407-unknown_configure_opt.patch20
-rw-r--r--dev-build/kbuild/files/kbuild-0.1.9998.3499-fix-CC.patch23
-rw-r--r--dev-build/kbuild/files/kbuild-0.1.9998.3499-gold.patch15
-rw-r--r--dev-build/kbuild/files/kbuild-0.1.9998.3499-implicit-function-declaration.patch74
-rw-r--r--dev-build/kbuild/files/kbuild-0.1.9998.3499-int-conversion.patch26
-rw-r--r--dev-build/kbuild/files/kbuild-0.1.9998.3499-kash-no_separate_parser_allocator.patch11
-rw-r--r--dev-build/kbuild/files/kbuild-0.1.9998.3572-fix-bison.patch15
-rw-r--r--dev-build/kbuild/files/kbuild-0.1.9998.3572-fix-lto.patch11
-rw-r--r--dev-build/kbuild/files/kbuild-0.1.9998_pre20110817-kash-link-pthread.patch10
-rw-r--r--dev-build/kbuild/files/kbuild-0.1.9998_pre20120806-qa.patch13
12 files changed, 240 insertions, 0 deletions
diff --git a/dev-build/kbuild/files/kbuild-0.1.5-gentoo-docdir.patch b/dev-build/kbuild/files/kbuild-0.1.5-gentoo-docdir.patch
new file mode 100644
index 000000000000..b074a984af4c
--- /dev/null
+++ b/dev-build/kbuild/files/kbuild-0.1.5-gentoo-docdir.patch
@@ -0,0 +1,11 @@
+--- a/Config.kmk
++++ b/Config.kmk
+@@ -147,7 +147,7 @@
+ MY_INST_DATA := $(MY_INST_ROOT)share/kBuild/
+ endif
+ ifndef MY_INST_DOC
+- MY_INST_DOC := $(MY_INST_ROOT)share/doc/kBuild-$(KBUILD_VERSION)/
++ MY_INST_DOC := $(MY_INST_ROOT)share/doc/$(PF)/
+ endif
+ if !defined(MY_INST_BIN_MODE) && defined(MY_INST_MODE)
+ MY_INST_BIN_MODE := $(MY_INST_MODE),a+x
diff --git a/dev-build/kbuild/files/kbuild-0.1.9998.3407-gold.patch b/dev-build/kbuild/files/kbuild-0.1.9998.3407-gold.patch
new file mode 100644
index 000000000000..14d5ec7cc422
--- /dev/null
+++ b/dev-build/kbuild/files/kbuild-0.1.9998.3407-gold.patch
@@ -0,0 +1,11 @@
+--- kbuild-0.1.9998.3407/src/kmk/Makefile.kmk
++++ kbuild-0.1.9998.3407/src/kmk/Makefile.kmk
+@@ -60,7 +60,7 @@
+ ifneq ($(KBUILD_TARGET),os2)
+ TEMPLATE_BIN-KMK_INCS += glob
+ endif
+-TEMPLATE_BIN-KMK_LIBS = $(LIB_KUTIL) $(TEMPLATE_BIN-THREADED_LIBS) $(kmkmissing_1_TARGET) $(LIB_KUTIL)
++TEMPLATE_BIN-KMK_LIBS = $(LIB_KUTIL) $(TEMPLATE_BIN-THREADED_LIBS) $(kmkmissing_1_TARGET) $(LIB_KUTIL) pthread
+ ifdef ELECTRIC_HEAP # for electric heap (see electric.c).
+ ifeq ($(KBUILD_TARGET),win)
+ TEMPLATE_BIN-KMK_CFLAGS = $(TEMPLATE_BIN-THREADED_CFLAGS) /FI$(kmk_DEFPATH)/electric.h -DELECTRIC_HEAP=1
diff --git a/dev-build/kbuild/files/kbuild-0.1.9998.3407-unknown_configure_opt.patch b/dev-build/kbuild/files/kbuild-0.1.9998.3407-unknown_configure_opt.patch
new file mode 100644
index 000000000000..2714716b7806
--- /dev/null
+++ b/dev-build/kbuild/files/kbuild-0.1.9998.3407-unknown_configure_opt.patch
@@ -0,0 +1,20 @@
+--- kbuild-0.1.9998.3407/bootstrap.gmk
++++ kbuild-0.1.9998.3407/bootstrap.gmk
+@@ -151,7 +151,7 @@
+ $(OUTDIR)/kmk/ts-configured: \
+ $(OUTDIR)/kmk/ts-autoreconf \
+ $(OUTDIR)/kmk/fts.h
+- cd $(OUTDIR)/kmk && $(SRCDIR)/src/kmk/configure --disable-load --without-guile
++ cd $(OUTDIR)/kmk && $(SRCDIR)/src/kmk/configure --disable-load
+ echo done > $@
+
+ ifeq ($(KBUILD_HOST),solaris)
+@@ -182,7 +182,7 @@
+ echo done > $@
+
+ $(OUTDIR)/sed/ts-configured: $(OUTDIR)/sed/ts-autoreconf
+- cd $(OUTDIR)/sed && $(SRCDIR)/src/sed/configure --without-libintl --disable-nls
++ cd $(OUTDIR)/sed && $(SRCDIR)/src/sed/configure --disable-nls
+ echo done > $@
+
+ $(OUTDIR)/sed/config.h: $(OUTDIR)/sed/ts-configured
diff --git a/dev-build/kbuild/files/kbuild-0.1.9998.3499-fix-CC.patch b/dev-build/kbuild/files/kbuild-0.1.9998.3499-fix-CC.patch
new file mode 100644
index 000000000000..7d7f1f7232eb
--- /dev/null
+++ b/dev-build/kbuild/files/kbuild-0.1.9998.3499-fix-CC.patch
@@ -0,0 +1,23 @@
+A few files are compiled with gcc regardless of setting CC
+
+This file seems to do some guesswork, override it with CC if set
+
+Bug: https://bugs.gentoo.org/734302
+
+--- a/kBuild/tools/GCC3.kmk
++++ b/kBuild/tools/GCC3.kmk
+@@ -84,6 +84,14 @@
+ TOOL_GCC3_CXX += -fmessage-length=0
+ endif
+
++ifneq ($(CC),)
++ TOOL_GCC3_CC = $(CC)
++ TOOL_GCC3_LD = $(CC)
++endif
++ifneq ($(AR),)
++ TOOL_GCC3_AR = $(AR)
++endif
++
+ # General Properties used by kBuild
+ TOOL_GCC3_COBJSUFF ?= .o
+ TOOL_GCC3_CFLAGS ?=
diff --git a/dev-build/kbuild/files/kbuild-0.1.9998.3499-gold.patch b/dev-build/kbuild/files/kbuild-0.1.9998.3499-gold.patch
new file mode 100644
index 000000000000..ee870da2ee55
--- /dev/null
+++ b/dev-build/kbuild/files/kbuild-0.1.9998.3499-gold.patch
@@ -0,0 +1,15 @@
+--- kbuild-0.1.9998.3499/src/kmk/Makefile.kmk
++++ kbuild-0.1.9998.3499/src/kmk/Makefile.kmk
+@@ -60,9 +60,9 @@
+ ifneq ($(KBUILD_TARGET),os2)
+ TEMPLATE_BIN-KMK_INCS += glob
+ endif
+-TEMPLATE_BIN-KMK_LIBS = $(LIB_KUTIL) $(TEMPLATE_BIN-THREADED_LIBS) $(kmkmissing_1_TARGET) $(LIB_KUTIL)
+-TEMPLATE_BIN-KMK_LIBS.x86 = $(LIB_KUTIL) $(TEMPLATE_BIN-THREADED_LIBS.x86)
+-TEMPLATE_BIN-KMK_LIBS.amd64 = $(LIB_KUTIL) $(TEMPLATE_BIN-THREADED_LIBS.amd64)
++TEMPLATE_BIN-KMK_LIBS = $(LIB_KUTIL) $(TEMPLATE_BIN-THREADED_LIBS) $(kmkmissing_1_TARGET) $(LIB_KUTIL) pthread
++TEMPLATE_BIN-KMK_LIBS.x86 = $(LIB_KUTIL) $(TEMPLATE_BIN-THREADED_LIBS.x86) pthread
++TEMPLATE_BIN-KMK_LIBS.amd64 = $(LIB_KUTIL) $(TEMPLATE_BIN-THREADED_LIBS.amd64) pthread
+ ifdef ELECTRIC_HEAP # for electric heap (see electric.c).
+ ifeq ($(KBUILD_TARGET),win)
+ TEMPLATE_BIN-KMK_CFLAGS = $(TEMPLATE_BIN-THREADED_CFLAGS) /FI$(kmk_DEFPATH)/electric.h -DELECTRIC_HEAP=1
diff --git a/dev-build/kbuild/files/kbuild-0.1.9998.3499-implicit-function-declaration.patch b/dev-build/kbuild/files/kbuild-0.1.9998.3499-implicit-function-declaration.patch
new file mode 100644
index 000000000000..2d25eacb9826
--- /dev/null
+++ b/dev-build/kbuild/files/kbuild-0.1.9998.3499-implicit-function-declaration.patch
@@ -0,0 +1,74 @@
+Add a few includes to fix this warning: -Wimplicit-function-declaration
+Bug: https://bugs.gentoo.org/882143
+
+--- a/src/sed/lib/utils.c
++++ b/src/sed/lib/utils.c
+@@ -27,7 +27,8 @@
+
+ #ifdef HAVE_STRINGS_H
+ # include <strings.h>
+-#else
++#endif
++#ifdef HAVE_STRING_H
+ # include <string.h>
+ #endif /* HAVE_STRINGS_H */
+
+--- a/src/sed/sed/execute.c
++++ b/src/sed/sed/execute.c
+@@ -46,7 +46,8 @@
+
+ #ifdef HAVE_STRINGS_H
+ # include <strings.h>
+-#else
++#endif
++#ifdef HAVE_STRING_H
+ # include <string.h>
+ #endif /*HAVE_STRINGS_H*/
+ #ifdef HAVE_MEMORY_H
+--- a/src/sed/sed/fmt.c
++++ b/src/sed/sed/fmt.c
+@@ -22,6 +22,7 @@
+ #include <stdio.h>
+ #include <ctype.h>
+ #include <sys/types.h>
++#include <string.h>
+
+ #if HAVE_LIMITS_H
+ # include <limits.h>
+--- a/src/sed/sed/mbcs.c
++++ b/src/sed/sed/mbcs.c
+@@ -17,6 +17,7 @@
+
+ #include "sed.h"
+ #include <stdlib.h>
++#include <string.h>
+
+ int mb_cur_max;
+
+--- a/src/sed/sed/regexp.c
++++ b/src/sed/sed/regexp.c
+@@ -22,6 +22,9 @@
+ #ifdef HAVE_STDLIB_H
+ # include <stdlib.h>
+ #endif
++#ifdef HAVE_STRING_H
++# include <string.h>
++#endif
+
+ #ifdef gettext_noop
+ # define N_(String) gettext_noop(String)
+--- a/src/sed/sed/sed.c
++++ b/src/sed/sed/sed.c
+@@ -26,9 +26,10 @@
+ #include <stdio.h>
+ #ifdef HAVE_STRINGS_H
+ # include <strings.h>
+-#else
+-# include <string.h>
+ #endif /*HAVE_STRINGS_H*/
++#ifdef HAVE_STRING_H
++# include <string.h>
++#endif /*HAVE_STRING_H*/
+ #ifdef HAVE_MEMORY_H
+ # include <memory.h>
+ #endif
diff --git a/dev-build/kbuild/files/kbuild-0.1.9998.3499-int-conversion.patch b/dev-build/kbuild/files/kbuild-0.1.9998.3499-int-conversion.patch
new file mode 100644
index 000000000000..6afdeeb6e7a6
--- /dev/null
+++ b/dev-build/kbuild/files/kbuild-0.1.9998.3499-int-conversion.patch
@@ -0,0 +1,26 @@
+Fix int to pointer conversion for clang
+
+Note - this parameter was not actually used inside eval_buffer because of a define.
+
+Bug: https://bugs.gentoo.org/875449
+
+--- a/src/kmk/loadapi.c
++++ b/src/kmk/loadapi.c
+@@ -20,6 +20,8 @@
+ #include "variable.h"
+ #include "dep.h"
+
++#include <string.h>
++
+ /* Allocate a buffer in our context, so we can free it. */
+ char *
+ gmk_alloc (unsigned int len)
+@@ -59,7 +61,7 @@
+ install_variable_buffer (&pbuf, &plen);
+
+ s = xstrdup (buffer);
+- eval_buffer (s, flp IF_WITH_VALUE_LENGTH_PARAM (strlen (s) /** @todo suboptimal */));
++ eval_buffer (s, flp IF_WITH_VALUE_LENGTH_PARAM (strchr (s, 0) /** @todo suboptimal */));
+ free (s);
+
+ restore_variable_buffer (pbuf, plen);
diff --git a/dev-build/kbuild/files/kbuild-0.1.9998.3499-kash-no_separate_parser_allocator.patch b/dev-build/kbuild/files/kbuild-0.1.9998.3499-kash-no_separate_parser_allocator.patch
new file mode 100644
index 000000000000..24265b96e137
--- /dev/null
+++ b/dev-build/kbuild/files/kbuild-0.1.9998.3499-kash-no_separate_parser_allocator.patch
@@ -0,0 +1,11 @@
+--- kbuild-0.1.9998.3499/src/kash/Makefile.kmk
++++ kbuild-0.1.9998.3499/src/kash/Makefile.kmk
+@@ -35,7 +35,7 @@
+ kash_TEMPLATE = BIN-THREADED
+ kash_NAME = kmk_ash
+ kash_ASTOOL = YASM
+-kash_DEFS = lint SHELL SMALL KASH_SEPARATE_PARSER_ALLOCATOR
++kash_DEFS = lint SHELL SMALL
+ if "$(KBUILD_TARGET)" != "win" || defined(KASH_WIN_FORKED_MODE)
+ kash_DEFS += SH_FORKED_MODE
+ else
diff --git a/dev-build/kbuild/files/kbuild-0.1.9998.3572-fix-bison.patch b/dev-build/kbuild/files/kbuild-0.1.9998.3572-fix-bison.patch
new file mode 100644
index 000000000000..822194b1c98b
--- /dev/null
+++ b/dev-build/kbuild/files/kbuild-0.1.9998.3572-fix-bison.patch
@@ -0,0 +1,15 @@
+--- a/src/kash/Makefile.kmk 2022-11-12 16:42:14.195927909 +0200
++++ b/src/kash/Makefile.kmk 2022-11-12 17:09:46.212159615 +0200
+@@ -210,8 +210,11 @@
+ kash_USES = lex yacc
+ kash_LEXTOOL = FLEX
+ kash_LEXFLAGS = -8
+-#kash_YACCTOOL = BISON
++ifneq (,$(shell bison -V))
++kash_YACCTOOL = BISON
++else
+ kash_YACCTOOL = YACC
++endif
+ kash_YACCFLAGS = -ld
+ kash_SOURCES += \
+ arith.y \
diff --git a/dev-build/kbuild/files/kbuild-0.1.9998.3572-fix-lto.patch b/dev-build/kbuild/files/kbuild-0.1.9998.3572-fix-lto.patch
new file mode 100644
index 000000000000..94eb14ee6cb6
--- /dev/null
+++ b/dev-build/kbuild/files/kbuild-0.1.9998.3572-fix-lto.patch
@@ -0,0 +1,11 @@
+--- a/src/kmk/remake.c
++++ b/src/kmk/remake.c
+@@ -417,7 +417,7 @@
+ if (!keep_going_flag && file->parent == 0)
+ {
+ const char *msg_joke = 0;
+- extern struct dep *goals;
++ extern struct goaldep *goals;
+
+ /* classics */
+ if (!strcmp (file->name, "fire")
diff --git a/dev-build/kbuild/files/kbuild-0.1.9998_pre20110817-kash-link-pthread.patch b/dev-build/kbuild/files/kbuild-0.1.9998_pre20110817-kash-link-pthread.patch
new file mode 100644
index 000000000000..d2b20176ca82
--- /dev/null
+++ b/dev-build/kbuild/files/kbuild-0.1.9998_pre20110817-kash-link-pthread.patch
@@ -0,0 +1,10 @@
+--- kBuild-0.1.9998-pre20110817/src/kash/Makefile.kmk
++++ kBuild-0.1.9998-pre20110817/src/kash/Makefile.kmk
+@@ -59,6 +59,7 @@
+ if "$(USER)" == "bird" && "$(KBUILD_TARGET)" != "win"
+ kash_CFLAGS += -std=gnu99
+ endif
++kash_LIBS += pthread
+ kash_CFLAGS.win.amd64 = -GS-
+ kash_SOURCES = \
+ main.c \
diff --git a/dev-build/kbuild/files/kbuild-0.1.9998_pre20120806-qa.patch b/dev-build/kbuild/files/kbuild-0.1.9998_pre20120806-qa.patch
new file mode 100644
index 000000000000..9b0df4204e35
--- /dev/null
+++ b/dev-build/kbuild/files/kbuild-0.1.9998_pre20120806-qa.patch
@@ -0,0 +1,13 @@
+--- kBuild-0.1.9998-pre20120806/src/sed/lib/utils.c
++++ kBuild-0.1.9998-pre20120806/src/sed/lib/utils.c
+@@ -35,6 +35,10 @@
+ # include <stdlib.h>
+ #endif /* HAVE_STDLIB_H */
+
++#ifdef HAVE_UNISTD_H
++# include <unistd.h>
++#endif /* HAVE_UNISTD_H */
++
+ #include "utils.h"
+
+ const char *myname;