From: Ben Gras Date: Mon, 21 Feb 2011 16:06:58 +0000 (+0000) Subject: clang: support for building elf using temporary elf-targeted binutils. X-Git-Tag: v3.2.0~656 X-Git-Url: http://zhaoyanbai.com/repos/doc/man.3.txt?a=commitdiff_plain;h=cba6e667da3154c3855f480fb031ccd7839eef34;p=minix.git clang: support for building elf using temporary elf-targeted binutils. --- diff --git a/lib/Makefile b/lib/Makefile index 80e1baa05..a0a2561e9 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -34,3 +34,6 @@ clean_gnu: clean_elf: sh elf_build.sh clean + +clean_clang: + sh clang_build.sh clean diff --git a/lib/clang_build.sh b/lib/clang_build.sh index 201708b03..15939133f 100755 --- a/lib/clang_build.sh +++ b/lib/clang_build.sh @@ -2,7 +2,12 @@ export CC=clang export COMPILER_TYPE=gnu +export LD="i386-pc-minix3-ld" +export AR="i386-pc-minix3-ar" +export OBJCOPY="i386-pc-minix3-objcopy" +export RANLIB="i386-pc-minix3-ranlib" export MAKEOBJDIR=obj-gnu -export PATH=$PATH:/usr/pkg/bin +export PATH=$PATH:/usr/pkg/bin:/usr/gnu_cross/bin +export MAKEOBJDIR=obj-elf-clang make $@ diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 724ebdf26..975bffce6 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -535,7 +535,7 @@ DEBUGMODE?= ${NONBINMODE} # All platforms are ELF. # #OBJECT_FMT= ELF -.if !empty(CC:Mi386-pc-minix3-gcc) +.if !empty(CC:Mi386-pc-minix3-gcc) || !empty(CC:Mclang) OBJECT_FMT= ELF .else OBJECT_FMT= a.out