如何将链接器选项添加到CMake引导?
我正在AIX上从tarball版本构建cmake3.12.4。CMake无法在计算机上链接:如何将链接器选项添加到CMake引导?,cmake,linker-errors,aix,linker-flags,Cmake,Linker Errors,Aix,Linker Flags,我正在AIX上从tarball版本构建cmake3.12.4。CMake无法在计算机上链接: ld: 0711-781 ERROR: TOC overflow. TOC size: 65632 Maximum size: 65536 有关错误的详细信息,请参阅IBM技术说明。我想为cmake配方添加-bbigtoc链接器选项 CMake的引导程序似乎不接受LDFLAGS的链接器选项,如下所示 如何向引导过程添加链接器标志 以下是CMake引导接受的选项: $ ./bootstrap --h
ld: 0711-781 ERROR: TOC overflow. TOC size: 65632 Maximum size: 65536
有关错误的详细信息,请参阅IBM技术说明。我想为cmake配方添加-bbigtoc
链接器选项
CMake的引导程序似乎不接受LDFLAGS
的链接器选项,如下所示
如何向引导过程添加链接器标志
以下是CMake引导接受的选项:
$ ./bootstrap --help
Usage: ./bootstrap [<options>...] [-- <cmake-options>...]
Options: [defaults in brackets after descriptions]
Configuration:
--help print this message
--version only print version information
--verbose display more information
--parallel=n bootstrap cmake in parallel, where n is
number of nodes [1]
--enable-ccache Enable ccache when building cmake
--init=FILE load FILE as script to populate cache
--system-libs use all system-installed third-party libraries
(for use only by package maintainers)
--no-system-libs use all cmake-provided third-party libraries
(default)
--system-curl use system-installed curl library
--no-system-curl use cmake-provided curl library (default)
--system-expat use system-installed expat library
--no-system-expat use cmake-provided expat library (default)
--system-jsoncpp use system-installed jsoncpp library
--no-system-jsoncpp use cmake-provided jsoncpp library (default)
--system-zlib use system-installed zlib library
--no-system-zlib use cmake-provided zlib library (default)
--system-bzip2 use system-installed bzip2 library
--no-system-bzip2 use cmake-provided bzip2 library (default)
--system-liblzma use system-installed liblzma library
--no-system-liblzma use cmake-provided liblzma library (default)
--system-libarchive use system-installed libarchive library
--no-system-libarchive use cmake-provided libarchive library (default)
--system-librhash use system-installed librhash library
--no-system-librhash use cmake-provided librhash library (default)
--system-libuv use system-installed libuv library
--no-system-libuv use cmake-provided libuv library (default)
--qt-gui build the Qt-based GUI (requires Qt >= 4.2)
--no-qt-gui do not build the Qt-based GUI (default)
--qt-qmake=<qmake> use <qmake> as the qmake executable to find Qt
--sphinx-info build Info manual with Sphinx
--sphinx-man build man pages with Sphinx
--sphinx-html build html help with Sphinx
--sphinx-qthelp build qch help with Sphinx
--sphinx-build=<sb> use <sb> as the sphinx-build executable
--sphinx-flags=<flags> pass <flags> to sphinx-build executable
Directory and file names:
--prefix=PREFIX install files in tree rooted at PREFIX
[/usr/local]
--bindir=DIR install binaries in PREFIX/DIR
[bin]
--datadir=DIR install data files in PREFIX/DIR
[share/cmake-3.12]
--docdir=DIR install documentation files in PREFIX/DIR
[doc/cmake-3.12]
--mandir=DIR install man pages files in PREFIX/DIR/manN
[man]
--xdgdatadir=DIR install XDG specific files in PREFIX/DIR
[share]
大概是这样的:
export CFLAGS=...
export CXXFLAGS=...
export LDFLAGS='... -Wl,-bbigtoc'
./bootstrap ... --verbose
make VERBOSE=1 all
您可能还想阅读以下内容:类似的内容:
export CFLAGS=...
export CXXFLAGS=...
export LDFLAGS='... -Wl,-bbigtoc'
./bootstrap ... --verbose
make VERBOSE=1 all
此外,您可能还想阅读以下内容:谢谢@Lorinczy。克马克是另一种野兽。它使用自己的选项和标志方案。它不使用标准选项和标志。如果CMake使用标准选项,那么使用起来就会很容易。相反,所有内容都以
-DCMAKE_=..
的形式传递,这在引导过程中会被忽略。@jww好吧,如果我的建议不起作用(尽管它在AIX6.1、cmake-3.11.4中对我有效),请提供一些详细信息,确切地说您尝试了什么,以及您遇到了什么错误。再次感谢Lorinczy。我的错,我不清楚。CMake不使用CC
,CXX
,CFLAGS
,cxflags
,等等。它有自己使用预处理器宏的方式。嗨,你可能误解了我的帖子:我的建议,不是一些随机猜测,它实际上对我有用。此外,您还应该记住,您是在构建cmake,而不是使用cmake进行构建。@jww成功了吗?谢谢@Lorinczy。克马克是另一种野兽。它使用自己的选项和标志方案。它不使用标准选项和标志。如果CMake使用标准选项,那么使用起来就会很容易。相反,所有内容都以-DCMAKE_=..
的形式传递,这在引导过程中会被忽略。@jww好吧,如果我的建议不起作用(尽管它在AIX6.1、cmake-3.11.4中对我有效),请提供一些详细信息,确切地说您尝试了什么,以及您遇到了什么错误。再次感谢Lorinczy。我的错,我不清楚。CMake不使用CC
,CXX
,CFLAGS
,cxflags
,等等。它有自己使用预处理器宏的方式。嗨,你可能误解了我的帖子:我的建议,不是一些随机猜测,它实际上对我有用。您还应该记住,您是在构建cmake,而不是使用cmake进行构建。@jww有什么成功的经验吗?