Andrei Borzenkov <arvidj...@gmail.com> writes: > 13.09.2015 05:41, Mark H Weaver пишет: >> I'm glad to report that with your new patch, GRUB successfully builds on >> GuixSD mips64el with TARGET_CC=clang. I haven't yet tried booting it >> though. >> > > Did you have chance to test whether compiled grub actually work?
Not yet. I'll try to do it in the next few days. >> The warning above makes me doubt the portability and future-proofness of >> the link step of this test. This problem could be avoided entirely by >> omitting the link step. The link step serves no purpose in this test, >> and is a potential source of portability problems. >> > > This step helped us to catch endianness mismatch; we want to ensure in > this case that full toolchain works to produce final binary. Okay, fair enough :) > Please test two attached patches. They separate o32 test from > endianness test. I compile-tested them using cross-binutils for mips > and powerpc64le to compile for mipsel and powerpc. The first patch > also adds additional _start and __start symbols to endianness tests to > avoid compiler warnings. The little-endian-option test fails with GCC 5.2.0. The relevant errors from config.log are: gcc: error: unrecognized command line option '-target' gcc: error: unrecognized command line option '-mlittle-endian' I guess the error messages above should be enough. Let me know if you want more. It succeeds with clang 3.6.0. See below for the relevant excerpts of config.log. Thanks, Mark --8<---------------cut here---------------start------------->8--- configure:24669: checking for options to get little-endian compilation configure:24704: /gnu/store/yjmchvkz0kmz4s1sxc0p89imfik68qzg-clang-3.6.0/bin/clang -o conftest -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wcast-align -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -target mipsel -Wl,-EL -Werror -Wall -W -DGRUB_CPU_MIPSEL=1 -DGRUB_MACHINE_MIPS_LOONGSON=1 -DGRUB_MACHINE=MIPS_LOONGSON -nostdlib -static conftest.c >&5 ld: /tmp/conftest-78445a.o: ABI is incompatible with that of the selected emulation ld: failed to merge target specific data of file /tmp/conftest-78445a.o collect2: error: ld returned 1 exit status clang-3.6: error: linker (via gcc) command failed with exit code 1 (use -v to see invocation) configure:24704: $? = 1 configure: failed program was: [...] configure:24704: /gnu/store/yjmchvkz0kmz4s1sxc0p89imfik68qzg-clang-3.6.0/bin/clang -o conftest -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wcast-align -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -target mipsel -Werror -Wall -W -DGRUB_CPU_MIPSEL=1 -DGRUB_MACHINE_MIPS_LOONGSON=1 -DGRUB_MACHINE=MIPS_LOONGSON -nostdlib -static conftest.c >&5 ld: /tmp/conftest-66051b.o: ABI is incompatible with that of the selected emulation ld: failed to merge target specific data of file /tmp/conftest-66051b.o collect2: error: ld returned 1 exit status clang-3.6: error: linker (via gcc) command failed with exit code 1 (use -v to see invocation) configure:24704: $? = 1 configure: failed program was: [...] configure:24704: /gnu/store/yjmchvkz0kmz4s1sxc0p89imfik68qzg-clang-3.6.0/bin/clang -o conftest -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wcast-align -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -target mipsel-linux-gnu -Wl,-EL -Werror -Wall -W -DGRUB_CPU_MIPSEL=1 -DGRUB_MACHINE_MIPS_LOONGSON=1 -DGRUB_MACHINE=MIPS_LOONGSON -nostdlib -static conftest.c >&5 configure:24704: $? = 0 configure:24712: result: -target mipsel-linux-gnu -Wl,-EL configure:24728: checking for options to force MIPS o32 ABI configure:24761: /gnu/store/yjmchvkz0kmz4s1sxc0p89imfik68qzg-clang-3.6.0/bin/clang -o conftest -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wcast-align -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -target mipsel-linux-gnu -Werror -Wall -W -DGRUB_CPU_MIPSEL=1 -DGRUB_MACHINE_MIPS_LOONGSON=1 -DGRUB_MACHINE=MIPS_LOONGSON -nostdlib -static conftest.c >&5 configure:24761: $? = 0 configure:24769: result: --8<---------------cut here---------------end--------------->8--- _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel