[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: --as-needed problem
From:       Thiago Macieira <thiago.macieira () kdemail ! net>
Date:       2004-12-02 15:32:18
Message-ID: 200412021332.19715.thiago.macieira () kdemail ! net
[Download RAW message or body]

[Attachment #2 (multipart/mixed)]


Lubos Lunak wrote:
> Has this been fixed finally? I did a new build on my home machine
> yesterday, and I again got this error (the previous build had been done
> more than a month ago).

I fixed it, but my solution has not been committed.

See http://lists.kde.org/?l=kde-core-devel&m=110107943726977&w=2 for the 
discussion. I am sending the patch again because admin/ has been modified 
since then.

-- 
  Thiago Macieira  -  Registered Linux user #65028
   thiago (AT) macieira (DOT) info
    ICQ UIN: 1967141   PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

["as_needed-fix.diff" (text/x-diff)]

Index: acinclude.m4.in
===================================================================
RCS file: /home/kde/kde-common/admin/acinclude.m4.in,v
retrieving revision 2.485
diff -u -3 -p -r2.485 acinclude.m4.in
--- acinclude.m4.in	26 Nov 2004 11:59:46 -0000	2.485
+++ acinclude.m4.in	2 Dec 2004 00:36:48 -0000
@@ -979,7 +979,7 @@ if test -z "$kde_x_libraries" || test "x
   X_LDFLAGS="-L$x_libraries"
 fi
 all_includes="$X_INCLUDES"
-all_libraries="$X_LDFLAGS $LDFLAGS_AS_NEEDED"
+all_libraries="$X_LDFLAGS $LDFLAGS_AS_NEEDED $LDFLAGS_NEW_DTAGS"
 
 # Check for libraries that X11R6 Xt/Xaw programs need.
 ac_save_LDFLAGS="$LDFLAGS"
@@ -1691,12 +1691,23 @@ AC_DEFUN([KDE_CHECK_CLOSURE],
   AC_SUBST(KDE_NO_UNDEFINED)
 ])
 
+dnl Check if the linker supports --enable-new-dtags
+AC_DEFUN([KDE_CHECK_NEW_DTAGS],
+[
+  LDFLAGS_NEW_DTAGS=""
+  KDE_CHECK_COMPILER_FLAG([Wl,--enable-new-dtags],
+       [LDFLAGS_NEW_DTAGS="-Wl,--enable-new-dtags"],)
+  AC_SUBST(LDFLAGS_NEW_DTAGS)
+])
+
 dnl Check for the linker if it supports --as-needed
 AC_DEFUN([KDE_CHECK_AS_NEEDED],
 [
+  KDE_CHECK_NEW_DTAGS
+
   AC_ARG_ENABLE(as_needed,
 		AC_HELP_STRING([--disable-as-needed],[disable the --as-needed flag for the linker]),
-  	kde_use_as_needed=$enableval, kde_use_as_needed=yes)
+  	kde_use_as_needed=$enableval, kde_use_as_needed=$kde_cv_prog_cxx_Wl___enable_new_dtags)
 
   LDFLAGS_AS_NEEDED=""
   if test "x$kde_use_as_needed" = "xyes"; then
Index: ltmain.sh
===================================================================
RCS file: /home/kde/kde-common/admin/ltmain.sh,v
retrieving revision 1.65
diff -u -3 -p -r1.65 ltmain.sh
--- ltmain.sh	15 Jun 2004 16:47:06 -0000	1.65
+++ ltmain.sh	2 Dec 2004 00:36:50 -0000
@@ -4896,18 +4896,13 @@ else
 "
 	  ;;
 
-	*-*-freebsd* )
+	*)
 	  # Need to set LD_LIBRARY_PATH, to the value already
 	  # computed within libtool.
 	  $echo >> $output "\
       LD_LIBRARY_PATH=\"$rpath\" exec \$progdir/\$program \${1+\"\$@\"}
 "
 	  ;;
-	*)
-	  $echo >> $output "\
-      exec \$progdir/\$program \${1+\"\$@\"}
-"
-	  ;;
 	esac
 	$echo >> $output "\
       \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"

[Attachment #6 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic