[
https://issues.apache.org/jira/browse/DAEMON-91?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Emmanuel Bourg updated DAEMON-91:
---------------------------------
Description:
The CPU detection in src/native/unix/support/apsupport.m4 is broken. Based on
the $host_cpu variable, it tries to guess the operating system. This is
completely wrong since several operating systems can run on the same
architecture.
For Debian GNU/Linux we had to apply the following patch. In general, the best
would be to let autoconf determine the CPU type and not touch it at all, except
in exceptional cases.
{code}
Index: src/native/unix/support/apsupport.m4
===================================================================
--- src/native/unix/support/apsupport.m4 (revision 2799)
+++ src/native/unix/support/apsupport.m4 (revision 2800)
@@ -70,12 +70,6 @@
;;
esac
case $host_cpu in
- powerpc)
- CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\""
- HOST_CPU=$host_cpu;;
- sparc*)
- CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\""
- HOST_CPU=$host_cpu;;
i?86)
CFLAGS="$CFLAGS -DCPU=\\\"i386\\\""
HOST_CPU=i386;;
@@ -89,13 +83,8 @@
LIBS="$LIBS -lBLSLIB"
LDCMD="/opt/C/bin/cc"
HOST_CPU=osd;;
- mips)
- CFLAGS="$CFLAGS -DCPU=\\\"mips\\\""
- supported_os="mips"
- HOST_CPU=mips;;
alpha*)
CFLAGS="$CFLAGS -DCPU=\\\"alpha\\\""
- supported_os="alpha"
HOST_CPU=alpha;;
hppa2.0w)
CFLAGS="$CFLAGS -DCPU=\\\"PA_RISC2.0W\\\""
@@ -105,18 +94,9 @@
CFLAGS="$CFLAGS -DCPU=\\\"PA_RISC2.0\\\""
supported_os="hp-ux"
HOST_CPU=PA_RISC2.0;;
- mipsel)
- CFLAGS="$CFLAGS -DCPU=\\\"mipsel\\\""
- supported_os="mipsel"
- HOST_CPU=mipsel;;
- ia64)
- CFLAGS="$CFLAGS -DCPU=\\\"ia64\\\""
- supported_os="ia64"
- HOST_CPU=ia64;;
- s390)
- CFLAGS="$CFLAGS -DCPU=\\\"s390\\\""
- supported_os="s390"
- HOST_CPU=s390;;
+ arm|hppa|ia64|m68k|mips|mipsel|powerpc*|s390|sparc*)
+ CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\""
+ HOST_CPU=$host_cpu;;
*)
AC_MSG_RESULT([failed])
AC_MSG_ERROR([Unsupported CPU architecture "$host_cpu"]);;
{code}
was:
The CPU detection in src/native/unix/support/apsupport.m4 is broken. Based on
the $host_cpu variable, it tries to guess the operating system. This is
completely wrong since several operating systems can run on the same
architecture.
For Debian GNU/Linux we had to apply the following patch. In general, the best
would be to let autoconf determine the CPU type and not touch it at all, except
in exceptional cases.
Index: src/native/unix/support/apsupport.m4
===================================================================
--- src/native/unix/support/apsupport.m4 (revision 2799)
+++ src/native/unix/support/apsupport.m4 (revision 2800)
@@ -70,12 +70,6 @@
;;
esac
case $host_cpu in
- powerpc)
- CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\""
- HOST_CPU=$host_cpu;;
- sparc*)
- CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\""
- HOST_CPU=$host_cpu;;
i?86)
CFLAGS="$CFLAGS -DCPU=\\\"i386\\\""
HOST_CPU=i386;;
@@ -89,13 +83,8 @@
LIBS="$LIBS -lBLSLIB"
LDCMD="/opt/C/bin/cc"
HOST_CPU=osd;;
- mips)
- CFLAGS="$CFLAGS -DCPU=\\\"mips\\\""
- supported_os="mips"
- HOST_CPU=mips;;
alpha*)
CFLAGS="$CFLAGS -DCPU=\\\"alpha\\\""
- supported_os="alpha"
HOST_CPU=alpha;;
hppa2.0w)
CFLAGS="$CFLAGS -DCPU=\\\"PA_RISC2.0W\\\""
@@ -105,18 +94,9 @@
CFLAGS="$CFLAGS -DCPU=\\\"PA_RISC2.0\\\""
supported_os="hp-ux"
HOST_CPU=PA_RISC2.0;;
- mipsel)
- CFLAGS="$CFLAGS -DCPU=\\\"mipsel\\\""
- supported_os="mipsel"
- HOST_CPU=mipsel;;
- ia64)
- CFLAGS="$CFLAGS -DCPU=\\\"ia64\\\""
- supported_os="ia64"
- HOST_CPU=ia64;;
- s390)
- CFLAGS="$CFLAGS -DCPU=\\\"s390\\\""
- supported_os="s390"
- HOST_CPU=s390;;
+ arm|hppa|ia64|m68k|mips|mipsel|powerpc*|s390|sparc*)
+ CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\""
+ HOST_CPU=$host_cpu;;
*)
AC_MSG_RESULT([failed])
AC_MSG_ERROR([Unsupported CPU architecture "$host_cpu"]);;
> please support more architectures
> ---------------------------------
>
> Key: DAEMON-91
> URL: https://issues.apache.org/jira/browse/DAEMON-91
> Project: Commons Daemon
> Issue Type: Bug
> Affects Versions: Nightly Builds
> Environment: Linux (arm, hppa, m68k, mips, mipsel, s390, ia64)
> Reporter: Marcus Better
> Fix For: 1.0.2
>
>
> The CPU detection in src/native/unix/support/apsupport.m4 is broken. Based on
> the $host_cpu variable, it tries to guess the operating system. This is
> completely wrong since several operating systems can run on the same
> architecture.
> For Debian GNU/Linux we had to apply the following patch. In general, the
> best would be to let autoconf determine the CPU type and not touch it at all,
> except in exceptional cases.
> {code}
> Index: src/native/unix/support/apsupport.m4
> ===================================================================
> --- src/native/unix/support/apsupport.m4 (revision 2799)
> +++ src/native/unix/support/apsupport.m4 (revision 2800)
> @@ -70,12 +70,6 @@
> ;;
> esac
> case $host_cpu in
> - powerpc)
> - CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\""
> - HOST_CPU=$host_cpu;;
> - sparc*)
> - CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\""
> - HOST_CPU=$host_cpu;;
> i?86)
> CFLAGS="$CFLAGS -DCPU=\\\"i386\\\""
> HOST_CPU=i386;;
> @@ -89,13 +83,8 @@
> LIBS="$LIBS -lBLSLIB"
> LDCMD="/opt/C/bin/cc"
> HOST_CPU=osd;;
> - mips)
> - CFLAGS="$CFLAGS -DCPU=\\\"mips\\\""
> - supported_os="mips"
> - HOST_CPU=mips;;
> alpha*)
> CFLAGS="$CFLAGS -DCPU=\\\"alpha\\\""
> - supported_os="alpha"
> HOST_CPU=alpha;;
> hppa2.0w)
> CFLAGS="$CFLAGS -DCPU=\\\"PA_RISC2.0W\\\""
> @@ -105,18 +94,9 @@
> CFLAGS="$CFLAGS -DCPU=\\\"PA_RISC2.0\\\""
> supported_os="hp-ux"
> HOST_CPU=PA_RISC2.0;;
> - mipsel)
> - CFLAGS="$CFLAGS -DCPU=\\\"mipsel\\\""
> - supported_os="mipsel"
> - HOST_CPU=mipsel;;
> - ia64)
> - CFLAGS="$CFLAGS -DCPU=\\\"ia64\\\""
> - supported_os="ia64"
> - HOST_CPU=ia64;;
> - s390)
> - CFLAGS="$CFLAGS -DCPU=\\\"s390\\\""
> - supported_os="s390"
> - HOST_CPU=s390;;
> + arm|hppa|ia64|m68k|mips|mipsel|powerpc*|s390|sparc*)
> + CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\""
> + HOST_CPU=$host_cpu;;
> *)
> AC_MSG_RESULT([failed])
> AC_MSG_ERROR([Unsupported CPU architecture "$host_cpu"]);;
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira