tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bmake's shell is always /bin/sh?
Hi,
How to change the shell invoked from bmake?
I am working on bootstrapping pkgsrc under Xinuos SCO OpenServer 5.0.7/3.2.
/bin/sh of this OS is broken and bmake tests cannot start.
And it seems that its /bin/sh cannot handle return value of command correctly,
and I cannot set the output of "uname -s" to bmake variable. So bypassing
bmake test is not available.
/bin/sh is symlink to /opt/K/SCO/Unix/5.0.7Hw/bin/sh, if this symlink is
changed to ksh (/opt/K/SCO/Unix/5.0.7Hw/bin/ksh), all bmake tests passed.
Of course bmake needs some patches, they are attached. And I believe
the patches are not related to this problem.
I am using the following command,
$ PATH=$HOME/tools2/bin:$PATH SH=/bin/ksh ./bootstrap --workdir /tmp/bs
--unprivileged
In $HOME/tools2, I have gcc-2.95.3pl4 (released by Caldera, built by me) and
binutils-2.14.0.
I have specified SH=/bin/ksh as bootstrap shell, but the shell is not
used for bmake tests.
I have checked the following things.
(1) Run SH=/bin/ksh ./bootstrap ... fails
(2) Invoke SH=(non-/bin/sh) ./bootstrap from bash-3.1 (in OpenServer base) ...
fails
(3) Invoke SH=(non-/bin/sh) ./bootstrap from bash-4.2 (it is built by me) ...
fails
(4) change login shell to /bin/ksh, bash-3.1, and bash-4.2 ... all fail
(5) replace /bin/sh with /bin/ksh ... success
How to change the shell invoked from bmake from /bin/sh?
If I can change the shell invoked from bmake to /bin/ksh,
bootstrapping pkgsrc's bmake part may be finished.
Thank you.
--
Ryo ONODERA // ryo_on%yk.rim.or.jp@localhost
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3
Index: files/configure
* Try to disable optimization tempolary.
===================================================================
RCS file: /cvsroot/pkgsrc/devel/bmake/files/configure,v
retrieving revision 1.14
diff -u -r1.14 configure
--- files/configure 26 Feb 2013 00:51:02 -0000 1.14
+++ files/configure 9 Feb 2014 10:41:41 -0000
@@ -3032,13 +3032,13 @@
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
- CFLAGS="-g -O2"
+ CFLAGS="-g"
else
CFLAGS="-g"
fi
else
if test "$GCC" = yes; then
- CFLAGS="-O2"
+ CFLAGS=
else
CFLAGS=
fi
@@ -4030,13 +4030,13 @@
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
- CFLAGS="-g -O2"
+ CFLAGS="-g"
else
CFLAGS="-g"
fi
else
if test "$GCC" = yes; then
- CFLAGS="-O2"
+ CFLAGS=
else
CFLAGS=
fi
Index: files/dir.h
* OpenServer's dirent.h defines _DIR. I cannot change system's header.
===================================================================
RCS file: /cvsroot/pkgsrc/devel/bmake/files/dir.h,v
retrieving revision 1.3
diff -u -r1.3 dir.h
--- files/dir.h 18 Sep 2009 21:27:25 -0000 1.3
+++ files/dir.h 9 Feb 2014 10:41:41 -0000
@@ -75,8 +75,8 @@
/* dir.h --
*/
-#ifndef _DIR
-#define _DIR
+#ifndef _DIR_H
+#define _DIR_H
typedef struct Path {
char *name; /* Name of directory */
@@ -105,4 +105,4 @@
void Dir_Destroy(void *);
void * Dir_CopyDir(void *);
-#endif /* _DIR */
+#endif /* _DIR_H */
Index: files/machine.sh
* Add OpenServer5 support
===================================================================
RCS file: /cvsroot/pkgsrc/devel/bmake/files/machine.sh,v
retrieving revision 1.9
diff -u -r1.9 machine.sh
--- files/machine.sh 8 Sep 2013 16:32:14 -0000 1.9
+++ files/machine.sh 9 Feb 2014 10:41:41 -0000
@@ -93,6 +93,11 @@
FreeMiNT)
MACHINE_ARCH=m68k
;;
+SCO_SV)
+ OSREL=`uname -v`
+ OSMAJOR=`IFS=.; set $OSREL; echo $1`
+ MACHINE_ARCH=`uname -m`
+ ;;
esac
MACHINE=${MACHINE:-$OS$OSMAJOR}
Index: files/make.h
* I do not know the other OS that has PATH_MAX now.
===================================================================
RCS file: /cvsroot/pkgsrc/devel/bmake/files/make.h,v
retrieving revision 1.6
diff -u -r1.6 make.h
--- files/make.h 18 Jun 2011 22:39:46 -0000 1.6
+++ files/make.h 9 Feb 2014 10:41:41 -0000
@@ -98,6 +98,17 @@
#include <unistd.h>
#include <sys/cdefs.h>
+/*
+ * SCO OpenServer 5.0.7/3.2 has no MAXPATHLEN, but it has PATH_MAX (256).
+ * in limits.h. PATH_MAX is defined alternatively under non-OpenServer OS,
+ * and it is used in dirname.c of bmake.
+ */
+#if !defined(MAXPATHLEN)
+#if defined(_SCO_DS)
+#define MAXPATHLEN 256
+#endif
+#endif
+
#if !defined(__GNUC_PREREQ__)
#if defined(__GNUC__)
#define __GNUC_PREREQ__(x, y)
\
Index: files/os.sh
* Add OpenServer5 support.
===================================================================
RCS file: /cvsroot/pkgsrc/devel/bmake/files/os.sh,v
retrieving revision 1.9
diff -u -r1.9 os.sh
--- files/os.sh 8 Sep 2013 16:32:14 -0000 1.9
+++ files/os.sh 9 Feb 2014 10:41:41 -0000
@@ -201,6 +201,11 @@
FreeMiNT)
MACHINE_ARCH=m68k
;;
+SCO_SV)
+ OSREL=`uname -v`
+ OSMAJOR=`IFS=.; set $OSREL; echo $1`
+ MACHINE_ARCH=`uname -m`
+ ;;
esac
HOSTNAME=${HOSTNAME:-`( hostname ) 2>/dev/null`}
Home |
Main Index |
Thread Index |
Old Index