Bug?: Selection of linker in Build Rules Dialog

Mo DeJong mdejong@cygnus.com
Fri Nov 10 00:08:00 GMT 2000


On Wed, 8 Nov 2000, Reiner Suikat wrote:

> I want to use gcc as linker command to build shared libraries, but
> if I select library as target, it only offers ar, if I select
> executable, it uses g++, which does not behave well in linking
> shared libraries.
> 
> Thanks 
> Reiner

Try out the attached patch. It should apply cleanly to the
4.5.2 release and fix the problem where the linker does
not reflect changes made in the link rules dialog.

Mo DeJong
Red Hat Inc
Index: gui/buildtarget.tcl
===================================================================
RCS file: /cvs/cvsfiles/devo/snavigator/gui/buildtarget.tcl,v
retrieving revision 1.1.2.27.2.9
diff -u -r1.1.2.27.2.9 buildtarget.tcl
--- buildtarget.tcl	2000/02/11 23:48:53	1.1.2.27.2.9
+++ buildtarget.tcl	2000/11/10 08:04:58
@@ -429,6 +429,10 @@
         # Get the link entry point.
 	set LinkerEntryPoint [paf_db_proj get -key "IDELinkEntryPoint$TargetName"]
 
+  	# Get the link command/executable
+        set LinkerApplication [paf_db_proj get\
+	  -key "IDELinkerApplication${TargetName}"]
+
         # Get the defines list
 	# TODO: Get rule type from toolchain
         foreach ruletype "CC CPP JAVA" { 
@@ -493,6 +497,9 @@
         # Store the link entry point.
 	paf_db_proj put "IDELinkEntryPoint$TargetName" $LinkerEntryPoint
 
+ 	# Store the link command/executable
+        paf_db_proj put "IDELinkerApplication${TargetName}" $LinkerApplication
+
         # Store the defines list
 	# TODO: Get rule type from toolchain
         foreach ruletype "CC CPP JAVA" { 
@@ -554,6 +561,9 @@
 
         # delete the link entry point.
         paf_db_proj delete "IDELinkEntryPoint$TargetName"
+
+        # delete the link command/executable
+        paf_db_proj delete "IDELinkerApplication${TargetName}"
 
         # delete the defines list
 	# TODO: Get rule type from toolchain
Index: gui/targetedit.tcl
===================================================================
RCS file: /cvs/cvsfiles/devo/snavigator/gui/targetedit.tcl,v
retrieving revision 1.1.2.49.2.14
diff -u -r1.1.2.49.2.14 targetedit.tcl
--- targetedit.tcl	2000/04/03 21:41:40	1.1.2.49.2.14
+++ targetedit.tcl	2000/11/10 08:04:58
@@ -786,7 +786,7 @@
 	$displaycmdline configure -state disabled
 
         # Get linker 
-        SetLinkerExecutable
+        SetLinkerExecutable [$linkExecLEB.txt get]
 
         # Update the linker command line
 	set cmdline [GetLinkerCommandLine $tchain_obj]


More information about the Sourcenav mailing list