How to add linker option to CMake bootstrap?












-1















I'm building CMake 3.12.4 from the release tarball on AIX. CMake is failing to link on the machine:



ld: 0711-781 ERROR: TOC overflow. TOC size: 65632  Maximum size: 65536


The error is detailed in the IBM technotes at ld: 0711-781 ERROR: TOC overflow. I want to add -bbigtoc linker option for the cmake recipe.



CMake's bootstrap does not appear to accept linker options for LDFLAGS as shown below.



How do I add a linker flag to the bootstrap process?





Here are the options CMake bootstrap accepts:



$ ./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]




Here is the CMake link error:



cmake_build$ make VERBOSE=1
...
[ 91%] Linking CXX executable ../bin/cmake
cd /home/noloader/cmake_build/Source && /home/noloader/cmake_build/Boots
trap.cmk/cmake -E cmake_link_script CMakeFiles/cmake.dir/link.txt --verbose=1
/usr/bin/g++ -pthread -Wl,-bnoipath -Wl,-brtl -Wl,-bexpall CMakeFiles/cmake.dir
/cmakemain.cxx.o CMakeFiles/cmake.dir/cmcmd.cxx.o -o ../bin/cmake -Wl,-blibpath
:/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.8.1/pthread:/opt/freeware/lib/pt
hread:/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.8.1:/opt/freeware/lib:/usr/
lib:/lib libCMakeLib.a libCMakeServerLib.a libCMakeLib.a kwsys/libcmsys.a ../Uti
lities/cmexpat/libcmexpat.a ../Utilities/cmlibarchive/libarchive/libcmlibarchive
.a ../Utilities/cmliblzma/libcmliblzma.a ../Utilities/cmbzip2/libcmbzip2.a ../Ut
ilities/cmcompress/libcmcompress.a ../Utilities/cmcurl/lib/libcmcurl.a ../Utilit
ies/cmzlib/libcmzlib.a -lld ../Utilities/cmjsoncpp/libcmjsoncpp.a ../Utilities/c
mlibuv/libcmlibuv.a -lperfstat ../Utilities/cmlibrhash/libcmlibrhash.a
ld: 0711-781 ERROR: TOC overflow. TOC size: 65632 Maximum size: 65536
collect2: error: ld returned 12 exit status
make: 1254-004 The error code from the last command is 1.









