Switched to upstream patch fixing building with distro's LDFLAGS

Related: rhbz#1543490
This commit is contained in:
Jaroslav Škarvada 2018-04-25 12:33:33 +02:00
parent 86624e877d
commit 08856a3a47
2 changed files with 107 additions and 7 deletions

View File

@ -1,13 +1,108 @@
From bc609b45ee5b44247d528e9462cb28792753a267 Mon Sep 17 00:00:00 2001
From: Dave Mielke <dave@mielke.cc>
Date: Tue, 24 Apr 2018 17:41:28 -0400
Subject: [PATCH] The distribution-supplied LDFLAGS should also be used when
making shared objects. (dm)
---
configure.ac | 73 +++++++++++++++++++++++++++++++-----------------------------
1 file changed, 38 insertions(+), 35 deletions(-)
diff --git a/configure.ac b/configure.ac
index 7d93d8b..d016148 100644
index 906a8f632..4e8b0ccb7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -459,7 +459,7 @@ in
@@ -377,7 +377,7 @@ in
solaris* ) LDFLAGS_DYNAMIC="";;
*) AC_MSG_ERROR([dynamic linkage not supported for ${host_os}]);;
esac
-LDFLAGS_DYNAMIC="${LDFLAGS} BRLTTY_OPTIONS_LD2CC([${LDFLAGS_DYNAMIC}])"
+LDFLAGS_DYNAMIC="BRLTTY_OPTIONS_LD2CC([${LDFLAGS_DYNAMIC}])"
if test "${GCC}" = "yes"
then
@@ -404,6 +404,7 @@ else
fi
pkgconfig_flags_libs="--libs"
+
BRLTTY_ARG_ENABLE(
[standalone-programs],
[statically linked executables],
@@ -429,40 +430,42 @@ test "${DOXYGEN}" = "false" && can_make_BrlAPIref=no || can_make_BrlAPIref=yes
AC_SUBST([can_make_BrlAPIref])
AC_CACHE_CHECK([for shared object creation command], [brltty_cv_prog_make_object_shared], [dnl
-case "${host_os}"
-in
- linux*|gnu*|openbsd*|freebsd*|kfreebsd*|netbsd*|*qnx*|cygwin*|mingw*|elf*)
- brltty_mkshr_ld_make="-shared"
- ;;
- solaris*)
- brltty_mkshr_ld_make="-G"
- ;;
- hpux*)
- brltty_mkshr_ld_make="-b"
- ;;
- osf*)
- brltty_mkshr_ld_make="-shared"
- ;;
- darwin*)
- brltty_mkshr_ld_make="-bundle"
- brltty_mkshr_ld_options="-flat_namespace -undefined suppress"
- brltty_mkshr_gcc_make="-bundle"
- ;;
- msdos*)
- brltty_mkshr_ld_make="not_supported_on_msdos"
- brltty_mkshr_ld_options="not_supported_on_msdos"
- brltty_mkshr_gcc_make="not_supported_on_msdos"
- ;;
- *)
- AC_MSG_ERROR([loadable module creation command not configured for ${host_os}])
- ;;
-esac
-if test "${GCC}" = "yes"
-then
- brltty_cv_prog_make_object_shared="\$(CC) ${brltty_mkshr_gcc_make=-shared} BRLTTY_OPTIONS_LD2CC([${brltty_mkshr_ld_options}]) -o"
+ brltty_cv_prog_make_object_shared="\$(CC) ${brltty_mkshr_gcc_make=-shared} ${LDFLAGS_DYNAMIC} BRLTTY_OPTIONS_LD2CC([${brltty_mkshr_ld_options}]) -o"
else
brltty_cv_prog_make_object_shared="\$(LD) ${brltty_mkshr_ld_make} ${brltty_mkshr_ld_options} -o"
fi])
-else
- brltty_cv_prog_make_object_shared="\$(LD) ${brltty_mkshr_ld_make} ${brltty_mkshr_ld_options} -o"
-fi])
+ case "${host_os}"
+ in
+ linux*|gnu*|openbsd*|freebsd*|kfreebsd*|netbsd*|*qnx*|cygwin*|mingw*|elf*)
+ brltty_mkshr_ld_make="-shared"
+ ;;
+ solaris*)
+ brltty_mkshr_ld_make="-G"
+ ;;
+ hpux*)
+ brltty_mkshr_ld_make="-b"
+ ;;
+ osf*)
+ brltty_mkshr_ld_make="-shared"
+ ;;
+ darwin*)
+ brltty_mkshr_ld_make="-bundle"
+ brltty_mkshr_ld_options="-flat_namespace -undefined suppress"
+ brltty_mkshr_gcc_make="-bundle"
+ ;;
+ *)
+ AC_MSG_ERROR([loadable module creation command not configured for ${host_os}])
+ brltty_mkshr_ld_make="NOT_SUPPORTED"
+ brltty_mkshr_ld_options="NOT_SUPPORTED"
+ brltty_mkshr_gcc_make="NOT_SUPPORTED"
+ ;;
+ esac
+
+ if test "${GCC}" = "yes"
+ then
+ brltty_cv_prog_make_object_shared="\$(CC) ${brltty_mkshr_gcc_make=-shared} BRLTTY_OPTIONS_LD2CC([${brltty_mkshr_ld_options}])"
+ else
+ brltty_cv_prog_make_object_shared="\$(LD) ${brltty_mkshr_ld_make} ${brltty_mkshr_ld_options}"
+ fi
+
+ brltty_cv_prog_make_object_shared="${brltty_cv_prog_make_object_shared} ${LDFLAGS} -o"
+])
AC_SUBST([MKSHR], ["${brltty_cv_prog_make_object_shared}"])
AC_CACHE_CHECK([for make relocatable object command], [brltty_cv_prog_make_object_relocatable], [dnl

View File

@ -33,7 +33,7 @@
Name: brltty
Version: %{pkg_version}
Release: 8%{?dist}
Release: 9%{?dist}
License: LGPLv2+
URL: http://mielke.cc/brltty/
Source0: http://mielke.cc/brltty/archive/%{name}-%{version}.tar.xz
@ -43,6 +43,7 @@ Patch1: brltty-loadLibrary.patch
Patch2: brltty-5.0-libspeechd.patch
# Upstream patch (commits 9476bc50dc8 and 796fb282e3):
Patch3: 0001-Add-support-for-eSpeak-NG.patch
# https://github.com/brltty/brltty/commit/bc609b45ee5b44247d528e9462cb28792753a267
Patch4: brltty-5.6-libs-add-ldflags.patch
Summary: Braille display driver for Linux/Unix
BuildRequires: byacc, glibc-kernheaders, bluez-libs-devel, systemd
@ -510,6 +511,10 @@ fi
%endif
%changelog
* Wed Apr 25 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 5.6-9
- Switched to upstream patch fixing building with distro's LDFLAGS
Related: rhbz#1543490
* Tue Apr 24 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 5.6-8
- Build with distro's LDFLAGS
Related: rhbz#1543490