Jeff Jia
2013-Apr-09 23:39 UTC
[LLVMdev] Does DragonEgg support parameters like -fno-builtin in clang?
Hi, I have been using clang for quite a while, and I can use `clang -fno-builtin hello.c` to prevent the generation of llvm built-in functions, such as llvm.memset. Recently, I switched to gcc with DragonEgg, since the program to be built is originally designed to be compiled with gcc. I searched on the web, but did not find any information about how to set DragonEgg parameters. Could anyone please give me some help? Thanks in advance! -- Jeff Jia -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130409/a93a4143/attachment.html>
陳韋任 (Wei-Ren Chen)
2013-Apr-10 02:45 UTC
[LLVMdev] Does DragonEgg support parameters like -fno-builtin in clang?
On Tue, Apr 09, 2013 at 04:39:14PM -0700, Jeff Jia wrote:> Hi, > > I have been using clang for quite a while, and I can use `clang -fno-builtin > hello.c` to prevent the generation of llvm built-in functions, such as > llvm.memset. Recently, I switched to gcc with DragonEgg, since the program to > be built is originally designed to be compiled with gcc. I searched on the web, > but did not find any information about how to set DragonEgg parameters. Could > anyone please give me some help? Thanks in advance!Dragonegg is a GCC plugin, I think you can just pass "-fno-builtin" [1] to gcc. Doesn't it work? [1] http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Option-Summary.html#Option-Summary Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj
Duncan Sands
2013-Apr-10 08:31 UTC
[LLVMdev] Does DragonEgg support parameters like -fno-builtin in clang?
Hi Jeff,> I have been using clang for quite a while, and I can use `clang -fno-builtin > hello.c` to prevent the generation of llvm built-in functions, such as > llvm.memset. Recently, I switched to gcc with DragonEgg, since the program to be > built is originally designed to be compiled with gcc. I searched on the web, but > did not find any information about how to set DragonEgg parameters. Could anyone > please give me some help? Thanks in advance!dragonegg just uses the same parameters as gcc. However -fno-builtin has no effect (this is a bug) because it is surprisingly tricky to get the appropriate information from inside gcc. To be more precise: it's not too hard to set up something that works OK for C, but then it works poorly for Fortran and Ada. I didn't yet come up with a scheme that works well for all languages. Ciao, Duncan.
Jeff Jia
2013-Apr-10 19:54 UTC
[LLVMdev] Does DragonEgg support parameters like -fno-builtin in clang?
Hi chenwj, Thanks! I have tried it, but the generated byte code still uses `llvm.memset`. I guess the flag `-fno-builtin` is not used by DragonEgg, or I missed some other configuration parameters. On Tue, Apr 9, 2013 at 7:45 PM, 陳韋任 (Wei-Ren Chen) <chenwj at iis.sinica.edu.tw> wrote:> On Tue, Apr 09, 2013 at 04:39:14PM -0700, Jeff Jia wrote: > > Hi, > > > > I have been using clang for quite a while, and I can use `clang > -fno-builtin > > hello.c` to prevent the generation of llvm built-in functions, such as > > llvm.memset. Recently, I switched to gcc with DragonEgg, since the > program to > > be built is originally designed to be compiled with gcc. I searched on > the web, > > but did not find any information about how to set DragonEgg parameters. > Could > > anyone please give me some help? Thanks in advance! > > Dragonegg is a GCC plugin, I think you can just pass "-fno-builtin" > [1] to gcc. Doesn't it work? > > [1] > > http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Option-Summary.html#Option-Summary > > Regards, > chenwj > > -- > Wei-Ren Chen (陳韋任) > Computer Systems Lab, Institute of Information Science, > Academia Sinica, Taiwan (R.O.C.) > Tel:886-2-2788-3799 #1667 > Homepage: http://people.cs.nctu.edu.tw/~chenwj >-- Jeff Jia -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130410/6c9ae019/attachment.html>
Apparently Analagous Threads
- [LLVMdev] Does DragonEgg support parameters like -fno-builtin in clang?
- [LLVMdev] Does DragonEgg support parameters like -fno-builtin in clang?
- [LLVMdev] Does DragonEgg support parameters like -fno-builtin in clang?
- [LLVMdev] Building dragonegg.so failed
- [LLVMdev] Can DragonEgg-2.9 work with gcc-4.6?