mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 05:00:09 +01:00
scons: Use -Bsymbolic linker option.
This prevents the error relocation R_X86_64_PC32 against symbol `_gl_DispatchTSD' can not be used when making a shared object; recompile with -fPIC when building on x86_64 architecture.
This commit is contained in:
parent
418987ff05
commit
72ad039d19
1 changed files with 5 additions and 0 deletions
|
|
@ -448,11 +448,15 @@ def generate(env):
|
||||||
|
|
||||||
# Linker options
|
# Linker options
|
||||||
linkflags = []
|
linkflags = []
|
||||||
|
shlinkflags = []
|
||||||
if gcc:
|
if gcc:
|
||||||
if env['machine'] == 'x86':
|
if env['machine'] == 'x86':
|
||||||
linkflags += ['-m32']
|
linkflags += ['-m32']
|
||||||
if env['machine'] == 'x86_64':
|
if env['machine'] == 'x86_64':
|
||||||
linkflags += ['-m64']
|
linkflags += ['-m64']
|
||||||
|
shlinkflags += [
|
||||||
|
'-Wl,-Bsymbolic',
|
||||||
|
]
|
||||||
if platform == 'windows' and msvc:
|
if platform == 'windows' and msvc:
|
||||||
# See also:
|
# See also:
|
||||||
# - http://msdn2.microsoft.com/en-us/library/y0zzbyt4.aspx
|
# - http://msdn2.microsoft.com/en-us/library/y0zzbyt4.aspx
|
||||||
|
|
@ -500,6 +504,7 @@ def generate(env):
|
||||||
'/entry:_DllMainCRTStartup',
|
'/entry:_DllMainCRTStartup',
|
||||||
]
|
]
|
||||||
env.Append(LINKFLAGS = linkflags)
|
env.Append(LINKFLAGS = linkflags)
|
||||||
|
env.Append(SHLINKFLAGS = shlinkflags)
|
||||||
|
|
||||||
# Default libs
|
# Default libs
|
||||||
env.Append(LIBS = [])
|
env.Append(LIBS = [])
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue