Skip to content
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

Fix compilation on macOS with GCC. #1603

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Jhuighuy
Copy link

@Jhuighuy Jhuighuy commented Jan 14, 2025

Description

This PR fixes compilation on macOS with GCC (broken in 2022.0, worked fine in 2021.13). What's changed:

  • GCC toolchain code assumed that the assembler is always GAS. This may not always be the case, for example, on macOS GCC uses LLVM assembler.
  • Changed __TBB_WAITPKG_INTRINSICS_PRESENT: it is now always defined to true on macOS and GCC (always fresh LLVM assembler, so the intrinsic is always present).
  • Changed a workaround for -Wdeprecated-declarations in co_context.h: the warning was disabled with a Clang-specific pragma, replaced with Clang-compatible GCC version.

With this changes it is possible to compile and run all tests:

$ mkdir build
$ cd build
$ CXX=g++-14 cmake .. -DBUILD_SHARED_LIBS=NO
$ make
$ make test

Compilation with BUILD_SHARED_LIBS=YES still fails: the linker cannot find a vtable for detail::r1::unsafe_wait. This should be fixed separately.

Fixes #1556

Type of change

  • bug fix - change that fixes an issue
  • new feature - change that adds functionality
  • tests - change in tests
  • infrastructure - change in infrastructure and CI
  • documentation - documentation update

Tests

  • added - required for new features and some bug fixes
  • not needed

Documentation

  • updated in # - add PR number
  • needs to be updated
  • not needed

Breaks backward compatibility

  • Yes
  • No
  • Unknown

Notify the following users

Other information

@Jhuighuy Jhuighuy force-pushed the fix-gcc-without-gas branch from c7476ac to a245e48 Compare January 15, 2025 00:38
@Jhuighuy
Copy link
Author

Updated copyright years.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot configure on macOS with GCC.
1 participant