Skip to content

1.2.2 breaks cross compile for macOS with osxcross on Linux #12349

Closed
@vanc

Description

With meson 1.2.2, cross compile with osxcross for macOS is broken due to revision 6048775.

The revision has the following changes.

+            # The default ar on MacOS (at least through version 12), does not
+            # add extern'd variables to the symbol table by default, and
+            # requires that apple's ranlib be called with a special flag
+            # instead after linking
+            if static_linker.id == 'applear':
+                # This is a bit of a hack, but we assume that that we won't need
+                # an rspfile on MacOS, otherwise the arguments are passed to
+                # ranlib, not to ar
+                cmdlist.extend(args)
+                args = []
+                cmdlist.extend(['&&', 'ranlib', '-c', '$out'])

ranlib -c was appended to the cmdlist. However, on Linux, the system ranlib doesn't support command switch -c.

For cross compile, at least it should use the ranlib binary from the cross file.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    OS:macosIssues specific to Apple Operating Systems like MacOS and iOSregression

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions