mirror of
https://github.com/gryf/wmaker.git
synced 2026-03-21 10:53:31 +01:00
configure: add optional --enable-native option to compilation flags
This patch adds an option to enable native CPU optimizations by adding -march=native to the compiler flags, tuning the generated code for the build machine at the expense of portability. In some tests, especially on wrlib I saw 8% perf improvement. Should be used by developers or those who recompile wmaker for their own usage.
This commit is contained in:
committed by
Carlos R. Mafra
parent
77c3b95fd5
commit
95c68fe26d
17
configure.ac
17
configure.ac
@@ -130,6 +130,20 @@ AS_IF([test "x$debug" = "xyes"],
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl Native CPU Optimizations Option
|
||||||
|
dnl =================
|
||||||
|
m4_divert_push([INIT_PREPARE])dnl
|
||||||
|
AC_ARG_ENABLE([native],
|
||||||
|
[AS_HELP_STRING([--enable-native], [enable native option, @<:@default=no@:>@])],
|
||||||
|
[AS_CASE(["$enableval"],
|
||||||
|
[yes], [native=yes],
|
||||||
|
[no], [native=no],
|
||||||
|
[AC_MSG_ERROR([bad value $enableval for --enable-native])] )],
|
||||||
|
[native=no])
|
||||||
|
m4_divert_pop([INIT_PREPARE])dnl
|
||||||
|
AS_IF([test "x$native" = "xyes"],
|
||||||
|
[AX_CFLAGS_GCC_OPTION([-march=native])])
|
||||||
|
|
||||||
AX_CFLAGS_GCC_OPTION([-Wall])
|
AX_CFLAGS_GCC_OPTION([-Wall])
|
||||||
AX_CFLAGS_GCC_OPTION([-Wextra -Wno-sign-compare])
|
AX_CFLAGS_GCC_OPTION([-Wextra -Wno-sign-compare])
|
||||||
dnl
|
dnl
|
||||||
@@ -1037,6 +1051,9 @@ echo "Supported graphic format libraries :$supported_gfx"
|
|||||||
echo "Unsupported features :$unsupported"
|
echo "Unsupported features :$unsupported"
|
||||||
echo "Pango text layout support in WINGs : $pango"
|
echo "Pango text layout support in WINGs : $pango"
|
||||||
echo "Translated languages to support :$supported_locales"
|
echo "Translated languages to support :$supported_locales"
|
||||||
|
AS_IF([test "x$native" = "xyes"],
|
||||||
|
[AS_ECHO(["Target architecture : native"]) ],
|
||||||
|
[AS_ECHO(["Target architecture : generic"]) ])
|
||||||
AS_IF([test "x$WEB_REPO_ROOT" != "x"],
|
AS_IF([test "x$WEB_REPO_ROOT" != "x"],
|
||||||
[AS_ECHO(["Git repository for WMaker's Website : $WEB_REPO_ROOT"]) ])
|
[AS_ECHO(["Git repository for WMaker's Website : $WEB_REPO_ROOT"]) ])
|
||||||
AS_IF([test "x$debug" = "xyes"],
|
AS_IF([test "x$debug" = "xyes"],
|
||||||
|
|||||||
4
doc/build/Compilation.texi
vendored
4
doc/build/Compilation.texi
vendored
@@ -651,6 +651,10 @@ appropriate requirements and works with this.
|
|||||||
Despite all this, if you think there's a use for it and feel in the mood to help, do not hesitate to
|
Despite all this, if you think there's a use for it and feel in the mood to help, do not hesitate to
|
||||||
discuss on the mailing list @value{emailsupport} to get it working.
|
discuss on the mailing list @value{emailsupport} to get it working.
|
||||||
|
|
||||||
|
@item --enable-native
|
||||||
|
Enable native CPU optimizations by adding @option{-march=native} to the compiler flags, tuning the
|
||||||
|
generated code for the build machine at the expense of portability.
|
||||||
|
|
||||||
@item --with-web-repo=@i{PATH}
|
@item --with-web-repo=@i{PATH}
|
||||||
Enable generation of HTML documentation to be uploaded to @sc{Window Maker}'s website.
|
Enable generation of HTML documentation to be uploaded to @sc{Window Maker}'s website.
|
||||||
The @file{@i{PATH}} is the directory where you have cloned the homepage's repository.
|
The @file{@i{PATH}} is the directory where you have cloned the homepage's repository.
|
||||||
|
|||||||
Reference in New Issue
Block a user