[llvm-branch-commits] [llvm-gcc-tag] r103920 - in /llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9: ./ gcc/config/darwin.c gcc/config/darwin.h gcc/config/i386/darwin.h gcc/config/i386/darwin64.h gcc/opts.c
Bill Wendling
isanbard at gmail.com
Sun May 16 18:39:25 PDT 2010
Author: void
Date: Sun May 16 20:39:24 2010
New Revision: 103920
URL: http://llvm.org/viewvc/llvm-project?rev=103920&view=rev
Log:
Created from llvmgcc42-2326.9 with fix for <rdar://problem/7563705>.
Added:
llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/ (props changed)
- copied from r103917, llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.9/
Modified:
llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/config/darwin.c
llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/config/darwin.h
llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/config/i386/darwin.h
llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/config/i386/darwin64.h
llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/opts.c
Propchange: llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Sun May 16 20:39:24 2010
@@ -0,0 +1,2 @@
+/llvm-gcc-4.2/branches/Apple/Morbo:100833
+/llvm-gcc-4.2/trunk:98728,98841,98893,99305,99592-99593,100134,100149-100150,101216
Modified: llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/config/darwin.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/config/darwin.c?rev=103920&r1=103917&r2=103920&view=diff
==============================================================================
--- llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/config/darwin.c (original)
+++ llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/config/darwin.c Sun May 16 20:39:24 2010
@@ -2712,16 +2712,9 @@
void
darwin_override_options (void)
{
- /* APPLE LOCAL begin for iframework for 4.3 4094959 */
- /* Remove this: */
-#if 0
- if (flag_apple_kext && strcmp (lang_hooks.name, "GNU C++") != 0)
- {
- warning (0, "command line option %<-fapple-kext%> is only valid for C++");
- flag_apple_kext = 0;
- }
-#endif
- /* APPLE LOCAL end for iframework for 4.3 4094959 */
+ /* LLVM LOCAL begin 7563705 */
+ /* Removed. */
+ /* LLVM LOCAL begin 7563705 */
if (flag_mkernel || flag_apple_kext)
{
/* -mkernel implies -fapple-kext for C++ */
@@ -2741,6 +2734,14 @@
! TARGET_SUPPORTS_KEXTABI1)
flag_apple_kext = 2;
/* APPLE LOCAL end kext v2 */
+ /* LLVM LOCAL begin 7563705 */
+#ifdef ENABLE_LLVM
+ if (flag_apple_kext
+ && strverscmp (darwin_macosx_version_min, "10.6") > 0
+ && ! TARGET_64BIT)
+ target_flags |= MASK_MACHO_DYNAMIC_NO_PIC;
+#endif
+ /* LLVM LOCAL end 7563705 */
}
/* APPLE LOCAL begin axe stubs 5571540 */
/* APPLE LOCAL begin ARM 5683689 */
Modified: llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/config/darwin.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/config/darwin.h?rev=103920&r1=103917&r2=103920&view=diff
==============================================================================
--- llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/config/darwin.h (original)
+++ llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/config/darwin.h Sun May 16 20:39:24 2010
@@ -240,6 +240,17 @@
darwin_init_cfstring_builtins (); \
} while(0)
+/* LLVM LOCAL begin 7563705 */
+#ifdef ENABLE_LLVM
+#define ALLOW_FAPPLE_KEXT_FLAG \
+ (strcmp (lang_hooks.name, "GNU C++") == 0 || \
+ (strcmp (lang_hooks.name, "GNU C") == 0 && \
+ strverscmp (darwin_macosx_version_min, "10.6") > 0))
+#else
+#define ALLOW_FAPPLE_KEXT_FLAG false
+#endif
+/* LLVM LOCAL end 7563705 */
+
#undef TARGET_EXPAND_TREE_BUILTIN
#define TARGET_EXPAND_TREE_BUILTIN darwin_expand_tree_builtin
#undef TARGET_CONSTRUCT_OBJC_STRING
@@ -593,10 +604,16 @@
/* Default Darwin ASM_SPEC, very simple. */
/* APPLE LOCAL begin kext weak_import 5935650 */
/* APPLE LOCAL begin radar 4161346 */
+/* LLVM LOCAL begin 7563705 */
#define ASM_SPEC "-arch %(darwin_arch) \
- %{Zforce_cpusubtype_ALL:-force_cpusubtype_ALL} \
- %{!Zforce_cpusubtype_ALL:%{faltivec:-force_cpusubtype_ALL}} \
- %{mkernel|static|fapple-kext:%{!Zdynamic:-static}}"
+ %{Zforce_cpusubtype_ALL:-force_cpusubtype_ALL} \
+ %{!Zforce_cpusubtype_ALL:%{faltivec:-force_cpusubtype_ALL}} \
+ %{!m64: \
+ %{!fapple-kext:%{mkernel|static:-static}} \
+ %{fapple-kext: \
+ %:version-compare(>= 10.7 mmacosx-version-min= -dynamic) \
+ %:version-compare(< 10.7 mmacosx-version-min= -static)}}"
+/* LLVM LOCAL end 7563705 */
/* APPLE LOCAL end radar 4161346 */
/* APPLE LOCAL end kext weak_import 5935650 */
/* APPLE LOCAL begin mainline 4.3 2006-10-31 4370143 */
Modified: llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/config/i386/darwin.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/config/i386/darwin.h?rev=103920&r1=103917&r2=103920&view=diff
==============================================================================
--- llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/config/i386/darwin.h (original)
+++ llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/config/i386/darwin.h Sun May 16 20:39:24 2010
@@ -113,8 +113,14 @@
/* APPLE LOCAL begin mainline */
#undef ASM_SPEC
/* APPLE LOCAL begin kext weak_import 5935650 */
+/* LLVM LOCAL begin 7563705 */
#define ASM_SPEC "-arch %(darwin_arch) -force_cpusubtype_ALL \
- %{mkernel|static|fapple-kext:%{!m64:-static}}"
+ %{!m64: \
+ %{!fapple-kext:%{mkernel|static:-static}} \
+ %{fapple-kext: \
+ %:version-compare(>= 10.7 mmacosx-version-min= -dynamic) \
+ %:version-compare(< 10.7 mmacosx-version-min= -static)}}"
+/* LLVM LOCAL end 7563705 */
/* APPLE LOCAL end kext weak_import 5935650 */
#define DARWIN_ARCH_SPEC "%{m64:x86_64;:i386}"
Modified: llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/config/i386/darwin64.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/config/i386/darwin64.h?rev=103920&r1=103917&r2=103920&view=diff
==============================================================================
--- llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/config/i386/darwin64.h (original)
+++ llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/config/i386/darwin64.h Sun May 16 20:39:24 2010
@@ -30,8 +30,14 @@
/* APPLE LOCAL begin kext 6400713 */
#undef ASM_SPEC
-#define ASM_SPEC "-arch %(darwin_arch) -force_cpusubtype_ALL \
- %{mkernel|static|fapple-kext:%{m32:-static}}"
+/* LLVM LOCAL begin 7563705 */
+#define ASM_SPEC "-arch %(darwin_arch) -force_cpusubtype_ALL \
+ %{!m64: \
+ %{!fapple-kext:%{mkernel|static:-static}} \
+ %{fapple-kext: \
+ %:version-compare(>= 10.7 mmacosx-version-min= -dynamic) \
+ %:version-compare(< 10.7 mmacosx-version-min= -static)}}"
+/* LLVM LOCAL end 7563705 */
/* APPLE LOCAL end kext 6400713 */
#undef SUBTARGET_EXTRA_SPECS
Modified: llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/opts.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/opts.c?rev=103920&r1=103917&r2=103920&view=diff
==============================================================================
--- llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/opts.c (original)
+++ llvm-gcc-4.2/tags/Apple/llvmgcc42-2326.10/llvmgcc42-2326.9/gcc/opts.c Sun May 16 20:39:24 2010
@@ -282,7 +282,14 @@
/* APPLE LOCAL begin iframework for 4.3 4094959 */
else if ((option->flags & CL_TARGET)
&& (option->flags & CL_LANG_ALL)
- && !(option->flags & lang_mask))
+ /* LLVM LOCAL begin 7563705 */
+ && !(option->flags & lang_mask)
+#ifdef ALLOW_FAPPLE_KEXT_FLAG
+ && (strcmp (*argv, "-fapple-kext") != 0 ||
+ ! ALLOW_FAPPLE_KEXT_FLAG)
+#endif
+ )
+ /* LLVM LOCAL end 7563705 */
{
/* Complain for target flag language mismatches if any languages
are specified. */
More information about the llvm-branch-commits
mailing list