# Portal 2: static recompilation for Apple silicon

> Portal 2 is statically recompiled from its Linux x86 modules into a native ARM64 application for macOS and iPhone. Preparation tools lay out ELF modules and apply relocations; a lifter emits C functions that are compiled with a runtime for libc, threading, SDL2, graphics and Steam interfaces. The author reports playable builds on Mac and iPhone.

- Type: Case study
- Targets: Game
- Category: Independent reconstruction cases
- Relationship: Independent reconstruction project
- Sources reviewed: 2026-11-08
- Added to the catalog: 2026-11-09
- Original resource: <https://github.com/kanapitsas/portal2-recomp>
- Primary source: <https://github.com/kanapitsas/portal2-recomp/blob/270429142bd00e772d0c9eb69d553f9c591dfd8a/README.md>
- Catalog page: <https://awesomerea.org/resources/portal-2-apple-silicon-recomp-case/>
- Record JSON: <https://awesomerea.org/resources/portal-2-apple-silicon-recomp-case/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/portal-2-apple-silicon-recomp-case/index.md)

## Requirements & limits

- **Prerequisites:** An Apple silicon Mac with Python 3.9 or newer, Homebrew, Xcode command line tools, SDL2, FreeType and Fontconfig.
- **Prerequisites:** An owned Portal 2 copy with its game folder and Linux binaries from Steam depot 661.
- **Prerequisites:** iPhone builds require Xcode, iOS 17 or newer, Developer Mode and about 12 GB of device space.
- **Limits:** Built against Linux depot 661 manifest 8940703274703023246; another release needs new indirect-call roots.
- **License:** GPL-3.0 license.

## Primary sources

1. <https://github.com/kanapitsas/portal2-recomp/blob/270429142bd00e772d0c9eb69d553f9c591dfd8a/README.md>

## More in Games

- [Power Dozer: statically recompiling Blast Corps](https://awesomerea.org/resources/power-dozer-case/index.md) · Case study
- [Prince of Persia 2: statically recompiling the DOS game for Windows](https://awesomerea.org/resources/pop2-windows/index.md) · Case study
- [Project 8 Plus: a native recompilation of Tony Hawk's Project 8](https://awesomerea.org/resources/project-8-plus-case/index.md) · Case study
- [Project Arwing (2): Star Fox 2 recompiled from a matching disassembly](https://awesomerea.org/resources/project-arwing-2-star-fox-2-recomp-case/index.md) · Case study
- [Project Arwing: Star Fox recompiled from a matching disassembly](https://awesomerea.org/resources/project-arwing-star-fox-recomp-case/index.md) · Case study
- [Project Gotham Racing 2: an Xbox XBE static recompilation](https://awesomerea.org/resources/pgr2-recomp-case/index.md) · Case study

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
