Commit 3a7e8b87 by Geoffrey Keating Committed by Geoffrey Keating

darwin.h (LINK_COMMAND_SPEC): Add -arch and -arch_only options.

	* config/darwin.h (LINK_COMMAND_SPEC): Add -arch and -arch_only
	options.
	* config/i386/darwin.h (ASM_SPEC): New.
	(SUBTARGET_EXTRA_SPECS): New.
	* config/rs6000/darwin.h (ASM_SPEC): New.
	(SUBTARGET_EXTRA_SPECS): New.
	* configure.in: Don't set CROSS or SYSTEM_HEADER_DIR when building
	a cross-compiler between two different processors on Darwin.
	* configure: Regenerate.

From-SVN: r70589
parent c0d4955f
2003-08-19 Geoffrey Keating <geoffk@apple.com>
* config/darwin.h (LINK_COMMAND_SPEC): Add -arch and -arch_only
options.
* config/i386/darwin.h (ASM_SPEC): New.
(SUBTARGET_EXTRA_SPECS): New.
* config/rs6000/darwin.h (ASM_SPEC): New.
(SUBTARGET_EXTRA_SPECS): New.
* configure.in: Don't set CROSS or SYSTEM_HEADER_DIR when building
a cross-compiler between two different processors on Darwin.
* configure: Regenerate.
2003-08-19 Kazu Hirata <kazu@cs.umass.edu> 2003-08-19 Kazu Hirata <kazu@cs.umass.edu>
* builtins.c: Fix comment typos. * builtins.c: Fix comment typos.
......
...@@ -186,6 +186,8 @@ Boston, MA 02111-1307, USA. */ ...@@ -186,6 +186,8 @@ Boston, MA 02111-1307, USA. */
#define LINK_COMMAND_SPEC "\ #define LINK_COMMAND_SPEC "\
%{!fdump=*:%{!fsyntax-only:%{!precomp:%{!c:%{!M:%{!MM:%{!E:%{!S:\ %{!fdump=*:%{!fsyntax-only:%{!precomp:%{!c:%{!M:%{!MM:%{!E:%{!S:\
%{!Zdynamiclib:%(linker)}%{Zdynamiclib:/usr/bin/libtool} \ %{!Zdynamiclib:%(linker)}%{Zdynamiclib:/usr/bin/libtool} \
%{!Zdynamiclib:-arch %(darwin_arch)} \
%{Zdynamiclib:-arch_only %(darwin_arch)} \
%l %X %{d} %{s} %{t} %{Z} \ %l %X %{d} %{s} %{t} %{Z} \
%{!Zdynamiclib:%{A} %{e*} %{m} %{N} %{n} %{r} %{u*} %{x} %{z}} \ %{!Zdynamiclib:%{A} %{e*} %{m} %{N} %{n} %{r} %{u*} %{x} %{z}} \
%{@:-o %f%u.out}%{!@:%{o*}%{!o:-o a.out}} \ %{@:-o %f%u.out}%{!@:%{o*}%{!o:-o a.out}} \
......
...@@ -41,6 +41,16 @@ Boston, MA 02111-1307, USA. */ ...@@ -41,6 +41,16 @@ Boston, MA 02111-1307, USA. */
#undef CC1_SPEC #undef CC1_SPEC
#define CC1_SPEC "%{!static:-fPIC}" #define CC1_SPEC "%{!static:-fPIC}"
#define ASM_SPEC "-arch i386 \
%{Zforce_cpusubtype_ALL:-force_cpusubtype_ALL} \
%{!Zforce_cpusubtype_ALL:%{mmmx:-force_cpusubtype_ALL}\
%{msse:-force_cpusubtype_ALL}\
%{msse2:-force_cpusubtype_ALL}}"
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
{ "darwin_arch", "i386" },
/* The Darwin assembler mostly follows AT&T syntax. */ /* The Darwin assembler mostly follows AT&T syntax. */
#undef ASSEMBLER_DIALECT #undef ASSEMBLER_DIALECT
#define ASSEMBLER_DIALECT ASM_ATT #define ASSEMBLER_DIALECT ASM_ATT
......
...@@ -97,6 +97,14 @@ do { \ ...@@ -97,6 +97,14 @@ do { \
%{static: %{Zdynamic: %e conflicting code gen style switches are used}}\ %{static: %{Zdynamic: %e conflicting code gen style switches are used}}\
%{!static:%{!mdynamic-no-pic:-fPIC}}" %{!static:%{!mdynamic-no-pic:-fPIC}}"
#define ASM_SPEC "-arch ppc \
%{Zforce_cpusubtype_ALL:-force_cpusubtype_ALL} \
%{!Zforce_cpusubtype_ALL:%{faltivec:-force_cpusubtype_ALL}}"
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
{ "darwin_arch", "ppc" },
/* Make both r2 and r3 available for allocation. */ /* Make both r2 and r3 available for allocation. */
#define FIXED_R2 0 #define FIXED_R2 0
#define FIXED_R13 0 #define FIXED_R13 0
......
...@@ -1414,6 +1414,21 @@ then ...@@ -1414,6 +1414,21 @@ then
ALL=all.cross ALL=all.cross
SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
case "$host","$target" in case "$host","$target" in
# Darwin crosses can use the host system's libraries and headers,
# because of the fat library support. Of course, it must be the
# same version of Darwin on both sides. Allow the user to
# just say --target=foo-darwin without a version number to mean
# "the version on this system".
*-*-darwin*,*-*-darwin*)
hostos=`echo $host | sed 's/.*-darwin/darwin/'`
targetos=`echo $target | sed 's/.*-darwin/darwin/'`
if test $hostos = $targetos -o $targetos = darwin ; then
CROSS=
SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
with_headers=yes
fi
;;
i?86-*-*,x86_64-*-* \ i?86-*-*,x86_64-*-* \
| powerpc*-*-*,powerpc64*-*-*) | powerpc*-*-*,powerpc64*-*-*)
CROSS="$CROSS -DNATIVE_CROSS" ;; CROSS="$CROSS -DNATIVE_CROSS" ;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment