head	1.24;
access;
symbols
	netbsd-11-0-RC4:1.24
	netbsd-11-0-RC3:1.24
	netbsd-11-0-RC2:1.24
	netbsd-11-0-RC1:1.24
	perseant-exfatfs-base-20250801:1.24
	netbsd-11:1.24.0.8
	netbsd-11-base:1.24
	netbsd-10-1-RELEASE:1.24
	perseant-exfatfs-base-20240630:1.24
	perseant-exfatfs:1.24.0.6
	perseant-exfatfs-base:1.24
	netbsd-8-3-RELEASE:1.21
	netbsd-9-4-RELEASE:1.22
	netbsd-10-0-RELEASE:1.24
	netbsd-10-0-RC6:1.24
	netbsd-10-0-RC5:1.24
	netbsd-10-0-RC4:1.24
	netbsd-10-0-RC3:1.24
	netbsd-10-0-RC2:1.24
	netbsd-10-0-RC1:1.24
	netbsd-10:1.24.0.4
	netbsd-10-base:1.24
	netbsd-9-3-RELEASE:1.22
	cjep_sun2x-base1:1.24
	cjep_sun2x:1.24.0.2
	cjep_sun2x-base:1.24
	cjep_staticlib_x-base1:1.24
	netbsd-9-2-RELEASE:1.22
	cjep_staticlib_x:1.23.0.4
	cjep_staticlib_x-base:1.23
	netbsd-9-1-RELEASE:1.22
	phil-wifi-20200421:1.23
	phil-wifi-20200411:1.23
	is-mlppp:1.23.0.2
	is-mlppp-base:1.23
	phil-wifi-20200406:1.23
	netbsd-8-2-RELEASE:1.21
	netbsd-9-0-RELEASE:1.22
	netbsd-9-0-RC2:1.22
	netbsd-9-0-RC1:1.22
	phil-wifi-20191119:1.22
	netbsd-9:1.22.0.4
	netbsd-9-base:1.22
	phil-wifi-20190609:1.22
	netbsd-8-1-RELEASE:1.21
	netbsd-8-1-RC1:1.21
	pgoyette-compat-merge-20190127:1.21.12.1
	pgoyette-compat-20190127:1.22
	pgoyette-compat-20190118:1.22
	pgoyette-compat-1226:1.22
	pgoyette-compat-1126:1.22
	pgoyette-compat-1020:1.22
	pgoyette-compat-0930:1.22
	pgoyette-compat-0906:1.22
	netbsd-7-2-RELEASE:1.18.4.1
	pgoyette-compat-0728:1.22
	netbsd-8-0-RELEASE:1.21
	phil-wifi:1.22.0.2
	phil-wifi-base:1.22
	pgoyette-compat-0625:1.22
	netbsd-8-0-RC2:1.21
	pgoyette-compat-0521:1.22
	pgoyette-compat-0502:1.22
	pgoyette-compat-0422:1.21
	netbsd-8-0-RC1:1.21
	pgoyette-compat-0415:1.21
	pgoyette-compat-0407:1.21
	pgoyette-compat-0330:1.21
	pgoyette-compat-0322:1.21
	pgoyette-compat-0315:1.21
	netbsd-7-1-2-RELEASE:1.18.4.1
	pgoyette-compat:1.21.0.12
	pgoyette-compat-base:1.21
	netbsd-7-1-1-RELEASE:1.18.4.1
	matt-nb8-mediatek:1.21.0.10
	matt-nb8-mediatek-base:1.21
	perseant-stdc-iso10646:1.21.0.8
	perseant-stdc-iso10646-base:1.21
	netbsd-8:1.21.0.6
	netbsd-8-base:1.21
	prg-localcount2-base3:1.21
	prg-localcount2-base2:1.21
	prg-localcount2-base1:1.21
	prg-localcount2:1.21.0.4
	prg-localcount2-base:1.21
	pgoyette-localcount-20170426:1.21
	bouyer-socketcan-base1:1.21
	pgoyette-localcount-20170320:1.21
	netbsd-7-1:1.18.4.1.0.6
	netbsd-7-1-RELEASE:1.18.4.1
	netbsd-7-1-RC2:1.18.4.1
	netbsd-7-nhusb-base-20170116:1.18.4.1
	bouyer-socketcan:1.21.0.2
	bouyer-socketcan-base:1.21
	pgoyette-localcount-20170107:1.20
	netbsd-7-1-RC1:1.18.4.1
	pgoyette-localcount-20161104:1.20
	netbsd-7-0-2-RELEASE:1.18.4.1
	localcount-20160914:1.20
	netbsd-7-nhusb:1.18.4.1.0.4
	netbsd-7-nhusb-base:1.18.4.1
	pgoyette-localcount-20160806:1.20
	pgoyette-localcount-20160726:1.20
	pgoyette-localcount:1.20.0.2
	pgoyette-localcount-base:1.20
	netbsd-7-0-1-RELEASE:1.18.4.1
	netbsd-7-0:1.18.4.1.0.2
	netbsd-7-0-RELEASE:1.18.4.1
	netbsd-7-0-RC3:1.18.4.1
	netbsd-7-0-RC2:1.18.4.1
	netbsd-7-0-RC1:1.18.4.1
	netbsd-6-0-6-RELEASE:1.11
	netbsd-6-1-5-RELEASE:1.11
	netbsd-7:1.18.0.4
	netbsd-7-base:1.18
	yamt-pagecache-base9:1.18
	yamt-pagecache-tag8:1.11.2.2
	netbsd-6-1-4-RELEASE:1.11
	netbsd-6-0-5-RELEASE:1.11
	tls-earlyentropy:1.18.0.2
	tls-earlyentropy-base:1.18
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.18
	riastradh-drm2-base3:1.18
	netbsd-6-1-3-RELEASE:1.11
	netbsd-6-0-4-RELEASE:1.11
	netbsd-6-1-2-RELEASE:1.11
	netbsd-6-0-3-RELEASE:1.11
	netbsd-6-1-1-RELEASE:1.11
	riastradh-drm2-base2:1.16
	riastradh-drm2-base1:1.16
	riastradh-drm2:1.16.0.2
	riastradh-drm2-base:1.16
	netbsd-6-1:1.11.0.10
	netbsd-6-0-2-RELEASE:1.11
	netbsd-6-1-RELEASE:1.11
	netbsd-6-1-RC4:1.11
	netbsd-6-1-RC3:1.11
	agc-symver:1.16.0.4
	agc-symver-base:1.16
	netbsd-6-1-RC2:1.11
	netbsd-6-1-RC1:1.11
	yamt-pagecache-base8:1.15
	netbsd-6-0-1-RELEASE:1.11
	yamt-pagecache-base7:1.15
	matt-nb6-plus-nbase:1.11
	yamt-pagecache-base6:1.15
	netbsd-6-0:1.11.0.8
	netbsd-6-0-RELEASE:1.11
	netbsd-6-0-RC2:1.11
	tls-maxphys:1.15.0.2
	tls-maxphys-base:1.18
	matt-nb6-plus:1.11.0.6
	matt-nb6-plus-base:1.11
	netbsd-6-0-RC1:1.11
	yamt-pagecache-base5:1.12
	yamt-pagecache-base4:1.12
	netbsd-6:1.11.0.4
	netbsd-6-base:1.11
	yamt-pagecache-base3:1.11
	yamt-pagecache-base2:1.11
	yamt-pagecache:1.11.0.2
	yamt-pagecache-base:1.11
	cherry-xenmp:1.4.0.2
	cherry-xenmp-base:1.4
	bouyer-quota2:1.1.0.2
	bouyer-quota2-base:1.1
	bouyer-quota2-nbase:1.1;
locks; strict;
comment	@# @;


1.24
date	2021.05.30.01.57.00;	author joerg;	state Exp;
branches;
next	1.23;
commitid	3Zpdqzdbkf2q47VC;

1.23
date	2020.02.21.15.00.44;	author joerg;	state Exp;
branches
	1.23.4.1;
next	1.22;
commitid	B7MlqpjHX49VkyXB;

1.22
date	2018.05.01.19.59.47;	author christos;	state Exp;
branches
	1.22.2.1;
next	1.21;
commitid	10Ge8dYtIFEjeDAA;

1.21
date	2017.01.11.12.08.34;	author joerg;	state Exp;
branches
	1.21.12.1;
next	1.20;
commitid	Z9TxvIojuyTPTxBz;

1.20
date	2015.03.05.10.22.25;	author joerg;	state Exp;
branches
	1.20.2.1;
next	1.19;
commitid	fsOYHiInOvCx6pcy;

1.19
date	2015.01.05.18.41.59;	author joerg;	state Exp;
branches;
next	1.18;
commitid	zitVej9zG1NDLR4y;

1.18
date	2014.01.16.09.00.55;	author matt;	state Exp;
branches
	1.18.4.1;
next	1.17;
commitid	IIcRQVlXYIAxVjlx;

1.17
date	2013.09.02.14.34.57;	author joerg;	state Exp;
branches;
next	1.16;
commitid	PjuIIiky2I1I8S3x;

