-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[OpenMP][cmake] Add SPARC support #142364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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 adds SPARC infrastructure to the `openmp` `cmake` files, matching what is done for other architectures. Simultaneously it 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`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it should be split into two separate PRs: one for the -m32
related changes, and another for the LIBOMP_ARCH
changes. They don't appear to depend on each other.
When I started working on the SPARC |
This patch adds SPARC infrastructure to the `openmp` `cmake` files, matching what is done for other architectures. 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`.
This patch adds SPARC infrastructure to the `openmp` `cmake` files, matching what is done for other architectures. 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`.
This patch adds SPARC infrastructure to the `openmp` `cmake` files, matching what is done for other architectures. 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`.
This patch adds SPARC infrastructure to the
openmp
cmake
files, matching what is done for other architectures.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
, andx86_64-pc-linux-gnu
.