public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/14163] New: hppa: glibc-2.3.3 pb to build with gcc-3.[45]
@ 2004-02-16 17:23 soete dot joel at tiscali dot be
  2004-02-16 17:27 ` [Bug c/14163] " soete dot joel at tiscali dot be
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: soete dot joel at tiscali dot be @ 2004-02-16 17:23 UTC (permalink / raw)
  To: gcc-bugs

Hi all,

Building toolchain on my hppa-linux box (a debian unstable install) glibc 
failled to build with following message:
[snip]
/Develop/parisc-linux/xc/bin/hppa-linux-gcc -nostdlib -nostartfiles -
o /Develop/parisc-linux/build/glibc/iconv/iconvconfig  -Wl,-dynamic-
linker=/opt/palinux-3.5.0/hppa-linux/lib/ld.so.1     /Develop/parisc-
linux/build/glibc/csu/crt1.o /Develop/parisc-linux/build/glibc/csu/crti.o 
`/Develop/parisc-linux/xc/bin/hppa-linux-gcc --print-file-
name=crtbegin.o` /Develop/parisc-
linux/build/glibc/iconv/iconvconfig.o /Develop/parisc-
linux/build/glibc/iconv/strtab.o /Develop/parisc-
linux/build/glibc/iconv/xmalloc.o /Develop/parisc-linux/build/glibc/iconv/hash-
string.o  -Wl,-rpath-link=/Develop/parisc-linux/build/glibc:/Develop/parisc-
linux/build/glibc/math:/Develop/parisc-linux/build/glibc/elf:/Develop/parisc-
linux/build/glibc/dlfcn:/Develop/parisc-linux/build/glibc/nss:/Develop/parisc-
linux/build/glibc/nis:/Develop/parisc-linux/build/glibc/rt:/Develop/parisc-
linux/build/glibc/resolv:/Develop/parisc-
linux/build/glibc/crypt:/Develop/parisc-
linux/build/glibc/linuxthreads /Develop/parisc-
linux/build/glibc/libc.so.6 /Develop/parisc-linux/build/glibc/libc_nonshared.a -
lgcc `/Develop/parisc-linux/xc/bin/hppa-linux-gcc --print-file-
name=crtend.o` /Develop/parisc-linux/build/glibc/csu/crtn.o
/Develop/parisc-linux/build/glibc/elf/ld.so.1: undefined reference to `set_dp'
collect2: ld returned 1 exit status
make[2]: *** [/Develop/parisc-linux/build/glibc/iconv/iconvconfig] Error 1
make[2]: Leaving directory `/Develop/parisc-linux/sources/glibc-2.3.3-
20040212/iconv'
make[1]: *** [iconv/others] Error 2
make[1]: Leaving directory `/Develop/parisc-linux/sources/glibc-2.3.3-20040212'
make: *** [all] Error 2

which seems because:
[snip]
/Develop/parisc-linux/xc/bin/hppa-linux-gcc   -nostdlib -nostartfiles -r -
o /Develop/parisc-linux/build/glibc/elf/librtld.os '-Wl,-(' /Develop/parisc-
linux/build/glibc/elf/dl-allobjs.os /Develop/parisc-linux/build/glibc/elf/rtld-
libc.a -lgcc '-Wl,-)' \
          -Wl,-Map,/Develop/parisc-linux/build/glibc/elf/librtld.os.map
/Develop/parisc-linux/xc/bin/hppa-linux-gcc   -nostdlib -nostartfiles -
shared                   \
   -Wl,-z,defs -Wl,--verbose 2>&1 |     \
          LC_ALL=C \
          sed -e '/^=========/,/^=========/!d;/^=========/d'    \
              -e 's/\. = 0 + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
          > /Develop/parisc-linux/build/glibc/elf/ld.so.lds
/Develop/parisc-linux/xc/bin/hppa-linux-gcc   -nostdlib -nostartfiles -shared -
o /Develop/parisc-linux/build/glibc/elf/ld.so                    \
           -Wl,-z,defs                          \
          /Develop/parisc-linux/build/glibc/elf/librtld.os -Wl,--version-
script=/Develop/parisc-linux/build/glibc/ld.map                \
          -Wl,-soname=ld.so.1 -T /Develop/parisc-linux/build/glibc/elf/ld.so.lds
/Develop/parisc-linux/build/glibc/elf/librtld.os(.text+0x8c): In function 
`_dl_start_user':
: warning: undefined reference to `set_dp'
[snip].

OTC with 3.3.3 there was no such pb.

To build this toolchain I used:
* the same binutils-2.14.90.0.7 (debian pkg src)
which I build with the same following Cmd:
export PATH="/Develop/parisc-linux/xc/bin:$PATH"; /Develop/parisc-
linux/sources/binutils/configure --target=hppa-linux --host=hppa-linux --
build=hppa-linux --prefix=/Develop/parisc-linux/xc --disable-nls --enable-
shared --enable-targets=hppa64-linux 

* gcc-3.3.3ds3-0pre3 (debian pkg src) build with:
export PATH="/Develop/parisc-linux/xc/bin:$PATH"; /Develop/parisc-
linux/sources/gcc/configure --target=hppa-linux --host=hppa-linux --build=hppa-
linux --prefix=/Develop/parisc-linux/xc --disable-shared --disable-nls --enable-
languages=c

or
* gcc-snapshot-20040216 (cvs src) build with the same:
export PATH="/Develop/parisc-linux/xc/bin:$PATH"; /Develop/parisc-
linux/sources/gcc/configure --target=hppa-linux --host=hppa-linux --build=hppa-
linux --prefix=/Develop/parisc-linux/xc --disable-shared --disable-nls --enable-
languages=c

and finaly glibc-2.3.3-20040212 (Carlos O'Donell hppa patches)
with following cmd with gcc-3.3
unset LD_LIBRARY_PATH; unset LD_RUN_PATH; export CC=/Develop/parisc-
linux/xc/bin/hppa-linux-gcc; export CLFAGS="-O2 -g";  export 
PATH="/Develop/parisc-linux/xc/bin:$PATH"; /Develop/parisc-
linux/sources/glibc/configure --target=hppa-linux --host=hppa-linux --
build=hppa-linux --prefix=/opt/palinux-3.3.3/hppa-linux --without-cvs --disable-
profile --enable-hacker-mode --enable-add-ons=linuxthreads --with-
headers=/Develop/parisc-linux/sources/linux/include

and with gcc-3.5
unset LD_LIBRARY_PATH; unset LD_RUN_PATH; export CC=/Develop/parisc-
linux/xc/bin/hppa-linux-gcc; export CLFAGS="-O2 -g --param inline-unit-
growth=10000 ";  export PATH="/Develop/parisc-
linux/xc/bin:$PATH"; /Develop/parisc-linux/sources/glibc/configure --
target=hppa-linux --host=hppa-linux --build=hppa-linux --prefix=/opt/palinux-
3.5.0/hppa-linux --without-cvs --disable-profile --enable-hacker-mode --enable-
add-ons=linuxthreads --with-headers=/Develop/parisc-linux/sources/linux/include

With the above mentioned error: `_dl_start_user', it appears that the pb is 
located in rtld.os where set_dp() code is eliminated as seems to confirm 
following pre-asm samples:
rtld.s with gcc-3.3
[snip]
.globl _rtld_local
        .hidden _rtld_local
        .set    _rtld_local,_rtld_global
        .text
        .align 4
        .type   set_dp, @function
.LFB63:
        .loc 1 176 0
set_dp:
        .PROC
        .CALLINFO FRAME=0,NO_CALLS
        .ENTRY
.LBB2:
        ldw 36(%r26),%r20
        ldw 4(%r20),%r27
.LBE2:
        bv %r0(%r2)
        copy %r26,%r28
        .EXIT
        .PROCEND
.LFE63:
        .size   set_dp, .-set_dp
#APP
                .text
        .globl _start
        .type _start,@function
_start:
        ldo     64(%sp),%sp
        stw     %r25,-40(%sp)
        stw     %r24,-44(%sp)
        bl      0f,%r19
        depi    0,31,2,%r19
0:      addil   L'_DYNAMIC - ($PIC_pcrel$0 - 8),%r19
        ldo     R'_DYNAMIC - ($PIC_pcrel$0 - 12)(%r1),%r26
        addil   L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 16),%r19
        ldw     R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 20)(%r1),%r20
        sub     %r26,%r20,%r20
        ldw,ma  8(%r26),%r19
1:      cmpib,=,n 3,%r19,2f
        cmpib,<>,n 0,%r19,1b
        ldw,ma  8(%r26),%r19
        iitlbp  %r0,(%r0)
2:      ldw     -4(%r26),%r19
        add     %r19,%r20,%r19
        bl      _dl_start,%rp
        ldo     -4(%r24),%r26
        .globl _dl_start_user
        .type _dl_start_user,@function
_dl_start_user:
        copy    %ret0,%r3
        addil   LT'__libc_stack_end,%r19
        ldw     RT'__libc_stack_end(%r1),%r20
        stw     %sp,0(%r20)
        addil   LT'_dl_skip_args,%r19
        ldw     RT'_dl_skip_args(%r1),%r20
        ldw     0(%r20),%r20
        ldw     -40(%sp),%r25
        comib,= 0,%r20,.Lnofix
        ldw     -44(%sp),%r24
        sub     %r25,%r20,%r25
        stw     %r25,-40(%sp)
        sh2add  %r20,%r24,%r24
        stw     %r24,-44(%sp)
.Lnofix:
        addil   LT'_rtld_local,%r19
        ldw     RT'_rtld_local(%r1),%r26
        bl      set_dp, %r2
        ldw     0(%r26),%r26
        copy    %r28,%r26
        sh2add  %r25,%r24,%r23
        bl      _dl_init_internal,%r2
        ldo     4(%r23),%r23
        ldw     -40(%sp),%r25
        ldw     -44(%sp),%r24
        .section .data
__dl_fini_plabel:
        .word   _dl_fini
        .word   0xdeadbeef
        .previous
        depi    0,31,2,%r3
        ldw     0(%r3),%r2
        addil   LT'__dl_fini_plabel,%r19
        ldw     RT'__dl_fini_plabel(%r1),%r23
        stw     %r19,4(%r23)
        ldw     4(%r3),%r19
        bv      %r0(%r2)
        depi    2,31,2,%r23

#NO_APP
[snip]

rtld.s with gcc-3.5:
[snip]
.globl _rtld_local
        .hidden _rtld_local
        .set    _rtld_local,_rtld_global
#APP
                .text
        .globl _start
        .type _start,@function
_start:
        ldo     64(%sp),%sp
        stw     %r25,-40(%sp)
        stw     %r24,-44(%sp)
        bl      0f,%r19
        depi    0,31,2,%r19
0:      addil   L'_DYNAMIC - ($PIC_pcrel$0 - 8),%r19
        ldo     R'_DYNAMIC - ($PIC_pcrel$0 - 12)(%r1),%r26
        addil   L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 16),%r19
        ldw     R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 20)(%r1),%r20
        sub     %r26,%r20,%r20
        ldw,ma  8(%r26),%r19
1:      cmpib,=,n 3,%r19,2f
        cmpib,<>,n 0,%r19,1b
        ldw,ma  8(%r26),%r19
        iitlbp  %r0,(%r0)
2:      ldw     -4(%r26),%r19
        add     %r19,%r20,%r19
        bl      _dl_start,%rp
        ldo     -4(%r24),%r26
        .globl _dl_start_user
        .type _dl_start_user,@function
_dl_start_user:
        copy    %ret0,%r3
        addil   LT'__libc_stack_end,%r19
        ldw     RT'__libc_stack_end(%r1),%r20
        stw     %sp,0(%r20)
        addil   LT'_dl_skip_args,%r19
        ldw     RT'_dl_skip_args(%r1),%r20
        ldw     0(%r20),%r20
        ldw     -40(%sp),%r25
        comib,= 0,%r20,.Lnofix
        ldw     -44(%sp),%r24
        sub     %r25,%r20,%r25
        stw     %r25,-40(%sp)
        sh2add  %r20,%r24,%r24
        stw     %r24,-44(%sp)
.Lnofix:
        addil   LT'_rtld_local,%r19
        ldw     RT'_rtld_local(%r1),%r26
        bl      set_dp, %r2
        ldw     0(%r26),%r26
        copy    %r28,%r26
        sh2add  %r25,%r24,%r23
        bl      _dl_init_internal,%r2
        ldo     4(%r23),%r23
        ldw     -40(%sp),%r25
        ldw     -44(%sp),%r24
        .section .data
__dl_fini_plabel:
        .word   _dl_fini
        .word   0xdeadbeef
        .previous
        depi    0,31,2,%r3
        ldw     0(%r3),%r2
        addil   LT'__dl_fini_plabel,%r19
        ldw     RT'__dl_fini_plabel(%r1),%r23
        stw     %r19,4(%r23)
        ldw     4(%r3),%r19
        bv      %r0(%r2)
        depi    2,31,2,%r23

#NO_APP
[snip]

Thanks in advance for your advise and attention,
    Joel

PS: I will join rtld.i file asap

-- 
           Summary: hppa: glibc-2.3.3 pb to build with gcc-3.[45]
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: soete dot joel at tiscali dot be
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: hppa-linux
  GCC host triplet: hppa-linux
GCC target triplet: hppa-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14163


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/14163] hppa: glibc-2.3.3 pb to build with gcc-3.[45]
  2004-02-16 17:23 [Bug c/14163] New: hppa: glibc-2.3.3 pb to build with gcc-3.[45] soete dot joel at tiscali dot be
@ 2004-02-16 17:27 ` soete dot joel at tiscali dot be
  2004-02-16 19:02 ` pinskia at gcc dot gnu dot org
  2004-02-17 11:28 ` soete dot joel at tiscali dot be
  2 siblings, 0 replies; 4+ messages in thread
From: soete dot joel at tiscali dot be @ 2004-02-16 17:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From soete dot joel at tiscali dot be  2004-02-16 17:27 -------
Created an attachment (id=5756)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5756&action=view)
glibc-2.3.3 preprocessed rtld.c

