diff --git a/package/base/gcc3/parse-config b/package/base/gcc3/parse-config index 6d92814b9..0f87dd5c2 100644 --- a/package/base/gcc3/parse-config +++ b/package/base/gcc3/parse-config @@ -99,6 +99,12 @@ esac var_append GCC_WRAPPER_APPEND " " "$ROCKCFG_C_FLAGS" +# Compile (i.e. link) all bins statically +# +if [ "$ROCKCFG_STATIC" = 1 ]; then + var_insert GCC_WRAPPER_INSERT " " "-static" +fi + # Compile with no exceptions or rtti, gcc itself must support both # if [ "$ROCKCFG_LIMITCXX" = 1 ] && [[ $pkg != gcc* ]] ; then diff --git a/scripts/config.in b/scripts/config.in index a9406a759..265a74869 100644 --- a/scripts/config.in +++ b/scripts/config.in @@ -362,6 +362,7 @@ break packages!' lazy 'Lazy optimisiation (for debugging binaries)' bool 'Create binaries with debug symbols' ROCKCFG_DEBUG 0 + bool 'Create statically linked binaries' ROCKCFG_STATIC 0 bool 'Disable exceptions and rtti in C++' ROCKCFG_LIMITCXX 0 bool 'Enable c-compiler multilib support' ROCKCFG_MULTILIB 0