Subject: Re: what went wrong with the last mknative run
To: None <M.Drochner@fz-juelich.de>
From: Nick Hudson <skrll@netbsd.org>
List: tech-toolchain
Date: 05/19/2005 10:19:02
--Boundary-00=_GoFjCsd4GY1E8gQ
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Wednesday 18 May 2005 20:14, Matthias Drochner wrote:
> It seems that the last run of mknative (fallout of wchar changes) has
> broken at least some 64-bit archs.
> It seems also that not everything is optimal in that area.
>
> There is PR toolchain/30251; I could easily reproduce it and
> found that it is caused by a change to
> usr.bin/gcc3/arch/x86_64/auto-host.h. The ICE was triggered by
> the RO_RW_SECTION_MIXING thing, but the other changes look
> harmful too.

The gcc configure script in mknative didn't use the right LD, NM, and 
OBJDUMP. The attached diff corrects this and I'm now running mknative 
again for all architectures.

> Another finding: gnu/lib/libobjc3/defs.mk is not really MI;
> on alpha it contains the -mieee compiler flag. (Not in the
> diffs because it got overwritten.)

I/Someone should fix that.

Nick

--Boundary-00=_GoFjCsd4GY1E8gQ
Content-Type: text/x-diff;
  charset="iso-8859-1";
  name="mknative.fixes.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="mknative.fixes.diff"

Index: tools/gcc/Makefile
===================================================================
RCS file: /cvsroot/src/tools/gcc/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- tools/gcc/Makefile	14 May 2005 08:00:58 -0000	1.14
+++ tools/gcc/Makefile	19 May 2005 09:13:27 -0000
@@ -44,7 +44,7 @@
 			CXX=${CXX:Q}' '${CCADDFLAGS:Q} \
 			CPP=${CPP:Q}' '-I${DESTDIR}/usr/include \
 			CFLAGS= CPPFLAGS= CXXFLAGS= LDFLAGS= \
-			AS=$(AS:Q) \
+			AS=${AS:Q} LD=${LD:Q} NM=${NM:Q} OBJDUMP=${OBJDUMP:Q} \
 			MSGFMT=${TOOLDIR}/bin/${_TOOL_PREFIX}msgfmt \
 			XGETTEXT=${TOOLDIR}/bin/${_TOOL_PREFIX}xgettext \
 			LIBS=-lintl \
Index: gnu/dist/gcc/gcc/configure
===================================================================
RCS file: /cvsroot/src/gnu/dist/gcc/gcc/configure,v
retrieving revision 1.4
diff -u -r1.4 configure
--- gnu/dist/gcc/gcc/configure	10 Feb 2004 12:56:21 -0000	1.4
+++ gnu/dist/gcc/gcc/configure	19 May 2005 09:13:36 -0000
@@ -7119,7 +7119,9 @@
 # Figure out what nm we will be using.
 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
 echo "configure:7122: checking what nm to use" >&5
-if test -x nm$host_exeext; then
+if test -x "$NM"; then
+	gcc_cv_nm="$NM"
+elif test -x nm$host_exeext; then
 	gcc_cv_nm=./nm$host_exeext
 elif test "x$program_prefix" != xNONE; then
 	gcc_cv_nm=${program_prefix}nm$host_exeext
@@ -7131,7 +7133,9 @@
 # Figure out what objdump we will be using.
 echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
 echo "configure:7134: checking what objdump to use" >&5
-if test -x objdump$host_exeext; then
+if test -x "$OBJDUMP"; then
+	gcc_cv_objdump="$OBJDUMP"
+elif test -x objdump$host_exeext; then
 	gcc_cv_objdump=./objdump$host_exeext
 elif test "x$program_prefix" != xNONE; then
 	gcc_cv_objdump=${program_prefix}objdump$host_exeext

--Boundary-00=_GoFjCsd4GY1E8gQ--