patches that should work with old OpenBSD as well.
This commit is contained in:
parent
7a77f495ab
commit
32a94603ed
@ -1,15 +1,30 @@
|
||||
$OpenBSD: patch-gcc_config_gcc,v 1.2 2005/01/03 16:23:48 espie Exp $
|
||||
$OpenBSD: patch-gcc_config_gcc,v 1.3 2005/01/07 17:36:19 espie Exp $
|
||||
--- gcc/config.gcc.orig Wed Dec 22 09:41:31 2004
|
||||
+++ gcc/config.gcc Mon Jan 3 15:47:19 2005
|
||||
@@ -931,11 +931,11 @@ x86_64-*-netbsd*)
|
||||
+++ gcc/config.gcc Fri Jan 7 14:37:09 2005
|
||||
@@ -493,6 +493,10 @@ case ${target} in
|
||||
tmake_file="${tmake_file} t-openbsd-thread"
|
||||
;;
|
||||
esac
|
||||
+ case ${target} in
|
||||
+ *-*-openbsd2.*|*-*-openbsd3.[012])
|
||||
+ tm_defines="${tm_defines} HAS_LIBC_R=1" ;;
|
||||
+ esac
|
||||
;;
|
||||
*-*-rtems*)
|
||||
case ${enable_threads} in
|
||||
@@ -930,12 +934,19 @@ i[34567]86-*-netbsd*)
|
||||
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="i386/i386.h i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h openbsd-oldgas.h openbsd.h i386/openbsd.h"
|
||||
- # 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-*-openbsd*)
|
||||
+i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
|
||||
tm_file="i386/i386.h i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h openbsd-oldgas.h openbsd.h i386/openbsd.h"
|
||||
# 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-*-openbsd*)
|
||||
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h"
|
||||
+ tm_file="${tm_file} openbsd.h i386/openbsdelf.h"
|
||||
+ gas=yes
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-gcc_config_openbsd_h,v 1.2 2005/01/04 12:07:18 espie Exp $
|
||||
$OpenBSD: patch-gcc_config_openbsd_h,v 1.3 2005/01/07 17:36:19 espie Exp $
|
||||
--- gcc/config/openbsd.h.orig Sun Oct 24 03:42:48 2004
|
||||
+++ gcc/config/openbsd.h Tue Jan 4 12:45:59 2005
|
||||
+++ gcc/config/openbsd.h Fri Jan 7 13:16:50 2005
|
||||
@@ -52,29 +52,60 @@ Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef OPENBSD_NATIVE
|
||||
@ -68,7 +68,7 @@ $OpenBSD: patch-gcc_config_openbsd_h,v 1.2 2005/01/04 12:07:18 espie Exp $
|
||||
since all code must be compiled with -pthread to work.
|
||||
This two-stage defines makes it easy to pick that for targets that
|
||||
have subspecs. */
|
||||
@@ -84,10 +115,9 @@ Boston, MA 02111-1307, USA. */
|
||||
@@ -84,11 +115,16 @@ Boston, MA 02111-1307, USA. */
|
||||
#define OBSD_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
|
||||
#endif
|
||||
|
||||
@ -76,13 +76,20 @@ $OpenBSD: patch-gcc_config_openbsd_h,v 1.2 2005/01/04 12:07:18 espie Exp $
|
||||
- depending on profiling and threads. Basically,
|
||||
- -lc(_r)?(_p)?, select _r for threads, and _p for p or pg. */
|
||||
-#define OBSD_LIB_SPEC "%{!shared:-lc%{pthread:_r}%{p:_p}%{!p:%{pg:_p}}}"
|
||||
+/* LIB_SPEC appropriate for OpenBSD. Include -lpthread if -pthread is
|
||||
+ specified on the command line. */
|
||||
+#define OBSD_LIB_SPEC "%{!shared:%{pthread:-lpthread%{p:_p}%{!p:%{pg:_p}}}} %{!shared:-lc%{p:_p}%{!p:%{pg:_p}}}"
|
||||
+/* LIB_SPEC appropriate for OpenBSD. */
|
||||
+#ifdef HAS_LIBC_R
|
||||
+/* -lc(_r)?(_p)?, select _r for threads, and _p for p or pg. */
|
||||
+# define OBSD_LIB_SPEC "%{!shared:-lc%{pthread:_r}%{p:_p}%{!p:%{pg:_p}}}"
|
||||
+#else
|
||||
+/* Include -lpthread if -pthread is specified on the command line. */
|
||||
+# define OBSD_LIB_SPEC "%{!shared:%{pthread:-lpthread%{p:_p}%{!p:%{pg:_p}}}} %{!shared:-lc%{p:_p}%{!p:%{pg:_p}}}"
|
||||
+#endif
|
||||
|
||||
+
|
||||
#ifndef OBSD_HAS_CORRECT_SPECS
|
||||
|
||||
@@ -275,3 +305,21 @@ do { \
|
||||
#ifndef OBSD_NO_DYNAMIC_LIBRARIES
|
||||
@@ -275,3 +311,21 @@ do { \
|
||||
as this depends on a few other details as well... */
|
||||
#define HANDLE_SYSV_PRAGMA 1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user