Bug 2487 - Configure fails always related to binutils .machine altivec test
Summary: Configure fails always related to binutils .machine altivec test
Status: RESOLVED DUPLICATE of bug 333
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.3.6
: P2 critical
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-25 16:46 UTC by David Ashley
Modified: 2019-04-10 09:57 UTC (History)
1 user (show)

See Also:
Host: ppc-linux-gnu
Target:
Build: i686
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Ashley 2006-03-25 16:46:33 UTC
Trying to build up to date powerpc cross compiler, always fails:
checking for .machine support... no
configure: error:
*** A binutils version which can handle
***    .machine "altivec"
*** is needed.

I've tried the absolute latest cutting edge binutils and that doesn't
help. glibc 2.3.4 and 2.3.5 have this problem also. 2.3.3 didn't
have it as I recall.
Comment 1 David Ashley 2006-03-26 18:14:43 UTC
I was able to get the glibc to build in a powerpc cross compilation
scenario, here is a patchfile I came up with that fixes another issue
that came up with libgcc_eh...This is basically hacking out the test
in the first place so this will break something else, specifically whatever
called for the altivec test in the first place.

diff -Nur glibc-2.3.6/Makeconfig glibc-2.3.6-new/Makeconfig
--- glibc-2.3.6/Makeconfig      2005-02-16 02:50:19.000000000 -0800
+++ glibc-2.3.6-new/Makeconfig  2006-03-25 11:39:17.000000000 -0800
@@ -502,13 +502,13 @@
 else
   libunwind = -lunwind
 endif
-ifneq ($(have-as-needed),yes)
- libgcc_eh := -lgcc_eh $(libunwind)
-else
- libgcc_eh := -Wl,--as-needed -lgcc_s$(libgcc_s_suffix) $(libunwind)
-Wl,--no-as-needed
-endif
+#ifneq ($(have-as-needed),yes)
+# libgcc_eh := -lgcc_eh $(libunwind)
+#else
+# libgcc_eh := -Wl,--as-needed -lgcc_s$(libgcc_s_suffix) $(libunwind)
-Wl,--no-as-needed
+#endif
 gnulib := -lgcc $(libgcc_eh)
-static-gnulib := -lgcc -lgcc_eh $(libunwind)
+static-gnulib := -lgcc $(libunwind)
 libc.so-gnulib := -lgcc
 endif
 ifeq ($(elf),yes)
diff -Nur glibc-2.3.6/sysdeps/powerpc/configure
glibc-2.3.6-new/sysdeps/powerpc/configure
--- glibc-2.3.6/sysdeps/powerpc/configure       2005-11-03 16:37:15.000000000 -0800
+++ glibc-2.3.6-new/sysdeps/powerpc/configure   2006-03-25 09:47:42.000000000 -0800
@@ -1,38 +0,0 @@
-# This file is generated from configure.in by Autoconf.  DO NOT EDIT!
- # Local configure fragment for sysdeps/powerpc.
-
-# Accept binutils which knows about ".machine".
-echo "$as_me:$LINENO: checking for .machine support" >&5
-echo $ECHO_N "checking for .machine support... $ECHO_C" >&6
-if test "${libc_cv_ppc_machine+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat > conftest.s <<\EOF
-       .machine "altivec"
-       blr
-EOF
-if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  libc_cv_ppc_machine=yes
-else
-  libc_cv_ppc_machine=no
-fi
-rm -f conftest*
-fi
-echo "$as_me:$LINENO: result: $libc_cv_ppc_machine" >&5
-echo "${ECHO_T}$libc_cv_ppc_machine" >&6
-if test $libc_cv_ppc_machine != yes; then
-  { { echo "$as_me:$LINENO: error:
-*** A binutils version which can handle
-***    .machine \"altivec\"
-*** is needed." >&5
-echo "$as_me: error:
-*** A binutils version which can handle
-***    .machine \"altivec\"
-*** is needed." >&2;}
-   { (exit 1); exit 1; }; }
-fi
diff -Nur glibc-2.3.6/sysdeps/powerpc/configure.in
glibc-2.3.6-new/sysdeps/powerpc/configure.in
--- glibc-2.3.6/sysdeps/powerpc/configure.in    2004-05-28 14:17:53.000000000 -0700
+++ glibc-2.3.6-new/sysdeps/powerpc/configure.in        2006-03-25
09:47:38.000000000 -0800
@@ -1,21 +1 @@
 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-# Local configure fragment for sysdeps/powerpc.
-
-# Accept binutils which knows about ".machine".
-AC_CACHE_CHECK(for .machine support, libc_cv_ppc_machine, [dnl
-cat > conftest.s <<\EOF
-       .machine "altivec"
-       blr
-EOF
-if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
-  libc_cv_ppc_machine=yes
-else
-  libc_cv_ppc_machine=no
-fi
-rm -f conftest*])
-if test $libc_cv_ppc_machine != yes; then
-  AC_MSG_ERROR([
-*** A binutils version which can handle
-***    .machine "altivec"
-*** is needed.])
-fi
Comment 2 Ulrich Drepper 2006-04-02 17:43:00 UTC

*** This bug has been marked as a duplicate of 333 ***