This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: OpenBSD configurations for gcc 3.3.x


OK, here are my substantive comments (as a configury maintainer) on the patch.

First of all, as others have commented, if you want to get this into the main GCC repo, you *have* to design and submit the patch for mainline (currently going to become 3.4) *first*.

- fixinc.wrap is enough on all OpenBSD systems. Most of the headers are
shared between architectures, in fact.

This is no good for 3.4. For 3.4 *all* systems are using standard autogen-managed fixincludes (except a few which do no fixing at all).
fixinc.wrap is completely gone and will stay gone. Please see if the standard fixincludes behaves properly, and if not tell us and we will fix any problems.


Specific comments on config.gcc:

Index: config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.266.2.19
diff -u -p -c -r1.266.2.19 config.gcc
*** config.gcc	2 Dec 2003 05:33:15 -0000	1.266.2.19
--- config.gcc	12 Jan 2004 23:28:18 -0000
*************** case $machine in
*** 402,408 ****
  	esac
  	;;
  *-*-openbsd*)
! 	tm_file=${cpu_type}/openbsd.h
  	tmake_file="t-libc-ok t-openbsd t-libgcc-pic"
  	xm_defines=POSIX
  	if test x$enable_threads = xyes; then
--- 402,416 ----
  	esac
  	;;
  *-*-openbsd*)
! 	case $machine in
! 	*-*-openbsd2* | *-*-openbsd3.[012])
! 		openbsd_libspec="openbsd-libc_r.h"
! 		;;
! 	*)
! 		openbsd_libspec="openbsd-libpthread.h"
! 		;;
! 	esac
! 	tm_file="${openbsd_libspec} ${cpu_type}/openbsd.h"
  	tmake_file="t-libc-ok t-openbsd t-libgcc-pic"
  	xm_defines=POSIX
  	if test x$enable_threads = xyes; then

The above hunk is good....


*************** alpha*-*-netbsd*)
*** 578,587 ****
;;
alpha*-*-openbsd*)
! tm_file="${cpu_type}/${cpu_type}.h ${tm_file}"
# default x-alpha is only appropriate for dec-osf.
target_cpu_default="MASK_GAS"
tmake_file="alpha/t-alpha alpha/t-ieee"
;;
alpha*-dec-osf[45]*)
--- 586,596 ----
;;
alpha*-*-openbsd*)
! tm_file="alpha/alpha.h alpha/elf.h alpha/openbsd1.h openbsd.h ${tm_file}"
# default x-alpha is only appropriate for dec-osf.
target_cpu_default="MASK_GAS"
tmake_file="alpha/t-alpha alpha/t-ieee"
+ gas=yes gnu_ld=yes
;;
alpha*-dec-osf[45]*)
*************** hppa*-*-linux* | parisc*-*-linux*)
*** 818,825 ****
tmake_file="t-slibgcc-elf-ver t-linux pa/t-linux"
;;
hppa*-*-openbsd*)
! target_cpu_default="MASK_PA_11"
! tmake_file=pa/t-bsd
;;
hppa1.1-*-pro*)
target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
--- 827,834 ----
tmake_file="t-slibgcc-elf-ver t-linux pa/t-linux"
;;
hppa*-*-openbsd*)
! target_cpu_default="MASK_PA_11 | MASK_NO_SPACE_REGS"
! tmake_file="t-libc-ok t-openbsd t-openbsd-thread pa/t-openbsd"
;;
* Are you deliberately omitting t-libgcc-pic?
* Are you deliberately including t-openbsd-thread even when configuring with --disable-threads?
If you are doing these deliberately, please include comments explaining why.


If those are just accidents, you should instead write:
tmake_file="${tmake_file} pa/t-openbsd"
so as to take advantage of the ${tmake_file} setting in the generic openbsd clause.


  hppa1.1-*-pro*)
  	target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
*************** i[34567]86-*-netbsd*)
*** 1142,1154 ****
  x86_64-*-netbsd*)
  	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h"
  	;;
! i[34567]86-*-openbsd*)
  	tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h openbsd-oldgas.h openbsd.h ${tm_file}"
  	# needed to unconfuse gdb
  	tmake_file="t-libc-ok t-openbsd i386/t-openbsd"
  	# we need collect2 until our bug is fixed...
  	use_collect2=yes
  	;;
  i[34567]86-*-coff*)
  	tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/i386-coff.h"
  	;;
--- 1151,1177 ----
  x86_64-*-netbsd*)
  	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h"
  	;;
! i[34567]86-*-openbsd2* | i[34567]86-*-openbsd3.[0123])
  	tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h openbsd-oldgas.h openbsd.h ${tm_file}"
  	# needed to unconfuse gdb
  	tmake_file="t-libc-ok t-openbsd i386/t-openbsd"