share|improve this question



























    -1















    I'm building CMake 3.12.4 from the release tarball on AIX. CMake is failing to link on the machine:



    ld: 0711-781 ERROR: TOC overflow. TOC size: 65632  Maximum size: 65536


    The error is detailed in the IBM technotes at ld: 0711-781 ERROR: TOC overflow. I want to add -bbigtoc linker option for the cmake recipe.



    CMake's bootstrap does not appear to accept linker options for LDFLAGS as shown below.



    How do I add a linker flag to the bootstrap process?





    Here are the options CMake bootstrap accepts:



    $ ./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]




    Here is the CMake link error:



    cmake_build$ make VERBOSE=1
    ...
    [ 91%] Linking CXX executable ../bin/cmake
    cd /home/noloader/cmake_build/Source && /home/noloader/cmake_build/Boots
    trap.cmk/cmake -E cmake_link_script CMakeFiles/cmake.dir/link.txt --verbose=1
    /usr/bin/g++ -pthread -Wl,-bnoipath -Wl,-brtl -Wl,-bexpall CMakeFiles/cmake.dir
    /cmakemain.cxx.o CMakeFiles/cmake.dir/cmcmd.cxx.o -o ../bin/cmake -Wl,-blibpath
    :/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.8.1/pthread:/opt/freeware/lib/pt
    hread:/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.8.1:/opt/freeware/lib:/usr/
    lib:/lib libCMakeLib.a libCMakeServerLib.a libCMakeLib.a kwsys/libcmsys.a ../Uti
    lities/cmexpat/libcmexpat.a ../Utilities/cmlibarchive/libarchive/libcmlibarchive
    .a ../Utilities/cmliblzma/libcmliblzma.a ../Utilities/cmbzip2/libcmbzip2.a ../Ut
    ilities/cmcompress/libcmcompress.a ../Utilities/cmcurl/lib/libcmcurl.a ../Utilit
    ies/cmzlib/libcmzlib.a -lld ../Utilities/cmjsoncpp/libcmjsoncpp.a ../Utilities/c
    mlibuv/libcmlibuv.a -lperfstat ../Utilities/cmlibrhash/libcmlibrhash.a
    ld: 0711-781 ERROR: TOC overflow. TOC size: 65632 Maximum size: 65536
    collect2: error: ld returned 12 exit status
    make: 1254-004 The error code from the last command is 1.









    share|improve this question

























      -1












      -1








      -1








      I'm building CMake 3.12.4 from the release tarball on AIX. CMake is failing to link on the machine:



      ld: 0711-781 ERROR: TOC overflow. TOC size: 65632  Maximum size: 65536


      The error is detailed in the IBM technotes at ld: 0711-781 ERROR: TOC overflow. I want to add -bbigtoc linker option for the cmake recipe.



      CMake's bootstrap does not appear to accept linker options for LDFLAGS as shown below.



      How do I add a linker flag to the bootstrap process?





      Here are the options CMake bootstrap accepts:



      $ ./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]




      Here is the CMake link error:



      cmake_build$ make VERBOSE=1
      ...
      [ 91%] Linking CXX executable ../bin/cmake
      cd /home/noloader/cmake_build/Source && /home/noloader/cmake_build/Boots
      trap.cmk/cmake -E cmake_link_script CMakeFiles/cmake.dir/link.txt --verbose=1
      /usr/bin/g++ -pthread -Wl,-bnoipath -Wl,-brtl -Wl,-bexpall CMakeFiles/cmake.dir
      /cmakemain.cxx.o CMakeFiles/cmake.dir/cmcmd.cxx.o -o ../bin/cmake -Wl,-blibpath
      :/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.8.1/pthread:/opt/freeware/lib/pt
      hread:/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.8.1:/opt/freeware/lib:/usr/
      lib:/lib libCMakeLib.a libCMakeServerLib.a libCMakeLib.a kwsys/libcmsys.a ../Uti
      lities/cmexpat/libcmexpat.a ../Utilities/cmlibarchive/libarchive/libcmlibarchive
      .a ../Utilities/cmliblzma/libcmliblzma.a ../Utilities/cmbzip2/libcmbzip2.a ../Ut
      ilities/cmcompress/libcmcompress.a ../Utilities/cmcurl/lib/libcmcurl.a ../Utilit
      ies/cmzlib/libcmzlib.a -lld ../Utilities/cmjsoncpp/libcmjsoncpp.a ../Utilities/c
      mlibuv/libcmlibuv.a -lperfstat ../Utilities/cmlibrhash/libcmlibrhash.a
      ld: 0711-781 ERROR: TOC overflow. TOC size: 65632 Maximum size: 65536
      collect2: error: ld returned 12 exit status
      make: 1254-004 The error code from the last command is 1.









      share|improve this question














      I'm building CMake 3.12.4 from the release tarball on AIX. CMake is failing to link on the machine:



      ld: 0711-781 ERROR: TOC overflow. TOC size: 65632  Maximum size: 65536


      The error is detailed in the IBM technotes at ld: 0711-781 ERROR: TOC overflow. I want to add -bbigtoc linker option for the cmake recipe.



      CMake's bootstrap does not appear to accept linker options for LDFLAGS as shown below.



      How do I add a linker flag to the bootstrap process?





      Here are the options CMake bootstrap accepts:



      $ ./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]




      Here is the CMake link error:



      cmake_build$ make VERBOSE=1
      ...
      [ 91%] Linking CXX executable ../bin/cmake
      cd /home/noloader/cmake_build/Source && /home/noloader/cmake_build/Boots
      trap.cmk/cmake -E cmake_link_script CMakeFiles/cmake.dir/link.txt --verbose=1
      /usr/bin/g++ -pthread -Wl,-bnoipath -Wl,-brtl -Wl,-bexpall CMakeFiles/cmake.dir
      /cmakemain.cxx.o CMakeFiles/cmake.dir/cmcmd.cxx.o -o ../bin/cmake -Wl,-blibpath
      :/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.8.1/pthread:/opt/freeware/lib/pt
      hread:/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.8.1:/opt/freeware/lib:/usr/
      lib:/lib libCMakeLib.a libCMakeServerLib.a libCMakeLib.a kwsys/libcmsys.a ../Uti
      lities/cmexpat/libcmexpat.a ../Utilities/cmlibarchive/libarchive/libcmlibarchive
      .a ../Utilities/cmliblzma/libcmliblzma.a ../Utilities/cmbzip2/libcmbzip2.a ../Ut
      ilities/cmcompress/libcmcompress.a ../Utilities/cmcurl/lib/libcmcurl.a ../Utilit
      ies/cmzlib/libcmzlib.a -lld ../Utilities/cmjsoncpp/libcmjsoncpp.a ../Utilities/c
      mlibuv/libcmlibuv.a -lperfstat ../Utilities/cmlibrhash/libcmlibrhash.a
      ld: 0711-781 ERROR: TOC overflow. TOC size: 65632 Maximum size: 65536
      collect2: error: ld returned 12 exit status
      make: 1254-004 The error code from the last command is 1.






      cmake linker-errors aix linker-flags






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 25 '18 at 22:48









      jwwjww

      54k41232510




      54k41232510
























          1 Answer
          1






          active

          oldest

          votes


















          1














          Something like this:



          export CFLAGS=...
          export CXXFLAGS=...
          export LDFLAGS='... -Wl,-bbigtoc'

          ./bootstrap ... --verbose

          make VERBOSE=1 all


          Also you might want to read this: http://lzsiga.users.sourceforge.net/aix-linking.html#Q0025






          share|improve this answer
























          • Thanks @Lorinczy. CMake is a different beast. It uses its own options and flags scheme. It does not use standard options and flags. If CMake used standard options it would be easy to use it. Instead everything gets passed as a -DCMAKE_<SOME_OPT>=.., which is being ignored during bootstrap.

            – jww
            Dec 8 '18 at 7:50













          • @jww Well, if my suggestion didn't work (though it works for me in AIX6.1, cmake-3.11.4), please provide some details, exactly what did your try, and what errors did you get.

            – Lorinczy Zsigmond
            Dec 8 '18 at 11:54











          • Thanks again Lorinczy. My bad, I was not clear. CMake does not use CC, CXX, CFLAGS, CXXFLAGS,etc. It has its own way of doing things using preprocessor macros.

            – jww
            Dec 8 '18 at 17:06













          • Hi, you might have misunderstood my posts: what I suggested, isn't some random guess, it actually worked for me. Also you should keep in mind that you're building cmake, not building with cmake.

            – Lorinczy Zsigmond
            Dec 8 '18 at 17:21











          • @jww Any success yet?

            – Lorinczy Zsigmond
            Jan 22 at 5:45











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53472781%2fhow-to-add-linker-option-to-cmake-bootstrap%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          Something like this:



          export CFLAGS=...
          export CXXFLAGS=...
          export LDFLAGS='... -Wl,-bbigtoc'

          ./bootstrap ... --verbose

          make VERBOSE=1 all


          Also you might want to read this: http://lzsiga.users.sourceforge.net/aix-linking.html#Q0025






          share|improve this answer
























          • Thanks @Lorinczy. CMake is a different beast. It uses its own options and flags scheme. It does not use standard options and flags. If CMake used standard options it would be easy to use it. Instead everything gets passed as a -DCMAKE_<SOME_OPT>=.., which is being ignored during bootstrap.

            – jww
            Dec 8 '18 at 7:50













          • @jww Well, if my suggestion didn't work (though it works for me in AIX6.1, cmake-3.11.4), please provide some details, exactly what did your try, and what errors did you get.

            – Lorinczy Zsigmond
            Dec 8 '18 at 11:54











          • Thanks again Lorinczy. My bad, I was not clear. CMake does not use CC, CXX, CFLAGS, CXXFLAGS,etc. It has its own way of doing things using preprocessor macros.

            – jww
            Dec 8 '18 at 17:06













          • Hi, you might have misunderstood my posts: what I suggested, isn't some random guess, it actually worked for me. Also you should keep in mind that you're building cmake, not building with cmake.

            – Lorinczy Zsigmond
            Dec 8 '18 at 17:21











          • @jww Any success yet?

            – Lorinczy Zsigmond
            Jan 22 at 5:45
















          1














          Something like this:



          export CFLAGS=...
          export CXXFLAGS=...
          export LDFLAGS='... -Wl,-bbigtoc'

          ./bootstrap ... --verbose

          make VERBOSE=1 all


          Also you might want to read this: http://lzsiga.users.sourceforge.net/aix-linking.html#Q0025






          share|improve this answer
























          • Thanks @Lorinczy. CMake is a different beast. It uses its own options and flags scheme. It does not use standard options and flags. If CMake used standard options it would be easy to use it. Instead everything gets passed as a -DCMAKE_<SOME_OPT>=.., which is being ignored during bootstrap.

            – jww
            Dec 8 '18 at 7:50













          • @jww Well, if my suggestion didn't work (though it works for me in AIX6.1, cmake-3.11.4), please provide some details, exactly what did your try, and what errors did you get.

            – Lorinczy Zsigmond
            Dec 8 '18 at 11:54











          • Thanks again Lorinczy. My bad, I was not clear. CMake does not use CC, CXX, CFLAGS, CXXFLAGS,etc. It has its own way of doing things using preprocessor macros.

            – jww
            Dec 8 '18 at 17:06













          • Hi, you might have misunderstood my posts: what I suggested, isn't some random guess, it actually worked for me. Also you should keep in mind that you're building cmake, not building with cmake.

            – Lorinczy Zsigmond
            Dec 8 '18 at 17:21











          • @jww Any success yet?

            – Lorinczy Zsigmond
            Jan 22 at 5:45














          1












          1








          1







          Something like this:



          export CFLAGS=...
          export CXXFLAGS=...
          export LDFLAGS='... -Wl,-bbigtoc'

          ./bootstrap ... --verbose

          make VERBOSE=1 all


          Also you might want to read this: http://lzsiga.users.sourceforge.net/aix-linking.html#Q0025






          share|improve this answer













          Something like this:



          export CFLAGS=...
          export CXXFLAGS=...
          export LDFLAGS='... -Wl,-bbigtoc'

          ./bootstrap ... --verbose

          make VERBOSE=1 all


          Also you might want to read this: http://lzsiga.users.sourceforge.net/aix-linking.html#Q0025







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 26 '18 at 8:51









          Lorinczy ZsigmondLorinczy Zsigmond

          9451716




          9451716













          • Thanks @Lorinczy. CMake is a different beast. It uses its own options and flags scheme. It does not use standard options and flags. If CMake used standard options it would be easy to use it. Instead everything gets passed as a -DCMAKE_<SOME_OPT>=.., which is being ignored during bootstrap.

            – jww
            Dec 8 '18 at 7:50













          • @jww Well, if my suggestion didn't work (though it works for me in AIX6.1, cmake-3.11.4), please provide some details, exactly what did your try, and what errors did you get.

            – Lorinczy Zsigmond
            Dec 8 '18 at 11:54











          • Thanks again Lorinczy. My bad, I was not clear. CMake does not use CC, CXX, CFLAGS, CXXFLAGS,etc. It has its own way of doing things using preprocessor macros.

            – jww
            Dec 8 '18 at 17:06













          • Hi, you might have misunderstood my posts: what I suggested, isn't some random guess, it actually worked for me. Also you should keep in mind that you're building cmake, not building with cmake.

            – Lorinczy Zsigmond
            Dec 8 '18 at 17:21











          • @jww Any success yet?

            – Lorinczy Zsigmond
            Jan 22 at 5:45



















          • Thanks @Lorinczy. CMake is a different beast. It uses its own options and flags scheme. It does not use standard options and flags. If CMake used standard options it would be easy to use it. Instead everything gets passed as a -DCMAKE_<SOME_OPT>=.., which is being ignored during bootstrap.

            – jww
            Dec 8 '18 at 7:50













          • @jww Well, if my suggestion didn't work (though it works for me in AIX6.1, cmake-3.11.4), please provide some details, exactly what did your try, and what errors did you get.

            – Lorinczy Zsigmond
            Dec 8 '18 at 11:54











          • Thanks again Lorinczy. My bad, I was not clear. CMake does not use CC, CXX, CFLAGS, CXXFLAGS,etc. It has its own way of doing things using preprocessor macros.

            – jww
            Dec 8 '18 at 17:06













          • Hi, you might have misunderstood my posts: what I suggested, isn't some random guess, it actually worked for me. Also you should keep in mind that you're building cmake, not building with cmake.

            – Lorinczy Zsigmond
            Dec 8 '18 at 17:21











          • @jww Any success yet?

            – Lorinczy Zsigmond
            Jan 22 at 5:45

















          Thanks @Lorinczy. CMake is a different beast. It uses its own options and flags scheme. It does not use standard options and flags. If CMake used standard options it would be easy to use it. Instead everything gets passed as a -DCMAKE_<SOME_OPT>=.., which is being ignored during bootstrap.

          – jww
          Dec 8 '18 at 7:50







          Thanks @Lorinczy. CMake is a different beast. It uses its own options and flags scheme. It does not use standard options and flags. If CMake used standard options it would be easy to use it. Instead everything gets passed as a -DCMAKE_<SOME_OPT>=.., which is being ignored during bootstrap.

          – jww
          Dec 8 '18 at 7:50















          @jww Well, if my suggestion didn't work (though it works for me in AIX6.1, cmake-3.11.4), please provide some details, exactly what did your try, and what errors did you get.

          – Lorinczy Zsigmond
          Dec 8 '18 at 11:54





          @jww Well, if my suggestion didn't work (though it works for me in AIX6.1, cmake-3.11.4), please provide some details, exactly what did your try, and what errors did you get.

          – Lorinczy Zsigmond
          Dec 8 '18 at 11:54













          Thanks again Lorinczy. My bad, I was not clear. CMake does not use CC, CXX, CFLAGS, CXXFLAGS,etc. It has its own way of doing things using preprocessor macros.

          – jww
          Dec 8 '18 at 17:06







          Thanks again Lorinczy. My bad, I was not clear. CMake does not use CC, CXX, CFLAGS, CXXFLAGS,etc. It has its own way of doing things using preprocessor macros.

          – jww
          Dec 8 '18 at 17:06















          Hi, you might have misunderstood my posts: what I suggested, isn't some random guess, it actually worked for me. Also you should keep in mind that you're building cmake, not building with cmake.

          – Lorinczy Zsigmond
          Dec 8 '18 at 17:21





          Hi, you might have misunderstood my posts: what I suggested, isn't some random guess, it actually worked for me. Also you should keep in mind that you're building cmake, not building with cmake.

          – Lorinczy Zsigmond
          Dec 8 '18 at 17:21













          @jww Any success yet?

          – Lorinczy Zsigmond
          Jan 22 at 5:45





          @jww Any success yet?

          – Lorinczy Zsigmond
          Jan 22 at 5:45




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53472781%2fhow-to-add-linker-option-to-cmake-bootstrap%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          To store a contact into the json file from server.js file using a class in NodeJS

          Redirect URL with Chrome Remote Debugging Android Devices

          Dieringhausen