https://sourceware.org/bugzilla/show_bug.cgi?id=19160
Bug ID: 19160 Summary: Warnings from x86_64-build_apple-darwin15.0.0-gcc when compiling elf32-arm.c and subsequent problems Product: binutils Version: 2.25 Status: NEW Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: rog at rcjd dot net Target Milestone: --- I'm trying to build a Mac to Raspberry Pi cross compilation. I'm using HomeBrew with crosstool-ng (1.21.0). It's pretty much as described in various places such as http://www.unsigned.fr/blog/?p=6 but with some additional patching to deal with sunrpc. Current state is that the build process breaks due to a missing object file (libc-start.o). The file is missing due to assembler errors when compiling the source file: /var/folders/zq/rt1zgfw529zd6zk07hw1_bqm0000gs/T//ccIsmKRb.s: Assembler messages: [ALL ] /var/folders/zq/rt1zgfw529zd6zk07hw1_bqm0000gs/T//ccIsmKRb.s:102: Error: invalid constant (ff) after fixup [ALL ] /var/folders/zq/rt1zgfw529zd6zk07hw1_bqm0000gs/T//ccIsmKRb.s:184: Error: invalid constant (af) after fixup In searching for a possible cause of this, I checked a full log of the build and discovered warnings coming from the compilation of elf32-arm.c: /Volumes/xtools-build-env/.build/src/binutils-2.25/bfd/elf32-arm.c:8812:10: warning: absolute value function 'abs' given an argument of type 'bfd_signed_vma' (aka 'long') but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value] [ALL ] value = abs (relocation); [ALL ] ^ [ALL ] /Volumes/xtools-build-env/.build/src/binutils-2.25/bfd/elf32-arm.c:8812:10: note: use function 'labs' instead [ALL ] value = abs (relocation); [ALL ] ^~~ [ALL ] labs [ALL ] /Volumes/xtools-build-env/.build/src/binutils-2.25/bfd/elf32-arm.c:8847:10: warning: absolute value function 'abs' given an argument of type 'bfd_signed_vma' (aka 'long') but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value] [ALL ] value = abs (relocation); [ALL ] ^ [ALL ] /Volumes/xtools-build-env/.build/src/binutils-2.25/bfd/elf32-arm.c:8847:10: note: use function 'labs' instead [ALL ] value = abs (relocation); [ALL ] ^~~ [ALL ] labs [ALL ] /Volumes/xtools-build-env/.build/src/binutils-2.25/bfd/elf32-arm.c:8884:10: warning: absolute value function 'abs' given an argument of type 'bfd_signed_vma' (aka 'long') but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value] [ALL ] value = abs (relocation); [ALL ] ^ [ALL ] /Volumes/xtools-build-env/.build/src/binutils-2.25/bfd/elf32-arm.c:8884:10: note: use function 'labs' instead [ALL ] value = abs (relocation); [ALL ] ^~~ [ALL ] labs [ALL ] /Volumes/xtools-build-env/.build/src/binutils-2.25/bfd/elf32-arm.c:10119:36: warning: absolute value function 'abs' given an argument of type 'bfd_signed_vma' (aka 'long') but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value] [ALL ] g_n = calculate_group_reloc_mask (abs (signed_value), group, [ALL ] ^ [ALL ] /Volumes/xtools-build-env/.build/src/binutils-2.25/bfd/elf32-arm.c:10119:36: note: use function 'labs' instead [ALL ] g_n = calculate_group_reloc_mask (abs (signed_value), group, [ALL ] ^~~ [ALL ] labs [ALL ] /Volumes/xtools-build-env/.build/src/binutils-2.25/bfd/elf32-arm.c:10133:30: warning: absolute value function 'abs' given an argument of type 'bfd_signed_vma' (aka 'long') but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value] [ALL ] (long) rel->r_offset, abs (signed_value), howto->name); [ALL ] ^ [ALL ] /Volumes/xtools-build-env/.build/src/binutils-2.25/bfd/elf32-arm.c:10133:30: note: use function 'labs' instead [ALL ] (long) rel->r_offset, abs (signed_value), howto->name); [ALL ] ^~~ [ALL ] labs [ALL ] /Volumes/xtools-build-env/.build/src/binutils-2.25/bfd/elf32-arm.c:10213:30: warning: absolute value function 'abs' given an argument of type 'bfd_signed_vma' (aka 'long') but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value] [ALL ] calculate_group_reloc_mask (abs (signed_value), group - 1, &residual); [ALL ] ^ [ALL ] /Volumes/xtools-build-env/.build/src/binutils-2.25/bfd/elf32-arm.c:10213:30: note: use function 'labs' instead [ALL ] calculate_group_reloc_mask (abs (signed_value), group - 1, &residual); [ALL ] ^~~ [ALL ] labs [ALL ] /Volumes/xtools-build-env/.build/src/binutils-2.25/bfd/elf32-arm.c:10221:30: warning: absolute value function 'abs' given an argument of type 'bfd_signed_vma' (aka 'long') but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value] [ALL ] (long) rel->r_offset, abs (signed_value), howto->name); [ALL ] ^ [ALL ] /Volumes/xtools-build-env/.build/src/binutils-2.25/bfd/elf32-arm.c:10221:30: note: use function 'labs' instead [ALL ] (long) rel->r_offset, abs (signed_value), howto->name); [ALL ] ^~~ [ALL ] labs [ALL ] /Volumes/xtools-build-env/.build/src/binutils-2.25/bfd/elf32-arm.c:10297:30: warning: absolute value function 'abs' given an argument of type 'bfd_signed_vma' (aka 'long') but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value] [ALL ] calculate_group_reloc_mask (abs (signed_value), group - 1, &residual); [ALL ] ^ [ALL ] /Volumes/xtools-build-env/.build/src/binutils-2.25/bfd/elf32-arm.c:10297:30: note: use function 'labs' instead [ALL ] calculate_group_reloc_mask (abs (signed_value), group - 1, &residual); [ALL ] ^~~ [ALL ] labs [ALL ] /Volumes/xtools-build-env/.build/src/binutils-2.25/bfd/elf32-arm.c:10305:30: warning: absolute value function 'abs' given an argument of type 'bfd_signed_vma' (aka 'long') but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value] [ALL ] (long) rel->r_offset, abs (signed_value), howto->name); [ALL ] ^ [ALL ] /Volumes/xtools-build-env/.build/src/binutils-2.25/bfd/elf32-arm.c:10305:30: note: use function 'labs' instead [ALL ] (long) rel->r_offset, abs (signed_value), howto->name); [ALL ] ^~~ [ALL ] labs [ALL ] /Volumes/xtools-build-env/.build/src/binutils-2.25/bfd/elf32-arm.c:10381:30: warning: absolute value function 'abs' given an argument of type 'bfd_signed_vma' (aka 'long') but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value] [ALL ] calculate_group_reloc_mask (abs (signed_value), group - 1, &residual); [ALL ] ^ [ALL ] /Volumes/xtools-build-env/.build/src/binutils-2.25/bfd/elf32-arm.c:10381:30: note: use function 'labs' instead [ALL ] calculate_group_reloc_mask (abs (signed_value), group - 1, &residual); [ALL ] ^~~ [ALL ] labs [ALL ] /Volumes/xtools-build-env/.build/src/binutils-2.25/bfd/elf32-arm.c:10391:30: warning: absolute value function 'abs' given an argument of type 'bfd_signed_vma' (aka 'long') but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value] [ALL ] (long) rel->r_offset, abs (signed_value), howto->name); [ALL ] ^ [ALL ] /Volumes/xtools-build-env/.build/src/binutils-2.25/bfd/elf32-arm.c:10391:30: note: use function 'labs' instead [ALL ] (long) rel->r_offset, abs (signed_value), howto->name); [ALL ] ^~~ [ALL ] labs On eyeballing the source code for elf32-arm it looks odd - I'm not saying it is wrong because I'm unable to check - but it looks odd and with warnings being generated I'm concerned and a little out of my depth. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils