Build objc support.
authorHasso Tepper <hasso@dragonflybsd.org>
Mon, 30 Jun 2008 12:16:03 +0000 (12:16 +0000)
committerHasso Tepper <hasso@dragonflybsd.org>
Mon, 30 Jun 2008 12:16:03 +0000 (12:16 +0000)
gnu/lib/gcc41/Makefile
gnu/lib/gcc41/libobjc/Makefile [new file with mode: 0644]
gnu/usr.bin/cc41/Makefile
gnu/usr.bin/cc41/Makefile.langs
gnu/usr.bin/cc41/cc1obj/Makefile [new file with mode: 0644]

index f6230b8..354b691 100644 (file)
@@ -1,4 +1,4 @@
-# $DragonFly: src/gnu/lib/gcc41/Makefile,v 1.2 2007/01/15 23:09:05 corecode Exp $
+# $DragonFly: src/gnu/lib/gcc41/Makefile,v 1.3 2008/06/30 12:16:03 hasso Exp $
 
 SUBDIR=                csu libgcc libgcov
 
@@ -10,4 +10,8 @@ MAKE := HOST_CCVER=${HOST_CCVER} CCVER=gcc41 ${MAKE}
 SUBDIR+=       libstdc++ libsupc++
 .endif
 
+.if !defined(NO_OBJC)
+SUBDIR+=       libobjc
+.endif
+
 .include <bsd.subdir.mk>
diff --git a/gnu/lib/gcc41/libobjc/Makefile b/gnu/lib/gcc41/libobjc/Makefile
new file mode 100644 (file)
index 0000000..4aa8e7f
--- /dev/null
@@ -0,0 +1,35 @@
+# $DragonFly: src/gnu/lib/gcc41/libobjc/Makefile,v 1.1 2008/06/30 12:16:03 hasso Exp $
+
+GCC_NO_PATH=   1
+.include "../Makefile.inc"
+.include "${STOPDIR}/cc_tools/Makefile.tools"
+
+.PATH:         ${GCCDIR}/libobjc ${GCCDIR}/libobjc/objc ${GCCDIR}/gcc
+
+CFLAGS+=       -I${GCCDIR}/libobjc/objc -I. -DIN_TARGET_LIBS
+
+LIB=           objc
+SHLIB_MAJOR=   2
+
+SRCS=          NXConstStr.m Object.m Protocol.m archive.c class.c encoding.c
+SRCS+=         exception.c gc.c hash.c hash_compat.c init.c linking.m misc.c
+SRCS+=         nil_method.c objects.c sarray.c selector.c sendmsg.c thr-objc.c
+SRCS+=         thr.c
+SRCS+=         insn-flags.h insn-constants.h runtime-info.h unwind.h
+
+INCS=          NXConstStr.h Object.h Protocol.h encoding.h hash.h objc-api.h
+INCS+=         objc-list.h objc.h runtime.h sarray.h thr.h typedstream.h
+INCSDIR=       ${INCLUDEDIR}/objc
+
+unwind.h: unwind-generic.h
+       cp ${.ALLSRC} ${.TARGET}
+
+CLEANFILES+=   unwind.h
+
+runtime-info.h: 
+       echo "" > tmp-runtime.m
+       echo "/* This file is automatically generated */" > ${.TARGET}
+       ${CC} -print-objc-runtime-info -S tmp-runtime.m >> ${.TARGET}
+       rm -f tmp-runtime.m tmp-runtime.s
+
+.include <bsd.lib.mk>
index 9fd6d47..0ee5276 100644 (file)
@@ -1,4 +1,4 @@
-# $DragonFly: src/gnu/usr.bin/cc41/Makefile,v 1.2 2008/05/14 15:02:48 hasso Exp $
+# $DragonFly: src/gnu/usr.bin/cc41/Makefile,v 1.3 2008/06/30 12:16:03 hasso Exp $
 
 SUBDIR=                cc_prep
 SUBDIR+=       libiberty
@@ -8,9 +8,9 @@ SUBDIR+=        gcov
 .if !defined(NO_CXX)
 SUBDIR+=       cc1plus c++ c++filt
 .endif
-#.if !defined(NO_OBJC)
-#SUBDIR+=      cc1obj
-#.endif
+.if !defined(NO_OBJC)
+SUBDIR+=       cc1obj
+.endif
 
 .ORDER: ${SUBDIR}
 
index d7d06d8..48eb46b 100644 (file)
@@ -1,11 +1,11 @@
-# $DragonFly: src/gnu/usr.bin/cc41/Makefile.langs,v 1.3 2008/05/14 15:02:48 hasso Exp $
+# $DragonFly: src/gnu/usr.bin/cc41/Makefile.langs,v 1.4 2008/06/30 12:16:03 hasso Exp $
 
 .if !defined(NO_CXX)
 gencheck_defs= cp/cp-tree.def
 .endif
