BUG: Creating shared C++ libs using -march=pentiumpro broken on the release branch
Manfred Hollstein
manfredh@redhat.com
Wed Jun 28 12:26:00 GMT 2000
Hi there,
Since the patch to "load_pic_register" has been applied to
config/i386/i386.md on the "gcc-2_95-branch", creating shared C++
libraries using the "-march=pentiumpro" flag became impossible. I did
an update on the branch today (2000/06/28 16:24:00 +0200), configured
like this:
$ env CC=gcc CFLAGS="-O9 -march=pentiumpro -fomit-frame-pointer" \
CXXFLAGS="-O9 -march=pentiumpro -g" LDFLAGS= LINGUAS="de es fr it"\
/bin/sh ../gcc-2.95.3/configure --host=i686-redhat6-linux-gnu \
--target=i686-redhat6-linux-gnu --srcdir=../gcc-2.95.3 \
--prefix=/opt/gnu --exec-prefix=/opt/gnu/H-ia32-linux \
--with-gnu-as --with-gnu-ld --enable-shared \
--enable-version-specific-runtime-libs --enable-threads=yes \
--with-local-prefix=/opt/gnu --enable-languages=c,gcov,c++ \
--enable-nls --verbose
followed by a
$ make bootstrap
So far, no problems. But, running "make check" reveals lots of
failures in the C++ are, all of which are similar to this:
/home/gnu/work/GNU/gcc-2.95.3-i686-redhat6-linux-gnu/i686-redhat6-linux-gnu//libstdc++/libstdc++.so: undefined reference to `LPR0'
collect2: ld returned 1 exit status
I tracked it down today to this change:
diff -rcp gcc-2.95.2/gcc/config/i386/i386.md gcc-2.95.3/gcc/config/i386/i386.md
*** gcc-2.95.2/gcc/config/i386/i386.md Tue Sep 7 09:45:42 1999
--- gcc-2.95.3/gcc/config/i386/i386.md Sat Jan 22 16:02:52 2000
***************
*** 1,5 ****
; GCC machine description for Intel X86.
! ;; Copyright (C) 1988, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
;; Mostly by William Schelter.
;; This file is part of GNU CC.
--- 1,5 ----
; GCC machine description for Intel X86.
! ;; Copyright (C) 1988, 94-99, 2000 Free Software Foundation, Inc.
;; Mostly by William Schelter.
;; This file is part of GNU CC.
*************** byte_xor_operation:
*** 8187,8192 ****
--- 8187,8201 ----
(define_expand "exception_receiver"
[(const_int 0)]
+ "flag_pic"
+ "
+ {
+ load_pic_register ();
+ DONE;
+ }")
+
+ (define_expand "builtin_setjmp_receiver"
+ [(label_ref (match_operand 0 "" ""))]
"flag_pic"
"
{
Note, there's not even a ChangeLog entry for it... You can compile the
attached builtinbuf.ii like this:
$ gcc -march=pentiumpro -fvtable-thunks -fno-implicit-templates -fpic -c --save-temps builtinbuf.ii
and then grep for LPR0, which will only show references but no
definitions for it :-( Essentially, builtinbuf.ii does not contain any
definitions other than one frame descriptor plus the usual pthread
weak symbols (look at the attached builtinbuf.s).
This does not happen with gcc-2.95.2 or on the mainline.
If someone has a patch for it, that would be fine; otherwise, I'll dig
around further myself if time permits.
Cheers.
l8er
manfred
-------------- next part --------------
A non-text attachment was scrubbed...
Name: builtinbuf.ii.gz
Type: application/x-gzip
Size: 14710 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20000628/8f2b849e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: builtinbuf.s
Type: text/x-asm
Size: 899 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20000628/8f2b849e/attachment-0001.bin>
More information about the Gcc-bugs
mailing list