patches/gdb/6.6/100-uclibc-conf.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Feb 17 22:08:06 2008 +0000 (2008-02-17)
changeset 431 8bde4c6ea47a
permissions -rw-r--r--
Robert P. J. DAY says:

apparently, the patchset for gcc 4.2.1 applies properly to the
source for gcc 4.2.2 and gcc 4.2.3. so, if you want, you can simply
add support for those last two just by augmenting menuconfig and
adding a couple symlinks for those two directories. seems like a
cheap way to add a couple new versions.
yann@96
     1
diff -rNdup gdb-6.6.orig/bfd/configure gdb-6.6/bfd/configure
yann@96
     2
--- gdb-6.6.orig/bfd/configure	2006-10-25 08:49:20.000000000 +0200
yann@96
     3
+++ gdb-6.6/bfd/configure	2007-05-14 10:35:50.000000000 +0200
yann@96
     4
@@ -3579,6 +3579,11 @@ linux-gnu*)
yann@96
     5
   lt_cv_deplibs_check_method=pass_all
yann@96
     6
   ;;
yann@96
     7
 
yann@96
     8
+linux-uclibc*)
yann@96
     9
+  lt_cv_deplibs_check_method=pass_all
yann@96
    10
+  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
yann@96
    11
+  ;;
yann@96
    12
+
yann@96
    13
 netbsd* | knetbsd*-gnu)
yann@96
    14
   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
yann@96
    15
     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
yann@96
    16
diff -rNdup gdb-6.6.orig/libtool.m4 gdb-6.6/libtool.m4
yann@96
    17
--- gdb-6.6.orig/libtool.m4	2005-12-27 17:37:57.000000000 +0100
yann@96
    18
+++ gdb-6.6/libtool.m4	2007-05-14 10:35:50.000000000 +0200
yann@96
    19
@@ -751,6 +751,11 @@ netbsd* | knetbsd*-gnu)
yann@96
    20
   fi
yann@96
    21
   ;;
yann@96
    22
 
yann@96
    23
+linux-uclibc*)
yann@96
    24
+  lt_cv_deplibs_check_method=pass_all
yann@96
    25
+  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
yann@96
    26
+  ;;
yann@96
    27
+
yann@96
    28
 newsos6)
yann@96
    29
   [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
yann@96
    30
   lt_cv_file_magic_cmd=/usr/bin/file
yann@96
    31
diff -rNdup gdb-6.6.orig/ltconfig gdb-6.6/ltconfig
yann@96
    32
--- gdb-6.6.orig/ltconfig	2006-07-04 22:31:03.000000000 +0200
yann@96
    33
+++ gdb-6.6/ltconfig	2007-05-14 10:35:50.000000000 +0200
yann@96
    34
@@ -602,7 +602,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-
yann@96
    35
 
yann@96
    36
 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
yann@96
    37
 case $host_os in
yann@96
    38
-linux-gnu*) ;;
yann@96
    39
+linux-gnu*|linux-uclibc*) ;;
yann@96
    40
 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
yann@96
    41
 esac
yann@96
    42
 
yann@96
    43
@@ -1270,6 +1270,24 @@ linux-gnu*)
yann@96
    44
   dynamic_linker='GNU/Linux ld.so'
yann@96
    45
   ;;
yann@96
    46
 
yann@96
    47
+linux-uclibc*)
yann@96
    48
+  version_type=linux
yann@96
    49
+  need_lib_prefix=no
yann@96
    50
+  need_version=no
yann@96
    51
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
yann@96
    52
+  soname_spec='${libname}${release}.so$major'
yann@96
    53
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
yann@96
    54
+  shlibpath_var=LD_LIBRARY_PATH
yann@96
    55
+  shlibpath_overrides_runpath=no
yann@96
    56
+  # This implies no fast_install, which is unacceptable.
yann@96
    57
+  # Some rework will be needed to allow for fast_install
yann@96
    58
+  # before this can be enabled.
yann@96
    59
+  # Note: copied from linux-gnu, and may not be appropriate.
yann@96
    60
+  hardcode_into_libs=yes
yann@96
    61
+  # Assume using the uClibc dynamic linker.
yann@96
    62
+  dynamic_linker="uClibc ld.so"
yann@96
    63
+  ;;
yann@96
    64
+
yann@96
    65
 netbsd*)
yann@96
    66
   need_lib_prefix=no
yann@96
    67
   need_version=no
yann@96
    68
diff -rNdup gdb-6.6.orig/opcodes/configure gdb-6.6/opcodes/configure
yann@96
    69
--- gdb-6.6.orig/opcodes/configure	2006-10-25 08:49:20.000000000 +0200
yann@96
    70
+++ gdb-6.6/opcodes/configure	2007-05-14 10:35:50.000000000 +0200
yann@96
    71
@@ -3590,6 +3590,11 @@ netbsd* | knetbsd*-gnu)
yann@96
    72
   fi
yann@96
    73
   ;;
yann@96
    74
 
yann@96
    75
+linux-uclibc*)
yann@96
    76
+  lt_cv_deplibs_check_method=pass_all
yann@96
    77
+  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
yann@96
    78
+  ;;
yann@96
    79
+
yann@96
    80
 newsos6)
yann@96
    81
   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
yann@96
    82
   lt_cv_file_magic_cmd=/usr/bin/file