[gtk-doc] scanners: reorder again and add work-around for --as-needed brokeness



commit 038257110b31546ab7a0b03e314e56e494499b6f
Author: Stefan Kost <ensonic users sf net>
Date:   Sun May 9 23:11:27 2010 +0300

    scanners: reorder again and add work-around for --as-needed brokeness
    
    We want to have the objects first, then the libs and the target last. For
    historic reasons ldflags and libs are merged :/. Ideally we'd like to turn
    off as-needed in the docs (won't help here anyway), but I am not sure
    wheter its a good idea to add "-Wl,--no-as-needed" to the linker command
    (in regard to platform compat).

 gtkdoc-scangobj.in |    4 +++-
 gtkdoc-scanobj.in  |    4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gtkdoc-scangobj.in b/gtkdoc-scangobj.in
index da08dad..3ab9828 100644
--- a/gtkdoc-scangobj.in
+++ b/gtkdoc-scangobj.in
@@ -1601,7 +1601,9 @@ $command = "$CC $CFLAGS -c -o $o_file $MODULE-scan.c";
 system("($command)") == 0 or die "Compilation of scanner failed: $!\n";
 
 print "gtk-doc: Linking scanner\n";
-$command = "$LD $LDFLAGS -o $MODULE-scan $o_file";
+# FIXME: Can we turn off as-needed for the docs (or better fix it?)
+#$command = "$LD -Wl,--no-as-needed $o_file $LDFLAGS -o $MODULE-scan";
+$command = "$LD $o_file $LDFLAGS -o $MODULE-scan";
 system("($command)") == 0 or die "Linking of scanner failed: $!\n";
 
 print "gtk-doc: Running scanner $MODULE-scan\n";
diff --git a/gtkdoc-scanobj.in b/gtkdoc-scanobj.in
index e26ceba..96d7902 100755
--- a/gtkdoc-scanobj.in
+++ b/gtkdoc-scanobj.in
@@ -841,7 +841,9 @@ $command = "$CC $CFLAGS -c -o $o_file $MODULE-scan.c";
 system("($command)") == 0 or die "Compilation of scanner failed: $!\n";
 
 print "gtk-doc: Linking scanner\n";
-$command = "$LD $LDFLAGS -o $MODULE-scan $o_file";
+# FIXME: Can we turn off as-needed for the docs (or better fix it?)
+#$command = "$LD -Wl,--no-as-needed $o_file $LDFLAGS -o $MODULE-scan";
+$command = "$LD $o_file $LDFLAGS -o $MODULE-scan";
 system("($command)") == 0 or die "Linking of scanner failed: $!\n";
 
 print "gtk-doc: Running scanner $MODULE-scan\n";



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]