Add a new patch to make glibc build with latest (4.3.x) gcc.
See: http://sourceware.org/ml/libc-help/2008-06/msg00063.html
/trunk/patches/glibc/2.7/210-gcc-4.3_sysinclude_path.patch | 50 50 0 0 ++++++++++++++++++++
1 file changed, 50 insertions(+)
3 # Adds a new version to one of the toolchain component
8 Usage: ${myname} <tool> [option] <version>
10 --gcc, --binutils, --glibc, --uClibc, --linux,
11 --gdb, --dmalloc, --duma, --strace, --ltrace, --libelf
14 Valid options for all tools:
16 mark the version as being experimental
19 mark the version as being obsolete
21 Valid mandatory 'option' for tool==linux is one and only one of:
22 --install, --sanitised, --copy
24 'version' is a valid version for the specified tool.
27 add version 2.6.19.2 to linux kernel install method:
28 ${myname} --linux --install 2.6.19.2
30 add versions 2.3.5 and 2.3.6 to glibc:
31 ${myname} --glibc 2.3.5 2.3.6
45 while [ $i -le $# ]; do
48 --gcc) cat=CC; tool=gcc; tool_prefix=cc; tool_suffix=;;
49 --binutils) cat=BINUTILS; tool=binutils; tool_prefix=; tool_suffix=;;
50 --glibc) cat=LIBC; tool=glibc; tool_prefix=libc; tool_suffix=;;
51 --uClibc) cat=LIBC; tool=uClibc; tool_prefix=libc; tool_suffix=;;
52 --linux) cat=KERNEL; tool=linux; tool_prefix=kernel; tool_suffix=;;
53 --gdb) cat=GDB; tool=gdb; tool_prefix=debug tool_suffix=;;
54 --dmalloc) cat=DMALLOC; tool=dmalloc; tool_prefix=debug tool_suffix=;;
55 --duma) cat=DUMA; tool=duma; tool_prefix=debug tool_suffix=;;
56 --strace) cat=STRACE; tool=strace; tool_prefix=debug tool_suffix=;;
57 --ltrace) cat=LTRACE; tool=ltrace; tool_prefix=debug tool_suffix=;;
58 --libelf) cat=LIBELF; tool=libelf; tool_prefix=tools tool_suffix=;;
59 --gmp) cat=GMP; tool=gmp; tool_prefix=cc; tool_suffix=;;
60 --mpfr) cat=MPFR; tool=mpfr; tool_prefix=cc; tool_suffix=;;
62 -x|--experimental) EXP=1; OBS=; prompt_suffix=" (EXPERIMENTAL)";;
63 -o|--obsolete) OBS=1; EXP=; prompt_suffix=" (OBSOLETE)";;
64 --install) tool_suffix=install;;
65 --sanitised) tool_suffix=sanitised;;
66 --copy) tool_suffix=copy;;
68 -h|--help) doHelp; exit 0;;
69 -*) echo "Unknown option: '${!i}' (use -h/--help for help)."; exit 1;;
70 *) VERSION="${VERSION} ${!i}";;
75 [ -n "${tool}" -o -n "${VERSION}" ] || { doHelp; exit 1; }
78 KERNEL) [ -z "${tool_suffix}" ] && { doHelp; exit 1; } ;;
82 for ver in ${VERSION}; do
83 # Split VERSION into MAJOR MINOR PATCHLEVEL EXTRAVERSION
84 ver_M=$(echo "${ver}...." |cut -d . -f 1)
85 ver_m=$(echo "${ver}...." |cut -d . -f 2)
86 ver_P=$(echo "${ver}...." |cut -d . -f 3)
87 ver_E=$(echo "${ver}...." |cut -d . -f 4)
88 unset DEP L1 L2 L3 L4 L5 L6 FILE
89 v=$(echo "${ver}" |sed -r -e 's/-/_/g; s/\./_/g;')
90 if [ "${cat}" = "KERNEL" ]; then
91 TOOL_SUFFIX=$(echo "${tool_suffix}" |tr [[:lower:]] [[:upper:]])
92 L1="config ${cat}_${TOOL_SUFFIX}_V_${v}\n"
94 L3=" prompt \"${ver}${prompt_suffix}\"\n"
95 # Extra versions are not necessary visible:
96 case "${tool_suffix},${ver}" in
97 sanitised,*) ;; # Sanitised headers always have an extra version
98 *,*.*.*.*) DEP="${DEP} && KERNEL_VERSION_SEE_EXTRAVERSION";;
100 L6=" default \"${ver}\" if ${cat}_${TOOL_SUFFIX}_V_${v}"
101 FILE="config/${tool_prefix}/${tool}_headers_${tool_suffix}.in"
103 L1="config ${cat}_V_${v}\n"
105 L3=" prompt \"${ver}${prompt_suffix}\"\n"
106 L6=" default \"${ver}\" if ${cat}_V_${v}"
109 if [ ${ver_M} -gt 4 -o \( ${ver_M} -eq 4 -a ${ver_m} -ge 3 \) ]; then
110 L5=" select CC_GCC_4_3_or_later\n"
114 FILE="config/${tool_prefix}/${tool}.in"
116 [ -n "${EXP}" ] && DEP="${DEP} && EXPERIMENTAL"
117 [ -n "${OBS}" ] && DEP="${DEP} && OBSOLETE"
120 *) L4=" depends on "$(echo "${DEP}" |sed -r -e 's/^ \&\& //; s/\&/\\&/g;')"\n"
122 sed -r -i -e 's/^(# CT_INSERT_VERSION_ABOVE)$/'"${L1}${L2}${L3}${L4}${L5}"'\n\1/;
123 s/^(# CT_INSERT_VERSION_STRING_ABOVE)$/'"${L6}"'\n\1/;' "${FILE}"