generic-poky/meta/recipes-devtools/gcc/gcc-4.7/use-ml-conf-files-from-B.patch
Constantin Musca 703b70c98a gcc: enable multilib for target gcc
- add a task to setup multilib configuration for target gcc
- this commit adapts Nitin Kamble's work to gcc 4.7
- use a hash for storing arch-dependent multilib options
- patch gcc in order to use the multilib config files from the
build directory

Tests:
root@qemux86-64:~# gcc -m64 t.c -o t
root@qemux86-64:~# file t
t: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped
root@qemux86-64:~# ./t
Hello World !
root@qemux86-64:~# gcc -m32 t.c -o t
root@qemux86-64:~# file t
t: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped
root@qemux86-64:~# ./t
Hello World !

[YOCTO #1369]

(From OE-Core rev: b26819c85881e82ee1b5c68840011e78c321f18e)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01 15:54:31 +00:00

88 lines
2.3 KiB
Diff

Use the multilib config files from ${B} instead of using the ones from ${S}
so that the source can be shared between gcc-cross-initial,
gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Index: gcc-4.7.2/gcc/configure
===================================================================
--- gcc-4.7.2.orig/gcc/configure
+++ gcc-4.7.2/gcc/configure
@@ -11717,10 +11717,20 @@ done
tmake_file_=
for f in ${tmake_file}
do
- if test -f ${srcdir}/config/$f
- then
- tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
- fi
+ case $f in
+ */t-linux64 )
+ if test -f ./config/$f
+ then
+ tmake_file_="${tmake_file_} ./config/$f"
+ fi
+ ;;
+ * )
+ if test -f ${srcdir}/config/$f
+ then
+ tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
+ fi
+ ;;
+ esac
done
tmake_file="${tmake_file_}"
@@ -11731,6 +11741,10 @@ tm_file_list="options.h"
tm_include_list="options.h insn-constants.h"
for f in $tm_file; do
case $f in
+ */linux64.h )
+ tm_file_list="${tm_file_list} ./config/$f"
+ tm_include_list="${tm_include_list} ./config/$f"
+ ;;
./* )
f=`echo $f | sed 's/^..//'`
tm_file_list="${tm_file_list} $f"
Index: gcc-4.7.2/gcc/configure.ac
===================================================================
--- gcc-4.7.2.orig/gcc/configure.ac
+++ gcc-4.7.2/gcc/configure.ac
@@ -1701,10 +1701,20 @@ done
tmake_file_=
for f in ${tmake_file}
do
- if test -f ${srcdir}/config/$f
- then
- tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
- fi
+ case $f in
+ */t-linux64 )
+ if test -f ./config/$f
+ then
+ tmake_file_="${tmake_file_} ./config/$f"
+ fi
+ ;;
+ * )
+ if test -f ${srcdir}/config/$f
+ then
+ tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
+ fi
+ ;;
+ esac
done
tmake_file="${tmake_file_}"
@@ -1715,6 +1725,10 @@ tm_file_list="options.h"
tm_include_list="options.h insn-constants.h"
for f in $tm_file; do
case $f in
+ */linux64.h )
+ tm_file_list="${tm_file_list} ./config/$f"
+ tm_include_list="${tm_include_list} ./config/$f"
+ ;;
./* )
f=`echo $f | sed 's/^..//'`
tm_file_list="${tm_file_list} $f"