From 0feab19617477e9280032853fa4017e2bbb8a9a7 Mon Sep 17 00:00:00 2001 From: Nicholas Chaimov Date: Wed, 21 Jun 2023 14:36:12 -0700 Subject: [PATCH] Update configure to use binutils 2.40 Former-commit-id: f1e2ac76bbd6ac001ee32f5a41057034052f9420 --- configure | 51 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/configure b/configure index b9be0f54a..7d2fdad44 100755 --- a/configure +++ b/configure @@ -9576,6 +9576,7 @@ fi # your code, you probably need binutils 2.36 to demangle C++ names. binutils=binutils-2.23.2 binutils=binutils-2.36 +binutils=binutils-2.40 binutilstgz=$binutils.tar.gz binutilsurl=http://www.cs.uoregon.edu/research/paracomp/tau/tauprofile/dist/$binutilstgz @@ -9662,6 +9663,10 @@ if [ "x$bfd" = "xyes" -a ! "$turnbfdoff" = yes ] ; then tar -xzf $binutilstgz cd $binutils + # Disable packages that don't build without dependencies on Texinfo + # and that are not required to use BFD in TAU + BINUTILS_DISABLED_PKGS="--disable-gas --disable-gprof --disable-gprofng" + # Configure binutils echo "Configuring binutils (see $tempdir/$binutils/tau_configure.log for details)..." case $machine in @@ -9671,7 +9676,7 @@ if [ "x$bfd" = "xyes" -a ! "$turnbfdoff" = yes ] ; then CC=/bgsys/drivers/ppcfloor/gnu-linux/bin/powerpc-bgp-linux-gcc \ CXX=/bgsys/drivers/ppcfloor/gnu-linux/bin/powerpc-bgp-linux-g++ \ --prefix=$bfddir \ - --disable-nls --disable-werror > tau_configure.log 2>&1 + --disable-nls --disable-werror $BINUTILS_DISABLED_PKGS > tau_configure.log 2>&1 err=$? ;; bgq) @@ -9680,21 +9685,21 @@ if [ "x$bfd" = "xyes" -a ! "$turnbfdoff" = yes ] ; then CC=/bgsys/drivers/ppcfloor/gnu-linux/bin/powerpc64-bgq-linux-gcc \ CXX=/bgsys/drivers/ppcfloor/gnu-linux/bin/powerpc64-bgq-linux-g++ \ --prefix=$bfddir \ - --disable-nls --disable-werror > tau_configure.log 2>&1 + --disable-nls --disable-werror $BINUTILS_DISABLED_PKGS > tau_configure.log 2>&1 err=$? ;; rs6000) ./configure \ CFLAGS=-fPIC CXXFLAGS=-fPIC \ --prefix=$bfddir \ - --disable-nls --disable-werror --disable-largefile > tau_configure.log 2>&1 + --disable-nls --disable-werror --disable-largefile $BINUTILS_DISABLED_PKGS > tau_configure.log 2>&1 err=$? ;; ibm64) ./configure \ CFLAGS="-maix64 -fPIC" CXXFLAGS="-maix64 -fPIC" AR="/usr/bin/ar -X64 "\ --prefix=$bfddir \ - --disable-nls --disable-werror --disable-largefile > tau_configure.log 2>&1 + --disable-nls --disable-werror --disable-largefile $BINUTILS_DISABLED_PKGS > tau_configure.log 2>&1 err=$? ;; @@ -9704,7 +9709,7 @@ if [ "x$bfd" = "xyes" -a ! "$turnbfdoff" = yes ] ; then CFLAGS=-fPIC CXXFLAGS=-fPIC \ --host=$host \ --prefix=$bfddir \ - --disable-nls --disable-werror --disable-largefile > tau_configure.log 2>&1 + --disable-nls --disable-werror --disable-largefile $BINUTILS_DISABLED_PKGS > tau_configure.log 2>&1 err=$? ;; mic_linux) @@ -9715,13 +9720,13 @@ if [ "x$bfd" = "xyes" -a ! "$turnbfdoff" = yes ] ; then CFLAGS=-fPIC CXXFLAGS=-fPIC \ --host=x86_64-k1om-linux \ --prefix=$bfddir \ - --disable-nls --disable-werror > tau_configure.log 2>&1 + --disable-nls --disable-werror $BINUTILS_DISABLED_PKGS > tau_configure.log 2>&1 err=$? ;; apple) export CFLAGS="-Wno-error=unused-value -Wno-error=deprecated-declarations -fPIC" export CXXFLAGS="-Wno-error=unused-value -Wno-error=deprecated-declarations -fPIC" - ./configure --prefix=$bfddir --disable-nls --disable-werror > tau_configure.log 2>&1 + ./configure --prefix=$bfddir --disable-nls --disable-werror $BINUTILS_DISABLED_PKGS > tau_configure.log 2>&1 err=$? ;; sparc64fx) @@ -9737,7 +9742,7 @@ if [ "x$bfd" = "xyes" -a ! "$turnbfdoff" = yes ] ; then AR=sparc64-unknown-linux-gnu-ar \ --host=sparc64-unknown-linux-gnu \ --prefix=$bfddir \ - --disable-nls --disable-werror > tau_configure.log 2>&1 + --disable-nls --disable-werror $BINUTILS_DISABLED_PKGS > tau_configure.log 2>&1 err=$? ;; craycnl) @@ -9750,13 +9755,13 @@ if [ "x$bfd" = "xyes" -a ! "$turnbfdoff" = yes ] ; then CFLAGS='-xMIC-AVX512 -fPIC' CXXFLAGS='-xMIC-AVX512 -fPIC' \ --host=x86_64-k1om-linux \ --prefix=$bfddir \ - --disable-nls --disable-werror > tau_configure.log 2>&1 + --disable-nls --disable-werror $BINUTILS_DISABLED_PKGS > tau_configure.log 2>&1 err=$? else ./configure \ CFLAGS=-fPIC CXXFLAGS=-fPIC \ --prefix=$bfddir \ - --disable-nls --disable-werror > tau_configure.log 2>&1 + --disable-nls --disable-werror $BINUTILS_DISABLED_PKGS > tau_configure.log 2>&1 err=$? fi ;; @@ -9776,7 +9781,7 @@ if [ "x$bfd" = "xyes" -a ! "$turnbfdoff" = yes ] ; then fi ./configure CC=ncc CXX=nc++ --prefix=$bfddir --disable-nls --disable-werror \ - CFLAGS="-fPIC -Wno-error" CXXFLAGS="-fPIC -Wno-error" > tau_configure.log 2>&1 + CFLAGS="-fPIC -Wno-error" CXXFLAGS="-fPIC -Wno-error" $BINUTILS_DISABLED_PKGS > tau_configure.log 2>&1 err=$? ;; *) @@ -9790,7 +9795,7 @@ if [ "x$bfd" = "xyes" -a ! "$turnbfdoff" = yes ] ; then CFLAGS="-fPIC -Wno-error" CXXFLAGS="-fPIC -Wno-error" \ CC=$mpc_c_compiler CXX=$mpc_cxx_compiler \ --prefix=$bfddir \ - --disable-nls --disable-werror > tau_configure.log 2>&1 + --disable-nls --disable-werror $BINUTILS_DISABLED_PKGS > tau_configure.log 2>&1 err=$? else if [ "$base_c_compiler" = pgcc ] || [ "$base_env_c_compiler" = pgcc ] @@ -9798,13 +9803,13 @@ if [ "x$bfd" = "xyes" -a ! "$turnbfdoff" = yes ] ; then ./configure \ CFLAGS="-fPIC -noswitcherror" CXX=pgc++ CXXFLAGS=-fPIC \ --prefix=$bfddir \ - --disable-nls --disable-werror > tau_configure.log 2>&1 + --disable-nls --disable-werror $BINUTILS_DISABLED_PKGS > tau_configure.log 2>&1 err=$? else ./configure \ CFLAGS=-fPIC CXXFLAGS=-fPIC \ --prefix=$bfddir \ - --disable-nls --disable-werror > tau_configure.log 2>&1 + --disable-nls --disable-werror $BINUTILS_DISABLED_PKGS > tau_configure.log 2>&1 err=$? fi fi @@ -10042,14 +10047,24 @@ else if $c_compiler $orig_useropt -o conftest_bfd conftest_bfd.c $bfdinclude $bfdlink $BFDLIBS 1> /dev/null 2>&1 ; then bfd_worked="yes" else - BFDLIBS="-lbfd -lz" -# Mac BFD + BFDLIBS="-lbfd -lsframe -liberty -lz -ldl" if $c_compiler $orig_useropt -o conftest_bfd conftest_bfd.c $bfdinclude $bfdlink $BFDLIBS 1> /dev/null 2>&1 ; then bfd_worked="yes" else - BFDLIBS="-lbfd -lintl" - if $c_compiler $orig_useropt -o conftest_bfd conftest_bfd.c $bfdinclude $bfdlink $BFDLIBS 1> /dev/null 2>&1 ; then + BFDLIBS="-lbfd -lsframe -liberty -lintl -lz -ldl" + if $c_compiler $orig_useropt -o conftest_bfd conftest_bfd.c $bfdinclude $bfdlink $BFDLIBS 1> /dev/null 2>&1 ; then bfd_worked="yes" + else + BFDLIBS="-lbfd -lz" +# Mac BFD + if $c_compiler $orig_useropt -o conftest_bfd conftest_bfd.c $bfdinclude $bfdlink $BFDLIBS 1> /dev/null 2>&1 ; then + bfd_worked="yes" + else + BFDLIBS="-lbfd -lintl" + if $c_compiler $orig_useropt -o conftest_bfd conftest_bfd.c $bfdinclude $bfdlink $BFDLIBS 1> /dev/null 2>&1 ; then + bfd_worked="yes" + fi + fi fi fi fi