Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 390981 | Differences between
and this patch

Collapse All | Expand All

(-)a/SConstruct (-3 / +5 lines)
Lines 688-702 if nix: Link Here
688
        env["CXX"] = "distcc " + env["CXX"]
688
        env["CXX"] = "distcc " + env["CXX"]
689
        
689
        
690
    # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. 
690
    # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. 
691
    env.Append( CPPFLAGS="-fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch" )
691
    env.Append( CPPFLAGS="-fPIC -fno-strict-aliasing -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch" )
692
    # env.Append( " -Wconversion" ) TODO: this doesn't really work yet
692
    # env.Append( " -Wconversion" ) TODO: this doesn't really work yet
693
    if linux:
693
    if linux:
694
        env.Append( CPPFLAGS=" -Werror " )
695
        if not has_option('clang'): 
694
        if not has_option('clang'): 
696
            env.Append( CPPFLAGS=" -fno-builtin-memcmp " ) # glibc's memcmp is faster than gcc's
695
            env.Append( CPPFLAGS=" -fno-builtin-memcmp " ) # glibc's memcmp is faster than gcc's
697
696
698
    env.Append( CPPDEFINES="_FILE_OFFSET_BITS=64" )
697
    env.Append( CPPDEFINES="_FILE_OFFSET_BITS=64" )
698
    env.Append( CXXFLAGS=os.environ['CXXFLAGS'])
699
    env.Append( CXXFLAGS=" -Wnon-virtual-dtor " )
699
    env.Append( CXXFLAGS=" -Wnon-virtual-dtor " )
700
    env.Append( LINKFLAGS=os.environ['LDFLAGS'] )
700
    env.Append( LINKFLAGS=" -fPIC -pthread -rdynamic" )
701
    env.Append( LINKFLAGS=" -fPIC -pthread -rdynamic" )
701
    env.Append( LIBS=[] )
702
    env.Append( LIBS=[] )
702
703
Lines 706-717 if nix: Link Here
706
707
707
    if linux and has_option( "sharedclient" ):
708
    if linux and has_option( "sharedclient" ):
708
        env.Append( LINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " )
709
        env.Append( LINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " )
710
        env.Append( SHLINKFLAGS=" -Wl,-soname=libmongoclient.so " )
709
711
710
    if debugBuild:
712
    if debugBuild:
711
        env.Append( CPPFLAGS=" -O0 -fstack-protector " );
713
        env.Append( CPPFLAGS=" -O0 -fstack-protector " );
712
        env['ENV']['GLIBCXX_FORCE_NEW'] = 1; # play nice with valgrind
714
        env['ENV']['GLIBCXX_FORCE_NEW'] = 1; # play nice with valgrind
713
    else:
715
    else:
714
        env.Append( CPPFLAGS=" -O3 " )
716
        env.Append( CXXFLAGS=" -O3 " )
715
        #env.Append( CPPFLAGS=" -fprofile-generate" )
717
        #env.Append( CPPFLAGS=" -fprofile-generate" )
716
        #env.Append( LINKFLAGS=" -fprofile-generate" )
718
        #env.Append( LINKFLAGS=" -fprofile-generate" )
717
        # then:
719
        # then:

Return to bug 390981