abseil / abseil/abseil-cpp

Build on 10.6.8 Rosetta uses ABSL_RANDOM_HWAES_X64_FLAGS despite OSX_ARCHITECTURES = ppc

Abierto
#1,227 5 comentarios 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
C++
Estrellas
18.1k
Forks
3.2k
Merge medio
20 h 36 min
PR fusionados (30 d)
1

Descripción

**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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.