dev-lang/xsb: fix --Wl,--dynamic-linker typo

Add some extra '|| die' while here. Eli actually fixed one typo in this
configure check already in 3e2a234b2b.

Bug: https://bugs.gentoo.org/870970
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2025-09-14 08:10:33 +01:00
parent fcd9b2c3d8
commit c3d9e65b97
2 changed files with 58 additions and 12 deletions

View File

@@ -0,0 +1,45 @@
-Wl,-export-dynamic tells the linker we want an entry point of 'xport-dynamic'.
Fix the typo accordingly.
--- a/build/configure.in
+++ b/build/configure.in
@@ -1343,10 +1343,10 @@ else
fi
-####### Test for -export-dynamic option of ld
+####### Test for --export-dynamic option of ld
TEMP_LDFLAGS=$LDFLAGS
-LDFLAGS="-Wl,-export-dynamic"
-AC_MSG_CHECKING([whether loader understands -Wl,-export-dynamic])
+LDFLAGS="-Wl,--export-dynamic"
+AC_MSG_CHECKING([whether loader understands -Wl,--export-dynamic])
# Ideally we should use AC_LINK_IFELSE instead of the obsolete AC_TRY_LINK
#AC_TRY_LINK([],[], __export_dynamic=yes, __export_dynamic=no)
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(){return 0;}]])], __export_dynamic=yes, __export_dynamic=no)
@@ -1402,7 +1402,7 @@ case "$canonical" in
LDFLAGS="${LDFLAGS} -ldl"
if test "$__export_dynamic" = "yes" ; then
- LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
+ LDFLAGS="${LDFLAGS} -Wl,--export-dynamic"
fi
fi
@@ -1416,7 +1416,7 @@ case "$canonical" in
*freebsd* ) AC_DEFINE(FREEBSD)
AC_DEFINE(FOREIGN_ELF)
if test "$__export_dynamic" = "yes" ; then
- LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
+ LDFLAGS="${LDFLAGS} -Wl,--export-dynamic"
fi
if test "${have_dl}" = yes ; then
@@ -1498,7 +1498,7 @@ case "$canonical" in
LDFLAGS="-lsocket ${LDFLAGS}"
if test "$__export_dynamic" = "yes" ; then
- LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
+ LDFLAGS="${LDFLAGS} -Wl,--export-dynamic"
fi
if test "${have_socket}" = "no" ; then
AC_MSG_ERROR(Your system is missing library: \`socket')

View File

@@ -37,11 +37,12 @@ PATCHES=(
"${FILESDIR}"/0001-modern-C-fix-for-implicit-int.patch
"${FILESDIR}"/xsb-4.0.0-gcc14-build-fix.patch
"${FILESDIR}"/xsb-4.0.0-gcc14-sql.patch
"${FILESDIR}"/xsb-4.0.0-ld-typo.patch
)
src_prepare() {
default
cd "${S}"/build
cd "${S}"/build || die
eautoconf
if use mariadb ; then
@@ -63,7 +64,7 @@ src_configure() {
append-flags -fno-strict-aliasing
filter-lto
cd "${S}"/build
cd "${S}"/build || die
econf \
--prefix=/usr/$(get_libdir) \
@@ -76,42 +77,42 @@ src_configure() {
$(use_enable debug)
if use curl ; then
cd "${S}"/packages/curl
cd "${S}"/packages/curl || die
econf
fi
if use mysql || use mariadb ; then
local impl=$(usex mariadb mariadb mysql)
cd "${S}"/packages/dbdrivers/mysql
cd "${S}"/packages/dbdrivers/mysql || die
econf \
--with-mysql-incdir=/usr/include/${impl}
fi
if use odbc ; then
cd "${S}"/packages/dbdrivers/odbc
cd "${S}"/packages/dbdrivers/odbc || die
econf
fi
if use pcre ; then
cd "${S}"/packages/pcre
cd "${S}"/packages/pcre || die
econf
fi
if use xml ; then
cd "${S}"/packages/xpath
cd "${S}"/packages/xpath || die
econf
fi
}
src_compile() {
cd "${S}"/build
cd "${S}"/build || die
default
# All XSB Packages are compiled using a single Prolog engine.
# Consequently they must all be compiled using a single make job.
cd "${S}"/packages
cd "${S}"/packages || die
rm -f *.xwam
emake -j1
@@ -137,13 +138,13 @@ src_compile() {
}
src_install() {
cd "${S}"/build
cd "${S}"/build || die
default
local XSB_INSTALL_DIR=/usr/$(get_libdir)/xsb-${PV}
dosym ${XSB_INSTALL_DIR}/bin/xsb /usr/bin/xsb
cd "${S}"/packages
cd "${S}"/packages || die
local PACKAGES=${XSB_INSTALL_DIR}/packages
insinto ${PACKAGES}
doins *.xwam
@@ -220,6 +221,6 @@ src_install() {
doins pcre/cc/*.H
fi
cd "${S}"
cd "${S}" || die
dodoc FAQ README
}