[Bug other/67590] New: libcc1 cannot find objdump when cross build native
syq at debian dot org
gcc-bugzilla@gcc.gnu.org
Tue Sep 15 14:38:00 GMT 2015
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=
More information about the Gcc-bugs
mailing list