home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / perl / 6890 < prev    next >
Encoding:
Text File  |  1992-11-08  |  4.4 KB  |  104 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!stanford.edu!rock!concert!uvaarpa!mmdf
  3. From: "Mark W. Eichin" <eichin@cygnus.com>
  4. Subject: re: perl 4.035 and Cygnus gcc on Solaris 2.x
  5. Message-ID: <1992Nov7.070710.1681@uvaarpa.Virginia.EDU>
  6. Sender: mmdf@uvaarpa.Virginia.EDU (Mail System)
  7. Reply-To: eichin@cygnus.com
  8. Organization: The Internet
  9. Date: Sat, 7 Nov 1992 07:07:10 GMT
  10. Lines: 92
  11.  
  12.    SUB: perl 4.035 and Cygnus gcc on Solaris 2.x
  13.    SUM: dana@dino.bellcore.com (Dana A. Chee), dana@thumper.bellcore.com->Perl-Users@fuggles.acc.Virginia.EDU
  14.  
  15.    Has anyone gotten perl 4.035 to build with Cygnus gcc on Solaris 2.x
  16.    (Sparc).  I tried by choosing the solaris hints and gcc as my
  17.    compiler.  Right off the bat, it complained that sprintf and malloc had
  18.    conflicting declarations.  Before I start hacking in uncharted turf,
  19.    I'd like to know if anyone else has already been there.
  20.  
  21.    Thanks,
  22.    -- 
  23.  
  24. Here's the email I sent out back when we first released the Solaris
  25. 2.0 port of gcc. It worked fine; the one problem you may be having is
  26. that you're actually using the solaris hints file -- I'd guess that
  27. it's wrong, I didn't use it.
  28.     Hope you find this information useful (especially now that the
  29. CDware CDrom mentioned below is actually available.)
  30.                     _Mark_ <eichin@cygnus.com>
  31.                     Cygnus Support
  32.                     One Kendall Square
  33.                     Cambridge, MA 02138 (617)494-1068
  34.  
  35. :Date: Thu, 23 Jul 92 15:53:34 EDT
  36. :From: "Mark W. Eichin" <eichin@cygnus.com>
  37. :Message-Id: <9207231953.AA29421@tweedledumber.cygnus.com>
  38. :To: Perl-Users@fuggles.acc.Virginia.EDU
  39. :Subject: re: Perl "patches" for solaris 2.0
  40. :Summary: works fine with gcc
  41.  
  42. Briefly:
  43.     I just built perl-4.035 with the recently released GNU C for
  44. Solaris 2. It built at -g -O and passed all tests. I basically
  45. left everything at the default values (including "none" for the hints
  46. file, and "y" for "are the system libraries compiled with gcc" since
  47. that doesn't matter on the sparc w/gcc2.) Be sure to take -lmalloc out
  48. of the libraries list (and add -lm -- there is one supplied with gcc.)
  49.     Cygnus Support and the Free Software Foundation have ported
  50. the GNU C Compiler and GNU Debugger to Sun's Solaris-2 operating
  51. system. It is available via ftp, uucp, on tape, and will be out later
  52. this year on the SunSoft Catalyst CDware(tm) Volume 4 disc. More
  53. detailed information on obtaining the GNU C Compiler and support for
  54. it are included at the end of this posting.
  55.  
  56.                     _Mark_ <eichin@cygnus.com>
  57.                     Cygnus Support
  58.                     One Kendall Square
  59.                     Cambridge, MA 02138 (617)494-1068
  60.  
  61. ============================================================================
  62. Detailed answers:
  63.  
  64.     I made a few tweaks which probably ought to be integrated into
  65. the main release:
  66.     1) I fixed a few places which called echo $n $rp to call
  67. $echo; turns out that /bin/echo supports \c but not -n, while the
  68. builtin sh echo supports -n but not \c -- so you can't "fall back" to
  69. \c when they disagree...
  70.         $ echo foo \\c
  71.         foo \c
  72.         $ /bin/echo foo \\c     
  73.         foo $ echo -n foo
  74.         foo$ /bin/echo -n foo
  75.         -n foo
  76. Having it not fall back but simply use different options for different
  77. echos is probably enough.
  78.     2) I cut out the case that adds -D__GNUC__ to the CFLAGS (gcc
  79. flamed (warned) about the redefinition.)
  80.     3) I changed the memcpy and memset declarations in perl.h to
  81. say void* instead of char*. This should probably be conditionalized.
  82.  
  83.     I also did a few things specific to working with gcc:
  84.     1) I told it to use gcc.
  85.     2) I told it to use -g -O (-g first, so it threw in -DDEBUGGING)
  86.     3) At the libraries line, it found -lsocket -lnsl -lmalloc.
  87. The first two are ok; -lmalloc *IS BROKEN*. It gets you
  88. /usr/ccs/lib/libmalloc.a, which only gives back 4-byte aligned data.
  89. Under Solaris 2, doubles need to be aligned to 8-bytes... the man page
  90. indicates:
  91. |     Each of the allocation routines returns a pointer  to  space
  92. |     suitably  aligned  (after  possible  pointer  coercion)  for
  93. |     storage of any type of object.
  94. but the libmalloc.a version does not comply. (This may be a cause of
  95. the optimizer related bugs seen in util.c, since that's the first
  96. place it does a double store...)
  97.  
  98.     Additionally, since we have the SUNWste C compiler as well, I
  99. tweaked the Configure script to look at /opt/cygnus/bin before
  100. /usr/ccs/bin, and *not* to look in /opt/SUNWste/bin so that it didn't
  101. use the commercial compiler. This was only necessary in order to make
  102. sure that it would work for someone who had GCC and didn't have the
  103. non-free compiler.
  104.