1.16
date	2013.02.20.14.13.31;	author joerg;	state Exp;
branches;
next	1.15;

1.15
date	2012.06.17.07.40.25;	author joerg;	state Exp;
branches
	1.15.2.1;
next	1.14;

1.14
date	2012.06.16.17.01.04;	author joerg;	state Exp;
branches;
next	1.13;

1.13
date	2012.05.31.18.52.16;	author joerg;	state Exp;
branches;
next	1.12;

1.12
date	2012.02.28.17.09.29;	author joerg;	state Exp;
branches;
next	1.11;

1.11
date	2011.07.18.19.11.28;	author joerg;	state Exp;
branches
	1.11.2.1;
next	1.10;

1.10
date	2011.07.18.18.37.15;	author adam;	state Exp;
branches;
next	1.9;

1.9
date	2011.07.07.05.41.59;	author matt;	state Exp;
branches;
next	1.8;

1.8
date	2011.07.05.19.37.11;	author joerg;	state Exp;
branches;
next	1.7;

1.7
date	2011.07.05.17.30.35;	author joerg;	state Exp;
branches;
next	1.6;

1.6
date	2011.07.05.14.15.56;	author joerg;	state Exp;
branches;
next	1.5;

1.5
date	2011.07.04.22.37.58;	author joerg;	state Exp;
branches;
next	1.4;

1.4
date	2011.05.16.19.27.47;	author joerg;	state Exp;
branches;
next	1.3;

1.3
date	2011.03.21.02.10.10;	author joerg;	state Exp;
branches;
next	1.2;

1.2
date	2011.03.18.23.32.04;	author joerg;	state Exp;
branches;
next	1.1;

1.1
date	2011.02.06.01.14.11;	author joerg;	state Exp;
branches
	1.1.2.1;
next	;

1.23.4.1
date	2021.05.31.22.15.24;	author cjep;	state Exp;
branches;
next	;
commitid	eWz9SBW0XqKjJlVC;

1.22.2.1
date	2020.04.08.14.09.13;	author martin;	state Exp;
branches;
next	;
commitid	Qli2aW9E74UFuA3C;

1.21.12.1
date	2018.05.02.07.20.27;	author pgoyette;	state Exp;
branches;
next	;
commitid	o3kRuNRzl9360HAA;

1.20.2.1
date	2017.03.20.06.58.02;	author pgoyette;	state Exp;
branches;
next	;
commitid	jjw7cAwgyKq7RfKz;

1.18.4.1
date	2015.06.04.20.29.49;	author snj;	state Exp;
branches;
next	;
commitid	BLWYbUQDAfdnw9oy;

1.15.2.1
date	2013.02.25.00.30.31;	author tls;	state Exp;
branches;
next	1.15.2.2;

1.15.2.2
date	2014.08.20.00.04.54;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;

1.11.2.1
date	2012.04.17.00.09.28;	author yamt;	state Exp;
branches;
next	1.11.2.2;

