Re: [pgsql-advocacy] [GENERAL] Postgresql & AMD x86-64 - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [pgsql-advocacy] [GENERAL] Postgresql & AMD x86-64
Date
Msg-id 200307191414.h6JEEAn25586@candle.pha.pa.us
Whole thread Raw
In response to Re: [pgsql-advocacy] [GENERAL] Postgresql & AMD x86-64  (Manfred Spraul <manfred@colorfullife.com>)
List pgsql-hackers
Manfred Spraul wrote:
> Bruce Momjian wrote:
>
> >  if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
> >    CFLAGS="$CFLAGS -g"
> >  fi
> >+
> >+ /* Compile AMD Opteron using gcc in 64-bit mode */
> >+ if test "$GCC" = yes; then
> >+ case $host in
> >+   ia64-*)  CFLAGS="$CFLAGS -m64"
> >+            LDFLAGS="$LDFLAGS -melf_x86_64";;
> >+ esac
> >+ fi
> >+
> >
> Sorry, I think I confused you:

I am easily confused.  It certainly makes more sense fir ia64 to be
Intel, not AMD. :-)

> ia64-* is Intel's Itanium system. They are 64-bit only cpus (the 32-bit
> emulation is too slow to be usable). It's supported by multiple
> operating systems, among them HP UX, Linux, Windows. As far as I can see
> it's supported directly, by 7.3.3, at least RedHat builds their ia64
> version without any patches.
> x86_64 is AMD's Operon/Athlon 64 system. They support concurrent 32-bit
> and 64-bit. Right now only supported by Linux, BSD and Windows support
> expected soon.
> Thus the test must be for "x86_64-*".
>
> Martin: you are using debian-testing, correct? I've asked a Suse
> developer, and on their Linux distribution, -m64 is the default, i.e.
> you don't need any switches.

I have applied the following patch to document the cpus supported by
each define.

Martin mentioned that he has applied a special 64-bit kit to do the
compile, so perhaps he needs it, but most will not.  I will keep the
patch around and see if others need it during beta.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: src/include/storage/s_lock.h
===================================================================
RCS file: /cvsroot/pgsql-server/src/include/storage/s_lock.h,v
retrieving revision 1.109
diff -c -c -r1.109 s_lock.h
*** src/include/storage/s_lock.h    24 Jun 2003 23:20:08 -0000    1.109
--- src/include/storage/s_lock.h    19 Jul 2003 14:10:19 -0000
***************
*** 94,100 ****
   */


! #if defined(__i386__) || defined(__x86_64__)
  #define TAS(lock) tas(lock)

  static __inline__ int
--- 94,100 ----
   */


! #if defined(__i386__) || defined(__x86_64__) /* AMD Opteron */
  #define TAS(lock) tas(lock)

  static __inline__ int
***************
*** 113,118 ****
--- 113,119 ----
  #endif     /* __i386__ || __x86_64__ */


+ /* Intel Itanium */
  #ifdef __ia64__
  #define TAS(lock) tas(lock)


pgsql-hackers by date:

Previous
From: Gavin Sherry
Date:
Subject: Re: [GENERAL] Physical Database Configuration
Next
From: Philip Warner
Date:
Subject: Re: plpgsql strangeness with select into