The package rpms/build2.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/build2.git/commit/?id=2e7bbf5e391f5e....
Change: +%ifarch %{arm32}
Thanks.
Full change: ============
commit 2e7bbf5e391f5e2d0bcf246bc5d040edbee06ca2 Author: Matthew Krupcale mkrupcale@matthewkrupcale.com Date: Thu Jan 27 21:09:43 2022 -0500
Add 64-bit flags for 32-bit arches and ignore use-after-free warnings on arm32
Some of the tests include reading x509 public key certificates with dates that may be beyond the 32-bit time_t. So force those archs to use 64-bit time_t and file offsets with _TIME_BITS=64 and _FILE_OFFSET_BITS=64, respectively.
Also silence false-positive use-after-free warnings appearing on arm32 which cause test failures due to unexpected stderr output.
* build2.spec: add 64-bit flags for 32-bit archs and ignore use-after-free warnings on arm32
diff --git a/build2.spec b/build2.spec index b28f421..f55f60d 100644 --- a/build2.spec +++ b/build2.spec @@ -317,6 +317,14 @@ CXX=g++ CFLAGS="${CFLAGS:-%{build_cflags}}" CXXFLAGS="${CXXFLAGS:-%{build_cxxflags}}" LDFLAGS="${LDFLAGS:-%{build_ldflags}}" +%ifarch %{ix86} %{arm32} +CFLAGS+=" -Wp,-D_FILE_OFFSET_BITS=64 -Wp,-D_TIME_BITS=64" +CXXFLAGS+=" -Wp,-D_FILE_OFFSET_BITS=64 -Wp,-D_TIME_BITS=64" +%endif +%ifarch %{arm32} +CFLAGS+=" -Wno-use-after-free" +CXXFLAGS+=" -Wno-use-after-free" +%endif export LD_LIBRARY_PATH=$PWD/%{name}-%{version}/lib%{name}:${LD_LIBRARY_PATH} export LD_LIBRARY_PATH=$PWD/%{name}-%{version}/lib%{name}/bash:${LD_LIBRARY_PATH} export LD_LIBRARY_PATH=$PWD/%{name}-%{version}/lib%{name}/bin:${LD_LIBRARY_PATH} @@ -421,6 +429,14 @@ popd %if %{with static} config.bin.lib=both \ %endif +%ifarch %{ix86} %{arm32} + config.c.coptions+="-Wp,-D_FILE_OFFSET_BITS=64 -Wp,-D_TIME_BITS=64" \ + config.cxx.coptions+="-Wp,-D_FILE_OFFSET_BITS=64 -Wp,-D_TIME_BITS=64" \ +%endif +%ifarch %{arm32} + config.c.coptions+="-Wno-use-after-free" \ + config.cxx.coptions+="-Wno-use-after-free" \ +%endif %if %{with bundle_libodb} config.import.libodb="libodb-%{libodb_bundle_version}/" \ config.import.libodb_sqlite="libodb-sqlite-%{libodb_bundle_version}/" \
commit 13250ad902f753deb86eb049810423db8f5a2084 Author: Matthew Krupcale mkrupcale@matthewkrupcale.com Date: Thu Jan 27 20:57:46 2022 -0500
Explicitly define CC and CFLAGS for bootstrap builds
build2 does not directly build any C code since it instead directly #include's bundled C dependencies in C++ TUs, but this premptively ensures that if this were to change we build such C code with the proper flags.
Non-bootstrap builds already define the proper C flags through the use of the %build2 or %build2_configure macros.
* build2.spec: define CC and CFLAGS for bootstrap builds
diff --git a/build2.spec b/build2.spec index 7e3665a..b28f421 100644 --- a/build2.spec +++ b/build2.spec @@ -312,7 +312,9 @@ mv libbutl-%{version} %{name}-%{version} config.install.lib.mode=755 \\ config.install.chroot=%{?buildroot} %if %{with bootstrap} +CC=gcc CXX=g++ +CFLAGS="${CFLAGS:-%{build_cflags}}" CXXFLAGS="${CXXFLAGS:-%{build_cxxflags}}" LDFLAGS="${LDFLAGS:-%{build_ldflags}}" export LD_LIBRARY_PATH=$PWD/%{name}-%{version}/lib%{name}:${LD_LIBRARY_PATH} @@ -326,14 +328,18 @@ export LD_LIBRARY_PATH=$PWD/%{name}-%{version}/lib%{name}/version:${LD_LIBRARY_P export LD_LIBRARY_PATH=$PWD/%{name}-%{version}/libbutl-%{version}/libbutl:${LD_LIBRARY_PATH} pushd %{name}-%{version} # bootstrap, phase 1: minimal build system +export CC export CXX +export CFLAGS export CXXFLAGS export LDFLAGS %make_build -f bootstrap.gmake # bootstrap, phase 2: statically linked build system build2/b-boot \ config.bin.lib=static \ + config.c=${CC} \ config.cxx=${CXX} \ + config.c.coptions="${CFLAGS}" \ config.cxx.coptions="${CXXFLAGS}" \ config.cxx.poptions+="$(pkgconf --cflags-only-I libpkgconf)" \ config.cxx.loptions+="$(pkgconf --libs-only-L libpkgconf) ${LDFLAGS}" \ @@ -346,7 +352,9 @@ build2/b-boot configure %endif config.bin.rpath.auto=false \ config.bin.rpath_link.auto=false \ + config.c=${CC} \ config.cxx=${CXX} \ + config.c.coptions="${CFLAGS}" \ config.cxx.coptions="${CXXFLAGS}" \ config.cxx.loptions="${LDFLAGS}" \ %{config_install} @@ -358,7 +366,9 @@ popd libodb-%{libodb_bundle_version}/ \ libodb-sqlite-%{libodb_bundle_version}/ \ config.bin.lib=static \ + config.c=${CC} \ config.cxx=${CXX} \ + config.c.coptions="${CFLAGS}" \ config.cxx.coptions="${CXXFLAGS}" \ config.cxx.loptions="${LDFLAGS}" \ config.import.libodb="libodb-%{libodb_bundle_version}/" \ @@ -374,7 +384,9 @@ popd %endif config.bin.rpath.auto=false \ config.bin.rpath_link.auto=false \ + config.c=${CC} \ config.cxx=${CXX} \ + config.c.coptions="${CFLAGS}" \ config.cxx.coptions="${CXXFLAGS}" \ config.cxx.loptions="${LDFLAGS}" \ %if %{with bundle_libodb}
commit 4cc4bb9c976f66dcb40610e2420a71aedec0747c Author: Matthew Krupcale mkrupcale@matthewkrupcale.com Date: Thu Jan 27 20:49:36 2022 -0500
Add libbutl lz4 patch
libbutl bundles lz4[1] and builds it as an amalgamated translation unit in lz4.cxx, but there is a conflicting typdef unalign in lz4.c and xxhash.c. This patch [2] renames the lz4.c typedef to not conflict with that defined in xxhash.c. See also the upstream issue [3].
* build2.spec: add libbutl lz4 patch to Patches and apply during %setup * libbutl-lz4-typdef-unalign.patch: add libbutl lz4 patch
[1] https://github.com/lz4/lz4 [2] https://git.build2.org/cgit/libbutl/commit/?id=23c07078a9f2790b96a6ee6a61839... [3] https://github.com/lz4/lz4/issues/1053
diff --git a/build2.spec b/build2.spec index 0565cec..7e3665a 100644 --- a/build2.spec +++ b/build2.spec @@ -34,6 +34,8 @@ Patch0000: libbuild2-config.install.scope-no-update-for-install.patch Patch0100: build2-disable-test-cc-modules-ppc64le.patch # Upstream https://git.build2.org/cgit/libbutl/commit/?id=c6ea3d784ee920f51de3088437b47... Patch1000: libbutl-openssl-info-overloads.patch +# Upstream https://git.build2.org/cgit/libbutl/commit/?id=23c07078a9f2790b96a6ee6a61839... +Patch1001: libbutl-lz4-typdef-unalign.patch # Upstream https://git.build2.org/cgit/bpkg/commit/?id=073f4ed111b0b10dcbd81fc112f9d66e... Patch3000: bpkg-openssl-3-pkeyutl.patch
@@ -274,6 +276,7 @@ pushd %{name}-%{version} popd pushd libbutl-%{version} %patch -p 1 -P 1000 +%patch -p 1 -P 1001 popd pushd bpkg-%{version} %patch -p 1 -P 3000 diff --git a/libbutl-lz4-typdef-unalign.patch b/libbutl-lz4-typdef-unalign.patch new file mode 100644 index 0000000..8e0fc79 --- /dev/null +++ b/libbutl-lz4-typdef-unalign.patch @@ -0,0 +1,39 @@ +From 23c07078a9f2790b96a6ee6a6183911aaec71533 Mon Sep 17 00:00:00 2001 +From: Boris Kolpackov boris@codesynthesis.com +Date: Tue, 25 Jan 2022 15:24:25 +0200 +Subject: Rename unalign to LZ4_unalign in lz4.c not to clash with unalign in + xxhash.c + +Upstream issue 1053. +--- + libbutl/lz4.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/libbutl/lz4.c b/libbutl/lz4.c +index eac0541..3f0e430 100644 +--- a/libbutl/lz4.c ++++ b/libbutl/lz4.c +@@ -343,14 +343,14 @@ static void LZ4_write32(void* memPtr, U32 value) { *(U32*)memPtr = value; } + + /* __pack instructions are safer, but compiler specific, hence potentially problematic for some compilers */ + /* currently only defined for gcc and icc */ +-typedef union { U16 u16; U32 u32; reg_t uArch; } __attribute__((packed)) unalign; ++typedef union { U16 u16; U32 u32; reg_t uArch; } __attribute__((packed)) LZ4_unalign; + +-static U16 LZ4_read16(const void* ptr) { return ((const unalign*)ptr)->u16; } +-static U32 LZ4_read32(const void* ptr) { return ((const unalign*)ptr)->u32; } +-static reg_t LZ4_read_ARCH(const void* ptr) { return ((const unalign*)ptr)->uArch; } ++static U16 LZ4_read16(const void* ptr) { return ((const LZ4_unalign*)ptr)->u16; } ++static U32 LZ4_read32(const void* ptr) { return ((const LZ4_unalign*)ptr)->u32; } ++static reg_t LZ4_read_ARCH(const void* ptr) { return ((const LZ4_unalign*)ptr)->uArch; } + +-static void LZ4_write16(void* memPtr, U16 value) { ((unalign*)memPtr)->u16 = value; } +-static void LZ4_write32(void* memPtr, U32 value) { ((unalign*)memPtr)->u32 = value; } ++static void LZ4_write16(void* memPtr, U16 value) { ((LZ4_unalign*)memPtr)->u16 = value; } ++static void LZ4_write32(void* memPtr, U32 value) { ((LZ4_unalign*)memPtr)->u32 = value; } + + #else /* safe and portable access using memcpy() */ + +-- +cgit v1.1 +
arch-excludes@lists.fedoraproject.org