1.11.2.2
date	2012.10.30.19.00.12;	author yamt;	state Exp;
branches;
next	1.11.2.3;

1.11.2.3
date	2014.05.22.11.42.31;	author yamt;	state Exp;
branches;
next	;
commitid	kBu7extK0Pp6MwBx;

1.1.2.1
date	2011.02.06.01.14.11;	author bouyer;	state dead;
branches;
next	1.1.2.2;

1.1.2.2
date	2011.03.06.15.07.57;	author bouyer;	state Exp;
branches;
next	;


desc
@@


1.24
log
@Update LLVM build system for 249b40b558955afe5ac2b549edcf2d7f859c8cc9

This enables the use of modules for a significant build performance gain
when building with clang as host compiler or when using HAVE_LLVM=yes.
Switch libc++ to using the copy from the mono-repo.
@
text
@#	$NetBSD: Makefile,v 1.23 2020/02/21 15:00:44 joerg Exp $

.include <bsd.hostinit.mk>

#
# Do *not* set HOSTPROG or HOSTLIB at this point otherwise
# it will create a loop trying to extract the object directory.
#
.include "Makefile.inc"
.include "${LLVM_TOPLEVEL}/lib/Makefile.inc"

realdepends realall: config/config.status need-dl need-terminfo support-modules

dependall: clean-modulecache

clean-modulecache:
	rm -rf ${LLVM_MODULE_CACHE}

config/config.status: ${LLVM_SRCDIR}/configure
	mkdir -p config
	printf '#!/bin/sh\necho 2.7.3' > config/python
	chmod 755 config/python
	cd config && ${HOST_SH} ${CONFIG_DIR}/configure ${LLVM_CONFIGURE_ARGS} \
	    --enable-optimized CC=${HOST_CC:Q} CXX=${HOST_CXX:Q} \
	    --with-python=${.OBJDIR}/config/python && \
	cp ${LLVM_TOPLEVEL}/include/module.modulemap include/llvm/module.modulemap

support-modules: module-test.cpp Makefile
	if ${HOST_CXX} -stdlib=libc++ -c -fmodules -fcxx-modules -fmodules-cache-path=./module.cache \
	   ${.CURDIR}/module-test.cpp  3> /dev/null 2>&1; then \
		echo HOST_SUPPORTS_MODULES=yes > ${.TARGET}; \
	else \
		echo HOST_SUPPORTS_MODULES=no > ${.TARGET}; \
	fi

need-dl: Makefile
	printf '#include <dlfcn.h>\nint main(void){void *p; return dladdr(p, p);}' > need-dl.c
	if ${HOST_CC} -o need-dl.out -D_GNU_SOURCE need-dl.c > /dev/null 2>&1; then \
		echo > ${.TARGET}; \
	elif ${HOST_CC} -o need-dl.out -D_GNU_SOURCE need-dl.c -ldl > /dev/null 2>&1; then \
		echo -ldl > ${.TARGET}; \
	else \
		echo > ${.TARGET}; \
	fi

need-terminfo: Makefile
	printf 'int setupterm(char *, int, int *);\nint main(void){return setupterm("", 0, 0);}' > need-terminfo.c
	for lib in tinfo terminfo ncurses curses; do \
		if ${HOST_CC} -o need-terminfo.out need-terminfo.c -l$$lib > /dev/null 2>&1; then \
			echo -l$$lib > ${.TARGET}; \
			break; \
		fi; \
	done

CLEANFILES+=	need-dl need-dl.c need-dl.out need-terminfo need-terminfo.c need-terminfo.out

cleandir: cleandir-llvm

cleandir-llvm: .PHONY
	test ! -d config || rm -r config
	test ! -d module-cache || rm -r module-cache
	rm -f need-dl need-dl.tmp module-cache module-test.o

.include <bsd.hostprog.mk>
@


1.23
log
@LLVM doesn't use term.h, so don't check for it when probing here either.
Increase robustness of checks for incremental builds by forcing a
dependency on the Makefile itself.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.22 2018/05/01 19:59:47 christos Exp $
d12 6
a17 1
realdepends realall: config/config.status need-dl need-terminfo
d25 10
a34 2
	    --with-python=${.OBJDIR}/config/python
