head 1.10; access; symbols pkgsrc-2015Q1:1.9.0.96 pkgsrc-2015Q1-base:1.9 pkgsrc-2014Q4:1.9.0.94 pkgsrc-2014Q4-base:1.9 pkgsrc-2014Q3:1.9.0.92 pkgsrc-2014Q3-base:1.9 pkgsrc-2014Q2:1.9.0.90 pkgsrc-2014Q2-base:1.9 pkgsrc-2014Q1:1.9.0.88 pkgsrc-2014Q1-base:1.9 pkgsrc-2013Q4:1.9.0.86 pkgsrc-2013Q4-base:1.9 pkgsrc-2013Q3:1.9.0.84 pkgsrc-2013Q3-base:1.9 pkgsrc-2013Q2:1.9.0.82 pkgsrc-2013Q2-base:1.9 pkgsrc-2013Q1:1.9.0.80 pkgsrc-2013Q1-base:1.9 pkgsrc-2012Q4:1.9.0.78 pkgsrc-2012Q4-base:1.9 pkgsrc-2012Q3:1.9.0.76 pkgsrc-2012Q3-base:1.9 pkgsrc-2012Q2:1.9.0.74 pkgsrc-2012Q2-base:1.9 pkgsrc-2012Q1:1.9.0.72 pkgsrc-2012Q1-base:1.9 pkgsrc-2011Q4:1.9.0.70 pkgsrc-2011Q4-base:1.9 pkgsrc-2011Q3:1.9.0.68 pkgsrc-2011Q3-base:1.9 pkgsrc-2011Q2:1.9.0.66 pkgsrc-2011Q2-base:1.9 pkgsrc-2011Q1:1.9.0.64 pkgsrc-2011Q1-base:1.9 pkgsrc-2010Q4:1.9.0.62 pkgsrc-2010Q4-base:1.9 pkgsrc-2010Q3:1.9.0.60 pkgsrc-2010Q3-base:1.9 pkgsrc-2010Q2:1.9.0.58 pkgsrc-2010Q2-base:1.9 pkgsrc-2010Q1:1.9.0.56 pkgsrc-2010Q1-base:1.9 pkgsrc-2009Q4:1.9.0.54 pkgsrc-2009Q4-base:1.9 pkgsrc-2009Q3:1.9.0.52 pkgsrc-2009Q3-base:1.9 pkgsrc-2009Q2:1.9.0.50 pkgsrc-2009Q2-base:1.9 pkgsrc-2009Q1:1.9.0.48 pkgsrc-2009Q1-base:1.9 pkgsrc-2008Q4:1.9.0.46 pkgsrc-2008Q4-base:1.9 pkgsrc-2008Q3:1.9.0.44 pkgsrc-2008Q3-base:1.9 cube-native-xorg:1.9.0.42 cube-native-xorg-base:1.9 pkgsrc-2008Q2:1.9.0.40 pkgsrc-2008Q2-base:1.9 cwrapper:1.9.0.38 pkgsrc-2008Q1:1.9.0.36 pkgsrc-2008Q1-base:1.9 pkgsrc-2007Q4:1.9.0.34 pkgsrc-2007Q4-base:1.9 pkgsrc-2007Q3:1.9.0.32 pkgsrc-2007Q3-base:1.9 pkgsrc-2007Q2:1.9.0.30 pkgsrc-2007Q2-base:1.9 pkgsrc-2007Q1:1.9.0.28 pkgsrc-2007Q1-base:1.9 pkgsrc-2006Q4:1.9.0.26 pkgsrc-2006Q4-base:1.9 pkgsrc-2006Q3:1.9.0.24 pkgsrc-2006Q3-base:1.9 pkgsrc-2006Q2:1.9.0.22 pkgsrc-2006Q2-base:1.9 pkgsrc-2006Q1:1.9.0.20 pkgsrc-2006Q1-base:1.9 pkgsrc-2005Q4:1.9.0.18 pkgsrc-2005Q4-base:1.9 pkgsrc-2005Q3:1.9.0.16 pkgsrc-2005Q3-base:1.9 pkgsrc-2005Q2:1.9.0.14 pkgsrc-2005Q2-base:1.9 pkgsrc-2005Q1:1.9.0.12 pkgsrc-2005Q1-base:1.9 pkgsrc-2004Q4:1.9.0.10 pkgsrc-2004Q4-base:1.9 pkgsrc-2004Q3:1.9.0.8 pkgsrc-2004Q3-base:1.9 pkgsrc-2004Q2:1.9.0.6 pkgsrc-2004Q2-base:1.9 pkgsrc-2004Q1:1.9.0.4 pkgsrc-2004Q1-base:1.9 pkgsrc-2003Q4:1.9.0.2 pkgsrc-2003Q4-base:1.9 pkgviews:1.4.0.4 pkgviews-base:1.4 buildlink2:1.4.0.2 buildlink2-base:1.4 netbsd-1-5-PATCH003:1.4 netbsd-1-5-PATCH001:1.2 netbsd-1-5-RELEASE:1.1 netbsd-1-4-PATCH003:1.1; locks; strict; comment @# @; 1.10 date 2015.04.25.10.33.29; author wiz; state dead; branches; next 1.9; commitid CG2XaBpeRQKMwXiy; 1.9 date 2003.07.12.08.53.40; author jtb; state Exp; branches; next 1.8; 1.8 date 2003.07.04.16.27.25; author seb; state dead; branches; next 1.7; 1.7 date 2003.06.24.16.50.47; author jmc; state Exp; branches; next 1.6; 1.6 date 2003.05.24.19.26.25; author jschauma; state Exp; branches; next 1.5; 1.5 date 2002.08.12.01.53.42; author dmcmahill; state dead; branches; next 1.4; 1.4 date 2002.03.28.10.11.52; author jmc; state Exp; branches; next 1.3; 1.3 date 2002.01.03.20.40.42; author tron; state Exp; branches; next 1.2; 1.2 date 2001.04.27.10.45.23; author skrll; state Exp; branches; next 1.1; 1.1 date 2000.09.15.23.58.48; author tron; state Exp; branches; next ; desc @@ 1.10 log @Finish move of lang/gcc to lang/gcc2. Let me know if I broke something. @ text @$NetBSD: patch-af,v 1.9 2003/07/12 08:53:40 jtb Exp $ --- ../gcc-2.95.3/gcc/config/netbsd.h +++ ../gcc-2.95.3/gcc/config/netbsd.h.orig @@@@ -36,10 +36,13 @@@@ /* Provide a CPP_SPEC appropriate for NetBSD. Current we just deal with - the GCC option `-posix'. */ + the GCC option `-posix'. We also deal with -pthread, which is required + for the 2.95.3 STL to work. */ #undef CPP_SPEC -#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE}" +#define CPP_SPEC \ + "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \ + %{pthread:-D_REENTRANT -D_PTHREADS}" /* Provide an ASM_SPEC appropriate for NetBSD. Currently we only deal with the options for generating PIC code. */ @@@@ -54,7 +57,8 @@@@ #undef LIB_SPEC #define LIB_SPEC \ - "%{posix:%{!p:%{!pg:-lposix}}%{p:-lposix_p}%{pg:-lposix_p}} \ + "%{pthread:%{!p:%{!pg:-lpthread}}%{p:-lpthread_p}%{pg:-lpthread_p}} \ + %{posix:%{!p:%{!pg:-lposix}}%{p:-lposix_p}%{pg:-lposix_p}} \ %{!shared:%{!symbolic:%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}}" /* Provide a LIBGCC_SPEC appropriate for NetBSD. We also want to exclude @@@@ -64,7 +68,7 @@@@ #ifdef NETBSD_NATIVE #define LIBGCC_SPEC "%{!symbolic:%{!shared:%{!p:%{!pg:-lgcc}}}%{shared:-lgcc_pic}%{p:-lgcc_p}%{pg:-lgcc_p}}" #else -#define LIBGCC_SPEC "%{!shared:%{!symbolic:-lgcc}}" +#define LIBGCC_SPEC "%{!symbolic:%{!shared:-lgcc}%{shared:-lgcc_pic}}" #endif /* #ifdef NETBSD_AOUT */ @@@@ -147,6 +151,96 @@@@ #define ASM_DECLARE_RESULT(FILE, RESULT) #endif +/* NetBSD a.out support begins here. */ + +#ifndef NETBSD_ELF + +#undef DWARF_DEBUGGING_INFO /* XXX */ +#undef DWARF2_DEBUGGING_INFO /* XXX */ + +/* Write the extra assembler code needed to declare a function properly. + Some svr4 assemblers need to also have something extra said about the + function's return value. We allow for that here. */ + +#undef ASM_DECLARE_FUNCTION_NAME +#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ + do { \ + fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \ + assemble_name (FILE, NAME); \ + putc (',', FILE); \ + fprintf (FILE, TYPE_OPERAND_FMT, "function"); \ + putc ('\n', FILE); \ + ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ + ASM_OUTPUT_LABEL(FILE, NAME); \ + } while (0) + +/* Write the extra assembler code needed to declare an object properly. */ + +#undef ASM_DECLARE_OBJECT_NAME +#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ + do { \ + fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \ + assemble_name (FILE, NAME); \ + putc (',', FILE); \ + fprintf (FILE, TYPE_OPERAND_FMT, "object"); \ + putc ('\n', FILE); \ + size_directive_output = 0; \ + if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ + { \ + size_directive_output = 1; \ + fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ + } \ + ASM_OUTPUT_LABEL(FILE, NAME); \ + } while (0) + +/* Output the size directive for a decl in rest_of_decl_compilation + in the case where we did not do so before the initializer. + Once we find the error_mark_node, we know that the value of + size_directive_output was set + by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */ + +#undef ASM_FINISH_DECLARE_OBJECT +#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ +do { \ + char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ + if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ + && ! AT_END && TOP_LEVEL \ + && DECL_INITIAL (DECL) == error_mark_node \ + && !size_directive_output) \ + { \ + size_directive_output = 1; \ + fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ + assemble_name (FILE, name); \ + fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ + } \ + } while (0) + +/* This is how to declare the size of a function. */ + +#undef ASM_DECLARE_FUNCTION_SIZE +#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ + do { \ + if (!flag_inhibit_size_directive) \ + { \ + char label[256]; \ + static int labelno; \ + labelno++; \ + ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \ + ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \ + fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ + assemble_name (FILE, (FNAME)); \ + fprintf (FILE, ","); \ + assemble_name (FILE, label); \ + fprintf (FILE, "-"); \ + assemble_name (FILE, (FNAME)); \ + putc ('\n', FILE); \ + } \ + } while (0) + +#endif + /* NetBSD ELF support begins here. */ #ifdef NETBSD_ELF @@@@ -167,6 +261,7 @@@@ %{!pg: \ %{p:gcrt0%O%s} \ %{!p:crt0%O%s}}} \ + %:if-exists(crti%O%s) \ %{!shared:crtbegin%O%s} %{shared:crtbeginS%O%s}" /* Provide an ENDFILE_SPEC appropriate for NetBSD ELF targets. Here we @@@@ -175,13 +270,14 @@@@ #undef ENDFILE_SPEC #define ENDFILE_SPEC \ - "%{!shared:crtend%O%s} %{shared:crtendS%O%s}" + "%{!shared:crtend%O%s} %{shared:crtendS%O%s} \ + %:if-exists(crtn%O%s)" /* Provide a LINK_SPEC appropriate for a NetBSD ELF target. */ #undef LINK_SPEC #define LINK_SPEC \ - "%{assert*} \ + "%{assert*} %{R*} \ %{shared:-shared} \ %{!shared: \ -dc -dp \ @ 1.9 log @Add some patches against basesrc gcc implementing the "if-exists" function in the specs file. Enables the linker to pick up crti.o and crtn.o if they exist. @ text @d1 1 a1 1 $NetBSD$ @ 1.8 log @Convert to USE_NEW_TEXINFO. Remove or trim "info related" patch files. Install info files in package specific directory. Hence the PLIST files are now nearly empty... This should finish making these two packages really non-conflicting. Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.7 2003/06/24 16:50:47 jmc Exp $ d3 159 a161 15 --- ../gcc-2.95.3/gcc/Makefile.in.orig Sat May 24 14:56:02 2003 +++ ../gcc-2.95.3/gcc/Makefile.in Sat May 24 14:57:47 2003 @@@@ -2559,10 +2559,10 @@@@ for f in cpp.info* gcc.info*; do \ $(INSTALL_DATA) $$f $(infodir)/$$f; \ done - -if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ + -if $(SHELL) -c '${INSTALL_INFO} --version' >/dev/null 2>&1; then \ if [ -f $(infodir)/dir ] ; then \ for f in cpp.info gcc.info; do \ - install-info --dir-file=$(infodir)/dir $(infodir)/$$f; \ + ${INSTALL_INFO} --dir-file=$(infodir)/dir $(infodir)/$$f; \ done; \ else true; fi; \ else true; fi; @ 1.7 log @Make patches f,g,h work correctly. @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.6 2003/05/24 19:26:25 jschauma Exp $ @ 1.6 log @use ${INSTALL_INFO} rather than install-info, so that we don't accidently use an old or non-compatible version that may be in the base system. This makes this package install flawlessly under Linux. @ text @d1 1 a1 1 $NetBSD: $ d3 2 a4 2 --- gcc/Makefile.in.orig Sat May 24 14:56:02 2003 +++ gcc/Makefile.in Sat May 24 14:57:47 2003 @ 1.5 log @pull in most recent patches to gcc-2.95.3 from the netbsd-1-6 branch. Includes fixes for sparc, alpha, and others. Should help in keeping pkgsrc running on 1.5.* systems. The patches which mirror those in the main netbsd source tree have been all put into a single distribution patch file. This makes it much easier to maintain and easier to easily see which patches are specific to pkgsrc. @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.4 2002/03/28 10:11:52 jmc Exp $ d3 15 a17 112 --- ../gcc-2.95.3/gcc/config/arm/arm.c.orig 2001/04/23 11:59:30 1.1.1.2 +++ ../gcc-2.95.3/gcc/config/arm/arm.c 2001/12/19 23:14:50 1.4 @@@@ -281,7 +281,7 @@@@ if (ptr->string != NULL && ptr->string[0] != '\0') { - struct processors * sel; + const struct processors * sel; for (sel = ptr->processors; sel->name != NULL; sel ++) if (streq (ptr->string, sel->name)) @@@@ -566,7 +566,7 @@@@ if (!reload_completed || current_function_pretend_args_size || current_function_anonymous_args - || ((get_frame_size () + current_function_outgoing_args_size != 0) + || ((arm_get_frame_size () + current_function_outgoing_args_size != 0) && !(TARGET_APCS && frame_pointer_needed))) return 0; @@@@ -5397,6 +5397,18 @@@@ return ""; } +/* Generate a sequence of insns that will generate the correct return + address mask depending on the physical architecture that the program + is running on. */ +rtx +arm_gen_return_addr_mask () +{ + rtx reg = gen_reg_rtx (Pmode); + + emit_insn (gen_return_addr_mask (reg)); + return reg; +} + /* Return nonzero if optimizing and the current function is volatile. Such functions never return, and many memory cycles can be saved by not storing register values that will never be needed again. @@@@ -5828,11 +5840,71 @@@@ emit_insn (par); } +/* Calculate the size of the stack frame, taking into account any + padding that is required to ensure stack-alignment. */ +int arm_get_frame_size () +{ + int regno; + + int base_size = (get_frame_size () + 3) & ~3; + int entry_size = 0; + int live_regs_mask = 0; + int volatile_func = (optimize > 0 + && TREE_THIS_VOLATILE (current_function_decl)); + + if (! TARGET_ATPCS_STACK_ALIGN) + return base_size; + + /* We know that SP will be word aligned on entry, and we must + preserve that condition at any subroutine call. But those are + the only constraints. */ + + /* Space for variadic functions. */ + if (current_function_pretend_args_size) + entry_size += current_function_pretend_args_size; + + if (! volatile_func) + { + for (regno = 0; regno <= 10; regno++) + if (regs_ever_live[regno] && ! call_used_regs[regno]) + live_regs_mask |= 1 << regno; + + if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM]) + live_regs_mask |= 1 << PIC_OFFSET_TABLE_REGNUM; + + if (regs_ever_live[14]) + live_regs_mask |= 0x4000; + } + + if (frame_pointer_needed) + live_regs_mask |= 0xD800; + + /* If we have to push any registers, we must also push lr as well. */ + if (live_regs_mask) + live_regs_mask |= 0x4000; + + for (regno = 0; regno < 16; regno++) + if (live_regs_mask & (1 << regno)) + entry_size += 4; + + if (! volatile_func) + { + for (regno = 23; regno > 15; regno--) + if (regs_ever_live[regno] && ! call_used_regs[regno]) + entry_size += 12; + } + + if ((entry_size + base_size + current_function_outgoing_args_size) & 7) + base_size += 4; + + return base_size; +} + void arm_expand_prologue () { int reg; - rtx amount = GEN_INT (-(get_frame_size () + rtx amount = GEN_INT (-(arm_get_frame_size () + current_function_outgoing_args_size)); int live_regs_mask = 0; int store_arg_regs = 0; @ 1.4 log @Update patch set against a sync of source from gnusrc/dist/toolchain. Not very many overall changes. Main ones include 1. Support for powerpc, arm32 and vax 2. Makefile.gcc can now be included by anything which depends on gcc versions. If the version installed isn't 2.95.3 it'll add itself as a BUILD_DEPENDS. (XXX: any of the makefile's in pkgsrc should be checked and change to use this) 3. Remove special PLIST.NetBSD-sparc as it's no longer needed 4. Change post-extract loop to pick up any arch files from FILESDIR without having to hardcode all the archs 5. Remove arch restrictions as this should work on any arch supported by the main source tree as of 03/28/02 6. Add PKGREVISION as this clearly isn't stock 2.95.3 (it doesn't change gcc --version so version checks won't care). @ text @d1 1 a1 1 $NetBSD$ @ 1.3 log @Update "gcc" package to version 2.95.3. This is a bug fix release of version 2.95.2. This package includes all changes to "gcc" from the new toolchain in NetBSD-current. The only tested (and enabled) platform is "NetBSD-*-i386" so far. @ text @d3 2 a4 2 --- ../gcc-2.95.3/gcc/config/arm/arm.c.orig Thu Jan 25 15:03:24 2001 +++ ../gcc-2.95.3/gcc/config/arm/arm.c Thu Jan 3 20:37:53 2002 @ 1.2 log @Make sure that sjlj exceptions are used everywhere and be consistent with the defines. While I'm here pull across a fix for LIB_SPEC that prevents libc from being linked in when linking a shared library. Fixes pkg/12620 from Takuya SHIOZAKI @ text @d3 112 a114 175 --- ../gcc-2.95.2/gcc/config/sparc/netbsd64.h.orig Fri Apr 27 10:59:15 2001 +++ ../gcc-2.95.2/gcc/config/sparc/netbsd64.h @@@@ -0,0 +1,172 @@@@ +/* NetBSD/sparc64 ELF configuration */ + +/* + * Pull in generic SPARC64 ELF configuration, and then clean up + * afterwards + */ + +/* Let us output 32 bit code as well */ +#define SPARC_BI_ARCH + +/* Name the target CPU. This must be before . */ +#ifndef TARGET_CPU_DEFAULT +#define TARGET_CPU_DEFAULT TARGET_CPU_ultrasparc +#endif + +#include + +#include + +#undef CPP_SUBTARGET_SPEC +#define CPP_SUBTARGET_SPEC "-D__sparc64__" + +#undef LINK_SPEC64 +#define LINK_SPEC64 \ + "-m elf64_sparc \ + %{assert*} %{R*} \ + %{shared:-shared} \ + %{!shared: \ + -dy -dc -dp \ + %{!nostdlib:%{!r*:%{!e*:-e __start}}} \ + %{!static: \ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \ + %{static:-static}}" + +#undef LINK_SPEC +#define LINK_SPEC LINK_SPEC64 + +#ifdef SPARC_BI_ARCH + +#undef STARTFILE_SPEC64 +#define STARTFILE_SPEC64 \ + "%{!shared: \ + %{pg:gcrt0%O%s} \ + %{!pg: \ + %{p:gcrt0%O%s} \ + %{!p:crt0%O%s}}} \ + %{!shared:crtbegin%O%s} %{shared:crtbeginS%O%s}" + +#undef STARTFILE_SPEC32 +#define STARTFILE_SPEC32 \ + "%{!shared: \ + %{pg:/emul/netbsd32/usr/lib/gcrt0%O%s} \ + %{!pg: \ + %{p:/emul/netbsd32/usr/lib/gcrt0%O%s} \ + %{!p:/emul/netbsd32/usr/lib/crt0%O%s}}} \ + %{!shared:/emul/netbsd32/usr/lib/crtbegin%O%s} %{shared:/emul/netbsd32/usr/lib/crtbeginS%O%s}" + +#undef STARTFILE_SPEC +#if DEFAULT_ARCH32_P +#define STARTFILE_SPEC "\ +%{m32:" STARTFILE_SPEC32 "} \ +%{m64:" STARTFILE_SPEC64 "} \ +%{!m32:%{!m64:" STARTFILE_SPEC32 "}}" +#else +#define STARTFILE_SPEC "\ +%{m32:" STARTFILE_SPEC32 "} \ +%{m64:" STARTFILE_SPEC64 "} \ +%{!m32:%{!m64:" STARTFILE_SPEC64 "}}" +#endif + +#undef ENDFILE_SPEC64 +#define ENDFILE_SPEC64 \ + "%{!shared:crtend%O%s} %{shared:crtendS%O%s}" + +#undef ENDFILE_SPEC32 +#define ENDFILE_SPEC32 \ + "%{!shared:/emul/netbsd32/usr/lib/crtend%O%s} %{shared:/emul/netbsd32/usr/lib/crtendS%O%s}" + +#undef ENDFILE_SPEC +#if DEFAULT_ARCH32_P +#define ENDFILE_SPEC "\ +%{m32:" ENDFILE_SPEC32 "} \ +%{m64:" ENDFILE_SPEC64 "} \ +%{!m32:%{!m64:" ENDFILE_SPEC32 "}}" +#else +#define ENDFILE_SPEC "\ +%{m32:" ENDFILE_SPEC32 "} \ +%{m64:" ENDFILE_SPEC64 "} \ +%{!m32:%{!m64:" ENDFILE_SPEC64 "}}" +#endif + +#undef SUBTARGET_EXTRA_SPECS +#define SUBTARGET_EXTRA_SPECS \ + { "link_arch32", LINK_ARCH32_SPEC }, \ + { "link_arch64", LINK_ARCH64_SPEC }, \ + { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \ + { "link_arch", LINK_ARCH_SPEC }, + +#undef LINK_ARCH32_SPEC +#define LINK_ARCH32_SPEC \ + "-m elf32_sparc \ + -Y P,/emul/netbsd32/usr/lib \ + %{assert*} %{R*} \ + %{shared:-shared} \ + %{!shared: \ + -dy -dc -dp \ + %{!nostdlib:%{!r*:%{!e*:-e __start}}} \ + %{!static: \ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \ + %{static:-static}}" + +#undef LINK_ARCH64_SPEC +#define LINK_ARCH64_SPEC LINK_SPEC64 + +#define LINK_ARCH_SPEC "\ +%{m32:%(link_arch32)} \ +%{m64:%(link_arch64)} \ +%{!m32:%{!m64:%(link_arch_default)}} \ +" + +#define LINK_ARCH_DEFAULT_SPEC \ +(DEFAULT_ARCH32_P ? LINK_ARCH32_SPEC : LINK_ARCH64_SPEC) + +#undef LINK_SPEC +#define LINK_SPEC "\ +%(link_arch) \ +%{mlittle-endian:-EL} \ +" + +#undef CC1_SPEC +#if DEFAULT_ARCH32_P +#define CC1_SPEC "\ +%{sun4:} %{target:} \ +%{mcypress:-mcpu=cypress} \ +%{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \ +%{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \ +%{m64:-mptr64 -mcpu=ultrasparc -mstack-bias} \ +" +#else +#define CC1_SPEC "\ +%{sun4:} %{target:} \ +%{mcypress:-mcpu=cypress} \ +%{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \ +%{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \ +%{m32:-mptr32 -mcpu=cypress -mno-stack-bias} \ +" +#endif + +#if DEFAULT_ARCH32_P +#define MULTILIB_DEFAULTS { "m32" } +#else +#define MULTILIB_DEFAULTS { "m64" } +#endif + +#undef CPP_SUBTARGET_SPEC +#define CPP_SUBTARGET_SPEC \ +(DEFAULT_ARCH32_P ? "\ +%{m64:-D__sparc64__}%{!m64:-D__sparc} \ +" : "\ +%{!m32:-D__sparc64__}%{m32:-D__sparc} \ +") + +#endif /* SPARC_BI_ARCH */ + +/* Name the port. */ +#undef TARGET_NAME +#define TARGET_NAME "sparc64-netbsd" + +/* Use sjlj exceptions. */ +#define DWARF2_UNWIND_INFO 0 @ 1.1 log @- Add patches from NetBSD-current to fix build on i386 ELF systems. - Install into "${LOCALBASE}/gcc-2.95.2" to avoid that e.g. "bsd.pkg.mk" picks up the new compiler by accident. - Add a file "${LOCALBASE}/etc/gcc-2.95.2.mk" which makes it possible to use the new "gcc" like this: make MAKECONF=/usr/pkg/etc/gcc-2.95.2.mk @ text @d3 3 a5 3 --- ../gcc-2.95.2/gcc/config/sparc/netbsd64.h.orig Sat Sep 16 00:17:42 2000 +++ ../gcc-2.95.2/gcc/config/sparc/netbsd64.h Sat Sep 16 00:17:42 2000 @@@@ -0,0 +1,169 @@@@ d175 3 @