cloudflare / lua-resty-json

json lib for lua and C
BSD 2-Clause "Simplified" License
167 stars 33 forks source link

explicitly set the build-id to linker for lower version gcc #7

Closed detailyang closed 7 years ago

detailyang commented 7 years ago

I'm using the gcc 4.8.0 on Centos 6 to build the rpm package. It's strange that the default i cannot get the build-id by objdump -s -j .note.gnu.build-id libljson.so with gcc -fPIC, so we have to explicitly set the build-id when compile the shared library.

yangshuxin commented 7 years ago

Just in case you are willing to make PR against https://github.com/agentzh/lua-resty-json, I can merge your change. I don't have access to this repo.

BTW, your change will break build on Mac. ld on Mac is different animal.

detailyang commented 7 years ago

thanks @yangshuxin build-id is working only on the linux elf , so just add the judge for linux platform

dndx commented 7 years ago

How does this looks to you @jdesgats?

dndx commented 7 years ago

Thanks @detailyang, merged.