[llvm-commits] [llvm-gcc-4.2] r55848 - in /llvm-gcc-4.2/tags/Apple/llvmgcc42-2064-02/gcc: Makefile.in c-parser.c

Devang Patel dpatel at apple.com
Fri Sep 5 13:00:09 PDT 2008


Author: dpatel
Date: Fri Sep  5 15:00:08 2008
New Revision: 55848

URL: http://llvm.org/viewvc/llvm-project?rev=55848&view=rev
Log:

- On Darwin platforms, copy over the libstdc++.dylib during compilation of a
  cross compiler.
- Port patch from rdar://6123451 which fixes an x86_64 bug.

(From 2061.2)

Modified:
    llvm-gcc-4.2/tags/Apple/llvmgcc42-2064-02/gcc/Makefile.in
    llvm-gcc-4.2/tags/Apple/llvmgcc42-2064-02/gcc/c-parser.c

Modified: llvm-gcc-4.2/tags/Apple/llvmgcc42-2064-02/gcc/Makefile.in
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/tags/Apple/llvmgcc42-2064-02/gcc/Makefile.in?rev=55848&r1=55847&r2=55848&view=diff

==============================================================================
--- llvm-gcc-4.2/tags/Apple/llvmgcc42-2064-02/gcc/Makefile.in (original)
+++ llvm-gcc-4.2/tags/Apple/llvmgcc42-2064-02/gcc/Makefile.in Fri Sep  5 15:00:08 2008
@@ -4051,6 +4051,28 @@
 # Install the driver program as $(target_noncanonical)-gcc,
 # $(target_noncanonical)-gcc-$(version)
 # and also as either gcc (if native) or $(gcc_tooldir)/bin/gcc.
+
+# LLVM LOCAL begin copy libstdc++.dylib on Darwin
+ifneq (,$(findstring darwin,$(target)))
+install-driver: installdirs xgcc$(exeext)
+	-rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
+	-$(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
+	-rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)$(exeext)
+	-cp -p /usr/lib/libstdc++.6.dylib $(DESTDIR)$(libsubdir)/libstdc++.dylib
+	-( cd $(DESTDIR)$(bindir) && \
+	   $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version)$(exeext) )
+	-if [ -f gcc-cross$(exeext) ] ; then \
+	  if [ -d $(DESTDIR)$(gcc_tooldir)/bin/. ] ; then \
+	    rm -f $(DESTDIR)$(gcc_tooldir)/bin/gcc$(exeext); \
+	    $(INSTALL_PROGRAM) gcc-cross$(exeext) $(DESTDIR)$(gcc_tooldir)/bin/gcc$(exeext); \
+	  else true; fi; \
+	else \
+	  rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-tmp$(exeext); \
+	  ( cd $(DESTDIR)$(bindir) && \
+	    $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-tmp$(exeext) && \
+	    mv -f $(target_noncanonical)-gcc-tmp$(exeext) $(GCC_TARGET_INSTALL_NAME)$(exeext) ); \
+	fi
+else
 install-driver: installdirs xgcc$(exeext)
 	-rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
 	-$(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
@@ -4068,6 +4090,8 @@
 	    $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-tmp$(exeext) && \
 	    mv -f $(target_noncanonical)-gcc-tmp$(exeext) $(GCC_TARGET_INSTALL_NAME)$(exeext) ); \
 	fi
+endif
+# LLVM LOCAL end copy libstdc++.dylib on Darwin
 
 # Install the info files.
 # $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir

Modified: llvm-gcc-4.2/tags/Apple/llvmgcc42-2064-02/gcc/c-parser.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/tags/Apple/llvmgcc42-2064-02/gcc/c-parser.c?rev=55848&r1=55847&r2=55848&view=diff

==============================================================================
--- llvm-gcc-4.2/tags/Apple/llvmgcc42-2064-02/gcc/c-parser.c (original)
+++ llvm-gcc-4.2/tags/Apple/llvmgcc42-2064-02/gcc/c-parser.c Fri Sep  5 15:00:08 2008
@@ -2393,6 +2393,7 @@
       ret.spec = TREE_TYPE (expr.value);
       /* APPLE LOCAL begin radar 4204796 (in 4.2 n) */
       if (c_dialect_objc() 
+	  && ret.spec != error_mark_node
 	  && lookup_attribute ("objc_volatilized", TYPE_ATTRIBUTES (ret.spec)))
 	ret.spec = build_qualified_type
 	  (ret.spec, (TYPE_QUALS (ret.spec) & ~TYPE_QUAL_VOLATILE));





More information about the llvm-commits mailing list