-#.if !defined(NO_OBJC)
-#gencheck_defs+=       objc/objc-tree.def
-#.endif
+.if !defined(NO_OBJC)
+gencheck_defs+=        objc/objc-tree.def
+.endif
 
 optionsfiles=  ${GCCDIR}/gcc/c.opt
 optionsfiles+= ${GCCDIR}/gcc/common.opt
@@ -14,9 +14,9 @@ optionsfiles+=        ${GCCDIR}/gcc/config/${GCC_CPU}/${GCC_CPU}.opt
 .if !defined(NO_CXX)
 LANG_SPECS_FILES=      cp/lang-specs.h
 .endif
-#.if !defined(NO_OBJC)
-#LANG_SPECS_FILES+=    objc/lang-specs.h
-#.endif
+.if !defined(NO_OBJC)
+LANG_SPECS_FILES+=     objc/lang-specs.h
+.endif
 
 specs.h:
        rm -f ${.TARGET}
@@ -25,7 +25,7 @@ specs.h:
        echo "#include \"${F}\"" >> ${.TARGET}
 .endfor
 
-CLEANFILES+=   specs.h c-parse.y
+CLEANFILES+=   specs.h c-parse.y objc-parse.y
 
 # this is directly from GCC's Makefile, beware evil
 GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h \
@@ -77,9 +77,12 @@ GTFILES_FILES_FILES+=        ${GTFILES_CPP}
 GTFILES_LANG_DIR_NAMES+= cp
 .endif
 
-#.if !defined(NO_OBJC)
-#GTFILES+=     $(srcdir)/objc/objc-act.c $(srcdir)/objc/objc-act.h
-#.endif
+.if !defined(NO_OBJC)
+GTFILES_OBJC=  $(srcdir)/objc/objc-act.c $(srcdir)/objc/objc-act.h
+GTFILES_FILES_LANGS+=  ${GTFILES_OBJC:C/.*/objc/g}
+GTFILES_FILES_FILES+=  ${GTFILES_OBJC}
+GTFILES_LANG_DIR_NAMES+= objc
+.endif
 
 # C
 GTFILES_C+= \
diff --git a/gnu/usr.bin/cc41/cc1obj/Makefile b/gnu/usr.bin/cc41/cc1obj/Makefile
new file mode 100644 (file)
index 0000000..9102644
--- /dev/null
@@ -0,0 +1,47 @@
+# $DragonFly: src/gnu/usr.bin/cc41/cc1obj/Makefile,v 1.1 2008/06/30 12:16:03 hasso Exp $
+
+GCC_LANG_DIR=  gcc/objc
+CONTRIBDIR=    ${GCCDIR}/gcc/objc
+
+CFLAGS+=       -DTARGET_MACHINE=\"${target}\" -DHOST_MACHINE=\"${target}\"
+
+PROG=          cc1obj
+NOMAN=         1
+NOSHARED?=     yes
+
+SRCS+= objc-lang.c objc-act.c
+
+SRCS+=  attribs.c c-errors.c c-lex.c c-pragma.c c-decl.c c-typeck.c \
+       c-convert.c c-aux-info.c c-common.c c-opts.c c-format.c c-semantics.c \
+       c-incpath.c cppdefault.c c-ppoutput.c c-cppbuiltin.c prefix.c \
+       c-objc-common.c c-dump.c c-pch.c c-parser.c \
+       c-gimplify.c tree-mudflap.c c-pretty-print.c
+
+SRCS+= main.c
+
+SRCS+= tm-preds.h tree-check.h genrtl.h insn-flags.h insn-constants.h
+SRCS+= gtype-desc.h insn-modes.h insn-config.h options.h insn-modes.c
+SRCS+= insn-emit.c insn-codes.h insn-attrtab.c insn-attr.h insn-extract.c
+SRCS+= insn-opinit.c
+
+LDADD+=        ${LIBBACKEND} ${LIBCPP}
+DPADD+=        ${LIBBACKEND} ${LIBCPP}
+
+CFLAGS+= -I. -I${CONTRIBDIR}
+
+OBJS+= cc1-checksum.o
+
+.include <bsd.prog.mk>
+
+# compiler checksum handling
+CLEANFILES+=   cc1-checksum.c dummy-checksum.o cc1-dummy
+
+cc1-dummy: ${OBJS:Ncc1-checksum.o} dummy-checksum.o
+       ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} ${LDADD}
+
+cc1-checksum.c: cc1-dummy
+       ${TOOLDIR}/genchecksum/genchecksum.nx ${.ALLSRC} > ${.TARGET}
+
+.include "../cc_tools/Makefile.tools"
+.include "../Makefile.langs"
+