m32r-elf libgloss problem in newlib 1.9.0
J. Johnston
jjohnstn@cygnus.com
Tue Jul 24 18:39:00 GMT 2001
Joel Sherrill wrote:
>
> The build fails with...
>
> /usr3/ftp_archive/gnu/gcc/ss/b3/b-m32r-elf/gcc/xgcc
> -B/usr3/ftp_archive/gnu/gcc/
> ss/b3/b-m32r-elf/gcc/ -nostdinc
> -B/usr3/ftp_archive/gnu/gcc/ss/b3/b-m32r-elf/m32
> r-elf/newlib/ -isystem
> /usr3/ftp_archive/gnu/gcc/ss/b3/b-m32r-elf/m32r-elf/newli
> b/targ-include -isystem
> /usr3/ftp_archive/gnu/gcc/ss/b3/gcc-30-cvs/newlib/libc/i
> nclude -B/opt/gnucross/m32r-elf/bin/ -B/opt/gnucross/m32r-elf/lib/ -isystem
> /opt
> /gnucross/m32r-elf/include -O2 -g -I.
> -I../../../../gcc-30-cvs/libgloss/m32r/..
> `if [ -d ./../../newlib ]; then echo -I./../../newlib/targ-include
> -I../../../.
> ./gcc-30-cvs/libgloss/m32r/../../newlib/libc/include; fi` -O2 -I.
> -I../../../../
> gcc-30-cvs/libgloss/m32r/.. -c -g -Os
> ../../../../gcc-30-cvs/libgloss/m32r/m32r-
> lib.c
> make[2]: *** No rule to make target
> `../../../../gcc-30-cvs/libgloss/m32r/../../
> gdb/m32r-stub.c', needed by `m32r-stub.o'. Stop.
> make[2]: Leaving directory
> `/usr3/ftp_archive/gnu/gcc/ss/b3/b-m32r-elf/m32r-elf/
> libgloss/m32r'
>
> It looks like that the libgloss included with newlib 1.9.0 has never been
> built outside a one-source tree with gdb. I just checked CVS and the
> Makefile.in still reaches up and over into gdb. How should this be fixed?
>
> --
Try the attached patch which checks at configuration time if the file is in the source tree.
-- Jeff J.
Index: libgloss/m32r/Makefile.in
===================================================================
RCS file: /cvs/src/src/libgloss/m32r/Makefile.in,v
retrieving revision 1.1
diff -u -r1.1 Makefile.in
--- libgloss/m32r/Makefile.in 2000/03/17 22:48:50 1.1
+++ libgloss/m32r/Makefile.in 2001/07/25 01:36:30
@@ -64,7 +64,7 @@
CRT0 = crt0.o
GDBLIB = m32r-lib.o
-GDBSTUB = m32r-stub.o
+GDBSTUB = @GDBSTUB@
EVASCRIPT = eva.ld
STUBSCRIPT = eva-stub.ld
Index: libgloss/m32r/configure
===================================================================
RCS file: /cvs/src/src/libgloss/m32r/configure,v
retrieving revision 1.2
diff -u -r1.2 configure
--- libgloss/m32r/configure 2001/07/18 21:26:59 1.2
+++ libgloss/m32r/configure 2001/07/25 01:36:30
@@ -566,6 +566,13 @@
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+if test -f "${srcdir}/${with_multisrctop}../../gdb/m32r-stub.c"; then
+ GDBSTUB=${srcdir}/${with_multisrctop}../../gdb/m32r-stub.c
+else
+ GDBSTUB=
+fi
+
+
# Do some error checking and defaulting for the host and target type.
# The inputs are:
@@ -594,7 +601,7 @@
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:598: checking host system type" >&5
+echo "configure:605: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -615,7 +622,7 @@
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:619: checking target system type" >&5
+echo "configure:626: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -633,7 +640,7 @@
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:637: checking build system type" >&5
+echo "configure:644: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -687,7 +694,7 @@
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:691: checking for a BSD compatible install" >&5
+echo "configure:698: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -743,7 +750,7 @@
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:747: checking for $ac_word" >&5
+echo "configure:754: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -773,7 +780,7 @@
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:777: checking for $ac_word" >&5
+echo "configure:784: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -824,7 +831,7 @@
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:828: checking for $ac_word" >&5
+echo "configure:835: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -856,7 +863,7 @@
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:860: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:867: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -867,12 +874,12 @@
cat > conftest.$ac_ext << EOF
-#line 871 "configure"
+#line 878 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -898,12 +905,12 @@
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:902: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:909: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:907: checking whether we are using GNU C" >&5
+echo "configure:914: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -912,7 +919,7 @@
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -931,7 +938,7 @@
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:935: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:942: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -971,7 +978,7 @@
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:975: checking for $ac_word" >&5
+echo "configure:982: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1150,6 +1157,7 @@
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
+s%@GDBSTUB@%$GDBSTUB%g
s%@host@%$host%g
s%@host_alias@%$host_alias%g
s%@host_cpu@%$host_cpu%g
Index: libgloss/m32r/configure.in
===================================================================
RCS file: /cvs/src/src/libgloss/m32r/configure.in,v
retrieving revision 1.1
diff -u -r1.1 configure.in
--- libgloss/m32r/configure.in 2000/03/17 22:48:50 1.1
+++ libgloss/m32r/configure.in 2001/07/25 01:36:30
@@ -17,6 +17,13 @@
fi
AC_CONFIG_AUX_DIR($libgloss_topdir)
+if test -f "${srcdir}/${with_multisrctop}../../gdb/m32r-stub.c"; then
+ GDBSTUB=${srcdir}/${with_multisrctop}../../gdb/m32r-stub.c
+else
+ GDBSTUB=
+fi
+AC_SUBST(GDBSTUB)
+
AC_CANONICAL_SYSTEM
AC_ARG_PROGRAM
More information about the Newlib
mailing list