From 6c8a00224ffd17ab4b529e3cd9fddccd2c2e298d Mon Sep 17 00:00:00 2001 From: pierre Date: Mon, 27 Oct 2014 22:14:23 +0000 Subject: [PATCH] Add code to define DISABLE_CPU_FEATURES_INIT, if mingw GDB executable does not contain it git-svn-id: trunk@28940 - --- packages/gdbint/gen-gdblib-inc.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/gdbint/gen-gdblib-inc.sh b/packages/gdbint/gen-gdblib-inc.sh index 1e814a012c..947575a570 100755 --- a/packages/gdbint/gen-gdblib-inc.sh +++ b/packages/gdbint/gen-gdblib-inc.sh @@ -380,6 +380,15 @@ END { chmod u+x ./copy-libs.sh # For later +# Check if mingw executable contains +# __cpu_features_init function +has_cpu_features_init=`objdump -t gdb.exe | grep cpu_features_init ` +if [ "X$has_cpu_features_init" == "X" ] ; then + mingw_no_cpu_features_init=1 +else + mingw_no_cpu_features_init=0 +fi + echo Creating ./gdblib.inc file # Generate gdblib.inc file cat comp-cmd.log |${AWK} -v gdbcvs=${gdbcvs} \ @@ -387,6 +396,7 @@ cat comp-cmd.log |${AWK} -v gdbcvs=${gdbcvs} \ -v gdbversion=${gdbversion} -v forcestatic=${forcestatic} \ -v force64bitcoreaddr=${force64bitcoreaddr} \ -v has_get_stdin=${has_get_stdin} \ + -v mingw_no_cpu_features_init=${mingw_no_cpu_features_init} \ -v add_libgdb=${add_libgdb} ' BEGIN { use_mingw=0; @@ -467,6 +477,9 @@ END { print "{$undef NotImplemented}" if ( use_mingw == 1 ) { print "{$define USE_MINGW_GDB}" + if ( mingw_no_cpu_features_init == 1 ) { + print "{$define DISABLE_CPU_FEATURES_INIT}" + } } if ( has_get_stdin == 1 ) { print "{$define LIBGDB_HAS_GET_STDIN}"