超漢字開発環境でClangを使ってみるテスト
Revisión | f4046c5954cad525d54b1f2e8298cc1e0fc37116 (tree) |
---|---|
Tiempo | 2015-11-19 01:48:30 |
Autor | ornse01 <ornse01@user...> |
Commiter | ornse01 |
replace compiler setting. gcc to clang.
@@ -1,10 +1,11 @@ | ||
1 | 1 | require 'rake/clean' |
2 | 2 | require 'rake/loaders/makefile' |
3 | 3 | |
4 | -CC = "#{ENV['GNUi386']}/bin/gcc386" | |
4 | +CC = "clang" | |
5 | 5 | INCDIR = ["#{ENV['BD']}/include", "../src"] |
6 | -CFLAGS = "-O2 -fno-strength-reduce -mpreferred-stack-boundary=2 -Wall" | |
6 | +CFLAGS = "-O2 -target i386-unknown-gnu -Wall" | |
7 | 7 | CPPFLAGS = "#{INCDIR.map {|item| '-I'+item }.join(' ')} -DPCAT" |
8 | +LINKER = "#{ENV['GNUi386']}/bin/gcc386" | |
8 | 9 | LOADLIBES = "-limg -lapp -ltf -lgcc -lmain_r -ldbg -llang -lg -lsys -lg -lf -lsvc" |
9 | 10 | LDFLAGS = "-L#{ENV['BD']}/lib/i386e2" |
10 | 11 | NM = "#{ENV['GNUi386']}/bin/nm" |
@@ -26,7 +27,7 @@ CLOBBER.include(FileList["*.d"]) | ||
26 | 27 | task :default => [TARGET_MAP] |
27 | 28 | |
28 | 29 | file TARGET_BIN => OBJS do |t| |
29 | - sh "#{CC} #{LDFLAGS} #{t.prerequisites.join(' ')} #{LOADLIBES} -o #{t.name} " | |
30 | + sh "#{LINKER} #{LDFLAGS} #{t.prerequisites.join(' ')} #{LOADLIBES} -o #{t.name} " | |
30 | 31 | end |
31 | 32 | |
32 | 33 | rule '.o' => [proc{|t| t.pathmap("../src/%n.c") }] do |t| |