Built with cmd:
/Develop/parisc-linux/xc/bin/hppa-linux-gcc rtld.c -c -save-temps -std=gnu99
-O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g   -fPIC
-mdisable-fpregs   -I../include -I. -I/Develop/parisc-linux/build/glibc/elf
-I.. -I../libio  -I/Develop/parisc-linux/build/glibc -I../sysdeps/hppa/elf
-I../linuxthreads/sysdeps/unix/sysv/linux/hppa
-I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread
-I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv
-I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/hppa
-I../sysdeps/unix/sysv/linux/hppa -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu
-I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet
-I../sysdeps/unix/sysv -I../sysdeps/unix -I../sysdeps/posix
-I../sysdeps/hppa/hppa1.1 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/ldbl-128 -I../sysdeps/hppa/fpu
-I../sysdeps/hppa -I../sysdeps/ieee754 -I../sysdeps/generic/elf
-I../sysdeps/generic -nostdinc -isystem
/Develop/parisc-linux/xc/lib/gcc/hppa-linux/3.5.0/include -isystem
/Develop/parisc-linux/sources/linux/include -D_LIBC_REENTRANT -include
../include/libc-symbols.h  -DPIC -DSHARED -DNOT_IN_libc=1 -DIS_IN_rtld=1     -o
/Develop/parisc-linux/build/glibc/elf/rtld.os -MD -MP -MF
/Develop/parisc-linux/build/glibc/elf/rtld.os.dt

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14163


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/14163] hppa: glibc-2.3.3 pb to build with gcc-3.[45]
  2004-02-16 17:23 [Bug c/14163] New: hppa: glibc-2.3.3 pb to build with gcc-3.[45] soete dot joel at tiscali dot be
  2004-02-16 17:27 ` [Bug c/14163] " soete dot joel at tiscali dot be
@ 2004-02-16 19:02 ` pinskia at gcc dot gnu dot org
  2004-02-17 11:28 ` soete dot joel at tiscali dot be
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-16 19:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-16 19:02 -------
Not a GCC bug, set_dp is not used except in asm which GCC does not know about, marking it as used 
will fix that or using -fno-unit-at-a-time will also.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14163


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/14163] hppa: glibc-2.3.3 pb to build with gcc-3.[45]
  2004-02-16 17:23 [Bug c/14163] New: hppa: glibc-2.3.3 pb to build with gcc-3.[45] soete dot joel at tiscali dot be
  2004-02-16 17:27 ` [Bug c/14163] " soete dot joel at tiscali dot be
  2004-02-16 19:02 ` pinskia at gcc dot gnu dot org
@ 2004-02-17 11:28 ` soete dot joel at tiscali dot be
  2 siblings, 0 replies; 4+ messages in thread
From: soete dot joel at tiscali dot be @ 2004-02-17 11:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From soete dot joel at tiscali dot be  2004-02-17 11:28 -------
(In reply to comment #2)
> Not a GCC bug, set_dp is not used except in asm which GCC does not know about,
ok I could understand (even suspect it originaly ;)

> marking it as used 
> will fix that or using -fno-unit-at-a-time will also.

"-fno-unit-at-a-time" works fine if I compile manually the only rtld.c :)

The pb is that when I add it to my CFLAGS options to rebuild glibc, it is finaly
not used to compile rtld.c :_). So afer looking without success to know howto
"mark a function as used", I finaly have to put you this question: 'how to mark
set_dp() as used'? 

Thanks for previous and additional help,
    Joel


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14163


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-02-17 11:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-16 17:23 [Bug c/14163] New: hppa: glibc-2.3.3 pb to build with gcc-3.[45] soete dot joel at tiscali dot be
2004-02-16 17:27 ` [Bug c/14163] " soete dot joel at tiscali dot be
2004-02-16 19:02 ` pinskia at gcc dot gnu dot org
2004-02-17 11:28 ` soete dot joel at tiscali dot be

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).