genode/repos/ports/src/noux-pkg/bash/build.patch

86 lines
2.5 KiB
Diff

From 09d2a5728b640e264d27457a7abd12abf446ef0b Mon Sep 17 00:00:00 2001
From: Hinnerk van Bruinehsen <h.v.bruinehsen@fu-berlin.de>
Date: Thu, 13 Oct 2016 17:40:40 +0200
Subject: [PATCH 1/2] build
---
Makefile.in | 2 +-
builtins/Makefile.in | 2 +-
configure | 2 +-
lib/intl/l10nflist.c | 2 +-
shell.c | 6 ++++++
5 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index c7b62bc..7480326 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -802,7 +802,7 @@ install: .made installdirs
-( cd $(LOADABLES_DIR) && $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ )
install-strip:
- $(MAKE) $(MFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
+ $(MAKE) $(MFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s --strip-program=$(STRIP)' \
prefix=${prefix} exec_prefix=${exec_prefix} \
DESTDIR=$(DESTDIR) install
diff --git a/builtins/Makefile.in b/builtins/Makefile.in
index bbb96c3..f48fb77 100644
--- a/builtins/Makefile.in
+++ b/builtins/Makefile.in
@@ -69,7 +69,7 @@ LIBS = @LIBS@
LDFLAGS = @LDFLAGS@ $(LOCAL_LDFLAGS) $(CFLAGS)
LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ $(LOCAL_LDFLAGS) $(CFLAGS_FOR_BUILD)
LOCAL_LDFLAGS = @LOCAL_LDFLAGS@
-LIBS_FOR_BUILD = @LIBS_FOR_BUILD@
+#LIBS_FOR_BUILD = @LIBS_FOR_BUILD@
#LIBS_FOR_BUILD = $(LIBS)
BASHINCDIR = ${topdir}/include
diff --git a/configure b/configure
index 60f86d6..3399a33 100755
--- a/configure
+++ b/configure
@@ -14644,7 +14644,7 @@ else
if test "$cross_compiling" = yes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&5
$as_echo "$as_me: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&2;}
- bash_cv_getcwd_malloc=no
+ bash_cv_getcwd_malloc=yes
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
diff --git a/lib/intl/l10nflist.c b/lib/intl/l10nflist.c
index 4ce284a..d7e4123 100644
--- a/lib/intl/l10nflist.c
+++ b/lib/intl/l10nflist.c
@@ -33,7 +33,7 @@
#include <string.h>
#if defined _LIBC || defined HAVE_ARGZ_H
-# include <argz.h>
+//# include <argz.h>
#endif
#include <ctype.h>
#include <sys/types.h>
diff --git a/shell.c b/shell.c
index 45b77f9..ddf0e66 100644
--- a/shell.c
+++ b/shell.c
@@ -379,6 +379,12 @@ main (argc, argv, env)
env = environ;
#endif /* __OPENNT */
+ /*
+ * Noux: Overcome missing declaration of 'env' that gets tiggered by the
+ * 'NO_MAIN_ENV_ARG' definition.
+ */
+ char **env = environ;
+
USE_VAR(argc);
USE_VAR(argv);
USE_VAR(env);
--
2.10.1