Skip to contentSkip to conversation

Fix building xfsprogs on 32-bit platforms (again)

PATCH In review Eric Biggers 2 participants 2 messages Feb 1, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix building xfsprogs on 32-bit platforms (again)

From: Eric Biggers <[email protected]>

Building xfsprogs on 32-bit platforms was broken again by the recent split of BUILD_CFLAGS from CFLAGS. -D_FILE_OFFSET_BITS=64 was not added to BUILD_CFLAGS, but in fact BUILD_CFLAGS is used to compile crc32selftest, which includes xfs.h and therefore requires this declaration. Fix this by adding -D_FILE_OFFSET_BITS=64 to BUILD_CFLAGS.

Fixes 0a71e3839630 ("build: Allow compiling xfsprogs in a cross compile environment")
---
 include/builddefs.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/builddefs.in +1 -1
index 612b547d..6554e421 100644
@@ -26,7 +26,7 @@ MALLOCLIB = @malloc_lib@
 LOADERFLAGS = @LDFLAGS@
 LTLDFLAGS = @LDFLAGS@
 CFLAGS = @CFLAGS@ -D_FILE_OFFSET_BITS=64
-BUILD_CFLAGS = @BUILD_CFLAGS@
+BUILD_CFLAGS = @BUILD_CFLAGS@ -D_FILE_OFFSET_BITS=64
 
 LIBRT = @librt@
 LIBUUID = @libuuid@
Signature · 1 line
2.11.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Eric Biggers

From: Eric Biggers <[email protected]>

Building xfsprogs on 32-bit platforms was broken again by the recent split of BUILD_CFLAGS from CFLAGS. -D_FILE_OFFSET_BITS=64 was not added to BUILD_CFLAGS, but in fact BUILD_CFLAGS is used to compile crc32selftest, which includes xfs.h and therefore requires this declaration. Fix this by adding -D_FILE_OFFSET_BITS=64 to BUILD_CFLAGS.

Fixes 0a71e3839630 ("build: Allow compiling xfsprogs in a cross compile environment")

Oh, I missed this, and sent exactly the same patch to the person who just reported it on the list, so yes,

Sorry - I need to add 32-bit builds to my testing, obviously :(

Quoted 18 lines
---
 include/builddefs.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/builddefs.in +1 -1
index 612b547d..6554e421 100644
@@ -26,7 +26,7 @@ MALLOCLIB = @malloc_lib@
 LOADERFLAGS = @LDFLAGS@
 LTLDFLAGS = @LDFLAGS@
 CFLAGS = @CFLAGS@ -D_FILE_OFFSET_BITS=64
-BUILD_CFLAGS = @BUILD_CFLAGS@
+BUILD_CFLAGS = @BUILD_CFLAGS@ -D_FILE_OFFSET_BITS=64
 
 LIBRT = @librt@
 LIBUUID = @libuuid@