From: Per Oberg <pero@wolfram.com>
To: xenomai <xenomai@xenomai.org>
Subject: Re: Use of DESTDIR in xeno-config
Date: Fri, 16 Nov 2018 08:21:29 -0600 (CST) [thread overview]
Message-ID: <1848440323.12443247.1542378089283.JavaMail.zimbra@wolfram.com> (raw)
In-Reply-To: <29e3d91b-1fb5-d813-b800-7e6eee361519@siemens.com>
----- Den 16 nov 2018, på kl 14:29, Jan Kiszka <jan.kiszka@siemens.com> skrev:
> On 16.11.18 09:14, Per Oberg via Xenomai wrote:
> > Hi everyone
>> I'm confused over the xeno-config use of DESTDIR and cross-compiling. In the
> > documentation (1) it is claimed that it follows the GNU coding standards.
> > Snippet:
>> "If DESTDIR was set when installing Xenomai - typically after cross-compiling -
>> DESTDIR must be set to the same value before calling xeno-config for accessing
> > the target-based directories and files from the build system."
>> The example that is given handles install, and the GNU coding standards (2) also
>> talks about installation. It even specifies: "DESTDIR should be supported only
>> in the install* and uninstall* targets, as those are the only targets where it
> > is useful."
> > However, xeno-config is hardly used during install.
> > My specific problem boils down to the following:
>> I have built a toolchain for Yocto/Poky that has a xeno-config in the sysroot
>> for the target machine. When using it together with autotools used in the
>> etherlab ethercat master i need to set DESTDIR at configure time so that when
>> xeno-config is called the paths to bootstrap.o and dynlib.ld. This feels wrong
> > because of the above statements.
> > Can anyone enlighten me of the correct way of doing this?
> From my reading of both the documentation and what you did, this seems
> consistent: You need to set DESTDIR when you access the toolchain - including
> xeno-config - from within the build system. Once you are on target system (or
> chroot into it), DESTDIR is out of the game.
> The problem when looking at Yocto-like toolchains (SDKs) is that those might be
> relocated (moved around, installed to different directory) after being
> generated. In that case, DESTDIR may actually have to be updated accordingly as
> well. I already received the suggestion internally to derive the necessary base
> path in that case for the location of the compiler, which is doable but feels
> not really correct to me as well.
I see the usefulness, but I fail to see how it's complicit with the GNU standards. What worries me (a little, not much) is that I may be getting other things wrong because of it.
I'm thinking that this has to be a common problem for most stuff that is cross-compiled with distributed toolchains, and there is the "--sysroot=mysysroot" flag that will make -I=/usr/ and -L=/usr/ translate to -Isysroot/usr and -Lsysroot/usr. Are you saying that there is a hole in the way things are normally done because xenomai is special?
I will not persist, I know to little about it, but I am not convinced, yet.
I do like the idea with picking the location from the script, that would make sense i.m.h.o.
Per Öberg
> Jan
> > (1) https://xenomai.org/documentation/xenomai-3/html/man1/xeno-config/index.html
> > (2) https://www.gnu.org/prep/standards/standards.html
> > TTFN
> > Per Öberg
> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> Corporate Competence Center Embedded Linux
prev parent reply other threads:[~2018-11-16 14:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-16 8:14 Use of DESTDIR in xeno-config Per Oberg
2018-11-16 13:29 ` Jan Kiszka
2018-11-16 14:21 ` Per Oberg [this message]
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=1848440323.12443247.1542378089283.JavaMail.zimbra@wolfram.com \
--to=pero@wolfram.com \
--cc=xenomai@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.