From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: stsp <stsp2@yandex.ru>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] generic code with i7 bootlin toolchain?
Date: Thu, 4 Nov 2021 21:36:55 +0100 [thread overview]
Message-ID: <20211104203655.GA2400@scaer> (raw)
In-Reply-To: <3c3603ba-5719-fec9-9bb3-7b0f3967fc9f@yandex.ru>
Stsp, All,
On 2021-11-03 22:52 +0300, stsp spake thusly:
> I configured buildroot for
> corei7 CPU to use the bootlin
> tool-chain. As expected, nothing
> worked, as I have the (very old)
> AMD CPU.
> Then I did the following:
> BR2_TARGET_OPTIMIZATION="-march=x86-64 -mtune=generic"
Do not use BR2_TARGET_OPTIMIZATION to set your CPU model. Instead,
select the proper entry in the target variant choice. Selecting the
proper variant will pass appropriate -march and -mcpu options.
If a toolchain is not available for the CPU you have (and which you
select in the choice I mentioned above), then that is on-purpose,
because that toolchain is not usable for that CPU; see below...
> make clean
> and full rebuild.
> After that I've got working
> kernel and the user-space
> starts booting, but still many
> user-space apps or libs crash
> with an illegal instruction exception.
>
> I even checked that the toolchain-wrapper
> generated by buildroot, has these
> strings embedded, so my change
> certainly had some effect. But
> it was not enough.
This is not unsurprising. The toolchain contains the C lirbary, which
has been built with the optimisations for core-i7. So using that
toolchain for a CPU that lacks some features of a core-i7 will not work.
> So it looks like the
> BR2_TARGET_OPTIMIZATION
> is somehow applied not to all
> built packages? Why can that be?
> Is there any other way I can
> utilize bootlin tool-chain for some
> "generic" (non-SSE3/4) CPU?
You will not be able to use that toolchain for the Phenom. You will have
to build your own toolchain.
Note that you can build the toolchain once, and later re-use that as a
pre-built toolchain. See the manual on directions on how to do that:
https://buildroot.org/downloads/manual/manual.html#_cross_compilation_toolchain
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2021-11-04 20:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-03 19:52 [Buildroot] generic code with i7 bootlin toolchain? stsp
2021-11-04 1:05 ` Giulio Benetti
2021-11-04 10:02 ` stsp
2021-11-04 14:55 ` Giulio Benetti
2021-11-04 15:07 ` stsp
2021-11-04 20:36 ` Yann E. MORIN [this message]
2021-11-04 20:59 ` stsp
2021-11-05 21:21 ` Yann E. MORIN
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=20211104203655.GA2400@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=stsp2@yandex.ru \
/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