public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* build failure
@ 2009-03-12 19:41 Tom Tromey
  2009-03-12 20:01 ` H.J. Lu
  2009-03-12 20:03 ` Tom Tromey
  0 siblings, 2 replies; 17+ messages in thread
From: Tom Tromey @ 2009-03-12 19:41 UTC (permalink / raw)
  To: Binutils Development

On x86 Fedora 9, with --enable-targets=all, the CVS head build fails
as appended.

On this machine, bfd_vma is a 32 bit type.

Tom

/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src/bfd -I. -DTRAD_CORE   -I. -I../../src/bfd -I../../src/bfd/../include    -g3 -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g3 -c -o elf32-score.lo ../../src/bfd/elf32-score.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/bfd -I. -DTRAD_CORE -I. -I../../src/bfd -I../../src/bfd/../include -g3 -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g3 -c ../../src/bfd/elf32-score.c -o elf32-score.o
cc1: warnings being treated as errors
../../src/bfd/elf32-score.c: In function ‘score3_bfd_putl48’:
../../src/bfd/elf32-score.c:290: error: right shift count >= width of type
../../src/bfd/elf32-score.c:291: error: right shift count >= width of type
../../src/bfd/elf32-score.c: At top level:
../../src/bfd/elf32-score.c:957: error: large integer implicitly truncated to unsigned type
../../src/bfd/elf32-score.c:957: error: large integer implicitly truncated to unsigned type
../../src/bfd/elf32-score.c:972: error: large integer implicitly truncated to unsigned type
../../src/bfd/elf32-score.c:972: error: large integer implicitly truncated to unsigned type
../../src/bfd/elf32-score.c: In function ‘score_elf_final_link_relocate’:
../../src/bfd/elf32-score.c:2199: error: right shift count >= width of type
../../src/bfd/elf32-score.c:2212: error: left shift count >= width of type
../../src/bfd/elf32-score.c:2226: error: right shift count >= width of type
../../src/bfd/elf32-score.c:2232: error: left shift count >= width of type
../../src/bfd/elf32-score.c: In function ‘s3_bfd_score_elf_relocate_section’:
../../src/bfd/elf32-score.c:2521: error: right shift count >= width of type
../../src/bfd/elf32-score.c:2530: error: left shift count >= width of type
../../src/bfd/elf32-score.c:2541: error: right shift count >= width of type
../../src/bfd/elf32-score.c:2557: error: left shift count >= width of type
make[2]: *** [elf32-score.lo] Error 1

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

* Re: build failure
  2009-03-12 19:41 build failure Tom Tromey
@ 2009-03-12 20:01 ` H.J. Lu
  2009-03-12 20:03 ` Tom Tromey
  1 sibling, 0 replies; 17+ messages in thread
From: H.J. Lu @ 2009-03-12 20:01 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Binutils Development

On Thu, Mar 12, 2009 at 12:41 PM, Tom Tromey <tromey@redhat.com> wrote:
> On x86 Fedora 9, with --enable-targets=all, the CVS head build fails
> as appended.
>
> On this machine, bfd_vma is a 32 bit type.
>
> Tom
>
> /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src/bfd -I. -DTRAD_CORE   -I. -I../../src/bfd -I../../src/bfd/../include    -g3 -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g3 -c -o elf32-score.lo ../../src/bfd/elf32-score.c
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/bfd -I. -DTRAD_CORE -I. -I../../src/bfd -I../../src/bfd/../include -g3 -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g3 -c ../../src/bfd/elf32-score.c -o elf32-score.o
> cc1: warnings being treated as errors
> ../../src/bfd/elf32-score.c: In function ‘score3_bfd_putl48’:
> ../../src/bfd/elf32-score.c:290: error: right shift count >= width of type
> ../../src/bfd/elf32-score.c:291: error: right shift count >= width of type
> ../../src/bfd/elf32-score.c: At top level:
> ../../src/bfd/elf32-score.c:957: error: large integer implicitly truncated to unsigned type
> ../../src/bfd/elf32-score.c:957: error: large integer implicitly truncated to unsigned type
> ../../src/bfd/elf32-score.c:972: error: large integer implicitly truncated to unsigned type
> ../../src/bfd/elf32-score.c:972: error: large integer implicitly truncated to unsigned type
> ../../src/bfd/elf32-score.c: In function ‘score_elf_final_link_relocate’:
> ../../src/bfd/elf32-score.c:2199: error: right shift count >= width of type
> ../../src/bfd/elf32-score.c:2212: error: left shift count >= width of type
> ../../src/bfd/elf32-score.c:2226: error: right shift count >= width of type
> ../../src/bfd/elf32-score.c:2232: error: left shift count >= width of type
> ../../src/bfd/elf32-score.c: In function ‘s3_bfd_score_elf_relocate_section’:
> ../../src/bfd/elf32-score.c:2521: error: right shift count >= width of type
> ../../src/bfd/elf32-score.c:2530: error: left shift count >= width of type
> ../../src/bfd/elf32-score.c:2541: error: right shift count >= width of type
> ../../src/bfd/elf32-score.c:2557: error: left shift count >= width of type
> make[2]: *** [elf32-score.lo] Error 1
>

Sounds like Score needs set want64=true in config.bfd.


-- 
H.J.

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

* Re: build failure
  2009-03-12 19:41 build failure Tom Tromey
  2009-03-12 20:01 ` H.J. Lu
@ 2009-03-12 20:03 ` Tom Tromey
  2009-03-13 11:25   ` Nick Clifton
  1 sibling, 1 reply; 17+ messages in thread
From: Tom Tromey @ 2009-03-12 20:03 UTC (permalink / raw)
  To: Binutils Development

>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:

Tom> On x86 Fedora 9, with --enable-targets=all, the CVS head build fails
Tom> as appended.

I stopped a little too soon, as there is also a similar failure in
opcodes.

Ordinarily I would just fix problems like this, but I don't know BFD
well enough to know what the preferred approach might be.

Tom

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/opcodes -I. -I. -I../../src/opcodes -I../bfd -I../../src/opcodes/../include -I../../src/opcodes/../bfd -g3 -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g3 -c ../../src/opcodes/score-dis.c -o score-dis.o
cc1: warnings being treated as errors
../../src/opcodes/score-dis.c:72: error: large integer implicitly truncated to unsigned type
../../src/opcodes/score-dis.c:72: error: large integer implicitly truncated to unsigned type
../../src/opcodes/score-dis.c:73: error: large integer implicitly truncated to unsigned type
../../src/opcodes/score-dis.c:73: error: large integer implicitly truncated to unsigned type
../../src/opcodes/score-dis.c:270: error: large integer implicitly truncated to unsigned type
../../src/opcodes/score-dis.c:288: error: large integer implicitly truncated to unsigned type
../../src/opcodes/score-dis.c:381: error: large integer implicitly truncated to unsigned type
../../src/opcodes/score-dis.c:381: error: large integer implicitly truncated to unsigned type
../../src/opcodes/score-dis.c:382: error: large integer implicitly truncated to unsigned type
../../src/opcodes/score-dis.c:382: error: large integer implicitly truncated to unsigned type
../../src/opcodes/score-dis.c:406: error: large integer implicitly truncated to unsigned type
../../src/opcodes/score-dis.c:438: error: large integer implicitly truncated to unsigned type
../../src/opcodes/score-dis.c: In function ‘s3_print_insn’:
../../src/opcodes/score-dis.c:1118: error: left shift count >= width of type
../../src/opcodes/score-dis.c:1118: error: left shift count >= width of type
../../src/opcodes/score-dis.c:1124: error: left shift count >= width of type

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

* Re: build failure
  2009-03-12 20:03 ` Tom Tromey
@ 2009-03-13 11:25   ` Nick Clifton
  2009-03-13 17:34     ` Tom Tromey
  0 siblings, 1 reply; 17+ messages in thread
From: Nick Clifton @ 2009-03-13 11:25 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Binutils Development

