GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
gcc

Darwin fixincludes: Allow math.h in architecture subdirectories

Ensures Darwin fixincludes can find math.h in SDK subdirectories.

The fixincludes process on Darwin systems has been updated to correctly locate math.h when it resides in architecture-specific subdirectories within the SDK’s include paths. This change ensures that necessary header fixes are applied even in non-standard include layouts.

In Details

The fixincludes mechanism, specifically the inclhack.def file, has been modified to allow for math.h located within architecture-specific subdirectories (e.g., include/<arch>/math.h) on Darwin systems. This addresses a potential issue where fixincl.x might not find the target header in certain SDK configurations, requiring regeneration of fixincl.x.

For Context
fixincludes
A GCC utility that attempts to correct or adapt system header files to be compatible with GCC.
Darwin
The operating system developed by Apple, used as the basis for macOS, iOS, and other Apple platforms. GCC's Darwin support includes specific adaptations for its header and library structure.
math.h
The C standard header file that declares mathematical functions.
SDK
Software Development Kit, a collection of software development tools in one installable package. In this context, it refers to Apple's developer SDKs which contain system headers.
Filed Under: fixincludesdarwin