Peter Eisentraut wrote:
> Bruce Momjian writes:
>
> > In fact, another question is why this alpha test is only done in
> > freebsd?
>
> Ask that to the maintainers of the FreeBSD system compiler.
>
> > Certainly other alpha gcc platforms must have problems with -O2?
> > I am inclined to add something to configure.in for all alpha compiles
> > that changes -O2 to -O.
>
> I'm not. It's one thing if FreeBSD thinks their compiler is broken. But
> before I accept that gcc is broken as a whole, I want to hear from the GCC
> folks.
How does everyone like this patch? It removes -g from non-debug
compiles, and changes -O2 to -O for FreeBSD/Alpha.
--
Bruce Momjian | http://candle.pha.pa.us
[EMAIL PROTECTED] | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Index: configure
===================================================================
RCS file: /cvsroot/pgsql-server/configure,v
retrieving revision 1.306
diff -c -c -r1.306 configure
*** configure 22 Oct 2003 04:16:27 -0000 1.306
--- configure 25 Oct 2003 15:44:00 -0000
***************
*** 2384,2389 ****
--- 2384,2392 ----
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ # Strip off -g added by autoconf
+ CFLAGS="`echo \"$CFLAGS\" | sed 's/\( *\)-g\( *\)/\1\2/'`"
+
#
# Read the template
#
Index: configure.in
===================================================================
RCS file: /cvsroot/pgsql-server/configure.in,v
retrieving revision 1.297
diff -c -c -r1.297 configure.in
*** configure.in 22 Oct 2003 04:16:39 -0000 1.297
--- configure.in 25 Oct 2003 15:44:03 -0000
***************
*** 229,234 ****
--- 229,237 ----
AC_PROG_CC([$pgac_cc_list])
+ # Strip off -g added by autoconf
+ CFLAGS="`echo \"$CFLAGS\" | sed 's/\( *\)-g\( *\)/\1\2/'`"
+
#
# Read the template
#
Index: src/template/freebsd
===================================================================
RCS file: /cvsroot/pgsql-server/src/template/freebsd,v
retrieving revision 1.27
diff -c -c -r1.27 freebsd
*** src/template/freebsd 9 Oct 2003 22:55:46 -0000 1.27
--- src/template/freebsd 25 Oct 2003 15:44:09 -0000
***************
*** 1,6 ****
! case $host_cpu in
! alpha*) CFLAGS="$CFLAGS -O";; # alpha has problems with -O2
! esac
THREAD_SUPPORT=yes
NEED_REENTRANT_FUNCS=yes
--- 1,10 ----
! # alpha has problems with -O2
! # is FreeBSD/Alpha the only gcc Alpha that can't handle -O2?
! if test "$GCC" = yes; then
! case $host_cpu in
! alpha*) CFLAGS="`echo \"$CFLAGS\" | sed 's/\( *\)-O2\( *\)/\1-O\2/'`" ;;
! esac
! fi
THREAD_SUPPORT=yes
NEED_REENTRANT_FUNCS=yes
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://archives.postgresql.org