abseil / abseil/abseil-cpp

Build on 10.6.8 Rosetta uses ABSL_RANDOM_HWAES_X64_FLAGS despite OSX_ARCHITECTURES = ppc

未关闭
#1,227 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
C++
星标
18.1k
派生
3.2k
平均合并
20 小时 36 分钟
30 天内合并 PR
1

描述

**Describe the bug**

I am building `abseil` on 10.6.8 Rosetta for `ppc` (well, in fact I has built it, but with an ugly solution of just editing away Intel flags). Despite Cmake correctly recognizing `OSX_ARCHITECTURES="ppc"`, it still pulls out Intel HWAES flags, which obviously cause a failure.
I tried specifying `CMAKE_SYSTEM_PROCESSOR=ppc` and tried a couple of patches to the source code, but nothing helped.
Removing away flags in question from `abseil-abseil-cpp-273292d/absl/copts/GENERATED_AbseilCopts.cmake` solved the issue, at least on the surface, but it is clearly a bad solution.

_What is required is to ensure `ppc` is used all through, with no `x86` setting pulled over._

This chunk of code causes the problem:
```
list(APPEND ABSL_RANDOM_HWAES_X64_FLAGS
"-maes"
"-msse4.1"
)
```

**What version of Abseil are you using?**

```
10:~ svacchanda$ port -v installed abseil
The following ports are currently installed:
abseil @20220623.0_0 (active) requested_variants='' platform='darwin 10' archs='ppc' date='2022-07-22T21:38:20+0400'
```

**What operating system and version are you using**

10.6.8 Rosetta (build for `ppc32`), Xcode 3.2.6

**What compiler and version are you using?**

```
10:~ svacchanda$ /opt/local/bin/gcc-mp-12 -v
Using built-in specs.
COLLECT_GCC=/opt/local/bin/gcc-mp-12
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/ppc-apple-darwin10/12.1.0/lto-wrapper
Target: ppc-apple-darwin10
Configured with: /opt/local/var/macports/build/_opt_PPCRosettaPorts_lang_gcc12/gcc12/work/gcc-12.1.0/configure --prefix=/opt/local --build=ppc-apple-darwin10 --enable-languages=c,c++,objc,obj-c++,lto,fortran,jit --libdir=/opt/local/lib/gcc12 --includedir=/opt/local/include/gcc12 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-12 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-12 --with-gxx-include-dir=/opt/local/include/gcc12/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local --with-zstd=/opt/local --enable-checking=release --disable-multilib --enable-lto --enable-libstdcxx-time --without-build-config --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --enable-host-shared --with-darwin-extra-rpath=/opt/local/lib/libgcc --with-libiconv-prefix=/opt/local --with-tune-cpu=G4 --disable-tls --with-pkgversion='MacPorts gcc12 12.1.0_3'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.1.0 (MacPorts gcc12 12.1.0_3)
```

**What build system are you using?**

I use Macports and `cmake-devel` 3.24.0-rc4.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。