Bug#775611: [sh]: FTBFS due to unknown compiler option '-m32'
Quoted 7 lines · John Paul Adrian Glaubitz
Package: linux
Version: 3.16.7-ckt4-1
Severity: normal
Tags: patchHi!
Quoted 8 lines
The kernel package currently fails to build from source on sh4 since the build scripts try to pass the '-m32' compiler option on gcc which is not available with gcc on sh4 (also according to the manpage).
Selecting
HAVE_C_RECORDMCOUNTinarch/sh/Kconfig(see attached patch by Ben Hutchings) fixes the issues. However, I also suggest removing the line "$cc .= " -m32";" for sh compiler options inscripts/recordmcount.pl.
Steven and SH experts, what do you think of this?
Ben.
Signature · 3 lines
Ben Hutchings
The generation of random numbers is too important to be left to chance.
- Robert CoveyouQuoted 12 lines · Ben Hutchings
Quoted 11 lines · John Paul Adrian Glaubitz
Package: linux
Version: 3.16.7-ckt4-1
Severity: normal
Tags: patchHi!
The kernel package currently fails to build from source on sh4 since the build scripts try to pass the '-m32' compiler option on gcc which is not available with gcc on sh4 (also according to the manpage).
Quoted 6 lines
Quoted 4 lines
Selecting
HAVE_C_RECORDMCOUNTinarch/sh/Kconfig(see attached patch by Ben Hutchings) fixes the issues. However, I also suggest removing the line "$cc .= " -m32";" for sh compiler options inscripts/recordmcount.pl.Steven and SH experts, what do you think of this?
It seems most compilers don't support -m32, unless they're biarch. On an Ubuntu 14.04 LTS box with lots of cross-compilers from korg/crosstool:
/usr/bin/c89-gcc OK/usr/bin/c99-gcc OK/usr/bin/x86_64-linux-gnu-gcc OK /opt/cross/gcc-4.2.4-nolibc/avr32-linux/bin/avr32-linux-gcc cc1:
error: unrecognized command line option "-m32" /opt/cross/gcc-4.8.0-nolibc/microblaze-linux/bin/microblaze-linux-gcc
microblaze-linux-gcc: error: unrecognized command line option '-m32' /opt/cross/gcc-4.8.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc OK /opt/cross/gcc-4.5.1-nolibc/or32-linux/bin/or32-linux-gcc cc1: error:
unrecognized command line option "-m32" /opt/cross/gcc-4.6.3-nolibc/crisv32-linux/bin/crisv32-linux-gcc cc1:
error: unrecognized command line option '-m32' /opt/cross/gcc-4.6.3-nolibc/frv-linux/bin/frv-linux-gcc cc1: error:
unrecognized command line option '-m32' /opt/cross/gcc-4.6.3-nolibc/bfin-uclinux/bin/bfin-uclinux-gcc cc1:
error: unrecognized command line option '-m32' /opt/cross/gcc-4.6.3-nolibc/sparc64-linux/bin/sparc64-linux-gcc OK /opt/cross/gcc-4.6.3-nolibc/m68k-linux/bin/m68k-linux-gcc cc1: error:
unrecognized command line option '-m32' /opt/cross/gcc-4.6.3-nolibc/alpha-linux/bin/alpha-linux-gcc cc1:
error: unrecognized command line option '-m32' /opt/cross/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux-gcc cc1: error:
unrecognized command line option '-m32' /opt/cross/gcc-4.6.3-nolibc/m32r-linux/bin/m32r-linux-gcc cc1: error:
unrecognized command line option '-m32' /opt/cross/gcc-4.6.3-nolibc/ia64-linux/bin/ia64-linux-gcc cc1: error:
unrecognized command line option '-m32' /opt/cross/gcc-4.6.3-nolibc/xtensa-linux/bin/xtensa-linux-gcc cc1:
error: unrecognized command line option '-m32' /opt/cross/gcc-4.6.3-nolibc/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc
cc1: error: unrecognized command line option '-m32' /opt/cross/gcc-4.6.3-nolibc/am33_2.0-linux/bin/am33_2.0-linux-gcc cc1:
error: unrecognized command line option '-m32' /opt/cross/gcc-4.6.3-nolibc/mips64-linux/bin/mips64-linux-gcc cc1:
error: unrecognized command line option '-m32' /opt/cross/gcc-4.6.3-nolibc/s390x-linux/bin/s390x-linux-gcc cc1:
error: unrecognized command line option '-m32' /opt/cross/gcc-4.6.3-nolibc/hppa64-linux/bin/hppa64-linux-gcc cc1:
error: unrecognized command line option '-m32' /opt/cross/gcc-linaro-aarch64-none-elf-4.8-2013.08_linux/bin/aarch64-none-elf-gcc
aarch64-none-elf-gcc: error: unrecognized command line option ‘-m32’
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 18 lines · Geert Uytterhoeven
Quoted 17 lines · Ben Hutchings
Quoted 15 lines · John Paul Adrian Glaubitz
Package: linux
Version: 3.16.7-ckt4-1
Severity: normal
Tags: patchHi!
The kernel package currently fails to build from source on sh4 since the build scripts try to pass the '-m32' compiler option on gcc which is not available with gcc on sh4 (also according to the manpage).
Selecting
HAVE_C_RECORDMCOUNTinarch/sh/Kconfig(see attached patch by Ben Hutchings) fixes the issues. However, I also suggest removing the line "$cc .= " -m32";" for sh compiler options inscripts/recordmcount.pl.
Quoted 4 lines
Quoted 1 line
Steven and SH experts, what do you think of this?
It seems most compilers don't support -m32, unless they're biarch. On an Ubuntu 14.04 LTS box with lots of cross-compilers from korg/crosstool:
[...]
Right. It's also not mentioned at all in the documentation of SH options for gcc 4.9. There appear to be multiple 32-bit modes and instruction encodings to choose from, so it wouldn't be very useful.
The next question is whether recordmcount.c works properly for SH.
Adrian, can you check whether ftrace seems to work on the kernel built with HAVE_C_RECORDMCOUNT selected? (See Documentation/trace/ftrace.txt and particularly the 'function' example.)
Ben.
Signature · 3 lines
Ben Hutchings
The generation of random numbers is too important to be left to chance.
- Robert CoveyouJohn Paul Adrian Glaubitz
maintainer-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Quoted 6 lines · Ben Hutchings
The next question is whether
recordmcount.cworks properly for SH.Adrian, can you check whether ftrace seems to work on the kernel built with
HAVE_C_RECORDMCOUNTselected? (SeeDocumentation/trace/ftrace.txtand particularly the 'function' example.)
I guess that involves also installing the kernel and running it? The reason why I ask is that I currently don't have physical access to any of the SH4 machines yet as I am still waiting for Nobuhiro Iwamatsu to send me one of the spare boards he has.
Thus, if the kernel locks up the kernel for whatever reason, I am a bit lost until Nobuhiro can reset the machine. Having my own local SH4 machine would simplify things dramatically.
Adrian
- --
.''`. John Paul Adrian Glaubitz : :' : Debian Developer - [email protected] `. `' Freie Universitaet Berlin - [email protected] `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBCAAGBQJUu646AAoJEHQmOzf1tfkT7V4P/R13gZfztFdJhC2t7k5naDAh IcS5dwdeilCqRHEGm0Su5eGV7d6taZASplcKahDgw14VlQ/7tpSlMNQU2AYj8IKo bQ8xJfjmwznPOE3U/4p/dH2whfQWXowLoTKIO/Ayd06N/swP2kfMvwQMbVlxfbm6 fy5BmDry7NQQO39cCfIA1GPo4Eme1VHLaG/mRRDvuXWaujX/CFA9aFdiiZ2ZRQjp achH6zIb/9TdflWVNdMbadusUaZZgkin7p3Ky4jC0kk9pWtcWRR4zZdBGoKFrr3N HsdPVJScNWZeaaH7G//3L9WNgITQHC+gjoxuBrVN4NuVU5TIoHitsdhQGdJ96wJZ TENKenPiCQxwwLwljSjJ6lV+V1B7YT1nOpOBwK5jePzqIUL3ymejigwPXNQqlwev LK4I2tGMWDyh1VwZz0lwmRLh+Nu1NdPFzlu6981OAWOO8rSpcxzGTp5ipNPPY3VY j2MC0nibwx74DJYHzgDGCUdGN5lvDe0qNtwkqyKgnKCjsVdNHKZVEynFOfdmPSLz 2YfY8PZFRgmb5/Fb59990mvfEkY+No4o67yZP6k9jBcfAY7E/jTFjpzKQQjYdkhB q3hKl2M5fcvSKMCMrDWSOPEbC4By0arYvsDVVUecTvgecP/TGeBiJpPLVY9gLSAx JlAltcZjGayAdPYLgwFV
=M5g3
-----END PGP SIGNATURE-----