This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Revise Windows PECOFF weak symbols


Hi Daniel, Hi Aaron,

+ #
+ # exe_ext
+ #	Returns target executable extension, if any.
+ #
+ proc exe_ext {} {
+     if { [istarget *-*-mingw32] || [istarget *-*-cygwin*] } {
+         return ".exe"
+     } else {
+         return ""
+     }
+ }

This is the best way I could think of for doing this, which should work for Linux also.

Except that Linux hosted cross-compilers, eg for i686-pc-cygwin, have executables without the .exe extension, but the above code checks the cross-compiler's target and not the cross-compiler's host.


istarget corresponds to --target, which does not affect EXE_EXT. There's an ishost; would that work?

Ah - yes that ought to do the trick.


Cheers
  Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]