boostorg / boostorg/build

[cross-build] Specifying target-os fails to link a shared library on macOS

Open
#365 1 comment 0 reactions 0 assignees View on GitHub
transition
Dominant language
C++
Stars
251
Forks
63
PR merge metrics
No merged PRs in 30d

Description

Hello,

I've stumbled across a weird behaviour related to `target-os` and shared libraries, while building `atomic` (I'm on macOS):

* `cd boost/libs/atomic/build`
* run `b2 toolset=clang link=shared target-os=iphone`

The macOS linker complains about `--start-group` (`--end-group` is unrecognized as well).

Removing the `target-os` works.

Contributor guide

Open the contributing guide

Research direction

Reproduce from boost/libs/atomic/build with `b2 toolset=clang link=shared target-os=iphone`, then compare it with the same command without `target-os`. Start by tracing how the target OS selects linker flags; done means the macOS linker no longer receives unsupported `--start-group` or `--end-group` options for this shared-library build.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.