1

SConstruct での環境のセットアップは次のとおりです。

env = Environment(
    CC = 'i686-w64-mingw32-gcc',
    LINK = 'i686-w64-mingw32-gcc',
    CCFLAGS = '-Werror',
    RANLIB = 'i686-w64-mingw32-ranlib',
    AR = 'i686-w64-mingw32-ar'
)

それにもかかわらず、scons は -fPic パラメーターをコンパイルに追加します。

scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
i686-w64-mingw32-gcc -o src/apply.os -c -Werror -fPIC src/apply.c
src/apply.c:1:0: error: -fPIC ignored for target (all code is position independent) [-Werror]

scons にはクロスコンパイル機能がないため、「強制オン」コンパイラ パラメータを削除したいと思います。

このツールのバージョン 2.3.4 を使用しています。

4

1 に答える 1