]> Zhao Yanbai Git Server - minix.git/commitdiff
clang: support for building elf using temporary elf-targeted binutils.
authorBen Gras <ben@minix3.org>
Mon, 21 Feb 2011 16:06:58 +0000 (16:06 +0000)
committerBen Gras <ben@minix3.org>
Mon, 21 Feb 2011 16:06:58 +0000 (16:06 +0000)
lib/Makefile
lib/clang_build.sh
share/mk/bsd.own.mk

index 80e1baa05c5fcfc7582d63c8ece03bb0a85136bb..a0a2561e98379e3b77e6f81959cc5007bb26706f 100644 (file)
@@ -34,3 +34,6 @@ clean_gnu:
 
 clean_elf:
        sh elf_build.sh clean
+
+clean_clang:
+       sh clang_build.sh clean
index 201708b03efab161a954afb916cc6eb589d53f8d..15939133fc434cc046da57179e73845a9dbd8b51 100755 (executable)
@@ -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 $@
index 724ebdf26f36d14460681ac78181a0f1b8409a12..975bffce6ec10850222beffcd78165da10625837 100644 (file)
@@ -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