Contents of /trunk/gcc/patches/gcc-4.1.2-uclibc_conf-1.patch
Parent Directory | Revision Log
Revision 456 -
(show annotations)
(download)
Thu Jan 31 11:54:53 2008 UTC (16 years, 9 months ago) by niro
File size: 5823 byte(s)
Thu Jan 31 11:54:53 2008 UTC (16 years, 9 months ago) by niro
File size: 5823 byte(s)
-added uclibc patches
1 | Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes) |
2 | Date: 2007-04-04 |
3 | Initial Package Version: 4.1.2 |
4 | Upstream Status: Not submitted - Hack |
5 | Origin: http://www.uclibc.org/cgi-bin/viewcvs.cgi/*checkout*/trunk/buildroot/toolchain/gcc/ |
6 | 4.1.2/100-uclibc-conf.patch - With modifications... |
7 | Description: This adds --target=*-*-linux-uclibc* needed for building a |
8 | uClibc toolchain. All the GCC-specs hunks were removed, you will have |
9 | to modify the path and name for ld.so yourself. |
10 | |
11 | diff -Naur gcc-4.1.2.orig/configure gcc-4.1.2/configure |
12 | --- gcc-4.1.2.orig/configure 2006-11-21 17:48:36.000000000 +0000 |
13 | +++ gcc-4.1.2/configure 2007-04-04 21:49:52.000000000 +0000 |
14 | @@ -1133,7 +1133,7 @@ |
15 | ;; |
16 | "") |
17 | case "${target}" in |
18 | - *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu) |
19 | + *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*) |
20 | # Enable libmudflap by default in GNU and friends. |
21 | ;; |
22 | *-*-freebsd*) |
23 | diff -Naur gcc-4.1.2.orig/configure.in gcc-4.1.2/configure.in |
24 | --- gcc-4.1.2.orig/configure.in 2006-11-21 17:48:36.000000000 +0000 |
25 | +++ gcc-4.1.2/configure.in 2007-04-04 21:49:52.000000000 +0000 |
26 | @@ -341,7 +341,7 @@ |
27 | ;; |
28 | "") |
29 | case "${target}" in |
30 | - *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu) |
31 | + *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*) |
32 | # Enable libmudflap by default in GNU and friends. |
33 | ;; |
34 | *-*-freebsd*) |
35 | diff -Naur gcc-4.1.2.orig/contrib/regression/objs-gcc.sh gcc-4.1.2/contrib/regression/objs-gcc.sh |
36 | --- gcc-4.1.2.orig/contrib/regression/objs-gcc.sh 2005-08-15 00:41:31.000000000 +0000 |
37 | +++ gcc-4.1.2/contrib/regression/objs-gcc.sh 2007-04-04 21:49:52.000000000 +0000 |
38 | @@ -105,6 +105,10 @@ |
39 | then |
40 | make all-gdb all-dejagnu all-ld || exit 1 |
41 | make install-gdb install-dejagnu install-ld || exit 1 |
42 | +elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] |
43 | + then |
44 | + make all-gdb all-dejagnu all-ld || exit 1 |
45 | + make install-gdb install-dejagnu install-ld || exit 1 |
46 | elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then |
47 | make bootstrap || exit 1 |
48 | make install || exit 1 |
49 | diff -Naur gcc-4.1.2.orig/gcc/config/t-linux-uclibc gcc-4.1.2/gcc/config/t-linux-uclibc |
50 | --- gcc-4.1.2.orig/gcc/config/t-linux-uclibc 1970-01-01 00:00:00.000000000 +0000 |
51 | +++ gcc-4.1.2/gcc/config/t-linux-uclibc 2007-04-04 21:49:52.000000000 +0000 |
52 | @@ -0,0 +1,5 @@ |
53 | +# Remove glibc specific files added in t-linux |
54 | +SHLIB_MAPFILES := $(filter-out $(srcdir)/config/libgcc-glibc.ver, $(SHLIB_MAPFILES)) |
55 | + |
56 | +# Use unwind-dw2-fde instead of unwind-dw2-fde-glibc |
57 | +LIB2ADDEH := $(subst unwind-dw2-fde-glibc.c,unwind-dw2-fde.c,$(LIB2ADDEH)) |
58 | diff -Naur gcc-4.1.2.orig/gcc/config.gcc gcc-4.1.2/gcc/config.gcc |
59 | --- gcc-4.1.2.orig/gcc/config.gcc 2006-10-15 23:12:23.000000000 +0000 |
60 | +++ gcc-4.1.2/gcc/config.gcc 2007-04-04 21:49:52.000000000 +0000 |
61 | @@ -1884,7 +1884,7 @@ |
62 | ;; |
63 | sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \ |
64 | sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \ |
65 | - sh-*-linux* | sh[346lbe]*-*-linux* | \ |
66 | + sh*-*-linux* | sh[346lbe]*-*-linux* | \ |
67 | sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \ |
68 | sh64-*-netbsd* | sh64l*-*-netbsd*) |
69 | tmake_file="${tmake_file} sh/t-sh sh/t-elf" |
70 | @@ -2338,6 +2338,12 @@ |
71 | ;; |
72 | esac |
73 | |
74 | +# Rather than hook into each target, just do it after all the linux |
75 | +# targets have been processed |
76 | +case ${target} in |
77 | +*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC" ; tmake_file="${tmake_file} t-linux-uclibc" |
78 | +esac |
79 | + |
80 | case ${target} in |
81 | i[34567]86-*-linux*aout* | i[34567]86-*-linux*libc1) |
82 | tmake_file="${tmake_file} i386/t-gmm_malloc" |
83 | diff -Naur gcc-4.1.2.orig/libmudflap/configure gcc-4.1.2/libmudflap/configure |
84 | --- gcc-4.1.2.orig/libmudflap/configure 2005-10-04 23:54:38.000000000 +0000 |
85 | +++ gcc-4.1.2/libmudflap/configure 2007-04-04 21:49:52.000000000 +0000 |
86 | @@ -5382,6 +5382,11 @@ |
87 | lt_cv_deplibs_check_method=pass_all |
88 | ;; |
89 | |
90 | +linux-uclibc*) |
91 | + lt_cv_deplibs_check_method=pass_all |
92 | + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` |
93 | + ;; |
94 | + |
95 | netbsd* | knetbsd*-gnu) |
96 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
97 | lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' |
98 | diff -Naur gcc-4.1.2.orig/libtool.m4 gcc-4.1.2/libtool.m4 |
99 | --- gcc-4.1.2.orig/libtool.m4 2005-07-16 02:30:53.000000000 +0000 |
100 | +++ gcc-4.1.2/libtool.m4 2007-04-04 21:49:52.000000000 +0000 |
101 | @@ -743,6 +743,11 @@ |
102 | lt_cv_deplibs_check_method=pass_all |
103 | ;; |
104 | |
105 | +linux-uclibc*) |
106 | + lt_cv_deplibs_check_method=pass_all |
107 | + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` |
108 | + ;; |
109 | + |
110 | netbsd* | knetbsd*-gnu) |
111 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
112 | [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'] |
113 | diff -Naur gcc-4.1.2.orig/ltconfig gcc-4.1.2/ltconfig |
114 | --- gcc-4.1.2.orig/ltconfig 2006-07-04 20:30:34.000000000 +0000 |
115 | +++ gcc-4.1.2/ltconfig 2007-04-04 21:49:52.000000000 +0000 |
116 | @@ -603,6 +603,7 @@ |
117 | |
118 | # Transform linux* to *-*-linux-gnu*, to support old configure scripts. |
119 | case $host_os in |
120 | +linux-uclibc*) ;; |
121 | linux-gnu*) ;; |
122 | linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` |
123 | esac |
124 | @@ -1274,6 +1275,23 @@ |
125 | dynamic_linker='GNU/Linux ld.so' |
126 | ;; |
127 | |
128 | +linux-uclibc*) |
129 | + version_type=linux |
130 | + need_lib_prefix=no |
131 | + need_version=no |
132 | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
133 | + soname_spec='${libname}${release}.so$major' |
134 | + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' |
135 | + shlibpath_var=LD_LIBRARY_PATH |
136 | + shlibpath_overrides_runpath=no |
137 | + # This implies no fast_install, which is unacceptable. |
138 | + # Some rework will be needed to allow for fast_install |
139 | + # before this can be enabled. |
140 | + hardcode_into_libs=yes |
141 | + # Assume using the uClibc dynamic linker. |
142 | + dynamic_linker="uClibc ld.so" |
143 | + ;; |
144 | + |
145 | netbsd*) |
146 | need_lib_prefix=no |
147 | need_version=no |