[abf00f7] | 1 | diff -Naur gdb-6.8.50.20090908.orig/bfd/sysdep.h gdb-6.8.50.20090908-rtems4.10-20090908/bfd/sysdep.h |
---|
| 2 | --- gdb-6.8.50.20090908.orig/bfd/sysdep.h 2009-09-02 09:18:37.000000000 +0200 |
---|
| 3 | +++ gdb-6.8.50.20090908-rtems4.10-20090908/bfd/sysdep.h 2009-09-08 06:12:34.000000000 +0200 |
---|
| 4 | @@ -136,7 +136,7 @@ |
---|
| 5 | #endif |
---|
| 6 | |
---|
| 7 | #if !HAVE_DECL_STRSTR |
---|
| 8 | -extern char *strstr (); |
---|
| 9 | +/* extern char *strstr (); */ |
---|
| 10 | #endif |
---|
| 11 | |
---|
| 12 | #ifdef HAVE_FTELLO |
---|
| 13 | diff -Naur gdb-6.8.50.20090908.orig/gdb/lm32-tdep.c gdb-6.8.50.20090908-rtems4.10-20090908/gdb/lm32-tdep.c |
---|
| 14 | --- gdb-6.8.50.20090908.orig/gdb/lm32-tdep.c 2009-07-02 19:25:55.000000000 +0200 |
---|
| 15 | +++ gdb-6.8.50.20090908-rtems4.10-20090908/gdb/lm32-tdep.c 2009-09-08 06:12:34.000000000 +0200 |
---|
| 16 | @@ -35,7 +35,7 @@ |
---|
| 17 | #include "regcache.h" |
---|
| 18 | #include "trad-frame.h" |
---|
| 19 | #include "reggroups.h" |
---|
| 20 | -#include "opcodes/lm32-desc.h" |
---|
| 21 | +#include "../opcodes/lm32-desc.h" |
---|
| 22 | |
---|
| 23 | #include "gdb_string.h" |
---|
| 24 | |
---|
| 25 | diff -Naur gdb-6.8.50.20090908.orig/gdb/sparc-tdep.c gdb-6.8.50.20090908-rtems4.10-20090908/gdb/sparc-tdep.c |
---|
| 26 | --- gdb-6.8.50.20090908.orig/gdb/sparc-tdep.c 2009-09-07 19:52:41.000000000 +0200 |
---|
| 27 | +++ gdb-6.8.50.20090908-rtems4.10-20090908/gdb/sparc-tdep.c 2009-09-08 06:12:34.000000000 +0200 |
---|
| 28 | @@ -1100,7 +1100,7 @@ |
---|
| 29 | sparc32_store_return_value (struct type *type, struct regcache *regcache, |
---|
| 30 | const gdb_byte *valbuf) |
---|
| 31 | { |
---|
| 32 | - int len = TYPE_LENGTH (type); |
---|
| 33 | + size_t len = TYPE_LENGTH (type); |
---|
| 34 | gdb_byte buf[8]; |
---|
| 35 | |
---|
| 36 | gdb_assert (!sparc_structure_or_union_p (type)); |
---|
| 37 | diff -Naur gdb-6.8.50.20090908.orig/sim/erc32/configure gdb-6.8.50.20090908-rtems4.10-20090908/sim/erc32/configure |
---|
| 38 | --- gdb-6.8.50.20090908.orig/sim/erc32/configure 2009-08-22 18:56:52.000000000 +0200 |
---|
| 39 | +++ gdb-6.8.50.20090908-rtems4.10-20090908/sim/erc32/configure 2009-09-08 06:12:34.000000000 +0200 |
---|
| 40 | @@ -591,8 +591,9 @@ |
---|
| 41 | ac_subst_vars='LTLIBOBJS |
---|
| 42 | LIBOBJS |
---|
| 43 | cgen_breaks |
---|
| 44 | +READLINE_CFLAGS |
---|
| 45 | +READLINE_DEPS |
---|
| 46 | READLINE |
---|
| 47 | -TERMCAP |
---|
| 48 | REPORT_BUGS_TEXI |
---|
| 49 | REPORT_BUGS_TO |
---|
| 50 | PKGVERSION |
---|
| 51 | @@ -715,6 +716,7 @@ |
---|
| 52 | enable_sim_profile |
---|
| 53 | with_pkgversion |
---|
| 54 | with_bugurl |
---|
| 55 | +with_system_readline |
---|
| 56 | ' |
---|
| 57 | ac_precious_vars='build_alias |
---|
| 58 | host_alias |
---|
| 59 | @@ -1356,6 +1358,7 @@ |
---|
| 60 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) |
---|
| 61 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
---|
| 62 | --with-bugurl=URL Direct users to URL to report a bug |
---|
| 63 | + --with-system-readline use installed readline library |
---|
| 64 | |
---|
| 65 | Some influential environment variables: |
---|
| 66 | CC C compiler command |
---|
| 67 | @@ -2411,7 +2414,6 @@ |
---|
| 68 | |
---|
| 69 | |
---|
| 70 | |
---|
| 71 | - |
---|
| 72 | # Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around |
---|
| 73 | # it by inlining the macro's contents. |
---|
| 74 | # This file contains common code used by all simulators. |
---|
| 75 | @@ -2911,18 +2913,18 @@ |
---|
| 76 | int |
---|
| 77 | main () |
---|
| 78 | { |
---|
| 79 | - |
---|
| 80 | +return 0; |
---|
| 81 | ; |
---|
| 82 | return 0; |
---|
| 83 | } |
---|
| 84 | _ACEOF |
---|
| 85 | ac_clean_files_save=$ac_clean_files |
---|
| 86 | -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" |
---|
| 87 | +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" |
---|
| 88 | # Try to create an executable without -o first, disregard a.out. |
---|
| 89 | # It will help us diagnose broken compilers, and finding out an intuition |
---|
| 90 | # of exeext. |
---|
| 91 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
---|
| 92 | -$as_echo_n "checking for C compiler default output file name... " >&6; } |
---|
| 93 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
---|
| 94 | +$as_echo_n "checking whether the C compiler works... " >&6; } |
---|
| 95 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
---|
| 96 | |
---|
| 97 | # The possible output files: |
---|
| 98 | @@ -2984,10 +2986,10 @@ |
---|
| 99 | else |
---|
| 100 | ac_file='' |
---|
| 101 | fi |
---|
| 102 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 |
---|
| 103 | -$as_echo "$ac_file" >&6; } |
---|
| 104 | if test -z "$ac_file"; then : |
---|
| 105 | - $as_echo "$as_me: failed program was:" >&5 |
---|
| 106 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
---|
| 107 | +$as_echo "no" >&6; } |
---|
| 108 | +$as_echo "$as_me: failed program was:" >&5 |
---|
| 109 | sed 's/^/| /' conftest.$ac_ext >&5 |
---|
| 110 | |
---|
| 111 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
---|
| 112 | @@ -2995,51 +2997,18 @@ |
---|
| 113 | { as_fn_set_status 77 |
---|
| 114 | as_fn_error "C compiler cannot create executables |
---|
| 115 | See \`config.log' for more details." "$LINENO" 5; }; } |
---|
| 116 | +else |
---|
| 117 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
---|
| 118 | +$as_echo "yes" >&6; } |
---|
| 119 | fi |
---|
| 120 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
---|
| 121 | +$as_echo_n "checking for C compiler default output file name... " >&6; } |
---|
| 122 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 |
---|
| 123 | +$as_echo "$ac_file" >&6; } |
---|
| 124 | ac_exeext=$ac_cv_exeext |
---|
| 125 | |
---|
| 126 | -# Check that the compiler produces executables we can run. If not, either |
---|
| 127 | -# the compiler is broken, or we cross compile. |
---|
| 128 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
---|
| 129 | -$as_echo_n "checking whether the C compiler works... " >&6; } |
---|
| 130 | -# If not cross compiling, check that we can run a simple program. |
---|
| 131 | -if test "$cross_compiling" != yes; then |
---|
| 132 | - if { ac_try='./$ac_file' |
---|
| 133 | - { { case "(($ac_try" in |
---|
| 134 | - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
---|
| 135 | - *) ac_try_echo=$ac_try;; |
---|
| 136 | -esac |
---|
| 137 | -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
---|
| 138 | -$as_echo "$ac_try_echo"; } >&5 |
---|
| 139 | - (eval "$ac_try") 2>&5 |
---|
| 140 | - ac_status=$? |
---|
| 141 | - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
---|
| 142 | - test $ac_status = 0; }; }; then |
---|
| 143 | - cross_compiling=no |
---|
| 144 | - else |
---|
| 145 | - if test "$cross_compiling" = maybe; then |
---|
| 146 | - cross_compiling=yes |
---|
| 147 | - else |
---|
| 148 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
---|
| 149 | -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
---|
| 150 | -as_fn_error "cannot run C compiled programs. |
---|
| 151 | -If you meant to cross compile, use \`--host'. |
---|
| 152 | -See \`config.log' for more details." "$LINENO" 5; } |
---|
| 153 | - fi |
---|
| 154 | - fi |
---|
| 155 | -fi |
---|
| 156 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
---|
| 157 | -$as_echo "yes" >&6; } |
---|
| 158 | - |
---|
| 159 | -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out |
---|
| 160 | +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out |
---|
| 161 | ac_clean_files=$ac_clean_files_save |
---|
| 162 | -# Check that the compiler produces executables we can run. If not, either |
---|
| 163 | -# the compiler is broken, or we cross compile. |
---|
| 164 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 |
---|
| 165 | -$as_echo_n "checking whether we are cross compiling... " >&6; } |
---|
| 166 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 |
---|
| 167 | -$as_echo "$cross_compiling" >&6; } |
---|
| 168 | - |
---|
| 169 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 |
---|
| 170 | $as_echo_n "checking for suffix of executables... " >&6; } |
---|
| 171 | if { { ac_try="$ac_link" |
---|
| 172 | @@ -3079,6 +3048,63 @@ |
---|
| 173 | rm -f conftest.$ac_ext |
---|
| 174 | EXEEXT=$ac_cv_exeext |
---|
| 175 | ac_exeext=$EXEEXT |
---|
| 176 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
---|
| 177 | +/* end confdefs.h. */ |
---|
| 178 | + |
---|
| 179 | +int |
---|
| 180 | +main () |
---|
| 181 | +{ |
---|
| 182 | + |
---|
| 183 | + ; |
---|
| 184 | + return 0; |
---|
| 185 | +} |
---|
| 186 | +_ACEOF |
---|
| 187 | +ac_clean_files="$ac_clean_files conftest.out" |
---|
| 188 | +# Check that the compiler produces executables we can run. If not, either |
---|
| 189 | +# the compiler is broken, or we cross compile. |
---|
| 190 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 |
---|
| 191 | +$as_echo_n "checking whether we are cross compiling... " >&6; } |
---|
| 192 | +if test "$cross_compiling" != yes; then |
---|
| 193 | + { { ac_try="$ac_link" |
---|
| 194 | +case "(($ac_try" in |
---|
| 195 | + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
---|
| 196 | + *) ac_try_echo=$ac_try;; |
---|
| 197 | +esac |
---|
| 198 | +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
---|
| 199 | +$as_echo "$ac_try_echo"; } >&5 |
---|
| 200 | + (eval "$ac_link") 2>&5 |
---|
| 201 | + ac_status=$? |
---|
| 202 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
---|
| 203 | + test $ac_status = 0; } |
---|
| 204 | + if { ac_try='./conftest$ac_cv_exeext' |
---|
| 205 | + { { case "(($ac_try" in |
---|
| 206 | + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
---|
| 207 | + *) ac_try_echo=$ac_try;; |
---|
| 208 | +esac |
---|
| 209 | +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
---|
| 210 | +$as_echo "$ac_try_echo"; } >&5 |
---|
| 211 | + (eval "$ac_try") 2>&5 |
---|
| 212 | + ac_status=$? |
---|
| 213 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
---|
| 214 | + test $ac_status = 0; }; }; then |
---|
| 215 | + cross_compiling=no |
---|
| 216 | + else |
---|
| 217 | + if test "$cross_compiling" = maybe; then |
---|
| 218 | + cross_compiling=yes |
---|
| 219 | + else |
---|
| 220 | + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
---|
| 221 | +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
---|
| 222 | +as_fn_error "cannot run C compiled programs. |
---|
| 223 | +If you meant to cross compile, use \`--host'. |
---|
| 224 | +See \`config.log' for more details." "$LINENO" 5; } |
---|
| 225 | + fi |
---|
| 226 | + fi |
---|
| 227 | +fi |
---|
| 228 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 |
---|
| 229 | +$as_echo "$cross_compiling" >&6; } |
---|
| 230 | + |
---|
| 231 | +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out |
---|
| 232 | +ac_clean_files=$ac_clean_files_save |
---|
| 233 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
---|
| 234 | $as_echo_n "checking for suffix of object files... " >&6; } |
---|
| 235 | if test "${ac_cv_objext+set}" = set; then : |
---|
| 236 | @@ -4510,86 +4536,41 @@ |
---|
| 237 | done |
---|
| 238 | |
---|
| 239 | |
---|
| 240 | -# In the Cygwin environment, we need some additional flags. |
---|
| 241 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
---|
| 242 | -$as_echo_n "checking for cygwin... " >&6; } |
---|
| 243 | -if test "${sim_cv_os_cygwin+set}" = set; then : |
---|
| 244 | - $as_echo_n "(cached) " >&6 |
---|
| 245 | -else |
---|
| 246 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
---|
| 247 | -/* end confdefs.h. */ |
---|
| 248 | |
---|
| 249 | -#ifdef __CYGWIN__ |
---|
| 250 | -lose |
---|
| 251 | -#endif |
---|
| 252 | -_ACEOF |
---|
| 253 | -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
---|
| 254 | - $EGREP "lose" >/dev/null 2>&1; then : |
---|
| 255 | - sim_cv_os_cygwin=yes |
---|
| 256 | -else |
---|
| 257 | - sim_cv_os_cygwin=no |
---|
| 258 | +# Check whether --with-system-readline was given. |
---|
| 259 | +if test "${with_system_readline+set}" = set; then : |
---|
| 260 | + withval=$with_system_readline; |
---|
| 261 | fi |
---|
| 262 | -rm -f conftest* |
---|
| 263 | |
---|
| 264 | -fi |
---|
| 265 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_cv_os_cygwin" >&5 |
---|
| 266 | -$as_echo "$sim_cv_os_cygwin" >&6; } |
---|
| 267 | |
---|
| 268 | -if test x$sim_cv_os_cygwin = xyes; then |
---|
| 269 | - TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32' |
---|
| 270 | -else |
---|
| 271 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ltermcap" >&5 |
---|
| 272 | -$as_echo_n "checking for main in -ltermcap... " >&6; } |
---|
| 273 | -if test "${ac_cv_lib_termcap_main+set}" = set; then : |
---|
| 274 | - $as_echo_n "(cached) " >&6 |
---|
| 275 | -else |
---|
| 276 | - ac_check_lib_save_LIBS=$LIBS |
---|
| 277 | -LIBS="-ltermcap $LIBS" |
---|
| 278 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
---|
| 279 | +if test "$with_system_readline" = yes; then |
---|
| 280 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline" >&5 |
---|
| 281 | +$as_echo_n "checking for readline... " >&6; } |
---|
| 282 | + save_LIBS="$LIBS" |
---|
| 283 | + LIBS="-lreadline $save_LIBS" |
---|
| 284 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
---|
| 285 | /* end confdefs.h. */ |
---|
| 286 | |
---|
| 287 | - |
---|
| 288 | +/* Override any GCC internal prototype to avoid an error. |
---|
| 289 | + Use char because int might match the return type of a GCC |
---|
| 290 | + builtin and then its argument prototype would still apply. */ |
---|
| 291 | +#ifdef __cplusplus |
---|
| 292 | +extern "C" |
---|
| 293 | +#endif |
---|
| 294 | +char add_history (); |
---|
| 295 | int |
---|
| 296 | main () |
---|
| 297 | { |
---|
| 298 | -return main (); |
---|
| 299 | +return add_history (); |
---|
| 300 | ; |
---|
| 301 | return 0; |
---|
| 302 | } |
---|
| 303 | _ACEOF |
---|
| 304 | if ac_fn_c_try_link "$LINENO"; then : |
---|
| 305 | - ac_cv_lib_termcap_main=yes |
---|
| 306 | -else |
---|
| 307 | - ac_cv_lib_termcap_main=no |
---|
| 308 | -fi |
---|
| 309 | -rm -f core conftest.err conftest.$ac_objext \ |
---|
| 310 | - conftest$ac_exeext conftest.$ac_ext |
---|
| 311 | -LIBS=$ac_check_lib_save_LIBS |
---|
| 312 | -fi |
---|
| 313 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_main" >&5 |
---|
| 314 | -$as_echo "$ac_cv_lib_termcap_main" >&6; } |
---|
| 315 | -if test "x$ac_cv_lib_termcap_main" = x""yes; then : |
---|
| 316 | - TERMCAP=-ltermcap |
---|
| 317 | -else |
---|
| 318 | - TERMCAP="" |
---|
| 319 | -fi |
---|
| 320 | - |
---|
| 321 | -fi |
---|
| 322 | - |
---|
| 323 | - |
---|
| 324 | -# We prefer the in-tree readline. Top-level dependencies make sure |
---|
| 325 | -# src/readline (if it's there) is configured before src/sim. |
---|
| 326 | -if test -r ../../readline/Makefile; then |
---|
| 327 | - READLINE=../../readline/libreadline.a |
---|
| 328 | -else |
---|
| 329 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 |
---|
| 330 | -$as_echo_n "checking for readline in -lreadline... " >&6; } |
---|
| 331 | -if test "${ac_cv_lib_readline_readline+set}" = set; then : |
---|
| 332 | - $as_echo_n "(cached) " >&6 |
---|
| 333 | + READLINE=-lreadline |
---|
| 334 | else |
---|
| 335 | - ac_check_lib_save_LIBS=$LIBS |
---|
| 336 | -LIBS="-lreadline $TERMCAP $LIBS" |
---|
| 337 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
---|
| 338 | + LIBS="-lreadline -lncurses $save_LIBS" |
---|
| 339 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
---|
| 340 | /* end confdefs.h. */ |
---|
| 341 | |
---|
| 342 | /* Override any GCC internal prototype to avoid an error. |
---|
| 343 | @@ -4598,33 +4579,39 @@ |
---|
| 344 | #ifdef __cplusplus |
---|
| 345 | extern "C" |
---|
| 346 | #endif |
---|
| 347 | -char readline (); |
---|
| 348 | +char add_history (); |
---|
| 349 | int |
---|
| 350 | main () |
---|
| 351 | { |
---|
| 352 | -return readline (); |
---|
| 353 | +return add_history (); |
---|
| 354 | ; |
---|
| 355 | return 0; |
---|
| 356 | } |
---|
| 357 | _ACEOF |
---|
| 358 | if ac_fn_c_try_link "$LINENO"; then : |
---|
| 359 | - ac_cv_lib_readline_readline=yes |
---|
| 360 | + READLINE="-lreadline -lncurses" |
---|
| 361 | else |
---|
| 362 | - ac_cv_lib_readline_readline=no |
---|
| 363 | + as_fn_error "unable to detect readline" "$LINENO" 5 |
---|
| 364 | fi |
---|
| 365 | rm -f core conftest.err conftest.$ac_objext \ |
---|
| 366 | conftest$ac_exeext conftest.$ac_ext |
---|
| 367 | -LIBS=$ac_check_lib_save_LIBS |
---|
| 368 | + |
---|
| 369 | fi |
---|
| 370 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5 |
---|
| 371 | -$as_echo "$ac_cv_lib_readline_readline" >&6; } |
---|
| 372 | -if test "x$ac_cv_lib_readline_readline" = x""yes; then : |
---|
| 373 | - READLINE=-lreadline |
---|
| 374 | -else |
---|
| 375 | - as_fn_error "the required \"readline\" library is missing" "$LINENO" 5 |
---|
| 376 | +rm -f core conftest.err conftest.$ac_objext \ |
---|
| 377 | + conftest$ac_exeext conftest.$ac_ext |
---|
| 378 | + LIBS="$save_LIBS" |
---|
| 379 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE" >&5 |
---|
| 380 | +$as_echo "$READLINE" >&6; } |
---|
| 381 | + READLINE_DEPS= |
---|
| 382 | + READLINE_CFLAGS= |
---|
| 383 | +else |
---|
| 384 | + READLINE='$(READLINE_DIR)/libreadline.a' |
---|
| 385 | + READLINE_DEPS='$(READLINE)' |
---|
| 386 | + READLINE_CFLAGS='-I$(READLINE_SRC)/..' |
---|
| 387 | fi |
---|
| 388 | |
---|
| 389 | -fi |
---|
| 390 | + |
---|
| 391 | + |
---|
| 392 | |
---|
| 393 | |
---|
| 394 | ac_sources="$sim_link_files" |
---|
| 395 | diff -Naur gdb-6.8.50.20090908.orig/sim/erc32/configure.ac gdb-6.8.50.20090908-rtems4.10-20090908/sim/erc32/configure.ac |
---|
| 396 | --- gdb-6.8.50.20090908.orig/sim/erc32/configure.ac 2006-12-20 23:35:51.000000000 +0100 |
---|
| 397 | +++ gdb-6.8.50.20090908-rtems4.10-20090908/sim/erc32/configure.ac 2009-09-08 06:12:34.000000000 +0200 |
---|
| 398 | @@ -11,27 +11,32 @@ |
---|
| 399 | |
---|
| 400 | AC_CHECK_HEADERS(stdlib.h) |
---|
| 401 | |
---|
| 402 | -# In the Cygwin environment, we need some additional flags. |
---|
| 403 | -AC_CACHE_CHECK([for cygwin], sim_cv_os_cygwin, |
---|
| 404 | -[AC_EGREP_CPP(lose, [ |
---|
| 405 | -#ifdef __CYGWIN__ |
---|
| 406 | -lose |
---|
| 407 | -#endif],[sim_cv_os_cygwin=yes],[sim_cv_os_cygwin=no])]) |
---|
| 408 | +AC_ARG_WITH([system-readline], |
---|
| 409 | + [AS_HELP_STRING([--with-system-readline], |
---|
| 410 | + [use installed readline library])]) |
---|
| 411 | |
---|
| 412 | -if test x$sim_cv_os_cygwin = xyes; then |
---|
| 413 | - TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32' |
---|
| 414 | +if test "$with_system_readline" = yes; then |
---|
| 415 | + AC_MSG_CHECKING([for readline]) |
---|
| 416 | + save_LIBS="$LIBS" |
---|
| 417 | + LIBS="-lreadline $save_LIBS" |
---|
| 418 | + AC_LINK_IFELSE([AC_LANG_CALL([], |
---|
| 419 | + [add_history])], [READLINE=-lreadline], |
---|
| 420 | + [ LIBS="-lreadline -lncurses $save_LIBS" |
---|
| 421 | + AC_LINK_IFELSE([AC_LANG_CALL([], |
---|
| 422 | + [add_history])], [READLINE="-lreadline -lncurses"], |
---|
| 423 | + [AC_MSG_ERROR([unable to detect readline])]) |
---|
| 424 | + ]) |
---|
| 425 | + LIBS="$save_LIBS" |
---|
| 426 | + AC_MSG_RESULT($READLINE) |
---|
| 427 | + READLINE_DEPS= |
---|
| 428 | + READLINE_CFLAGS= |
---|
| 429 | else |
---|
| 430 | - AC_CHECK_LIB(termcap, main, TERMCAP=-ltermcap, TERMCAP="") |
---|
| 431 | -fi |
---|
| 432 | -AC_SUBST(TERMCAP) |
---|
| 433 | - |
---|
| 434 | -# We prefer the in-tree readline. Top-level dependencies make sure |
---|
| 435 | -# src/readline (if it's there) is configured before src/sim. |
---|
| 436 | -if test -r ../../readline/Makefile; then |
---|
| 437 | - READLINE=../../readline/libreadline.a |
---|
| 438 | -else |
---|
| 439 | - AC_CHECK_LIB(readline, readline, READLINE=-lreadline, |
---|
| 440 | - AC_ERROR([the required "readline" library is missing]), $TERMCAP) |
---|
| 441 | + READLINE='$(READLINE_DIR)/libreadline.a' |
---|
| 442 | + READLINE_DEPS='$(READLINE)' |
---|
| 443 | + READLINE_CFLAGS='-I$(READLINE_SRC)/..' |
---|
| 444 | fi |
---|
| 445 | AC_SUBST(READLINE) |
---|
| 446 | +AC_SUBST(READLINE_DEPS) |
---|
| 447 | +AC_SUBST(READLINE_CFLAGS) |
---|
| 448 | + |
---|
| 449 | SIM_AC_OUTPUT |
---|
| 450 | diff -Naur gdb-6.8.50.20090908.orig/sim/erc32/erc32.c gdb-6.8.50.20090908-rtems4.10-20090908/sim/erc32/erc32.c |
---|
| 451 | --- gdb-6.8.50.20090908.orig/sim/erc32/erc32.c 2008-11-11 23:20:54.000000000 +0100 |
---|
| 452 | +++ gdb-6.8.50.20090908-rtems4.10-20090908/sim/erc32/erc32.c 2009-09-08 06:12:34.000000000 +0200 |
---|
| 453 | @@ -414,7 +414,7 @@ |
---|
| 454 | if (rom8) mec_memcfg &= ~0x20000; |
---|
| 455 | else mec_memcfg |= 0x20000; |
---|
| 456 | |
---|
| 457 | - mem_ramsz = (256 * 1024) << ((mec_memcfg >> 10) & 7); |
---|
| 458 | + mem_ramsz = (512 * 1024) << ((mec_memcfg >> 10) & 7); |
---|
| 459 | mem_romsz = (128 * 1024) << ((mec_memcfg >> 18) & 7); |
---|
| 460 | |
---|
| 461 | if (sparclite_board) { |
---|
| 462 | diff -Naur gdb-6.8.50.20090908.orig/sim/erc32/Makefile.in gdb-6.8.50.20090908-rtems4.10-20090908/sim/erc32/Makefile.in |
---|
| 463 | --- gdb-6.8.50.20090908.orig/sim/erc32/Makefile.in 2009-01-14 11:53:07.000000000 +0100 |
---|
| 464 | +++ gdb-6.8.50.20090908-rtems4.10-20090908/sim/erc32/Makefile.in 2009-09-08 06:12:34.000000000 +0200 |
---|
| 465 | @@ -19,12 +19,12 @@ |
---|
| 466 | |
---|
| 467 | ## COMMON_PRE_CONFIG_FRAG |
---|
| 468 | |
---|
| 469 | -TERMCAP_LIB = @TERMCAP@ |
---|
| 470 | +# TERMCAP_LIB = -lncurses |
---|
| 471 | READLINE_LIB = @READLINE@ |
---|
| 472 | |
---|
| 473 | SIM_OBJS = exec.o erc32.o func.o help.o float.o interf.o |
---|
| 474 | SIM_EXTRA_LIBS = $(READLINE_LIB) $(TERMCAP_LIB) -lm |
---|
| 475 | -SIM_EXTRA_ALL = sis |
---|
| 476 | +SIM_EXTRA_ALL = sis$(EXEEXT) |
---|
| 477 | SIM_EXTRA_INSTALL = install-sis |
---|
| 478 | SIM_EXTRA_CLEAN = clean-sis |
---|
| 479 | |
---|
| 480 | @@ -38,8 +38,8 @@ |
---|
| 481 | # `sis' doesn't need interf.o. |
---|
| 482 | SIS_OFILES = exec.o erc32.o func.o help.o float.o |
---|
| 483 | |
---|
| 484 | -sis: sis.o $(SIS_OFILES) $(COMMON_OBJS) $(LIBDEPS) |
---|
| 485 | - $(CC) $(ALL_CFLAGS) -o sis \ |
---|
| 486 | +sis$(EXEEXT): sis.o $(SIS_OFILES) $(COMMON_OBJS) $(LIBDEPS) |
---|
| 487 | + $(CC) $(ALL_CFLAGS) -o sis$(EXEEXT) \ |
---|
| 488 | sis.o $(SIS_OFILES) $(COMMON_OBJS) $(EXTRA_LIBS) |
---|
| 489 | |
---|
| 490 | # FIXME: This computes the build host's endianness, doesn't it? |
---|
| 491 | @@ -52,11 +52,11 @@ |
---|
| 492 | |
---|
| 493 | # Copy the files into directories where they will be run. |
---|
| 494 | install-sis: installdirs |
---|
| 495 | - n=`echo sis | sed '$(program_transform_name)'`; \ |
---|
| 496 | - $(INSTALL_PROGRAM) sis$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT) |
---|
| 497 | + n=`echo sis$(EXEEXT) | sed '$(program_transform_name)'`; \ |
---|
| 498 | + $(INSTALL_PROGRAM) sis$(EXEEXT) $(DESTDIR)$(bindir)/$$n |
---|
| 499 | |
---|
| 500 | clean-sis: |
---|
| 501 | - rm -f sis end end.h |
---|
| 502 | + rm -f sis$(EXEEXT) end end.h |
---|
| 503 | |
---|
| 504 | configure: |
---|
| 505 | @echo "Rebuilding configure..." |
---|
| 506 | diff -Naur gdb-6.8.50.20090908.orig/sim/h8300/compile.c gdb-6.8.50.20090908-rtems4.10-20090908/sim/h8300/compile.c |
---|
| 507 | --- gdb-6.8.50.20090908.orig/sim/h8300/compile.c 2008-12-01 17:10:45.000000000 +0100 |
---|
| 508 | +++ gdb-6.8.50.20090908-rtems4.10-20090908/sim/h8300/compile.c 2009-09-08 06:12:34.000000000 +0200 |
---|
| 509 | @@ -38,6 +38,12 @@ |
---|
| 510 | # define SIGTRAP 5 |
---|
| 511 | #endif |
---|
| 512 | |
---|
| 513 | +#ifdef _WIN32 |
---|
| 514 | +#ifndef SIGBUS |
---|
| 515 | +#define SIGBUS 10 |
---|
| 516 | +#endif |
---|
| 517 | +#endif |
---|
| 518 | + |
---|
| 519 | int debug; |
---|
| 520 | |
---|
| 521 | host_callback *sim_callback; |
---|
| 522 | diff -Naur gdb-6.8.50.20090908.orig/sim/m32c/Makefile.in gdb-6.8.50.20090908-rtems4.10-20090908/sim/m32c/Makefile.in |
---|
| 523 | --- gdb-6.8.50.20090908.orig/sim/m32c/Makefile.in 2009-01-14 11:53:07.000000000 +0100 |
---|
| 524 | +++ gdb-6.8.50.20090908-rtems4.10-20090908/sim/m32c/Makefile.in 2009-09-08 06:12:34.000000000 +0200 |
---|
| 525 | @@ -55,7 +55,7 @@ |
---|
| 526 | ./opc2c -l m32c.out $(srcdir)/m32c.opc > m32c.c |
---|
| 527 | |
---|
| 528 | opc2c : opc2c.o safe-fgets.o |
---|
| 529 | - $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ |
---|
| 530 | + $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $^ -o $@ |
---|
| 531 | |
---|
| 532 | sample.x : $(srcdir)/sample.S $(srcdir)/sample.ld |
---|
| 533 | ../../gcc/xgcc $(CPUFLAGS) -B../../gcc/ -c $(srcdir)/sample.S -o sample.o |
---|
| 534 | @@ -83,8 +83,10 @@ |
---|
| 535 | mem.o : mem.h cpu.h syscalls.h |
---|
| 536 | misc.o : cpu.h misc.h |
---|
| 537 | opc2c.o : safe-fgets.h |
---|
| 538 | + $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o $@ -c $(srcdir)/opc2c.c |
---|
| 539 | reg.o : cpu.h |
---|
| 540 | safe-fgets.o : safe-fgets.h |
---|
| 541 | + $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o $@ -c $(srcdir)/safe-fgets.c |
---|
| 542 | srcdest.c : cpu.h mem.h |
---|
| 543 | syscalls.c : cpu.h mem.h syscalls.h |
---|
| 544 | |
---|