Is there a reason why t-libgcc-pic is omitted?
Is there a reason why t-openbsd-thread is omitted even when configured with --enable-threads?
If so, include comments; if not, use
tmake_file="${tmake_file} i386/t-openbsd"


  	# we need collect2 until our bug is fixed...
  	use_collect2=yes
  	;;
+ i[34567]86-*-openbsd*)
+ 	# needed to unconfuse gdb
+ 	tmake_file="t-libc-ok t-openbsd i386/t-openbsd"
Is there a reason why t-libgcc-pic is omitted?
Is there a reason why t-openbsd-thread is omitted even when configured with --enable-threads?
If so, include comments; if not, use
tmake_file="${tmake_file} i386/t-openbsd"


+ 	tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h"
+ 	tm_file="${tm_file} exec-stack.h"
+ 	tm_file="${tm_file} openbsd.h openbsd-libpthread.h i386/openbsdelf.h"
+ 	gas=yes
+ 	gnu_ld=yes
+ 	stabs=yes
+   	;;
+ x86_64-*-openbsd*)
+ 	tm_file="i386/biarch64.h i386/i386.h i386/unix.h i386/att.h dbxelf.h elfos.h openbsd.h openbsd-libpthread.h i386/x86-64.h i386/openbsd64.h"
+ 	tmake_file="t-libc-ok t-openbsd i386/t-openbsd"
Is there a reason why t-libgcc-pic is omitted?
Is there a reason why t-openbsd-thread is omitted even when configured with --enable-threads?
If so, include comments; if not, use
tmake_file="${tmake_file} i386/t-openbsd"


+ 	;;
  i[34567]86-*-coff*)
  	tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/i386-coff.h"
  	;;
*************** sparc-*-netbsd*)
*** 2397,2413 ****
  	use_collect2=yes
  	;;
  sparc-*-openbsd*)
! 	tm_file="sparc/sparc.h ${tm_file}"
  	# needed to unconfuse gdb
  	tmake_file="t-libc-ok t-openbsd sparc/t-openbsd"
  	# we need collect2 until our bug is fixed...
  	use_collect2=yes
  	;;
  sparc64-*-openbsd*)
! 	tm_file="sparc/openbsd1-64.h sparc/sparc.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/sp64-elf.h openbsd.h sparc/openbsd64.h"
  	xm_file=sparc/xm-sp64.h
  	gas=yes gnu_ld=yes
  	with_cpu=ultrasparc
  	;;
  sparc-*-bsd*)
  	tm_file="${tm_file} sparc/bsd.h"
--- 2420,2438 ----
  	use_collect2=yes
  	;;
  sparc-*-openbsd*)
! 	tm_file="sparc/sparc.h elfos.h svr4.h sparc/sysv4.h ${tm_file}"
  	# needed to unconfuse gdb
  	tmake_file="t-libc-ok t-openbsd sparc/t-openbsd"
Is there a reason why t-libgcc-pic is omitted?
Is there a reason why t-openbsd-thread is omitted even when configured with --enable-threads?
If so, include comments; if not, use
tmake_file="${tmake_file} sparc/t-openbsd"


  	# we need collect2 until our bug is fixed...
+ 	gas=yes gnu_ld=yes
Please don't separate the comment about collect2 from the functional line about collect2.

  	use_collect2=yes
  	;;
  sparc64-*-openbsd*)
! 	tm_file="sparc/openbsd1-64.h sparc/sparc.h elfos.h svr4.h sparc/sysv4.h sparc/sp64-elf.h openbsd.h ${openbsd_libspec} sparc/openbsd64.h"
  	xm_file=sparc/xm-sp64.h
  	gas=yes gnu_ld=yes
  	with_cpu=ultrasparc
+ 	float_format=i128
Does sparc64-openbsd really not need *any* sparc-specific tmake_file ?

  	;;
  sparc-*-bsd*)
  	tm_file="${tm_file} sparc/bsd.h"

Also note that things are going to look a little different in the config.gcc for 3.4; your changes should still be about the same, but actual patch files probably won't apply correctly due to context changes.


Additional general comments:

All new files should say "GCC" everywhere, never "GNU CC". All your new files break this rule. :-)

Don't write "Copyright (C) 2004..."; the (C) has no legal effect. Instead, write "Copyright 2004...".

I haven't commented on the .h files yet, but be warned that they've been somewhat cleaned up in mainline (relative to 3.3) so you will probably have to make your changes somewhat different. (Probably simpler, actually.)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]