私はAndroid用に何かをクロスコンパイルしようとしています。これはpthreadをサポートしていますが、コンパイルおよびリンク時に-pthreadを使用しません。-pthreadを使用しようとすると、クロスコンパイラを使用したコンパイルは失敗します。
最初に「configure」ツールを使用して何かをクロスコンパイルしようとすると、-pthreadを使用して「gethostbynameのチェック」などを実行しようとし続けるため、configureが失敗します。
configure:21229: checking for gethostbyname
configure:21229: /mnt/hgfs/Documents/thesis/android-wmon/core/android-wireshark/agcc \
-o conftest -D_U_="__attribute__((unused))" -g -O2 -Wall -W -Wextra \
-Wdeclaration-after-statement -Wendif-labels -Wpointer-arith \
-Wno-pointer-sign -Warray-bounds -Wcast-align -Wformat-security \
-fexcess-precision=fast -I/usr/local/include -pthread \
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include \
-I/usr/local/include -Wl,--as-needed -L/usr/local/lib conftest.c >&5
arm-eabi-gcc: error: unrecognized option '-pthread'
どこからこのフラグを取得するのか、どうすればそれをやめることができるのかわかりません。configureのどこにも表示されないので、動的に生成している必要があります。これを行う場所が見つからないため、configure内に格納されている変数から削除できます。