SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
|
@ -0,0 +1,44 @@
|
|||
1. Sort -L flags to unbreak linking when any other version of Samba is installed.
|
||||
|
||||
2. Use -Wl,-no-undefined as on other platforms.
|
||||
|
||||
Index: buildtools/wafsamba/samba_autoconf.py
|
||||
--- buildtools/wafsamba/samba_autoconf.py.orig
|
||||
+++ buildtools/wafsamba/samba_autoconf.py
|
||||
@@ -922,6 +922,27 @@ def ADD_LDFLAGS(conf, flags, testflags=False):
|
||||
if not 'EXTRA_LDFLAGS' in conf.env:
|
||||
conf.env['EXTRA_LDFLAGS'] = []
|
||||
conf.env['EXTRA_LDFLAGS'].extend(TO_LIST(flags))
|
||||
+
|
||||
+ ''' Make sure things go in order:
|
||||
+ 1. Local -L and -rpath flags
|
||||
+ 2. External -L and -rpath flags
|
||||
+ 3. Others
|
||||
+ '''
|
||||
+ localL = []
|
||||
+ extL = []
|
||||
+ other = []
|
||||
+ for f in conf.env['EXTRA_LDFLAGS']:
|
||||
+ if f.startswith("-L%s" % "/usr/ports"):
|
||||
+ localL.extend( [ f ] )
|
||||
+ elif f.startswith("-L"):
|
||||
+ extL.extend( [ f ] )
|
||||
+ else:
|
||||
+ other.extend( [ f ] )
|
||||
+ conf.env['EXTRA_LDFLAGS'] = []
|
||||
+ conf.env['EXTRA_LDFLAGS'].extend(localL)
|
||||
+ conf.env['EXTRA_LDFLAGS'].extend(extL)
|
||||
+ conf.env['EXTRA_LDFLAGS'].extend(other)
|
||||
+
|
||||
return flags
|
||||
|
||||
|
||||
@@ -991,7 +1012,7 @@ def SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS(conf):
|
||||
# symbols used for fuzzers are only defined by compiler wrappers.
|
||||
return
|
||||
|
||||
- if not sys.platform.startswith("openbsd"):
|
||||
+ if True:
|
||||
# we don't want any libraries or modules to rely on runtime
|
||||
# resolution of symbols
|
||||
conf.env.undefined_ldflags = conf.ADD_LDFLAGS('-Wl,-no-undefined', testflags=True)
|
Loading…
Add table
Add a link
Reference in a new issue