Stefan Reinauer | 682a90c | 2015-06-09 14:59:58 -0700 | [diff] [blame] | 1 | diff -urN gcc-4.9.2/gcc/config/i386/t-elf64 gcc-4.9.2/gcc/config/i386/t-elf64 |
| 2 | --- gcc-4.9.2/gcc/config/i386/t-elf64 1969-12-31 16:00:00.000000000 -0800 |
| 3 | +++ gcc-4.9.2/gcc/config/i386/t-elf64 2015-06-17 11:20:08.032513005 -0700 |
| 4 | @@ -0,0 +1,38 @@ |
| 5 | +# Copyright (C) 2002-2014 Free Software Foundation, Inc. |
| 6 | +# |
| 7 | +# This file is part of GCC. |
| 8 | +# |
| 9 | +# GCC is free software; you can redistribute it and/or modify |
| 10 | +# it under the terms of the GNU General Public License as published by |
| 11 | +# the Free Software Foundation; either version 3, or (at your option) |
| 12 | +# any later version. |
| 13 | +# |
| 14 | +# GCC is distributed in the hope that it will be useful, |
| 15 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | +# GNU General Public License for more details. |
| 18 | +# |
| 19 | +# You should have received a copy of the GNU General Public License |
| 20 | +# along with GCC; see the file COPYING3. If not see |
| 21 | +# <http://www.gnu.org/licenses/>. |
| 22 | + |
| 23 | +# On Debian, Ubuntu and other derivative distributions, the 32bit libraries |
| 24 | +# are found in /lib32 and /usr/lib32, /lib64 and /usr/lib64 are symlinks to |
| 25 | +# /lib and /usr/lib, while other distributions install libraries into /lib64 |
| 26 | +# and /usr/lib64. The LSB does not enforce the use of /lib64 and /usr/lib64, |
| 27 | +# it doesn't tell anything about the 32bit libraries on those systems. Set |
| 28 | +# MULTILIB_OSDIRNAMES according to what is found on the target. |
| 29 | + |
| 30 | +# To support i386, x86-64 and x32 libraries, the directory structrue |
| 31 | +# should be: |
| 32 | +# |
| 33 | +# /lib has i386 libraries. |
| 34 | +# /lib64 has x86-64 libraries. |
| 35 | +# /libx32 has x32 libraries. |
| 36 | +# |
| 37 | +comma=, |
| 38 | +MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) |
| 39 | +MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) |
| 40 | +MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-elf) |
| 41 | +MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-elf) |
| 42 | +MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-elf-x32) |
| 43 | diff -urN gcc-4.9.2/gcc/config.gcc gcc-4.9.2/gcc/config.gcc |
| 44 | --- gcc-4.9.2/gcc/config.gcc 2015-06-17 11:20:57.841008182 -0700 |
| 45 | +++ gcc-4.9.2/gcc/config.gcc 2015-06-17 11:17:24.818890200 -0700 |
| 46 | @@ -1353,6 +1353,30 @@ |
| 47 | ;; |
| 48 | x86_64-*-elf*) |
| 49 | tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h" |
| 50 | + tmake_file="${tmake_file} i386/t-elf64" |
| 51 | + x86_multilibs="${with_multilib_list}" |
| 52 | + if test "$x86_multilibs" = "default"; then |
| 53 | + case ${with_abi} in |
| 54 | + x32 | mx32) |
| 55 | + x86_multilibs="mx32" |
| 56 | + ;; |
| 57 | + *) |
| 58 | + x86_multilibs="m64,m32" |
| 59 | + ;; |
| 60 | + esac |
| 61 | + fi |
| 62 | + x86_multilibs=`echo $x86_multilibs | sed -e 's/,/ /g'` |
| 63 | + for x86_multilib in ${x86_multilibs}; do |
| 64 | + case ${x86_multilib} in |
| 65 | + m32 | m64 | mx32) |
| 66 | + TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${x86_multilib}" |
| 67 | + ;; |
| 68 | + *) |
| 69 | + echo "--with-multilib-list=${x86_with_multilib} not supported." |
| 70 | + exit 1 |
| 71 | + esac |
| 72 | + done |
| 73 | + TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'` |
| 74 | ;; |
| 75 | i[34567]86-*-rdos*) |
| 76 | tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/rdos.h" |