DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: bluca@debian.org
Subject: Re: [dpdk-dev] [PATCH] build: set RTE_ARCH_64 based on pointer size
Date: Wed, 26 Sep 2018 10:45:39 +0100	[thread overview]
Message-ID: <20180926094539.GA18768@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <20180926091536.61370-1-bruce.richardson@intel.com>

On Wed, Sep 26, 2018 at 10:15:36AM +0100, Bruce Richardson wrote:
> Rather than relying on the target machine architecture, use the
> size of a pointer from the compiler to determine if we are 64-bits
> or not. This allows correct behaviour when you pass -m32 as a compile
> option. It also allows us to use this value repeatedly throughout the
> repo rather than continually testing for the sizeof(void*).
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---

Just by way of note, for those looking to test: On Fedora 28 I can
compile a 32-bit version of DPDK using:

  PKG_CONFIG_LIBDIR='/usr/lib/pkgconfig' meson -Dc_args=-m32 -Dc_link_args=-m32 i686-build
  ninja -C i686-build

The PKG_CONFIG_LIBDIR is necessary to ensure the 32-bit .pc files are
found. The c_args and c_link_args values are pretty self-explanatory. This
didn't work before this patch because we looked at host_system() for 32-bit
or 64-bit info, rather than asking the compiler about it.

/Bruce

PS: Sorry, Thomas, this doesn't seem to work on Arch, which seems to have a
more mixed lib setup than other distros, having /usr/lib32, /usr/lib64 as
well as a 3rd /usr/lib directory to confuse things. :-(

  reply	other threads:[~2018-09-26  9:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-26  9:15 Bruce Richardson
2018-09-26  9:45 ` Bruce Richardson [this message]
2018-09-26 10:18 ` Luca Boccassi
2019-02-26 17:34   ` Thomas Monjalon
2019-02-19 15:07 ` Luca Boccassi

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=20180926094539.GA18768@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=bluca@debian.org \
    --cc=dev@dpdk.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).