1.1 --- a/patches/glibc/2.2.5/cris-libc-symbols.patch Tue Aug 14 19:32:22 2007 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,97 +0,0 @@
1.4 -From http://sources.redhat.com/ml/libc-alpha/2002-06/msg00006.html
1.5 -
1.6 -Message-ID: <15612.44195.299251.921969@honolulu.ilog.fr>
1.7 -Date: Tue, 4 Jun 2002 14:03:47 +0200 (CEST)
1.8 -From: Bruno Haible <bruno at clisp dot org>
1.9 -To: libc-alpha at sources dot redhat dot com
1.10 -Subject: link_warning fix
1.11 -
1.12 -
1.13 -Hi,
1.14 -
1.15 -While cross-compiling glibc-2.2.5 for target=cris-linux using gcc-3.1 and
1.16 -binutils-2.12.90.0.7, I get an error
1.17 -
1.18 -cris-linux-gcc ../sysdeps/unix/sysv/linux/sigstack.c -c -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g -I../include -I. -I/backup/cross-build/build-glibc-cris/signal -I.. -I../libio -I/backup/cross-build/build-glibc-cris -I../sysdeps/cris/elf -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/cris -I../sysdeps/unix/sysv/linux/cris -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/cris -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -nostdinc -isystem /cross/cris-linux-tools/lib/gcc-lib/cris-linux/3.1/include -isystem /cross/cris-linux/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -o /backup/cross-build/build-glibc-cris/signal/sigstack.o
1.19 -/tmp/cca7qZyI.s: Assembler messages:
1.20 -/tmp/cca7qZyI.s:87: Warning: rest of line ignored; first ignored character is `,'
1.21 -/tmp/cca7qZyI.s:87: Error: Unknown opcode: `progbits'
1.22 -make[2]: *** [/backup/cross-build/build-glibc-cris/signal/sigstack.o] Fehler 1
1.23 -
1.24 -
1.25 -The reason is that the .s file contains the following.
1.26 -
1.27 -...
1.28 - .size sigstack,.Lfe1-sigstack
1.29 -#APP
1.30 - .section .gnu.warning.sigstack
1.31 - .previous
1.32 -#NO_APP
1.33 - .section .gnu.warning.sigstack
1.34 - #,"a",@progbits
1.35 - .align 2
1.36 - .type __evoke_link_warning_sigstack,@object
1.37 -...
1.38 -
1.39 -and comments (introduced by '#') are recognized by the assembler only after
1.40 -#APP, not after #NO_APP. The workaround is to add '#APP' to the fake section
1.41 -name. The following patch works for me.
1.42 -
1.43 -2002-06-02 Bruno Haible <bruno@clisp.org>
1.44 -
1.45 - * include/libc-symbols.h (__as_app_line): New macro.
1.46 - (link_warning): Emit #APP line to turn comment recognition on.
1.47 -
1.48 -*** glibc-2.2.5/include/libc-symbols.h.bak 2001-08-04 01:02:52.000000000 +0200
1.49 ---- glibc-2.2.5/include/libc-symbols.h 2002-06-02 16:22:15.000000000 +0200
1.50 -***************
1.51 -*** 207,224 ****
1.52 - # define __make_section_unallocated(section_string)
1.53 - # endif
1.54 -
1.55 -! /* Tacking on "\n\t#" to the section name makes gcc put it's bogus
1.56 -! section attributes on what looks like a comment to the assembler. */
1.57 - # ifdef HAVE_SECTION_QUOTES
1.58 - # define link_warning(symbol, msg) \
1.59 - __make_section_unallocated (".gnu.warning." #symbol) \
1.60 -! static const char __evoke_link_warning_##symbol[] \
1.61 -! __attribute__ ((section (".gnu.warning." #symbol "\"\n\t#\""))) = msg;
1.62 - # else
1.63 - # define link_warning(symbol, msg) \
1.64 - __make_section_unallocated (".gnu.warning." #symbol) \
1.65 -! static const char __evoke_link_warning_##symbol[] \
1.66 -! __attribute__ ((section (".gnu.warning." #symbol "\n\t#"))) = msg;
1.67 - # endif
1.68 - # else /* Not ELF: a.out */
1.69 - # ifdef HAVE_XCOFF
1.70 ---- 207,235 ----
1.71 - # define __make_section_unallocated(section_string)
1.72 - # endif
1.73 -
1.74 -! /* Tacking on "\n\t#" to the section name makes gcc put its bogus
1.75 -! section attributes on what looks like a comment to the assembler.
1.76 -! Furthermore, with gas, we need to add a "#APP" line so the comment
1.77 -! is recognized as such. */
1.78 -! # ifdef HAVE_GNU_AS
1.79 -! # define __as_app_line "#APP\n"
1.80 -! # else
1.81 -! # define __as_app_line ""
1.82 -! # endif
1.83 - # ifdef HAVE_SECTION_QUOTES
1.84 - # define link_warning(symbol, msg) \
1.85 - __make_section_unallocated (".gnu.warning." #symbol) \
1.86 -! static const char __evoke_link_warning_##symbol[] \
1.87 -! __attribute__ \
1.88 -! ((section (".gnu.warning." #symbol "\"\n" __as_app_line "\t#\""))) \
1.89 -! = msg;
1.90 - # else
1.91 - # define link_warning(symbol, msg) \
1.92 - __make_section_unallocated (".gnu.warning." #symbol) \
1.93 -! static const char __evoke_link_warning_##symbol[] \
1.94 -! __attribute__ \
1.95 -! ((section (".gnu.warning." #symbol "\n" __as_app_line "\t#"))) \
1.96 -! = msg;
1.97 - # endif
1.98 - # else /* Not ELF: a.out */
1.99 - # ifdef HAVE_XCOFF
1.100 -