[all-commits] [llvm/llvm-project] d76b9d: [OpenMP][cmake] Simplify -m32 handling (#142742)
Rainer Orth via All-commits
all-commits at lists.llvm.org
Wed Jun 4 23:35:20 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d76b9d6653020e7cb4a2937accf775254af61ab9
https://github.com/llvm/llvm-project/commit/d76b9d6653020e7cb4a2937accf775254af61ab9
Author: Rainer Orth <ro at gcc.gnu.org>
Date: 2025-06-05 (Thu, 05 Jun 2025)
Changed paths:
M openmp/runtime/cmake/LibompHandleFlags.cmake
Log Message:
-----------
[OpenMP][cmake] Simplify -m32 handling (#142742)
Linking `libomp.so` on 32-bit SPARC `FAIL`s with
```
ld: fatal: file projects/openmp/runtime/src/CMakeFiles/omp.dir/z_Linux_asm.S.o: wrong ELF class: ELFCLASS64
```
This was a 1-stage build with a 64-bit-default `gcc`. Unlike the C++
sources, which were compiled as 32-bit objects due to the use of
`-DCMAKE_CXX_FLAGS=-m32`, the assembler sources were not.
This patch simplifies passing `-m32`: instead of doing it per
architecture, `-m32` is now always passed when the target uses 32-bit
pointers and supports the option.
Tested on `sparc-sun-solaris2.11`, `sparcv9-sun-solaris2.11`,
`sparc-unknown-linux-gnu`, `sparc64-unknown-linux-gnu`,
`i386-pc-solaris2.11`, `amd64-pc-solaris2.11`, `i686-pc-linux-gnu`, and
`x86_64-pc-linux-gnu`.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list