Detect and use -gnueabi instead of -gnu on ARM as necessary.
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 6 Aug 2007 11:47:10 +0000 (14:47 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 6 Aug 2007 11:47:10 +0000 (14:47 +0300)
Patch from Lennert Buytenhek.
(transplanted from f0a6328331a5d017d89c96fe8cf5d8249dde09b5)

configure.ac
macros.in

index 7e696e9..5ff5611 100644 (file)
@@ -1132,11 +1132,13 @@ fi
 #
 # get rid of the 4-th tuple, if config.guess returned "linux-gnu" for build_os
 #
+build_os_gnu=-gnu
 if echo "$build_os" | grep '.*-gnulibc1' > /dev/null ; then
        build_os=`echo "${build_os}" | sed 's/-gnulibc1$//'`
 fi
 if echo "$build_os" | grep '.*-gnueabi' > /dev/null ; then
        build_os=`echo "${build_os}" | sed 's/-gnueabi$//'`
+       build_os_gnu=-gnueabi
 fi
 if echo "$build_os" | grep '.*-gnu' > /dev/null ; then
        build_os=`echo "${build_os}" | sed 's/-gnu$//'`
@@ -1231,12 +1233,14 @@ unknown|pc|ibm|redhat|pld|mandrake|conectiva|lvr|yellowdog|caos)
        ;;
 esac
 RPMCANONOS="$build_os_noversion"
+RPMCANONGNU="$build_os_gnu"
 AC_SUBST(RPMCANONCOLOR)
 AC_SUBST(autorelocate_path)
 AC_SUBST(autorelocate_dcolor)
 AC_SUBST(RPMCANONARCH)
 AC_SUBST(RPMCANONVENDOR)
 AC_SUBST(RPMCANONOS)
+AC_SUBST(RPMCANONGNU)
 
 if test X"$prefix" = XNONE ; then
     usrprefix="$ac_default_prefix"
index ba401c6..533b281 100644 (file)
--- a/macros.in
+++ b/macros.in
@@ -819,7 +819,7 @@ print (t)\
 %_build_arch           @RPMCANONARCH@
 %_vendor               @RPMCANONVENDOR@
 %_os                   @RPMCANONOS@
-%_gnu                  -gnu
+%_gnu                  @RPMCANONGNU@
 %_target_platform      %{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu}
 
 #