zsh-workers
 help / color / mirror / code / Atom feed
* RE: Zsh 4.0.2 + 64bit Solaris 8 Forte 6.1 compiler
       [not found] ` <004201c0ff11$e8dcb840$21c9ca95@mow.siemens.ru>
@ 2001-06-27 14:15   ` Tomi Vainio - Sun Finland -
  2001-06-27 14:30     ` Andrej Borsenkow
  0 siblings, 1 reply; 11+ messages in thread
From: Tomi Vainio - Sun Finland - @ 2001-06-27 14:15 UTC (permalink / raw)
  To: Andrej Borsenkow; +Cc: zsh-workers

Andrej Borsenkow writes:
 > 
 > Default configuration on Solaris supports LFS and 64 bit integer type. The
 > only additional thing you get is 64 bit pointers, that is hardly an issue
 > for any shell.
 >
Everything is moving to 64-bit environment and it's much easier to
have only one set of local libraries for free software.  For example
compiling something like xemacs I will need ten extra libraries and I
rather compile only 64-bit versions if I need these even once and
don't touch 32-bit stuff at all.

 > 
 > You are the first one to rteport this problem. Give me a clean test to
 > detect your compiler and I will incorporate it into configure.
 > Alternatively, we can change -Kpic -> -KPIC for all compilers on Solaris if
 > you know that it is universally supported. It is too dangerous to just cange
 > it.
 > 
 > Actually, other zsh-workers have more experience with Solaris than me.
 > 
 > > Here is configure output from 32bit environment
 > >
 > 
 > So what? zsh does work on Solaris; what you want to show with this output?
 > 
Firstly I thought you like to see how my environment is probed but you
like to get piece of code how to detect Sun 64-bit Forte compiler.

  Tomppa
-- 
SUN Microsystems Oy PL 112, Lars Sonckin kaari 12, 02601 ESPOO, Finland
Tomi Vainio (System Support Engineer)     +358 9 52556300 hotline
email: Tomi.Vainio@Sun.COM                +358 9 52556252 fax


^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: Zsh 4.0.2 + 64bit Solaris 8 Forte 6.1 compiler
  2001-06-27 14:15   ` Zsh 4.0.2 + 64bit Solaris 8 Forte 6.1 compiler Tomi Vainio - Sun Finland -
@ 2001-06-27 14:30     ` Andrej Borsenkow
  2001-06-28  9:13       ` Tomi Vainio - Sun Finland -
  0 siblings, 1 reply; 11+ messages in thread
From: Andrej Borsenkow @ 2001-06-27 14:30 UTC (permalink / raw)
  To: Tomi.Vainio; +Cc: zsh-workers


>  >
> Everything is moving to 64-bit environment and it's much easier to
> have only one set of local libraries for free software.  For example
> compiling something like xemacs I will need ten extra libraries and I
> rather compile only 64-bit versions if I need these even once and
> don't touch 32-bit stuff at all.
>

O.K., granted. But note, that it is not a simple. Currently zsh tries to
autodetect compiler flags (including those to enable LFS mode). But it does
it only if you did not explicitly specify any flags yourself. It is near to
impossible to write configure that wil parse e.g. LDFLAGS and infer
DLLDFLAGS. So, if you specify LDFLAGS you must specify DLLDFLAGS.

So, what you actually want is the way to specify "I want LP64 mode". It was
briefly discussed here when LFS support was added. The problem is, while LFS
support is more or less standardized (via getconf interface), there is no
standard way to enable LP64 mode. We'd end up listing every possible
combination of system/compiler.

> Firstly I thought you like to see how my environment is probed but you
> like to get piece of code how to detect Sun 64-bit Forte compiler.
>

Yes. I do not have either Solaris or Forte compiler so I cannot do it
myself. As said, either describe how your compiler can be detected or, if it
is confirmed that -KPIC is supported by all compilers on Solaris, we can
change it.

-andrej



^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: Zsh 4.0.2 + 64bit Solaris 8 Forte 6.1 compiler
  2001-06-27 14:30     ` Andrej Borsenkow
@ 2001-06-28  9:13       ` Tomi Vainio - Sun Finland -
  2001-06-28  9:34         ` Andrej Borsenkow
  0 siblings, 1 reply; 11+ messages in thread
From: Tomi Vainio - Sun Finland - @ 2001-06-28  9:13 UTC (permalink / raw)
  To: Andrej Borsenkow; +Cc: zsh-workers

Andrej Borsenkow writes:
 > 
 > Yes. I do not have either Solaris or Forte compiler so I cannot do it
 > myself. As said, either describe how your compiler can be detected or, if it
 > is confirmed that -KPIC is supported by all compilers on Solaris, we can
 > change it.
 > 
I have made some digging.  Oldest compiler I could find is 4.2 which
is quite old (cc: WorkShop Compilers 4.2 30 Oct 1996 C 4.2) and all
series 4 compilers are quite the same.  This old compiler knows -KPIC
-option and I also checked xemacs 21.4 configure and they use -KPIC
almost for every system available (irix/sysv4/unixware/solaris).
/opt/SUNWspro/bin/cc -cflags|grep -i pic
-KPIC           Compile position independent code with 32-bit addresses
-Kpic           Compile position independent code


Next thing is how to detect 64-bit.  Isainfo is quite good for this
and old compilers don't know anything about -xarch=v9 or v9a/v9b.
Only things that change for eg. on xemacs configure when using 64-bit
are size of long and void *

man cc
---clip clip---
v9  Compile for the SPARC-V9 ISA.
v9a Compile for the SPARC-V9 ISA with UltraSPARC extensions.
v9b Compile for the SPARC-V9 ISA with UltraSPARC-III extensions.
---clip clip---

man isainfo
---clip clip---
     -b    Prints the number of bits in the address space of  the
           native instruction set.
     -k    Prints the name of the instruction set(s) used by  the
           operating  system  kernel  components  such  as device
           drivers and STREAMS modules.
     -n    Prints the name of the native instruction set used  by
           portable applications supported by the current version
           of the operating system.
     -v    Prints  more  detailed  information  about  the  other
           options.
---clip clip---

% /usr/bin/isainfo -b 
64
% /usr/bin/isainfo -k
sparcv9
% /usr/bin/isainfo -n
sparcv9
% /usr/bin/isainfo -bv
64-bit sparcv9 applications
% /usr/bin/isainfo -kv
64-bit sparcv9 kernel modules
% /usr/bin/isainfo -nv
64-bit sparcv9 applications

-- 
SUN Microsystems Oy PL 112, Lars Sonckin kaari 12, 02601 ESPOO, Finland
Tomi Vainio (System Support Engineer)     +358 9 52556300 hotline
email: Tomi.Vainio@Sun.COM                +358 9 52556252 fax


^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: Zsh 4.0.2 + 64bit Solaris 8 Forte 6.1 compiler
  2001-06-28  9:13       ` Tomi Vainio - Sun Finland -
@ 2001-06-28  9:34         ` Andrej Borsenkow
  2001-06-29 13:51           ` Clint Adams
  0 siblings, 1 reply; 11+ messages in thread
From: Andrej Borsenkow @ 2001-06-28  9:34 UTC (permalink / raw)
  To: Tomi.Vainio; +Cc: zsh-workers

>
> Andrej Borsenkow writes:
>  >
>  > Yes. I do not have either Solaris or Forte compiler so I cannot do it
>  > myself. As said, either describe how your compiler can be
> detected or, if it
>  > is confirmed that -KPIC is supported by all compilers on
> Solaris, we can
>  > change it.
>  >
> I have made some digging.  Oldest compiler I could find is 4.2 which
> is quite old (cc: WorkShop Compilers 4.2 30 Oct 1996 C 4.2) and all
> series 4 compilers are quite the same.  This old compiler knows -KPIC
> -option and I also checked xemacs 21.4 configure and they use -KPIC
> almost for every system available (irix/sysv4/unixware/solaris).
> /opt/SUNWspro/bin/cc -cflags|grep -i pic
> -KPIC           Compile position independent code with 32-bit addresses
> -Kpic           Compile position independent code
>

