From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 66043 invoked by alias); 15 Sep 2015 14:38:54 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 66010 invoked by uid 48); 15 Sep 2015 14:38:50 -0000 From: "syq at debian dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/67590] New: libcc1 cannot find objdump when cross build native Date: Tue, 15 Sep 2015 14:38:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: 5.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: syq at debian dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-09/txt/msg01243.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67590 Bug ID: 67590 Summary: libcc1 cannot find objdump when cross build native Product: gcc Version: 5.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: syq at debian dot org Target Milestone: --- The configure of libcc1 uses gcc_cv_objdump var when cross build native. while it is not defined at all. So we can use gcc/configure.ac one. Index: gcc-5-5.2.1/src/libcc1/configure.ac =================================================================== --- gcc-5-5.2.1.orig/src/libcc1/configure.ac +++ gcc-5-5.2.1/src/libcc1/configure.ac @@ -63,6 +63,31 @@ if test "$GXX" = yes; then fi AC_SUBST(libsuffix) +# Figure out what objdump we will be using. +AS_VAR_SET_IF(gcc_cv_objdump,, [ +if test -f $gcc_cv_binutils_srcdir/configure.in \ + && test -f ../binutils/Makefile \ + && test x$build = x$host; then + # Single tree build which includes binutils. + gcc_cv_objdump=../binutils/objdump$build_exeext +elif test -x objdump$build_exeext; then + gcc_cv_objdump=./objdump$build_exeext +elif ( set dummy $OBJDUMP_FOR_TARGET; test -x $[2] ); then + gcc_cv_objdump="$OBJDUMP_FOR_TARGET" +else + AC_PATH_PROG(gcc_cv_objdump, $OBJDUMP_FOR_TARGET) +fi]) + +AC_MSG_CHECKING(what objdump to use) +if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then + # Single tree build which includes binutils. + AC_MSG_RESULT(newly built objdump) +elif test x$gcc_cv_objdump = x; then + AC_MSG_RESULT(not found) +else + AC_MSG_RESULT($gcc_cv_objdump) +fi + dnl Test for -lsocket and -lnsl. Copied from libgo/configure.ac. AC_CACHE_CHECK([for socket libraries], libcc1_cv_lib_sockets, [libcc1_cv_lib_sockets=