Pass compiler flags to leveldb make #2311

pull gavinandresen wants to merge 4 commits into bitcoin:master from gavinandresen:master changing 14 files +127 −56
  1. gavinandresen commented at 7:30 PM on February 15, 2013: contributor

    Fixes issue#2288. Includes cleanups from Luke's pull 2243.

    Tested on OSX, Linux, and cross-compiling in gitian.

    "We" should refactor all of the common makefile code into a makefile.common, and include it from the other makefiles. There is an odd mix of CFLAGS / CXXFLAGS / xCXXFLAGS in our makefiles.

  2. Pass compiler flags down into leveldb make
    Fixes issue#2288. Includes cleanups from Luke's pull 2243.
    fbd860287e
  3. Minor build fixes
    Two changes: make some linux-specific linker options linux and linker specific.
    And in the cross-compile environment, prefer the $HOME/qt/bin tools to
    whatever might be somewhere else in the path.
    efb6d9aae7
  4. luke-jr commented at 1:02 AM on February 16, 2013: member

    ACK: tested clean builds of both bitcoin-qt and bitcoind individually with custom CXXFLAGS.

  5. Improve block database load error reporting 398774181a
  6. Merge branch 'loaderror' of git://github.com/sipa/bitcoin 1d83141803
  7. in bitcoin-qt.pro:None in efb6d9aae7 outdated
      28 | @@ -29,19 +29,19 @@ contains(RELEASE, 1) {
      29 |  
      30 |      !win32:!macx {
      31 |          # Linux: static link
      32 | -        LIBS += -Wl,-Bstatic
      33 | +        LIBS += -Wl,-Bstatic -Wl,-z,relro -Wl,-z,now
    


    Diapolo commented at 10:35 AM on February 16, 2013:

    Are you sure all these are Linux only?


    gavinandresen commented at 3:29 PM on February 16, 2013:

    They're definitely not OSX. I don't know if the mingw linker supports them-- can you find out please?


    luke-jr commented at 6:19 PM on February 16, 2013:

    relro at least is an ELF feature, so it doesn't make sense for Mac (Mach) or Windows (PE).


    Diapolo commented at 12:31 PM on February 18, 2013:

    @gavinandresen

    I tried ld -z,relro, which leads to: ld: unrecognized option '-z,relro' and ld -z,now, which leads to: ld: unrecognized option '-z,now'

    So these seem to be non present with MinGW. But before these were a QMAKE_CXXFLAGS and now you are using these with LIBS, which is correct? Just asking, as I don't know better :).

  8. in bitcoin-qt.pro:None in efb6d9aae7 outdated
      28 | @@ -29,19 +29,19 @@ contains(RELEASE, 1) {
      29 |  
      30 |      !win32:!macx {
      31 |          # Linux: static link
      32 | -        LIBS += -Wl,-Bstatic
      33 | +        LIBS += -Wl,-Bstatic -Wl,-z,relro -Wl,-z,now
      34 | +        # for extra security (see: https://wiki.debian.org/Hardening)
      35 | +        QMAKE_CXXFLAGS *= -D_FORTIFY_SOURCE=2
    


    Diapolo commented at 12:34 PM on February 18, 2013:

    From what I read after a quick websearch, this seems to be available to MinGW, as other projects are using that one also with MinGW.


    Diapolo commented at 6:08 AM on February 19, 2013:

    @gavinandresen What was the reason to not consider or comment my comment above?

  9. BitcoinPullTester commented at 4:32 PM on February 18, 2013: none

    Automatic sanity-testing: FAILED BUILD/TEST, see http://jenkins.bluematt.me/pull-tester/1d83141803477f9625e301149fc9611f43f94592 for binaries and test log.

    This could happen for one of several reasons:

    1. It chanages paths in makefile.linux-mingw or otherwise changes build scripts in a way that made them incompatible with the automated testing scripts
    2. It adds/modifies tests which test network rules (thanks for doing that), which conflicts with a patch applied at test time
    3. It does not build on either Linux i386 or Win32 (via MinGW cross compile)
    4. The test suite fails on either Linux i386 or Win32
    5. The block test-cases failed (lookup the first bNN identifier which failed in https://github.com/TheBlueMatt/test-scripts/blob/master/FullBlockTestGenerator.java)

    If you believe this to be in error, please ping BlueMatt on freenode or TheBlueMatt here.

  10. gavinandresen referenced this in commit 1c3924df37 on Feb 18, 2013
  11. gavinandresen merged this on Feb 18, 2013
  12. gavinandresen closed this on Feb 18, 2013

  13. laudney referenced this in commit e2a5707ced on Mar 19, 2014
  14. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 18:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me