------- Additional Comments From viskovatoff at imap dot cc 2009-07-31 15:39 ------- Created an attachment (id=4102) --> (http://sourceware.org/bugzilla/attachment.cgi?id=4102&action=view) Make GAS with a Solaris target treat '/' as it does for other *nixes
>From the above comments it's fairly clear that the reason this "bug" exists is that the Sus x86 Assembly Language Reference Manual states that '/' should be treated as starting comments. I would like to suggest that requiring GAS to adhere to that specification for Solaris targets is to misunderstand the role that GAS plays in the Solaris world. People who run Solaris who use GAS do not use it to assemble code that was written for the Sun assembler. They use it in the process of porting code that was written for the GNU assembler, typically with Linux targets, to Solaris. Making the default behavior of GAS with a Solaris target to treat '/' as starting a comment makes porting software from GNU/Linux to Solaris more difficult and cumbersome. I propose changing the default behavior of GAS with a Solaris target when it comes to '/' to be the same as it is for Linux and other Unixes such as FreeBSD and NetBSD. I have attached a patch, called svr4-comment.diff, which changes the default behavior of GAS for Solaris to conform to that of other *nix targets, and adds an option, called "svr4-comments", which changes the behavior back to the present one. This patch is modeled after the code for the "--divide" option. I've tested the patch under the current development release of OpenSolaris, snv_118, on an X64 system. The issue of GAS producing errors for a Solaris target when '/' is used to indicate division comes up repeatedly in forums and mailing lists. When the reason for this behavior is finally discovered, it is difficult to get maintainers of the code in question to accept a Solaris-specific patch to get around it, apparently because maintainers find that the need for such a patch is just too bizarre. I've floated this proposal to change the default behavior on the OpenSolaris.org forums, and the response was that making GAS for Solaris targets adhere to the archaic Sun convention for comments as opposed to conform to the rest of the *nix world is wrong. Also, it was felt that modifying any existing code that is part of Solaris or OpenSolaris which uses '/' to indicate comments and which is assembled using GAS instead of the Sun assembler (if there is such code) to use the new proposed option would not be a significant burden. I hope the maintainers will look positively on this proposal. Its acceptance would make life in the Solaris world easier. -- http://sourceware.org/bugzilla/show_bug.cgi?id=4572 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils