diff options
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/i386/openbsd.h | 6 | ||||
-rw-r--r-- | gcc/config/i386/t-openbsd | 6 | ||||
-rw-r--r-- | gcc/config/m68k/t-openbsd | 5 | ||||
-rw-r--r-- | gcc/config/openbsd.h | 11 | ||||
-rw-r--r-- | gcc/config/sparc/openbsd.h | 3 | ||||
-rw-r--r-- | gcc/config/sparc/t-openbsd | 5 | ||||
-rw-r--r-- | gcc/config/t-libgcc-pic | 2 |
7 files changed, 34 insertions, 4 deletions
diff --git a/gcc/config/i386/openbsd.h b/gcc/config/i386/openbsd.h index 18b20e9..4705775 100644 --- a/gcc/config/i386/openbsd.h +++ b/gcc/config/i386/openbsd.h @@ -111,6 +111,8 @@ Boston, MA 02111-1307, USA. */ configuration files... */ #define DWARF2_UNWIND_INFO 0 +#undef ASM_PREFERRED_EH_DATA_FORMAT + /* Assembler format: alignment output. */ /* A C statement to output to the stdio stream FILE an assembler @@ -130,3 +132,7 @@ Boston, MA 02111-1307, USA. */ #endif /* Note that we pick up ASM_OUTPUT_MI_THUNK from unix.h. */ + +#undef ASM_COMMENT_START +#define ASM_COMMENT_START ";#" + diff --git a/gcc/config/i386/t-openbsd b/gcc/config/i386/t-openbsd new file mode 100644 index 0000000..1830463 --- /dev/null +++ b/gcc/config/i386/t-openbsd @@ -0,0 +1,6 @@ +# gdb gets confused if pic code is linked with non pic +# We cope by building variants of libgcc. +MULTILIB_OPTIONS = fpic +MULTILIB_MATCHES=fpic=fPIC +LIBGCC = stmp-multilib +INSTALL_LIBGCC = install-multilib diff --git a/gcc/config/m68k/t-openbsd b/gcc/config/m68k/t-openbsd new file mode 100644 index 0000000..24f9a43 --- /dev/null +++ b/gcc/config/m68k/t-openbsd @@ -0,0 +1,5 @@ +# gdb gets confused if pic code is linked with non pic +# We cope by building all variants of libgcc. +MULTILIB_OPTIONS = fpic/fPIC +LIBGCC = stmp-multilib +INSTALL_LIBGCC = install-multilib diff --git a/gcc/config/openbsd.h b/gcc/config/openbsd.h index 87b3a60..ff1c1ad 100644 --- a/gcc/config/openbsd.h +++ b/gcc/config/openbsd.h @@ -78,12 +78,16 @@ Boston, MA 02111-1307, USA. */ 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. */ +#ifdef CPP_CPU_SPEC +#define OBSD_CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}" +#else #define OBSD_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}" +#endif /* LIB_SPEC appropriate for OpenBSD. Select the appropriate libc, depending on profiling and threads. Basically, -lc(_r)?(_p)?, select _r for threads, and _p for p or pg. */ -#define OBSD_LIB_SPEC "-lc%{pthread:_r}%{p:_p}%{!p:%{pg:_p}}" +#define OBSD_LIB_SPEC "%{!shared:-lc%{pthread:_r}%{p:_p}%{!p:%{pg:_p}}}" #ifndef OBSD_HAS_CORRECT_SPECS @@ -103,6 +107,7 @@ Boston, MA 02111-1307, USA. */ pic code. */ #undef ASM_SPEC #define ASM_SPEC "%{fpic:-k} %{fPIC:-k -K} %|" + #else /* Since we use gas, stdin -> - is a good idea, but we don't want to override native specs just for that. */ @@ -116,10 +121,10 @@ Boston, MA 02111-1307, USA. */ #undef LINK_SPEC #ifdef OBSD_NO_DYNAMIC_LIBRARIES #define LINK_SPEC \ - "%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{assert*}" + "%{g:%{!nostdlib:-L/usr/lib/debug}} %{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{assert*}" #else #define LINK_SPEC \ - "%{!shared:%{!nostdlib:%{!r*:%{!e*:-e start}}}} %{shared:-Bshareable -x} -dc -dp %{R*} %{static:-Bstatic} %{assert*}" + "%{g:%{!nostdlib:-L/usr/lib/debug}} %{!shared:%{!nostdlib:%{!r*:%{!e*:-e start}}}} %{shared:-Bshareable -x} -dc -dp %{R*} %{static:-Bstatic} %{assert*}" #endif #undef LIB_SPEC diff --git a/gcc/config/sparc/openbsd.h b/gcc/config/sparc/openbsd.h index c5dc443..ba97ac7 100644 --- a/gcc/config/sparc/openbsd.h +++ b/gcc/config/sparc/openbsd.h @@ -64,5 +64,6 @@ Boston, MA 02111-1307, USA. */ configuration files... */ #define DWARF2_UNWIND_INFO 0 -/* Default sparc.h does already define ASM_OUTPUT_MI_THUNK */ +#undef ASM_PREFERRED_EH_DATA_FORMAT +/* Default sparc.h does already define ASM_OUTPUT_MI_THUNK */ diff --git a/gcc/config/sparc/t-openbsd b/gcc/config/sparc/t-openbsd new file mode 100644 index 0000000..898a24e --- /dev/null +++ b/gcc/config/sparc/t-openbsd @@ -0,0 +1,5 @@ +# The native linker doesn't handle linking -fpic code with -fPIC code. Ugh. +# We cope by building both variants of libgcc. +MULTILIB_OPTIONS = fpic/fPIC +LIBGCC = stmp-multilib +INSTALL_LIBGCC = install-multilib diff --git a/gcc/config/t-libgcc-pic b/gcc/config/t-libgcc-pic new file mode 100644 index 0000000..ff935fe --- /dev/null +++ b/gcc/config/t-libgcc-pic @@ -0,0 +1,2 @@ +# Compile libgcc2.a with pic. +TARGET_LIBGCC2_CFLAGS = -fPIC |