# --disable-assertions
d61 2
a62 1
	rm -f need-dl need-dl.tmp
@


1.23.4.1
log
@sync with head
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.24 2021/05/30 01:57:00 joerg Exp $
d12 1
a12 6
realdepends realall: config/config.status need-dl need-terminfo support-modules

dependall: clean-modulecache

clean-modulecache:
	rm -rf ${LLVM_MODULE_CACHE}
d20 2
a21 10
	    --with-python=${.OBJDIR}/config/python && \
	cp ${LLVM_TOPLEVEL}/include/module.modulemap include/llvm/module.modulemap

support-modules: module-test.cpp Makefile
	if ${HOST_CXX} -stdlib=libc++ -c -fmodules -fcxx-modules -fmodules-cache-path=./module.cache \
	   ${.CURDIR}/module-test.cpp  3> /dev/null 2>&1; then \
		echo HOST_SUPPORTS_MODULES=yes > ${.TARGET}; \
	else \
		echo HOST_SUPPORTS_MODULES=no > ${.TARGET}; \
	fi
d48 1
a48 2
	test ! -d module-cache || rm -r module-cache
	rm -f need-dl need-dl.tmp module-cache module-test.o
@


1.22
log
@Create a new bsd.hostinit.mk file and put the build definitions for all host
programs there; make all Makefiles that use bsd.hostprog.mk include it.
Namely turn off MKREPRO and don't make lint, man pages, info files etc.
Remove the Makefile.inc files that contained these same settings, and
remove the settings from Makefile.host
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.21 2017/01/11 12:08:34 joerg Exp $
d23 1
a23 1
need-dl:
d33 2
a34 2
need-terminfo:
	printf '#include <term.h>\nint main(void){return setupterm(0, 0, 0);}' > need-terminfo.c
@


1.22.2.1
log
@Merge changes from current as of 20200406
@
text
@d1 1
a1 1
#	$NetBSD$
d23 1
a23 1
need-dl: Makefile
d33 2
a34 2
need-terminfo: Makefile
	printf 'int setupterm(char *, int, int *);\nint main(void){return setupterm("", 0, 0);}' > need-terminfo.c
@


1.21
log
@Sync tools build glue with LLVM pre-4.0.0.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.20 2015/03/05 10:22:25 joerg Exp $
d3 1
a3 1
.include <bsd.init.mk>
@


1.21.12.1
log
@Synch with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.22 2018/05/01 19:59:47 christos Exp $
d3 1
a3 1
.include <bsd.hostinit.mk>
@


1.20
log
@misc/48722: Use explicit HOST_SH in case the user insists on removing
permissions from the filesystem.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.19 2015/01/05 18:41:59 joerg Exp $
d18 1
a18 1
	cd config && ${HOST_SH} ${LLVM_SRCDIR}/configure ${LLVM_CONFIGURE_ARGS} \
@


1.20.2.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.21 2017/01/11 12:08:34 joerg Exp $
d18 1
a18 1
	cd config && ${HOST_SH} ${CONFIG_DIR}/configure ${LLVM_CONFIGURE_ARGS} \
@


1.19
log
@cleandir-llvm should not exist in the filesystem
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.18 2014/01/16 09:00:55 matt Exp $
d18 1
a18 1
	cd config && ${LLVM_SRCDIR}/configure ${LLVM_CONFIGURE_ARGS} \
@


1.18
log
@Pass HOST_CXX to llvm configure as CXX=${HOST_CXX:Q} since llvm wants c++
more than cc.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.17 2013/09/02 14:34:57 joerg Exp $
d46 1
a46 1
cleandir-llvm:
@


