summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Richardson <bruce.richardson@intel.com>2019-05-28 12:07:45 +0100
committerKevin Traynor <ktraynor@redhat.com>2019-10-02 15:52:10 +0100
commit5c3c20a8a8aa624ccb58433adedaa44a14b232ab (patch)
tree851d2518efd93e07d96142edb1bd39962213fa7e
parent5633216d4c70dfef793e7f46a7b58a88b20c1a2c (diff)
downloaddpdk-stable-5c3c20a8a8aa624ccb58433adedaa44a14b232ab.zip
dpdk-stable-5c3c20a8a8aa624ccb58433adedaa44a14b232ab.tar.gz
dpdk-stable-5c3c20a8a8aa624ccb58433adedaa44a14b232ab.tar.xz
build: enable large file support on 32-bit
[ upstream commit 40af5458a7a89c16ae0dd8cc64c1f148e5b40761] By default on 32-bit systems, file offsets are given as 32-bit values which prevents support for large files. While this is unlikely to be a problem, enabling large file support globally makes "make" and "meson" builds consistent, since meson always enables large file support, and without this change, the size of "struct stat" fields will be different between the two builds. The only location where this appears to be significant is in the dpaax common code, where a printf needs to be updated for 32-bit builds. Fixes: 2f3d633aa593 ("common/dpaax: add library for PA/VA translation table") Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
-rw-r--r--drivers/common/dpaax/dpaax_iova_table.c4
-rw-r--r--mk/arch/arm/rte.vars.mk2
-rw-r--r--mk/arch/i686/rte.vars.mk2
3 files changed, 4 insertions, 4 deletions
diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
index 2dd38a9..ae0af09 100644
--- a/drivers/common/dpaax/dpaax_iova_table.c
+++ b/drivers/common/dpaax/dpaax_iova_table.c
@@ -99,7 +99,7 @@ read_memory_node(unsigned int *count)
goto cleanup;
}
- DPAAX_DEBUG("Size of device-tree mem node: %lu", statbuf.st_size);
+ DPAAX_DEBUG("Size of device-tree mem node: %" PRIu64, statbuf.st_size);
if (statbuf.st_size > MEM_NODE_FILE_LEN) {
DPAAX_DEBUG("More memory nodes available than assumed.");
DPAAX_DEBUG("System may not work properly!");
@@ -118,7 +118,7 @@ read_memory_node(unsigned int *count)
*/
*count = (statbuf.st_size / 16);
if ((*count) <= 0 || (statbuf.st_size % 16 != 0)) {
- DPAAX_DEBUG("Invalid memory node values or count. (size=%lu)",
+ DPAAX_DEBUG("Invalid memory node values or count. (size=%" PRIu64 ")",
statbuf.st_size);
goto cleanup;
}
diff --git a/mk/arch/arm/rte.vars.mk b/mk/arch/arm/rte.vars.mk
index 27b1147..dc8c10a 100644
--- a/mk/arch/arm/rte.vars.mk
+++ b/mk/arch/arm/rte.vars.mk
@@ -4,7 +4,7 @@
ARCH ?= arm
CROSS ?=
-CPU_CFLAGS ?= -marm -munaligned-access
+CPU_CFLAGS ?= -marm -munaligned-access -D_FILE_OFFSET_BITS=64
CPU_LDFLAGS ?=
CPU_ASFLAGS ?= -felf
diff --git a/mk/arch/i686/rte.vars.mk b/mk/arch/i686/rte.vars.mk
index 3f48f67..c867883 100644
--- a/mk/arch/i686/rte.vars.mk
+++ b/mk/arch/i686/rte.vars.mk
@@ -24,7 +24,7 @@ ARCH ?= i386
ARCH_DIR := x86
CROSS ?=
-CPU_CFLAGS ?= -m32
+CPU_CFLAGS ?= -m32 -D_FILE_OFFSET_BITS=64
CPU_LDFLAGS ?= -melf_i386
CPU_ASFLAGS ?= -felf