From 423a6e01a978dded112b954ad9090dab9729bdeb Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Tue, 27 Dec 2022 10:58:01 -0330 Subject: [PATCH] Add experimental 'mold' linker support to configure for UNIX. --- configure | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configure b/configure index ae5e85736..9eca75c9a 100755 --- a/configure +++ b/configure @@ -28,6 +28,7 @@ _build_static=no _build_profile=no _build_debug=no _build_release=no +_build_mold=no # more defaults _ranlib=ranlib @@ -218,6 +219,7 @@ Optional Features: --disable-debug --enable-release build with all optimizations, for final release [disabled] --disable-release + --use-mold-linker use mold linker (experimental) [disabled] Optional Libraries: --with-sdl-prefix=DIR Prefix where the sdl2-config script is installed (optional) @@ -264,6 +266,7 @@ for ac_option in $@; do --disable-debug) _build_debug=no ;; --enable-release) _build_release=yes ;; --disable-release) _build_release=no ;; + --use-mold-linker) _build_mold=yes ;; --with-sdl-prefix=*) arg=`echo $ac_option | cut -d '=' -f 2` _sdlpath="$arg:$arg/bin" @@ -932,6 +935,10 @@ if test "$_build_release" = no ; then _build_release= fi +if test "$_build_mold" = yes ; then + LDFLAGS="-fuse-ld=mold" +fi + # Workaround until we deal with autodetection of C compiler properly # Or we remove C files from Stella entirely, by making them C++ if test -z "$CC"; then