1.18.4.1
log
@Pull up following revision(s) (requested by joerg in ticket #824):
	distrib/sets/lists/comp/ad.arm: revision 1.65
	distrib/sets/lists/comp/md.amd64: revisions 1.228, 1.230
	distrib/sets/lists/comp/md.i386: revision 1.151, 1.152
	distrib/sets/lists/comp/mi: revision 1.1963
	tools/llvm/Makefile: revisions 1.19, 1.20
	tools/llvm-lib/liblldConfig/Makefile: revision 1.1
	tools/llvm-lib/liblldReaderWriterELFAArch64/Makefile: revision 1.1
Install cpuid.h on X86 and arm_neon.h on ARM.
--
Update set lists for LLVM 3.6RC1.
--
Until we have a solution for stdatomic.h for GCC 4.8, install Clang's
version under /usr/include/clang-3.6 to match the C11 default.
--
Update build system glue for LLVM 3.6RC1. Notable changes:
- Old JIT is removed.
- Improvements to debug information handling.
- ARM: check for deprecated instructions and warn in the integrated
  assembler
- PPC: VSX support, va_arg support for struct/union types, -fPIC vs
  -fpic supported, faster atomics
- x86: improved vectorizer
--
cleandir-llvm should not exist in the filesystem
--
misc/48722: Use explicit HOST_SH in case the user insists on removing
permissions from the filesystem.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.18 2014/01/16 09:00:55 matt Exp $
d18 1
a18 1
	cd config && ${HOST_SH} ${LLVM_SRCDIR}/configure ${LLVM_CONFIGURE_ARGS} \
d46 1
a46 1
cleandir-llvm: .PHONY
@


1.17
log
@Update LLVM/Clang snapshot to r189662. This includes many improvements
to the new SLP vectorizer, fast codegen support for PPC and using
terminfo for the color sequences. In addition, add (optional) build
infrastructure for lld to allow easier testing. This is controlled by
MKLLD.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.16 2013/02/20 14:13:31 joerg Exp $
d19 1
a19 1
	    --enable-optimized CC=${HOST_CC:Q} \
@


1.16
log
@Work-around for python detection in LLVM's configure script
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.15 2012/06/17 07:40:25 joerg Exp $
d12 1
a12 1
realdepends realall: config/config.status need-dl
d33 10
a42 1
CLEANFILES+=	need-dl need-dl.c need-dl.out
@


1.15
log
@Fix version string returned by clang --version.
Integrate the in-tree config file generation with the cross-building
toolchain.  Regenerate the files.
Keep version numbers all in one place.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.14 2012/06/16 17:01:04 joerg Exp $
d16 2
d19 2
a20 1
	    --enable-optimized CC=${HOST_CC:Q}
@


1.15.2.1
log
@resync with head
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.15 2012/06/17 07:40:25 joerg Exp $
a15 2
	printf '#!/bin/sh\necho 2.7.3' > config/python
	chmod 755 config/python
d17 1
a17 2
	    --enable-optimized CC=${HOST_CC:Q} \
	    --with-python=${.OBJDIR}/config/python
@


1.15.2.2
log
@Rebase to HEAD as of a few days ago.
@
text
@d1 1
a1 1
#	$NetBSD$
d12 1
a12 1
realdepends realall: config/config.status need-dl need-terminfo
d19 1
a19 1
	    --enable-optimized CC=${HOST_CC:Q} CXX=${HOST_CXX:Q} \
d33 1
a33 10
need-terminfo:
	printf '#include <term.h>\nint main(void){return setupterm(0, 0, 0);}' > need-terminfo.c
	for lib in tinfo terminfo ncurses curses; do \
		if ${HOST_CC} -o need-terminfo.out need-terminfo.c -l$$lib > /dev/null 2>&1; then \
			echo -l$$lib > ${.TARGET}; \
			break; \
		fi; \
	done

CLEANFILES+=	need-dl need-dl.c need-dl.out need-terminfo need-terminfo.c need-terminfo.out
@


1.14
log
@Update LLVM/Clang snapshot to r158533. This brings in support for
stack-realignment in functions using alloca on x86. Move to
/usr/include/clang-3.2 to reflect the version.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.13 2012/05/31 18:52:16 joerg Exp $
d12 1
a12 7
realdepends realall: config/config.status need-dl \
	config/include/clang/Basic/Version.inc

config/include/clang/Basic/Version.inc: \
	${LLVM_TOPLEVEL}/config/clang/Basic/Version.inc
	mkdir -p ${.TARGET:H}
	cat < ${.ALLSRC} > ${.TARGET}
d16 2
a17 6
	cd config && ${LLVM_SRCDIR}/configure CC=${HOST_CC:Q} --prefix=/usr \
	    --enable-targets=x86,powerpc,sparc,arm,mips \
	    --host=${MACHINE_GNU_PLATFORM} \
	    --with-c-include-dirs=/usr/include/clang-3.2:/usr/include \
	    --with-clang-srcdir=${CLANG_SRCDIR} \
	    --enable-optimized llvm_cv_gnu_make_command=${MAKE}
@


1.13
log
@Forcefully override the GNU make configure check. The build system in
NetBSD doesn't need it, so the configure check doesn't have to reject
a prestine NetBSD host.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.12 2012/02/28 17:09:29 joerg Exp $
d25 1
a25 1
	    --with-c-include-dirs=/usr/include/clang-3.0:/usr/include \
@


1.12
log
@Update LLVM/Clang snapshot to r151411. This brings in Lambda support for
C++11 and a new literal format string check to catch variadic argument
functions.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.11 2011/07/18 19:11:28 joerg Exp $
d27 1
a27 1
	    --enable-optimized
@


1.11
log
@Partially revert last, keep assertions enabled (but with the correct
spelling of the option).
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.10 2011/07/18 18:37:15 adam Exp $
d26 1
@


1.11.2.1
log
@sync with head
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.11 2011/07/18 19:11:28 joerg Exp $
a25 1
	    --with-clang-srcdir=${CLANG_SRCDIR} \
@


1.11.2.2
log
@sync with head
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.11.2.1 2012/04/17 00:09:28 yamt Exp $
d12 7
a18 1
realdepends realall: config/config.status need-dl
d22 6
a27 2
	cd config && ${LLVM_SRCDIR}/configure ${LLVM_CONFIGURE_ARGS} \
	    --enable-optimized CC=${HOST_CC:Q}
@


1.11.2.3
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.11.2.2 2012/10/30 19:00:12 yamt Exp $
d12 1
a12 1
realdepends realall: config/config.status need-dl need-terminfo
a15 2
	printf '#!/bin/sh\necho 2.7.3' > config/python
	chmod 755 config/python
d17 1
a17 2
	    --enable-optimized CC=${HOST_CC:Q} CXX=${HOST_CXX:Q} \
	    --with-python=${.OBJDIR}/config/python
d30 1
a30 10
need-terminfo:
	printf '#include <term.h>\nint main(void){return setupterm(0, 0, 0);}' > need-terminfo.c
	for lib in tinfo terminfo ncurses curses; do \
		if ${HOST_CC} -o need-terminfo.out need-terminfo.c -l$$lib > /dev/null 2>&1; then \
			echo -l$$lib > ${.TARGET}; \
			break; \
		fi; \
	done

CLEANFILES+=	need-dl need-dl.c need-dl.out need-terminfo need-terminfo.c need-terminfo.out
@


1.10
log
@Pass HOST_CC otherwise fails e.g. on Mac OS X; fixed typo in --disable-assertions
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.9 2011/07/07 05:41:59 matt Exp $
d26 2
a27 1
	    --enable-optimized --disable-assertions
@


1.9
log
@Fix cleandir-llvm (only remove config if it exists)
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.8 2011/07/05 19:37:11 joerg Exp $
d22 3
a24 2
	cd config && ${LLVM_SRCDIR}/configure --prefix=/usr \
	    --enable-targets=x86,powerpc,sparc,arm,mips --host=${MACHINE_GNU_PLATFORM} \
d26 1
a26 1
	    --enable-optimized --disable--assertions
@


1.8
log
@Hook up LLVM's MIPS target.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.7 2011/07/05 17:30:35 joerg Exp $
d42 1
a42 1
	rm -r config
@


1.7
log
@Also enable toolchain build of ARM
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2011/07/05 14:15:56 joerg Exp $
d23 1
a23 1
	    --enable-targets=x86,powerpc,sparc,arm --host=${MACHINE_GNU_PLATFORM} \
@


1.6
log
@Hook up LLVM's SPARC target.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.5 2011/07/04 22:37:58 joerg Exp $
d23 1
a23 1
	    --enable-targets=x86,powerpc,sparc --host=${MACHINE_GNU_PLATFORM} \
@


1.5
log
@Hook up LLVM's PowerPC.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4 2011/05/16 19:27:47 joerg Exp $
d23 1
a23 1
	    --enable-targets=x86,powerpc --host=${MACHINE_GNU_PLATFORM} \
@


1.4
log
@Update to LLVM/Clang revision 131404. This includes the fix for asm labels
on builtins (broke longjmp usage) and a better cross-compiling support
in combination with -m32/-m64.

Update configuration to include /usr/include/clang-3.0 in the search
path.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2011/03/21 02:10:10 joerg Exp $
d23 1
a23 1
	    --enable-targets=x86 --host=x86_64--netbsd \
@


1.3
log
@--with-clang-resource-dir is no longer needed
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.2 2011/03/18 23:32:04 joerg Exp $
d24 1
d26 1
@


1.2
log
@Update LLVM snapshot. This allows deriving the target from the binary
name, provides a proper CPP mode and fixes a number of compat issues
in the integrated assembler.

Build the toolchain compiler optimized and without assertions now.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.1 2011/02/06 01:14:11 joerg Exp $
a23 1
	    --with-clang-resource-dir=${DESTDIR}/usr/lib \
@


1.1
log
@Add LLVM and clang build system.  It is enabled by MKLLVM=yes.
Upstream sources can be fetched by running "make checkout" in
src/external/bsd/llvm, they will be properly imported once the
integration and missing features are sorted out.
@
text
@d1 1
a1 1
#	$NetBSD$
d23 3
a25 2
	    --enable-targets=x86 --host=x86_64--netbsd --with-clang-resource-dir=${DESTDIR}/usr/lib

@


1.1.2.1
log
@file Makefile was added on branch bouyer-quota2 on 2011-03-06 15:07:57 +0000
@
text
@d1 43
@


1.1.2.2
log
@Sync with HEAD
@
text
@a0 43
#	$NetBSD: Makefile,v 1.1 2011/02/06 01:14:11 joerg Exp $

.include <bsd.init.mk>

#
# Do *not* set HOSTPROG or HOSTLIB at this point otherwise
# it will create a loop trying to extract the object directory.
#
.include "Makefile.inc"
.include "${LLVM_TOPLEVEL}/lib/Makefile.inc"

realdepends realall: config/config.status need-dl \
	config/include/clang/Basic/Version.inc

config/include/clang/Basic/Version.inc: \
	${LLVM_TOPLEVEL}/config/clang/Basic/Version.inc
	mkdir -p ${.TARGET:H}
	cat < ${.ALLSRC} > ${.TARGET}

config/config.status: ${LLVM_SRCDIR}/configure
	mkdir -p config
	cd config && ${LLVM_SRCDIR}/configure --prefix=/usr \
	    --enable-targets=x86 --host=x86_64--netbsd --with-clang-resource-dir=${DESTDIR}/usr/lib

need-dl:
	printf '#include <dlfcn.h>\nint main(void){void *p; return dladdr(p, p);}' > need-dl.c
	if ${HOST_CC} -o need-dl.out -D_GNU_SOURCE need-dl.c > /dev/null 2>&1; then \
		echo > ${.TARGET}; \
	elif ${HOST_CC} -o need-dl.out -D_GNU_SOURCE need-dl.c -ldl > /dev/null 2>&1; then \
		echo -ldl > ${.TARGET}; \
	else \
		echo > ${.TARGET}; \
	fi

CLEANFILES+=	need-dl need-dl.c need-dl.out

cleandir: cleandir-llvm

cleandir-llvm:
	rm -r config
	rm -f need-dl need-dl.tmp

.include <bsd.hostprog.mk>
@


