[4/8] intl: turn LIBINTL into -L / -l form

Message ID 20210208111635.74970-5-nick.alcock@oracle.com
State New
Headers show
Series
  • [1/8] intl: Allow building both with old bison and bison >= 3 [PR92008]
Related show

Commit Message

Nick Clifton via Binutils Feb. 8, 2021, 11:16 a.m.
This variable currently refers directly, not to a .la file, but to an .a
file.  This produces wrong results when building into a library on some
platforms: so convert it to the general form "-L${top_builddir}../intl
-lintl ..." ... so that both libtool and non-libtool builds will always
do the right thing for both static and shared links.

Cc: gcc-patches@gnu.org

intl/ChangeLog
2021-02-04  Nick Alcock  <nick.alcock@oracle.com>

	* configure.ac (LIBINTL): Transform into -L/-lintl form.
	* configure: Regenerate.
---
 intl/configure    | 3 +--
 intl/configure.ac | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

-- 
2.30.0.252.gc27e85e57d

Comments

Nick Clifton via Binutils Feb. 10, 2021, 8:05 a.m. | #1
On Mon, Feb 08, 2021 at 11:16:31AM +0000, Nick Alcock via Binutils wrote:
> intl/ChangeLog

> 2021-02-04  Nick Alcock  <nick.alcock@oracle.com>

> 

> 	* configure.ac (LIBINTL): Transform into -L/-lintl form.

> 	* configure: Regenerate.


OK for binutils.

-- 
Alan Modra
Australia Development Lab, IBM

Patch

diff --git a/intl/configure b/intl/configure
index 6498a392570..7ddb624249d 100755
--- a/intl/configure
+++ b/intl/configure
@@ -6787,8 +6787,7 @@  LIBINTL_DEP=
 INCINTL=
 case $USE_INCLUDED_LIBINTL in
   yes)
-    LIBINTL=`echo $LIBINTL | sed 's,${top_builddir},&/..,' `
-    LTLIBINTL=`echo $LTLIBINTL | sed 's,${top_builddir},&/..,' `
+    LIBINTL=`echo $LIBINTL | sed 's,${top_builddir},-L&/..,; s,\.\./intl/libintl\.a,../intl -lintl,' `
     LIBINTL_DEP='${top_builddir}/../intl/libintl.a'
     INCINTL='-I${top_builddir}/../intl'
     ;;
diff --git a/intl/configure.ac b/intl/configure.ac
index 5ec7b0944e2..77e2fd2d8c5 100644
--- a/intl/configure.ac
+++ b/intl/configure.ac
@@ -40,8 +40,7 @@  LIBINTL_DEP=
 INCINTL=
 case $USE_INCLUDED_LIBINTL in
   yes)
-    LIBINTL=`echo $LIBINTL | sed 's,${top_builddir},&/..,' `
-    LTLIBINTL=`echo $LTLIBINTL | sed 's,${top_builddir},&/..,' `
+    LIBINTL=`echo $LIBINTL | sed 's,${top_builddir},-L&/..,; s,\.\./intl/libintl\.a,../intl -lintl,' `
     LIBINTL_DEP='${top_builddir}/../intl/libintl.a'
     INCINTL='-I${top_builddir}/../intl'
     ;;