code: def generate(env):
      
      link.generate(env)
  
      if env['PLATFORM'] == 'hpux':
          env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -shared -fPIC')
  
      # __RPATH is set to $_RPATH in the platform specification if that
      # platform supports it.
      env['RPATHPREFIX'] = '-Wl,-rpath='
      env['RPATHSUFFIX'] = ''
      env['_RPATH'] = '${_concat(RPATHPREFIX, RPATH, RPATHSUFFIX, __env__)}'
  
      # OpenBSD doesn't usually use SONAME for libraries
      use_soname = not sys.platform.startswith('openbsd')
      link._setup_versioned_lib_variables(env, tool = 'gnulink', use_soname = use_soname)
      env['LINKCALLBACKS'] = link._versioned_lib_callbacks()
  
      # For backward-compatibility with older SCons versions
      env['SHLIBVERSIONFLAGS'] = SCons.Util.CLVar('-Wl,-Bsymbolic')
docs: Add Builders and construction variables for gnulink to an Environment.