So, what others think? Should we change it to -KPIC for Solaris?

>
> Next thing is how to detect 64-bit.

No. Next thing is - why should zsh default to LP64 (that is what you mean.
Zsh already supports 64-bit atithmetic and large files)? Does it fix
something or adds new features?

-andrej


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Zsh 4.0.2 + 64bit Solaris 8 Forte 6.1 compiler
  2001-06-28  9:34         ` Andrej Borsenkow
@ 2001-06-29 13:51           ` Clint Adams
  2001-06-29 15:09             ` Andrej Borsenkow
  0 siblings, 1 reply; 11+ messages in thread
From: Clint Adams @ 2001-06-29 13:51 UTC (permalink / raw)
  To: Andrej Borsenkow; +Cc: Tomi.Vainio, zsh-workers

> So, what others think? Should we change it to -KPIC for Solaris?

Except for gcc of course.

> No. Next thing is - why should zsh default to LP64 (that is what you mean.
> Zsh already supports 64-bit atithmetic and large files)? Does it fix
> something or adds new features?

It shouldn't; it should default to the default.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: Zsh 4.0.2 + 64bit Solaris 8 Forte 6.1 compiler
  2001-06-29 13:51           ` Clint Adams
@ 2001-06-29 15:09             ` Andrej Borsenkow
  2001-06-29 15:29               ` Clint Adams
  0 siblings, 1 reply; 11+ messages in thread
From: Andrej Borsenkow @ 2001-06-29 15:09 UTC (permalink / raw)
  To: Clint Adams; +Cc: Tomi.Vainio, zsh-workers


>
> > So, what others think? Should we change it to -KPIC for Solaris?
>
> Except for gcc of course.
>

Erm ... do we need Solaris special-case? This changes it for all systems
using it.

> > No. Next thing is - why should zsh default to LP64 (that is
> what you mean.
> > Zsh already supports 64-bit atithmetic and large files)? Does it fix
> > something or adds new features?
>
> It shouldn't; it should default to the default.
>

I guess, yes. Especially as with this patch it is enough to just say
CC='cc -xarch-sparcv9'; no need to set individual flags.

-andrej

Index: zshconfig.ac
===================================================================
RCS file: /cvsroot/zsh/zsh/zshconfig.ac,v
retrieving revision 1.10
diff -u -r1.10 zshconfig.ac
--- zshconfig.ac        2001/06/29 14:59:42     1.10
+++ zshconfig.ac        2001/06/29 15:04:13
@@ -1625,7 +1625,7 @@
     case "$host_os" in
       hpux*)                 DLCFLAGS="${DLCFLAGS=+z}" ;;
       sunos*)                DLCFLAGS="${DLCFLAGS=-pic}" ;;
-      solaris*|sysv4*|esix*) DLCFLAGS="${DLCFLAGS=-Kpic}" ;;
+      solaris*|sysv4*|esix*) DLCFLAGS="${DLCFLAGS=-KPIC}" ;;
     esac
   fi
   case "$host_os" in


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Zsh 4.0.2 + 64bit Solaris 8 Forte 6.1 compiler
  2001-06-29 15:09             ` Andrej Borsenkow
@ 2001-06-29 15:29               ` Clint Adams
  0 siblings, 0 replies; 11+ messages in thread
From: Clint Adams @ 2001-06-29 15:29 UTC (permalink / raw)
  To: Andrej Borsenkow; +Cc: Tomi.Vainio, zsh-workers

> Erm ... do we need Solaris special-case? This changes it for all systems
> using it.

No, we need gcc special-cased.  Which is already done.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Zsh 4.0.2 + 64bit Solaris 8 Forte 6.1 compiler
  2001-06-27 13:57 ` Clint Adams
@ 2001-06-27 14:21   ` Tomi Vainio - Sun Finland -
  0 siblings, 0 replies; 11+ messages in thread
From: Tomi Vainio - Sun Finland - @ 2001-06-27 14:21 UTC (permalink / raw)
  To: Clint Adams; +Cc: zsh-workers

Clint Adams writes:
 > 
 > I think I used something along the lines of
 > 
 > CC='/opt/SUNWspro/bin/cc -xtarget=ultra2 -xarch=v9a' ./configure
 > and it was somewhat happy.
 > 
This might work fine but is this correct way to give these
parameters.  I'm trying to find a way how to use autoconf/configure
with all softwares and sometimes there are also LD and CXX which will
need this same -xarch=v9 option so there should be a common flag or
option that delivers this throughout all places at once.

  Tomppa
-- 
SUN Microsystems Oy PL 112, Lars Sonckin kaari 12, 02601 ESPOO, Finland
Tomi Vainio (System Support Engineer)     +358 9 52556300 hotline
email: Tomi.Vainio@Sun.COM                +358 9 52556252 fax


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Zsh 4.0.2 + 64bit Solaris 8 Forte 6.1 compiler
  2001-06-27 12:13 Tomi Vainio - Sun Finland -
  2001-06-27 12:23 ` Andrej Borsenkow
@ 2001-06-27 13:57 ` Clint Adams
  2001-06-27 14:21   ` Tomi Vainio - Sun Finland -
  1 sibling, 1 reply; 11+ messages in thread
From: Clint Adams @ 2001-06-27 13:57 UTC (permalink / raw)
  To: Tomi Vainio - Sun Finland -; +Cc: zsh-workers

> I have couple problems with zsh compile process.  I don't know how to
> give correct parameters to configure process.  Compile will fail
> because ./Makefile line 124 (LDFLAGS= ) is empty and it should contain
> -xarch=v9.  I have tried to use these methods for configure but no
> success yet.
> CC=cc CFLAGS='-xO3 -xarch=v9' LDFLAGS='-xO3 -xarch=v9' ./configure
> CC=cc ./configure --enable-cflags='-xO3 -xarch=v9' --enable-ldflags='-xO3 -xarch=v9'

I think I used something along the lines of

CC='/opt/SUNWspro/bin/cc -xtarget=ultra2 -xarch=v9a' ./configure
and it was somewhat happy.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: Zsh 4.0.2 + 64bit Solaris 8 Forte 6.1 compiler
  2001-06-27 12:13 Tomi Vainio - Sun Finland -
@ 2001-06-27 12:23 ` Andrej Borsenkow
  2001-06-27 13:57 ` Clint Adams
  1 sibling, 0 replies; 11+ messages in thread
From: Andrej Borsenkow @ 2001-06-27 12:23 UTC (permalink / raw)
  To: Tomi.Vainio, zsh-workers


First, why would you want to compile zsh in 64 bit mode? Does your compiler
support long long in 32 bit mode?

> I have couple problems with zsh compile process.  I don't know how to
> give correct parameters to configure process.  Compile will fail
> because ./Makefile line 124 (LDFLAGS= ) is empty and it should contain
> -xarch=v9.  I have tried to use these methods for configure but no
> success yet.
> CC=cc CFLAGS='-xO3 -xarch=v9' LDFLAGS='-xO3 -xarch=v9' ./configure
> CC=cc ./configure --enable-cflags='-xO3 -xarch=v9'
> --enable-ldflags='-xO3 -xarch=v9'
>
> `stamp-modobjs' is up to date.
> rm -f libzsh-4.0.2.so
> cc   -G -o libzsh-4.0.2.so  `cat stamp-modobjs` -lsocket -ldl
> -lnsl -lcurses -lm  -lc
> ld: fatal: file builtin.o: wrong ELF class: ELFCLASS64
> ld: fatal: File processing errors. No output written to libzsh-4.0.2.so
>

