Compiling Perl 5.12.3 on OpenIndiana
If one plans to compile Perl i386-pc-solaris2.11 there is nothing special to say: just run the Configure script as shown below
./Configure -Dcc=XXX
where XXX should be either gcc or cc,
and in most, if not all, cases just accept the suggested answers. However, things get a little bit tricky when trying to compile for x86_64-pc-solaris2.11. First one needs to make shell script to call the C compiler with the -m64 option. In my system the corresponding scripts are shown below:
$ more /usr/bin/cc64 #! /bin/bash exec /usr/bin/cc -m64 "$@" $ more /usr/bin/gcc64 #! /bin/bash exec /usr/bin/gcc -m64 "$@" $
Obviously when invoking Configure the XXX parameter must be either gcc64 or cc64. If you want to build with GCC (I am using version 4.5.2) you need to correctly answer a question asked by Configure. IN particular when Configure asks
Any special flags to pass to x86_64-pc-solaris2.11-gcc to create a dynamically loaded library? [ -G -m64 -fstack-protector]
do not accept the suggested reply but instead enter:
-shared -m64 -fstack-protector
For solstudio12.2 there is nothing to say: it compiles just fine. The only annoying thing is that during compilation one sees times the following warning
cc: Warning: -xarch=generic64 is deprecated, use -m64 to create 64-bit programs
Someone must inform the Perl developers to update the configuration scripts.
αφήστε σχόλιο