GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
gcc/mingw32

gcc/mingw32: Add initializer to HOST_EXTRA_OBJS_SYMBOL

Fixes a symbol definition issue in MinGW32 by adding an initializer.

A recent change to HOST_EXTRA_OBJS_SYMBOL in GCC’s MinGW32 configuration inadvertently turned it into a declaration instead of a definition. This caused the symbol to be undefined, breaking functionality. This commit resolves the issue by adding an explicit initializer (set to zero), ensuring the symbol is correctly defined.

In Details

In config/i386/sym-mingw32.cc, the HOST_EXTRA_OBJS_SYMBOL macro was previously declared with extern "C" without an initializer. This commit adds = 0 to make it a definition, resolving a linker error where the symbol was not defined, likely due to changes in how GCC handles symbol declarations vs. definitions across different configurations.

For Context
HOST_EXTRA_OBJS_SYMBOL
A symbol used in GCC's build system, likely related to extra objects or symbols required when building for the host system, particularly relevant for cross-compilation targets like MinGW32.
initializer
The initial value assigned to a variable or symbol when it is declared or defined. In C/C++, this can be a literal value, the result of an expression, or a default value.
MinGW32
Minimalist GNU for Windows. A development environment that provides a Windows port of the GNU Compiler Collection (GCC) and related tools, allowing developers to create Windows applications using GNU tools.
Filed Under: mingw32buildsymbol definition