Use (in addition to the above)

DLLDFLAGS=-xarch=v9

> The second problem is with shared code.  ./configure line 6833
> ${DLCFLAGS=-Kpic} doesn't work and you should use -KPIC
>

The same, give

DLCFLAGS=-KPIC

when configuring or

make DLCFLAGS=-KPIC ...

If you can provide a clean configure test to detect your compiler ...

> `stamp-modobjs' is up to date.
> rm -f libzsh-4.0.2.so
> cc -xO3 -xarch=v9  -G -o libzsh-4.0.2.so  `cat stamp-modobjs`
               ^^^^^^^^^^^^

where this comes from?

-andrej


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Zsh 4.0.2 + 64bit Solaris 8 Forte 6.1 compiler
@ 2001-06-27 12:13 Tomi Vainio - Sun Finland -
  2001-06-27 12:23 ` Andrej Borsenkow
  2001-06-27 13:57 ` Clint Adams
  0 siblings, 2 replies; 11+ messages in thread
From: Tomi Vainio - Sun Finland - @ 2001-06-27 12:13 UTC (permalink / raw)
  To: zsh-workers

Hi,

I have couple problems with zsh compile process.  I don't know how to
give correct parameters to configure process.  Compile will fail
because ./Makefile line 124 (LDFLAGS= ) is empty and it should contain
-xarch=v9.  I have tried to use these methods for configure but no
success yet.
CC=cc CFLAGS='-xO3 -xarch=v9' LDFLAGS='-xO3 -xarch=v9' ./configure
CC=cc ./configure --enable-cflags='-xO3 -xarch=v9' --enable-ldflags='-xO3 -xarch=v9'

`stamp-modobjs' is up to date.
rm -f libzsh-4.0.2.so
cc   -G -o libzsh-4.0.2.so  `cat stamp-modobjs` -lsocket -ldl -lnsl -lcurses -lm  -lc
ld: fatal: file builtin.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to libzsh-4.0.2.so

The second problem is with shared code.  ./configure line 6833
${DLCFLAGS=-Kpic} doesn't work and you should use -KPIC

`stamp-modobjs' is up to date.
rm -f libzsh-4.0.2.so
cc -xO3 -xarch=v9  -G -o libzsh-4.0.2.so  `cat stamp-modobjs` -lsocket -ldl -lnsl -lcurses -lm  -lc
ld: fatal: too many symbols require `small' PIC references:
        have 1552, maximum 1024 -- recompile some modules -K PIC.

  Tomppa
-- 
SUN Microsystems Oy PL 112, Lars Sonckin kaari 12, 02601 ESPOO, Finland
Tomi Vainio (System Support Engineer)     +358 9 52556300 hotline
email: Tomi.Vainio@Sun.COM                +358 9 52556252 fax


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2001-06-29 15:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <15161.58232.30647.918340@gargle.gargle.HOWL>
     [not found] ` <004201c0ff11$e8dcb840$21c9ca95@mow.siemens.ru>
2001-06-27 14:15   ` Zsh 4.0.2 + 64bit Solaris 8 Forte 6.1 compiler Tomi Vainio - Sun Finland -
2001-06-27 14:30     ` Andrej Borsenkow
2001-06-28  9:13       ` Tomi Vainio - Sun Finland -
2001-06-28  9:34         ` Andrej Borsenkow
2001-06-29 13:51           ` Clint Adams
2001-06-29 15:09             ` Andrej Borsenkow
2001-06-29 15:29               ` Clint Adams
2001-06-27 12:13 Tomi Vainio - Sun Finland -
2001-06-27 12:23 ` Andrej Borsenkow
2001-06-27 13:57 ` Clint Adams
2001-06-27 14:21   ` Tomi Vainio - Sun Finland -

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).