[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Build errors and fixes for building binutils-4.2-138 on Solaris.
- To: power-gnu-discuss@xxxxxxxxxxxxxxxx
- Subject: Build errors and fixes for building binutils-4.2-138 on Solaris.
- From: sjhill1@xxxxxxxxxxxxxxxxxxx
- Date: Thu, 15 May 2008 14:45:04 -0500
Greetings.
I was asked by Daniel to submit my build problems and patches when
using your latest 4.2-138 PowerPC public source release. I am building
a cross toolchain hosted on Solaris. Below is the information picked
up by the configure scripts for binutils and the versions of the tools
hosted on my Solaris box:
build='sparc-sun-solaris2.8'
host='sparc-sun-solaris2.8'
target='powerpc-elf-eabi'
bash-2.03$ gcc -dumpversion
2.95.2
bash-2.03$ gcc -dumpmachine
sparc-sun-solaris2.5.1
bash-2.03$ objdump --version
GNU objdump 2.9.1
Copyright 1997 Free Software Foundation, Inc.
Attached are four errors with corresponding patches needed to fix
building on Solaris. I will be building GCC tomorrow and may have
some patches for that also. My apologies if the attachments and
formatting suck. I have to use Lotus Notes at work. Thanks.
-Steve
BUILD ERROR MESSAGE
-------------------
make[4]: Entering directory `/accts/sjhill1/work/build-binutils/bfd'
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../binutils-stable/bfd -I. -I. -I../../binutils-stable/bfd -I../../binutils-stable/bfd/../include -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c -o bfd.lo ../../binutils-stable/bfd/bfd.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../binutils-stable/bfd -I. -I. -I../../binutils-stable/bfd -I../../binutils-stable/bfd/../include -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c ../../binutils-stable/bfd/bfd.c -o bfd.o
cc1: warnings being treated as errors
../../binutils-stable/bfd/bfd.c: In function `_bfd_abort':
../../binutils-stable/bfd/bfd.c:853: warning: `noreturn' function does return
make[4]: *** [bfd.lo] Error 1
PATCH TO FIX ERROR
------------------
diff -ur binutils-stable/bfd/bfd.c binutils-stable-patched/bfd/bfd.c
--- binutils-stable/bfd/bfd.c 2008-04-06 23:14:05.000000000 -0500
+++ binutils-stable-patched/bfd/bfd.c 2008-05-15 09:12:05.000081000 -0500
@@ -849,7 +849,7 @@
(_("BFD %s internal error, aborting at %s line %d\n"),
BFD_VERSION_STRING, file, line);
(*_bfd_error_handler) (_("Please report this bug.\n"));
- _exit (EXIT_FAILURE);
+ exit (EXIT_FAILURE);
}
/*
=BUILD ERROR MESSAGE
-------------------
make[4]: Entering directory `/accts/sjhill1/work/build-binutils/bfd'
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../binutils-stable/bfd -I. -I. -I../../binutils-stable/bfd -I../../binutils-stable/bfd/../include -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c -o elf.lo ../../binutils-stable/bfd/elf.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../binutils-stable/bfd -I. -I. -I../../binutils-stable/bfd -I../../binutils-stable/bfd/../include -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c ../../binutils-stable/bfd/elf.c -o elf.o
../../binutils-stable/bfd/elf.c:6418: warning: preprocessing directive not recognized within macro arg
../../binutils-stable/bfd/elf.c:6418: warning: preprocessing directive not recognized within macro arg
make[4]: *** [elf.lo] Error 1
PATCH TO FIX ERROR
------------------
diff -ur binutils-stable/bfd/elf.c binutils-stable-patched/bfd/elf.c
--- binutils-stable/bfd/elf.c 2008-04-06 23:14:05.000000000 -0500
+++ binutils-stable-patched/bfd/elf.c 2008-05-15 09:30:36.000173000 -0500
@@ -6411,11 +6411,13 @@
sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_SECTION);
}
else if (bfd_is_com_section (syms[idx]->section))
- sym.st_info = ELF_ST_INFO (STB_GLOBAL,
#ifdef USE_STT_COMMON
+ sym.st_info = ELF_ST_INFO (STB_GLOBAL,
type == STT_OBJECT ? STT_COMMON :
-#endif
type);
+#else
+ sym.st_info = ELF_ST_INFO (STB_GLOBAL, type);
+#endif
else if (bfd_is_und_section (syms[idx]->section))
sym.st_info = ELF_ST_INFO (((flags & BSF_WEAK)
? STB_WEAK
=BUILD ERROR MESSAGE
-------------------
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../binutils-stable/bfd -I. -I. -I../../binutils-stable/bfd -I../../binutils-stable/bfd/../include -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c -o elf32-ppc.lo ../../binutils-stable/bfd/elf32-ppc.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../binutils-stable/bfd -I. -I. -I../../binutils-stable/bfd -I../../binutils-stable/bfd/../include -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c ../../binutils-stable/bfd/elf32-ppc.c -o elf32-ppc.o
../../binutils-stable/bfd/elf32-ppc.c: In function `elf_create_pointer_linker_section':
../../binutils-stable/bfd/elf32-ppc.c:2895: parse error before `*'
../../binutils-stable/bfd/elf32-ppc.c:2898: `ptr' undeclared (first use in this function)
../../binutils-stable/bfd/elf32-ppc.c:2898: (Each undeclared identifier is reported only once
../../binutils-stable/bfd/elf32-ppc.c:2898: for each function it appears in.)
make[4]: *** [elf32-ppc.lo] Error 1
PATCH TO FIX ERROR
------------------
diff -ur binutils-stable/bfd/elf32-ppc.c binutils-stable-patched/bfd/elf32-ppc.c
--- binutils-stable/bfd/elf32-ppc.c 2008-04-06 23:14:05.000000000 -0500
+++ binutils-stable-patched/bfd/elf32-ppc.c 2008-05-15 09:23:33.000879000 -0500
@@ -2889,11 +2889,11 @@
}
else
{
- BFD_ASSERT (is_ppc_elf_target (abfd->xvec));
-
/* Allocation of a pointer to a local symbol. */
elf_linker_section_pointers_t **ptr = elf_local_ptr_offsets (abfd);
+ BFD_ASSERT (is_ppc_elf_target (abfd->xvec));
+
/* Allocate a table to hold the local symbols if first time. */
if (!ptr)
{
=BUILD ERROR MESSAGE
-------------------
gcc -DHAVE_CONFIG_H -I. -I../../binutils-stable/binutils -I. -I. -I../../binutils-stable/binutils -I../bfd -I../../binutils-stable/binutils/../bfd -I../../binutils-stable/binutils/../include -DLOCALEDIR="\"/accts/sjhill1/toolchains/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c ../../binutils-stable/binutils/readelf.c
cc1: warnings being treated as errors
../../binutils-stable/binutils/readelf.c: In function `dump_section_as_strings':
../../binutils-stable/binutils/readelf.c:7953: warning: unknown conversion type character `t' in format
../../binutils-stable/binutils/readelf.c:7953: warning: format argument is not a pointer (arg 2)
../../binutils-stable/binutils/readelf.c:7953: warning: too many arguments for format
make[4]: *** [readelf.o] Error 1
PATCH TO FIX ERROR
------------------
diff -ur binutils-stable/binutils/readelf.c binutils-stable-patched/binutils/readelf.c
--- binutils-stable/binutils/readelf.c 2008-04-06 23:13:48.000000000 -0500
+++ binutils-stable-patched/binutils/readelf.c 2008-05-15 09:57:43.000198000 -0500
@@ -7950,7 +7950,7 @@
if (data < end)
{
#ifndef __MSVCRT__
- printf (" [%6tx] %s\n", data - start, data);
+ printf (" [0x%6x] %s\n", (int) (data - start), data);
#else
printf (" [%6Ix] %s\n", (size_t) (data - start), data);
#endif
=