Bug 19796 - [4.0 Regression] Bootstrap fails: Unresolved data symbol "set_fpc_csr"
Summary: [4.0 Regression] Bootstrap fails: Unresolved data symbol "set_fpc_csr"
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords: build
Depends on:
Blocks:
 
Reported: 2005-02-06 23:23 UTC by David Billinghurst
Modified: 2005-07-23 22:49 UTC (History)
2 users (show)

See Also:
Host: mips-sgi-irix6.5
Target: mips-sgi-irix6.5
Build: mips-sgi-irix6.5
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Billinghurst 2005-02-06 23:23:05 UTC
My mips-sgi-irix6.5 bootstraps have been failing since 25 Jan. (I have been 
travelling and didn't notice).
 - The last successful build was 2005-01-24 09:07 UTC
 - First failure was approx 2005-01-25 09:00 UTX

I suspect that the problem is due to:

2005-01-24  Richard Sandiford  <rsandifo@redhat.com>

	* config/mips/irix-csr.c: New file.
	* config/mips/t-iris6 (irix-csr.o): New rule to build it.
	(EXTRA_MULTILIB_PARTS): Add irix-csr.o.
	* config/mips/iris6.h (ENDFILE_SPEC): Include it in n32 and n64
	executables.

The error I see is:

stage1/xgcc -Bstage1/ -B/disk4/billingd/tmp/gcc/mips-sgi-irix6.5/bin/   -g -
O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-
prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-
definition -Werror -fno-common   -DHAVE_CONFIG_H -DGENERATOR_FILE  -o 
build/genmodes \
 build/genmodes.o build/errors.o ../build-mips-sgi-
irix6.5/libiberty/libiberty.a
ld32: ERROR   33 : Unresolved data symbol "get_fpc_csr" -- 1st referenced by 
stage1/irix-csr.o.
        Use linker option -v to see when and which objects, archives and dsos 
are loaded.  
ld32: ERROR   33 : Unresolved data symbol "set_fpc_csr" -- 1st referenced by 
stage1/irix-csr.o.
        Use linker option -v to see when and which objects, archives and dsos 
are loaded.  
ld32: INFO    152: Output file removed because of error.
collect2: ld returned 2 exit status

Configured with:

configure flags: --enable-shared --enable-haifa --enable-threads=single --
enable-libjava --with-as=/disk4/billingd/tmp/binutils/bin/as --disable-nls --
with-gmp=/usr/local --disable-libmudflap --prefix=/disk4/billingd/tmp/gcc --
enable-languages=c,c++,f95,java,objc
Comment 1 GCC Commits 2005-02-07 09:28:01 UTC
Subject: Bug 19796

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rsandifo@gcc.gnu.org	2005-02-07 09:27:48

Modified files:
	gcc            : ChangeLog 
	gcc/config/mips: iris6.h t-iris6 
Removed files:
	gcc/config/mips: irix-csr.c 

Log message:
	PR bootstrap/19796
	Revert:
	2005-01-26  Richard Sandiford  <rsandifo@redhat.com>
	* config/mips/iris6.h (ENDFILE_SPEC): Don't link in irix-csr.o if
	either -ffast-math or -funsafe-math-optimizations is in use.
	
	2005-01-24  Richard Sandiford  <rsandifo@redhat.com>
	* config/mips/irix-csr.c: New file.
	* config/mips/t-iris6 (irix-csr.o): New rule to build it.
	(EXTRA_MULTILIB_PARTS): Add irix-csr.o.
	* config/mips/iris6.h (ENDFILE_SPEC): Include it in n32 and n64
	executables.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7406&r2=2.7407
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/mips/iris6.h.diff?cvsroot=gcc&r1=1.82&r2=1.83
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/mips/t-iris6.diff?cvsroot=gcc&r1=1.27&r2=1.28
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/mips/irix-csr.c.diff?cvsroot=gcc&r1=1.1&r2=NONE

Comment 2 Richard Sandiford 2005-02-07 09:33:04 UTC
Sigh.  Obviously the sys/fpu.h thing isn't as portable as I'd thought.
I wondered why your 4.0 reports had suddendly dropped off...

I have seen this technique mentioned on various web pages,
so I'd be interested to know what's different about your system.
But I suppose this whole issue doesn't matter that much.

I've reverted the offending patch.  I'll look into skipping or
XFAILing the IEEE subnormal tests for IRIX instead.

Richard
Comment 3 david.billinghurst@comalco.riotinto.com.au 2005-02-07 22:33:28 UTC
Subject: RE:  [4.0 Regression] Bootstrap fails: Unresolved data symbol "set_fpc_csr"

Thanks Richard.  I don't know what is different about my system either.
Happy to follow up if you are interested, but not a burning issue with me.

	David


NOTICE
This e-mail and any attachments are private and confidential and may contain privileged information. If you are not an authorised recipient, the copying or distribution of this e-mail and any attachments is prohibited and you must not read, print or act in reliance on this e-mail or attachments.
This notice should not be removed.
Comment 4 david.billinghurst@comalco.riotinto.com.au 2005-02-08 00:30:41 UTC
Subject: RE:  [4.0 Regression] Bootstrap fails: Unresolved data symbol "set_fpc_csr"

I can see the problem here once I compile with -v.  

get_fpc_csr and set_fpc_csr are in libc.so, but -lc linked before stage1/irix-csr.o,
so the routines aren't found.  If I run collect2 by hand with -lc after irix-csr.o
then all is well.  

bash-2.04$ stage1/xgcc -Bstage1/ -B/disk4/billingd/tmp/gcc/mips-sgi-irix6.5/bin/   -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition -Werror -fno-common   -DHAVE_CONFIG_H -DGENERATOR_FILE  -o build/genmodes build/genmodes.o build/errors.o ../build-mips-sgi-irix6.5/libiberty/libiberty.a -v
Reading specs from stage1/specs
Target: mips-sgi-irix6.5
Configured with: /disk4/billingd/src/gcc/configure --enable-shared --enable-haifa --enable-threads=single --enable-libjava --with-as=/disk4/billingd/tmp/binutils/bin/as --disable-nls --with-gmp=/usr/local --enable-languages=c,c++,java,objc,f95 --disable-libmudflap --prefix=/disk4/billingd/tmp/gcc
Thread model: single
gcc version 4.0.0 20050203 (experimental)
 stage1/collect2 -call_shared -no_unresolved -init __gcc_init -fini __gcc_fini -_SYSTYPE_SVR4 -woff 131 -n32 -o build/genmodes /usr/lib32/mips3/crt1.o stage1/irix-crti.o stage1/crtbegin.o -Lstage1 -L/disk4/billingd/tmp/gcc/lib/gcc/mips-sgi-irix6.5/../.. -L/lib/../lib32 -L/usr/lib/../lib32 build/genmodes.o build/errors.o ../build-mips-sgi-irix6.5/libiberty/libiberty.a -dont_warn_unused -lgcc -lgcc_eh -warn_unused -L/usr/lib32/mips3 -L/usr/lib32 -dont_warn_unused -lc -warn_unused -dont_warn_unused -lgcc -lgcc_eh -warn_unused stage1/irix-csr.o stage1/crtend.o stage1/irix-crtn.o /usr/lib32/mips3/crtn.o
ld32: ERROR   33 : Unresolved data symbol "get_fpc_csr" -- 1st referenced by stage1/irix-csr.o.
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved data symbol "set_fpc_csr" -- 1st referenced by stage1/irix-csr.o.
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: INFO    152: Output file removed because of error.
collect2: ld returned 2 exit status


NOTICE
This e-mail and any attachments are private and confidential and may contain privileged information. If you are not an authorised recipient, the copying or distribution of this e-mail and any attachments is prohibited and you must not read, print or act in reliance on this e-mail or attachments.
This notice should not be removed.