Browse Source

sendmail: link with gcc instead of ld

If ld is used directly to link libmilter.so, linking is not done
correctly with glibc, and produces a library that can't be used.
Linking with the bad library produces a strange error:
ld: conftest: hidden symbol `stat' in [...]libc_nonshared.a(stat.oS)
is referenced by DSO

Using ld with musl works fine, but using gcc is a more portable way of
linking the shared library anyway.

Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
lilik-openwrt-22.03
Eneas U de Queiroz 7 years ago
committed by Rosen Penev
parent
commit
213fd4f64b
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      mail/sendmail/files/OpenWrt
  2. +1
    -1
      mail/sendmail/files/sharedlibrary.m4

+ 1
- 1
mail/sendmail/files/OpenWrt View File

@ -13,7 +13,7 @@ APPENDDEF(`confLIBSEARCH', `crypt')
define(`confMTCCOPTS', `-D_REENTRANT') define(`confMTCCOPTS', `-D_REENTRANT')
define(`confMTLDOPTS', `-lpthread') define(`confMTLDOPTS', `-lpthread')
define(`confLDOPTS_SO', `-shared') define(`confLDOPTS_SO', `-shared')
define(`confSONAME',`-soname')
define(`confSONAME',`-Wl,-soname')
define(`currentuser', esyscmd(`id -nu')) define(`currentuser', esyscmd(`id -nu'))
define(`currentgroup', esyscmd(`id -ng')) define(`currentgroup', esyscmd(`id -ng'))


+ 1
- 1
mail/sendmail/files/sharedlibrary.m4 View File

@ -9,7 +9,7 @@ include(confBUILDTOOLSDIR`/M4/'bldM4_TYPE_DIR`/defines.m4')
divert(bldTARGETS_SECTION) divert(bldTARGETS_SECTION)
bldCURRENT_PRODUCT.so.confSOVER: ${BEFORE} ${bldCURRENT_PRODUCT`OBJS'} bldCURRENT_PRODUCT.so.confSOVER: ${BEFORE} ${bldCURRENT_PRODUCT`OBJS'}
${LD} ${LDOPTS_SO} -o bldCURRENT_PRODUCT.so.confSOVER confSONAME bldCURRENT_PRODUCT.so.confSOVER ${bldCURRENT_PRODUCT`OBJS'}
${CC} ${LDOPTS_SO} -o bldCURRENT_PRODUCT.so.confSOVER confSONAME,bldCURRENT_PRODUCT.so.confSOVER ${bldCURRENT_PRODUCT`OBJS'}
ifdef(`bldLINK_SOURCES', `bldMAKE_SOURCE_LINKS(bldLINK_SOURCES)') ifdef(`bldLINK_SOURCES', `bldMAKE_SOURCE_LINKS(bldLINK_SOURCES)')
install-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT.so.confSOVER install-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT.so.confSOVER


Loading…
Cancel
Save