openresty / lua-resty-balancer

A generic consistent hash implementation for OpenResty/Lua
322 stars 77 forks source link

make: unrecognized command line option "-flto" #10

Closed xiaoxuanzi closed 7 years ago

xiaoxuanzi commented 7 years ago

I found a error:

[root@]# make cc -Wall -O3 -flto -g -DFP_RELAX=0 -DDEBUG -fPIC -MMD -fvisibility=hidden -DBUILDING_SO -c chash.c cc1: error: unrecognized command line option "-flto" make: *** [chash.o] error 1

AND

gcc -v:

gcc version 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC)

I delete "-flto" AND it work correctly.

"-flto" support after GCC 4.7

doujiang24 commented 7 years ago

Yeah, you need a higher version gcc :)