# APPLE LOCAL AltiVec # On Darwin, we need FP, vector, and world save/restore routines. # Library code must include trampoline support LIB2FUNCS_EXTRA = $(srcdir)/config/rs6000/darwin-tramp.asm \ $(srcdir)/config/rs6000/darwin-fpsave.asm \ $(srcdir)/config/rs6000/darwin-vecsave.asm \ $(srcdir)/config/rs6000/darwin-worldsave.asm # Enable AltiVec instructions when assembling the aforementioned .asm files. TARGET_LIBGCC2_CFLAGS = -force_cpusubtype_ALL # /* APPLE LOCAL begin libcc_kext */ # 'libcc_kext.a' is runtime support routines for the Darwin kernel and dynamically-loaded drivers. # No exit/abort/malloc support available, and everything is compiled with '-static -fno-exceptions'. # Since no exception handling is available, the LIB2_DIVMOD_FUNCS are treated like non-throwing functions. # Floating support and AltiVec usage are strongly discouraged, but supported. # 'new' and 'delete' are supported in their non-throwing variants. # Due to an unfortunate history, throwing-style 'new' and 'delete' are available, # but they do not throw; new will fail by invoking the 'new_handler' if available, or return zero if not. # Many standard libgcc routines are not supported in the kernel, # e.g. 'trampoline', 'clear_cache', 'exit', 'eprintf'. # These are duplicated betwixt rs6000/t-darwin and i386/t-darwin # because they are not necessarily identical :-( . LIBKFUNCS_DARWIN = _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 _clz \ _cmpdi2 _ucmpdi2 _floatdidf _floatdisf _fixunsdfsi _fixunssfsi \ _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \ _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi _fixtfdi _fixunstfdi \ _floatditf _absvsi2 _absvdi2 _addvsi3 _addvdi3 _subvsi3 _subvdi3 \ _mulvsi3 _mulvdi3 _negvsi2 _negvdi2 \ _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4 \ __gcc_bcmp LIBK_SUPCXX_DARWIN = new_op.cc new_opnt.cc new_opv.cc new_opvnt.cc \ del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc new_handler.cc pure.cc # /* APPLE LOCAL end libcc_kext */ # APPLE LOCAL begin cpp-precomp # We don't want cpp-precomp to run while bootstrapping. TCFLAGS = -no-cpp-precomp BOOT_CFLAGS = -g -O2 -no-cpp-precomp # APPLE LOCAL end cpp-precomp # We want fine grained libraries, so use the new code to build the # floating point emulation libraries. FPBIT = fp-bit.c DPBIT = dp-bit.c # APPLE LOCAL C++ EH CRTSTUFF_T_CFLAGS= -DDARWIN dp-bit.c: $(srcdir)/config/fp-bit.c cat $(srcdir)/config/fp-bit.c > dp-bit.c fp-bit.c: $(srcdir)/config/fp-bit.c echo '#define FLOAT' > fp-bit.c cat $(srcdir)/config/fp-bit.c >> fp-bit.c darwin.o: $(srcdir)/config/darwin.c $(CONFIG_H) $(SYSTEM_H) $(RTL_BASE_H) \ $(REGS_H) hard-reg-set.h insn-config.h conditions.h output.h \ insn-attr.h flags.h $(TREE_H) $(EXPR_H) reload.h \ function.h $(GGC_H) $(TM_P_H) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< darwin-c.o: $(srcdir)/config/darwin-c.c $(CONFIG_H) $(SYSTEM_H) \ $(TREE_H) $(C_TREE_H) c-lex.h c-pragma.h toplev.h cpplib.h \ $(TM_P_H) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< # APPLE LOCAL no soft-float multilibs # APPLE LOCAL PFE darwin.o : config.h $(PFE_H) $(PFE_HEADER_H) rs6000.o : config.h $(PFE_H) $(PFE_HEADER_H) # Should the big block of PFE macro definitions currently in Makefile.in # be moved into this file instead? [ILR] # APPLE LOCAL AltiVec # The following adds adds a dependency of vec.h to rs6000.o and ensures # that vec.h is built before building rs6000.o # This is currently disabled since it gnerates a source file in the # source directory. #rs6000.o : $(srcdir)/config/rs6000/vec.h #$(srcdir)/config/rs6000/vec.h: $(srcdir)/config/rs6000/vec.ops \ # $(srcdir)/config/rs6000/builtin.ops # (cd $(srcdir)/config/rs6000; ops-to-gp -gcc vec.ops builtin.ops)