Ticket #47498: patch-SConstruct.diff

File patch-SConstruct.diff, 2.3 KB (added by jmroot (Joshua Root), 10 years ago)
  • SConstruct

    old new  
    522522            # here; it's a security risk.  At install time we use
    523523            # chrpath to edit this out of RPATH.
    524524            env.Prepend(RPATH=[os.path.realpath(os.curdir)])
    525         else:
     525        elif env.subst('$PLATFORM') != 'darwin':
    526526            print "chrpath is not available; please build with chrpath=no."
    527527
    528528    confdefs = ["/* gpsd_config.h.  Generated by scons, do not hand-hack.  */\n"]
     
    747747# ifdef __cplusplus
    748748extern "C" {
    749749# endif
    750 #ifndef clockid_t
     750#ifndef CLOCKID_T_DEFINED
    751751typedef int clockid_t;
     752#define CLOCKID_T_DEFINED
    752753# endif
    753754/* OS X uses _STRUCT_TIMESPEC, but no clock_gettime */
    754755#ifndef _STRUCT_TIMESPEC
     
    922923        ilib_suffix = '.' + version + shlib_suffix
    923924        shlink_flags += [ '-current_version', '%s' % version,
    924925                          '-compatibility_version', '%s' % version,
     926                          '-install_name', '%s/%s/lib%s.%s.dylib' % (env['prefix'], env['libdir'], libname, '%s' % version),
    925927                          '-undefined', 'dynamic_lookup' ]
    926928
    927929    ilib = env.SharedLibrary(libname,lib_objs,
     
    11481150        basecflags += ' -coverage'
    11491151        ldflags += ' -coverage'
    11501152        ldshared += ' -coverage'
    1151     # in case CC/CXX was set to the scan-build wrapper,
    1152     # ensure that we build the python modules with scan-build, too
    1153     if env['CC'] is None or env['CC'].find('scan-build') < 0:
    1154         python_env['CC'] = cc
    1155     else:
    1156         python_env['CC'] = ' '.join([env['CC']] + cc.split()[1:])
    1157     if env['CXX'] is None or env['CXX'].find('scan-build') < 0:
    1158         python_env['CXX'] = cxx
    1159     else:
    1160         python_env['CXX'] = ' '.join([env['CXX']] + cxx.split()[1:])
    11611153
     1154    ldshared=ldshared.replace(cc, env['CC'])
    11621155    ldshared=ldshared.replace('-fPIE', '')
    11631156    ldshared=ldshared.replace('-pie', '')
    11641157    python_env.Replace(SHLINKFLAGS=[],
     
    13971390if qt_env:
    13981391    binaryinstall.append(LibraryInstall(qt_env, installdir('libdir'), compiled_qgpsmmlib))
    13991392
    1400 if env["shared"] and env["chrpath"]:
     1393if env["shared"] and env.subst('$PLATFORM') != 'darwin':
    14011394    env.AddPostAction(binaryinstall, '$CHRPATH -r "%s" "$TARGET"' \
    14021395                      % (installdir('libdir', False), ))
    14031396