This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sparc64-elf crt0.o fails to compile


Without looking at the source--this error refers to using a global
register other than g0 or g1 without "declaring" it as used. Most
often this presents as g2 or g3. The ABI restricts the use of global
registers. You need to add:

.register %g2, #scratch

to the top of the assembly file to specify that g2 is used in the assembly.

-Gedare

On Thu, Dec 25, 2014 at 3:02 PM, Yaakov Selkowitz <yselkowi@redhat.com> wrote:
> With binutils-2.25, gcc-4.9.2, and newlib-2.2.0 --target=sparc64-elf:
>
> make[3]: Entering directory
> '/usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/build/sparc64-elf/sparc64-elf/libgloss/sparc'
> sparc64-elf-gcc
> -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/build/sparc64-elf/sparc64-elf/newlib/
> -isystem
> /usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/build/sparc64-elf/sparc64-elf/newlib/targ-include
> -isystem
> /usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/src/newlib-2.2.0/newlib/libc/include
> -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/build/sparc64-elf/sparc64-elf/libgloss/sparc
> -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/build/sparc64-elf/sparc64-elf/libgloss/libnosys
> -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/src/newlib-2.2.0/libgloss/sparc
> -g -ggdb -O2 -pipe -Wimplicit-function-declaration -g -ggdb -O2 -pipe
> -Wimplicit-function-declaration -I.
> -I/usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/src/newlib-2.2.0/libgloss/sparc/..
> -o crt0.o -c
> /usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/src/newlib-2.2.0/libgloss/sparc/crt0.S
> /usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/src/newlib-2.2.0/libgloss/sparc/crt0.S:
> Assembler messages:
> /usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/src/newlib-2.2.0/libgloss/sparc/crt0.S:44:
> Error: detected global register use not covered by .register pseudo-op
> /usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/src/newlib-2.2.0/libgloss/sparc/crt0.S:45:
> Error: detected global register use not covered by .register pseudo-op
> /usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/src/newlib-2.2.0/libgloss/sparc/crt0.S:45:
> Error: detected global register use not covered by .register pseudo-op
> /usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/src/newlib-2.2.0/libgloss/sparc/crt0.S:45:
> Error: detected global register use not covered by .register pseudo-op
> /usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/src/newlib-2.2.0/libgloss/sparc/crt0.S:46:
> Error: detected global register use not covered by .register pseudo-op
> /usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/src/newlib-2.2.0/libgloss/sparc/crt0.S:47:
> Error: detected global register use not covered by .register pseudo-op
> /usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/src/newlib-2.2.0/libgloss/sparc/crt0.S:47:
> Error: detected global register use not covered by .register pseudo-op
> /usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/src/newlib-2.2.0/libgloss/sparc/crt0.S:47:
> Error: detected global register use not covered by .register pseudo-op
> /usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/src/newlib-2.2.0/libgloss/sparc/crt0.S:50:
> Error: detected global register use not covered by .register pseudo-op
> /usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/src/newlib-2.2.0/libgloss/sparc/crt0.S:50:
> Error: detected global register use not covered by .register pseudo-op
> /usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/src/newlib-2.2.0/libgloss/sparc/crt0.S:51:
> Error: detected global register use not covered by .register pseudo-op
> /usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/src/newlib-2.2.0/libgloss/sparc/crt0.S:51:
> Error: detected global register use not covered by .register pseudo-op
> /usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/src/newlib-2.2.0/libgloss/sparc/crt0.S:51:
> Error: detected global register use not covered by .register pseudo-op
> /usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/src/newlib-2.2.0/libgloss/sparc/crt0.S:52:
> Error: detected global register use not covered by .register pseudo-op
> /usr/src/ports/cross-newlib/cross-newlib-2.2.0-1.x86_64/src/newlib-2.2.0/libgloss/sparc/crt0.S:52:
> Error: detected global register use not covered by .register pseudo-op
>
> --
> Yaakov Selkowitz
> Associate Software Engineer, ARM
> Red Hat, Inc.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]