Is there any way to change gcc compilation options for a gem?

后端 未结 2 600
野的像风
野的像风 2020-12-09 12:27

I\'m struggling to install the RedCloth gem. When I type

gem install RedCloth

I get :

[…]
ragel/redcloth_attributes.c.rl:          


        
相关标签:
2条回答
  • 2020-12-09 12:59

    Had the same problem and here is the solution:

    $ sudo gem install RedCloth -- --with-cflags=\"-O2 -pipe -march=native -Wno-unused-but-set-variable\"
    

    You have to escape the quotes if you have more than one argument.

    0 讨论(0)
  • 2020-12-09 13:02

    If you're using bundler, the following works:

    bundle config build.RedCloth --with-cflags=\"-O2 -pipe -march=native -Wno-unused-but-set-variable\"
    
    0 讨论(0)
提交回复
热议问题