noticed while playing with uClibc/alpha port ... a function that was defined as
being hidden/weak causes build failures for alpha but no other target.

testing mostly on my amd64 box cross-compiling for alpha/uclibc, but a native
alpha/glibc compiler exhibits the same issues.  tested gcc 3.4.5, 4.0.2, and a
semi-recent version of 4.1.0.

$ alpha-gentoo-linux-uclibc-gcc alpha-hidden-weak.c -nostdlib
/tmp/cco53Air.o: In function `_start': relocation truncated to fit: GPRELHIGH
against undefined symbol `_stdio_init'
collect2: ld returned 1 exit status

$ alpha-gentoo-linux-uclibc-gcc -v
Reading specs from /usr/lib/gcc/alpha-gentoo-linux-uclibc/3.4.5/specs
Configured with:
/var/tmp/cross/alpha-gentoo-linux-uclibc/portage/gcc-3.4.5/work/gcc-3.4.5/configure
--prefix=/usr --bindir=/usr/alpha-gentoo-linux-uclibc/gcc-bin/3.4.5
--includedir=/usr/lib/gcc/alpha-gentoo-linux-uclibc/3.4.5/include
--datadir=/usr/share/gcc-data/alpha-gentoo-linux-uclibc/3.4.5
--mandir=/usr/share/gcc-data/alpha-gentoo-linux-uclibc/3.4.5/man
--infodir=/usr/share/gcc-data/alpha-gentoo-linux-uclibc/3.4.5/info
--with-gxx-include-dir=/usr/lib/gcc/alpha-gentoo-linux-uclibc/3.4.5/include/g++-v3
--host=x86_64-pc-linux-gnu --target=alpha-gentoo-linux-uclibc
--build=x86_64-pc-linux-gnu --disable-altivec --disable-nls --with-system-zlib
--disable-checking --disable-werror --disable-libunwind-exceptions
--disable-multilib --disable-libmudflap --disable-libgcj --enable-languages=c
--disable-shared --disable-threads --without-headers --disable-__cxa_atexit
--enable-target-optspace --enable-clocale=uclibc
Thread model: single
gcc version 3.4.5 (Gentoo 3.4.5, ssp-3.4.5-1.0, pie-8.7.9)


-- 
           Summary: hidden weak extern functions fail regardless of
                    existence on alpha/linux
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: vapier at gentoo dot org
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: alpha-linux-gnu


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

Reply via email to