diff options
author | Christian Weisgerber <naddy@cvs.openbsd.org> | 2010-05-04 18:37:01 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@cvs.openbsd.org> | 2010-05-04 18:37:01 +0000 |
commit | 22479fa11d54345c4fc4e503894d73ebe042699b (patch) | |
tree | f1f83ede7de38dafb22d68e6b7597c7828a767df | |
parent | c63836ae0978aff66479afba149e6cd7a1b860f9 (diff) |
add infrastructure to build GCC 4.2.1 for OpenBSD/alpha; ok kettenis@
-rw-r--r-- | gnu/usr.bin/cc/Makefile.tgt | 6 | ||||
-rw-r--r-- | gnu/usr.bin/cc/cc_tools/Makefile | 7 | ||||
-rw-r--r-- | gnu/usr.bin/cc/include/Makefile | 5 | ||||
-rw-r--r-- | gnu/usr.bin/cc/libgcc/Makefile | 11 |
4 files changed, 23 insertions, 6 deletions
diff --git a/gnu/usr.bin/cc/Makefile.tgt b/gnu/usr.bin/cc/Makefile.tgt index 911b1c4ab12..7371d2caa36 100644 --- a/gnu/usr.bin/cc/Makefile.tgt +++ b/gnu/usr.bin/cc/Makefile.tgt @@ -1,9 +1,11 @@ # $FreeBSD: src/gnu/usr.bin/cc/Makefile.tgt,v 1.11.8.1 2009/04/15 03:14:26 kensmith Exp $ -# $OpenBSD: Makefile.tgt,v 1.3 2010/04/26 05:45:25 robert Exp $ +# $OpenBSD: Makefile.tgt,v 1.4 2010/05/04 18:37:00 naddy Exp $ TARGET_ARCH?= ${MACHINE_ARCH} -.if ${TARGET_ARCH} == "arm" +.if ${TARGET_ARCH} == "alpha" +GCC_CPU= alpha +.elif ${TARGET_ARCH} == "arm" GCC_CPU= arm .elif ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "amd64" GCC_CPU= i386 diff --git a/gnu/usr.bin/cc/cc_tools/Makefile b/gnu/usr.bin/cc/cc_tools/Makefile index ed8342a8abf..e20747e221b 100644 --- a/gnu/usr.bin/cc/cc_tools/Makefile +++ b/gnu/usr.bin/cc/cc_tools/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.88.8.1 2009/04/15 03:14:26 kensmith Exp $ -# $OpenBSD: Makefile,v 1.5 2010/04/29 03:41:51 marco Exp $ +# $OpenBSD: Makefile,v 1.6 2010/05/04 18:37:00 naddy Exp $ .include <bsd.own.mk> @@ -35,7 +35,12 @@ TARGET_INC+= ${GCC_CPU}/unix.h TARGET_INC+= ${GCC_CPU}/att.h .endif TARGET_INC+= dbxelf.h +.if ${TARGET_ARCH} == "alpha" +TARGET_INC+= alpha/elf.h +TARGET_INC+= alpha/openbsd1.h +.else TARGET_INC+= elfos.h +.endif TARGET_INC+= openbsd.h TARGET_INC+= openbsd-libpthread.h TARGET_INC+= openbsd-native.h diff --git a/gnu/usr.bin/cc/include/Makefile b/gnu/usr.bin/cc/include/Makefile index 12e734a2982..a5935e76db6 100644 --- a/gnu/usr.bin/cc/include/Makefile +++ b/gnu/usr.bin/cc/include/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/usr.bin/cc/include/Makefile,v 1.9.8.1 2009/04/15 03:14:26 kensmith Exp $ -# $OpenBSD: Makefile,v 1.3 2010/04/25 21:04:27 kettenis Exp $ +# $OpenBSD: Makefile,v 1.4 2010/05/04 18:37:00 naddy Exp $ .include <bsd.own.mk> @@ -8,6 +8,7 @@ .PATH: ${GCCDIR}/config/${GCC_CPU} +INCS?= .if ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "amd64" INCS= emmintrin.h mmintrin.h pmmintrin.h xmmintrin.h mm_malloc.h .elif ${TARGET_ARCH} == "arm" @@ -29,7 +30,7 @@ clean: _SUBDIRUSE depend: # Nothing here so far... -.if ${TARGET_ARCH} != "hppa" && ${TARGET_ARCH} != "sparc64" +.if !empty(INCS) install: ${INCS} ${INSTALL} -C -o ${BINOWN} -g ${LOCALEGRP} -m ${NONBINMODE} ${.ALLSRC} \ ${DESTDIR}/usr/include diff --git a/gnu/usr.bin/cc/libgcc/Makefile b/gnu/usr.bin/cc/libgcc/Makefile index d1caae17bbc..4d678e465da 100644 --- a/gnu/usr.bin/cc/libgcc/Makefile +++ b/gnu/usr.bin/cc/libgcc/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/lib/libgcc/Makefile,v 1.58.8.1 2009/04/15 03:14:26 kensmith Exp $ -# $OpenBSD: Makefile,v 1.7 2010/05/02 23:34:21 drahn Exp $ +# $OpenBSD: Makefile,v 1.8 2010/05/04 18:37:00 naddy Exp $ .include <bsd.own.mk> @@ -110,6 +110,11 @@ LIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4 # Platform specific bits. # When upgrading GCC, get the following definitions from config/<cpu>/t-* # +.if ${TARGET_ARCH} == "alpha" +CFLAGS+= -mieee +LIB2FUNCS_EXTRA = qrnnd.asm +.endif + .if ${TARGET_ARCH} == "arm" # from config/arm/t-strongarm-elf CFLAGS+= -Dinhibit_libc -fno-inline @@ -300,6 +305,10 @@ beforeinstall: .SUFFIXES: .vis .vo .asm +.if ${TARGET_ARCH} == "alpha" +.asm.o: + ${CC_T} ${CFLAGS} -xassembler-with-cpp -o ${.TARGET} ${.IMPSRC} +.endif .if ${TARGET_ARCH} == "powerpc" .asm.o: ${CC_T} ${${T}_CFLAGS} -xassembler-with-cpp -o ${.TARGET} ${.ALLSRC:M*.asm} |