Skip to content

iOS patch no 19: Linking

Fix linking for cross compiler to iOS. This patch does these things:

  1. use libtool to link to a static library in place of an executable (because on iOS the final link must be done in Xcode),
  2. for packages, keep only the HS package libraries and throw out other options (because libtool doesn't accept them),
  3. fail if you try to link a dynamic library on iOS because it isn't supported (not really needed but there for completeness).

Note that there is a minor risk here, because in the normal case, the order of options passed to the linker is slightly different: The options relating to each dependent package are separated into three different kinds, but they're still in the same relative order per package. This should be perfectly OK.

The name of "libtool" is hard-coded and can't be set by options. Is this OK?

Trac metadata
Trac field Value
Version 7.7
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Other
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information