checking whether to use .ctors/.dtors header and trailer... configure: error: missing __attribute__ ((constructor)) support??

发布时间 2023-07-17 17:15:31作者: 小鲨鱼2018

 

001、问题:checking whether to use .ctors/.dtors header and trailer... configure: error: missing __attribute__ ((constructor)) support??

[root@PC1 build]# ../configure  --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin --disable-sanity-checks --disable-werror

 

002、解决方法(在末尾增加了 libc_cv_ctors_header=yes )

[root@PC1 build]# ../configure  --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin --disable-sanity-checks --disable-werror libc_cv_ctors_header=yes

 。

参考:https://www.thinbug.com/q/53781080