configure: Add --enable-build-id option.
Build-ids are required for doing certain kinds of performance tracing. For example build-ids let Linux perf find the correct objects and transfer them to other machines via "perf archive". Signed-off-by: Nicholas Fraser <nfraser@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3898ad408b
commit
13ca3c8833
|
@ -842,6 +842,7 @@ enable_option_checking
|
|||
enable_win16
|
||||
enable_win64
|
||||
enable_tests
|
||||
enable_build_id
|
||||
enable_maintainer_mode
|
||||
enable_silent_rules
|
||||
enable_werror
|
||||
|
@ -2580,6 +2581,7 @@ Optional Features:
|
|||
--enable-win64 build a Win64 emulator on AMD64 (won't run Win32
|
||||
binaries)
|
||||
--disable-tests do not build the regression tests
|
||||
--enable-build-id include .buildid section in output objects
|
||||
--enable-maintainer-mode
|
||||
enable maintainer-specific build rules
|
||||
--enable-silent-rules use silent build rules (override: "make V=1")
|
||||
|
@ -3910,6 +3912,11 @@ if test "${enable_tests+set}" = set; then :
|
|||
enableval=$enable_tests;
|
||||
fi
|
||||
|
||||
# Check whether --enable-build-id was given.
|
||||
if test "${enable_build_id+set}" = set; then :
|
||||
enableval=$enable_build_id;
|
||||
fi
|
||||
|
||||
# Check whether --enable-maintainer-mode was given.
|
||||
if test "${enable_maintainer_mode+set}" = set; then :
|
||||
enableval=$enable_maintainer_mode;
|
||||
|
@ -10677,6 +10684,41 @@ if test "x$ac_cv_crosscflags__Werror" = xyes; then :
|
|||
EXTRACROSSCFLAGS="$EXTRACROSSCFLAGS -Werror"
|
||||
fi
|
||||
fi
|
||||
if test "x$enable_build_id" = "xyes"
|
||||
then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the cross-compiler supports -Wl,--build-id" >&5
|
||||
$as_echo_n "checking whether the cross-compiler supports -Wl,--build-id... " >&6; }
|
||||
if ${ac_cv_crosscflags__Wl___build_id+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_wine_try_cflags_saved=$CFLAGS
|
||||
ac_wine_try_cflags_saved_cc=$CC
|
||||
ac_wine_try_cflags_saved_exeext=$ac_exeext
|
||||
CFLAGS="$CFLAGS $EXTRACROSSCFLAGS -nostartfiles -nodefaultlibs -Wl,--build-id"
|
||||
CC="$CROSSCC"
|
||||
ac_exeext=".exe"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
int __cdecl mainCRTStartup(void) { return 0; }
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_crosscflags__Wl___build_id=yes
|
||||
else
|
||||
ac_cv_crosscflags__Wl___build_id=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
CFLAGS=$ac_wine_try_cflags_saved
|
||||
CC=$ac_wine_try_cflags_saved_cc
|
||||
ac_exeext=$ac_wine_try_cflags_saved_exeext
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_crosscflags__Wl___build_id" >&5
|
||||
$as_echo "$ac_cv_crosscflags__Wl___build_id" >&6; }
|
||||
if test "x$ac_cv_crosscflags__Wl___build_id" = xyes; then :
|
||||
CROSSCFLAGS="$CROSSCFLAGS -Wl,--build-id"
|
||||
CROSSLDFLAGS="$CROSSLDFLAGS -Wl,--build-id"
|
||||
fi
|
||||
fi
|
||||
|
||||
CFLAGS=$saved_CFLAGS
|
||||
CC="$ac_save_CC"
|
||||
|
@ -17795,6 +17837,35 @@ fi
|
|||
$as_echo "$ac_cv_cflags__Werror" >&6; }
|
||||
if test "x$ac_cv_cflags__Werror" = xyes; then :
|
||||
EXTRACFLAGS="$EXTRACFLAGS -Werror"
|
||||
fi
|
||||
fi
|
||||
if test "x$enable_build_id" = "xyes"
|
||||
then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wl,--build-id" >&5
|
||||
$as_echo_n "checking whether the compiler supports -Wl,--build-id... " >&6; }
|
||||
if ${ac_cv_cflags__Wl___build_id+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_wine_try_cflags_saved=$CFLAGS
|
||||
CFLAGS="$CFLAGS -Wl,--build-id"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
int main(int argc, char **argv) { return 0; }
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_cflags__Wl___build_id=yes
|
||||
else
|
||||
ac_cv_cflags__Wl___build_id=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
CFLAGS=$ac_wine_try_cflags_saved
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__Wl___build_id" >&5
|
||||
$as_echo "$ac_cv_cflags__Wl___build_id" >&6; }
|
||||
if test "x$ac_cv_cflags__Wl___build_id" = xyes; then :
|
||||
CFLAGS="$CFLAGS -Wl,--build-id"
|
||||
LDFLAGS="$LDFLAGS -Wl,--build-id"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
11
configure.ac
11
configure.ac
|
@ -31,6 +31,7 @@ dnl **** Command-line arguments ****
|
|||
AC_ARG_ENABLE(win16, AS_HELP_STRING([--disable-win16],[do not include Win16 support]))
|
||||
AC_ARG_ENABLE(win64, AS_HELP_STRING([--enable-win64],[build a Win64 emulator on AMD64 (won't run Win32 binaries)]))
|
||||
AC_ARG_ENABLE(tests, AS_HELP_STRING([--disable-tests],[do not build the regression tests]))
|
||||
AC_ARG_ENABLE(build-id, AS_HELP_STRING([--enable-build-id],[include .buildid section in output objects]))
|
||||
AC_ARG_ENABLE(maintainer-mode, AS_HELP_STRING([--enable-maintainer-mode],[enable maintainer-specific build rules]))
|
||||
AC_ARG_ENABLE(silent-rules, AS_HELP_STRING([--enable-silent-rules],[use silent build rules (override: "make V=1")]))
|
||||
AC_ARG_ENABLE(werror, AS_HELP_STRING([--enable-werror],[treat compilation warnings as errors]))
|
||||
|
@ -1086,6 +1087,11 @@ then
|
|||
then
|
||||
WINE_TRY_CROSSCFLAGS([-Werror])
|
||||
fi
|
||||
if test "x$enable_build_id" = "xyes"
|
||||
then
|
||||
WINE_TRY_CROSSCFLAGS([-Wl,--build-id], [CROSSCFLAGS="$CROSSCFLAGS -Wl,--build-id"
|
||||
CROSSLDFLAGS="$CROSSLDFLAGS -Wl,--build-id"])
|
||||
fi
|
||||
|
||||
CFLAGS=$saved_CFLAGS
|
||||
CC="$ac_save_CC"
|
||||
|
@ -2111,6 +2117,11 @@ char*f(const char *h,char n) {return strchr(h,n);}]])],[ac_cv_c_logicalop_noisy=
|
|||
then
|
||||
WINE_TRY_CFLAGS([-Werror])
|
||||
fi
|
||||
if test "x$enable_build_id" = "xyes"
|
||||
then
|
||||
WINE_TRY_CFLAGS([-Wl,--build-id], [CFLAGS="$CFLAGS -Wl,--build-id"
|
||||
LDFLAGS="$LDFLAGS -Wl,--build-id"])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl **** Disable Fortify, it has too many false positives
|
||||
|
|
Loading…
Reference in New Issue