1 # Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
2 # Free Software Foundation, Inc.
4 # This file is part of GCC.
6 # GCC is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3, or (at your option)
11 # GCC is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with GCC; see the file COPYING3. If not see
18 # <http://www.gnu.org/licenses/>.
20 build/slashify: $(srcdir)/config/slashify.c
21 $(COMPILER_FOR_BUILD) $< -o $@
23 $(srcdir)/config/darwin.h: config/darwin.h.rebuild
25 config/darwin.h.rebuild: build/slashify
26 @if [ ! -e $(srcdir)/config/darwin.h \
27 -o $(srcdir)/config/darwin.h -nt config/darwin.h ]; then \
28 { test -d config || mkdir config; } && \
29 cp -p $(srcdir)/config/darwin-sections.def \
30 config/darwin-sections.def && \
31 build/slashify < $(srcdir)/config/darwin.h >config/darwin.h; \
34 darwin.o: $(srcdir)/config/darwin.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
35 $(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(REAL_H) insn-config.h \
36 conditions.h insn-flags.h output.h insn-attr.h flags.h $(TREE_H) expr.h \
37 reload.h function.h $(GGC_H) langhooks.h $(TARGET_H) $(TM_P_H) gt-darwin.h \
38 config/darwin-sections.def
39 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
40 $(srcdir)/config/darwin.c
42 darwin-c.o: $(srcdir)/config/darwin-c.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
43 $(TM_H) $(CPPLIB_H) $(TREE_H) $(C_PRAGMA_H) $(TM_P_H) \
44 incpath.h flags.h $(C_COMMON_H)
45 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
46 $(srcdir)/config/darwin-c.c $(PREPROCESSOR_DEFINES)
48 darwin-f.o: $(srcdir)/config/darwin-f.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
49 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
50 $(srcdir)/config/darwin-f.c $(PREPROCESSOR_DEFINES)
52 darwin-driver.o: $(srcdir)/config/darwin-driver.c \
53 $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(GCC_H) opts.h
54 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
55 $(srcdir)/config/darwin-driver.c
58 EXTRA_MULTILIB_PARTS=crt3.o
59 # Pass -fno-tree-dominator-opts to work around bug 26840.
60 $(T)crt3$(objext): $(srcdir)/config/darwin-crt3.c $(GCC_PASSES) \
61 $(TCONFIG_H) stmp-int-hdrs tsystem.h
62 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) \
63 -fno-tree-dominator-opts $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) \
64 -c $(srcdir)/config/darwin-crt3.c -o $(T)crt3$(objext)
66 # Use unwind-dw2-fde-darwin
67 LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-darwin.c \
68 $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
69 LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c
71 # -pipe because there's an assembler bug, 4077127, which causes
72 # it to not properly process the first # directive, causing temporary
73 # file names to appear in stabs, causing the bootstrap to fail. Using -pipe
74 # works around this by not having any temporary file names.
75 TARGET_LIBGCC2_CFLAGS = -fPIC -pipe