[Rpm-maint] [patch] rpm is not a cross-tool
Mark Hatle
mark.hatle at windriver.com
Mon Aug 6 14:02:21 UTC 2007
Umm... yes it is.
I use RPM to cross-compile software ever day. I also cross compile RPM
from one target to another routinely. You need to keep the $target
references or you will make the rpm.org version of RPM unable to be
cross compiled.
--Mark
Ralf Corsepius wrote:
> ... today's flood continues ...
>
> The patch below removes AC_CANONICAL_TARGET from configure.ac and
> changes $target to $host.
>
> Background: AC_CANONICAL_TARGET is supposed to take the target of a
> cross-tool, not the target of cross-compiling a package
> (== a configure script's --host).
>
> Older configure scripts often got this wrong - rpm's configure isn't an
> exception ;)
>
> Ralf
>
>
>
> ------------------------------------------------------------------------
>
> diff -r 98f1a954345f configure.ac
> --- a/configure.ac Mon Aug 06 14:24:29 2007 +0300
> +++ b/configure.ac Mon Aug 06 13:41:00 2007 +0200
> @@ -1,6 +1,6 @@ AC_PREREQ(2.61)
> AC_PREREQ(2.61)
> AC_INIT(rpm, 4.4.90, rpm-maint at lists.rpm.org)
> -AC_CANONICAL_TARGET
> +
> AC_CONFIG_SRCDIR([rpmqv.c])
> AM_CONFIG_HEADER([config.h])
>
> @@ -90,7 +90,7 @@ dnl
> dnl
> AC_MSG_CHECKING(flag used by libtool to link rpm)
> if test X"$GCC" = Xyes ; then
> - case "$target" in
> + case "$host" in
> *-*-linux*) LDFLAGS_STATIC="-all-static" ;;
> *-*-solaris*) LDFLAGS_STATIC="-static";;
> *-*-hpux*) LDFLAGS_STATIC="-static";;
> @@ -99,7 +99,7 @@ if test X"$GCC" = Xyes ; then
> *-*-*) LDFLAGS_STATIC="";;
> esac
> elif test X"$CC" = Xcc ; then
> - case "$target" in
> + case "$host" in
> *-*-linux*) LDFLAGS_STATIC="-all-static";;
> *-*-freebsd*) LDFLAGS_STATIC="-all-static";;
> *-*-osf*) LDFLAGS_STATIC="";; # OSF5 has no shared pthreads libs
> @@ -275,7 +275,7 @@ addlib() {
> addlib() {
> l=$1
> shift
> - case "$target" in
> + case "$host" in
> *-*-solaris*) LIBS="$LIBS -L$l -R$l $*";;
> *) LIBS="$LIBS -L$l $*";;
> esac
> @@ -611,7 +611,7 @@ AC_SUBST(DBLIBOBJS)
> AC_SUBST(DBLIBOBJS)
>
> dnl AmigaOS and IXEmul have a fork() dummy
> - case "$target" in
> + case "$host" in
> m68k-*-amigaos )
> echo "Building for AmigaOS: using vfork() instead of fork()";
> CFLAGS="$CFLAGS -Dfork=vfork"
> @@ -892,7 +892,7 @@ fi
>
> WITH_SELINUX_LIB=
> with_selinuxval=no
> -case "$target" in
> +case "$host" in
> *-*-linux*) with_selinuxval=yes ;;
> esac
> withval=${with_selinuxval}
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Rpm-maint mailing list
> Rpm-maint at lists.rpm.org
> https://lists.rpm.org/mailman/listinfo/rpm-maint
More information about the Rpm-maint
mailing list