# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: package/.../gcc/3.4.3-amd64.patch # Copyright (C) 2004 - 2006 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- diff -Naur gcc-3.4.3.orig/config-ml.in gcc-3.4.3/config-ml.in --- gcc-3.4.3.orig/config-ml.in 2004-01-05 02:41:14.000000000 +0200 +++ gcc-3.4.3/config-ml.in 2005-02-24 18:40:28.644307656 +0200 @@ -514,6 +514,44 @@ ;; esac ;; +x86-64*-*-*) + case " $multidirs " in + *" 32 "*) + # We will not be able to create libraries with -m32 if + # we cannot even link a trivial program. It usually + # indicates the 32bit libraries are missing. + if echo 'main() {}' > conftest.c && + ${CC-gcc} -m32 conftest.c -o conftest; then + echo Enable only libstdc++. + old_multilibdirs="${multidirs}" + multidirs="" + for x in ${old_multilibdirs}; do + case "$x" in + *32* ) case ${ml_realsrcdir} in + *"libstdc++-v3" ) multidirs="${multidirs} ${x}" ;; + *"libf2c" ) multidirs="${multidirs} ${x}" ;; + *"libobjc" ) multidirs="${multidirs} ${x}" ;; + *"libiberty" ) multidirs="${multidirs} ${x}" ;; + *"zlib" ) multidirs="${multidirs} ${x}" ;; + *) : ;; + esac + ;; + done + else + echo Could not link program with -m32, disabling it. + old_multidirs="${multidirs}" + multidirs="" + for x in ${old_multidirs}; do + case "$x" in + *m32* ) : ;; + *) multidirs="${multidirs} ${x}" ;; + esac + done + fi + rm -f conftest.c conftest + ;; + esac + ;; esac