Objective-C 2.0 development environment using Clang + GNUstep + libobjc2
547
This repository provides a Docker image for a modern Objective-C 2.0 toolchain based on:
It replaces legacy GCC-based Objective-C environments with a Clang-based toolchain using a modern Objective-C runtime (libobjc2).
This environment supports modern Objective-C features through Clang + libobjc2:
These features require the combination of:
Many Objective-C environments are:
This image focuses on a minimal, modern toolchain:
docker pull pascalecu/clang-objc2-gnustep:clang22-ubuntu26.04
git clone https://github.com/pascalecu/clang-objc2-gnustep
cd clang-objc2-gnustep
docker build -t clang-objc2-gnustep .
$ docker run --rm -it -v $(pwd):/workdir pascalecu/clang-objc2-gnustep:clang22-ubuntu26.04 bash
Inside the container:
objc -o foobar foobar.m
./foobar
For convenience, the image includes an objc wrapper script that configures the
compiler and runtime environment.
#!/usr/bin/env bash
set -euo pipefail
export GNUSTEP_MAKEFILES=/opt/gnustep/share/GNUstep/Makefiles
source /opt/gnustep/share/GNUstep/Makefiles/GNUstep.sh
exec clang-X \
-fobjc-runtime=gnustep-2.0 \
-fobjc-arc \
-fblocks \
-fobjc-exceptions \
-O2 \
-I/opt/gnustep/include \
-L/opt/gnustep/lib \
-Wl,-rpath,/opt/gnustep/lib \
"$@" \
-lgnustep-base -lobjc -ldispatch -lpthread -ldl -lm
where clang-X depends on the tag.
This image is intended for CLI and systems programming use. As such, no GUI frameworks are included.
Content type
Image
Digest
sha256:63257fdec…
Size
191.3 MB
Last updated
6 months ago
docker pull pascalecu/clang-objc2-gnustep:clang22-ubuntu26.04