From: Mark H Weaver <mhw@netris.org>
To: Andrei Borzenkov <arvidjaar@gmail.com>
Cc: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH] Ensure that MIPS target code is compiled for the O32 ABI.
Date: Sun, 13 Sep 2015 19:37:22 -0400 [thread overview]
Message-ID: <87pp1lx559.fsf@netris.org> (raw)
In-Reply-To: <55F583DD.2020805@gmail.com> (Andrei Borzenkov's message of "Sun, 13 Sep 2015 17:10:37 +0300")
Andrei Borzenkov <arvidjaar@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---
next prev parent reply other threads:[~2015-09-13 23:38 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-19 18:35 [PATCH] Ensure that MIPS target code is compiled for the O32 ABI Mark H Weaver
2015-08-21 4:05 ` Andrei Borzenkov
2015-08-22 18:04 ` Mark H Weaver
2015-08-23 9:51 ` Andrei Borzenkov
2015-08-23 17:27 ` Mark H Weaver
2015-08-24 6:50 ` [PATCH v2] " Mark H Weaver
2015-09-08 17:11 ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-09-09 1:37 ` Mark H Weaver
2015-09-13 6:32 ` Andrei Borzenkov
2015-10-09 21:14 ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-10-10 0:28 ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-10-14 4:49 ` Andrei Borzenkov
2015-10-14 12:16 ` Vladimir 'phcoder' Serbinenko
2015-10-14 17:57 ` Andrei Borzenkov
2015-08-24 7:19 ` [PATCH] " Andrei Borzenkov
2015-08-24 7:57 ` Mark H Weaver
2015-08-24 8:12 ` Andrei Borzenkov
2015-08-24 9:27 ` Andrei Borzenkov
2015-08-25 18:18 ` Mark H Weaver
2015-09-11 15:06 ` Andrei Borzenkov
2015-09-13 2:41 ` Mark H Weaver
2015-09-13 3:46 ` Mark H Weaver
2015-09-13 14:10 ` Andrei Borzenkov
2015-09-13 23:37 ` Mark H Weaver [this message]
2015-09-20 4:44 ` Andrei Borzenkov
2015-09-21 16:09 ` Mark H Weaver
2015-09-21 17:56 ` Andrei Borzenkov
2015-09-22 15:03 ` Mark H Weaver
2015-09-22 17:26 ` Andrei Borzenkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pp1lx559.fsf@netris.org \
--to=mhw@netris.org \
--cc=arvidjaar@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).