2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-21 02:52:12 +00:00

Turn on partial LFS for posix like platforms.

When running b2 inside a qemu mixed mode environment (32 inside 64)
it errors with some system calls not properly translating from 64 to 32.
This works around the problem by making the 32 bit b2 build use 64 bit
file system calls in libc.

Potentially fix for:
* https://github.com/bfgroup/b2/issues/49
* https://github.com/conan-io/conan-center-index/issues/6059
* https://github.com/boostorg/build/issues/663
This commit is contained in:
Rene Rivera
2021-09-27 08:46:38 -05:00
parent 23e101a3ac
commit 26f2dbccbc
2 changed files with 11 additions and 1 deletions

View File

@@ -24,6 +24,8 @@ jobs:
include:
- { name: 'Ubuntu 20.04 Focal (armhf)', image: 'multiarch/ubuntu-debootstrap:armhf-focal', cxx: 'g++', toolset: 'gcc' }
- { name: 'Ubuntu 20.04 Focal (arm64)', image: 'multiarch/ubuntu-debootstrap:arm64-focal', cxx: 'g++', toolset: 'gcc' }
- { name: 'Debian 11 Bullseye (armhf)', image: 'multiarch/debian-debootstrap:armhf-bullseye', cxx: 'g++', toolset: 'gcc' }
- { name: 'Debian 11 Bullseye (arm64)', image: 'multiarch/debian-debootstrap:arm64-bullseye', cxx: 'g++', toolset: 'gcc' }
name: ${{ matrix.name }}
runs-on: ubuntu-latest
env:

View File

@@ -2,7 +2,7 @@
#define B2_CONFIG_H
/*
Copyright 2002-2018 Rene Rivera.
Copyright 2002-2021 Rene Rivera.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.txt or copy at
https://www.bfgroup.xyz/b2/LICENSE.txt)
@@ -31,6 +31,14 @@ https://www.bfgroup.xyz/b2/LICENSE.txt)
#endif
#endif
// To work around QEMU failures on mixed mode situations (32 vs 64) we need to
// enable partial LFS support in system headers. And we need to do this before
// any system headers are included.
#if !defined(NT) && !defined(VMS)
# define _FILE_OFFSET_BITS 64
#endif
// Correct missing types in some earlier compilers..
#include <stdint.h>