This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [0/4] C-SKY port V2
On Sat, May 26, 2018 at 04:06:32PM -0600, Sandra Loosemore wrote:
> This is a reposting of C-SKY patch set, hopefully with all the whitespace
> errors and GCC 8 compiler diagnostics fixed this time.
There are still a few whitespace errors reported by git, and not just
ones that you must add to match test output.
Also, an --enable-targets=all build on x86_64-linux gives
../opcodes/.libs/libopcodes.a(disassemble.o): In function `disassembler':
/home/alan/src/binutils-gdb/opcodes/disassemble.c:170: undefined reference to `csky_get_disassembler'
Fix it by adding csky-dis.c to TARGET_LIBOPCODES_CFILES in
opcodes/Makefile.am.
Please also compile your code on a 32-bit host (or with -m32 on x86_64
say). This patch doesn't compile due to a number of bugs. Also
compile on a 32-bit host with --enable-64-bit-bfd too. That will show
more errors.
Another minor issue:
/home/alan/src/binutils-gdb/ld/emultempl/cskyelf.em: line 358: break: only meaningful in a `for', `while', or `until' loop
It's also a good idea to be kind to the translation project people.
Reuse existing error/warning messages where possible. (Regenerate
.pot files without your new target code, then with the new code to see
the additions.)
+#: elf32-csky.c:975
+#, c-format
+msgid "error: %pB: unsupported relocation type %#x"
Lose "error: ".
+#: elf32-csky.c:1989
+msgid "error: GOT TABLE SIZE OUT OF RANGE!"
Again, and you likely don't want all caps.
+#: elf32-csky.c:2851
+#, c-format
+msgid ""
+"warning: file %pB's arch flag ck%s conflicts with \t\t\t target ck%s, "
+"set target arch flag to ck%s"
Probably not what you wanted.
+#. The r_type is error, not support it.
+#: elf32-csky.c:4078
+#, c-format
+msgid "%pB: Unknown relocation type %ud\n"
You probably don't want a "d" suffix. Please make this message
the same as most other "unsupported relocation type" errors.
+#: elf32-csky.c:4656
+#, c-format
+msgid ""
+"%pB(%pA+0x%#lx): R_CKCORE_TLS_LE32 relocation\t\t not permitted in "
+"shared object"
Another case of wrongly using '\' to continue a message. It's better
to use C string concatenation. Also, please copy the standard message
in say, elf32-arm.c:12026.
Messages in cskyelf.em have similar problems to the above. I also see
many messages in tc-csky.c that should be wrapped in _(), an as_bad
containing "Error:" which would produce ".. Error: Error:", and places
where errors and warning don't follow the GNU coding standards. In
particular:
"The string message should not begin with a capital letter when it
follows a program name and/or file name, because that isn’t the
beginning of a sentence. (The sentence conceptually starts at the
beginning of the line.) Also, it should not end with a period."
--
Alan Modra
Australia Development Lab, IBM