[-- Attachment #1: Type: text/plain, Size: 496 bytes --]

Hi Tom,

The score port is a little weird.  It is a 32-bit target with a few 
48-bit instructions.  So it needs a 64-bit bfd_vma in order to cope with 
those extra long instrcutions, but everything else is 32-bits.

   Please try the attached patch which changes the score target so that 
it is grouped with the 64-bit targets in the bfd directory and changes 
the score-dis.c opcodes file so that it is basically empty unless BFD64 
is defined.  I think that this should work.

Cheers
   Nick



[-- Attachment #2: score.patch --]
[-- Type: text/plain, Size: 5828 bytes --]

Index: bfd/Makefile.am
===================================================================
RCS file: /cvs/src/src/bfd/Makefile.am,v
retrieving revision 1.221
diff -c -3 -p -r1.221 Makefile.am
*** bfd/Makefile.am	3 Mar 2009 02:41:10 -0000	1.221
--- bfd/Makefile.am	13 Mar 2009 11:19:48 -0000
*************** BFD32_BACKENDS = \
*** 288,295 ****
  	elf32-pj.lo \
  	elf32-ppc.lo \
  	elf32-s390.lo \
- 	elf32-score.lo \
- 	elf32-score7.lo \
  	elf32-sh.lo \
  	elf32-sh-symbian.lo \
  	elf32-sh64.lo \
--- 288,293 ----
*************** BFD32_BACKENDS_CFILES = \
*** 474,481 ****
  	elf32-sh64.c \
  	elf32-sh64-com.c \
  	elf32-s390.c \
- 	elf32-score.c \
- 	elf32-score7.c \
  	elf32-sh.c \
  	elf32-sh-symbian.c \
  	elfxx-sparc.c \
--- 472,477 ----
*************** BFD64_BACKENDS = \
*** 588,593 ****
--- 584,591 ----
  	elfn32-mips.lo \
  	elf64-mips.lo \
  	elf64-mmix.lo \
+ 	elf32-score.lo \
+ 	elf32-score7.lo \
  	elf64-sh64.lo \
  	elf64-ppc.lo \
  	elf64-s390.lo \
*************** BFD64_BACKENDS_CFILES = \
*** 623,628 ****
--- 621,628 ----
  	elf64-mmix.c \
  	elf64-ppc.c \
  	elf64-s390.c \
+ 	elf32-score.c \
+ 	elf32-score7.c \
  	elf64-sh64.c \
  	elf64-sparc.c \
  	elf64.c \
Index: bfd/config.bfd
===================================================================
RCS file: /cvs/src/src/bfd/config.bfd,v
retrieving revision 1.244
diff -c -3 -p -r1.244 config.bfd
*** bfd/config.bfd	15 Jan 2009 12:42:51 -0000	1.244
--- bfd/config.bfd	13 Mar 2009 11:19:50 -0000
*************** case "${targ}" in
*** 1192,1205 ****
      targ_defvec=bfd_elf64_s390_vec
      want64=true
      ;;
- #endif
  
    score*-*-elf*)
      targ_defvec=bfd_elf32_bigscore_vec
      targ_selvecs=bfd_elf32_littlescore_vec
      ;;
  
- #ifdef BFD64
    sh64l*-*-elf*)
      targ_defvec=bfd_elf32_sh64l_vec
      targ_selvecs="bfd_elf32_sh64_vec bfd_elf64_sh64l_vec bfd_elf64_sh64_vec bfd_elf32_shl_vec bfd_elf32_sh_vec"
--- 1192,1203 ----
Index: bfd/configure.in
===================================================================
RCS file: /cvs/src/src/bfd/configure.in,v
retrieving revision 1.256
diff -c -3 -p -r1.256 configure.in
*** bfd/configure.in	4 Mar 2009 02:10:33 -0000	1.256
--- bfd/configure.in	13 Mar 2009 11:19:55 -0000
*************** do
*** 746,753 ****
      bfd_elf32_powerpcle_vec)	tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
      bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
      bfd_elf32_s390_vec)		tb="$tb elf32-s390.lo elf32.lo $elf" ;;
!     bfd_elf32_bigscore_vec)     tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true;;
!     bfd_elf32_littlescore_vec)  tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true;;
      # FIXME: We include cofflink.lo not because it's needed for
      # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
      # which needs it but does not list it.  Should be fixed in right place.
--- 746,753 ----
      bfd_elf32_powerpcle_vec)	tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
      bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
      bfd_elf32_s390_vec)		tb="$tb elf32-s390.lo elf32.lo $elf" ;;
!     bfd_elf32_bigscore_vec)     tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64;;
!     bfd_elf32_littlescore_vec)  tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64;;
      # FIXME: We include cofflink.lo not because it's needed for
      # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
      # which needs it but does not list it.  Should be fixed in right place.
Index: bfd/targets.c
===================================================================
RCS file: /cvs/src/src/bfd/targets.c,v
retrieving revision 1.166
diff -c -3 -p -r1.166 targets.c
*** bfd/targets.c	15 Jan 2009 12:42:52 -0000	1.166
--- bfd/targets.c	13 Mar 2009 11:20:02 -0000
*************** static const bfd_target * const _bfd_tar
*** 980,987 ****
  	&bfd_elf32_powerpc_vxworks_vec,
  	&bfd_elf32_powerpcle_vec,
  	&bfd_elf32_s390_vec,
  	&bfd_elf32_bigscore_vec,
! 	&bfd_elf32_littlescore_vec, 
          &bfd_elf32_sh_vec,
          &bfd_elf32_shblin_vec,
          &bfd_elf32_shl_vec,
--- 980,989 ----
  	&bfd_elf32_powerpc_vxworks_vec,
  	&bfd_elf32_powerpcle_vec,
  	&bfd_elf32_s390_vec,
+ #ifdef BFD64
  	&bfd_elf32_bigscore_vec,
! 	&bfd_elf32_littlescore_vec,
! #endif
          &bfd_elf32_sh_vec,
          &bfd_elf32_shblin_vec,
          &bfd_elf32_shl_vec,
Index: opcodes/score-dis.c
===================================================================
RCS file: /cvs/src/src/opcodes/score-dis.c,v
retrieving revision 1.4
diff -c -3 -p -r1.4 score-dis.c
*** opcodes/score-dis.c	2 Mar 2009 10:33:08 -0000	1.4
--- opcodes/score-dis.c	13 Mar 2009 11:20:02 -0000
***************
*** 34,40 ****
  #include "elf/internal.h"
  #include "elf/score.h"
  
! /*****************************************************************************/
  /* s3_s7: opcodes and export prototypes.  */
  extern int 
  s7_print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little);
--- 33,39 ----
  #include "elf/internal.h"
  #include "elf/score.h"
  
! #ifdef BFD64
  /* s3_s7: opcodes and export prototypes.  */
  extern int 
  s7_print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little);
*************** print_insn_little_score (bfd_vma pc, str
*** 1194,1196 ****
--- 1193,1210 ----
    else
      return s7_print_insn (pc, info, TRUE);
  }
+ #else /* not BFD64 */
+ int
+ print_insn_big_score (bfd_vma pc ATTRIBUTE_UNUSED,
+ 		      struct disassemble_info * info ATTRIBUTE_UNUSED)
+ {
+   abort ();
+ }
+ 
+ int
+ print_insn_little_score (bfd_vma pc ATTRIBUTE_UNUSED,
+ 			 struct disassemble_info * info ATTRIBUTE_UNUSED)
+ {
+   abort ();
+ }
+ #endif 

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

* Re: build failure
  2009-03-13 11:25   ` Nick Clifton
@ 2009-03-13 17:34     ` Tom Tromey
  2009-03-18 16:58       ` Nick Clifton
  0 siblings, 1 reply; 17+ messages in thread
From: Tom Tromey @ 2009-03-13 17:34 UTC (permalink / raw)
  To: Nick Clifton; +Cc: Binutils Development

>>>>> "Nick" == Nick Clifton <nickc@redhat.com> writes:

Nick>   Please try the attached patch which changes the score target so that
Nick> it is grouped with the 64-bit targets in the bfd directory and changes
Nick> the score-dis.c opcodes file so that it is basically empty unless
Nick> BFD64 is defined.  I think that this should work.

This worked for me, thanks.

Tom

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

* Re: build failure
  2009-03-13 17:34     ` Tom Tromey
@ 2009-03-18 16:58       ` Nick Clifton
  0 siblings, 0 replies; 17+ messages in thread
From: Nick Clifton @ 2009-03-18 16:58 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Binutils Development

Hi Tom,

> This worked for me, thanks.

OK, I have checked in the patch along with these changelog entries.

Cheers
   Nick

bfd/ChangeLog
2009-03-18  Nick Clifton  <nickc@redhat.com>

	* Makefile.am (BFD32_BACKENDS): Remove elf32-score and
	elf32-score7 files.
	(BFD32_BACKEND_CFILES): Likewise.
	(BFD64_BACKENDS): Add elf32-score and elf32-score7 files.
	(BFD64_BACKENDS_CFILES): Likewise.
	* Makefile.in: Regenerate.
	* config.bfd: More Score targets into BFD64 list.
	* configure.in: Move score vectors to 64-bit list.
	* targets.c: Likewise.

opcodes/ChangeLog
2009-03-18  Nick Clifton  <nickc@redhat.com>

	* score-dis.c: Only compile when 64-bit bfds are enabled.

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

* RE: Build failure
  2016-01-21 10:58 ARC: Build failure Nick Clifton
@ 2016-01-21 12:13 ` Cupertino Miranda
  0 siblings, 0 replies; 17+ messages in thread
From: Cupertino Miranda @ 2016-01-21 12:13 UTC (permalink / raw)
  To: Nick Clifton, Cupertino.Miranda, Claudiu.Zissulescu; +Cc: binutils

Hi Nick,

Sorry for that, we did not try it on 32bit machine. :-(
From our side we have no objections to your patch.
Thanks for the fix.

Cheers,
Cupertino

PS: BTW, indeed in the Changelog our last names got reverse with the first ones.
For future reference, Miranda and Zissulescu are our last names. ;-)

> -----Original Message-----
> From: Nick Clifton [mailto:nickc@redhat.com]
> Sent: Thursday, January 21, 2016 11:59 AM
> To: Cupertino.Miranda@synopsys.com; Claudiu.Zissulescu@synopsys.com
> Cc: binutils@sourceware.org
> Subject: ARC: Build failure
> 
> Hi Miranda, Hi Zissulescu,
> 
>   I have just started encountering a build failure when building an
>   all-targets toolchain configured for a 32-bit host:
> 
> bfd/elf32-arc.c: In function 'elf_arc_finish_dynamic_symbol':
> bfd/elf32-arc.c:2248:21: error: cast from pointer to integer of different size [-
> Werror=pointer-to-int-cast]
>        bfd_vma loc = (bfd_vma) srelbss->contents
>                      ^
> bfd/elf32-arc.c:2257:52: error: cast to pointer from integer of different size [-
> Werror=int-to-pointer-cast]
>        bfd_elf32_swap_reloca_out (output_bfd, &rel, (bfd_byte *) loc);
>                                                     ^
>   There are several more failures like this.
> 
>   I am not sure why you are using a bfd_vma to hold the location value,
>   but a patch like the one below fixes the build problem for me.  Do you
>   have any objections to my applying it ?
> 
> Cheers
>   Nick
> 
> diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c index 0931c4e..8a46a2c 100644
> --- a/bfd/elf32-arc.c
> +++ b/bfd/elf32-arc.c
> @@ -55,9 +55,9 @@ name_for_global_symbol (struct elf_link_hash_entry
> *h)
>    {									\
>      struct elf_link_hash_table *_htab = elf_hash_table (info);		\
>      Elf_Internal_Rela _rel;						\
> -    bfd_vma _loc;							\
> +    bfd_byte * _loc;							\
>  									\
> -    _loc = (bfd_vma) _htab->srel##SECTION->contents			\
> +    _loc = _htab->srel##SECTION->contents				\
>        + ((_htab->srel##SECTION->reloc_count)				\
>  	 * sizeof (Elf32_External_Rela));				\
>      _htab->srel##SECTION->reloc_count++;				\
> @@ -65,7 +65,7 @@ name_for_global_symbol (struct elf_link_hash_entry
> *h)
>      _rel.r_offset = (_htab->s##SECTION)->output_section->vma
> 	\
>        + (_htab->s##SECTION)->output_offset + OFFSET;			\
>      _rel.r_info = ELF32_R_INFO (SYM_IDX, TYPE);
> 	\
> -    bfd_elf32_swap_reloca_out (BFD, &_rel, (bfd_byte *) _loc);
> 	\
> +    bfd_elf32_swap_reloca_out (BFD, &_rel, _loc);			\
>    }
> 
>  struct arc_local_data
> @@ -2245,8 +2245,8 @@ GOT_OFFSET = 0x%x, GOT_VMA = 0x%x, INDEX =
> %d, ADDEND = 0x%x\n",
>  	bfd_get_section_by_name (h->root.u.def.section->owner,
>  				 ".rela.bss");
> 
> -      bfd_vma loc = (bfd_vma) srelbss->contents
> -		    + (srelbss->reloc_count * sizeof (Elf32_External_Rela));
> +      bfd_byte * loc = srelbss->contents
> +	+ (srelbss->reloc_count * sizeof (Elf32_External_Rela));
>        srelbss->reloc_count++;
> 
>        Elf_Internal_Rela rel;
> @@ -2254,7 +2254,7 @@ GOT_OFFSET = 0x%x, GOT_VMA = 0x%x, INDEX =
> %d, ADDEND = 0x%x\n",
>        rel.r_offset = rel_offset;
>        rel.r_info = ELF32_R_INFO (h->dynindx, R_ARC_COPY);
> 
> -      bfd_elf32_swap_reloca_out (output_bfd, &rel, (bfd_byte *) loc);
> +      bfd_elf32_swap_reloca_out (output_bfd, &rel, loc);
>      }
> 
>    /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute.  */

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

* Re: Build Failure
  2009-05-05  2:15 Build Failure Ben Woodcroft
  2009-05-05  2:38 ` DJ Delorie
@ 2009-05-05  3:38 ` Alan Modra
  1 sibling, 0 replies; 17+ messages in thread
From: Alan Modra @ 2009-05-05  3:38 UTC (permalink / raw)
  To: Ben Woodcroft; +Cc: binutils

On Tue, May 05, 2009 at 12:14:58PM +1000, Ben Woodcroft wrote:
[snip]
> but old glibc on i686.
[snip]
> .././../binutils-2.19.1/bfd/archive.c:2322: error: dereferencing
> pointer '__u' does break strict-aliasing rules

This will be from the definition of memset in your system headers.
configure with --disable-werror

-- 
Alan Modra
Australia Development Lab, IBM

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

* Re: Build Failure
  2009-05-05  2:15 Build Failure Ben Woodcroft
@ 2009-05-05  2:38 ` DJ Delorie
  2009-05-05  3:38 ` Alan Modra
  1 sibling, 0 replies; 17+ messages in thread
From: DJ Delorie @ 2009-05-05  2:38 UTC (permalink / raw)
  To: Ben Woodcroft; +Cc: binutils


For this combination, you may want -fno-strict-aliasing .

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

* Build Failure
@ 2009-05-05  2:15 Ben Woodcroft
  2009-05-05  2:38 ` DJ Delorie
  2009-05-05  3:38 ` Alan Modra
  0 siblings, 2 replies; 17+ messages in thread
From: Ben Woodcroft @ 2009-05-05  2:15 UTC (permalink / raw)
  To: binutils

Hi,

I've never built binutils before, so I'm not sure if I'm doing
something stupid, but I wasn't able to find this error on google. I'm
using gcc and so therefore using a separate build directory
(binutils-2.19.1-build). I'm using the newest version of gcc (4.4.0)
and make (3.81), but old glibc on i686. I'm trying to install glibc
eventually, but it says I need a newer version of ld and as - hence
I'm installing binutils.

Does anyone have any ideas on how to fix this? Thanks in advance.

[ben@alfred binutils-2.19.1-build]$ ./../binutils-2.19.1/configure
--prefix=/home/ben/install
... (works fine)
[ben@alfred binutils-2.19.1-build]$ make
...
make[4]: Entering directory `/home/ben/programs/binutils-2.19.1-build/bfd'
rm -f bfd-tmp.h
cp bfd-in3.h bfd-tmp.h
/bin/sh .././../binutils-2.19.1/bfd/../move-if-change bfd-tmp.h bfd.h
rm -f bfd-tmp.h
touch stmp-bfd-h
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.
-I.././../binutils-2.19.1/bfd -I. -DTRAD_CORE -I.
-I.././../binutils-2.19.1/bfd -I.././../binutils-2.19.1/bfd/../include
-W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c -o
archive.lo .././../binutils-2.19.1/bfd/archive.c
libtool: compile: gcc -DHAVE_CONFIG_H -I.
-I.././../binutils-2.19.1/bfd -I. -DTRAD_CORE -I.
-I.././../binutils-2.19.1/bfd -I.././../binutils-2.19.1/bfd/../include
-W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c
.././../binutils-2.19.1/bfd/archive.c -o archive.o
cc1: warnings being treated as errors
.././../binutils-2.19.1/bfd/archive.c: In function
'_bfd_archive_bsd_update_armap_timestamp':
.././../binutils-2.19.1/bfd/archive.c:2322: error: dereferencing
pointer '__u' does break strict-aliasing rules
.././../binutils-2.19.1/bfd/archive.c:2322: note: initialized from here
.././../binutils-2.19.1/bfd/archive.c:2322: error: dereferencing
pointer '__u' does break strict-aliasing rules
.././../binutils-2.19.1/bfd/archive.c:2322: note: initialized from here
.././../binutils-2.19.1/bfd/archive.c:2322: error: dereferencing
pointer '__u' does break strict-aliasing rules
.././../binutils-2.19.1/bfd/archive.c:2322: note: initialized from here
make[4]: *** [archive.lo] Error 1
make[4]: Leaving directory `/home/ben/programs/binutils-2.19.1-build/bfd'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/ben/programs/binutils-2.19.1-build/bfd'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/ben/programs/binutils-2.19.1-build/bfd'
make[1]: *** [all-bfd] Error 2
make[1]: Leaving directory `/home/ben/programs/binutils-2.19.1-build'
make: *** [all] Error 2


Thanks again in advance,
ben

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

* Re: build failure
  2007-05-14 22:55 ` H. J. Lu
@ 2007-05-14 23:04   ` Greg Schafer
  0 siblings, 0 replies; 17+ messages in thread
From: Greg Schafer @ 2007-05-14 23:04 UTC (permalink / raw)
  To: H. J. Lu; +Cc: binutils

Thanks for the lightning fast response. Yes, it does the trick.

Thank you.
Greg


On Mon, May 14, 2007 at 03:55:17PM -0700, H. J. Lu wrote:
> Can you try this?
> 
> H.J.
> ---
> --- gprof/hist.c.isoc	2007-04-10 12:03:52.000000000 -0700
> +++ gprof/hist.c	2007-05-14 15:54:06.000000000 -0700
> @@ -296,10 +296,10 @@ scale_and_align_entries ()
>  
>    for (sym = symtab.base; sym < symtab.limit; sym++)
>      {
> -      sym->hist.scaled_addr = sym->addr / sizeof (UNIT);
> -
>        histogram *r = find_histogram_for_pc (sym->addr);
>  
> +      sym->hist.scaled_addr = sym->addr / sizeof (UNIT);
> +
>        if (r)
>  	{
>  	  bin_of_entry = (sym->hist.scaled_addr - r->lowpc) / hist_scale;

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

* Re: build failure
  2007-05-14 22:39 build failure Greg Schafer
@ 2007-05-14 22:55 ` H. J. Lu
  2007-05-14 23:04   ` Greg Schafer
  0 siblings, 1 reply; 17+ messages in thread
From: H. J. Lu @ 2007-05-14 22:55 UTC (permalink / raw)
  To: Greg Schafer; +Cc: binutils

On Tue, May 15, 2007 at 08:40:03AM +1000, Greg Schafer wrote:
> Hi
> 
> Trying to bootstrap recent binutils (2.17.50.0.16 by HJ) from an ancient
> RH62 system and the build is bombing in gprof. Compiler is egcs-2.91.66. Any
> takers?
> 
> I guess this commit has something to do with it:
> 
> http://sourceware.org/ml/binutils-cvs/2007-04/msg00038.html
> 

Can you try this?

H.J.
---
--- gprof/hist.c.isoc	2007-04-10 12:03:52.000000000 -0700
+++ gprof/hist.c	2007-05-14 15:54:06.000000000 -0700
@@ -296,10 +296,10 @@ scale_and_align_entries ()
 
   for (sym = symtab.base; sym < symtab.limit; sym++)
     {
-      sym->hist.scaled_addr = sym->addr / sizeof (UNIT);
-
       histogram *r = find_histogram_for_pc (sym->addr);
 
+      sym->hist.scaled_addr = sym->addr / sizeof (UNIT);
+
       if (r)
 	{
 	  bin_of_entry = (sym->hist.scaled_addr - r->lowpc) / hist_scale;

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

* build failure
@ 2007-05-14 22:39 Greg Schafer
  2007-05-14 22:55 ` H. J. Lu
  0 siblings, 1 reply; 17+ messages in thread
From: Greg Schafer @ 2007-05-14 22:39 UTC (permalink / raw)
  To: binutils; +Cc: H. J. Lu

Hi

Trying to bootstrap recent binutils (2.17.50.0.16 by HJ) from an ancient
RH62 system and the build is bombing in gprof. Compiler is egcs-2.91.66. Any
takers?

I guess this commit has something to do with it:

http://sourceware.org/ml/binutils-cvs/2007-04/msg00038.html

Thanks
Greg


gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.17.50.0.16/gprof -I.  -D_GNU_SOURCE -DDEBUG -I../bfd -I../../binutils-2.17.50.0.16/gprof/../include -I../../binutils-2.17.50.0.16/gprof/../bfd  -I.  -DLOCALEDIR="\"/temptools/share/locale\""   -W -Wall -Wstrict-prototypes -Wmissing-prototypes -O2 -pipe -c ../../binutils-2.17.50.0.16/gprof/hist.c
../../binutils-2.17.50.0.16/gprof/hist.c: In function `scale_and_align_entries':
../../binutils-2.17.50.0.16/gprof/hist.c:301: parse error before `*'
../../binutils-2.17.50.0.16/gprof/hist.c:303: `r' undeclared (first use in this function)
../../binutils-2.17.50.0.16/gprof/hist.c:303: (Each undeclared identifier is reported only once
../../binutils-2.17.50.0.16/gprof/hist.c:303: for each function it appears in.)
../../binutils-2.17.50.0.16/gprof/hist.c:294: warning: `bin_of_entry' might be used uninitialized in this function
../../binutils-2.17.50.0.16/gprof/hist.c:295: warning: `bin_of_code' might be used uninitialized in this function
../../binutils-2.17.50.0.16/gprof/hist.c: At top level:
../../binutils-2.17.50.0.16/gprof/hist.c:740: warning: `find_histogram_for_pc' defined but not used
make[4]: *** [hist.o] Error 1
make[4]: Leaving directory `/mnt/sysroot/temptools/src/binutils-build/gprof'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/mnt/sysroot/temptools/src/binutils-build/gprof'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/mnt/sysroot/temptools/src/binutils-build/gprof'
make[1]: *** [all-gprof] Error 2
make[1]: Leaving directory `/mnt/sysroot/temptools/src/binutils-build'
make: *** [all] Error 2

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

* Re: build failure
  2002-02-11 21:32 Eric Christopher
  2002-02-11 21:41 ` Alan Modra
@ 2002-02-11 23:38 ` Eric Christopher
  1 sibling, 0 replies; 17+ messages in thread
From: Eric Christopher @ 2002-02-11 23:38 UTC (permalink / raw)
  To: binutils

On Mon, 2002-02-11 at 20:59, Eric Christopher wrote:
> Anyone else seeing this?

This is me overwriting my include tree from binutils with the one from
gcc. Did whoever checked in the last patch not get it over into gcc
or...?

-eric

-- 
I will not use abbrev.

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

* Re: build failure
  2002-02-11 21:41 ` Alan Modra
@ 2002-02-11 22:04   ` Eric Christopher
  0 siblings, 0 replies; 17+ messages in thread
From: Eric Christopher @ 2002-02-11 22:04 UTC (permalink / raw)
  To: Alan Modra; +Cc: binutils

On Mon, 2002-02-11 at 21:32, Alan Modra wrote:
> On Mon, Feb 11, 2002 at 08:59:14PM -0800, Eric Christopher wrote:
> > Anyone else seeing this?
> 
> You ought to be picking up VA_OPEN etc. from ansidecl.h via bfd.h.
> Broken bfd.h ?

It appears to be picking up both, I can't find the definition for
VA_OPEN anywhere though. Of course, I'm not sure where it would be :)

-eric

-- 
I will not use abbrev.

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

* Re: build failure
  2002-02-11 21:32 Eric Christopher
@ 2002-02-11 21:41 ` Alan Modra
  2002-02-11 22:04   ` Eric Christopher
  2002-02-11 23:38 ` Eric Christopher
  1 sibling, 1 reply; 17+ messages in thread
From: Alan Modra @ 2002-02-11 21:41 UTC (permalink / raw)
  To: Eric Christopher; +Cc: binutils

On Mon, Feb 11, 2002 at 08:59:14PM -0800, Eric Christopher wrote:
> Anyone else seeing this?

You ought to be picking up VA_OPEN etc. from ansidecl.h via bfd.h.
Broken bfd.h ?

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

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

* build failure
@ 2002-02-11 21:32 Eric Christopher
  2002-02-11 21:41 ` Alan Modra
  2002-02-11 23:38 ` Eric Christopher
  0 siblings, 2 replies; 17+ messages in thread
From: Eric Christopher @ 2002-02-11 21:32 UTC (permalink / raw)
  To: binutils

Anyone else seeing this?

-eric

gcc -DHAVE_CONFIG_H -I. -I/ghostwheel/sourceware/combined-3.0/bfd -I.
-D_GNU_SOURCE -I. -I/ghostwheel/sourceware/combined-3.0/bfd
-I/ghostwheel/sourceware/combined-3.0/bfd/../include
-I/ghostwheel/sourceware/combined-3.0/bfd/../intl -I../intl -W -Wall
-Wstrict-prototypes -Wmissing-prototypes -g -O2 -c
/ghostwheel/sourceware/combined-3.0/bfd/bfd.c -o bfd.o
/ghostwheel/sourceware/combined-3.0/bfd/bfd.c: In function
`_bfd_default_error_handler':
/ghostwheel/sourceware/combined-3.0/bfd/bfd.c:423: warning: implicit
declaration of function `VA_OPEN'
/ghostwheel/sourceware/combined-3.0/bfd/bfd.c:423: `p' undeclared (first
use in this function)
/ghostwheel/sourceware/combined-3.0/bfd/bfd.c:423: (Each undeclared
identifier is reported only once
/ghostwheel/sourceware/combined-3.0/bfd/bfd.c:423: for each function it
appears in.)
/ghostwheel/sourceware/combined-3.0/bfd/bfd.c:424: warning: implicit
declaration of function `VA_FIXEDARG'
/ghostwheel/sourceware/combined-3.0/bfd/bfd.c:424: parse error before
`const'
/ghostwheel/sourceware/combined-3.0/bfd/bfd.c:426: warning: implicit
declaration of function `VA_CLOSE'

-- 
I will not use abbrev.

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

end of thread, other threads:[~2016-01-21 12:13 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-12 19:41 build failure Tom Tromey
2009-03-12 20:01 ` H.J. Lu
2009-03-12 20:03 ` Tom Tromey
2009-03-13 11:25   ` Nick Clifton
2009-03-13 17:34     ` Tom Tromey
2009-03-18 16:58       ` Nick Clifton
  -- strict thread matches above, loose matches on Subject: below --
2016-01-21 10:58 ARC: Build failure Nick Clifton
2016-01-21 12:13 ` Cupertino Miranda
2009-05-05  2:15 Build Failure Ben Woodcroft
2009-05-05  2:38 ` DJ Delorie
2009-05-05  3:38 ` Alan Modra
2007-05-14 22:39 build failure Greg Schafer
2007-05-14 22:55 ` H. J. Lu
2007-05-14 23:04   ` Greg Schafer
2002-02-11 21:32 Eric Christopher
2002-02-11 21:41 ` Alan Modra
2002-02-11 22:04   ` Eric Christopher
2002-02-11 23:38 ` Eric Christopher

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).