Commit 833fe7da by Aldy Hernandez Committed by Aldy Hernandez

re PR target/54160 (gcc should not define __OBJC2__ when lang is not set to ObjC…

re PR target/54160 (gcc should not define __OBJC2__ when lang is not set to ObjC (gcc 4.6 and later))

	PR target/54160
	* config/t-darwin (darwin-c.o): Depend on $(CPP_INTERNAL_H).
	* config/darwin-c.c (darwin_cpp_builtins): Only set __OBJC2__
	when in obj mode.
	Include libcpp/internal.h.

From-SVN: r194227
parent b08c12cb
2012-12-05 Aldy Hernandez <aldyh@redhat.com>
PR target/54160
* config/t-darwin (darwin-c.o): Depend on $(CPP_INTERNAL_H).
* config/darwin-c.c (darwin_cpp_builtins): Only set __OBJC2__ when
in obj mode.
Include libcpp/internal.h.
2012-12-05 Michael Eager <eager@eagercon.com> 2012-12-05 Michael Eager <eager@eagercon.com>
PR rtl-optimization/54739 PR rtl-optimization/54739
...@@ -38,6 +38,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -38,6 +38,7 @@ along with GCC; see the file COPYING3. If not see
#include "c-family/c-target.h" #include "c-family/c-target.h"
#include "c-family/c-target-def.h" #include "c-family/c-target-def.h"
#include "cgraph.h" #include "cgraph.h"
#include "../../libcpp/internal.h"
/* Pragmas. */ /* Pragmas. */
...@@ -632,7 +633,7 @@ darwin_cpp_builtins (cpp_reader *pfile) ...@@ -632,7 +633,7 @@ darwin_cpp_builtins (cpp_reader *pfile)
builtin_define ("__weak="); builtin_define ("__weak=");
} }
if (flag_objc_abi == 2) if (CPP_OPTION (pfile, objc) && flag_objc_abi == 2)
builtin_define ("__OBJC2__"); builtin_define ("__OBJC2__");
} }
......
...@@ -29,7 +29,7 @@ darwin.o: $(srcdir)/config/darwin.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ ...@@ -29,7 +29,7 @@ darwin.o: $(srcdir)/config/darwin.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
darwin-c.o: $(srcdir)/config/darwin-c.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ darwin-c.o: $(srcdir)/config/darwin-c.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(CPPLIB_H) $(TREE_H) $(C_PRAGMA_H) $(TM_P_H) \ $(TM_H) $(CPPLIB_H) $(TREE_H) $(C_PRAGMA_H) $(TM_P_H) \
incpath.h flags.h $(C_COMMON_H) $(C_TARGET_H) $(C_TARGET_DEF_H) incpath.h flags.h $(C_COMMON_H) $(C_TARGET_H) $(C_TARGET_DEF_H) $(CPP_INTERNAL_H)
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
$(srcdir)/config/darwin-c.c $(PREPROCESSOR_DEFINES) $(srcdir)/config/darwin-c.c $(PREPROCESSOR_DEFINES)
......
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